diff --git a/.gitignore b/.gitignore index 7d9b761d440253359d89a5aba7cc921cdb4877bf..c273e6b394bcb67138260238537960713c1c1d53 100644 --- a/.gitignore +++ b/.gitignore @@ -166,6 +166,7 @@ Desktop.ini # VSCode .vscode/ +.clangd/ XDG_CACHE_HOME/ # The file that contains metadata for VSCode Workspace *.code-workspace diff --git a/CMakeLists.txt b/CMakeLists.txt index e23e0975193001e7365b3b0798cf3550511fb741..4841c27ce97940a5515f27e10676cc138523b9a6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -35,6 +35,10 @@ option(ENABLE_WORKBENCH "Enable Qt5-based gui & components" ON) set(CPACK_INSTALL_CMAKE_PROJECTS "${CMAKE_BINARY_DIR}" "Mantid" "ALL" "/") +# Ensure that if we are running any sanitizers the compiler options are +# known in sub targets +include(Sanitizers) + # Quick exit if we only want data targets if(DATA_TARGETS_ONLY) include(SetupDataTargets) diff --git a/Framework/API/inc/MantidAPI/ADSValidator.h b/Framework/API/inc/MantidAPI/ADSValidator.h index c86916513ee85a1914edcb7ea8a3fdacc8cc0bf2..dd76d4f022dc6b3ac980df1a9ce48d56c0703fa9 100644 --- a/Framework/API/inc/MantidAPI/ADSValidator.h +++ b/Framework/API/inc/MantidAPI/ADSValidator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/AlgoTimeRegister.h b/Framework/API/inc/MantidAPI/AlgoTimeRegister.h index 087ec3d94e2a0344d2b9cdd9bd5430a3a1c197cc..bcea2a9af3f598e30c8d3bedda415df7788f1247 100644 --- a/Framework/API/inc/MantidAPI/AlgoTimeRegister.h +++ b/Framework/API/inc/MantidAPI/AlgoTimeRegister.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/Algorithm.h b/Framework/API/inc/MantidAPI/Algorithm.h index 945fb2538a8fb5ca1d7316cbcdcb73ac3ea681dc..b92a36024ec8a509b62f672e6b9ced601420e985 100644 --- a/Framework/API/inc/MantidAPI/Algorithm.h +++ b/Framework/API/inc/MantidAPI/Algorithm.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -219,6 +219,11 @@ public: bool execute() override final; void executeAsChildAlg() override; std::map<std::string, std::string> validateInputs() override; + + /// Gets the current execution state + ExecutionState executionState() const override; + /// Gets the current result State + ResultState resultState() const override; bool isInitialized() const override; bool isExecuted() const override; bool isRunning() const override; @@ -283,7 +288,7 @@ public: const std::string &name, const double startProgress = -1., const double endProgress = -1., const bool enableLogging = true, const int &version = -1); - void setupAsChildAlgorithm(boost::shared_ptr<Algorithm> algorithm, + void setupAsChildAlgorithm(const boost::shared_ptr<Algorithm> &algorithm, const double startProgress = -1., const double endProgress = -1., const bool enableLogging = true); @@ -330,8 +335,10 @@ protected: friend class AlgorithmProxy; void initializeFromProxy(const AlgorithmProxy &); - void setInitialized(); - void setExecuted(bool state); + void setExecutionState( + const ExecutionState state); ///< Sets the current execution state + void + setResultState(const ResultState state); ///< Sets the result execution state void store(); @@ -454,14 +461,13 @@ private: mutable std::unique_ptr<Poco::NObserver<Algorithm, ProgressNotification>> m_progressObserver; - bool m_isInitialized; ///< Algorithm has been initialized flag - bool m_isExecuted; ///< Algorithm is executed flag + std::atomic<ExecutionState> m_executionState; ///< the current execution state + std::atomic<ResultState> m_resultState; ///< the current result State bool m_isChildAlgorithm; ///< Algorithm is a child algorithm bool m_recordHistoryForChild; ///< Flag to indicate whether history should be /// recorded. Applicable to child algs only bool m_alwaysStoreInADS; ///< Always store in the ADS, even for child algos bool m_runningAsync; ///< Algorithm is running asynchronously - std::atomic<bool> m_running; ///< Algorithm is running bool m_rethrow; ///< Algorithm should rethrow exceptions while executing bool m_isAlgStartupLoggingEnabled; /// Whether to log alg startup and /// closedown messages from the base class diff --git a/Framework/API/inc/MantidAPI/Algorithm.tcc b/Framework/API/inc/MantidAPI/Algorithm.tcc index 7df5eda4386ad0f586b38ae8b0db3eae76e1fd1f..793eb77f16e93f4b95dcff6a3f0d05fb6f2c9d21 100644 --- a/Framework/API/inc/MantidAPI/Algorithm.tcc +++ b/Framework/API/inc/MantidAPI/Algorithm.tcc @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/AlgorithmFactory.h b/Framework/API/inc/MantidAPI/AlgorithmFactory.h index 2531c2757ffb7924903473fd8714bf6de567b4f0..0bbcea94b8ab9bad420414f6dbe55ece8ab0f456 100644 --- a/Framework/API/inc/MantidAPI/AlgorithmFactory.h +++ b/Framework/API/inc/MantidAPI/AlgorithmFactory.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -129,9 +129,9 @@ private: /// Extract the name of an algorithm const std::string - extractAlgName(const boost::shared_ptr<IAlgorithm> alg) const; + extractAlgName(const boost::shared_ptr<IAlgorithm> &alg) const; /// Extract the version of an algorithm - int extractAlgVersion(const boost::shared_ptr<IAlgorithm> alg) const; + int extractAlgVersion(const boost::shared_ptr<IAlgorithm> &alg) const; /// Create an algorithm object with the specified name boost::shared_ptr<Algorithm> createAlgorithm(const std::string &name, diff --git a/Framework/API/inc/MantidAPI/AlgorithmFactoryObserver.h b/Framework/API/inc/MantidAPI/AlgorithmFactoryObserver.h index 389581e5c33ba11f3fcd1907e644e82b0131be66..8a402e874fb209c52351812d07bd224370febb01 100644 --- a/Framework/API/inc/MantidAPI/AlgorithmFactoryObserver.h +++ b/Framework/API/inc/MantidAPI/AlgorithmFactoryObserver.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/AlgorithmHasProperty.h b/Framework/API/inc/MantidAPI/AlgorithmHasProperty.h index e6f341eb6ef32001955872d4e6b5b58062d5ce3d..b9e691e4930fe8fbef882dce10d430aed4112254 100644 --- a/Framework/API/inc/MantidAPI/AlgorithmHasProperty.h +++ b/Framework/API/inc/MantidAPI/AlgorithmHasProperty.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/AlgorithmHistory.h b/Framework/API/inc/MantidAPI/AlgorithmHistory.h index 4289f27d20246c228aebb44f34ea35abea1727c0..9da3a963252551ad9640aa8874f7d7bedbc5b6ed 100644 --- a/Framework/API/inc/MantidAPI/AlgorithmHistory.h +++ b/Framework/API/inc/MantidAPI/AlgorithmHistory.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -63,7 +63,7 @@ public: bool isdefault, const unsigned int &direction = 99); /// add a child algorithm history record to this history object - void addChildHistory(AlgorithmHistory_sptr childHist); + void addChildHistory(const AlgorithmHistory_sptr &childHist); // get functions /// get name of algorithm in history const const std::string &name() const { return m_name; } diff --git a/Framework/API/inc/MantidAPI/AlgorithmManager.h b/Framework/API/inc/MantidAPI/AlgorithmManager.h index 86af8f4214437240c135c3bb2319d328d5e485e6..652795dd2ac45ca16480cbd93a7c6fd83ad1e4ce 100644 --- a/Framework/API/inc/MantidAPI/AlgorithmManager.h +++ b/Framework/API/inc/MantidAPI/AlgorithmManager.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -17,6 +17,7 @@ #include <deque> #include <mutex> #include <string> +#include <utility> namespace Mantid { namespace API { @@ -26,7 +27,7 @@ namespace API { class AlgorithmStartingNotification : public Poco::Notification { public: AlgorithmStartingNotification(IAlgorithm_sptr alg) - : Poco::Notification(), m_alg(alg) {} + : Poco::Notification(), m_alg(std::move(alg)) {} /// Returns the algorithm that is starting IAlgorithm_sptr getAlgorithm() const { return m_alg; } @@ -48,7 +49,6 @@ public: const int &version = -1) const; std::size_t size() const; - void setMaxAlgorithms(int n); IAlgorithm_sptr getAlgorithm(AlgorithmID id) const; void removeById(AlgorithmID id); @@ -78,8 +78,9 @@ private: /// Unimplemented assignment operator AlgorithmManagerImpl &operator=(const AlgorithmManagerImpl &); - /// The maximum size of the algorithm store - int m_max_no_algs; + /// Removes any finished algorithms from the list of managed algorithms + size_t removeFinishedAlgorithms(); + /// The list of managed algorithms std::deque<IAlgorithm_sptr> m_managed_algs; ///< pointers to managed algorithms [policy???] diff --git a/Framework/API/inc/MantidAPI/AlgorithmObserver.h b/Framework/API/inc/MantidAPI/AlgorithmObserver.h index 9839747a9d7dc9ee72976d9faca8f0826d091b78..3de449bd9cc157cc36b618951baea51553516e93 100644 --- a/Framework/API/inc/MantidAPI/AlgorithmObserver.h +++ b/Framework/API/inc/MantidAPI/AlgorithmObserver.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -23,17 +23,17 @@ Hides Poco::Notification API from the user. class MANTID_API_DLL AlgorithmObserver { public: AlgorithmObserver(); - AlgorithmObserver(IAlgorithm_const_sptr alg); + AlgorithmObserver(const IAlgorithm_const_sptr &alg); virtual ~AlgorithmObserver(); - void observeAll(IAlgorithm_const_sptr alg); - void observeProgress(IAlgorithm_const_sptr alg); + void observeAll(const IAlgorithm_const_sptr &alg); + void observeProgress(const IAlgorithm_const_sptr &alg); void observeStarting(); - void observeStart(IAlgorithm_const_sptr alg); - void observeFinish(IAlgorithm_const_sptr alg); - void observeError(IAlgorithm_const_sptr alg); + void observeStart(const IAlgorithm_const_sptr &alg); + void observeFinish(const IAlgorithm_const_sptr &alg); + void observeError(const IAlgorithm_const_sptr &alg); - void stopObserving(IAlgorithm_const_sptr alg); + void stopObserving(const IAlgorithm_const_sptr &alg); void stopObserving(const Mantid::API::IAlgorithm *alg); void stopObservingManager(); diff --git a/Framework/API/inc/MantidAPI/AlgorithmProperty.h b/Framework/API/inc/MantidAPI/AlgorithmProperty.h index 4a8a03dac87cead3b5531232f3f1847d8b5d96fc..ccf3dfe77c3334094e4e0c760a5bb852424cd100 100644 --- a/Framework/API/inc/MantidAPI/AlgorithmProperty.h +++ b/Framework/API/inc/MantidAPI/AlgorithmProperty.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/AlgorithmProxy.h b/Framework/API/inc/MantidAPI/AlgorithmProxy.h index e3dceacb0907d51b494a20ca142a0798ec6c1309..45490f3bcb7167232b937cf1df29b8dbcb575f88 100644 --- a/Framework/API/inc/MantidAPI/AlgorithmProxy.h +++ b/Framework/API/inc/MantidAPI/AlgorithmProxy.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -50,7 +50,7 @@ http://proj-gaudi.web.cern.ch/proj-gaudi/) class MANTID_API_DLL AlgorithmProxy : public IAlgorithm, public Kernel::PropertyManagerOwner { public: - AlgorithmProxy(Algorithm_sptr alg); + AlgorithmProxy(const Algorithm_sptr &alg); AlgorithmProxy(const AlgorithmProxy &) = delete; AlgorithmProxy &operator=(const AlgorithmProxy &) = delete; ~AlgorithmProxy() override; @@ -88,6 +88,12 @@ public: throw std::runtime_error("Not implemented."); } Poco::ActiveResult<bool> executeAsync() override; + + /// Gets the current execution state + ExecutionState executionState() const override; + /// Gets the current result State + ResultState resultState() const override; + bool isInitialized() const override; bool isExecuted() const override; @@ -179,11 +185,13 @@ private: const int m_version; ///< version of the real algorithm mutable boost::shared_ptr<Algorithm> - m_alg; ///< Shared pointer to a real algorithm. Created on demand - bool m_isExecuted; ///< Executed flag + m_alg; ///< Shared pointer to a real algorithm. Created on demand + + ExecutionState m_executionState; ///< the current execution state + ResultState m_resultState; ///< the current result State bool m_isLoggingEnabled; ///< is the logging of the underlying algorithm - /// enabled - int m_loggingOffset; ///< the logging priority offset + /// enabled + int m_loggingOffset; ///< the logging priority offset bool m_isAlgStartupLoggingEnabled; /// Whether to log alg startup and /// closedown messages from the base class /// (default = true) diff --git a/Framework/API/inc/MantidAPI/AnalysisDataService.h b/Framework/API/inc/MantidAPI/AnalysisDataService.h index ae22acc3167e58578d31759290c8a3e87b91ecae..6cf1b4df8b66a072e388676553c19140f9cca0e4 100644 --- a/Framework/API/inc/MantidAPI/AnalysisDataService.h +++ b/Framework/API/inc/MantidAPI/AnalysisDataService.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/AnalysisDataServiceObserver.h b/Framework/API/inc/MantidAPI/AnalysisDataServiceObserver.h index 9d725aefaa827c59aaf75e69e8c055c48910a631..cfb8b7f1f40246de7c59fab832ab38ae1039dda7 100644 --- a/Framework/API/inc/MantidAPI/AnalysisDataServiceObserver.h +++ b/Framework/API/inc/MantidAPI/AnalysisDataServiceObserver.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/ArchiveSearchFactory.h b/Framework/API/inc/MantidAPI/ArchiveSearchFactory.h index 29cf91d3d284d1393f40dc5a3c215d1ab05122d6..d96ec4f0a59e0c5af72ff3ddf4458f1e2266f1da 100644 --- a/Framework/API/inc/MantidAPI/ArchiveSearchFactory.h +++ b/Framework/API/inc/MantidAPI/ArchiveSearchFactory.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/Axis.h b/Framework/API/inc/MantidAPI/Axis.h index 26d44633dfd1c0f2c96a5ad8c9bbe90f4ed123f5..eaef0c97d97fbc052f15fcf46bce6f581401f6cf 100644 --- a/Framework/API/inc/MantidAPI/Axis.h +++ b/Framework/API/inc/MantidAPI/Axis.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/BinEdgeAxis.h b/Framework/API/inc/MantidAPI/BinEdgeAxis.h index d6ef198ac58a9ab8f43b4be5a654b4e993e1cbb0..75b930c0b7928c3457b64edf68cc4da041f03a31 100644 --- a/Framework/API/inc/MantidAPI/BinEdgeAxis.h +++ b/Framework/API/inc/MantidAPI/BinEdgeAxis.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/BoostOptionalToAlgorithmProperty.h b/Framework/API/inc/MantidAPI/BoostOptionalToAlgorithmProperty.h index 117cf4eec85856725f7e5b255f8b19f44f988c98..39af124f01c44922a82a2e0068345fbab9dced95 100644 --- a/Framework/API/inc/MantidAPI/BoostOptionalToAlgorithmProperty.h +++ b/Framework/API/inc/MantidAPI/BoostOptionalToAlgorithmProperty.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -36,8 +36,9 @@ value of type boost::optional<T> will be returned. */ template <typename T> T checkForMandatoryInstrumentDefault( - Mantid::API::Algorithm *const alg, std::string propName, - Mantid::Geometry::Instrument_const_sptr instrument, std::string idf_name) { + Mantid::API::Algorithm *const alg, const std::string &propName, + const Mantid::Geometry::Instrument_const_sptr &instrument, + const std::string &idf_name) { auto algProperty = alg->getPointerToProperty(propName); if (algProperty->isDefault()) { auto defaults = instrument->getNumberParameter(idf_name); @@ -68,8 +69,9 @@ T checkForMandatoryInstrumentDefault( */ template <typename T> boost::optional<T> checkForOptionalInstrumentDefault( - Mantid::API::Algorithm *const alg, std::string propName, - Mantid::Geometry::Instrument_const_sptr instrument, std::string idf_name) { + Mantid::API::Algorithm *const alg, const std::string &propName, + const Mantid::Geometry::Instrument_const_sptr &instrument, + const std::string &idf_name) { auto algProperty = alg->getPointerToProperty(propName); if (algProperty->isDefault()) { auto defaults = instrument->getNumberParameter(idf_name); @@ -90,12 +92,14 @@ boost::optional<T> checkForOptionalInstrumentDefault( */ template <> MANTID_API_DLL std::string checkForMandatoryInstrumentDefault( - Mantid::API::Algorithm *const alg, std::string propName, - Mantid::Geometry::Instrument_const_sptr instrument, std::string idf_name); + Mantid::API::Algorithm *const alg, const std::string &propName, + const Mantid::Geometry::Instrument_const_sptr &instrument, + const std::string &idf_name); template <> MANTID_API_DLL boost::optional<std::string> checkForOptionalInstrumentDefault( - Mantid::API::Algorithm *const alg, std::string propName, - Mantid::Geometry::Instrument_const_sptr instrument, std::string idf_name); + Mantid::API::Algorithm *const alg, const std::string &propName, + const Mantid::Geometry::Instrument_const_sptr &instrument, + const std::string &idf_name); } // namespace API } // namespace Mantid diff --git a/Framework/API/inc/MantidAPI/BoxController.h b/Framework/API/inc/MantidAPI/BoxController.h index f716f32f49661d9d1e7f6e752166b09796c6bfb9..9c52e87a400d197b29c6fa9a83fe45e1cb463a3b 100644 --- a/Framework/API/inc/MantidAPI/BoxController.h +++ b/Framework/API/inc/MantidAPI/BoxController.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -399,7 +399,7 @@ public: IBoxControllerIO *getFileIO() { return m_fileIO.get(); } /// makes box controller file based by providing class, responsible for /// fileIO. - void setFileBacked(boost::shared_ptr<IBoxControllerIO> newFileIO, + void setFileBacked(const boost::shared_ptr<IBoxControllerIO> &newFileIO, const std::string &fileName = ""); void clearFileBacked(); //----------------------------------------------------------------------------------- diff --git a/Framework/API/inc/MantidAPI/CatalogFactory.h b/Framework/API/inc/MantidAPI/CatalogFactory.h index ac6f4cd66822bda568728be10c344e6bde2e5306..1755444a7619c49c5d1ce7339ae5503ab13f040b 100644 --- a/Framework/API/inc/MantidAPI/CatalogFactory.h +++ b/Framework/API/inc/MantidAPI/CatalogFactory.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/CatalogManager.h b/Framework/API/inc/MantidAPI/CatalogManager.h index 7c3ac54df97ea38e1d1d9056c0440118a3b183be..914fc2f508600583cdc2a1adc2e617a1f2484afc 100644 --- a/Framework/API/inc/MantidAPI/CatalogManager.h +++ b/Framework/API/inc/MantidAPI/CatalogManager.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/CatalogSession.h b/Framework/API/inc/MantidAPI/CatalogSession.h index 7840bd93587929c27252fc8ac71c9387d63f2dd4..6c4d062991f71c267e09aba4f797b8d1efb84ab0 100644 --- a/Framework/API/inc/MantidAPI/CatalogSession.h +++ b/Framework/API/inc/MantidAPI/CatalogSession.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/Citation.h b/Framework/API/inc/MantidAPI/Citation.h index 40308a90ec6cab6418070a56eb6f24d16c91d07d..19d85c95bda4e3d0a7bb1817c3707a257ab69234 100644 --- a/Framework/API/inc/MantidAPI/Citation.h +++ b/Framework/API/inc/MantidAPI/Citation.h @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #pragma once #include "MantidAPI/DllConfig.h" diff --git a/Framework/API/inc/MantidAPI/Column.h b/Framework/API/inc/MantidAPI/Column.h index c7c6e3d55a73505906428e28f05a52ae8746eb2c..18ee63881e95b7a2fe46070b09157752eccfee29 100644 --- a/Framework/API/inc/MantidAPI/Column.h +++ b/Framework/API/inc/MantidAPI/Column.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/ColumnFactory.h b/Framework/API/inc/MantidAPI/ColumnFactory.h index 568b33c9f3871829eb177fe05be9e769fdc20646..ed4d15a268b37ada82771507e195241339cd9a05 100644 --- a/Framework/API/inc/MantidAPI/ColumnFactory.h +++ b/Framework/API/inc/MantidAPI/ColumnFactory.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/CommonBinsValidator.h b/Framework/API/inc/MantidAPI/CommonBinsValidator.h index c9edca471680cfd8b825070c02269eeb06ca3fb2..350ab0201981b7e1b4b7748f54a004c2ccc8665d 100644 --- a/Framework/API/inc/MantidAPI/CommonBinsValidator.h +++ b/Framework/API/inc/MantidAPI/CommonBinsValidator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/CompositeCatalog.h b/Framework/API/inc/MantidAPI/CompositeCatalog.h index 2fa199ba69b0610668b7609ce8a7fab35e66c1f1..b4ebf7022f981e57079ddab9bd6167edba3713b9 100644 --- a/Framework/API/inc/MantidAPI/CompositeCatalog.h +++ b/Framework/API/inc/MantidAPI/CompositeCatalog.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -25,7 +25,7 @@ public: /// Constructor CompositeCatalog(); /// Adds a catalog to the list of catalogs (m_catalogs) - void add(const ICatalog_sptr catalog); + void add(const ICatalog_sptr &catalog); /// Log the user into the catalog system. CatalogSession_sptr login(const std::string &username, const std::string &password, diff --git a/Framework/API/inc/MantidAPI/CompositeDomain.h b/Framework/API/inc/MantidAPI/CompositeDomain.h index c7eb166b13009630e94a8e051f267cfdfff6bc7f..9645cfe8273c0c4ae4f80dd270220dcdf38c0967 100644 --- a/Framework/API/inc/MantidAPI/CompositeDomain.h +++ b/Framework/API/inc/MantidAPI/CompositeDomain.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/CompositeDomainMD.h b/Framework/API/inc/MantidAPI/CompositeDomainMD.h index 0e3d19eed766ad80dccb314a64a2181f991dad96..0ef223294d2acd1febee0f5a92ee25abe798d1be 100644 --- a/Framework/API/inc/MantidAPI/CompositeDomainMD.h +++ b/Framework/API/inc/MantidAPI/CompositeDomainMD.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -27,7 +27,7 @@ class FunctionDomainMD; */ class MANTID_API_DLL CompositeDomainMD : public CompositeDomain { public: - CompositeDomainMD(IMDWorkspace_const_sptr ws, size_t maxDomainSize); + CompositeDomainMD(const IMDWorkspace_const_sptr &ws, size_t maxDomainSize); ~CompositeDomainMD() override; /// Return the total number of arguments in the domain size_t size() const override { return m_totalSize; } diff --git a/Framework/API/inc/MantidAPI/CompositeFunction.h b/Framework/API/inc/MantidAPI/CompositeFunction.h index 110b7de2d998d99d41c38bb19d973f2a3a7321e9..d7034583b1de25f7cb6a899d8452267c94685c49 100644 --- a/Framework/API/inc/MantidAPI/CompositeFunction.h +++ b/Framework/API/inc/MantidAPI/CompositeFunction.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -148,9 +148,10 @@ public: /// Remove a function void removeFunction(size_t i); /// Replace a function - void replaceFunction(size_t i, IFunction_sptr f); + void replaceFunction(size_t i, const IFunction_sptr &f); /// Replace a function - void replaceFunctionPtr(const IFunction_sptr f_old, IFunction_sptr f_new); + void replaceFunctionPtr(const IFunction_sptr &f_old, + const IFunction_sptr &f_new); /// Get the function index std::size_t functionIndex(std::size_t i) const; /// Returns the index of parameter i as it declared in its function diff --git a/Framework/API/inc/MantidAPI/ConstraintFactory.h b/Framework/API/inc/MantidAPI/ConstraintFactory.h index 252db01c00dc7c8e8df035effe7d7f5ce2dda0af..576b9744e3a73717741012c60c5e0cf3e24e4395 100644 --- a/Framework/API/inc/MantidAPI/ConstraintFactory.h +++ b/Framework/API/inc/MantidAPI/ConstraintFactory.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/CoordTransform.h b/Framework/API/inc/MantidAPI/CoordTransform.h index e5c99862391d7e285caacf02b869bc59d47ebfcb..0b736ae503a1327da21e41691922aebb43469781 100644 --- a/Framework/API/inc/MantidAPI/CoordTransform.h +++ b/Framework/API/inc/MantidAPI/CoordTransform.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/CostFunctionFactory.h b/Framework/API/inc/MantidAPI/CostFunctionFactory.h index 093d476c2da150c0454a0d9925d61b5e8300e6bc..4d51afafef4a786a31780b237fc856f18a836c65 100644 --- a/Framework/API/inc/MantidAPI/CostFunctionFactory.h +++ b/Framework/API/inc/MantidAPI/CostFunctionFactory.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/DataProcessorAlgorithm.h b/Framework/API/inc/MantidAPI/DataProcessorAlgorithm.h index b062edb027a2310b55174acb326eef0b74a2e3b4..ae1dfeb7cb6b7f0949853938934b92e5ea3f6172 100644 --- a/Framework/API/inc/MantidAPI/DataProcessorAlgorithm.h +++ b/Framework/API/inc/MantidAPI/DataProcessorAlgorithm.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -45,7 +45,7 @@ protected: void setPropManagerPropName(const std::string &propName); void mapPropertyName(const std::string &nameInProp, const std::string &nameInPropManager); - void copyProperty(API::Algorithm_sptr alg, const std::string &name); + void copyProperty(const API::Algorithm_sptr &alg, const std::string &name); virtual ITableWorkspace_sptr determineChunk(const std::string &filename); virtual MatrixWorkspace_sptr loadChunk(const size_t rowIndex); Workspace_sptr load(const std::string &inputData, diff --git a/Framework/API/inc/MantidAPI/DeclareUserAlg.h b/Framework/API/inc/MantidAPI/DeclareUserAlg.h index df379a68c6226a24e183afba5e3994b73621aad9..5c452425b9ec35799d5f43def3dc6c07d7b28e6b 100644 --- a/Framework/API/inc/MantidAPI/DeclareUserAlg.h +++ b/Framework/API/inc/MantidAPI/DeclareUserAlg.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/DeprecatedAlgorithm.h b/Framework/API/inc/MantidAPI/DeprecatedAlgorithm.h index 2bd441db82ce09db407761ef287f2dac1164b7aa..e3f9100f12b2825c9d5ae338397c7f021b70f161 100644 --- a/Framework/API/inc/MantidAPI/DeprecatedAlgorithm.h +++ b/Framework/API/inc/MantidAPI/DeprecatedAlgorithm.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/DetectorSearcher.h b/Framework/API/inc/MantidAPI/DetectorSearcher.h index 1f8ed8f4ae046d8ff0fe4b73e4c602d4eb14cf1d..27c4a4f7b2c328c5b5c80250f8fccac67b62a8bc 100644 --- a/Framework/API/inc/MantidAPI/DetectorSearcher.h +++ b/Framework/API/inc/MantidAPI/DetectorSearcher.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -43,7 +43,7 @@ public: using DetectorSearchResult = std::tuple<bool, size_t>; /// Create a new DetectorSearcher with the given instrument & detectors - DetectorSearcher(Geometry::Instrument_const_sptr instrument, + DetectorSearcher(const Geometry::Instrument_const_sptr &instrument, const Geometry::DetectorInfo &detInfo); /// Find a detector that intsects with the given Qlab vector DetectorSearchResult findDetectorIndex(const Kernel::V3D &q); diff --git a/Framework/API/inc/MantidAPI/DistributedAlgorithm.h b/Framework/API/inc/MantidAPI/DistributedAlgorithm.h index 0be4e33e892bbbb0c6f5fdab50f0f77f27c0010f..04caacc3abcbab458376c6135f1cfd61ef966248 100644 --- a/Framework/API/inc/MantidAPI/DistributedAlgorithm.h +++ b/Framework/API/inc/MantidAPI/DistributedAlgorithm.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/DomainCreatorFactory.h b/Framework/API/inc/MantidAPI/DomainCreatorFactory.h index 26f0e679c7b6b9457162475c0cafa076ee2e9fa9..67621d4788dc607ff26471a3a12d6042b5f3fac6 100644 --- a/Framework/API/inc/MantidAPI/DomainCreatorFactory.h +++ b/Framework/API/inc/MantidAPI/DomainCreatorFactory.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/EnabledWhenWorkspaceIsType.h b/Framework/API/inc/MantidAPI/EnabledWhenWorkspaceIsType.h index f408c5421898a51413e90ec080caaee23ba28757..a849731c9ff0b40f705049907931d981704495f9 100644 --- a/Framework/API/inc/MantidAPI/EnabledWhenWorkspaceIsType.h +++ b/Framework/API/inc/MantidAPI/EnabledWhenWorkspaceIsType.h @@ -1,11 +1,13 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once +#include <utility> + #include "MantidAPI/AnalysisDataService.h" #include "MantidAPI/Workspace_fwd.h" #include "MantidKernel/DataService.h" @@ -35,7 +37,7 @@ public: */ EnabledWhenWorkspaceIsType(std::string otherPropName, bool enabledSetting = true) - : IPropertySettings(), m_otherPropName(otherPropName), + : IPropertySettings(), m_otherPropName(std::move(otherPropName)), m_enabledSetting(enabledSetting) {} //-------------------------------------------------------------------------------------------- diff --git a/Framework/API/inc/MantidAPI/EqualBinSizesValidator.h b/Framework/API/inc/MantidAPI/EqualBinSizesValidator.h index bc007051a7f551d5de49c43b70f1e0293dee69ed..a049b7b0c0583e18e51d596176242c217f16f52e 100644 --- a/Framework/API/inc/MantidAPI/EqualBinSizesValidator.h +++ b/Framework/API/inc/MantidAPI/EqualBinSizesValidator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/ExperimentInfo.h b/Framework/API/inc/MantidAPI/ExperimentInfo.h index 12468576d062453a438be3ef05595a31f6f221cd..4d3134e9e43b522603e5027801d9abed8ec84d8c 100644 --- a/Framework/API/inc/MantidAPI/ExperimentInfo.h +++ b/Framework/API/inc/MantidAPI/ExperimentInfo.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -107,9 +107,9 @@ public: /// Easy access to the efixed value for this run & detector ID double getEFixed(const detid_t detID) const; /// Easy access to the efixed value for this run & optional detector - double getEFixed(const boost::shared_ptr<const Geometry::IDetector> detector = - boost::shared_ptr<const Geometry::IDetector>{ - nullptr}) const; + double + getEFixed(const boost::shared_ptr<const Geometry::IDetector> &detector = + boost::shared_ptr<const Geometry::IDetector>{nullptr}) const; /// Set the efixed value for a given detector ID void setEFixed(const detid_t detID, const double value); diff --git a/Framework/API/inc/MantidAPI/Expression.h b/Framework/API/inc/MantidAPI/Expression.h index e0fd77d50e918c3ef867c71e8d0557ed2de95ad3..096a9f6c9b5fad6670806d99c6b3cf4993993aba 100644 --- a/Framework/API/inc/MantidAPI/Expression.h +++ b/Framework/API/inc/MantidAPI/Expression.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/FileBackedExperimentInfo.h b/Framework/API/inc/MantidAPI/FileBackedExperimentInfo.h index 37ad9d032a1555187c05581c14069ecbc3376fd0..b6cc8922538682ae2facd3810da88404f85b9d9d 100644 --- a/Framework/API/inc/MantidAPI/FileBackedExperimentInfo.h +++ b/Framework/API/inc/MantidAPI/FileBackedExperimentInfo.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/FileFinder.h b/Framework/API/inc/MantidAPI/FileFinder.h index 003e62c9f5ca8a72ec4bf1ba3427cc4773d82564..86b8c7a2281ff25cb0aed2e099b2b613270fc69c 100644 --- a/Framework/API/inc/MantidAPI/FileFinder.h +++ b/Framework/API/inc/MantidAPI/FileFinder.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/FileLoaderRegistry.h b/Framework/API/inc/MantidAPI/FileLoaderRegistry.h index ea608352ca2a445c5d62be4af0d035f533d2c649..947b89a4b3ef09f4116b489d4b844a21a890150e 100644 --- a/Framework/API/inc/MantidAPI/FileLoaderRegistry.h +++ b/Framework/API/inc/MantidAPI/FileLoaderRegistry.h @@ -1,13 +1,15 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidAPI/AlgorithmFactory.h" #include "MantidAPI/IFileLoader.h" +#include "MantidKernel/FileDescriptor.h" +#include "MantidKernel/NexusDescriptor.h" #include "MantidKernel/SingletonHolder.h" #ifndef Q_MOC_RUN diff --git a/Framework/API/inc/MantidAPI/FileProperty.h b/Framework/API/inc/MantidAPI/FileProperty.h index 1d373ed01e97ea3f938e23fb2cad5bd4fbff7131..a3b8d682810f28025decce4905323dad8ca2014d 100644 --- a/Framework/API/inc/MantidAPI/FileProperty.h +++ b/Framework/API/inc/MantidAPI/FileProperty.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/FrameworkManager.h b/Framework/API/inc/MantidAPI/FrameworkManager.h index b5a43d33e7bcaf76b3024cdc30f870e7b4109cac..bce8df27990f98a1b5edd3e7bbe9160c61fac605 100644 --- a/Framework/API/inc/MantidAPI/FrameworkManager.h +++ b/Framework/API/inc/MantidAPI/FrameworkManager.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/FuncMinimizerFactory.h b/Framework/API/inc/MantidAPI/FuncMinimizerFactory.h index 9cc739bd97d5b83a664e204a2aefdd65489ecfba..8e597d00d7b312286c2da203e5f6cc1a3ce9bcff 100644 --- a/Framework/API/inc/MantidAPI/FuncMinimizerFactory.h +++ b/Framework/API/inc/MantidAPI/FuncMinimizerFactory.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/FunctionDomain.h b/Framework/API/inc/MantidAPI/FunctionDomain.h index b843bd4e1a9a1a9352c976b7fdcb37844b974303..70ab6202753fd2c8fb910d3afa558837ea021e01 100644 --- a/Framework/API/inc/MantidAPI/FunctionDomain.h +++ b/Framework/API/inc/MantidAPI/FunctionDomain.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/FunctionDomain1D.h b/Framework/API/inc/MantidAPI/FunctionDomain1D.h index d86afe4fefcd201b8852775ff5f2b06e82f65564..0d9635aee3c19222cb8c3a0f37d75ee734d71795 100644 --- a/Framework/API/inc/MantidAPI/FunctionDomain1D.h +++ b/Framework/API/inc/MantidAPI/FunctionDomain1D.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/FunctionDomainGeneral.h b/Framework/API/inc/MantidAPI/FunctionDomainGeneral.h index fb8d12677b20a0840620a801d6a6cf7f4237594d..d87f3d7c9d5cbfb9221805de9309a5d85e039d9a 100644 --- a/Framework/API/inc/MantidAPI/FunctionDomainGeneral.h +++ b/Framework/API/inc/MantidAPI/FunctionDomainGeneral.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -25,7 +25,7 @@ public: /// Get the number of columns size_t columnCount() const; /// Add a new column. All columns must have the same size. - void addColumn(boost::shared_ptr<Column> column); + void addColumn(const boost::shared_ptr<Column> &column); /// Get i-th column boost::shared_ptr<Column> getColumn(size_t i) const; diff --git a/Framework/API/inc/MantidAPI/FunctionDomainMD.h b/Framework/API/inc/MantidAPI/FunctionDomainMD.h index 3568e26f5928dcd3faf5f979820720ea48283f6b..43ebc9efa049ac4ea93b8f8593986d6f8fa01790 100644 --- a/Framework/API/inc/MantidAPI/FunctionDomainMD.h +++ b/Framework/API/inc/MantidAPI/FunctionDomainMD.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -22,7 +22,7 @@ namespace API { class MANTID_API_DLL FunctionDomainMD : public FunctionDomain { public: /// Constructor. - FunctionDomainMD(IMDWorkspace_const_sptr ws, size_t start = 0, + FunctionDomainMD(const IMDWorkspace_const_sptr &ws, size_t start = 0, size_t length = 0); /// Destructor. ~FunctionDomainMD() override; diff --git a/Framework/API/inc/MantidAPI/FunctionFactory.h b/Framework/API/inc/MantidAPI/FunctionFactory.h index 5a8f53f0630a681fc07fb8e4b190a1564b3ea156..bfb3b208013176d2586d9ba89ad8d17fdf7688d7 100644 --- a/Framework/API/inc/MantidAPI/FunctionFactory.h +++ b/Framework/API/inc/MantidAPI/FunctionFactory.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -90,19 +90,21 @@ private: /// Throw an exception void inputError(const std::string &str = "") const; /// Add constraints to the created function - void addConstraints(boost::shared_ptr<IFunction> fun, + void addConstraints(const boost::shared_ptr<IFunction> &fun, const Expression &expr) const; /// Add a single constraint to the created function - void addConstraint(boost::shared_ptr<IFunction> fun, + void addConstraint(const boost::shared_ptr<IFunction> &fun, const Expression &expr) const; /// Add a single constraint to the created function with non-default penalty - void addConstraint(boost::shared_ptr<IFunction> fun, + void addConstraint(const boost::shared_ptr<IFunction> &fun, const Expression &constraint_expr, const Expression &penalty_expr) const; /// Add ties to the created function - void addTies(boost::shared_ptr<IFunction> fun, const Expression &expr) const; + void addTies(const boost::shared_ptr<IFunction> &fun, + const Expression &expr) const; /// Add a tie to the created function - void addTie(boost::shared_ptr<IFunction> fun, const Expression &expr) const; + void addTie(const boost::shared_ptr<IFunction> &fun, + const Expression &expr) const; mutable std::map<std::string, std::vector<std::string>> m_cachedFunctionNames; mutable std::mutex m_mutex; diff --git a/Framework/API/inc/MantidAPI/FunctionGenerator.h b/Framework/API/inc/MantidAPI/FunctionGenerator.h index e36e6fc7ec830aea2b5b7bd85ffeb8c078963e1d..68fafe0b7a0808c401e389862bcf5c4c854978c9 100644 --- a/Framework/API/inc/MantidAPI/FunctionGenerator.h +++ b/Framework/API/inc/MantidAPI/FunctionGenerator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -31,7 +31,7 @@ belongs to. By default if a name has the signature of a composite function class MANTID_API_DLL FunctionGenerator : public IFunction { public: /// Constructor - FunctionGenerator(IFunction_sptr source); + FunctionGenerator(const IFunction_sptr &source); /// @name Overrides implementing composition of two functions: /// m_source and m_target. diff --git a/Framework/API/inc/MantidAPI/FunctionParameterDecorator.h b/Framework/API/inc/MantidAPI/FunctionParameterDecorator.h index 8583513ee761b178a1c6345ef614d08790296122..6a3fcedbe576c5b884424cbe1c8ac549e3b3f966 100644 --- a/Framework/API/inc/MantidAPI/FunctionParameterDecorator.h +++ b/Framework/API/inc/MantidAPI/FunctionParameterDecorator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/FunctionProperty.h b/Framework/API/inc/MantidAPI/FunctionProperty.h index 42319b77896cb4fb8f61293fac95f6937415dd48..64d0425b3886d99e1452cdbd329cf61cd1ccead4 100644 --- a/Framework/API/inc/MantidAPI/FunctionProperty.h +++ b/Framework/API/inc/MantidAPI/FunctionProperty.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/FunctionValues.h b/Framework/API/inc/MantidAPI/FunctionValues.h index 4d1a1b81f68d02de0e5df7033bca7c8528d6d112..485572ed11315cad5ac75ac5611172aa5152b3ab 100644 --- a/Framework/API/inc/MantidAPI/FunctionValues.h +++ b/Framework/API/inc/MantidAPI/FunctionValues.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/GridDomain.h b/Framework/API/inc/MantidAPI/GridDomain.h index f86deacf8c144c1a67f251e7f6ac88f547eb95b4..740a4f3034b8fa3807a944689f272c11756b2c1a 100644 --- a/Framework/API/inc/MantidAPI/GridDomain.h +++ b/Framework/API/inc/MantidAPI/GridDomain.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/GridDomain1D.h b/Framework/API/inc/MantidAPI/GridDomain1D.h index 432cd969441c45b45260be2321a8de49df88b622..2ba4ac5047bc3fa24565d5901653d0825a5367cb 100644 --- a/Framework/API/inc/MantidAPI/GridDomain1D.h +++ b/Framework/API/inc/MantidAPI/GridDomain1D.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -26,7 +26,8 @@ namespace API { class MANTID_API_DLL GridDomain1D : public API::GridDomain { public: /// initialize - void initialize(double &startX, double &endX, size_t &n, std::string scaling); + void initialize(double &startX, double &endX, size_t &n, + const std::string &scaling); /// number of grid point s size_t size() const override { return m_points.size(); } /// number of dimensions in the grid diff --git a/Framework/API/inc/MantidAPI/GroupingLoader.h b/Framework/API/inc/MantidAPI/GroupingLoader.h index df1efb2133d08b8bf9834e41b640e32499557423..622e9090e26362b8179ab297b5003c0189549d75 100644 --- a/Framework/API/inc/MantidAPI/GroupingLoader.h +++ b/Framework/API/inc/MantidAPI/GroupingLoader.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -33,7 +33,7 @@ public: ~Grouping(); /// Construct a Grouping from a table - Grouping(ITableWorkspace_sptr table); + Grouping(const ITableWorkspace_sptr &table); /// Convert to grouping table ITableWorkspace_sptr toTable() const; diff --git a/Framework/API/inc/MantidAPI/HistoWorkspace.h b/Framework/API/inc/MantidAPI/HistoWorkspace.h index 01f4eb0dfaf17e386d7520835d22711c5cee2ea1..c4c3b3ab77d9ba725d73a5419b464eabaeeffe50 100644 --- a/Framework/API/inc/MantidAPI/HistoWorkspace.h +++ b/Framework/API/inc/MantidAPI/HistoWorkspace.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/HistogramValidator.h b/Framework/API/inc/MantidAPI/HistogramValidator.h index 24d2ab70e603a4d3b28188f9e87461529d979cfe..b3689bdabc801b0fbaf1cb4caba157b4d4e45831 100644 --- a/Framework/API/inc/MantidAPI/HistogramValidator.h +++ b/Framework/API/inc/MantidAPI/HistogramValidator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/HistoryItem.h b/Framework/API/inc/MantidAPI/HistoryItem.h index 9f767a12282ee70f08fa1c536953bf54f3431231..e450ba8247ebdff5262860b6f3956195b721483e 100644 --- a/Framework/API/inc/MantidAPI/HistoryItem.h +++ b/Framework/API/inc/MantidAPI/HistoryItem.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/HistoryView.h b/Framework/API/inc/MantidAPI/HistoryView.h index fef7cc54a8f270e72907b54ee46e956b794c5227..ec2ab0375398fc46323bc169dd32ebd8ea12c210 100644 --- a/Framework/API/inc/MantidAPI/HistoryView.h +++ b/Framework/API/inc/MantidAPI/HistoryView.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/IAlgorithm.h b/Framework/API/inc/MantidAPI/IAlgorithm.h index 6af0b69948d001485c9812a3c39afed17fdb0956..9b22aeaa403a35904c47c304c99f68b1bad32d24 100644 --- a/Framework/API/inc/MantidAPI/IAlgorithm.h +++ b/Framework/API/inc/MantidAPI/IAlgorithm.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -28,6 +28,11 @@ namespace API { */ using AlgorithmID = void *; +/// The current state of the algorithm object +enum class ExecutionState { Uninitialized, Initialized, Running, Finished }; +/// The validity of the results of the algorithm object +enum class ResultState { NotFinished, Failed, Success }; + /** IAlgorithm is the interface implemented by the Algorithm base class. Concrete algorithms, derived from the Algorithm base class are controlled @@ -109,9 +114,15 @@ public: /// Execute as a Child Algorithm, with try/catch virtual void executeAsChildAlg() = 0; + /// Gets the current execution state + virtual ExecutionState executionState() const = 0; + + /// Gets the currnet result State + virtual ResultState resultState() const = 0; + /// Check whether the algorithm is initialized properly virtual bool isInitialized() const = 0; - /// Check whether the algorithm has already been executed + /// Check whether the algorithm has been executed sucessfully virtual bool isExecuted() const = 0; /// Raises the cancel flag. interuption_point() method if called inside exec() diff --git a/Framework/API/inc/MantidAPI/IAlgorithm_fwd.h b/Framework/API/inc/MantidAPI/IAlgorithm_fwd.h index c452d28476f5732294c3d4d90ef8fe7688729834..a248c8c8024489e8118fac180d287e73dd062d18 100644 --- a/Framework/API/inc/MantidAPI/IAlgorithm_fwd.h +++ b/Framework/API/inc/MantidAPI/IAlgorithm_fwd.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/IArchiveSearch.h b/Framework/API/inc/MantidAPI/IArchiveSearch.h index a4f0a809e2325ce56bc7a77df431ff721884b07d..5e130277a29e170442c3c8d736bb2d1b6096bbb2 100644 --- a/Framework/API/inc/MantidAPI/IArchiveSearch.h +++ b/Framework/API/inc/MantidAPI/IArchiveSearch.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/IBackgroundFunction.h b/Framework/API/inc/MantidAPI/IBackgroundFunction.h index e6f1d904445043fe075ba7f6c4d343e4446d76b8..f0d637800f4028588e848912e09ecca2ab9b499d 100644 --- a/Framework/API/inc/MantidAPI/IBackgroundFunction.h +++ b/Framework/API/inc/MantidAPI/IBackgroundFunction.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/IBoxControllerIO.h b/Framework/API/inc/MantidAPI/IBoxControllerIO.h index 1b69c500ff5afbb8c26e334899c9d107b6cf6daf..a71e95fc5fa19607bd3e00870cb1aa55633f63c2 100644 --- a/Framework/API/inc/MantidAPI/IBoxControllerIO.h +++ b/Framework/API/inc/MantidAPI/IBoxControllerIO.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidAPI/DllConfig.h" diff --git a/Framework/API/inc/MantidAPI/ICatalog.h b/Framework/API/inc/MantidAPI/ICatalog.h index 8a9189a68c822cef19cfdf81e1b6bcbf63e79e31..4915a3d9505f8c3d84a586ab17f381b9eb9fe365 100644 --- a/Framework/API/inc/MantidAPI/ICatalog.h +++ b/Framework/API/inc/MantidAPI/ICatalog.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/ICatalogInfoService.h b/Framework/API/inc/MantidAPI/ICatalogInfoService.h index b4899c6dcccc4b2d6f8a16408ab8a70b6b2d9ad9..1a28d7a4a6b4e43667271fb366147fe6afcaea83 100644 --- a/Framework/API/inc/MantidAPI/ICatalogInfoService.h +++ b/Framework/API/inc/MantidAPI/ICatalogInfoService.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/IConstraint.h b/Framework/API/inc/MantidAPI/IConstraint.h index 721ff92a2112b6b2da523b3b47a57fbd6d34d4c3..68c53278f9a6be14f735a84fee826006f729b39e 100644 --- a/Framework/API/inc/MantidAPI/IConstraint.h +++ b/Framework/API/inc/MantidAPI/IConstraint.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/ICostFunction.h b/Framework/API/inc/MantidAPI/ICostFunction.h index 475a94da942c238dea0ba0966a4fcd85a6705e01..5d3bba08f58dd8a04593f8ee3b6085aa5ee168d6 100644 --- a/Framework/API/inc/MantidAPI/ICostFunction.h +++ b/Framework/API/inc/MantidAPI/ICostFunction.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/IDomainCreator.h b/Framework/API/inc/MantidAPI/IDomainCreator.h index 76b704d11f11e66f78473e47234edb9b9022772d..973114035900ea11696a661c3870fbc23db3c358 100644 --- a/Framework/API/inc/MantidAPI/IDomainCreator.h +++ b/Framework/API/inc/MantidAPI/IDomainCreator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/IEventList.h b/Framework/API/inc/MantidAPI/IEventList.h index a02027a3204e590061608c8a7daa4b25a2027bfe..98943a88414bdbdcd1c7f34492641a8e24615bb9 100644 --- a/Framework/API/inc/MantidAPI/IEventList.h +++ b/Framework/API/inc/MantidAPI/IEventList.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidAPI/DllConfig.h" diff --git a/Framework/API/inc/MantidAPI/IEventWorkspace.h b/Framework/API/inc/MantidAPI/IEventWorkspace.h index 0f2335e5e6914ba0a19b8481eba7211f47145722..f94cbac1ec2b67760a333de7b26ce8afaa5ce0f5 100644 --- a/Framework/API/inc/MantidAPI/IEventWorkspace.h +++ b/Framework/API/inc/MantidAPI/IEventWorkspace.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/IEventWorkspace_fwd.h b/Framework/API/inc/MantidAPI/IEventWorkspace_fwd.h index 573595cef32875e01b3220f581e4bf251ef05730..785e1ed4a746d4b4080cc3f27a91405ea176ddeb 100644 --- a/Framework/API/inc/MantidAPI/IEventWorkspace_fwd.h +++ b/Framework/API/inc/MantidAPI/IEventWorkspace_fwd.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/IFileLoader.h b/Framework/API/inc/MantidAPI/IFileLoader.h index 587b048e047da7b8e5754a592877c6acbd779143..1f5c0c2fb513b6efdd6a2585bdb68edf16ec8c03 100644 --- a/Framework/API/inc/MantidAPI/IFileLoader.h +++ b/Framework/API/inc/MantidAPI/IFileLoader.h @@ -1,14 +1,12 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidAPI/ParallelAlgorithm.h" -#include "MantidKernel/FileDescriptor.h" -#include "MantidKernel/NexusDescriptor.h" namespace Mantid { namespace API { diff --git a/Framework/API/inc/MantidAPI/IFuncMinimizer.h b/Framework/API/inc/MantidAPI/IFuncMinimizer.h index 513031feb9723d4285700d4d64aa0d8323bac612..19b79cc53d1768b0bbfa3acc1379264d392462b5 100644 --- a/Framework/API/inc/MantidAPI/IFuncMinimizer.h +++ b/Framework/API/inc/MantidAPI/IFuncMinimizer.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/IFunction.h b/Framework/API/inc/MantidAPI/IFunction.h index 7870cc72b883f7ffb4454517507ad410d5a0f0da..327f1c190a4de2328f89d4bf41d837e4fd3f50e4 100644 --- a/Framework/API/inc/MantidAPI/IFunction.h +++ b/Framework/API/inc/MantidAPI/IFunction.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -24,6 +24,8 @@ #endif #include <string> +#include <utility> + #include <vector> #ifdef _WIN32 @@ -521,7 +523,8 @@ public: /// Calculate numerical derivatives void calNumericalDeriv(const FunctionDomain &domain, Jacobian &jacobian); /// Set the covariance matrix - void setCovarianceMatrix(boost::shared_ptr<Kernel::Matrix<double>> covar); + void + setCovarianceMatrix(const boost::shared_ptr<Kernel::Matrix<double>> &covar); /// Get the covariance matrix boost::shared_ptr<const Kernel::Matrix<double>> getCovarianceMatrix() const { return m_covar; @@ -562,11 +565,11 @@ protected: /// Convert a value from one unit (inUnit) to unit defined in workspace (ws) double convertValue(double value, Kernel::Unit_sptr &outUnit, - boost::shared_ptr<const MatrixWorkspace> ws, + const boost::shared_ptr<const MatrixWorkspace> &ws, size_t wsIndex) const; void convertValue(std::vector<double> &values, Kernel::Unit_sptr &outUnit, - boost::shared_ptr<const MatrixWorkspace> ws, + const boost::shared_ptr<const MatrixWorkspace> &ws, size_t wsIndex) const; /// Override to declare function attributes @@ -635,7 +638,7 @@ using IFunction_const_sptr = boost::shared_ptr<const IFunction>; class FunctionHandler { public: /// Constructor - FunctionHandler(IFunction_sptr fun) : m_fun(fun) {} + FunctionHandler(IFunction_sptr fun) : m_fun(std::move(fun)) {} /// Virtual destructor virtual ~FunctionHandler() = default; /// abstract init method. It is called after setting handler to the function diff --git a/Framework/API/inc/MantidAPI/IFunction1D.h b/Framework/API/inc/MantidAPI/IFunction1D.h index 496e5c18379a27b7ec7fef497483786766bca6f3..0fe98bdfd8235a92bab4c418fb501770b3c34067 100644 --- a/Framework/API/inc/MantidAPI/IFunction1D.h +++ b/Framework/API/inc/MantidAPI/IFunction1D.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/IFunction1D.tcc b/Framework/API/inc/MantidAPI/IFunction1D.tcc index 5d7cecd3f3d7f696588389469ee37ca90687d3d3..019683040cfc04147c926c506439e7c796e00a7d 100644 --- a/Framework/API/inc/MantidAPI/IFunction1D.tcc +++ b/Framework/API/inc/MantidAPI/IFunction1D.tcc @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/IFunction1DSpectrum.h b/Framework/API/inc/MantidAPI/IFunction1DSpectrum.h index ddd7db0217c4346d909eda8f52474de7cbda9f9a..c2ce53bb8968bc65e1e4af75c30e5b0b1f98ac44 100644 --- a/Framework/API/inc/MantidAPI/IFunction1DSpectrum.h +++ b/Framework/API/inc/MantidAPI/IFunction1DSpectrum.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/IFunctionGeneral.h b/Framework/API/inc/MantidAPI/IFunctionGeneral.h index d0ba3917637562148ae3283e17112bfaa419a919..b87db3c691a04fc1974189b2b0f46ce40098a2a0 100644 --- a/Framework/API/inc/MantidAPI/IFunctionGeneral.h +++ b/Framework/API/inc/MantidAPI/IFunctionGeneral.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/IFunctionMD.h b/Framework/API/inc/MantidAPI/IFunctionMD.h index 3cb9932b7aa45196c37b7d16fc75ee7d0c9ea1fe..18e0fff10aa2a7e2d651907c790b90cb90c12682 100644 --- a/Framework/API/inc/MantidAPI/IFunctionMD.h +++ b/Framework/API/inc/MantidAPI/IFunctionMD.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/IFunctionMW.h b/Framework/API/inc/MantidAPI/IFunctionMW.h index 6a0d7ea8d48bd98339958c7ea43d67c528c970ff..82587735fc9124ca9de5bb0e0b7fb4416ff576dd 100644 --- a/Framework/API/inc/MantidAPI/IFunctionMW.h +++ b/Framework/API/inc/MantidAPI/IFunctionMW.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/IFunctionWithLocation.h b/Framework/API/inc/MantidAPI/IFunctionWithLocation.h index a3ad78b88519cea1ac37c590cd8882cdf4b279d5..0a2e1c2b6d7b36573b19585e8c7af8e3028e0731 100644 --- a/Framework/API/inc/MantidAPI/IFunctionWithLocation.h +++ b/Framework/API/inc/MantidAPI/IFunctionWithLocation.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/IFunction_fwd.h b/Framework/API/inc/MantidAPI/IFunction_fwd.h index a5ee5e7e622f2eba81388a5563f5a2bc76cd6261..408697ba6d145e51b03e2488465554a3f1e52b0b 100644 --- a/Framework/API/inc/MantidAPI/IFunction_fwd.h +++ b/Framework/API/inc/MantidAPI/IFunction_fwd.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/ILatticeFunction.h b/Framework/API/inc/MantidAPI/ILatticeFunction.h index ad8d51a7e723c865329448fc1febbefcb8cc9b9a..ae1dfabb0376d24d586631a73c701bde321361e6 100644 --- a/Framework/API/inc/MantidAPI/ILatticeFunction.h +++ b/Framework/API/inc/MantidAPI/ILatticeFunction.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/ILiveListener.h b/Framework/API/inc/MantidAPI/ILiveListener.h index 017214b0b545e2d5a981b86949883d521f4c57c8..7f9ac8fcff161582c4bdce0f3f255d705ae968e2 100644 --- a/Framework/API/inc/MantidAPI/ILiveListener.h +++ b/Framework/API/inc/MantidAPI/ILiveListener.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/IMDEventWorkspace.h b/Framework/API/inc/MantidAPI/IMDEventWorkspace.h index dbe0d69ae38ccefe5fd9fac960c72fa842679318..e150a388681dc3ec4d7435f79172e9c6ff46608c 100644 --- a/Framework/API/inc/MantidAPI/IMDEventWorkspace.h +++ b/Framework/API/inc/MantidAPI/IMDEventWorkspace.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/IMDEventWorkspace_fwd.h b/Framework/API/inc/MantidAPI/IMDEventWorkspace_fwd.h index f97b1e0792ba85ea308817c0c57b9f2088cb7406..aec00872515eef956769a1455a881ce807e5e565 100644 --- a/Framework/API/inc/MantidAPI/IMDEventWorkspace_fwd.h +++ b/Framework/API/inc/MantidAPI/IMDEventWorkspace_fwd.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/IMDHistoWorkspace.h b/Framework/API/inc/MantidAPI/IMDHistoWorkspace.h index 1cca4ada45017c8694d11009ae42800a59aeca40..de81b93115df38e281fccb1450b1b949c17d4b8a 100644 --- a/Framework/API/inc/MantidAPI/IMDHistoWorkspace.h +++ b/Framework/API/inc/MantidAPI/IMDHistoWorkspace.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/IMDHistoWorkspace_fwd.h b/Framework/API/inc/MantidAPI/IMDHistoWorkspace_fwd.h index 73a116547628d06911dd92bfcbdd00cab267a1cc..d0e92c0b825dc6c70862c7d47f6b6148814738f9 100644 --- a/Framework/API/inc/MantidAPI/IMDHistoWorkspace_fwd.h +++ b/Framework/API/inc/MantidAPI/IMDHistoWorkspace_fwd.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/IMDIterator.h b/Framework/API/inc/MantidAPI/IMDIterator.h index d9520721a6ad8cc32fe1dee43ae7c1cf4b17292a..7684fd8a1934db8908bd301cfea279ee2b1d4698 100644 --- a/Framework/API/inc/MantidAPI/IMDIterator.h +++ b/Framework/API/inc/MantidAPI/IMDIterator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/IMDNode.h b/Framework/API/inc/MantidAPI/IMDNode.h index d12089a047e952ac5e14e4757330f57667071f1c..173aa1b95f8412e0a7fa0aedde35e743d3bb02ac 100644 --- a/Framework/API/inc/MantidAPI/IMDNode.h +++ b/Framework/API/inc/MantidAPI/IMDNode.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/IMDWorkspace.h b/Framework/API/inc/MantidAPI/IMDWorkspace.h index 5ad8a9146b8015eb8b4bd5d97d064541de648ebf..518d798366d067fb635c5f451ce1dc92cc5115e4 100644 --- a/Framework/API/inc/MantidAPI/IMDWorkspace.h +++ b/Framework/API/inc/MantidAPI/IMDWorkspace.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/IMaskWorkspace.h b/Framework/API/inc/MantidAPI/IMaskWorkspace.h index b0b4a569a91e6c7e2e626138ef1aca1f348bd65d..afdfe85eec281ea1af1fe70d7e9fa4225b9d0215 100644 --- a/Framework/API/inc/MantidAPI/IMaskWorkspace.h +++ b/Framework/API/inc/MantidAPI/IMaskWorkspace.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/IPawleyFunction.h b/Framework/API/inc/MantidAPI/IPawleyFunction.h index 7d41d7326294208f1985b186aff9639a827e5e7d..6fc664473ddf755c66e96c130d0edf6559cfe551 100644 --- a/Framework/API/inc/MantidAPI/IPawleyFunction.h +++ b/Framework/API/inc/MantidAPI/IPawleyFunction.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/IPeakFunction.h b/Framework/API/inc/MantidAPI/IPeakFunction.h index 319a5bedd9fd23b4d7a3c25b313b6dd3e9eb82ba..15c61ac83d7cabe27ede1b889342abe53e5fd785 100644 --- a/Framework/API/inc/MantidAPI/IPeakFunction.h +++ b/Framework/API/inc/MantidAPI/IPeakFunction.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/IPeaksWorkspace.h b/Framework/API/inc/MantidAPI/IPeaksWorkspace.h index f34d276ceead88966592bb17cca85d830e83e5c6..62e3f16a00a2961dcb01584658ad8d4367c4e3c6 100644 --- a/Framework/API/inc/MantidAPI/IPeaksWorkspace.h +++ b/Framework/API/inc/MantidAPI/IPeaksWorkspace.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/IPeaksWorkspace_fwd.h b/Framework/API/inc/MantidAPI/IPeaksWorkspace_fwd.h index 7f3be834cb30a598a11da47288acccbd0d6edaf2..8484182685b3c85822ce13116c86f78d4dcf52fd 100644 --- a/Framework/API/inc/MantidAPI/IPeaksWorkspace_fwd.h +++ b/Framework/API/inc/MantidAPI/IPeaksWorkspace_fwd.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/IPowderDiffPeakFunction.h b/Framework/API/inc/MantidAPI/IPowderDiffPeakFunction.h index dfce8008b1ff930dcb4eb1a09b1cd260e07c6a1d..771e74a88da98cb80388ab58e11a745cb4952ce0 100644 --- a/Framework/API/inc/MantidAPI/IPowderDiffPeakFunction.h +++ b/Framework/API/inc/MantidAPI/IPowderDiffPeakFunction.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/IRemoteJobManager.h b/Framework/API/inc/MantidAPI/IRemoteJobManager.h index d9a0f5a028e3bb587bb63fe50854725efbc34fb8..64b279e71990955978007892af60081c69a172e3 100644 --- a/Framework/API/inc/MantidAPI/IRemoteJobManager.h +++ b/Framework/API/inc/MantidAPI/IRemoteJobManager.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/ISpectrum.h b/Framework/API/inc/MantidAPI/ISpectrum.h index bfa99ebb755d95fb5d6514f98a296a6a66d2a238..b113217592d1e168448f1d42c4478e21467abd32 100644 --- a/Framework/API/inc/MantidAPI/ISpectrum.h +++ b/Framework/API/inc/MantidAPI/ISpectrum.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/ISplittersWorkspace.h b/Framework/API/inc/MantidAPI/ISplittersWorkspace.h index ddab03d58215bd897a667195ba87e7f5c2b92343..792422efcf98d38c5d9e501a9b8a2d2e49c19c95 100644 --- a/Framework/API/inc/MantidAPI/ISplittersWorkspace.h +++ b/Framework/API/inc/MantidAPI/ISplittersWorkspace.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/ITableWorkspace.h b/Framework/API/inc/MantidAPI/ITableWorkspace.h index a3b12c839cfc1611d66ea21c9ef6377a5873abd6..74a11149ce6c455800b18a3cf58bfdfab475b35d 100644 --- a/Framework/API/inc/MantidAPI/ITableWorkspace.h +++ b/Framework/API/inc/MantidAPI/ITableWorkspace.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -22,6 +22,7 @@ #endif #include <sstream> +#include <utility> namespace Mantid { @@ -349,7 +350,7 @@ public: } } /// Construct directly from column - ColumnVector(Column_sptr column) : m_column(column) { + ColumnVector(Column_sptr column) : m_column(std::move(column)) { if (!m_column->isType<T>()) { std::stringstream mess; mess << "Type mismatch when creating a ColumnVector<" << typeid(T).name() @@ -387,7 +388,7 @@ public: } } /// Construct directly from column - ConstColumnVector(Column_const_sptr column) : m_column(column) { + ConstColumnVector(Column_const_sptr column) : m_column(std::move(column)) { if (!m_column->isType<T>()) { std::stringstream mess; mess << "Type mismatch when creating a ColumnVector<" << typeid(T).name() diff --git a/Framework/API/inc/MantidAPI/ITableWorkspace_fwd.h b/Framework/API/inc/MantidAPI/ITableWorkspace_fwd.h index 83265ade539ac92ce2cc0f839d396be3a187c72b..d1b1a2dde61de31f5a539ed17b53054051564f6b 100644 --- a/Framework/API/inc/MantidAPI/ITableWorkspace_fwd.h +++ b/Framework/API/inc/MantidAPI/ITableWorkspace_fwd.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/ITransformScale.h b/Framework/API/inc/MantidAPI/ITransformScale.h index abb06dbbb24bd6fc1f8b790d7aa60b0fc86e1891..7d09467a1836f24bc3f6df737c92b53150769d80 100644 --- a/Framework/API/inc/MantidAPI/ITransformScale.h +++ b/Framework/API/inc/MantidAPI/ITransformScale.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/IWorkspaceProperty.h b/Framework/API/inc/MantidAPI/IWorkspaceProperty.h index ab03914b5feecb2bd65722902855fc5147654406..80a146742d9f00fe3d5040c03d207bd3b2e9a075 100644 --- a/Framework/API/inc/MantidAPI/IWorkspaceProperty.h +++ b/Framework/API/inc/MantidAPI/IWorkspaceProperty.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/ImmutableCompositeFunction.h b/Framework/API/inc/MantidAPI/ImmutableCompositeFunction.h index 76f7d60048d5234f85e88692a59b045bb6df1321..381b7bafd857e300be9bdf2944db99197a93c245 100644 --- a/Framework/API/inc/MantidAPI/ImmutableCompositeFunction.h +++ b/Framework/API/inc/MantidAPI/ImmutableCompositeFunction.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/ImplicitFunctionBuilder.h b/Framework/API/inc/MantidAPI/ImplicitFunctionBuilder.h index ff210d2b28ebf8c0a776caa3faeacc2dcad60138..ce4b5bfa0b9a1dbaf4651cdfb604bab43726b5e0 100644 --- a/Framework/API/inc/MantidAPI/ImplicitFunctionBuilder.h +++ b/Framework/API/inc/MantidAPI/ImplicitFunctionBuilder.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/ImplicitFunctionFactory.h b/Framework/API/inc/MantidAPI/ImplicitFunctionFactory.h index 84ebefe308b3d129e37e4bee1da22bd8b3af7cad..f3034eaf03056787a4bbee79b58901d8ac8d7bdd 100644 --- a/Framework/API/inc/MantidAPI/ImplicitFunctionFactory.h +++ b/Framework/API/inc/MantidAPI/ImplicitFunctionFactory.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/ImplicitFunctionParameter.h b/Framework/API/inc/MantidAPI/ImplicitFunctionParameter.h index 2559b5e2423aae645f6cc4ac490216b62e8bcb24..89c290e496f2721015dc7a03a20ec6f86880afa8 100644 --- a/Framework/API/inc/MantidAPI/ImplicitFunctionParameter.h +++ b/Framework/API/inc/MantidAPI/ImplicitFunctionParameter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/ImplicitFunctionParameterParser.h b/Framework/API/inc/MantidAPI/ImplicitFunctionParameterParser.h index 9acd68eb2f8ae99a23ff1be9fdcf1a79d774b3f3..5439556ced32291fabe69ad04e64ee9727eaf837 100644 --- a/Framework/API/inc/MantidAPI/ImplicitFunctionParameterParser.h +++ b/Framework/API/inc/MantidAPI/ImplicitFunctionParameterParser.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/ImplicitFunctionParameterParserFactory.h b/Framework/API/inc/MantidAPI/ImplicitFunctionParameterParserFactory.h index f7eb9e53f6bf9c543fd8bbd7bf3776be8f8a92d4..7ee5e262d5aa288e4c9a5a2002688ac174f19dc6 100644 --- a/Framework/API/inc/MantidAPI/ImplicitFunctionParameterParserFactory.h +++ b/Framework/API/inc/MantidAPI/ImplicitFunctionParameterParserFactory.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/ImplicitFunctionParser.h b/Framework/API/inc/MantidAPI/ImplicitFunctionParser.h index dce2eb21da022e21f1c7961ebff394d3af730ecb..28b7bfe13bf2b83a61f7c6c7dd92cf3e5f4dd638 100644 --- a/Framework/API/inc/MantidAPI/ImplicitFunctionParser.h +++ b/Framework/API/inc/MantidAPI/ImplicitFunctionParser.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/ImplicitFunctionParserFactory.h b/Framework/API/inc/MantidAPI/ImplicitFunctionParserFactory.h index 7aca7d1a09e82f0e1dc2f8f93ff8ff82d49b7f69..9f9031f247afdf9a91805cc21b7a3d4838d8d4e0 100644 --- a/Framework/API/inc/MantidAPI/ImplicitFunctionParserFactory.h +++ b/Framework/API/inc/MantidAPI/ImplicitFunctionParserFactory.h @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #pragma once /** @class ImplicitFunctionParserFactory ImplicitFunctionParserFactory.h diff --git a/Framework/API/inc/MantidAPI/IncreasingAxisValidator.h b/Framework/API/inc/MantidAPI/IncreasingAxisValidator.h index 48d2c1f66eec23c42168f4943f3a8d41820b01b1..ec091e15a15730827049292f007662411ee3fe0c 100644 --- a/Framework/API/inc/MantidAPI/IncreasingAxisValidator.h +++ b/Framework/API/inc/MantidAPI/IncreasingAxisValidator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/IndexProperty.h b/Framework/API/inc/MantidAPI/IndexProperty.h index aab75718e9d8f970455d390a08f97b1e2851227f..f6261fe2e2397d073874d1e06a1e97971bee2deb 100644 --- a/Framework/API/inc/MantidAPI/IndexProperty.h +++ b/Framework/API/inc/MantidAPI/IndexProperty.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -32,7 +32,7 @@ public: IndexProperty(const std::string &name, const IWorkspaceProperty &workspaceProp, const IndexTypeProperty &indexTypeProp, - Kernel::IValidator_sptr validator = + const Kernel::IValidator_sptr &validator = Kernel::IValidator_sptr(new Kernel::NullValidator)); IndexProperty *clone() const override; diff --git a/Framework/API/inc/MantidAPI/IndexTypeProperty.h b/Framework/API/inc/MantidAPI/IndexTypeProperty.h index 23087cdbe6c09fa213a56d038f0d719cc9f1a06a..7316982428256efa11c6c5215dd208be85b0c4f3 100644 --- a/Framework/API/inc/MantidAPI/IndexTypeProperty.h +++ b/Framework/API/inc/MantidAPI/IndexTypeProperty.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/InstrumentDataService.h b/Framework/API/inc/MantidAPI/InstrumentDataService.h index f5a51b1da3a7241d020163c16ef55b0281f0fc12..e773dbd452de1d50e9d06fe49b6f75696cd604f9 100644 --- a/Framework/API/inc/MantidAPI/InstrumentDataService.h +++ b/Framework/API/inc/MantidAPI/InstrumentDataService.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/InstrumentValidator.h b/Framework/API/inc/MantidAPI/InstrumentValidator.h index dfa1c1d8497a5aa0a3d800c456d31cead838f73d..2e7f0a1c6288a4d7a501037aa5bb27c64b14330a 100644 --- a/Framework/API/inc/MantidAPI/InstrumentValidator.h +++ b/Framework/API/inc/MantidAPI/InstrumentValidator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/Jacobian.h b/Framework/API/inc/MantidAPI/Jacobian.h index 49a74cdcea1ad99fb4fd5611dfbe3cd41275bd30..f8ef3873f3870a8a173d5d42bb99cdb0bba4c8cb 100644 --- a/Framework/API/inc/MantidAPI/Jacobian.h +++ b/Framework/API/inc/MantidAPI/Jacobian.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/JointDomain.h b/Framework/API/inc/MantidAPI/JointDomain.h index 23df85a31af6bc83fcb633ef9158e446455e3255..1fd5eb6b4ee714148c21989e09e79368b2650038 100644 --- a/Framework/API/inc/MantidAPI/JointDomain.h +++ b/Framework/API/inc/MantidAPI/JointDomain.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -31,7 +31,7 @@ public: size_t getNParts() const override; /// Return i-th domain const FunctionDomain &getDomain(size_t i) const override; - void addDomain(FunctionDomain_sptr domain); + void addDomain(const FunctionDomain_sptr &domain); protected: /// Vector with member domains. diff --git a/Framework/API/inc/MantidAPI/LatticeDomain.h b/Framework/API/inc/MantidAPI/LatticeDomain.h index aca95200f5f5ce7781fb95f3ff6f3c700b15ff25..e91c28f03e43fb4f71db2b6c1d5e17fb6e538148 100644 --- a/Framework/API/inc/MantidAPI/LatticeDomain.h +++ b/Framework/API/inc/MantidAPI/LatticeDomain.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/LinearScale.h b/Framework/API/inc/MantidAPI/LinearScale.h index ee241bd692849af7fa14bb52c6d355a47a672600..8c7480f4fa4b103ab2f2480f64d21caca36f88f1 100644 --- a/Framework/API/inc/MantidAPI/LinearScale.h +++ b/Framework/API/inc/MantidAPI/LinearScale.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/LiveListener.h b/Framework/API/inc/MantidAPI/LiveListener.h index 71660e2ba26a6fbef7cccc08447614bf34cfbb38..6a699b492310cfdeb9338a72265e8975e5c564a6 100644 --- a/Framework/API/inc/MantidAPI/LiveListener.h +++ b/Framework/API/inc/MantidAPI/LiveListener.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/LiveListenerFactory.h b/Framework/API/inc/MantidAPI/LiveListenerFactory.h index d97f363c1507491a9fbff72af1f12d5e5a5371e7..9fa395faafaad56ea0b572c8cd8d38abe349f9e4 100644 --- a/Framework/API/inc/MantidAPI/LiveListenerFactory.h +++ b/Framework/API/inc/MantidAPI/LiveListenerFactory.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/LogFilterGenerator.h b/Framework/API/inc/MantidAPI/LogFilterGenerator.h index 4cb366d3258830e5a7e21b1f1a41b21badcaa66f..71f97a41e162d325c29f1831290f3534eec98f0f 100644 --- a/Framework/API/inc/MantidAPI/LogFilterGenerator.h +++ b/Framework/API/inc/MantidAPI/LogFilterGenerator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/LogManager.h b/Framework/API/inc/MantidAPI/LogManager.h index a6f07f13cc7d4765cbab8f3e0e6ceadb1cfa3830..577e64a38872ac201ac285fdfe81e26f862c9d2c 100644 --- a/Framework/API/inc/MantidAPI/LogManager.h +++ b/Framework/API/inc/MantidAPI/LogManager.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/LogarithmScale.h b/Framework/API/inc/MantidAPI/LogarithmScale.h index 8fe7ec97944c1bf5d9091e1b9eaa0472027c6490..eed6d989068683a0cc426fada9b06a5bdf05b33f 100644 --- a/Framework/API/inc/MantidAPI/LogarithmScale.h +++ b/Framework/API/inc/MantidAPI/LogarithmScale.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/MDFrameValidator.h b/Framework/API/inc/MantidAPI/MDFrameValidator.h index 69facb63da8033dcbb9e6328b9ad8a41e53b1699..cdf5ea59c55e607bdfcd832af7187a496f7ebbb8 100644 --- a/Framework/API/inc/MantidAPI/MDFrameValidator.h +++ b/Framework/API/inc/MantidAPI/MDFrameValidator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/MDGeometry.h b/Framework/API/inc/MantidAPI/MDGeometry.h index e78dabfb2b5af129df987f854365504780cff8f6..d97cbfbe2feb2d04fc4469e99db7989ec835679d 100644 --- a/Framework/API/inc/MantidAPI/MDGeometry.h +++ b/Framework/API/inc/MantidAPI/MDGeometry.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -64,7 +64,8 @@ public: std::string getGeometryXML() const; - void addDimension(boost::shared_ptr<Mantid::Geometry::IMDDimension> dim); + void + addDimension(const boost::shared_ptr<Mantid::Geometry::IMDDimension> &dim); void addDimension(Mantid::Geometry::IMDDimension *dim); // -------------------------------------------------------------------------------------------- diff --git a/Framework/API/inc/MantidAPI/MatrixWorkspace.h b/Framework/API/inc/MantidAPI/MatrixWorkspace.h index 23c27f4e8caeb35526b7341fedf5fb5acc97f47f..3c94de026dd709419f707d5936974798bf2e9a65 100644 --- a/Framework/API/inc/MantidAPI/MatrixWorkspace.h +++ b/Framework/API/inc/MantidAPI/MatrixWorkspace.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/MatrixWorkspaceMDIterator.h b/Framework/API/inc/MantidAPI/MatrixWorkspaceMDIterator.h index b5165f91bd9527ceb832c82b122163c508befc16..967b06c72907046f1f105bf0e2209876b5f905c0 100644 --- a/Framework/API/inc/MantidAPI/MatrixWorkspaceMDIterator.h +++ b/Framework/API/inc/MantidAPI/MatrixWorkspaceMDIterator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/MatrixWorkspaceValidator.h b/Framework/API/inc/MantidAPI/MatrixWorkspaceValidator.h index 800ef98a027a88b40816e78d2f0f8c69c4d87286..6911adbd6703c38768d420b79b0579dba55b87bd 100644 --- a/Framework/API/inc/MantidAPI/MatrixWorkspaceValidator.h +++ b/Framework/API/inc/MantidAPI/MatrixWorkspaceValidator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/MatrixWorkspace_fwd.h b/Framework/API/inc/MantidAPI/MatrixWorkspace_fwd.h index 440fc97a815125abddcc66e455f0f16b707769b7..f6cf0b0e8da9a48c01f253cdc594e463e9ff5706 100644 --- a/Framework/API/inc/MantidAPI/MatrixWorkspace_fwd.h +++ b/Framework/API/inc/MantidAPI/MatrixWorkspace_fwd.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/MuParserUtils.h b/Framework/API/inc/MantidAPI/MuParserUtils.h index 10fa3a76e7a35ac1b3c825eec153332de63c93e4..a77d2ee9bd15c47a3c1c08ee676bd4e3dc443c90 100644 --- a/Framework/API/inc/MantidAPI/MuParserUtils.h +++ b/Framework/API/inc/MantidAPI/MuParserUtils.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/MultiDomainFunction.h b/Framework/API/inc/MantidAPI/MultiDomainFunction.h index 420686859c16aabbbff6bee33559d038c632f51a..e430787d23b521e9e97661a650083b48aab5f9ef 100644 --- a/Framework/API/inc/MantidAPI/MultiDomainFunction.h +++ b/Framework/API/inc/MantidAPI/MultiDomainFunction.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/MultiPeriodGroupAlgorithm.h b/Framework/API/inc/MantidAPI/MultiPeriodGroupAlgorithm.h index 5d5488424f8869aaaf0112173f1601e8c52bda5c..6b3a4db6f048eaa87539347d7ef7e5c3a3d6dfc6 100644 --- a/Framework/API/inc/MantidAPI/MultiPeriodGroupAlgorithm.h +++ b/Framework/API/inc/MantidAPI/MultiPeriodGroupAlgorithm.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/MultiPeriodGroupWorker.h b/Framework/API/inc/MantidAPI/MultiPeriodGroupWorker.h index b08d8261793401f73c795414bca1928766a58737..e787848a1b6675d7b77e1e0f4230341089f1b385 100644 --- a/Framework/API/inc/MantidAPI/MultiPeriodGroupWorker.h +++ b/Framework/API/inc/MantidAPI/MultiPeriodGroupWorker.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -52,7 +52,7 @@ private: /// Try ot add a workspace to the group of input workspaces. void tryAddInputWorkspaceToInputGroups( - Workspace_sptr ws, VecWSGroupType &vecMultiPeriodWorkspaceGroups, + const Workspace_sptr &ws, VecWSGroupType &vecMultiPeriodWorkspaceGroups, VecWSGroupType &vecWorkspaceGroups) const; /// Copy input workspace properties to spawned algorithm. diff --git a/Framework/API/inc/MantidAPI/MultipleExperimentInfos.h b/Framework/API/inc/MantidAPI/MultipleExperimentInfos.h index aa7c483de342bd763c7b64802fa6f36855a0095f..58a11c8c6b0f89f339edfdc6db07d244ff9f3629 100644 --- a/Framework/API/inc/MantidAPI/MultipleExperimentInfos.h +++ b/Framework/API/inc/MantidAPI/MultipleExperimentInfos.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -27,7 +27,7 @@ public: ExperimentInfo_const_sptr getExperimentInfo(const uint16_t runIndex) const; - uint16_t addExperimentInfo(ExperimentInfo_sptr ei); + uint16_t addExperimentInfo(const ExperimentInfo_sptr &ei); void setExperimentInfo(const uint16_t runIndex, ExperimentInfo_sptr ei); diff --git a/Framework/API/inc/MantidAPI/MultipleFileProperty.h b/Framework/API/inc/MantidAPI/MultipleFileProperty.h index b247db19c1429ff5904387859a76d64bafa783af..a1b0a137edbc043f2524248faf70f2ec841b92e0 100644 --- a/Framework/API/inc/MantidAPI/MultipleFileProperty.h +++ b/Framework/API/inc/MantidAPI/MultipleFileProperty.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/NotebookBuilder.h b/Framework/API/inc/MantidAPI/NotebookBuilder.h index fa3e6e89937500bffe440f7871db605a4501ccf9..5e620037130aaef9aaa1d11d1e62374883f57ebc 100644 --- a/Framework/API/inc/MantidAPI/NotebookBuilder.h +++ b/Framework/API/inc/MantidAPI/NotebookBuilder.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -26,20 +26,21 @@ namespace API { class MANTID_API_DLL NotebookBuilder { public: - NotebookBuilder(boost::shared_ptr<HistoryView> view, + NotebookBuilder(const boost::shared_ptr<HistoryView> &view, std::string versionSpecificity = "old"); virtual ~NotebookBuilder() = default; /// build an ipython notebook from the history view - const std::string build(std::string ws_name, std::string ws_title, - std::string ws_comment); + const std::string build(const std::string &ws_name, + const std::string &ws_title, + const std::string &ws_comment); private: void writeHistoryToStream(std::vector<HistoryItem>::const_iterator &iter); void buildChildren(std::vector<HistoryItem>::const_iterator &iter); const std::string - buildAlgorithmString(AlgorithmHistory_const_sptr algHistory); - const std::string - buildPropertyString(Mantid::Kernel::PropertyHistory_const_sptr propHistory); + buildAlgorithmString(const AlgorithmHistory_const_sptr &algHistory); + const std::string buildPropertyString( + const Mantid::Kernel::PropertyHistory_const_sptr &propHistory); const std::vector<HistoryItem> m_historyItems; std::string m_output; diff --git a/Framework/API/inc/MantidAPI/NotebookWriter.h b/Framework/API/inc/MantidAPI/NotebookWriter.h index 4b6618870bf00b22d29b0ed66fe085e761c68441..d9d914f17e230284a77b67f52a1d7cbf2445d598 100644 --- a/Framework/API/inc/MantidAPI/NotebookWriter.h +++ b/Framework/API/inc/MantidAPI/NotebookWriter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -24,8 +24,8 @@ class MANTID_API_DLL NotebookWriter { public: NotebookWriter(); virtual ~NotebookWriter() = default; - std::string markdownCell(std::string string_text); - std::string codeCell(std::string string_code); + std::string markdownCell(const std::string &string_text); + std::string codeCell(const std::string &string_code); std::string writeNotebook(); private: diff --git a/Framework/API/inc/MantidAPI/NullCoordTransform.h b/Framework/API/inc/MantidAPI/NullCoordTransform.h index 1167eb1c17af83f02fb6074232295128ed66e629..2717cd8d9729e6d1c47bb2b5985139d1afea512d 100644 --- a/Framework/API/inc/MantidAPI/NullCoordTransform.h +++ b/Framework/API/inc/MantidAPI/NullCoordTransform.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/NumericAxis.h b/Framework/API/inc/MantidAPI/NumericAxis.h index 422f3c9cdcc7f8055665845a8879f2c78818ea4f..fd61479fd2416a8115cc5ef9dce96a12f27ab968 100644 --- a/Framework/API/inc/MantidAPI/NumericAxis.h +++ b/Framework/API/inc/MantidAPI/NumericAxis.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/NumericAxisValidator.h b/Framework/API/inc/MantidAPI/NumericAxisValidator.h index 2e4d130c017f40da8fd69e8e768f0b3af08fd0c9..5efc7e8fb4517f32eb03079715ac07331dfc09fe 100644 --- a/Framework/API/inc/MantidAPI/NumericAxisValidator.h +++ b/Framework/API/inc/MantidAPI/NumericAxisValidator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/OrientedLatticeValidator.h b/Framework/API/inc/MantidAPI/OrientedLatticeValidator.h index be6104c70d1be274b005564d7282f81230b5940a..a90c1c7d30ec899e935229afe6c9426a9be1fc45 100644 --- a/Framework/API/inc/MantidAPI/OrientedLatticeValidator.h +++ b/Framework/API/inc/MantidAPI/OrientedLatticeValidator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/ParallelAlgorithm.h b/Framework/API/inc/MantidAPI/ParallelAlgorithm.h index 3fb7c957bbfd1c5358882db9241e848a9ddf21cd..e362d53afe98506765d74cc7020dcc70322a6796 100644 --- a/Framework/API/inc/MantidAPI/ParallelAlgorithm.h +++ b/Framework/API/inc/MantidAPI/ParallelAlgorithm.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/ParamFunction.h b/Framework/API/inc/MantidAPI/ParamFunction.h index 9c4276b2f3e151086e0bd23cbcc00e7b5d848255..8dcc9670dea3f10c7672474ba21ab96c06cf4f26 100644 --- a/Framework/API/inc/MantidAPI/ParamFunction.h +++ b/Framework/API/inc/MantidAPI/ParamFunction.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/ParameterReference.h b/Framework/API/inc/MantidAPI/ParameterReference.h index 53e9051544fc984abec200794cfb5801777d3d4c..1961e83e9c0dbc4bffa2378f7613900c0838a764 100644 --- a/Framework/API/inc/MantidAPI/ParameterReference.h +++ b/Framework/API/inc/MantidAPI/ParameterReference.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/ParameterTie.h b/Framework/API/inc/MantidAPI/ParameterTie.h index 2e65738658f6c98612914329b8315ecb5093fce2..130b779966f5594892b023ee6900c6417d5702b4 100644 --- a/Framework/API/inc/MantidAPI/ParameterTie.h +++ b/Framework/API/inc/MantidAPI/ParameterTie.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/PeakFunctionIntegrator.h b/Framework/API/inc/MantidAPI/PeakFunctionIntegrator.h index 520f3e34bc94e700bbe5208ba63d0308c92f5272..880d797edac57cc1d2004703f1d5a68dd537796e 100644 --- a/Framework/API/inc/MantidAPI/PeakFunctionIntegrator.h +++ b/Framework/API/inc/MantidAPI/PeakFunctionIntegrator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/PrecompiledHeader.h b/Framework/API/inc/MantidAPI/PrecompiledHeader.h index dcab1c6815349ea5cb5fd73fc1bc906960f95655..7234ee9c264656b07850cb337de004630badf8ab 100644 --- a/Framework/API/inc/MantidAPI/PrecompiledHeader.h +++ b/Framework/API/inc/MantidAPI/PrecompiledHeader.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/Progress.h b/Framework/API/inc/MantidAPI/Progress.h index dc9a16f1f72063cd8c467e3c661fb51a4ffa4d6b..9742289d964ea26328f95b96a088b2720225ba04 100644 --- a/Framework/API/inc/MantidAPI/Progress.h +++ b/Framework/API/inc/MantidAPI/Progress.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/Projection.h b/Framework/API/inc/MantidAPI/Projection.h index a6a4dd1397046d630aa08e572d0600ce82333b1f..200f9a4f6cd34ce29057995532db6fcb84e93152 100644 --- a/Framework/API/inc/MantidAPI/Projection.h +++ b/Framework/API/inc/MantidAPI/Projection.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/RawCountValidator.h b/Framework/API/inc/MantidAPI/RawCountValidator.h index d12700d4ae1125fcab961a0db97eece0a1418d43..15c9994e271f362a92c1adf64ff5a04ea9aa78ee 100644 --- a/Framework/API/inc/MantidAPI/RawCountValidator.h +++ b/Framework/API/inc/MantidAPI/RawCountValidator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/RefAxis.h b/Framework/API/inc/MantidAPI/RefAxis.h index 7b8d8a52934950db88d7823c07235115a5c133e5..a12c89304e56bfdb4f8d06fe1d1d87991d537d6a 100644 --- a/Framework/API/inc/MantidAPI/RefAxis.h +++ b/Framework/API/inc/MantidAPI/RefAxis.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/RegisterFileLoader.h b/Framework/API/inc/MantidAPI/RegisterFileLoader.h index 290efae54b968a6d82d4742788772a82ad61e1a8..9fef571b28ec73f93b59d19793a66dcda002088e 100644 --- a/Framework/API/inc/MantidAPI/RegisterFileLoader.h +++ b/Framework/API/inc/MantidAPI/RegisterFileLoader.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/RemoteJobManagerFactory.h b/Framework/API/inc/MantidAPI/RemoteJobManagerFactory.h index 0ad82e5ebd35ad478b689596272cee229f85e3ac..5646d0da63e9e3347c68f2594f504319bbf5c9da 100644 --- a/Framework/API/inc/MantidAPI/RemoteJobManagerFactory.h +++ b/Framework/API/inc/MantidAPI/RemoteJobManagerFactory.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -47,8 +47,8 @@ public: /// alternative (lower level) create where the specific type of /// manager and base URL are directly given - IRemoteJobManager_sptr create(const std::string baseURL, - const std::string jobManagerType) const; + IRemoteJobManager_sptr create(const std::string &baseURL, + const std::string &jobManagerType) const; private: /// So that the singleton can be created (cons/destructor are private) diff --git a/Framework/API/inc/MantidAPI/ResizeRectangularDetectorHelper.h b/Framework/API/inc/MantidAPI/ResizeRectangularDetectorHelper.h index 242433a032f0827c6f99872b2fc18f38ed36f35a..af32cc69a5ad183e860f3b5515fb485bfcf8a266 100644 --- a/Framework/API/inc/MantidAPI/ResizeRectangularDetectorHelper.h +++ b/Framework/API/inc/MantidAPI/ResizeRectangularDetectorHelper.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/Run.h b/Framework/API/inc/MantidAPI/Run.h index 222714135a693bb85247bde0e4fa057084a62749..747140a27e9d4c96765150c40a2b6183aab6b7a6 100644 --- a/Framework/API/inc/MantidAPI/Run.h +++ b/Framework/API/inc/MantidAPI/Run.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/Sample.h b/Framework/API/inc/MantidAPI/Sample.h index 79a891fed4dea9a9302e312e2fadad2611d33a01..dc70c2391fa669bfebce66789eef89b700e5092b 100644 --- a/Framework/API/inc/MantidAPI/Sample.h +++ b/Framework/API/inc/MantidAPI/Sample.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -45,7 +45,7 @@ public: /// the number of samples std::size_t size() const; /// Adds a sample to the list - void addSample(boost::shared_ptr<Sample> childSample); + void addSample(const boost::shared_ptr<Sample> &childSample); /// Returns the name of the sample const std::string &getName() const; diff --git a/Framework/API/inc/MantidAPI/SampleShapeValidator.h b/Framework/API/inc/MantidAPI/SampleShapeValidator.h index 1630bc564a59b923f928be159de86850ec54edf3..ae52c55ad3cfa21246eef64165deba8289044a7a 100644 --- a/Framework/API/inc/MantidAPI/SampleShapeValidator.h +++ b/Framework/API/inc/MantidAPI/SampleShapeValidator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/SampleValidator.h b/Framework/API/inc/MantidAPI/SampleValidator.h index 3ac2705dd61ac1aafd349c51833c59ac9e775f27..2d328e243978c4d055b74f47e94714b408e27586 100644 --- a/Framework/API/inc/MantidAPI/SampleValidator.h +++ b/Framework/API/inc/MantidAPI/SampleValidator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/ScopedWorkspace.h b/Framework/API/inc/MantidAPI/ScopedWorkspace.h index e550cff2ef03d84a17d474fcef913985313d1b62..00ddb510e2beb391d963c5e1405f7c180a19ba15 100644 --- a/Framework/API/inc/MantidAPI/ScopedWorkspace.h +++ b/Framework/API/inc/MantidAPI/ScopedWorkspace.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -37,7 +37,7 @@ public: ScopedWorkspace(); /// Workspace constructor - ScopedWorkspace(Workspace_sptr ws); + ScopedWorkspace(const Workspace_sptr &ws); /// Destructor virtual ~ScopedWorkspace(); @@ -61,7 +61,7 @@ public: operator bool() const; /// Make ADS entry to point to the given workspace - void set(Workspace_sptr newWS); + void set(const Workspace_sptr &newWS); private: /// ADS name of the workspace diff --git a/Framework/API/inc/MantidAPI/ScriptBuilder.h b/Framework/API/inc/MantidAPI/ScriptBuilder.h index f1f10334be6ab0dab6c62512a26957a9c8c28021..eba2f95a206f56e822ab8a9f2b44fa8c17a47cbe 100644 --- a/Framework/API/inc/MantidAPI/ScriptBuilder.h +++ b/Framework/API/inc/MantidAPI/ScriptBuilder.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -31,7 +31,7 @@ namespace API { class MANTID_API_DLL ScriptBuilder { public: ScriptBuilder( - boost::shared_ptr<HistoryView> view, + const boost::shared_ptr<HistoryView> &view, std::string versionSpecificity = "old", bool appendTimestamp = false, std::vector<std::string> ignoreTheseAlgs = {}, std::vector<std::vector<std::string>> ignoreTheseAlgProperties = {}, diff --git a/Framework/API/inc/MantidAPI/ScriptRepository.h b/Framework/API/inc/MantidAPI/ScriptRepository.h index fdd125a6f57c62914ec94111655d3c66b5b5ec9f..fab78a7ad5963ca5a3079aa7b2da73a6bbc4c66a 100644 --- a/Framework/API/inc/MantidAPI/ScriptRepository.h +++ b/Framework/API/inc/MantidAPI/ScriptRepository.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/ScriptRepositoryFactory.h b/Framework/API/inc/MantidAPI/ScriptRepositoryFactory.h index 2a9c48bdfa9ec2cc816988b9785fcdf55f3e4a0d..cca3eb73e60eadc1e54344a23b3dd87ce1810b76 100644 --- a/Framework/API/inc/MantidAPI/ScriptRepositoryFactory.h +++ b/Framework/API/inc/MantidAPI/ScriptRepositoryFactory.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/SerialAlgorithm.h b/Framework/API/inc/MantidAPI/SerialAlgorithm.h index 5b5206b8c8b83ae751f212b59b0f8fa0a52f98d1..8855695ef806b26afaae864925becfa9fc7a7467 100644 --- a/Framework/API/inc/MantidAPI/SerialAlgorithm.h +++ b/Framework/API/inc/MantidAPI/SerialAlgorithm.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/SingleCountValidator.h b/Framework/API/inc/MantidAPI/SingleCountValidator.h index 4643ec26005778dba7384786d158dbf9ac5b3219..be0bca2963cd2384534cf9a99a2c15a3862bf7d8 100644 --- a/Framework/API/inc/MantidAPI/SingleCountValidator.h +++ b/Framework/API/inc/MantidAPI/SingleCountValidator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/SingleValueParameter.h b/Framework/API/inc/MantidAPI/SingleValueParameter.h index b91c7750b73d4d84c4e125bba186e06301fdb3fe..3e18a1611c1c2288841963fdedcaf83e1ba482f4 100644 --- a/Framework/API/inc/MantidAPI/SingleValueParameter.h +++ b/Framework/API/inc/MantidAPI/SingleValueParameter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/SingleValueParameterParser.h b/Framework/API/inc/MantidAPI/SingleValueParameterParser.h index dd43b5b93d3773fd03aff6288d3da41929b762f2..a31432512788871d170a839b1e9100819fdecea8 100644 --- a/Framework/API/inc/MantidAPI/SingleValueParameterParser.h +++ b/Framework/API/inc/MantidAPI/SingleValueParameterParser.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/SpectraAxis.h b/Framework/API/inc/MantidAPI/SpectraAxis.h index a8518a5dad7f2f5db5d3eff9369671271426966e..d7b3c361f1e7ea76dfb02feb253fe2e4416fedf5 100644 --- a/Framework/API/inc/MantidAPI/SpectraAxis.h +++ b/Framework/API/inc/MantidAPI/SpectraAxis.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/SpectraAxisValidator.h b/Framework/API/inc/MantidAPI/SpectraAxisValidator.h index c79d2d0474d774da424dd38a65c8c8bed8e9138d..754ed25fd0906d4afb056d5a64fa5dd7833820a1 100644 --- a/Framework/API/inc/MantidAPI/SpectraAxisValidator.h +++ b/Framework/API/inc/MantidAPI/SpectraAxisValidator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/SpectraDetectorTypes.h b/Framework/API/inc/MantidAPI/SpectraDetectorTypes.h index dc9eb055bf78da4d1c9f5af2cdc017bfd090d863..d7e3b4b4c6c08e45d3a9d4acea5c9426b1d0040e 100644 --- a/Framework/API/inc/MantidAPI/SpectraDetectorTypes.h +++ b/Framework/API/inc/MantidAPI/SpectraDetectorTypes.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once //------------------------------------------------------------------------------ diff --git a/Framework/API/inc/MantidAPI/SpectrumDetectorMapping.h b/Framework/API/inc/MantidAPI/SpectrumDetectorMapping.h index 3f6847d3f3ccc60a07599d6a0840f2eef57d997c..08885eb4bc9ea62cf770966d60717cf0a2abdff3 100644 --- a/Framework/API/inc/MantidAPI/SpectrumDetectorMapping.h +++ b/Framework/API/inc/MantidAPI/SpectrumDetectorMapping.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -31,7 +31,7 @@ class MANTID_API_DLL SpectrumDetectorMapping { using sdmap = std::unordered_map<specnum_t, std::set<detid_t>>; public: - explicit SpectrumDetectorMapping(MatrixWorkspace_const_sptr workspace, + explicit SpectrumDetectorMapping(const MatrixWorkspace_const_sptr &workspace, const bool useSpecNoIndex = true); SpectrumDetectorMapping( const std::vector<specnum_t> &spectrumNumbers, diff --git a/Framework/API/inc/MantidAPI/SpectrumInfo.h b/Framework/API/inc/MantidAPI/SpectrumInfo.h index 723ac54b01c75bf47841035784eac6cc2398a4a6..fc4c9bffede5a5a78483e024b32d072cb4ea619a 100644 --- a/Framework/API/inc/MantidAPI/SpectrumInfo.h +++ b/Framework/API/inc/MantidAPI/SpectrumInfo.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -56,6 +56,7 @@ public: ~SpectrumInfo(); size_t size() const; + size_t detectorCount() const; const SpectrumDefinition &spectrumDefinition(const size_t index) const; const Kernel::cow_ptr<std::vector<SpectrumDefinition>> & diff --git a/Framework/API/inc/MantidAPI/SpectrumInfoItem.h b/Framework/API/inc/MantidAPI/SpectrumInfoItem.h index 81fe1020dbf32a66961693c096dd0fae7e2c4688..15062d08639c7d74565ea733b617ff93efb156e2 100644 --- a/Framework/API/inc/MantidAPI/SpectrumInfoItem.h +++ b/Framework/API/inc/MantidAPI/SpectrumInfoItem.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -59,6 +59,8 @@ public: return m_spectrumInfo->hasUniqueDetector(m_index); } + bool hasDetectors() const { return m_spectrumInfo->hasDetectors(m_index); } + const Mantid::SpectrumDefinition &spectrumDefinition() const { return m_spectrumInfo->spectrumDefinition(m_index); } diff --git a/Framework/API/inc/MantidAPI/SpectrumInfoIterator.h b/Framework/API/inc/MantidAPI/SpectrumInfoIterator.h index 14492f16a289f61ed04f1204501f00cab7106813..f604aeb4ea08d2ce58a9083d7377dd0b27a27f79 100644 --- a/Framework/API/inc/MantidAPI/SpectrumInfoIterator.h +++ b/Framework/API/inc/MantidAPI/SpectrumInfoIterator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/TableRow.h b/Framework/API/inc/MantidAPI/TableRow.h index f3096148507b0dfb569e16ea2304c870de00b625..75fba382964e3fc166ba84cefc27153391dc14a5 100644 --- a/Framework/API/inc/MantidAPI/TableRow.h +++ b/Framework/API/inc/MantidAPI/TableRow.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/TempFunction.h b/Framework/API/inc/MantidAPI/TempFunction.h index f10689ad242346f5b89f66c0eb202f8a68631d5f..1c90444e9b5a21e1d830caef28fb3eacd106e042 100644 --- a/Framework/API/inc/MantidAPI/TempFunction.h +++ b/Framework/API/inc/MantidAPI/TempFunction.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/TextAxis.h b/Framework/API/inc/MantidAPI/TextAxis.h index b4d3838fe76b9967c28baccd1b6d06053d8fb4f2..0e7551bad5422a60f4569539e9e003e2f7df00ed 100644 --- a/Framework/API/inc/MantidAPI/TextAxis.h +++ b/Framework/API/inc/MantidAPI/TextAxis.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/TransformScaleFactory.h b/Framework/API/inc/MantidAPI/TransformScaleFactory.h index 2fd7bbebbae2eb6fe9d98b48e9cf2b8a2d3593fd..99938079aa321440cc8414e2415df2c4d2a86936 100644 --- a/Framework/API/inc/MantidAPI/TransformScaleFactory.h +++ b/Framework/API/inc/MantidAPI/TransformScaleFactory.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/VectorParameter.h b/Framework/API/inc/MantidAPI/VectorParameter.h index 96b006a42a5761255017932197b628b80438dfe2..56bd81bbfc536107cf74f423981c3e8457547a5f 100644 --- a/Framework/API/inc/MantidAPI/VectorParameter.h +++ b/Framework/API/inc/MantidAPI/VectorParameter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/VectorParameterParser.h b/Framework/API/inc/MantidAPI/VectorParameterParser.h index fd158e4153ba4c7e21fdeb7d7b174bc59f7e1115..e591d285e0cde3e49f91d0a0999d6365d097d83b 100644 --- a/Framework/API/inc/MantidAPI/VectorParameterParser.h +++ b/Framework/API/inc/MantidAPI/VectorParameterParser.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/Workspace.h b/Framework/API/inc/MantidAPI/Workspace.h index c2c2a47ff6367db5a182840bb6748279536c070a..8e3717fa1e0938a1430ef674efa332ee44cbc7af 100644 --- a/Framework/API/inc/MantidAPI/Workspace.h +++ b/Framework/API/inc/MantidAPI/Workspace.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/WorkspaceFactory.h b/Framework/API/inc/MantidAPI/WorkspaceFactory.h index b8e2719ed89adda215f2d2f3be6945ab6c2774e7..2e0d67f8d8d41b03e13ccf5c30b69a1692d2a24f 100644 --- a/Framework/API/inc/MantidAPI/WorkspaceFactory.h +++ b/Framework/API/inc/MantidAPI/WorkspaceFactory.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/WorkspaceGroup.h b/Framework/API/inc/MantidAPI/WorkspaceGroup.h index c21bd86cadbc8c9f91d37f9d3c7dd0a751cd5d31..ea174d3cbefa2bd1aa4183b14f9140a0c66eee82 100644 --- a/Framework/API/inc/MantidAPI/WorkspaceGroup.h +++ b/Framework/API/inc/MantidAPI/WorkspaceGroup.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/WorkspaceGroup_fwd.h b/Framework/API/inc/MantidAPI/WorkspaceGroup_fwd.h index 13a270b45bc84a74eb3c9d1587d7901b32e1a272..cd45813ecc7c57b298dd19e83e2a43507226379e 100644 --- a/Framework/API/inc/MantidAPI/WorkspaceGroup_fwd.h +++ b/Framework/API/inc/MantidAPI/WorkspaceGroup_fwd.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/WorkspaceHasDxValidator.h b/Framework/API/inc/MantidAPI/WorkspaceHasDxValidator.h index cf44d6b8195fb563fcd437e370f83c71f7deb656..be840ee80ce99d3a11ac0990362f574b24e97a39 100644 --- a/Framework/API/inc/MantidAPI/WorkspaceHasDxValidator.h +++ b/Framework/API/inc/MantidAPI/WorkspaceHasDxValidator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/WorkspaceHistory.h b/Framework/API/inc/MantidAPI/WorkspaceHistory.h index ab748f8d807da8fad2b5339f38a70922cf89e5d9..153651206cce5e7707e6db53a5578dd0ec6f6001 100644 --- a/Framework/API/inc/MantidAPI/WorkspaceHistory.h +++ b/Framework/API/inc/MantidAPI/WorkspaceHistory.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -79,9 +79,9 @@ public: private: /// Recursive function to load the algorithm history tree from file - void loadNestedHistory( - ::NeXus::File *file, - AlgorithmHistory_sptr parent = boost::shared_ptr<AlgorithmHistory>()); + void loadNestedHistory(::NeXus::File *file, + const AlgorithmHistory_sptr &parent = + boost::shared_ptr<AlgorithmHistory>()); /// Parse an algorithm history string loaded from file AlgorithmHistory_sptr parseAlgorithmHistory(const std::string &rawData); /// Find the history entries at this level in the file. diff --git a/Framework/API/inc/MantidAPI/WorkspaceNearestNeighbourInfo.h b/Framework/API/inc/MantidAPI/WorkspaceNearestNeighbourInfo.h index f3a59d14a4c0cabe09eb108e3feed8625ccaa35d..083666cec60eefe0ab82eb3db7aaa8aaa10ec478 100644 --- a/Framework/API/inc/MantidAPI/WorkspaceNearestNeighbourInfo.h +++ b/Framework/API/inc/MantidAPI/WorkspaceNearestNeighbourInfo.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/WorkspaceNearestNeighbours.h b/Framework/API/inc/MantidAPI/WorkspaceNearestNeighbours.h index 5d45c9636669b58831a26785f09e8933445f9e26..f237372647a656047848a82c8d7db9f0b5c06733 100644 --- a/Framework/API/inc/MantidAPI/WorkspaceNearestNeighbours.h +++ b/Framework/API/inc/MantidAPI/WorkspaceNearestNeighbours.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/WorkspaceOpOverloads.h b/Framework/API/inc/MantidAPI/WorkspaceOpOverloads.h index e1432399ea6a6c7a0695c6dd31c328a53595a87b..f40c7b19dbea0f2c6a3030caa43a5c787b00dc76 100644 --- a/Framework/API/inc/MantidAPI/WorkspaceOpOverloads.h +++ b/Framework/API/inc/MantidAPI/WorkspaceOpOverloads.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -22,51 +22,51 @@ DLLExport ResultType executeBinaryOperation( bool rethrow = false); } // namespace OperatorOverloads -bool MANTID_API_DLL equals(const MatrixWorkspace_sptr lhs, - const MatrixWorkspace_sptr rhs, +bool MANTID_API_DLL equals(const MatrixWorkspace_sptr &lhs, + const MatrixWorkspace_sptr &rhs, double tolerance = 0.0); // Workspace operator overloads -MatrixWorkspace_sptr MANTID_API_DLL operator+(const MatrixWorkspace_sptr lhs, - const MatrixWorkspace_sptr rhs); -MatrixWorkspace_sptr MANTID_API_DLL operator-(const MatrixWorkspace_sptr lhs, - const MatrixWorkspace_sptr rhs); -MatrixWorkspace_sptr MANTID_API_DLL operator*(const MatrixWorkspace_sptr lhs, - const MatrixWorkspace_sptr rhs); -MatrixWorkspace_sptr MANTID_API_DLL operator/(const MatrixWorkspace_sptr lhs, - const MatrixWorkspace_sptr rhs); +MatrixWorkspace_sptr MANTID_API_DLL operator+(const MatrixWorkspace_sptr &lhs, + const MatrixWorkspace_sptr &rhs); +MatrixWorkspace_sptr MANTID_API_DLL operator-(const MatrixWorkspace_sptr &lhs, + const MatrixWorkspace_sptr &rhs); +MatrixWorkspace_sptr MANTID_API_DLL operator*(const MatrixWorkspace_sptr &lhs, + const MatrixWorkspace_sptr &rhs); +MatrixWorkspace_sptr MANTID_API_DLL operator/(const MatrixWorkspace_sptr &lhs, + const MatrixWorkspace_sptr &rhs); -MatrixWorkspace_sptr MANTID_API_DLL operator+(const MatrixWorkspace_sptr lhs, +MatrixWorkspace_sptr MANTID_API_DLL operator+(const MatrixWorkspace_sptr &lhs, const double &rhsValue); -MatrixWorkspace_sptr MANTID_API_DLL operator-(const MatrixWorkspace_sptr lhs, +MatrixWorkspace_sptr MANTID_API_DLL operator-(const MatrixWorkspace_sptr &lhs, const double &rhsValue); MatrixWorkspace_sptr MANTID_API_DLL operator-(const double &lhsValue, - const MatrixWorkspace_sptr rhs); -MatrixWorkspace_sptr MANTID_API_DLL operator*(const MatrixWorkspace_sptr lhs, + const MatrixWorkspace_sptr &rhs); +MatrixWorkspace_sptr MANTID_API_DLL operator*(const MatrixWorkspace_sptr &lhs, const double &rhsValue); MatrixWorkspace_sptr MANTID_API_DLL operator*(const double &lhsValue, - const MatrixWorkspace_sptr rhs); -MatrixWorkspace_sptr MANTID_API_DLL operator/(const MatrixWorkspace_sptr lhs, + const MatrixWorkspace_sptr &rhs); +MatrixWorkspace_sptr MANTID_API_DLL operator/(const MatrixWorkspace_sptr &lhs, const double &rhsValue); MatrixWorkspace_sptr MANTID_API_DLL operator/(const double &lhsValue, - const MatrixWorkspace_sptr rhs); + const MatrixWorkspace_sptr &rhs); -MatrixWorkspace_sptr MANTID_API_DLL operator+=(const MatrixWorkspace_sptr lhs, - const MatrixWorkspace_sptr rhs); -MatrixWorkspace_sptr MANTID_API_DLL operator-=(const MatrixWorkspace_sptr lhs, - const MatrixWorkspace_sptr rhs); -MatrixWorkspace_sptr MANTID_API_DLL operator*=(const MatrixWorkspace_sptr lhs, - const MatrixWorkspace_sptr rhs); -MatrixWorkspace_sptr MANTID_API_DLL operator/=(const MatrixWorkspace_sptr lhs, - const MatrixWorkspace_sptr rhs); +MatrixWorkspace_sptr MANTID_API_DLL operator+=(const MatrixWorkspace_sptr &lhs, + const MatrixWorkspace_sptr &rhs); +MatrixWorkspace_sptr MANTID_API_DLL operator-=(const MatrixWorkspace_sptr &lhs, + const MatrixWorkspace_sptr &rhs); +MatrixWorkspace_sptr MANTID_API_DLL operator*=(const MatrixWorkspace_sptr &lhs, + const MatrixWorkspace_sptr &rhs); +MatrixWorkspace_sptr MANTID_API_DLL operator/=(const MatrixWorkspace_sptr &lhs, + const MatrixWorkspace_sptr &rhs); -MatrixWorkspace_sptr MANTID_API_DLL operator+=(const MatrixWorkspace_sptr lhs, +MatrixWorkspace_sptr MANTID_API_DLL operator+=(const MatrixWorkspace_sptr &lhs, const double &rhsValue); -MatrixWorkspace_sptr MANTID_API_DLL operator-=(const MatrixWorkspace_sptr lhs, +MatrixWorkspace_sptr MANTID_API_DLL operator-=(const MatrixWorkspace_sptr &lhs, const double &rhsValue); -MatrixWorkspace_sptr MANTID_API_DLL operator*=(const MatrixWorkspace_sptr lhs, +MatrixWorkspace_sptr MANTID_API_DLL operator*=(const MatrixWorkspace_sptr &lhs, const double &rhsValue); -MatrixWorkspace_sptr MANTID_API_DLL operator/=(const MatrixWorkspace_sptr lhs, +MatrixWorkspace_sptr MANTID_API_DLL operator/=(const MatrixWorkspace_sptr &lhs, const double &rhsValue); /** A collection of static functions for use with workspaces @@ -83,7 +83,7 @@ struct MANTID_API_DLL WorkspaceHelpers { static bool sharedXData(const MatrixWorkspace &WS); // Divides the data in a workspace by the bin width to make it a distribution // (or the reverse) - static void makeDistribution(MatrixWorkspace_sptr workspace, + static void makeDistribution(const MatrixWorkspace_sptr &workspace, const bool forwards = true); }; diff --git a/Framework/API/inc/MantidAPI/WorkspaceProperty.h b/Framework/API/inc/MantidAPI/WorkspaceProperty.h index a6b0b655196ae44dbae70ed085cb2673f896e567..0b0a32d2c3b0fc09ee3365e5b98d8b261ac5b63c 100644 --- a/Framework/API/inc/MantidAPI/WorkspaceProperty.h +++ b/Framework/API/inc/MantidAPI/WorkspaceProperty.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -59,20 +59,20 @@ public: explicit WorkspaceProperty( const std::string &name, const std::string &wsName, const unsigned int direction, - Kernel::IValidator_sptr validator = + const Kernel::IValidator_sptr &validator = Kernel::IValidator_sptr(new Kernel::NullValidator)); explicit WorkspaceProperty( const std::string &name, const std::string &wsName, const unsigned int direction, const PropertyMode::Type optional, - Kernel::IValidator_sptr validator = + const Kernel::IValidator_sptr &validator = Kernel::IValidator_sptr(new Kernel::NullValidator)); explicit WorkspaceProperty( const std::string &name, const std::string &wsName, const unsigned int direction, const PropertyMode::Type optional, const LockMode::Type locking, - Kernel::IValidator_sptr validator = + const Kernel::IValidator_sptr &validator = Kernel::IValidator_sptr(new Kernel::NullValidator)); WorkspaceProperty(const WorkspaceProperty &right); @@ -118,7 +118,8 @@ public: void setIsMasterRank(bool isMasterRank) override; private: - std::string isValidGroup(boost::shared_ptr<WorkspaceGroup> wsGroup) const; + std::string + isValidGroup(const boost::shared_ptr<WorkspaceGroup> &wsGroup) const; std::string isValidOutputWs() const; diff --git a/Framework/API/inc/MantidAPI/WorkspaceProperty.tcc b/Framework/API/inc/MantidAPI/WorkspaceProperty.tcc index 9b7b3f4a414590c8d76ec963297cd47994bb9107..6908bc7a6c25efeac00301d96c1a643f119d7b95 100644 --- a/Framework/API/inc/MantidAPI/WorkspaceProperty.tcc +++ b/Framework/API/inc/MantidAPI/WorkspaceProperty.tcc @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/AnalysisDataService.h" #include "MantidAPI/Workspace.h" @@ -29,10 +29,9 @@ namespace API { * Direction enum (i.e. 0-2) */ template <typename TYPE> -WorkspaceProperty<TYPE>::WorkspaceProperty(const std::string &name, - const std::string &wsName, - const unsigned int direction, - Kernel::IValidator_sptr validator) +WorkspaceProperty<TYPE>::WorkspaceProperty( + const std::string &name, const std::string &wsName, + const unsigned int direction, const Kernel::IValidator_sptr &validator) : Kernel::PropertyWithValue<boost::shared_ptr<TYPE>>( name, boost::shared_ptr<TYPE>(), validator, direction), m_workspaceName(wsName), m_initialWSName(wsName), @@ -51,11 +50,10 @@ WorkspaceProperty<TYPE>::WorkspaceProperty(const std::string &name, * Direction enum (i.e. 0-2) */ template <typename TYPE> -WorkspaceProperty<TYPE>::WorkspaceProperty(const std::string &name, - const std::string &wsName, - const unsigned int direction, - const PropertyMode::Type optional, - Kernel::IValidator_sptr validator) +WorkspaceProperty<TYPE>::WorkspaceProperty( + const std::string &name, const std::string &wsName, + const unsigned int direction, const PropertyMode::Type optional, + const Kernel::IValidator_sptr &validator) : Kernel::PropertyWithValue<boost::shared_ptr<TYPE>>( name, boost::shared_ptr<TYPE>(), validator, direction), m_workspaceName(wsName), m_initialWSName(wsName), m_optional(optional), @@ -78,12 +76,10 @@ WorkspaceProperty<TYPE>::WorkspaceProperty(const std::string &name, * Direction enum (i.e. 0-2) */ template <typename TYPE> -WorkspaceProperty<TYPE>::WorkspaceProperty(const std::string &name, - const std::string &wsName, - const unsigned int direction, - const PropertyMode::Type optional, - const LockMode::Type locking, - Kernel::IValidator_sptr validator) +WorkspaceProperty<TYPE>::WorkspaceProperty( + const std::string &name, const std::string &wsName, + const unsigned int direction, const PropertyMode::Type optional, + const LockMode::Type locking, const Kernel::IValidator_sptr &validator) : Kernel::PropertyWithValue<boost::shared_ptr<TYPE>>( name, boost::shared_ptr<TYPE>(), validator, direction), m_workspaceName(wsName), m_initialWSName(wsName), m_optional(optional), @@ -410,7 +406,7 @@ void WorkspaceProperty<TYPE>::setIsMasterRank(bool isMasterRank) { */ template <typename TYPE> std::string WorkspaceProperty<TYPE>::isValidGroup( - boost::shared_ptr<WorkspaceGroup> wsGroup) const { + const boost::shared_ptr<WorkspaceGroup> &wsGroup) const { g_log.debug() << " Input WorkspaceGroup found \n"; std::vector<std::string> wsGroupNames = wsGroup->getNames(); diff --git a/Framework/API/inc/MantidAPI/WorkspaceUnitValidator.h b/Framework/API/inc/MantidAPI/WorkspaceUnitValidator.h index 07759497efcf834daa9446c37adfaea083339da8..924bd81848802976971e7d645e27b804fa2330c6 100644 --- a/Framework/API/inc/MantidAPI/WorkspaceUnitValidator.h +++ b/Framework/API/inc/MantidAPI/WorkspaceUnitValidator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/inc/MantidAPI/Workspace_fwd.h b/Framework/API/inc/MantidAPI/Workspace_fwd.h index d29d486d717601e0f06118816df44fa6bac7b9e0..a4665032b359531b2397c4bded37af91d777ff0e 100644 --- a/Framework/API/inc/MantidAPI/Workspace_fwd.h +++ b/Framework/API/inc/MantidAPI/Workspace_fwd.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/src/ADSValidator.cpp b/Framework/API/src/ADSValidator.cpp index fa5c817172489b0a74e80eb8a4632806e77391f8..c8a2174019089526d5d82e6c7ef543df57a58410 100644 --- a/Framework/API/src/ADSValidator.cpp +++ b/Framework/API/src/ADSValidator.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/ADSValidator.h" #include "MantidAPI/AnalysisDataService.h" diff --git a/Framework/API/src/AlgoTimeRegister.cpp b/Framework/API/src/AlgoTimeRegister.cpp index cc70bec93ceb364388cff5eb3f33071a0d3bbcbf..a49502de592d7389e606e973b9474166af66fb1c 100644 --- a/Framework/API/src/AlgoTimeRegister.cpp +++ b/Framework/API/src/AlgoTimeRegister.cpp @@ -1,3 +1,9 @@ +// Mantid Repository : https://github.com/mantidproject/mantid +// +// Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS +// SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/AlgoTimeRegister.h" #include "MantidKernel/MultiThreaded.h" #include <fstream> diff --git a/Framework/API/src/Algorithm.cpp b/Framework/API/src/Algorithm.cpp index 57b1d4ad5ccad6929886ad62bc18c55273d4a63a..f76b90be2ee3db4a413cd4a91257dceb6ddbc174 100644 --- a/Framework/API/src/Algorithm.cpp +++ b/Framework/API/src/Algorithm.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/Algorithm.h" #include "MantidAPI/ADSValidator.h" @@ -39,6 +39,7 @@ #include <json/json.h> #include <map> +#include <utility> // Index property handling template definitions #include "MantidAPI/Algorithm.tcc" @@ -98,9 +99,10 @@ Algorithm::Algorithm() : PropertyManagerOwner(), m_cancel(false), m_parallelException(false), m_log("Algorithm"), g_log(m_log), m_groupSize(0), m_executeAsync(nullptr), m_notificationCenter(nullptr), m_progressObserver(nullptr), - m_isInitialized(false), m_isExecuted(false), m_isChildAlgorithm(false), + m_executionState(ExecutionState::Uninitialized), + m_resultState(ResultState::NotFinished), m_isChildAlgorithm(false), m_recordHistoryForChild(false), m_alwaysStoreInADS(true), - m_runningAsync(false), m_running(false), m_rethrow(false), + m_runningAsync(false), m_rethrow(false), m_isAlgStartupLoggingEnabled(true), m_startChildProgress(0.), m_endChildProgress(0.), m_algorithmID(this), m_singleGroup(-1), m_groupsHaveSimilarNames(false), m_inputWorkspaceHistories(), @@ -114,24 +116,37 @@ Algorithm::~Algorithm() {} //=================================== //============================================================================================= -//--------------------------------------------------------------------------------------------- -/// Has the Algorithm already been initialized -bool Algorithm::isInitialized() const { return m_isInitialized; } +/// Gets the current execution state +ExecutionState Algorithm::executionState() const { return m_executionState; } + +/// Sets the current execution state +void Algorithm::setExecutionState(const ExecutionState state) { + m_executionState = state; +} + +/// Gets the current result State +ResultState Algorithm::resultState() const { return m_resultState; } -/// Has the Algorithm already been executed -bool Algorithm::isExecuted() const { return m_isExecuted; } +/// Sets the result execution state +/// if set to Success or Failed will also set the execution state to finished +void Algorithm::setResultState(const ResultState state) { + if (state != ResultState::NotFinished) { + setExecutionState(ExecutionState::Finished); + } + m_resultState = state; +} //--------------------------------------------------------------------------------------------- -/// Set the Algorithm initialized state -void Algorithm::setInitialized() { m_isInitialized = true; } - -/** Set the executed flag to the specified state -// Public in Gaudi - don't know why and will leave here unless we find a reason -otherwise -// Also don't know reason for different return type and argument. -@param state :: New executed state -*/ -void Algorithm::setExecuted(bool state) { m_isExecuted = state; } +/// Has the Algorithm already been initialized +bool Algorithm::isInitialized() const { + return (m_executionState != ExecutionState::Uninitialized); +} + +/// Has the Algorithm already been executed successfully +bool Algorithm::isExecuted() const { + return ((executionState() == ExecutionState::Finished) && + (resultState() == ResultState::Success)); +} //--------------------------------------------------------------------------------------------- /** To query whether algorithm is a child. @@ -178,7 +193,9 @@ bool Algorithm::getAlwaysStoreInADS() const { return m_alwaysStoreInADS; } void Algorithm::setRethrows(const bool rethrow) { this->m_rethrow = rethrow; } /// True if the algorithm is running. -bool Algorithm::isRunning() const { return m_running; } +bool Algorithm::isRunning() const { + return (executionState() == ExecutionState::Running); +} //--------------------------------------------------------------------------------------------- /** Add an observer to a notification @@ -262,7 +279,7 @@ const std::string Algorithm::workspaceMethodInputProperty() const { return ""; } */ void Algorithm::initialize() { // Bypass the initialization if the algorithm has already been initialized. - if (m_isInitialized) + if (isInitialized()) return; g_log.setName(this->name()); @@ -277,7 +294,7 @@ void Algorithm::initialize() { // Indicate that this Algorithm has been initialized to prevent duplicate // attempts. - setInitialized(); + setExecutionState(ExecutionState::Initialized); } catch (std::runtime_error &) { throw; } @@ -490,6 +507,7 @@ void Algorithm::unlockWorkspaces() { bool Algorithm::executeInternal() { Timer timer; + bool algIsExecuted = false; AlgorithmManager::Instance().notifyAlgorithmStarting(this->getAlgorithmID()); { auto *depo = dynamic_cast<DeprecatedAlgorithm *>(this); @@ -548,7 +566,7 @@ bool Algorithm::executeInternal() { << ex.what() << "\n"; notificationCenter().postNotification( new ErrorNotification(this, ex.what())); - m_running = false; + setResultState(ResultState::Failed); if (m_isChildAlgorithm || m_runningAsync || m_rethrow) { m_runningAsync = false; throw; @@ -618,10 +636,7 @@ bool Algorithm::executeInternal() { // Invoke exec() method of derived class and catch all uncaught exceptions try { try { - setExecuted(false); - if (!isChild()) { - m_running = true; - } + setExecutionState(ExecutionState::Running); startTime = Mantid::Types::Core::DateAndTime::getCurrentTime(); // Call the concrete algorithm's exec method @@ -646,7 +661,9 @@ bool Algorithm::executeInternal() { if (m_alwaysStoreInADS) this->store(); - setExecuted(true); + // just cache the value internally, it is set at the very end of this + // method + algIsExecuted = true; // Log that execution has completed. getLogger().debug( @@ -659,6 +676,7 @@ bool Algorithm::executeInternal() { " seconds\n"); reportCompleted(duration); } catch (std::runtime_error &ex) { + setResultState(ResultState::Failed); this->unlockWorkspaces(); if (m_isChildAlgorithm || m_runningAsync || m_rethrow) throw; @@ -669,8 +687,8 @@ bool Algorithm::executeInternal() { } notificationCenter().postNotification( new ErrorNotification(this, ex.what())); - m_running = false; } catch (std::logic_error &ex) { + setResultState(ResultState::Failed); this->unlockWorkspaces(); if (m_isChildAlgorithm || m_runningAsync || m_rethrow) throw; @@ -681,11 +699,10 @@ bool Algorithm::executeInternal() { } notificationCenter().postNotification( new ErrorNotification(this, ex.what())); - m_running = false; } } catch (CancelException &ex) { + setResultState(ResultState::Failed); m_runningAsync = false; - m_running = false; getLogger().warning() << this->name() << ": Execution cancelled by user.\n"; notificationCenter().postNotification( new ErrorNotification(this, ex.what())); @@ -694,9 +711,8 @@ bool Algorithm::executeInternal() { } // Gaudi also specifically catches GaudiException & std:exception. catch (std::exception &ex) { - setExecuted(false); + setResultState(ResultState::Failed); m_runningAsync = false; - m_running = false; notificationCenter().postNotification( new ErrorNotification(this, ex.what())); @@ -708,10 +724,9 @@ bool Algorithm::executeInternal() { } catch (...) { - // Execution failed - setExecuted(false); + // Execution failed with an unknown exception object + setResultState(ResultState::Failed); m_runningAsync = false; - m_running = false; notificationCenter().postNotification( new ErrorNotification(this, "UNKNOWN Exception is caught in exec()")); @@ -724,10 +739,13 @@ bool Algorithm::executeInternal() { // Unlock the locked workspaces this->unlockWorkspaces(); - notificationCenter().postNotification( - new FinishedNotification(this, isExecuted())); // Only gets to here if algorithm ended normally - return isExecuted(); + if (algIsExecuted) { + setResultState(ResultState::Success); + } + notificationCenter().postNotification( + new FinishedNotification(this, algIsExecuted)); + return algIsExecuted; } //--------------------------------------------------------------------------------------------- @@ -828,7 +846,7 @@ Algorithm_sptr Algorithm::createChildAlgorithm(const std::string &name, * Can also be used manually for algorithms created otherwise. This allows * running algorithms that are not declared into the factory as child * algorithms. */ -void Algorithm::setupAsChildAlgorithm(Algorithm_sptr alg, +void Algorithm::setupAsChildAlgorithm(const Algorithm_sptr &alg, const double startProgress, const double endProgress, const bool enableLogging) { @@ -1060,7 +1078,7 @@ void Algorithm::linkHistoryWithLastChild() { void Algorithm::trackAlgorithmHistory( boost::shared_ptr<AlgorithmHistory> parentHist) { enableHistoryRecordingForChild(true); - m_parentHistory = parentHist; + m_parentHistory = std::move(parentHist); } /** Check if we are tracking history for this algorithm @@ -1275,16 +1293,14 @@ bool Algorithm::doCallProcessGroups( // but we also need to update flags in the parent algorithm and // send an ErrorNotification (because the child isn't registered with the // AlgorithmMonitor). - setExecuted(false); + setResultState(ResultState::Failed); m_runningAsync = false; - m_running = false; notificationCenter().postNotification( new ErrorNotification(this, ex.what())); throw; } catch (...) { - setExecuted(false); + setResultState(ResultState::Failed); m_runningAsync = false; - m_running = false; notificationCenter().postNotification(new ErrorNotification( this, "UNKNOWN Exception caught from processGroups")); throw; @@ -1313,9 +1329,11 @@ bool Algorithm::doCallProcessGroups( // Log that execution has completed. reportCompleted(duration, true /* this is for group processing*/); + setResultState(ResultState::Success); + } else { + setResultState(ResultState::Failed); } - setExecuted(completed); notificationCenter().postNotification( new FinishedNotification(this, isExecuted())); @@ -1552,6 +1570,7 @@ void Algorithm::copyNonWorkspaceProperties(IAlgorithm *alg, int periodNum) { const auto &props = this->getProperties(); for (const auto &prop : props) { if (prop) { + auto *wsProp = dynamic_cast<IWorkspaceProperty *>(prop); // Copy the property using the string if (!wsProp) @@ -1763,7 +1782,7 @@ void Algorithm::reportCompleted(const double &duration, getLogger().debug() << name() << " finished with isChild = " << isChild() << '\n'; } - m_running = false; + setExecutionState(ExecutionState::Finished); } /** Registers the usage of the algorithm with the UsageService diff --git a/Framework/API/src/AlgorithmExecute.cpp b/Framework/API/src/AlgorithmExecute.cpp index 8b99e593d78c0516eca8eb752fc6d57df9528dd6..80b7b44691124e7e1353be4ab006560a3a51ba5b 100644 --- a/Framework/API/src/AlgorithmExecute.cpp +++ b/Framework/API/src/AlgorithmExecute.cpp @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #include "MantidAPI/Algorithm.h" namespace Mantid { diff --git a/Framework/API/src/AlgorithmExecuteProfile.cpp b/Framework/API/src/AlgorithmExecuteProfile.cpp index e555fa2f38e01e6bc7deb045a08faedc16521306..fee16c7c466a4fea49e72f2ab6f45d8d887e0383 100644 --- a/Framework/API/src/AlgorithmExecuteProfile.cpp +++ b/Framework/API/src/AlgorithmExecuteProfile.cpp @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #include "MantidAPI/AlgoTimeRegister.h" #include "MantidAPI/Algorithm.h" diff --git a/Framework/API/src/AlgorithmFactory.cpp b/Framework/API/src/AlgorithmFactory.cpp index 7056e7963452c040297aa2716a1f1e5926af08a6..5379a1b6dfc67d9d11645d3c62e50c4671647dea 100644 --- a/Framework/API/src/AlgorithmFactory.cpp +++ b/Framework/API/src/AlgorithmFactory.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes @@ -406,7 +406,7 @@ void AlgorithmFactoryImpl::fillHiddenCategories( * @returns the name of the algroithm */ const std::string AlgorithmFactoryImpl::extractAlgName( - const boost::shared_ptr<IAlgorithm> alg) const { + const boost::shared_ptr<IAlgorithm> &alg) const { return alg->name(); } @@ -415,7 +415,7 @@ const std::string AlgorithmFactoryImpl::extractAlgName( * @returns the version of the algroithm */ int AlgorithmFactoryImpl::extractAlgVersion( - const boost::shared_ptr<IAlgorithm> alg) const { + const boost::shared_ptr<IAlgorithm> &alg) const { return alg->version(); } diff --git a/Framework/API/src/AlgorithmFactoryObserver.cpp b/Framework/API/src/AlgorithmFactoryObserver.cpp index ed69a494c2c33d1d4265753acb00730b0da436a4..a2055ed52bab6a0d204dcdceb666da21a05ef558 100644 --- a/Framework/API/src/AlgorithmFactoryObserver.cpp +++ b/Framework/API/src/AlgorithmFactoryObserver.cpp @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #include "MantidAPI/AlgorithmFactoryObserver.h" namespace { diff --git a/Framework/API/src/AlgorithmHasProperty.cpp b/Framework/API/src/AlgorithmHasProperty.cpp index fb052a658667627e9008c22668732fdeb2af0ad6..316f3270eb33c0c615d90d9892b34c18201f375b 100644 --- a/Framework/API/src/AlgorithmHasProperty.cpp +++ b/Framework/API/src/AlgorithmHasProperty.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/AlgorithmHasProperty.h" #include "MantidAPI/IAlgorithm.h" diff --git a/Framework/API/src/AlgorithmHistory.cpp b/Framework/API/src/AlgorithmHistory.cpp index 14eef7c9a3261a63d8288a7d17101dbf5b2e0e33..fd4208da5e549e1061a3d2c1a56aaf42c63ebaaa 100644 --- a/Framework/API/src/AlgorithmHistory.cpp +++ b/Framework/API/src/AlgorithmHistory.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes @@ -21,6 +21,7 @@ #include <boost/uuid/uuid_generators.hpp> #include <boost/uuid/uuid_io.hpp> #include <sstream> +#include <utility> namespace Mantid { namespace API { @@ -85,7 +86,7 @@ AlgorithmHistory::AlgorithmHistory(const std::string &name, int vers, std::size_t uexeccount) : m_name(name), m_version(vers), m_executionDate(start), m_executionDuration(duration), m_execCount(uexeccount), - m_childHistories(), m_uuid(uuid) {} + m_childHistories(), m_uuid(std::move(uuid)) {} /** * Set the history properties for an algorithm pointer @@ -162,7 +163,7 @@ void AlgorithmHistory::addProperty(const std::string &name, /** Add a child algorithm history to history * @param childHist :: The child history */ -void AlgorithmHistory::addChildHistory(AlgorithmHistory_sptr childHist) { +void AlgorithmHistory::addChildHistory(const AlgorithmHistory_sptr &childHist) { // Don't copy one's own history onto oneself if (this == &(*childHist)) { return; diff --git a/Framework/API/src/AlgorithmManager.cpp b/Framework/API/src/AlgorithmManager.cpp index f6b18db76dc33a2c2e8c14d30a7f81a410d487ae..2d657d81c4ffd3abba445d1597ce12ae57755968 100644 --- a/Framework/API/src/AlgorithmManager.cpp +++ b/Framework/API/src/AlgorithmManager.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes @@ -22,15 +22,6 @@ Kernel::Logger g_log("AlgorithmManager"); /// Private Constructor for singleton class AlgorithmManagerImpl::AlgorithmManagerImpl() : m_managed_algs() { - auto max_no_algs = - Kernel::ConfigService::Instance().getValue<int>("algorithms.retained"); - - m_max_no_algs = max_no_algs.get_value_or(0); - - if (m_max_no_algs < 1) { - m_max_no_algs = 100; // Default to keeping 100 algorithms if not specified - } - g_log.debug() << "Algorithm Manager created.\n"; } @@ -82,39 +73,15 @@ IAlgorithm_sptr AlgorithmManagerImpl::create(const std::string &algName, else alg = unmanagedAlg; - // If this takes us beyond the maximum size, then remove the oldest one(s) - while (m_managed_algs.size() >= - static_cast<std::deque<IAlgorithm_sptr>::size_type>(m_max_no_algs)) { - std::deque<IAlgorithm_sptr>::iterator it; - it = m_managed_algs.begin(); - - // Look for the first (oldest) algo that is NOT running right now. - while (it != m_managed_algs.end()) { - if (!(*it)->isRunning()) - break; - ++it; - } - - if (it == m_managed_algs.end()) { - // Unusual case where ALL algorithms are running - g_log.warning() - << "All algorithms in the AlgorithmManager are running. " - << "Cannot pop oldest algorithm. " - << "You should increase your 'algorithms.retained' value. " - << m_managed_algs.size() << " in queue.\n"; - break; - } else { - // Normal; erase that algorithm - g_log.debug() << "Popping out oldest algorithm " << (*it)->name() - << '\n'; - m_managed_algs.erase(it); - } - } + auto count = removeFinishedAlgorithms(); + g_log.debug() + << count + << " Finished algorithms removed from the managed algorithms list. " + << m_managed_algs.size() << " remaining.\n"; // Add to list of managed ones m_managed_algs.emplace_back(alg); alg->initialize(); - } catch (std::runtime_error &ex) { g_log.error() << "AlgorithmManager:: Unable to create algorithm " << algName << ' ' << ex.what() << '\n'; @@ -140,19 +107,6 @@ void AlgorithmManagerImpl::clear() { std::size_t AlgorithmManagerImpl::size() const { return m_managed_algs.size(); } -/** - * Set new maximum number of algorithms that can be stored. - * - * @param n :: The new maximum. - */ -void AlgorithmManagerImpl::setMaxAlgorithms(int n) { - if (n < 0) { - throw std::runtime_error("Maximum number of algorithms stored in " - "AlgorithmManager cannot be negative."); - } - m_max_no_algs = n; -} - /** * Returns a shared pointer by algorithm id * @param id :: The ID of the algorithm @@ -241,6 +195,28 @@ void AlgorithmManagerImpl::cancelAll() { } } +/// Removes all of the finished algorithms +/// this does not lock the mutex as the locking is already assumed to be in +/// place +size_t AlgorithmManagerImpl::removeFinishedAlgorithms() { + std::vector<IAlgorithm_const_sptr> theCompletedInstances; + std::copy_if( + m_managed_algs.cbegin(), m_managed_algs.cend(), + std::back_inserter(theCompletedInstances), [](const auto &algorithm) { + return (algorithm->executionState() == ExecutionState::Finished); + }); + for (auto completedAlg : theCompletedInstances) { + auto itend = m_managed_algs.end(); + for (auto it = m_managed_algs.begin(); it != itend; ++it) { + if ((**it).getAlgorithmID() == completedAlg->getAlgorithmID()) { + m_managed_algs.erase(it); + break; + } + } + } + return theCompletedInstances.size(); +} + void AlgorithmManagerImpl::shutdown() { clear(); } } // namespace API } // namespace Mantid diff --git a/Framework/API/src/AlgorithmObserver.cpp b/Framework/API/src/AlgorithmObserver.cpp index c9e7aeb1c82b63e578999d8405341d833b6f856f..5fb257a1a9a2b8f1353d60106fc7bceb95b87d29 100644 --- a/Framework/API/src/AlgorithmObserver.cpp +++ b/Framework/API/src/AlgorithmObserver.cpp @@ -1,14 +1,16 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes //---------------------------------------------------------------------- -#include "MantidAPI/AlgorithmObserver.h" +#include <utility> + #include "MantidAPI/AlgorithmManager.h" +#include "MantidAPI/AlgorithmObserver.h" namespace Mantid { namespace API { @@ -26,13 +28,13 @@ AlgorithmObserver::AlgorithmObserver() alg. @param alg :: Algorithm to be observed */ -AlgorithmObserver::AlgorithmObserver(IAlgorithm_const_sptr alg) +AlgorithmObserver::AlgorithmObserver(const IAlgorithm_const_sptr &alg) : m_progressObserver(*this, &AlgorithmObserver::_progressHandle), m_startObserver(*this, &AlgorithmObserver::_startHandle), m_finishObserver(*this, &AlgorithmObserver::_finishHandle), m_errorObserver(*this, &AlgorithmObserver::_errorHandle), m_startingObserver(*this, &AlgorithmObserver::_startingHandle) { - observeAll(alg); + observeAll(std::move(alg)); } /// Virtual destructor @@ -41,7 +43,7 @@ AlgorithmObserver::~AlgorithmObserver() = default; /** Connect to algorithm alg and observe all its notifications @param alg :: Algorithm to be observed */ -void AlgorithmObserver::observeAll(IAlgorithm_const_sptr alg) { +void AlgorithmObserver::observeAll(const IAlgorithm_const_sptr &alg) { alg->addObserver(m_progressObserver); alg->addObserver(m_startObserver); alg->addObserver(m_finishObserver); @@ -51,7 +53,7 @@ void AlgorithmObserver::observeAll(IAlgorithm_const_sptr alg) { /** Connect to algorithm alg and observe its progress notification @param alg :: Algorithm to be observed */ -void AlgorithmObserver::observeProgress(IAlgorithm_const_sptr alg) { +void AlgorithmObserver::observeProgress(const IAlgorithm_const_sptr &alg) { alg->addObserver(m_progressObserver); } @@ -65,21 +67,21 @@ void AlgorithmObserver::observeStarting() { /** Connect to algorithm alg and observe its start notification @param alg :: Algorithm to be observed */ -void AlgorithmObserver::observeStart(IAlgorithm_const_sptr alg) { +void AlgorithmObserver::observeStart(const IAlgorithm_const_sptr &alg) { alg->addObserver(m_startObserver); } /** Connect to algorithm alg and observe its finish notification @param alg :: Algorithm to be observed */ -void AlgorithmObserver::observeFinish(IAlgorithm_const_sptr alg) { +void AlgorithmObserver::observeFinish(const IAlgorithm_const_sptr &alg) { alg->addObserver(m_finishObserver); } /** Connect to algorithm alg and observe its error notification @param alg :: Algorithm to be observed */ -void AlgorithmObserver::observeError(IAlgorithm_const_sptr alg) { +void AlgorithmObserver::observeError(const IAlgorithm_const_sptr &alg) { alg->addObserver(m_errorObserver); } @@ -87,7 +89,7 @@ void AlgorithmObserver::observeError(IAlgorithm_const_sptr alg) { inherited classes. @param alg :: Algorithm to be disconnected */ -void AlgorithmObserver::stopObserving(IAlgorithm_const_sptr alg) { +void AlgorithmObserver::stopObserving(const IAlgorithm_const_sptr &alg) { this->stopObserving(alg.get()); } diff --git a/Framework/API/src/AlgorithmProperty.cpp b/Framework/API/src/AlgorithmProperty.cpp index 00765cd061938252471c66b8417cf927d483973f..512ae7a5bfef738a0f1db92e7eadb45b6a6d4af9 100644 --- a/Framework/API/src/AlgorithmProperty.cpp +++ b/Framework/API/src/AlgorithmProperty.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //----------------------------------------------------------------------------- // Includes @@ -12,6 +12,8 @@ #include <json/value.h> +#include <utility> + namespace Mantid { namespace API { @@ -29,8 +31,8 @@ namespace API { AlgorithmProperty::AlgorithmProperty(const std::string &propName, Kernel::IValidator_sptr validator, unsigned int direction) - : Kernel::PropertyWithValue<HeldType>(propName, HeldType(), validator, - direction), + : Kernel::PropertyWithValue<HeldType>(propName, HeldType(), + std::move(validator), direction), m_algmStr() {} /** diff --git a/Framework/API/src/AlgorithmProxy.cpp b/Framework/API/src/AlgorithmProxy.cpp index 86ff360fa1550136bd721faa3cdb6c2afb822573..876a9b51d1b1b2504dd0b0551f8f9870860d3b5c 100644 --- a/Framework/API/src/AlgorithmProxy.cpp +++ b/Framework/API/src/AlgorithmProxy.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/AlgorithmProxy.h" #include "MantidAPI/AlgorithmManager.h" @@ -21,17 +21,18 @@ namespace Mantid { namespace API { /// Constructor -AlgorithmProxy::AlgorithmProxy(Algorithm_sptr alg) +AlgorithmProxy::AlgorithmProxy(const Algorithm_sptr &alg) : PropertyManagerOwner(), m_executeAsync(new Poco::ActiveMethod<bool, Poco::Void, AlgorithmProxy>( this, &AlgorithmProxy::executeAsyncImpl)), m_name(alg->name()), m_category(alg->category()), m_categorySeparator(alg->categorySeparator()), m_seeAlso(alg->seeAlso()), m_alias(alg->alias()), m_summary(alg->summary()), - m_version(alg->version()), m_alg(alg), m_isExecuted(), - m_isLoggingEnabled(true), m_loggingOffset(0), - m_isAlgStartupLoggingEnabled(true), m_rethrow(false), m_isChild(false), - m_setAlwaysStoreInADS(true) { + m_version(alg->version()), m_alg(alg), + m_executionState(ExecutionState::Initialized), + m_resultState(ResultState::NotFinished), m_isLoggingEnabled(true), + m_loggingOffset(0), m_isAlgStartupLoggingEnabled(true), m_rethrow(false), + m_isChild(false), m_setAlwaysStoreInADS(true) { if (!alg) { throw std::logic_error("Unable to create a proxy algorithm."); } @@ -78,7 +79,7 @@ bool AlgorithmProxy::execute() { throw; } stopped(); - return m_isExecuted; + return isExecuted(); } /** Asynchronous execution of the algorithm. @@ -108,21 +109,31 @@ bool AlgorithmProxy::executeAsyncImpl(const Poco::Void &dummy) { throw; } stopped(); - return m_isExecuted; + return isExecuted(); } +/// Gets the current execution state +ExecutionState AlgorithmProxy::executionState() const { + return m_executionState; +} + +/// Gets the current result State +ResultState AlgorithmProxy::resultState() const { return m_resultState; } + /// True if the algorithm is running. bool AlgorithmProxy::isRunning() const { - return m_alg ? m_alg->isRunning() : false; + return m_alg ? (m_alg->executionState() == ExecutionState::Running) : false; } /// Has the AlgorithmProxy already been initialized bool AlgorithmProxy::isInitialized() const { - return true; //!!!!!!!!! + return true; // Algorithm Proxies will always initialize the algorithm } -/// Has the AlgorithmProxy already been executed -bool AlgorithmProxy::isExecuted() const { return m_isExecuted; } +/// Has the AlgorithmProxy already been executed successfully +bool AlgorithmProxy::isExecuted() const { + return resultState() == ResultState::Success; +} /// Cancel the execution of the algorithm void AlgorithmProxy::cancel() { @@ -263,7 +274,8 @@ void AlgorithmProxy::createConcreteAlg(bool initOnly) { void AlgorithmProxy::stopped() { if (m_setAlwaysStoreInADS) dropWorkspaceReferences(); - m_isExecuted = m_alg->isExecuted(); + m_executionState = m_alg->executionState(); + m_resultState = m_alg->resultState(); m_alg.reset(); } diff --git a/Framework/API/src/AnalysisDataService.cpp b/Framework/API/src/AnalysisDataService.cpp index fc6f6d0eb425b0c3f8e297ae192eeb71784222e8..31a2be41f4082692ef65ee791478e91b63a7ff76 100644 --- a/Framework/API/src/AnalysisDataService.cpp +++ b/Framework/API/src/AnalysisDataService.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/AnalysisDataService.h" #include "MantidAPI/WorkspaceGroup.h" diff --git a/Framework/API/src/AnalysisDataServiceObserver.cpp b/Framework/API/src/AnalysisDataServiceObserver.cpp index 3dde21ea6cd5c35a5078da9bdd62c61cb7dee6c7..73c85386c77066984eff08b64465ee73b76216b0 100644 --- a/Framework/API/src/AnalysisDataServiceObserver.cpp +++ b/Framework/API/src/AnalysisDataServiceObserver.cpp @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #include "MantidAPI/AnalysisDataServiceObserver.h" namespace { diff --git a/Framework/API/src/ArchiveSearchFactory.cpp b/Framework/API/src/ArchiveSearchFactory.cpp index 6a7654445a25eec4a160ba032f552317a8070ce4..c2b7c362a8090d29018c75da9983fc6199450ada 100644 --- a/Framework/API/src/ArchiveSearchFactory.cpp +++ b/Framework/API/src/ArchiveSearchFactory.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/API/src/Axis.cpp b/Framework/API/src/Axis.cpp index 917c834d0c0ad9f938bb51a24b04cb40e1bfeec4..4770a76b8e11335bfb1c9aeb040606429c193859 100644 --- a/Framework/API/src/Axis.cpp +++ b/Framework/API/src/Axis.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/Axis.h" #include "MantidKernel/Exception.h" diff --git a/Framework/API/src/BinEdgeAxis.cpp b/Framework/API/src/BinEdgeAxis.cpp index fd25b85af8805eb68ab9bd64235aba58f2ecbcdc..e28fc10f1aa0f6738bc0ce26173ab765a2fc1f33 100644 --- a/Framework/API/src/BinEdgeAxis.cpp +++ b/Framework/API/src/BinEdgeAxis.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/BinEdgeAxis.h" #include "MantidKernel/Exception.h" diff --git a/Framework/API/src/BoostOptionalToAlgorithmProperty.cpp b/Framework/API/src/BoostOptionalToAlgorithmProperty.cpp index da358ecfbcade4a0cc7218566d17f528add6177e..ca6898c604e185cb9f9b3252aec7145f25743c84 100644 --- a/Framework/API/src/BoostOptionalToAlgorithmProperty.cpp +++ b/Framework/API/src/BoostOptionalToAlgorithmProperty.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/BoostOptionalToAlgorithmProperty.h" @@ -10,8 +10,9 @@ namespace Mantid { namespace API { template <> std::string checkForMandatoryInstrumentDefault( - Mantid::API::Algorithm *const alg, std::string propName, - Mantid::Geometry::Instrument_const_sptr instrument, std::string idf_name) { + Mantid::API::Algorithm *const alg, const std::string &propName, + const Mantid::Geometry::Instrument_const_sptr &instrument, + const std::string &idf_name) { auto algProperty = alg->getPointerToProperty(propName); if (algProperty->isDefault()) { auto defaults = instrument->getStringParameter(idf_name); @@ -28,8 +29,9 @@ std::string checkForMandatoryInstrumentDefault( template <> boost::optional<std::string> checkForOptionalInstrumentDefault( - Mantid::API::Algorithm *const alg, std::string propName, - Mantid::Geometry::Instrument_const_sptr instrument, std::string idf_name) { + Mantid::API::Algorithm *const alg, const std::string &propName, + const Mantid::Geometry::Instrument_const_sptr &instrument, + const std::string &idf_name) { auto algProperty = alg->getPointerToProperty(propName); if (algProperty->isDefault()) { auto defaults = instrument->getStringParameter(idf_name); diff --git a/Framework/API/src/BoxController.cpp b/Framework/API/src/BoxController.cpp index 5fd324452a6ae0939811aff5b75c9239926f6f3e..1590696cb4cac060808f12cca60badaec360afb4 100644 --- a/Framework/API/src/BoxController.cpp +++ b/Framework/API/src/BoxController.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include <sstream> @@ -296,8 +296,9 @@ void BoxController::clearFileBacked() { *@param fileName -- if newFileIO comes without opened file, this is the file *name to open for the file based IO operations */ -void BoxController::setFileBacked(boost::shared_ptr<IBoxControllerIO> newFileIO, - const std::string &fileName) { +void BoxController::setFileBacked( + const boost::shared_ptr<IBoxControllerIO> &newFileIO, + const std::string &fileName) { if (!newFileIO->isOpened()) newFileIO->openFile(fileName, "w"); diff --git a/Framework/API/src/CatalogManager.cpp b/Framework/API/src/CatalogManager.cpp index 346a399c9f071bf20817f8c09df655e26ec09464..e5dd10da271aa856cf809573765d4cd6923235c0 100644 --- a/Framework/API/src/CatalogManager.cpp +++ b/Framework/API/src/CatalogManager.cpp @@ -1,12 +1,13 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/CatalogManager.h" #include "MantidAPI/CatalogFactory.h" #include "MantidAPI/CompositeCatalog.h" +#include "MantidAPI/FunctionFactory.h" #include "MantidKernel/ConfigService.h" #include "MantidKernel/FacilityInfo.h" @@ -105,9 +106,10 @@ void CatalogManagerImpl::destroyCatalog(const std::string &sessionID) { std::vector<CatalogSession_sptr> CatalogManagerImpl::getActiveSessions() { std::vector<CatalogSession_sptr> sessions; sessions.reserve(m_activeCatalogs.size()); - for (const auto &activeCatalog : m_activeCatalogs) { - sessions.emplace_back(activeCatalog.first); - } + + std::transform(m_activeCatalogs.begin(), m_activeCatalogs.end(), + std::back_inserter(sessions), + [](const auto &activeCatalog) { return activeCatalog.first; }); return sessions; } diff --git a/Framework/API/src/CatalogSession.cpp b/Framework/API/src/CatalogSession.cpp index 101506e5667bb24e79c55a5498e66aa86b04f0f9..3e6f76f7abb531b9910265f142df11c9578173d3 100644 --- a/Framework/API/src/CatalogSession.cpp +++ b/Framework/API/src/CatalogSession.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/CatalogSession.h" #include "MantidKernel/Logger.h" diff --git a/Framework/API/src/Citation.cpp b/Framework/API/src/Citation.cpp index f35e07ce39bd28dc19aa3f043d5f40fbfabf85ec..0a50bd829df938b4b58cd574db96e1294087d8cb 100644 --- a/Framework/API/src/Citation.cpp +++ b/Framework/API/src/Citation.cpp @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #include "MantidAPI/Citation.h" #include <nexus/NeXusFile.hpp> diff --git a/Framework/API/src/Column.cpp b/Framework/API/src/Column.cpp index e1d43bdf1ac794f5556996b62b57998f5392afc7..284608e92738bc7e80e81af6d1b9f2f1b77676a0 100644 --- a/Framework/API/src/Column.cpp +++ b/Framework/API/src/Column.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include <algorithm> #include <iostream> diff --git a/Framework/API/src/ColumnFactory.cpp b/Framework/API/src/ColumnFactory.cpp index 04677e94dac09d3f216b5860c306a56ef2937182..93b7604e487900fdff850abc7ba583f4d95d7546 100644 --- a/Framework/API/src/ColumnFactory.cpp +++ b/Framework/API/src/ColumnFactory.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/ColumnFactory.h" #include "MantidAPI/Column.h" diff --git a/Framework/API/src/CommonBinsValidator.cpp b/Framework/API/src/CommonBinsValidator.cpp index aa02f41d096f9022305be30a46b809a409f55c73..ce953d4fdc3493543bd55ec7355e919ea90ac7cf 100644 --- a/Framework/API/src/CommonBinsValidator.cpp +++ b/Framework/API/src/CommonBinsValidator.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/CommonBinsValidator.h" #include "MantidAPI/MatrixWorkspace.h" diff --git a/Framework/API/src/CompositeCatalog.cpp b/Framework/API/src/CompositeCatalog.cpp index d8f99882c257a55e2e291096214c5278951d7cc0..f838b719ca0c8c51905710f78fba0bcebee01ce4 100644 --- a/Framework/API/src/CompositeCatalog.cpp +++ b/Framework/API/src/CompositeCatalog.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/CompositeCatalog.h" @@ -16,7 +16,7 @@ CompositeCatalog::CompositeCatalog() : m_catalogs() {} * Add a catalog to the catalog container. * @param catalog :: The catalog to add to the container. */ -void CompositeCatalog::add(const ICatalog_sptr catalog) { +void CompositeCatalog::add(const ICatalog_sptr &catalog) { m_catalogs.emplace_back(catalog); } diff --git a/Framework/API/src/CompositeDomainMD.cpp b/Framework/API/src/CompositeDomainMD.cpp index d3b3cf172488ac381b71a2c8d23266f1736fffdb..6762e9be597c90814b65cba3a8147223193a11fa 100644 --- a/Framework/API/src/CompositeDomainMD.cpp +++ b/Framework/API/src/CompositeDomainMD.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes @@ -21,11 +21,18 @@ namespace API { * @param ws :: Pointer to a workspace. * @param maxDomainSize :: The maximum size each domain can have. */ -CompositeDomainMD::CompositeDomainMD(IMDWorkspace_const_sptr ws, +CompositeDomainMD::CompositeDomainMD(const IMDWorkspace_const_sptr &ws, size_t maxDomainSize) : m_iterator(ws->createIterator()) { m_totalSize = m_iterator->getDataSize(); - size_t nParts = m_totalSize / maxDomainSize + 1; + + size_t maxDomainSizeDiv = maxDomainSize + 1; + if (maxDomainSizeDiv == 0) { + throw std::runtime_error( + "Attempted to use a maximum domain size that equals 0"); + } + size_t nParts = m_totalSize / maxDomainSizeDiv; + m_domains.resize(nParts); for (size_t i = 0; i < nParts - 1; ++i) { size_t start = i * maxDomainSize; diff --git a/Framework/API/src/CompositeFunction.cpp b/Framework/API/src/CompositeFunction.cpp index 6627c5c0f3e42075d73e5ac2ed8f4d5fc9009b03..39c4976ea00adaa57409e58eb98048ca756b2474 100644 --- a/Framework/API/src/CompositeFunction.cpp +++ b/Framework/API/src/CompositeFunction.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes @@ -19,6 +19,7 @@ #include <boost/lexical_cast.hpp> #include <boost/shared_array.hpp> #include <sstream> +#include <utility> namespace Mantid { namespace API { @@ -468,21 +469,21 @@ void CompositeFunction::removeFunction(size_t i) { * a member of this composite function nothing happens * @param f_new :: A pointer to the new function */ -void CompositeFunction::replaceFunctionPtr(const IFunction_sptr f_old, - IFunction_sptr f_new) { +void CompositeFunction::replaceFunctionPtr(const IFunction_sptr &f_old, + const IFunction_sptr &f_new) { std::vector<IFunction_sptr>::const_iterator it = std::find(m_functions.begin(), m_functions.end(), f_old); if (it == m_functions.end()) return; std::vector<IFunction_sptr>::difference_type iFun = it - m_functions.begin(); - replaceFunction(iFun, f_new); + replaceFunction(iFun, std::move(f_new)); } /** Replace a function with a new one. The old function is deleted. * @param i :: The index of the function to replace * @param f :: A pointer to the new function */ -void CompositeFunction::replaceFunction(size_t i, IFunction_sptr f) { +void CompositeFunction::replaceFunction(size_t i, const IFunction_sptr &f) { if (i >= nFunctions()) { throw std::out_of_range("Function index (" + std::to_string(i) + ") out of range (" + std::to_string(nFunctions()) + diff --git a/Framework/API/src/ConstraintFactory.cpp b/Framework/API/src/ConstraintFactory.cpp index ca4baa4120ca5f79c78cdf72bcb07069b2c6c054..95f9356ab4dc1d50235d3ae197b5198b1620b298 100644 --- a/Framework/API/src/ConstraintFactory.cpp +++ b/Framework/API/src/ConstraintFactory.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/ConstraintFactory.h" #include "MantidAPI/Expression.h" diff --git a/Framework/API/src/CoordTransform.cpp b/Framework/API/src/CoordTransform.cpp index dfbb56337d25dae687e99c1e4d718246cc24ea47..03a9a2e914700250a96eacb096b46ad15444d1e7 100644 --- a/Framework/API/src/CoordTransform.cpp +++ b/Framework/API/src/CoordTransform.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/CoordTransform.h" #include "MantidGeometry/MDGeometry/MDTypes.h" diff --git a/Framework/API/src/CostFunctionFactory.cpp b/Framework/API/src/CostFunctionFactory.cpp index 6b07eef8d2ffcf93716e97d6137481a9b5a7fca3..759e407921be0a0ae2cecc211f005017ad4c8623 100644 --- a/Framework/API/src/CostFunctionFactory.cpp +++ b/Framework/API/src/CostFunctionFactory.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/CostFunctionFactory.h" #include "MantidAPI/ICostFunction.h" diff --git a/Framework/API/src/DataProcessorAlgorithm.cpp b/Framework/API/src/DataProcessorAlgorithm.cpp index 2159988eaf9bd0fab3076a681bba57b843fa8e70..ebd21763b9c7e1e444324b5317e4aff75978a652 100644 --- a/Framework/API/src/DataProcessorAlgorithm.cpp +++ b/Framework/API/src/DataProcessorAlgorithm.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/DataProcessorAlgorithm.h" #include "MantidAPI/AlgorithmManager.h" @@ -19,6 +19,8 @@ #include "MantidKernel/System.h" #include "Poco/Path.h" #include <stdexcept> +#include <utility> + #ifdef MPI_BUILD #include <boost/mpi.hpp> #endif @@ -135,7 +137,7 @@ void GenericDataProcessorAlgorithm<Base>::mapPropertyName( */ template <class Base> void GenericDataProcessorAlgorithm<Base>::copyProperty( - API::Algorithm_sptr alg, const std::string &name) { + const API::Algorithm_sptr &alg, const std::string &name) { if (!alg->existsProperty(name)) { std::stringstream msg; msg << "Algorithm \"" << alg->name() << "\" does not have property \"" @@ -232,7 +234,7 @@ GenericDataProcessorAlgorithm<Base>::loadChunk(const size_t rowIndex) { template <class Base> Workspace_sptr GenericDataProcessorAlgorithm<Base>::assemble(Workspace_sptr partialWS) { - Workspace_sptr outputWS = partialWS; + Workspace_sptr outputWS = std::move(partialWS); #ifdef MPI_BUILD IAlgorithm_sptr gatherAlg = createChildAlgorithm("GatherWorkspaces"); gatherAlg->setLogging(true); diff --git a/Framework/API/src/DeprecatedAlgorithm.cpp b/Framework/API/src/DeprecatedAlgorithm.cpp index 53014cf580a46ea4a6af5046438d9a8aea531696..ca6cfd051a9df2db7b25e762e94ab258b3419118 100644 --- a/Framework/API/src/DeprecatedAlgorithm.cpp +++ b/Framework/API/src/DeprecatedAlgorithm.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/DeprecatedAlgorithm.h" #include "MantidAPI/AlgorithmFactory.h" diff --git a/Framework/API/src/DetectorSearcher.cpp b/Framework/API/src/DetectorSearcher.cpp index 9ffbcb36d0a5010913dc4e0a5f2a37539fc95cf6..cd25bce0e98fc5cc3caa06aef7d12a31c0394379 100644 --- a/Framework/API/src/DetectorSearcher.cpp +++ b/Framework/API/src/DetectorSearcher.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/DetectorSearcher.h" #include "MantidGeometry/Instrument/ReferenceFrame.h" @@ -30,8 +30,9 @@ double getQSign() { * @param instrument :: the instrument to find detectors in * @param detInfo :: the Geometry::DetectorInfo object for this instrument */ -DetectorSearcher::DetectorSearcher(Geometry::Instrument_const_sptr instrument, - const Geometry::DetectorInfo &detInfo) +DetectorSearcher::DetectorSearcher( + const Geometry::Instrument_const_sptr &instrument, + const Geometry::DetectorInfo &detInfo) : m_usingFullRayTrace(instrument->containsRectDetectors() == Geometry::Instrument::ContainsState::Full), m_crystallography_convention(getQSign()), m_detInfo(detInfo), diff --git a/Framework/API/src/DistributedAlgorithm.cpp b/Framework/API/src/DistributedAlgorithm.cpp index 6d0179f6b4f66b6eb761ca3c2c5d45e1ff7707f3..98784997dc1fb47a53138d36071b3dc2cd1d02e6 100644 --- a/Framework/API/src/DistributedAlgorithm.cpp +++ b/Framework/API/src/DistributedAlgorithm.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/DistributedAlgorithm.h" diff --git a/Framework/API/src/DomainCreatorFactory.cpp b/Framework/API/src/DomainCreatorFactory.cpp index 0fa79435fb95d9aea3fd0b0457e32ced937cd249..bcdf324e545e600780d14d1a463c86af36599e94 100644 --- a/Framework/API/src/DomainCreatorFactory.cpp +++ b/Framework/API/src/DomainCreatorFactory.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + // Includes #include "MantidAPI/DomainCreatorFactory.h" diff --git a/Framework/API/src/EnabledWhenWorkspaceIsType.cpp b/Framework/API/src/EnabledWhenWorkspaceIsType.cpp index 8a454d1eadf4667ff485ca1c62a5ad93da10494f..8ef28c14a9a2b22fbe88e911960669a9579eebb2 100644 --- a/Framework/API/src/EnabledWhenWorkspaceIsType.cpp +++ b/Framework/API/src/EnabledWhenWorkspaceIsType.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/EnabledWhenWorkspaceIsType.h" #include "MantidKernel/System.h" diff --git a/Framework/API/src/EqualBinSizesValidator.cpp b/Framework/API/src/EqualBinSizesValidator.cpp index 6f538f035fa803a47edc243b62ade31cb244490c..425081227954b31eab79e757c889ba27e39f7ce2 100644 --- a/Framework/API/src/EqualBinSizesValidator.cpp +++ b/Framework/API/src/EqualBinSizesValidator.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/EqualBinSizesValidator.h" #include "MantidAPI/MatrixWorkspace.h" diff --git a/Framework/API/src/ExperimentInfo.cpp b/Framework/API/src/ExperimentInfo.cpp index d412cecd697d4f9656822047d4fca1a6f3eb3da4..5310526a330bf1496b4808dd2d838595f0fa5f2b 100644 --- a/Framework/API/src/ExperimentInfo.cpp +++ b/Framework/API/src/ExperimentInfo.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/ExperimentInfo.h" #include "MantidAPI/InstrumentDataService.h" @@ -711,7 +711,7 @@ double ExperimentInfo::getEFixed(const detid_t detID) const { * @return The current efixed value */ double ExperimentInfo::getEFixed( - const boost::shared_ptr<const Geometry::IDetector> detector) const { + const boost::shared_ptr<const Geometry::IDetector> &detector) const { populateIfNotLoaded(); Kernel::DeltaEMode::Type emode = getEMode(); if (emode == Kernel::DeltaEMode::Direct) { @@ -944,8 +944,10 @@ std::vector<std::string> ExperimentInfo::getResourceFilenames( std::vector<std::string> pathNames; if (!matchingFiles.empty()) { pathNames.reserve(matchingFiles.size()); - for (auto &elem : matchingFiles) - pathNames.emplace_back(std::move(elem.second)); + + std::transform(matchingFiles.begin(), matchingFiles.end(), + std::back_inserter(pathNames), + [](const auto &elem) { return elem.second; }); } else { pathNames.emplace_back(std::move(mostRecentFile)); } diff --git a/Framework/API/src/Expression.cpp b/Framework/API/src/Expression.cpp index 77daf5ccdc020e02c1dfb3761152e9cdd30cd486..5308ca5283ba369cc646dd73151157d8c03bec93 100644 --- a/Framework/API/src/Expression.cpp +++ b/Framework/API/src/Expression.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include <locale> #include <sstream> @@ -117,8 +117,8 @@ Expression &Expression::operator=(const Expression &expr) { m_funct = expr.m_funct; m_op = expr.m_op; m_terms = expr.m_terms; - // m_expr = expr.m_expr; - // m_tokens = expr.m_tokens; + m_expr = expr.m_expr; + m_tokens = expr.m_tokens; return *this; } diff --git a/Framework/API/src/FileBackedExperimentInfo.cpp b/Framework/API/src/FileBackedExperimentInfo.cpp index f998824d4f36d6a77e879c6da5421fdd607f6e4b..73352c135d4fb0e43d1b1e5c2bd0c98f256f5b14 100644 --- a/Framework/API/src/FileBackedExperimentInfo.cpp +++ b/Framework/API/src/FileBackedExperimentInfo.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/FileBackedExperimentInfo.h" #include "MantidKernel/Logger.h" diff --git a/Framework/API/src/FileFinder.cpp b/Framework/API/src/FileFinder.cpp index d315bd54e50a9e2888563cb188b8887b07edc372..e945313ed0f6f7a3d89b6d0c5094421c25c4da33 100644 --- a/Framework/API/src/FileFinder.cpp +++ b/Framework/API/src/FileFinder.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/API/src/FileLoaderRegistry.cpp b/Framework/API/src/FileLoaderRegistry.cpp index 536a1d7e0b21d4846a40b3ebc051ad65e2a7cc82..ffdd6ceb608bd828d225915d078fee4bff0a46b8 100644 --- a/Framework/API/src/FileLoaderRegistry.cpp +++ b/Framework/API/src/FileLoaderRegistry.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/FileLoaderRegistry.h" #include "MantidAPI/IFileLoader.h" @@ -176,8 +176,6 @@ FileLoaderRegistryImpl::FileLoaderRegistryImpl() : m_names(2, std::multimap<std::string, int>()), m_totalSize(0), m_log("FileLoaderRegistry") {} -/** - */ FileLoaderRegistryImpl::~FileLoaderRegistryImpl() = default; /** diff --git a/Framework/API/src/FileProperty.cpp b/Framework/API/src/FileProperty.cpp index bb358cb596bdfb9c6f1a456aed2c5b6024153028..daec9f27d4f5fc2b3cd723a183c91d17b7a183ff 100644 --- a/Framework/API/src/FileProperty.cpp +++ b/Framework/API/src/FileProperty.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/FileProperty.h" diff --git a/Framework/API/src/FrameworkManager.cpp b/Framework/API/src/FrameworkManager.cpp index f42ff27fa8846a6ab2912e226770b377d81af0a5..99aacd3f6e01ce0139ec570de717d2c6c33e4350 100644 --- a/Framework/API/src/FrameworkManager.cpp +++ b/Framework/API/src/FrameworkManager.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/FrameworkManager.h" #include "MantidAPI/AlgorithmManager.h" diff --git a/Framework/API/src/FuncMinimizerFactory.cpp b/Framework/API/src/FuncMinimizerFactory.cpp index 2a9c4429f03bbde4c0b5da82988dd3a99042eb21..ef87600bf077af8b8b733dd12620bd2bff7d75a5 100644 --- a/Framework/API/src/FuncMinimizerFactory.cpp +++ b/Framework/API/src/FuncMinimizerFactory.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/FuncMinimizerFactory.h" #include "MantidAPI/Expression.h" diff --git a/Framework/API/src/FunctionDomain1D.cpp b/Framework/API/src/FunctionDomain1D.cpp index da38e32776b34fe9364f4a441aa7f3b4703554ba..ed7dd5632834312ff64b8918468d649d6a7e9559 100644 --- a/Framework/API/src/FunctionDomain1D.cpp +++ b/Framework/API/src/FunctionDomain1D.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/API/src/FunctionDomainGeneral.cpp b/Framework/API/src/FunctionDomainGeneral.cpp index e6ce56eeaf5a8e606298eaa0eb17d9c7b6df0eb7..7000ed1580f542480c395fbc9dd9c65dfdd5b42a 100644 --- a/Framework/API/src/FunctionDomainGeneral.cpp +++ b/Framework/API/src/FunctionDomainGeneral.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes @@ -22,7 +22,7 @@ size_t FunctionDomainGeneral::size() const { size_t FunctionDomainGeneral::columnCount() const { return m_columns.size(); } /// Add a new column. All columns must have the same size. -void FunctionDomainGeneral::addColumn(boost::shared_ptr<Column> column) { +void FunctionDomainGeneral::addColumn(const boost::shared_ptr<Column> &column) { if (!column) { throw std::runtime_error( "Cannot add null column to FunctionDomainGeneral."); diff --git a/Framework/API/src/FunctionDomainMD.cpp b/Framework/API/src/FunctionDomainMD.cpp index 092bb5dbafa6caeed1e18f2ab769171ba2514993..51cf298b927935a356f514a04d026627daa0e297 100644 --- a/Framework/API/src/FunctionDomainMD.cpp +++ b/Framework/API/src/FunctionDomainMD.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes @@ -21,8 +21,8 @@ namespace API { * @param start :: Index of the first iterator in this domain. * @param length :: Size of this domain. If 0 use all workspace. */ -FunctionDomainMD::FunctionDomainMD(IMDWorkspace_const_sptr ws, size_t start, - size_t length) +FunctionDomainMD::FunctionDomainMD(const IMDWorkspace_const_sptr &ws, + size_t start, size_t length) : m_iterator(ws->createIterator()), m_startIndex(start), m_currentIndex(0), m_justReset(true), m_workspace(ws) { size_t dataSize = m_iterator->getDataSize(); diff --git a/Framework/API/src/FunctionFactory.cpp b/Framework/API/src/FunctionFactory.cpp index 5696c33753429a37cf597010fc14393f26fcd083..9ada8ccf36c5515052cacfa808779f896a212dad 100644 --- a/Framework/API/src/FunctionFactory.cpp +++ b/Framework/API/src/FunctionFactory.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/FunctionFactory.h" #include "MantidAPI/AnalysisDataService.h" @@ -271,7 +271,7 @@ void FunctionFactoryImpl::inputError(const std::string &str) const { * separated by commas ',' * and enclosed in brackets "(...)" . */ -void FunctionFactoryImpl::addConstraints(IFunction_sptr fun, +void FunctionFactoryImpl::addConstraints(const IFunction_sptr &fun, const Expression &expr) const { if (expr.name() == ",") { for (auto it = expr.begin(); it != expr.end(); ++it) { @@ -305,7 +305,7 @@ void FunctionFactoryImpl::addConstraints(IFunction_sptr fun, * @param fun :: The function * @param expr :: The constraint expression. */ -void FunctionFactoryImpl::addConstraint(boost::shared_ptr<IFunction> fun, +void FunctionFactoryImpl::addConstraint(const boost::shared_ptr<IFunction> &fun, const Expression &expr) const { auto c = std::unique_ptr<IConstraint>( ConstraintFactory::Instance().createInitialized(fun.get(), expr)); @@ -319,7 +319,7 @@ void FunctionFactoryImpl::addConstraint(boost::shared_ptr<IFunction> fun, * @param constraint_expr :: The constraint expression. * @param penalty_expr :: The penalty expression. */ -void FunctionFactoryImpl::addConstraint(boost::shared_ptr<IFunction> fun, +void FunctionFactoryImpl::addConstraint(const boost::shared_ptr<IFunction> &fun, const Expression &constraint_expr, const Expression &penalty_expr) const { auto c = std::unique_ptr<IConstraint>( @@ -335,7 +335,7 @@ void FunctionFactoryImpl::addConstraint(boost::shared_ptr<IFunction> fun, * @param expr :: The tie expression: either parName = TieString or a list * of name = string pairs */ -void FunctionFactoryImpl::addTies(IFunction_sptr fun, +void FunctionFactoryImpl::addTies(const IFunction_sptr &fun, const Expression &expr) const { if (expr.name() == "=") { addTie(fun, expr); @@ -350,7 +350,7 @@ void FunctionFactoryImpl::addTies(IFunction_sptr fun, * @param fun :: The function * @param expr :: The tie expression: parName = TieString */ -void FunctionFactoryImpl::addTie(IFunction_sptr fun, +void FunctionFactoryImpl::addTie(const IFunction_sptr &fun, const Expression &expr) const { if (expr.size() > 1) { // if size > 2 it is interpreted as setting a tie (last // expr.term) to multiple parameters, e.g diff --git a/Framework/API/src/FunctionGenerator.cpp b/Framework/API/src/FunctionGenerator.cpp index 60e3a653cb94f210769ce9167301dca8b50ba029..a5b08fe53618f43f57d0f0b94922293fb9be7704 100644 --- a/Framework/API/src/FunctionGenerator.cpp +++ b/Framework/API/src/FunctionGenerator.cpp @@ -1,9 +1,11 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + +#include <utility> + #include "MantidAPI/FunctionGenerator.h" #include "MantidAPI/IConstraint.h" #include "MantidAPI/ParameterTie.h" @@ -14,7 +16,7 @@ namespace API { using namespace Kernel; /// Constructor -FunctionGenerator::FunctionGenerator(IFunction_sptr source) +FunctionGenerator::FunctionGenerator(const IFunction_sptr &source) : m_source(source), m_dirty(true) { if (source) { m_nOwnParams = source->nParams(); @@ -27,7 +29,7 @@ void FunctionGenerator::init() {} /// Set the source function /// @param source :: New source function. void FunctionGenerator::setSource(IFunction_sptr source) const { - m_source = source; + m_source = std::move(source); } /// Set i-th parameter diff --git a/Framework/API/src/FunctionParameterDecorator.cpp b/Framework/API/src/FunctionParameterDecorator.cpp index 23ce79db37d4648ec37d76fd372775d2ec1b5699..4536972ec4cca9cdb64d6ab414ec643b18e5d223 100644 --- a/Framework/API/src/FunctionParameterDecorator.cpp +++ b/Framework/API/src/FunctionParameterDecorator.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/FunctionParameterDecorator.h" #include "MantidAPI/CompositeFunction.h" diff --git a/Framework/API/src/FunctionProperty.cpp b/Framework/API/src/FunctionProperty.cpp index 61d05fdd4a15e526cba6ea621c0709050fc32c81..0361affab150113c804956aee5b6e20927886cad 100644 --- a/Framework/API/src/FunctionProperty.cpp +++ b/Framework/API/src/FunctionProperty.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/FunctionProperty.h" #include "MantidAPI/FunctionFactory.h" diff --git a/Framework/API/src/FunctionValues.cpp b/Framework/API/src/FunctionValues.cpp index bc04e9c7607dd06d68671198c87e6ddd83bade81..725ad50df830f9da85f381dc252f1aca6cdfebad 100644 --- a/Framework/API/src/FunctionValues.cpp +++ b/Framework/API/src/FunctionValues.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/API/src/GridDomain.cpp b/Framework/API/src/GridDomain.cpp index 073e87ee5adc335e333553a3cc06d3fa572ca547..ea3f8454176e1b6e24de3ca8f2ebad287ef5398e 100644 --- a/Framework/API/src/GridDomain.cpp +++ b/Framework/API/src/GridDomain.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/API/src/GridDomain1D.cpp b/Framework/API/src/GridDomain1D.cpp index 4853ccdfb0dafd32d1a254cb0bb62af5a4cfdcde..3f076e75acaccff830558fb19ce019053d38c821 100644 --- a/Framework/API/src/GridDomain1D.cpp +++ b/Framework/API/src/GridDomain1D.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes @@ -17,7 +17,7 @@ namespace Mantid { namespace API { void GridDomain1D::initialize(double &startX, double &endX, size_t &n, - const std::string scaling) { + const std::string &scaling) { m_points.resize(n); m_points.front() = startX; m_points.back() = endX; diff --git a/Framework/API/src/GroupingLoader.cpp b/Framework/API/src/GroupingLoader.cpp index 25ccefb8bd968f53706a9bfaec2f921587b49075..d34c9b75864d048ac16a798dc72555797326c83a 100644 --- a/Framework/API/src/GroupingLoader.cpp +++ b/Framework/API/src/GroupingLoader.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/GroupingLoader.h" #include "MantidAPI/ITableWorkspace.h" @@ -16,6 +16,7 @@ #include <Poco/DOM/Document.h> #include <Poco/DOM/NodeList.h> #include <boost/make_shared.hpp> +#include <utility> using namespace Poco::XML; @@ -27,7 +28,7 @@ namespace API { * @param instrument :: [input] Instrument */ GroupingLoader::GroupingLoader(Geometry::Instrument_const_sptr instrument) - : m_instrument(instrument) {} + : m_instrument(std::move(instrument)) {} /** Constructor with field direction * @param instrument :: [input] Instrument @@ -35,7 +36,8 @@ GroupingLoader::GroupingLoader(Geometry::Instrument_const_sptr instrument) */ GroupingLoader::GroupingLoader(Geometry::Instrument_const_sptr instrument, const std::string &mainFieldDirection) - : m_instrument(instrument), m_mainFieldDirection(mainFieldDirection) {} + : m_instrument(std::move(instrument)), + m_mainFieldDirection(mainFieldDirection) {} //---------------------------------------------------------------------------------------------- /** Destructor @@ -248,7 +250,7 @@ boost::shared_ptr<Grouping> GroupingLoader::getDummyGrouping() { * Construct a Grouping from a table * @param table :: [input] Table to construct from */ -Grouping::Grouping(ITableWorkspace_sptr table) { +Grouping::Grouping(const ITableWorkspace_sptr &table) { for (size_t row = 0; row < table->rowCount(); ++row) { std::vector<int> detectors = table->cell<std::vector<int>>(row, 0); diff --git a/Framework/API/src/HistoWorkspace.cpp b/Framework/API/src/HistoWorkspace.cpp index 77d1347ccef81caddc8b5f8a6e2fa4243463fe58..be1bc11bb6a9eecb709b2c0cd555d8b74ab07e9f 100644 --- a/Framework/API/src/HistoWorkspace.cpp +++ b/Framework/API/src/HistoWorkspace.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/HistoWorkspace.h" diff --git a/Framework/API/src/HistogramValidator.cpp b/Framework/API/src/HistogramValidator.cpp index 7ae37c2eea25d93d2e0e9056757d4e635fc511f1..efacbac3c2ce0cb2c19797397609c22516f07b4f 100644 --- a/Framework/API/src/HistogramValidator.cpp +++ b/Framework/API/src/HistogramValidator.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/HistogramValidator.h" #include "MantidAPI/MatrixWorkspace.h" diff --git a/Framework/API/src/HistoryItem.cpp b/Framework/API/src/HistoryItem.cpp index f01aed96818c6a94622936709834d095b1661d2e..34208d196c36e70196457d07265f97fc87015613 100644 --- a/Framework/API/src/HistoryItem.cpp +++ b/Framework/API/src/HistoryItem.cpp @@ -1,19 +1,21 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes //---------------------------------------------------------------------- +#include <utility> + #include "MantidAPI/HistoryItem.h" namespace Mantid { namespace API { HistoryItem::HistoryItem(AlgorithmHistory_const_sptr algHist) - : m_algorithmHistory(algHist), m_unrolled(false) {} + : m_algorithmHistory(std::move(algHist)), m_unrolled(false) {} } // namespace API } // namespace Mantid diff --git a/Framework/API/src/HistoryView.cpp b/Framework/API/src/HistoryView.cpp index e3a66b60f0826f65ae2b0412d6d81cb6c262c1d6..818cff625f06baed069d93dae44b412924f67a36 100644 --- a/Framework/API/src/HistoryView.cpp +++ b/Framework/API/src/HistoryView.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/API/src/IDomainCreator.cpp b/Framework/API/src/IDomainCreator.cpp index 57c7396e26f1c04a0899cf877b836b93ada48801..5634237e05a6df0a808e7ebf08a9187a3bf9e749 100644 --- a/Framework/API/src/IDomainCreator.cpp +++ b/Framework/API/src/IDomainCreator.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/API/src/IEventList.cpp b/Framework/API/src/IEventList.cpp index fbf907cc6f5f534e884c4c23857f3d247f961280..cc9422db692a92345fe31c03e5714d42b34fc6ac 100644 --- a/Framework/API/src/IEventList.cpp +++ b/Framework/API/src/IEventList.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/IEventList.h" #include "MantidKernel/System.h" diff --git a/Framework/API/src/IEventWorkspace.cpp b/Framework/API/src/IEventWorkspace.cpp index 5c2e83c9907e0ba38a0d001cc8aa05c9e75fdff1..9564fc75dc300ece04f0217de1b692ed488a8cfc 100644 --- a/Framework/API/src/IEventWorkspace.cpp +++ b/Framework/API/src/IEventWorkspace.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/IEventWorkspace.h" #include "MantidKernel/IPropertyManager.h" @@ -11,8 +11,6 @@ namespace Mantid { namespace API { -/** - */ const std::string IEventWorkspace::toString() const { std::ostringstream os; os << MatrixWorkspace::toString() << "\n"; diff --git a/Framework/API/src/IFuncMinimizer.cpp b/Framework/API/src/IFuncMinimizer.cpp index 17acc42a280613f12dc67ac269064ca792de1275..989fe1fd64b97da549759934cffff3516467e64e 100644 --- a/Framework/API/src/IFuncMinimizer.cpp +++ b/Framework/API/src/IFuncMinimizer.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/API/src/IFunction.cpp b/Framework/API/src/IFunction.cpp index 422f6e35ba76ece04a7d23e68c6cac646eea89dc..887b5dd17896885fcabad0bf52c40aa99abc9d43 100644 --- a/Framework/API/src/IFunction.cpp +++ b/Framework/API/src/IFunction.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/IFunction.h" #include "MantidAPI/Axis.h" @@ -38,6 +38,7 @@ #include <algorithm> #include <limits> #include <sstream> +#include <utility> namespace Mantid { namespace API { @@ -87,7 +88,7 @@ boost::shared_ptr<IFunction> IFunction::clone() const { */ void IFunction::setProgressReporter( boost::shared_ptr<Kernel::ProgressBase> reporter) { - m_progReporter = reporter; + m_progReporter = std::move(reporter); m_progReporter->setNotifyStep(0.01); } @@ -558,10 +559,11 @@ std::vector<std::string> IFunction::getParameterNames() const { * @param handler :: A new handler */ void IFunction::setHandler(std::unique_ptr<FunctionHandler> handler) { - m_handler = std::move(handler); if (handler && handler->function().get() != this) { throw std::runtime_error("Function handler points to a different function"); } + + m_handler = std::move(handler); m_handler->init(); } @@ -1241,9 +1243,10 @@ void IFunction::setMatrixWorkspace( * @param wsIndex :: workspace index * @return converted value */ -double IFunction::convertValue(double value, Kernel::Unit_sptr &outUnit, - boost::shared_ptr<const MatrixWorkspace> ws, - size_t wsIndex) const { +double +IFunction::convertValue(double value, Kernel::Unit_sptr &outUnit, + const boost::shared_ptr<const MatrixWorkspace> &ws, + size_t wsIndex) const { // only required if formula or look-up-table different from ws unit const auto &wsUnit = ws->getAxis(0)->unit(); if (outUnit->unitID() == wsUnit->unitID()) @@ -1271,7 +1274,7 @@ double IFunction::convertValue(double value, Kernel::Unit_sptr &outUnit, */ void IFunction::convertValue(std::vector<double> &values, Kernel::Unit_sptr &outUnit, - boost::shared_ptr<const MatrixWorkspace> ws, + const boost::shared_ptr<const MatrixWorkspace> &ws, size_t wsIndex) const { // only required if formula or look-up-table different from ws unit const auto &wsUnit = ws->getAxis(0)->unit(); @@ -1361,9 +1364,10 @@ IFunction_sptr IFunction::getFunction(std::size_t) const { std::vector<std::string> IFunction::getAttributeNames() const { std::vector<std::string> names; names.reserve(m_attrs.size()); - for (const auto &attr : m_attrs) { - names.emplace_back(attr.first); - } + + std::transform(m_attrs.begin(), m_attrs.end(), std::back_inserter(names), + [](const auto &attr) { return attr.first; }); + return names; } @@ -1447,7 +1451,7 @@ void IFunction::storeReadOnlyAttribute( * @param covar :: A matrix to set. */ void IFunction::setCovarianceMatrix( - boost::shared_ptr<Kernel::Matrix<double>> covar) { + const boost::shared_ptr<Kernel::Matrix<double>> &covar) { // the matrix shouldn't be empty if (!covar) { throw std::invalid_argument( diff --git a/Framework/API/src/IFunction1D.cpp b/Framework/API/src/IFunction1D.cpp index 28a1c967f062eadec456c84e1c106768696991fd..27e686585cf5c01158da96eb2ae7bf51d1cb7f47 100644 --- a/Framework/API/src/IFunction1D.cpp +++ b/Framework/API/src/IFunction1D.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/API/src/IFunction1DSpectrum.cpp b/Framework/API/src/IFunction1DSpectrum.cpp index 25358d902443a8de8c5d0821ef4f6f8c3031feba..086796ccb985132553e3adc17a9a37e677b99ca8 100644 --- a/Framework/API/src/IFunction1DSpectrum.cpp +++ b/Framework/API/src/IFunction1DSpectrum.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/IFunction1DSpectrum.h" diff --git a/Framework/API/src/IFunctionGeneral.cpp b/Framework/API/src/IFunctionGeneral.cpp index 65d4f93994a37deebc18a3b0291d8f309b3130b4..6920051433f90bb048c55650ce22473cf757037b 100644 --- a/Framework/API/src/IFunctionGeneral.cpp +++ b/Framework/API/src/IFunctionGeneral.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/IFunctionGeneral.h" diff --git a/Framework/API/src/IFunctionMD.cpp b/Framework/API/src/IFunctionMD.cpp index 69b8cd2fdaf703669eeacd806868557115b9d2a3..bdd893d8c82c5c31010359ac0910b1820fb473a4 100644 --- a/Framework/API/src/IFunctionMD.cpp +++ b/Framework/API/src/IFunctionMD.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/API/src/IFunctionMW.cpp b/Framework/API/src/IFunctionMW.cpp index e7a5d50c27232a80896172547ef6b7334984275e..1aa30fa291fbafe3b682c8b877b5577b9a8c0aea 100644 --- a/Framework/API/src/IFunctionMW.cpp +++ b/Framework/API/src/IFunctionMW.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/API/src/ILatticeFunction.cpp b/Framework/API/src/ILatticeFunction.cpp index dee57018665c67de8cc8065f08e3f0c483e9e981..19fcd97cee4ac1fb798a37d4305e7a485b08760a 100644 --- a/Framework/API/src/ILatticeFunction.cpp +++ b/Framework/API/src/ILatticeFunction.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/ILatticeFunction.h" diff --git a/Framework/API/src/IMDEventWorkspace.cpp b/Framework/API/src/IMDEventWorkspace.cpp index 50730567c9494009c5768e5bd1baca2e98a8601f..8b553feb4bda25b69206d7c2e9c3501fc2f3e3dc 100644 --- a/Framework/API/src/IMDEventWorkspace.cpp +++ b/Framework/API/src/IMDEventWorkspace.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/IMDEventWorkspace.h" #include "MantidAPI/ExperimentInfo.h" diff --git a/Framework/API/src/IMDHistoWorkspace.cpp b/Framework/API/src/IMDHistoWorkspace.cpp index 336b16aee1fbdf3e85fb1ae2d537528e4690d640..d683d7eac2a8dc34c5611f837bdb58455b66a8af 100644 --- a/Framework/API/src/IMDHistoWorkspace.cpp +++ b/Framework/API/src/IMDHistoWorkspace.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/IMDHistoWorkspace.h" #include "MantidAPI/ExperimentInfo.h" diff --git a/Framework/API/src/IMDIterator.cpp b/Framework/API/src/IMDIterator.cpp index fd7c28db876dadcb94796d05f8cc84e18cea76a8..870c410e7a2147741b5fdafdedb264a79c3b1e9d 100644 --- a/Framework/API/src/IMDIterator.cpp +++ b/Framework/API/src/IMDIterator.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/API/src/IMDWorkspace.cpp b/Framework/API/src/IMDWorkspace.cpp index 10f38bf13e560010e83054376d1e331a90f7f327..4e84206a2f8bab302f14d857b61751c1cfc0a740 100644 --- a/Framework/API/src/IMDWorkspace.cpp +++ b/Framework/API/src/IMDWorkspace.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/IMDWorkspace.h" #include "MantidGeometry/MDGeometry/IMDDimension.h" @@ -12,6 +12,7 @@ #include "MantidKernel/VMD.h" #include <sstream> +#include <utility> using Mantid::Kernel::VMD; @@ -53,7 +54,7 @@ std::string IMDWorkspace::getConvention() const { return m_convention; } /** @return the convention */ void IMDWorkspace::setConvention(std::string convention) { - m_convention = convention; + m_convention = std::move(convention); } //--------------------------------------------------------------------------------------------- @@ -96,8 +97,6 @@ signal_t IMDWorkspace::getSignalWithMaskAtVMD( //----------------------------------------------------------------------------------------------- -/** - */ const std::string IMDWorkspace::toString() const { std::ostringstream os; os << id() << "\n" diff --git a/Framework/API/src/IPawleyFunction.cpp b/Framework/API/src/IPawleyFunction.cpp index ab531d92e6573a33ae6fc3dc5c06c4092bf7bab8..2e268c25a68708c1278d9ce503759eec0ad9c60e 100644 --- a/Framework/API/src/IPawleyFunction.cpp +++ b/Framework/API/src/IPawleyFunction.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/IPawleyFunction.h" diff --git a/Framework/API/src/IPeakFunction.cpp b/Framework/API/src/IPeakFunction.cpp index 7643d7e719a9282cdf8f1bc03db9f2529a61f2a0..d6b5ea2fd4c4b9ea443eaecf21786fa50b28f68c 100644 --- a/Framework/API/src/IPeakFunction.cpp +++ b/Framework/API/src/IPeakFunction.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/API/src/IPeaksWorkspace.cpp b/Framework/API/src/IPeaksWorkspace.cpp index 0cb23455141a94c0a6a056bc80b88fad062a9f81..f66337ca5780a4f1d1b5e881fb1d257a201bb6c2 100644 --- a/Framework/API/src/IPeaksWorkspace.cpp +++ b/Framework/API/src/IPeaksWorkspace.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/API/src/IPowderDiffPeakFunction.cpp b/Framework/API/src/IPowderDiffPeakFunction.cpp index 18e2bc1e36e9e8dfc6ba279000014eb011e4bf45..7d5150f0366807a1a00ee1c5129d0dcda04f7236 100644 --- a/Framework/API/src/IPowderDiffPeakFunction.cpp +++ b/Framework/API/src/IPowderDiffPeakFunction.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/API/src/ISpectrum.cpp b/Framework/API/src/ISpectrum.cpp index b405059a7d14c937b3ebf362a783a1fa0ebb3cf8..da2fbb117b9c93616e92305724bc84ed6fe6ed53 100644 --- a/Framework/API/src/ISpectrum.cpp +++ b/Framework/API/src/ISpectrum.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/ISpectrum.h" #include "MantidAPI/MatrixWorkspace.h" diff --git a/Framework/API/src/ITableWorkspace.cpp b/Framework/API/src/ITableWorkspace.cpp index 2b46293b0726a4f06b1a0f339faec2f1a10ad566..ac2c00836511adbf9d7713111088ae9b60e3a31f 100644 --- a/Framework/API/src/ITableWorkspace.cpp +++ b/Framework/API/src/ITableWorkspace.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/ITableWorkspace.h" #include "MantidAPI/AnalysisDataService.h" diff --git a/Framework/API/src/ImmutableCompositeFunction.cpp b/Framework/API/src/ImmutableCompositeFunction.cpp index 4231d6af8d0b29cff51d15e88b909c383bcb5cd5..3447643bad45d064cfe6b477a6bbbcb89eedf7e7 100644 --- a/Framework/API/src/ImmutableCompositeFunction.cpp +++ b/Framework/API/src/ImmutableCompositeFunction.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/API/src/ImplicitFunctionFactory.cpp b/Framework/API/src/ImplicitFunctionFactory.cpp index 9c8b7690739628d21b98699e8a1fe8bf82929942..60d53d61b1543bea522b0ab261c9e4f83d1337d1 100644 --- a/Framework/API/src/ImplicitFunctionFactory.cpp +++ b/Framework/API/src/ImplicitFunctionFactory.cpp @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #include "MantidAPI/ImplicitFunctionFactory.h" #include <Poco/DOM/DOMParser.h> #include <Poco/DOM/Document.h> diff --git a/Framework/API/src/ImplicitFunctionParameterParserFactory.cpp b/Framework/API/src/ImplicitFunctionParameterParserFactory.cpp index 2457a57909c76d7040b17d48d9c67fe4c2701e36..739aeab741254b42d5d7cae2f004633b9d65d82c 100644 --- a/Framework/API/src/ImplicitFunctionParameterParserFactory.cpp +++ b/Framework/API/src/ImplicitFunctionParameterParserFactory.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/ImplicitFunctionParameterParserFactory.h" diff --git a/Framework/API/src/ImplicitFunctionParserFactory.cpp b/Framework/API/src/ImplicitFunctionParserFactory.cpp index f136072e0098ff059d8f3cd022e1f7964b4814c8..fe6ebe711bcf2b4c91500f0cdc59b6c0caf36abc 100644 --- a/Framework/API/src/ImplicitFunctionParserFactory.cpp +++ b/Framework/API/src/ImplicitFunctionParserFactory.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/ImplicitFunctionParserFactory.h" diff --git a/Framework/API/src/IncreasingAxisValidator.cpp b/Framework/API/src/IncreasingAxisValidator.cpp index 3b9ff0e01333734e88b12c75180cc27818f77525..66e91566f7c8de9406c70df7c8f0c220975ea5a0 100644 --- a/Framework/API/src/IncreasingAxisValidator.cpp +++ b/Framework/API/src/IncreasingAxisValidator.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/IncreasingAxisValidator.h" #include "MantidAPI/Axis.h" diff --git a/Framework/API/src/IndexProperty.cpp b/Framework/API/src/IndexProperty.cpp index 5122c97bd36c923a7da0d2babf29a05b45f0144e..9ea0c194546d58b1beba0c1e5d4b7cd06feb5616 100644 --- a/Framework/API/src/IndexProperty.cpp +++ b/Framework/API/src/IndexProperty.cpp @@ -1,9 +1,11 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + +#include <utility> + #include "MantidAPI/IndexProperty.h" #include "MantidAPI/MatrixWorkspace.h" #include "MantidIndexing/GlobalSpectrumIndex.h" @@ -16,9 +18,10 @@ namespace API { IndexProperty::IndexProperty(const std::string &name, const IWorkspaceProperty &workspaceProp, const IndexTypeProperty &indexTypeProp, - Kernel::IValidator_sptr validator) - : ArrayProperty(name, "", validator), m_workspaceProp(workspaceProp), - m_indexTypeProp(indexTypeProp), m_indices(0), m_indicesExtracted(false) {} + const Kernel::IValidator_sptr &validator) + : ArrayProperty(name, "", std::move(validator)), + m_workspaceProp(workspaceProp), m_indexTypeProp(indexTypeProp), + m_indices(0), m_indicesExtracted(false) {} IndexProperty *IndexProperty::clone() const { return new IndexProperty(*this); } diff --git a/Framework/API/src/IndexTypeProperty.cpp b/Framework/API/src/IndexTypeProperty.cpp index e7ea66cae7f1b170a239fcfe0518ead82fd67271..eefd975fcfdcb96148ced4ed409015c3f3934df1 100644 --- a/Framework/API/src/IndexTypeProperty.cpp +++ b/Framework/API/src/IndexTypeProperty.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/IndexTypeProperty.h" diff --git a/Framework/API/src/InstrumentDataService.cpp b/Framework/API/src/InstrumentDataService.cpp index b37f3dcfe95b0b52ff746f6d44a76d90f6d473f4..a12f24f5864a3c8ac620cd5d9b0e4da14d7bc345 100644 --- a/Framework/API/src/InstrumentDataService.cpp +++ b/Framework/API/src/InstrumentDataService.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/InstrumentDataService.h" diff --git a/Framework/API/src/InstrumentValidator.cpp b/Framework/API/src/InstrumentValidator.cpp index dcecadd8237dfac62759589048f034005a62f3d6..227efc5faefde7e0975e739f590e410e188602e7 100644 --- a/Framework/API/src/InstrumentValidator.cpp +++ b/Framework/API/src/InstrumentValidator.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/InstrumentValidator.h" #include "MantidAPI/ExperimentInfo.h" diff --git a/Framework/API/src/JointDomain.cpp b/Framework/API/src/JointDomain.cpp index aabebc4433e19de8f141defca6fe9a915b1e80e9..f6b6490db31bf4bc277be1cfea7b35ce73b5591b 100644 --- a/Framework/API/src/JointDomain.cpp +++ b/Framework/API/src/JointDomain.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes @@ -33,7 +33,7 @@ const FunctionDomain &JointDomain::getDomain(size_t i) const { * Add a new domain. * @param domain :: A shared pointer to a domain. */ -void JointDomain::addDomain(FunctionDomain_sptr domain) { +void JointDomain::addDomain(const FunctionDomain_sptr &domain) { m_domains.emplace_back(domain); } diff --git a/Framework/API/src/LatticeDomain.cpp b/Framework/API/src/LatticeDomain.cpp index 57f6ca113d0250d874d2d550d11201be81fa4490..e7fad9437aa485c711cb9946bb380d2cf7c271dd 100644 --- a/Framework/API/src/LatticeDomain.cpp +++ b/Framework/API/src/LatticeDomain.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/LatticeDomain.h" #include "MantidKernel/Exception.h" diff --git a/Framework/API/src/LinearScale.cpp b/Framework/API/src/LinearScale.cpp index 22c2593e7e8a5033e38cac499648514487fa751e..8e10145a49f14d6883728bdc8cbfb783ee7b2c0d 100644 --- a/Framework/API/src/LinearScale.cpp +++ b/Framework/API/src/LinearScale.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/API/src/LiveListener.cpp b/Framework/API/src/LiveListener.cpp index ed5d33310ab79fbdce175e39989ec3903f3f5479..af0f3bcc8c3f411320b97d74c7db1cecedb396ca 100644 --- a/Framework/API/src/LiveListener.cpp +++ b/Framework/API/src/LiveListener.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/LiveListener.h" #include "MantidAPI/IAlgorithm.h" diff --git a/Framework/API/src/LiveListenerFactory.cpp b/Framework/API/src/LiveListenerFactory.cpp index 9e65fc6a824bbba1ccc01322369753e46414ba86..76ebd55585d8b8d5afcc97585de81659c82eda5f 100644 --- a/Framework/API/src/LiveListenerFactory.cpp +++ b/Framework/API/src/LiveListenerFactory.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/LiveListenerFactory.h" #include "MantidKernel/ConfigService.h" diff --git a/Framework/API/src/LogFilterGenerator.cpp b/Framework/API/src/LogFilterGenerator.cpp index 30bb262486bc3fce5da81792f1b17261e4fe2ef0..adcc184589e286d07da8e637ef05191f70103a38 100644 --- a/Framework/API/src/LogFilterGenerator.cpp +++ b/Framework/API/src/LogFilterGenerator.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/LogFilterGenerator.h" #include "MantidAPI/MatrixWorkspace.h" diff --git a/Framework/API/src/LogManager.cpp b/Framework/API/src/LogManager.cpp index 877c09f82a9177f22c7ce5edd40678dbd1f64116..4f6b9d41c5d6e3b56e608c6ebe57b7305b09bd47 100644 --- a/Framework/API/src/LogManager.cpp +++ b/Framework/API/src/LogManager.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/LogManager.h" #include "MantidKernel/Cache.h" diff --git a/Framework/API/src/LogarithmScale.cpp b/Framework/API/src/LogarithmScale.cpp index 58dc853082db39666f57c2fc3eea0077d3641325..74a79a0f99201cb3e341754eb2ed6d634d0a372a 100644 --- a/Framework/API/src/LogarithmScale.cpp +++ b/Framework/API/src/LogarithmScale.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/API/src/MDFrameValidator.cpp b/Framework/API/src/MDFrameValidator.cpp index e80d0e6f442ed1b2137bcb0d40a22a1f412d90c7..b9b7d83d6c1ec18ffbda2cf3354860c53684c321 100644 --- a/Framework/API/src/MDFrameValidator.cpp +++ b/Framework/API/src/MDFrameValidator.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/MDFrameValidator.h" #include "MantidKernel/IValidator.h" diff --git a/Framework/API/src/MDGeometry.cpp b/Framework/API/src/MDGeometry.cpp index 1e4a2b33e3e148319d92853d7ad92804ec506010..08de2f9e6dd324482c192b15656bfacf38f9cdd7 100644 --- a/Framework/API/src/MDGeometry.cpp +++ b/Framework/API/src/MDGeometry.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/MDGeometry.h" #include "MantidAPI/AnalysisDataService.h" @@ -14,6 +14,7 @@ #include <Poco/NObserver.h> #include <boost/make_shared.hpp> +#include <utility> using namespace Mantid::Kernel; using namespace Mantid::API; @@ -244,7 +245,7 @@ size_t MDGeometry::getDimensionIndexById(const std::string &id) const { /** Add a dimension * @param dim :: shared pointer to the dimension object */ void MDGeometry::addDimension( - boost::shared_ptr<Mantid::Geometry::IMDDimension> dim) { + const boost::shared_ptr<Mantid::Geometry::IMDDimension> &dim) { m_dimensions.emplace_back(dim); } @@ -382,7 +383,7 @@ void MDGeometry::setOriginalWorkspace(boost::shared_ptr<Workspace> ws, size_t index) { if (index >= m_originalWorkspaces.size()) m_originalWorkspaces.resize(index + 1); - m_originalWorkspaces[index] = ws; + m_originalWorkspaces[index] = std::move(ws); m_notificationHelper->watchForWorkspaceDeletions(); } diff --git a/Framework/API/src/MatrixWorkspace.cpp b/Framework/API/src/MatrixWorkspace.cpp index ee93b3f49351d5ae80e0a582d42c39e653397225..931023650ac4fefae7823f772d9242242ac184e0 100644 --- a/Framework/API/src/MatrixWorkspace.cpp +++ b/Framework/API/src/MatrixWorkspace.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/MatrixWorkspace.h" #include "MantidAPI/Algorithm.h" @@ -1237,9 +1237,10 @@ MatrixWorkspace::maskedBinsIndices(const size_t &workspaceIndex) const { auto maskedBins = it->second; std::vector<size_t> maskedIds; maskedIds.reserve(maskedBins.size()); - for (const auto &mb : maskedBins) { - maskedIds.emplace_back(mb.first); - } + + std::transform(maskedBins.begin(), maskedBins.end(), + std::back_inserter(maskedIds), + [](const auto &mb) { return mb.first; }); return maskedIds; } @@ -1939,7 +1940,6 @@ MatrixWorkspace::findY(double value, if (std::isnan(value)) { for (int64_t i = idx.first; i < numHists; ++i) { const auto &Y = this->y(i); - // cppcheck-suppress syntaxError if (auto it = std::find_if(std::next(Y.begin(), idx.second), Y.end(), [](double v) { return std::isnan(v); }); it != Y.end()) { diff --git a/Framework/API/src/MatrixWorkspaceMDIterator.cpp b/Framework/API/src/MatrixWorkspaceMDIterator.cpp index e3a7c3a1e16df23e95798c3b45870575fd18718d..5ce1b86f4792911f3913293b0492392bf4bc6194 100644 --- a/Framework/API/src/MatrixWorkspaceMDIterator.cpp +++ b/Framework/API/src/MatrixWorkspaceMDIterator.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/MatrixWorkspaceMDIterator.h" #include "MantidAPI/MatrixWorkspace.h" diff --git a/Framework/API/src/MuParserUtils.cpp b/Framework/API/src/MuParserUtils.cpp index 75d5b0bd2ec4a04cd9aee4a5e451e0e2484341f5..17de2099235f54daf7d4e6f915744ad491121cd7 100644 --- a/Framework/API/src/MuParserUtils.cpp +++ b/Framework/API/src/MuParserUtils.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/MuParserUtils.h" diff --git a/Framework/API/src/MultiDomainFunction.cpp b/Framework/API/src/MultiDomainFunction.cpp index 94d3275930404cc4df4ebaba4f932367280a70b5..4525fe84cf01143aa08ed3cfdcbe2f0c7e8d38c9 100644 --- a/Framework/API/src/MultiDomainFunction.cpp +++ b/Framework/API/src/MultiDomainFunction.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/API/src/MultiPeriodGroupAlgorithm.cpp b/Framework/API/src/MultiPeriodGroupAlgorithm.cpp index 05aea59376dc4b37e0d45342e122a37ae4bf431a..f419a33ab59f4567a491dd253fcd77fdf6704c39 100644 --- a/Framework/API/src/MultiPeriodGroupAlgorithm.cpp +++ b/Framework/API/src/MultiPeriodGroupAlgorithm.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/MultiPeriodGroupAlgorithm.h" #include "MantidAPI/AlgorithmManager.h" diff --git a/Framework/API/src/MultiPeriodGroupWorker.cpp b/Framework/API/src/MultiPeriodGroupWorker.cpp index 367f58ae4d763790967ba092e3229e0e36095026..19e2b1ba6e4cbfd3196b0b34d68dcc45e283acac 100644 --- a/Framework/API/src/MultiPeriodGroupWorker.cpp +++ b/Framework/API/src/MultiPeriodGroupWorker.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/MultiPeriodGroupWorker.h" #include "MantidAPI/AlgorithmManager.h" @@ -36,7 +36,7 @@ MultiPeriodGroupWorker::MultiPeriodGroupWorker( * @param vecWorkspaceGroups: Vector of non-multi period workspace groups. */ void MultiPeriodGroupWorker::tryAddInputWorkspaceToInputGroups( - Workspace_sptr ws, + const Workspace_sptr &ws, MultiPeriodGroupWorker::VecWSGroupType &vecMultiPeriodWorkspaceGroups, MultiPeriodGroupWorker::VecWSGroupType &vecWorkspaceGroups) const { WorkspaceGroup_sptr inputGroup = diff --git a/Framework/API/src/MultipleExperimentInfos.cpp b/Framework/API/src/MultipleExperimentInfos.cpp index d9f5ba25593db5da1f90d6f903208a3ad58b9c6f..7433e6efa12965ef5f8f4c9059fcf3a5f22db27e 100644 --- a/Framework/API/src/MultipleExperimentInfos.cpp +++ b/Framework/API/src/MultipleExperimentInfos.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/MultipleExperimentInfos.h" #include "MantidAPI/ExperimentInfo.h" @@ -11,6 +11,7 @@ #include <boost/make_shared.hpp> #include <sstream> +#include <utility> using namespace Mantid::Kernel; using namespace Mantid::API; @@ -62,7 +63,8 @@ MultipleExperimentInfos::getExperimentInfo(const uint16_t runIndex) const { * @return the runIndex at which it was added * @throw std::runtime_error if you reach the limit of 65536 entries. */ -uint16_t MultipleExperimentInfos::addExperimentInfo(ExperimentInfo_sptr ei) { +uint16_t +MultipleExperimentInfos::addExperimentInfo(const ExperimentInfo_sptr &ei) { m_expInfos.emplace_back(ei); if (m_expInfos.size() >= static_cast<size_t>(std::numeric_limits<uint16_t>::max())) @@ -82,7 +84,7 @@ void MultipleExperimentInfos::setExperimentInfo(const uint16_t runIndex, if (size_t(runIndex) >= m_expInfos.size()) throw std::invalid_argument( "MDEventWorkspace::setExperimentInfo(): runIndex is out of range."); - m_expInfos[runIndex] = ei; + m_expInfos[runIndex] = std::move(ei); } //----------------------------------------------------------------------------------------------- diff --git a/Framework/API/src/MultipleFileProperty.cpp b/Framework/API/src/MultipleFileProperty.cpp index 753bd7f8c1f2fc348bb7a65c059825af95f77afb..6b5d45a75316fd8cf79c86e8453cdea0ab1e1803 100644 --- a/Framework/API/src/MultipleFileProperty.cpp +++ b/Framework/API/src/MultipleFileProperty.cpp @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #include "MantidAPI/MultipleFileProperty.h" #include "MantidAPI/FileFinder.h" #include "MantidAPI/FileProperty.h" diff --git a/Framework/API/src/NotebookBuilder.cpp b/Framework/API/src/NotebookBuilder.cpp index 5041e7554bad90bf9fc55615cca0164cbdbebc2f..e3f2bcc48ddd6a6ccef2a1834f235bc54c08ac5e 100644 --- a/Framework/API/src/NotebookBuilder.cpp +++ b/Framework/API/src/NotebookBuilder.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes @@ -14,6 +14,7 @@ #include "MantidKernel/Property.h" #include <boost/utility.hpp> +#include <utility> namespace Mantid { namespace API { @@ -25,10 +26,10 @@ namespace { Mantid::Kernel::Logger g_log("NotebookBuilder"); } -NotebookBuilder::NotebookBuilder(boost::shared_ptr<HistoryView> view, +NotebookBuilder::NotebookBuilder(const boost::shared_ptr<HistoryView> &view, std::string versionSpecificity) : m_historyItems(view->getAlgorithmsList()), m_output(), - m_versionSpecificity(versionSpecificity), + m_versionSpecificity(std::move(versionSpecificity)), m_nb_writer(new NotebookWriter()) {} /** @@ -39,9 +40,9 @@ NotebookBuilder::NotebookBuilder(boost::shared_ptr<HistoryView> view, * @param ws_comment :: workspace comment * @return a formatted ipython notebook string of the history */ -const std::string NotebookBuilder::build(std::string ws_name, - std::string ws_title, - std::string ws_comment) { +const std::string NotebookBuilder::build(const std::string &ws_name, + const std::string &ws_title, + const std::string &ws_comment) { // record workspace details in notebook std::string workspace_details; workspace_details = "Workspace History: " + ws_name + "\n"; @@ -109,8 +110,8 @@ void NotebookBuilder::buildChildren( * @param algHistory :: pointer to an algorithm history object * @returns std::string to run this algorithm */ -const std::string -NotebookBuilder::buildAlgorithmString(AlgorithmHistory_const_sptr algHistory) { +const std::string NotebookBuilder::buildAlgorithmString( + const AlgorithmHistory_const_sptr &algHistory) { std::ostringstream properties; const std::string name = algHistory->name(); std::string prop; @@ -159,8 +160,8 @@ NotebookBuilder::buildAlgorithmString(AlgorithmHistory_const_sptr algHistory) { * @param propHistory :: reference to a property history object * @returns std::string for this property */ -const std::string -NotebookBuilder::buildPropertyString(PropertyHistory_const_sptr propHistory) { +const std::string NotebookBuilder::buildPropertyString( + const PropertyHistory_const_sptr &propHistory) { using Mantid::Kernel::Direction; // Create a vector of all non workspace property type names diff --git a/Framework/API/src/NotebookWriter.cpp b/Framework/API/src/NotebookWriter.cpp index 22534473854c4b1baa669a2bff1be614b195e231..25d7e80de99609a6ab251a631dd0a8077906199e 100644 --- a/Framework/API/src/NotebookWriter.cpp +++ b/Framework/API/src/NotebookWriter.cpp @@ -1,9 +1,11 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + +#include <utility> + #include "MantidAPI/NotebookWriter.h" #include "MantidKernel/Logger.h" #include "MantidKernel/MantidVersion.h" @@ -34,7 +36,7 @@ void NotebookWriter::codeCell(Json::Value array_code) { cell_data["cell_type"] = "code"; cell_data["collapsed"] = false; - cell_data["input"] = array_code; + cell_data["input"] = std::move(array_code); cell_data["language"] = "python"; cell_data["metadata"] = empty; cell_data["outputs"] = Json::Value(Json::arrayValue); @@ -47,7 +49,7 @@ void NotebookWriter::codeCell(Json::Value array_code) { * * @param string_code :: string containing the python for the code cell */ -std::string NotebookWriter::codeCell(std::string string_code) { +std::string NotebookWriter::codeCell(const std::string &string_code) { Json::Value cell_data; const Json::Value empty = Json::Value(Json::ValueType::objectValue); @@ -77,7 +79,7 @@ void NotebookWriter::markdownCell(Json::Value string_array) { cell_data["cell_type"] = "markdown"; cell_data["metadata"] = empty; - cell_data["source"] = string_array; + cell_data["source"] = std::move(string_array); m_cell_buffer.append(cell_data); } @@ -87,7 +89,7 @@ void NotebookWriter::markdownCell(Json::Value string_array) { * * @param string_text :: string containing the python code for the code cell */ -std::string NotebookWriter::markdownCell(std::string string_text) { +std::string NotebookWriter::markdownCell(const std::string &string_text) { Json::Value cell_data; const Json::Value empty = Json::Value(Json::ValueType::objectValue); diff --git a/Framework/API/src/NullCoordTransform.cpp b/Framework/API/src/NullCoordTransform.cpp index 649546df381139ea9b59c4ddf45e2ce6e2209f60..73e90b9d4903a5d4aae1e3ee36ac14dfa3f36df3 100644 --- a/Framework/API/src/NullCoordTransform.cpp +++ b/Framework/API/src/NullCoordTransform.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/NullCoordTransform.h" #include "MantidAPI/CoordTransform.h" diff --git a/Framework/API/src/NumericAxis.cpp b/Framework/API/src/NumericAxis.cpp index 0feda2a7fda30a4871774a740317c80753c79dae..2eb1dba369e7d7eb03cd224f178bdc14c617e31a 100644 --- a/Framework/API/src/NumericAxis.cpp +++ b/Framework/API/src/NumericAxis.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/API/src/NumericAxisValidator.cpp b/Framework/API/src/NumericAxisValidator.cpp index c22d2c78cb46cf93e1d440ce30ae824520a5acc3..c5f5c8648ad1a01f05db1daa3c0333438934aed8 100644 --- a/Framework/API/src/NumericAxisValidator.cpp +++ b/Framework/API/src/NumericAxisValidator.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/NumericAxisValidator.h" #include "MantidAPI/Axis.h" diff --git a/Framework/API/src/OrientedLatticeValidator.cpp b/Framework/API/src/OrientedLatticeValidator.cpp index 5aaa1b09056886bd3bcfd63db7559c8b5ef4e47a..6cea4f1cae8d84ae62f987d04fbd664a8777c411 100644 --- a/Framework/API/src/OrientedLatticeValidator.cpp +++ b/Framework/API/src/OrientedLatticeValidator.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/OrientedLatticeValidator.h" #include "MantidAPI/ExperimentInfo.h" diff --git a/Framework/API/src/ParallelAlgorithm.cpp b/Framework/API/src/ParallelAlgorithm.cpp index 3db66ab0e6aa8023b8f635b35cdc87ec450f04c2..4fbd179249c141e67e7dfd466e0b2286abf0bc6e 100644 --- a/Framework/API/src/ParallelAlgorithm.cpp +++ b/Framework/API/src/ParallelAlgorithm.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/ParallelAlgorithm.h" diff --git a/Framework/API/src/ParamFunction.cpp b/Framework/API/src/ParamFunction.cpp index 3939fb7d05ecf87c37e3628bc01a016574d7e52d..66b2b282edab56dc13d64b68a5df86d1a99562b2 100644 --- a/Framework/API/src/ParamFunction.cpp +++ b/Framework/API/src/ParamFunction.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes @@ -150,7 +150,7 @@ double ParamFunction::getParameter(const std::string &name) const { */ bool ParamFunction::hasParameter(const std::string &name) const { return std::find(m_parameterNames.cbegin(), m_parameterNames.cend(), name) != - m_parameterNames.end(); + m_parameterNames.cend(); } /** diff --git a/Framework/API/src/ParameterReference.cpp b/Framework/API/src/ParameterReference.cpp index 7f25ba5986cc422872229650a81005cce0592135..907d4060f2b61daab942fe245f7000972ec14a9a 100644 --- a/Framework/API/src/ParameterReference.cpp +++ b/Framework/API/src/ParameterReference.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/ParameterReference.h" #include "MantidAPI/CompositeFunction.h" diff --git a/Framework/API/src/ParameterTie.cpp b/Framework/API/src/ParameterTie.cpp index 705264c0170cf759cf59b0a7cb3799590faa5b68..a3ae0083301c80f15270d9edd7d041937ddc9a3c 100644 --- a/Framework/API/src/ParameterTie.cpp +++ b/Framework/API/src/ParameterTie.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/ParameterTie.h" #include "MantidAPI/CompositeFunction.h" @@ -202,9 +202,8 @@ bool ParameterTie::isConstant() const { return m_varMap.empty(); } std::vector<ParameterReference> ParameterTie::getRHSParameters() const { std::vector<ParameterReference> out; out.reserve(m_varMap.size()); - for (auto &&varPair : m_varMap) { - out.emplace_back(varPair.second); - } + std::transform(m_varMap.begin(), m_varMap.end(), std::back_inserter(out), + [](auto &&varPair) { return varPair.second; }); return out; } diff --git a/Framework/API/src/PeakFunctionIntegrator.cpp b/Framework/API/src/PeakFunctionIntegrator.cpp index c56c42f1f97e23689df25a51d57ca626a8d69d5d..246024ed41ec3b56ddfcc305283aab5cb9fe5cd3 100644 --- a/Framework/API/src/PeakFunctionIntegrator.cpp +++ b/Framework/API/src/PeakFunctionIntegrator.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/PeakFunctionIntegrator.h" diff --git a/Framework/API/src/Progress.cpp b/Framework/API/src/Progress.cpp index 0f98d6f089b34345e2b0c819c89013ed688fbecc..85fc9e82fe4ff6a9dcaaf742a8082538b4071a5e 100644 --- a/Framework/API/src/Progress.cpp +++ b/Framework/API/src/Progress.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/API/src/Projection.cpp b/Framework/API/src/Projection.cpp index 48058b758433bf4cd8c75234917eaf57482b8ab0..4f341eb1cc6c4a1049dbb40fe80e189d70de61c9 100644 --- a/Framework/API/src/Projection.cpp +++ b/Framework/API/src/Projection.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/Projection.h" #include "MantidAPI/ITableWorkspace.h" diff --git a/Framework/API/src/PropertyWithValue.cpp b/Framework/API/src/PropertyWithValue.cpp index 2f2761b11385144a241a32e0bbf3b21b11995d1f..72b5a8702535d051fbcf9bc7396b083d850ad151 100644 --- a/Framework/API/src/PropertyWithValue.cpp +++ b/Framework/API/src/PropertyWithValue.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/PropertyWithValue.h" #include "MantidAPI/DllConfig.h" diff --git a/Framework/API/src/RawCountValidator.cpp b/Framework/API/src/RawCountValidator.cpp index fb29cf771112537c3430df55fbb251e6818a059b..c469e425965b79b47d41fb9f07b6ee3ad82d8317 100644 --- a/Framework/API/src/RawCountValidator.cpp +++ b/Framework/API/src/RawCountValidator.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/RawCountValidator.h" #include "MantidAPI/MatrixWorkspace.h" diff --git a/Framework/API/src/RefAxis.cpp b/Framework/API/src/RefAxis.cpp index 72ad4e0c4ead2983e76cde10132488a0cc63965a..cb8b24012055db6f9bec1cf181624ebdf98b8c12 100644 --- a/Framework/API/src/RefAxis.cpp +++ b/Framework/API/src/RefAxis.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/RefAxis.h" #include "MantidAPI/MatrixWorkspace.h" diff --git a/Framework/API/src/RemoteJobManagerFactory.cpp b/Framework/API/src/RemoteJobManagerFactory.cpp index ea224f13a5e1cdb91cfeb17893b5d8d4091e237b..1231e13dde9fb50d64bb5c2bbff418c128f850c2 100644 --- a/Framework/API/src/RemoteJobManagerFactory.cpp +++ b/Framework/API/src/RemoteJobManagerFactory.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/RemoteJobManagerFactory.h" #include "MantidKernel/ConfigService.h" @@ -65,8 +65,8 @@ IRemoteJobManager_sptr RemoteJobManagerFactoryImpl::create( * the type (for example the type is not recognized). */ Mantid::API::IRemoteJobManager_sptr -RemoteJobManagerFactoryImpl::create(const std::string baseURL, - const std::string jobManagerType) const { +RemoteJobManagerFactoryImpl::create(const std::string &baseURL, + const std::string &jobManagerType) const { Mantid::API::IRemoteJobManager_sptr jm; // use the inherited/generic create method diff --git a/Framework/API/src/ResizeRectangularDetectorHelper.cpp b/Framework/API/src/ResizeRectangularDetectorHelper.cpp index bbb89465a9d4c5aafa103d18b847259ab11029e1..9b658bb5fa228ab305c78b247946c6aee83aca44 100644 --- a/Framework/API/src/ResizeRectangularDetectorHelper.cpp +++ b/Framework/API/src/ResizeRectangularDetectorHelper.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/ResizeRectangularDetectorHelper.h" #include "MantidGeometry/IComponent.h" diff --git a/Framework/API/src/Run.cpp b/Framework/API/src/Run.cpp index 908d4a8eed7098a15e7a10f9eca9aa6c0f0bc2bd..f178c78c5eaf7df021bfa2fd66c6071e1201068a 100644 --- a/Framework/API/src/Run.cpp +++ b/Framework/API/src/Run.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/Run.h" #include "MantidGeometry/Instrument/Goniometer.h" diff --git a/Framework/API/src/Sample.cpp b/Framework/API/src/Sample.cpp index 472507f8265479d7cc13448902a755b9a20acdf0..b26a1a04bafcfe80d37d1636cde7ddfa7e3900b1 100644 --- a/Framework/API/src/Sample.cpp +++ b/Framework/API/src/Sample.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/Sample.h" #include "MantidGeometry/Crystal/CrystalStructure.h" @@ -284,7 +284,7 @@ std::size_t Sample::size() const { return m_samples.size() + 1; } * Adds a sample to the sample collection * @param childSample The child sample to be added */ -void Sample::addSample(boost::shared_ptr<Sample> childSample) { +void Sample::addSample(const boost::shared_ptr<Sample> &childSample) { m_samples.emplace_back(childSample); } diff --git a/Framework/API/src/SampleShapeValidator.cpp b/Framework/API/src/SampleShapeValidator.cpp index 6a40c13e492a86445a185f6a4f773b76ea938cbd..80c8e63f0dbd2bfa94d5e01054b131797797f010 100644 --- a/Framework/API/src/SampleShapeValidator.cpp +++ b/Framework/API/src/SampleShapeValidator.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/SampleShapeValidator.h" #include "MantidAPI/Sample.h" diff --git a/Framework/API/src/SampleValidator.cpp b/Framework/API/src/SampleValidator.cpp index 460e5d1c3e4de3aae8f0030d0ee9a3184df3a56f..d6987b42553b0c53cc1e8a9b16e4ec2c29aef288 100644 --- a/Framework/API/src/SampleValidator.cpp +++ b/Framework/API/src/SampleValidator.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/SampleValidator.h" #include "MantidAPI/MatrixWorkspace.h" diff --git a/Framework/API/src/ScopedWorkspace.cpp b/Framework/API/src/ScopedWorkspace.cpp index 5425d73b8c81d7d7717a1cebf31964b349fddf43..58a5085d27558f07c3e26bf369f540fc6d972e87 100644 --- a/Framework/API/src/ScopedWorkspace.cpp +++ b/Framework/API/src/ScopedWorkspace.cpp @@ -1,11 +1,13 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + -#include "MantidAPI/ScopedWorkspace.h" +#include <utility> + #include "MantidAPI/AnalysisDataService.h" +#include "MantidAPI/ScopedWorkspace.h" #include "MantidAPI/WorkspaceGroup.h" namespace Mantid { @@ -22,9 +24,9 @@ ScopedWorkspace::ScopedWorkspace() : m_name(generateUniqueName()) {} /** * Workspace constructor */ -ScopedWorkspace::ScopedWorkspace(Workspace_sptr ws) +ScopedWorkspace::ScopedWorkspace(const Workspace_sptr &ws) : m_name(generateUniqueName()) { - set(ws); + set(std::move(ws)); } //---------------------------------------------------------------------------------------------- @@ -77,7 +79,7 @@ void ScopedWorkspace::remove() { /** * Make ADS entry to point to the given workspace. */ -void ScopedWorkspace::set(Workspace_sptr newWS) { +void ScopedWorkspace::set(const Workspace_sptr &newWS) { AnalysisDataServiceImpl &ads = AnalysisDataService::Instance(); if (!newWS->getName().empty() && ads.doesExist(newWS->getName())) diff --git a/Framework/API/src/ScriptBuilder.cpp b/Framework/API/src/ScriptBuilder.cpp index ac35142143e554a7560402e7e7b53ae8c7da3db8..07d800bebdf57a329d6e3adc186deee14d2cc080 100644 --- a/Framework/API/src/ScriptBuilder.cpp +++ b/Framework/API/src/ScriptBuilder.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes @@ -22,6 +22,7 @@ #include <boost/range/algorithm/remove_if.hpp> #include <boost/utility.hpp> #include <set> +#include <utility> namespace Mantid { namespace API { @@ -36,14 +37,15 @@ Mantid::Kernel::Logger g_log("ScriptBuilder"); const std::string COMMENT_ALG = "Comment"; ScriptBuilder::ScriptBuilder( - boost::shared_ptr<HistoryView> view, std::string versionSpecificity, + const boost::shared_ptr<HistoryView> &view, std::string versionSpecificity, bool appendTimestamp, std::vector<std::string> ignoreTheseAlgs, std::vector<std::vector<std::string>> ignoreTheseAlgProperties, bool appendExecCount) : m_historyItems(view->getAlgorithmsList()), m_output(), - m_versionSpecificity(versionSpecificity), - m_timestampCommands(appendTimestamp), m_algsToIgnore(ignoreTheseAlgs), - m_propertiesToIgnore(ignoreTheseAlgProperties), + m_versionSpecificity(std::move(versionSpecificity)), + m_timestampCommands(appendTimestamp), + m_algsToIgnore(std::move(ignoreTheseAlgs)), + m_propertiesToIgnore(std::move(ignoreTheseAlgProperties)), m_execCount(appendExecCount) {} /** diff --git a/Framework/API/src/ScriptRepository.cpp b/Framework/API/src/ScriptRepository.cpp index bea3073c7e9b691d48d659829091ab49c57a8a77..70ed3a339be270a3202a65ea123d4acacf729656 100644 --- a/Framework/API/src/ScriptRepository.cpp +++ b/Framework/API/src/ScriptRepository.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/ScriptRepository.h" #ifdef _WIN32 diff --git a/Framework/API/src/ScriptRepositoryFactory.cpp b/Framework/API/src/ScriptRepositoryFactory.cpp index 2b4f0cf57c9fcb78f12a4daee4f925b61bb7f2d2..30ea83c652e009b5a4485ab8da65c5389b139532 100644 --- a/Framework/API/src/ScriptRepositoryFactory.cpp +++ b/Framework/API/src/ScriptRepositoryFactory.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/ScriptRepositoryFactory.h" #include "MantidAPI/ScriptRepository.h" diff --git a/Framework/API/src/SerialAlgorithm.cpp b/Framework/API/src/SerialAlgorithm.cpp index 78e97950c8065321f01501613c0b4868031148b0..a02de259b2cd6372f5fb3c126dc0a7ef9dfd3d8f 100644 --- a/Framework/API/src/SerialAlgorithm.cpp +++ b/Framework/API/src/SerialAlgorithm.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/SerialAlgorithm.h" diff --git a/Framework/API/src/SingleCountValidator.cpp b/Framework/API/src/SingleCountValidator.cpp index a0c932a51268d328f5ea177de66240f1202d11fe..4ad764ce1625384d693600e1b297ab010c8ca56a 100644 --- a/Framework/API/src/SingleCountValidator.cpp +++ b/Framework/API/src/SingleCountValidator.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/SingleCountValidator.h" diff --git a/Framework/API/src/SpectraAxis.cpp b/Framework/API/src/SpectraAxis.cpp index e42ac09184be49c6271082cb741faba902433334..ec3383e0c8b7fd8c80e8db5e625a5dbaf68eb219 100644 --- a/Framework/API/src/SpectraAxis.cpp +++ b/Framework/API/src/SpectraAxis.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/API/src/SpectraAxisValidator.cpp b/Framework/API/src/SpectraAxisValidator.cpp index 11f5e31f975e1fa6e3bb7166e53bf1d0a8ad9088..b13a02c2596ff5c6aa825066b3d0436f68781892 100644 --- a/Framework/API/src/SpectraAxisValidator.cpp +++ b/Framework/API/src/SpectraAxisValidator.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/SpectraAxisValidator.h" #include "MantidAPI/Axis.h" diff --git a/Framework/API/src/SpectrumDetectorMapping.cpp b/Framework/API/src/SpectrumDetectorMapping.cpp index 9aa13acee4919810f68d0ce3c12b55e5b1d2577c..c05ed206e8dba917df65d38bf14327ece602e6f1 100644 --- a/Framework/API/src/SpectrumDetectorMapping.cpp +++ b/Framework/API/src/SpectrumDetectorMapping.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/SpectrumDetectorMapping.h" #include "MantidAPI/MatrixWorkspace.h" @@ -15,7 +15,7 @@ namespace API { * @throws std::invalid_argument if a null workspace pointer is passed in */ SpectrumDetectorMapping::SpectrumDetectorMapping( - MatrixWorkspace_const_sptr workspace, const bool useSpecNoIndex) + const MatrixWorkspace_const_sptr &workspace, const bool useSpecNoIndex) : m_indexIsSpecNo(useSpecNoIndex) { if (!workspace) { throw std::invalid_argument( diff --git a/Framework/API/src/SpectrumInfo.cpp b/Framework/API/src/SpectrumInfo.cpp index 1f341da38fdc6bf356cb8d5084cce080762f8025..8ca2b71c33da18fb765e09ccc5607c3225e4369b 100644 --- a/Framework/API/src/SpectrumInfo.cpp +++ b/Framework/API/src/SpectrumInfo.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/SpectrumInfo.h" #include "MantidAPI/ExperimentInfo.h" @@ -33,6 +33,10 @@ SpectrumInfo::~SpectrumInfo() = default; /// Returns the size of the SpectrumInfo, i.e., the number of spectra. size_t SpectrumInfo::size() const { return m_spectrumInfo.size(); } +size_t SpectrumInfo::detectorCount() const { + return m_spectrumInfo.detectorCount(); +} + /// Returns a const reference to the SpectrumDefinition of the spectrum. const SpectrumDefinition & SpectrumInfo::spectrumDefinition(const size_t index) const { diff --git a/Framework/API/src/TableRow.cpp b/Framework/API/src/TableRow.cpp index 72d5b7afb07c1202b2b57b18e03e999d6829b209..c484a38e8cf572e3755164f1f5202e2fa4f83718 100644 --- a/Framework/API/src/TableRow.cpp +++ b/Framework/API/src/TableRow.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/TableRow.h" #include "MantidAPI/ITableWorkspace.h" diff --git a/Framework/API/src/TextAxis.cpp b/Framework/API/src/TextAxis.cpp index bc0d1b4e3c68a1fac78e20ce34fcb31febc1b563..c9823c556337827a461085ef9d63d3b449f0809b 100644 --- a/Framework/API/src/TextAxis.cpp +++ b/Framework/API/src/TextAxis.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/API/src/TransformScaleFactory.cpp b/Framework/API/src/TransformScaleFactory.cpp index 7fd43359652b50046e144beb7ac68ac517b81b3f..f06af10267de7ae3899b742b10932867cadbb408 100644 --- a/Framework/API/src/TransformScaleFactory.cpp +++ b/Framework/API/src/TransformScaleFactory.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/TransformScaleFactory.h" #include "MantidAPI/ITransformScale.h" diff --git a/Framework/API/src/Workspace.cpp b/Framework/API/src/Workspace.cpp index e4ded0c07a2b919d0c29f5b044f18f8735f56d68..3d6740c646341afa319ec21d7f0e28957496ea0f 100644 --- a/Framework/API/src/Workspace.cpp +++ b/Framework/API/src/Workspace.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/Workspace.h" #include "MantidAPI/WorkspaceHistory.h" diff --git a/Framework/API/src/WorkspaceFactory.cpp b/Framework/API/src/WorkspaceFactory.cpp index 07f1e365a18210146225918fca3612374d1721b5..8e0b52a244eb4d9eec5f7d2f5b47cd3a83c5cd09 100644 --- a/Framework/API/src/WorkspaceFactory.cpp +++ b/Framework/API/src/WorkspaceFactory.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/WorkspaceFactory.h" #include "MantidAPI/BinEdgeAxis.h" diff --git a/Framework/API/src/WorkspaceGroup.cpp b/Framework/API/src/WorkspaceGroup.cpp index 00a5985ab1bc2c779fbb537c17c06399511cad82..3db1116e68bca7aec5af9a50d1b96f8ba1c448c0 100644 --- a/Framework/API/src/WorkspaceGroup.cpp +++ b/Framework/API/src/WorkspaceGroup.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/WorkspaceGroup.h" #include "MantidAPI/AnalysisDataService.h" @@ -191,9 +191,11 @@ std::vector<std::string> WorkspaceGroup::getNames() const { std::vector<std::string> out; std::lock_guard<std::recursive_mutex> _lock(m_mutex); out.reserve(m_workspaces.size()); - for (const auto &workspace : m_workspaces) { - out.emplace_back(workspace->getName()); - } + + std::transform(m_workspaces.begin(), m_workspaces.end(), + std::back_inserter(out), + [](const auto &ws) { return ws->getName(); }); + return out; } diff --git a/Framework/API/src/WorkspaceHasDxValidator.cpp b/Framework/API/src/WorkspaceHasDxValidator.cpp index e2a061d80f875584556cc932edab206b7a379d58..966f02ab8ef5d6982600790f9dae2be8615b3638 100644 --- a/Framework/API/src/WorkspaceHasDxValidator.cpp +++ b/Framework/API/src/WorkspaceHasDxValidator.cpp @@ -1,3 +1,9 @@ +// Mantid Repository : https://github.com/mantidproject/mantid +// +// Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS +// SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/WorkspaceHasDxValidator.h" namespace Mantid { diff --git a/Framework/API/src/WorkspaceHistory.cpp b/Framework/API/src/WorkspaceHistory.cpp index 064d5569cda4b33d836e1643916f620d95e8a4e2..dfa12b0cafccbc78c015afeb0b69a69e6521b93c 100644 --- a/Framework/API/src/WorkspaceHistory.cpp +++ b/Framework/API/src/WorkspaceHistory.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/WorkspaceHistory.h" #include "MantidAPI/Algorithm.h" @@ -317,7 +317,7 @@ void WorkspaceHistory::loadNexus(::NeXus::File *file) { * the workspace history. */ void WorkspaceHistory::loadNestedHistory(::NeXus::File *file, - AlgorithmHistory_sptr parent) { + const AlgorithmHistory_sptr &parent) { // historyNumbers should be sorted by number std::set<int> historyNumbers = findHistoryEntries(file); for (auto historyNumber : historyNumbers) { diff --git a/Framework/API/src/WorkspaceNearestNeighbourInfo.cpp b/Framework/API/src/WorkspaceNearestNeighbourInfo.cpp index 8a4f6fc9e0fa78ed7ee8239126be36918b319b1d..333243c923ccac1b1b2a22bd95492695c2cbe72f 100644 --- a/Framework/API/src/WorkspaceNearestNeighbourInfo.cpp +++ b/Framework/API/src/WorkspaceNearestNeighbourInfo.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/WorkspaceNearestNeighbourInfo.h" #include "MantidAPI/MatrixWorkspace.h" diff --git a/Framework/API/src/WorkspaceNearestNeighbours.cpp b/Framework/API/src/WorkspaceNearestNeighbours.cpp index 0702342dc39591b740ebfa36378ba1543fb70035..4297d659d189f8659ef38fb02fd8fc2b762cb744 100644 --- a/Framework/API/src/WorkspaceNearestNeighbours.cpp +++ b/Framework/API/src/WorkspaceNearestNeighbours.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/WorkspaceNearestNeighbours.h" #include "MantidAPI/SpectrumInfo.h" diff --git a/Framework/API/src/WorkspaceOpOverloads.cpp b/Framework/API/src/WorkspaceOpOverloads.cpp index 337635f4d25f039f21d1d1fba22a44ff5addea03..e640abf0cdde4500de7899c1d26178be7d609411 100644 --- a/Framework/API/src/WorkspaceOpOverloads.cpp +++ b/Framework/API/src/WorkspaceOpOverloads.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/WorkspaceOpOverloads.h" #include "MantidAPI/Algorithm.h" @@ -141,7 +141,7 @@ template MANTID_API_DLL IMDHistoWorkspace_sptr executeBinaryOperation( * @param tolerance :: acceptable difference for floating point numbers * @return bool, true if workspaces match */ -bool equals(const MatrixWorkspace_sptr lhs, const MatrixWorkspace_sptr rhs, +bool equals(const MatrixWorkspace_sptr &lhs, const MatrixWorkspace_sptr &rhs, double tolerance) { IAlgorithm_sptr alg = AlgorithmManager::Instance().createUnmanaged("CompareWorkspaces"); @@ -180,8 +180,8 @@ using OperatorOverloads::executeBinaryOperation; * @param rhs :: right hand side workspace shared pointer * @return The result in a workspace shared pointer */ -MatrixWorkspace_sptr operator+(const MatrixWorkspace_sptr lhs, - const MatrixWorkspace_sptr rhs) { +MatrixWorkspace_sptr operator+(const MatrixWorkspace_sptr &lhs, + const MatrixWorkspace_sptr &rhs) { return executeBinaryOperation<MatrixWorkspace_sptr, MatrixWorkspace_sptr, MatrixWorkspace_sptr>("Plus", lhs, rhs); } @@ -191,7 +191,7 @@ MatrixWorkspace_sptr operator+(const MatrixWorkspace_sptr lhs, * @param rhsValue :: the single value * @return The result in a workspace shared pointer */ -MatrixWorkspace_sptr operator+(const MatrixWorkspace_sptr lhs, +MatrixWorkspace_sptr operator+(const MatrixWorkspace_sptr &lhs, const double &rhsValue) { return executeBinaryOperation<MatrixWorkspace_sptr, MatrixWorkspace_sptr, MatrixWorkspace_sptr>( @@ -203,8 +203,8 @@ MatrixWorkspace_sptr operator+(const MatrixWorkspace_sptr lhs, * @param rhs :: right hand side workspace shared pointer * @return The result in a workspace shared pointer */ -MatrixWorkspace_sptr operator-(const MatrixWorkspace_sptr lhs, - const MatrixWorkspace_sptr rhs) { +MatrixWorkspace_sptr operator-(const MatrixWorkspace_sptr &lhs, + const MatrixWorkspace_sptr &rhs) { return executeBinaryOperation<MatrixWorkspace_sptr, MatrixWorkspace_sptr, MatrixWorkspace_sptr>("Minus", lhs, rhs); } @@ -214,7 +214,7 @@ MatrixWorkspace_sptr operator-(const MatrixWorkspace_sptr lhs, * @param rhsValue :: the single value * @return The result in a workspace shared pointer */ -MatrixWorkspace_sptr operator-(const MatrixWorkspace_sptr lhs, +MatrixWorkspace_sptr operator-(const MatrixWorkspace_sptr &lhs, const double &rhsValue) { return executeBinaryOperation<MatrixWorkspace_sptr, MatrixWorkspace_sptr, MatrixWorkspace_sptr>( @@ -227,7 +227,7 @@ MatrixWorkspace_sptr operator-(const MatrixWorkspace_sptr lhs, * @return The result in a workspace shared pointer */ MatrixWorkspace_sptr operator-(const double &lhsValue, - const MatrixWorkspace_sptr rhs) { + const MatrixWorkspace_sptr &rhs) { return executeBinaryOperation<MatrixWorkspace_sptr, MatrixWorkspace_sptr, MatrixWorkspace_sptr>( "Minus", createWorkspaceSingleValue(lhsValue), rhs); @@ -237,8 +237,8 @@ MatrixWorkspace_sptr operator-(const double &lhsValue, * @param rhs :: right hand side workspace shared pointer * @return The result in a workspace shared pointer */ -MatrixWorkspace_sptr operator*(const MatrixWorkspace_sptr lhs, - const MatrixWorkspace_sptr rhs) { +MatrixWorkspace_sptr operator*(const MatrixWorkspace_sptr &lhs, + const MatrixWorkspace_sptr &rhs) { return executeBinaryOperation<MatrixWorkspace_sptr, MatrixWorkspace_sptr, MatrixWorkspace_sptr>("Multiply", lhs, rhs); } @@ -248,7 +248,7 @@ MatrixWorkspace_sptr operator*(const MatrixWorkspace_sptr lhs, * @param rhsValue :: the single value * @return The result in a workspace shared pointer */ -MatrixWorkspace_sptr operator*(const MatrixWorkspace_sptr lhs, +MatrixWorkspace_sptr operator*(const MatrixWorkspace_sptr &lhs, const double &rhsValue) { return executeBinaryOperation<MatrixWorkspace_sptr, MatrixWorkspace_sptr, MatrixWorkspace_sptr>( @@ -262,7 +262,7 @@ MatrixWorkspace_sptr operator*(const MatrixWorkspace_sptr lhs, * @return The result in a workspace shared pointer */ MatrixWorkspace_sptr operator*(const double &lhsValue, - const MatrixWorkspace_sptr rhs) { + const MatrixWorkspace_sptr &rhs) { return executeBinaryOperation<MatrixWorkspace_sptr, MatrixWorkspace_sptr, MatrixWorkspace_sptr>( "Multiply", createWorkspaceSingleValue(lhsValue), rhs); @@ -273,8 +273,8 @@ MatrixWorkspace_sptr operator*(const double &lhsValue, * @param rhs :: right hand side workspace shared pointer * @return The result in a workspace shared pointer */ -MatrixWorkspace_sptr operator/(const MatrixWorkspace_sptr lhs, - const MatrixWorkspace_sptr rhs) { +MatrixWorkspace_sptr operator/(const MatrixWorkspace_sptr &lhs, + const MatrixWorkspace_sptr &rhs) { return executeBinaryOperation<MatrixWorkspace_sptr, MatrixWorkspace_sptr, MatrixWorkspace_sptr>("Divide", lhs, rhs); } @@ -284,7 +284,7 @@ MatrixWorkspace_sptr operator/(const MatrixWorkspace_sptr lhs, * @param rhsValue :: the single value * @return The result in a workspace shared pointer */ -MatrixWorkspace_sptr operator/(const MatrixWorkspace_sptr lhs, +MatrixWorkspace_sptr operator/(const MatrixWorkspace_sptr &lhs, const double &rhsValue) { return executeBinaryOperation<MatrixWorkspace_sptr, MatrixWorkspace_sptr, MatrixWorkspace_sptr>( @@ -298,7 +298,7 @@ MatrixWorkspace_sptr operator/(const MatrixWorkspace_sptr lhs, * @return The result in a workspace shared pointer */ MatrixWorkspace_sptr operator/(const double &lhsValue, - const MatrixWorkspace_sptr rhs) { + const MatrixWorkspace_sptr &rhs) { return executeBinaryOperation<MatrixWorkspace_sptr, MatrixWorkspace_sptr, MatrixWorkspace_sptr>( "Divide", createWorkspaceSingleValue(lhsValue), rhs); @@ -309,8 +309,8 @@ MatrixWorkspace_sptr operator/(const double &lhsValue, * @param rhs :: right hand side workspace shared pointer * @return The result in a workspace shared pointer */ -MatrixWorkspace_sptr operator+=(const MatrixWorkspace_sptr lhs, - const MatrixWorkspace_sptr rhs) { +MatrixWorkspace_sptr operator+=(const MatrixWorkspace_sptr &lhs, + const MatrixWorkspace_sptr &rhs) { return executeBinaryOperation<MatrixWorkspace_sptr, MatrixWorkspace_sptr, MatrixWorkspace_sptr>("Plus", lhs, rhs, true); } @@ -320,7 +320,7 @@ MatrixWorkspace_sptr operator+=(const MatrixWorkspace_sptr lhs, * @param rhsValue :: the single value * @return The result in a workspace shared pointer */ -MatrixWorkspace_sptr operator+=(const MatrixWorkspace_sptr lhs, +MatrixWorkspace_sptr operator+=(const MatrixWorkspace_sptr &lhs, const double &rhsValue) { return executeBinaryOperation<MatrixWorkspace_sptr, MatrixWorkspace_sptr, MatrixWorkspace_sptr>( @@ -332,8 +332,8 @@ MatrixWorkspace_sptr operator+=(const MatrixWorkspace_sptr lhs, * @param rhs :: right hand side workspace shared pointer * @return The result in a workspace shared pointer */ -MatrixWorkspace_sptr operator-=(const MatrixWorkspace_sptr lhs, - const MatrixWorkspace_sptr rhs) { +MatrixWorkspace_sptr operator-=(const MatrixWorkspace_sptr &lhs, + const MatrixWorkspace_sptr &rhs) { return executeBinaryOperation<MatrixWorkspace_sptr, MatrixWorkspace_sptr, MatrixWorkspace_sptr>("Minus", lhs, rhs, true); } @@ -343,7 +343,7 @@ MatrixWorkspace_sptr operator-=(const MatrixWorkspace_sptr lhs, * @param rhsValue :: the single value * @return The result in a workspace shared pointer */ -MatrixWorkspace_sptr operator-=(const MatrixWorkspace_sptr lhs, +MatrixWorkspace_sptr operator-=(const MatrixWorkspace_sptr &lhs, const double &rhsValue) { return executeBinaryOperation<MatrixWorkspace_sptr, MatrixWorkspace_sptr, MatrixWorkspace_sptr>( @@ -355,8 +355,8 @@ MatrixWorkspace_sptr operator-=(const MatrixWorkspace_sptr lhs, * @param rhs :: right hand side workspace shared pointer * @return The result in a workspace shared pointer */ -MatrixWorkspace_sptr operator*=(const MatrixWorkspace_sptr lhs, - const MatrixWorkspace_sptr rhs) { +MatrixWorkspace_sptr operator*=(const MatrixWorkspace_sptr &lhs, + const MatrixWorkspace_sptr &rhs) { return executeBinaryOperation<MatrixWorkspace_sptr, MatrixWorkspace_sptr, MatrixWorkspace_sptr>("Multiply", lhs, rhs, true); @@ -367,7 +367,7 @@ MatrixWorkspace_sptr operator*=(const MatrixWorkspace_sptr lhs, * @param rhsValue :: the single value * @return The result in a workspace shared pointer */ -MatrixWorkspace_sptr operator*=(const MatrixWorkspace_sptr lhs, +MatrixWorkspace_sptr operator*=(const MatrixWorkspace_sptr &lhs, const double &rhsValue) { return executeBinaryOperation<MatrixWorkspace_sptr, MatrixWorkspace_sptr, MatrixWorkspace_sptr>( @@ -379,8 +379,8 @@ MatrixWorkspace_sptr operator*=(const MatrixWorkspace_sptr lhs, * @param rhs :: right hand side workspace shared pointer * @return The result in a workspace shared pointer */ -MatrixWorkspace_sptr operator/=(const MatrixWorkspace_sptr lhs, - const MatrixWorkspace_sptr rhs) { +MatrixWorkspace_sptr operator/=(const MatrixWorkspace_sptr &lhs, + const MatrixWorkspace_sptr &rhs) { return executeBinaryOperation<MatrixWorkspace_sptr, MatrixWorkspace_sptr, MatrixWorkspace_sptr>("Divide", lhs, rhs, true); } @@ -390,7 +390,7 @@ MatrixWorkspace_sptr operator/=(const MatrixWorkspace_sptr lhs, * @param rhsValue :: the single value * @return The result in a workspace shared pointer */ -MatrixWorkspace_sptr operator/=(const MatrixWorkspace_sptr lhs, +MatrixWorkspace_sptr operator/=(const MatrixWorkspace_sptr &lhs, const double &rhsValue) { return executeBinaryOperation<MatrixWorkspace_sptr, MatrixWorkspace_sptr, MatrixWorkspace_sptr>( @@ -490,7 +490,7 @@ bool WorkspaceHelpers::sharedXData(const MatrixWorkspace &WS) { * @param forwards :: If true (the default) divides by bin width, if false * multiplies */ -void WorkspaceHelpers::makeDistribution(MatrixWorkspace_sptr workspace, +void WorkspaceHelpers::makeDistribution(const MatrixWorkspace_sptr &workspace, const bool forwards) { // If we're not able to get a writable reference to Y, then this is an event // workspace, which we can't operate on. diff --git a/Framework/API/src/WorkspaceProperty.cpp b/Framework/API/src/WorkspaceProperty.cpp index 37425186deed8ee752901e832b415ecca3e74007..ac34bac8894cfa8d144742816a700fa664a7bea8 100644 --- a/Framework/API/src/WorkspaceProperty.cpp +++ b/Framework/API/src/WorkspaceProperty.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/IEventWorkspace.h" #include "MantidAPI/IMDEventWorkspace.h" diff --git a/Framework/API/src/WorkspaceUnitValidator.cpp b/Framework/API/src/WorkspaceUnitValidator.cpp index a8d6a646563995b7414566d8fe2e17b36db5c27c..6135d86200426cadec6bf98da953892560c3ef35 100644 --- a/Framework/API/src/WorkspaceUnitValidator.cpp +++ b/Framework/API/src/WorkspaceUnitValidator.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/WorkspaceUnitValidator.h" #include "MantidAPI/Axis.h" diff --git a/Framework/API/test/ADSValidatorTest.h b/Framework/API/test/ADSValidatorTest.h index 72e33568b743b55085bc86a4bc00ae45b7ed416b..fde3bdf22a260adeed9d847ca5cd7690a38dac19 100644 --- a/Framework/API/test/ADSValidatorTest.h +++ b/Framework/API/test/ADSValidatorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/AlgorithmFactoryObserverTest.h b/Framework/API/test/AlgorithmFactoryObserverTest.h index 4a03daa00966a01efad42017ac870bf298d8089c..7236efefd45e4fea1725d7f14430a69dacf67531 100644 --- a/Framework/API/test/AlgorithmFactoryObserverTest.h +++ b/Framework/API/test/AlgorithmFactoryObserverTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/AlgorithmFactoryTest.h b/Framework/API/test/AlgorithmFactoryTest.h index 5382f8e9670a1feb388a1cfc2f36a743373e6fe5..4dea1a5f303d1e1f3b6981985fcc5ec8b7eb8eed 100644 --- a/Framework/API/test/AlgorithmFactoryTest.h +++ b/Framework/API/test/AlgorithmFactoryTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -186,7 +186,7 @@ public: foundAlg = ("Cat" == descItr->category) && ("ToyAlgorithm" == descItr->name) && ("Dog" == descItr->alias) && (1 == descItr->version); - descItr++; + ++descItr; } TS_ASSERT(foundAlg); diff --git a/Framework/API/test/AlgorithmHasPropertyTest.h b/Framework/API/test/AlgorithmHasPropertyTest.h index 6dcab91b3b9808046a6e6f47ebb0668f368cef7c..7134ead9d69c92001471338d751a1d0902bd9258 100644 --- a/Framework/API/test/AlgorithmHasPropertyTest.h +++ b/Framework/API/test/AlgorithmHasPropertyTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/AlgorithmHistoryTest.h b/Framework/API/test/AlgorithmHistoryTest.h index ec3fc98bcac0eaf97bd4fb2849d3739b69755d2e..735c71f5fa40df0e2f3f60991194130fb2ecb820 100644 --- a/Framework/API/test/AlgorithmHistoryTest.h +++ b/Framework/API/test/AlgorithmHistoryTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -239,7 +239,7 @@ private: return AlgorithmHistory(&alg, execTime, 14.0, m_execCount++); } - AlgorithmHistory createFromTestAlg(std::string paramValue) { + AlgorithmHistory createFromTestAlg(const std::string ¶mValue) { Algorithm *testInput = new testalg; testInput->initialize(); testInput->setPropertyValue("arg1_param", paramValue); diff --git a/Framework/API/test/AlgorithmMPITest.h b/Framework/API/test/AlgorithmMPITest.h index e9981d8b726ce322ae696f5ee158ff583bffa95c..ab28cbc1cdb2f3fb5defa5e58bf84214dbbc4fad 100644 --- a/Framework/API/test/AlgorithmMPITest.h +++ b/Framework/API/test/AlgorithmMPITest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/AlgorithmManagerTest.h b/Framework/API/test/AlgorithmManagerTest.h index 5541f2a4fc7c491ad37a328aae7625dbc0724a96..e33bd369e99f41f277ef33a6cdebb86d6f341424 100644 --- a/Framework/API/test/AlgorithmManagerTest.h +++ b/Framework/API/test/AlgorithmManagerTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -82,8 +82,13 @@ public: int version() const override { return (1); } const std::string category() const override { return ("Cat1"); } const std::string summary() const override { return "Test summary"; } - // Override method so we can manipulate whether it appears to be running - bool isRunning() const override { return isRunningFlag; } + // Override methods so we can manipulate whether it appears to be running + ExecutionState executionState() const override { + return isRunningFlag ? ExecutionState::Running : ExecutionState::Finished; + } + ResultState resultState() const override { + return isRunningFlag ? ResultState::NotFinished : ResultState::Failed; + } void setIsRunningTo(bool runningFlag) { isRunningFlag = runningFlag; } void cancel() override { isRunningFlag = false; } }; @@ -101,12 +106,6 @@ public: } static void destroySuite(AlgorithmManagerTest *suite) { delete suite; } - AlgorithmManagerTest() { - // A test fails unless algorithms.retained is big enough - Mantid::Kernel::ConfigService::Instance().setString("algorithms.retained", - "5"); - } - void testVersionFail() { const size_t nalgs = AlgorithmFactory::Instance().getKeys().size(); TS_ASSERT_THROWS(AlgorithmFactory::Instance().subscribe<AlgTestFail>(), @@ -212,97 +211,6 @@ public: AlgorithmManager::Instance().notificationCenter.removeObserver(my_observer); } - /** Keep the right number of algorithms in the list. - * This also tests setMaxAlgorithms(). - */ - void testDroppingOldOnes() { - AlgorithmManager::Instance().setMaxAlgorithms(5); - AlgorithmManager::Instance().clear(); - TS_ASSERT_EQUALS(AlgorithmManager::Instance().size(), 0); - - IAlgorithm_sptr first = AlgorithmManager::Instance().create("AlgTest"); - // Fill up the list - for (size_t i = 1; i < 5; i++) - AlgorithmManager::Instance().create("AlgTest"); - TS_ASSERT_EQUALS(AlgorithmManager::Instance().size(), 5); - - // The first one is still in the list - TS_ASSERT(AlgorithmManager::Instance().getAlgorithm( - first->getAlgorithmID()) == first); - - // Add one more, drops the oldest one - AlgorithmManager::Instance().create("AlgTest"); - TS_ASSERT_EQUALS(AlgorithmManager::Instance().size(), 5); - TS_ASSERT( - !AlgorithmManager::Instance().getAlgorithm(first->getAlgorithmID())); - } - - /** Keep one algorithm running, drop the second-oldest one etc. */ - void testDroppingOldOnes_whenAnAlgorithmIsStillRunning() { - AlgorithmManager::Instance().clear(); - TS_ASSERT_EQUALS(AlgorithmManager::Instance().size(), 0); - - // Create one algorithm that appears never to stop - IAlgorithm_sptr first = - AlgorithmManager::Instance().create("AlgRunsForever"); - - IAlgorithm_sptr second = AlgorithmManager::Instance().create("AlgTest"); - - // Another long-running algo - IAlgorithm_sptr third = - AlgorithmManager::Instance().create("AlgRunsForever"); - - for (size_t i = 3; i < 5; i++) - AlgorithmManager::Instance().create("AlgTest"); - TS_ASSERT_EQUALS(AlgorithmManager::Instance().size(), 5); - - // The first three created are in the list - TS_ASSERT(AlgorithmManager::Instance().getAlgorithm( - first->getAlgorithmID()) == first); - TS_ASSERT(AlgorithmManager::Instance().getAlgorithm( - second->getAlgorithmID()) == second); - TS_ASSERT(AlgorithmManager::Instance().getAlgorithm( - third->getAlgorithmID()) == third); - - // Add one more, drops the SECOND oldest one - AlgorithmManager::Instance().create("AlgTest"); - TS_ASSERT_EQUALS(AlgorithmManager::Instance().size(), 5); - - TSM_ASSERT("The oldest algorithm (is still running) so it is still there", - AlgorithmManager::Instance().getAlgorithm( - first->getAlgorithmID()) == first); - TSM_ASSERT( - "The second oldest was popped, so trying to get it should return null", - !AlgorithmManager::Instance().getAlgorithm(second->getAlgorithmID())); - - // One more time - AlgorithmManager::Instance().create("AlgTest"); - TS_ASSERT_EQUALS(AlgorithmManager::Instance().size(), 5); - - // The right ones are at the front - TSM_ASSERT("The oldest algorithm (is still running) so it is still there", - AlgorithmManager::Instance().getAlgorithm( - first->getAlgorithmID()) == first); - TSM_ASSERT("The third algorithm (is still running) so it is still there", - AlgorithmManager::Instance().getAlgorithm( - third->getAlgorithmID()) == third); - AlgorithmManager::Instance().cancelAll(); - } - - void testDroppingOldOnes_extremeCase() { - /** Extreme case where your queue fills up and all algos are running */ - AlgorithmManager::Instance().clear(); - for (size_t i = 0; i < 5; i++) { - AlgorithmManager::Instance().create("AlgRunsForever"); - } - - TS_ASSERT_EQUALS(AlgorithmManager::Instance().size(), 5); - // Create another that takes it past the normal max size (of 5) - AlgorithmManager::Instance().create("AlgTest"); - TS_ASSERT_EQUALS(AlgorithmManager::Instance().size(), 6); - AlgorithmManager::Instance().cancelAll(); - } - void testThreadSafety() { PARALLEL_FOR_NO_WSP_CHECK() for (int i = 0; i < 5000; i++) { @@ -312,7 +220,6 @@ public: void testRemovingByIdRemovesCorrectObject() { auto &mgr = AlgorithmManager::Instance(); - mgr.setMaxAlgorithms(10); const size_t initialManagerSize = mgr.size(); // 2 different ids for same named algorithm auto alg1 = mgr.create("AlgTest"); @@ -324,8 +231,6 @@ public: // the right one? auto foundAlg = mgr.getAlgorithm(alg2->getAlgorithmID()); TS_ASSERT(foundAlg); - - mgr.setMaxAlgorithms(5); } void test_runningInstancesOf() { diff --git a/Framework/API/test/AlgorithmPropertyTest.h b/Framework/API/test/AlgorithmPropertyTest.h index 9264ebadbd691d19f18168a769e7f3fe768babff..02f9181e771bbd99deeb3cec83e8d37c4af8da01 100644 --- a/Framework/API/test/AlgorithmPropertyTest.h +++ b/Framework/API/test/AlgorithmPropertyTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/AlgorithmProxyTest.h b/Framework/API/test/AlgorithmProxyTest.h index 4d1f07756b56571bb8c95be7768f8ea102a7b804..bff605adc012261bb356f7708ac5b2d8b8d5d7e2 100644 --- a/Framework/API/test/AlgorithmProxyTest.h +++ b/Framework/API/test/AlgorithmProxyTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -17,6 +17,7 @@ #include <Poco/Thread.h> #include <boost/lexical_cast.hpp> +#include <utility> using namespace Mantid::API; using namespace Mantid::Kernel; @@ -121,7 +122,8 @@ public: TestProxyObserver() : AlgorithmObserver(), start(false), progress(false), finish(false) {} TestProxyObserver(IAlgorithm_const_sptr alg) - : AlgorithmObserver(alg), start(false), progress(false), finish(false) {} + : AlgorithmObserver(std::move(alg)), start(false), progress(false), + finish(false) {} void startHandle(const IAlgorithm *) override { start = true; } void progressHandle(const IAlgorithm *, double p, const std::string &msg) override { @@ -152,6 +154,8 @@ public: alg->setProperty("prop2", 17); TS_ASSERT_THROWS_NOTHING(alg->execute()); TS_ASSERT(alg->isExecuted()); + TS_ASSERT_EQUALS(ExecutionState::Finished, alg->executionState()); + TS_ASSERT_EQUALS(ResultState::Success, alg->resultState()); int out = alg->getProperty("out"); TS_ASSERT_EQUALS(out, 28); } diff --git a/Framework/API/test/AlgorithmTest.h b/Framework/API/test/AlgorithmTest.h index 7b5a07cff9246e81b69bafcda57073bb0774f0da..e0d91c1adc03f77bef83b83464e5e92f75d51912 100644 --- a/Framework/API/test/AlgorithmTest.h +++ b/Framework/API/test/AlgorithmTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -27,6 +27,7 @@ #include "MantidTestHelpers/FakeObjects.h" #include "PropertyManagerHelper.h" #include <map> +#include <utility> using namespace Mantid::Kernel; using namespace Mantid::API; @@ -291,11 +292,16 @@ public: void testExecute() { ToyAlgorithm myAlg; + TS_ASSERT_EQUALS(ExecutionState::Uninitialized, myAlg.executionState()); TS_ASSERT_THROWS(myAlg.execute(), const std::runtime_error &); TS_ASSERT(!myAlg.isExecuted()); + TS_ASSERT_EQUALS(ExecutionState::Uninitialized, myAlg.executionState()); TS_ASSERT_THROWS_NOTHING(myAlg.initialize()); + TS_ASSERT_EQUALS(ExecutionState::Initialized, myAlg.executionState()); TS_ASSERT_THROWS_NOTHING(myAlg.execute()); TS_ASSERT(myAlg.isExecuted()); + TS_ASSERT_EQUALS(ExecutionState::Finished, myAlg.executionState()); + TS_ASSERT_EQUALS(ResultState::Success, myAlg.resultState()); } void testSetPropertyValue() { @@ -332,11 +338,16 @@ public: alg.setProperty("PropertyA", 12); alg.setProperty("PropertyB", 5); TS_ASSERT_THROWS_ANYTHING(alg.execute()); + // Algoritm never executed as property validation failed TS_ASSERT(!alg.isExecuted()); + TS_ASSERT_EQUALS(ExecutionState::Initialized, alg.executionState()); + TS_ASSERT_EQUALS(ResultState::NotFinished, alg.resultState()); alg.setProperty("PropertyB", 15); TS_ASSERT_THROWS_NOTHING(alg.execute()); TS_ASSERT(alg.isExecuted()); + TS_ASSERT_EQUALS(ExecutionState::Finished, alg.executionState()); + TS_ASSERT_EQUALS(ResultState::Success, alg.resultState()); } void test_WorkspaceMethodFunctionsReturnEmptyByDefault() { @@ -501,8 +512,9 @@ public: /** Test of setting read and/or write locks * for various combinations of input/output workspaces. */ - void do_test_locking(std::string in1, std::string in2, std::string inout, - std::string out1, std::string out2) { + void do_test_locking(const std::string &in1, const std::string &in2, + const std::string &inout, const std::string &out1, + const std::string &out2) { for (size_t i = 0; i < 6; i++) { boost::shared_ptr<WorkspaceTester> ws = boost::make_shared<WorkspaceTester>(); @@ -576,7 +588,8 @@ public: * Make no group if blank, just 1 workspace * @return The new WorkspaceGroup object */ - Workspace_sptr makeWorkspaceGroup(std::string group1, std::string contents1) { + Workspace_sptr makeWorkspaceGroup(const std::string &group1, + std::string contents1) { auto &ads = AnalysisDataService::Instance(); if (contents1.empty()) { if (group1.empty()) @@ -604,14 +617,14 @@ public: } //------------------------------------------------------------------------ - WorkspaceGroup_sptr do_test_groups(std::string group1, std::string contents1, - std::string group2, std::string contents2, - std::string group3, std::string contents3, - bool expectFail = false, - int expectedNumber = 3) { - makeWorkspaceGroup(group1, contents1); - makeWorkspaceGroup(group2, contents2); - makeWorkspaceGroup(group3, contents3); + WorkspaceGroup_sptr + do_test_groups(const std::string &group1, std::string contents1, + const std::string &group2, std::string contents2, + const std::string &group3, std::string contents3, + bool expectFail = false, int expectedNumber = 3) { + makeWorkspaceGroup(group1, std::move(contents1)); + makeWorkspaceGroup(group2, std::move(contents2)); + makeWorkspaceGroup(group3, std::move(contents3)); StubbedWorkspaceAlgorithm alg; alg.initialize(); diff --git a/Framework/API/test/AnalysisDataServiceObserverTest.h b/Framework/API/test/AnalysisDataServiceObserverTest.h index f6075cbee8fb7197037caf87c4f6ae8c383d09c1..46bbbee62718ee3357cdb86157f84a048bd3a140 100644 --- a/Framework/API/test/AnalysisDataServiceObserverTest.h +++ b/Framework/API/test/AnalysisDataServiceObserverTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -109,7 +109,7 @@ public: m_mockInheritingClass = std::make_unique<FakeAnalysisDataServiceObserver>(); } - void addWorkspaceToADS(std::string name = "dummy") { + void addWorkspaceToADS(const std::string &name = "dummy") { IAlgorithm_sptr alg = Mantid::API::AlgorithmManager::Instance().createUnmanaged( "CreateSampleWorkspace"); diff --git a/Framework/API/test/AnalysisDataServiceTest.h b/Framework/API/test/AnalysisDataServiceTest.h index 1001bd076ace03e2e279d808920d013ac498588a..0fb70278cbc1a3243e3c6014fc44fd8b53da786f 100644 --- a/Framework/API/test/AnalysisDataServiceTest.h +++ b/Framework/API/test/AnalysisDataServiceTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/AsynchronousTest.h b/Framework/API/test/AsynchronousTest.h index 5ef29ab62da709463be3af3374e4f27a103581d3..f70e3a3a6b5eeba1e26dc71a43e6c347d4283448 100644 --- a/Framework/API/test/AsynchronousTest.h +++ b/Framework/API/test/AsynchronousTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/BinEdgeAxisTest.h b/Framework/API/test/BinEdgeAxisTest.h index cefbf230f79309285dc58146456a3fbcc7e3fad9..aa0f442a9efead18e502607a257fac22bf167735 100644 --- a/Framework/API/test/BinEdgeAxisTest.h +++ b/Framework/API/test/BinEdgeAxisTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/BoxControllerTest.h b/Framework/API/test/BoxControllerTest.h index ac8b0a116a53e61f5596a9be167c277cb2514b64..121cb3a924de76e542e2f6f4764d8b5b4610e838 100644 --- a/Framework/API/test/BoxControllerTest.h +++ b/Framework/API/test/BoxControllerTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/CMakeLists.txt b/Framework/API/test/CMakeLists.txt index 4150411c5c65ca7fd5e865481e70479a23cfe85e..c96fba123d1a97394171bc4ec7ce169eeb598548 100644 --- a/Framework/API/test/CMakeLists.txt +++ b/Framework/API/test/CMakeLists.txt @@ -1,8 +1,7 @@ if(CXXTEST_FOUND) include_directories(SYSTEM ${CXXTEST_INCLUDE_DIR} - ${GMOCK_INCLUDE_DIR} - ${GTEST_INCLUDE_DIR}) +) include_directories(../../TestHelpers/inc ../../Nexus/inc ${HDF5_INCLUDE_DIRS}) @@ -32,8 +31,8 @@ if(CXXTEST_FOUND) ${JSONCPP_LIBRARIES} ${NEXUS_LIBRARIES} ${MUPARSER_LIBRARIES} - ${GMOCK_LIBRARIES} - ${GTEST_LIBRARIES}) + gmock +) add_dependencies(FrameworkTests APITest) # Test data diff --git a/Framework/API/test/CitationTest.h b/Framework/API/test/CitationTest.h index 169b99d8c8a9f962ddd60f7a65c13b1ada990047..1e6a10f5aa68edde4e6caaf2f6715dd49f54725d 100644 --- a/Framework/API/test/CitationTest.h +++ b/Framework/API/test/CitationTest.h @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #pragma once #include "MantidAPI/Citation.h" diff --git a/Framework/API/test/CommonBinsValidatorTest.h b/Framework/API/test/CommonBinsValidatorTest.h index 3318ad0a8f4084586140063d0ffe4e59a38a4dd0..48cb7fd2b773b3166f6564a659cf1e94526c328f 100644 --- a/Framework/API/test/CommonBinsValidatorTest.h +++ b/Framework/API/test/CommonBinsValidatorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/CompositeFunctionTest.h b/Framework/API/test/CompositeFunctionTest.h index 686f030317fdd1e474344f9bd7b9d33ba58328ba..485e5df836ad1846743fa217d61bfa98e324d90e 100644 --- a/Framework/API/test/CompositeFunctionTest.h +++ b/Framework/API/test/CompositeFunctionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/CoordTransformTest.h b/Framework/API/test/CoordTransformTest.h index 0d428607de903e8db711f4daf3912485896d3cc1..6219077aa51025b494ce97bca598d8b3da7ef3f7 100644 --- a/Framework/API/test/CoordTransformTest.h +++ b/Framework/API/test/CoordTransformTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/CostFunctionFactoryTest.h b/Framework/API/test/CostFunctionFactoryTest.h index 7f1b9afe513e91fa959ca276fa264bfe364ab5aa..df5d9c51a4abde6e576994a168b13665cf135b12 100644 --- a/Framework/API/test/CostFunctionFactoryTest.h +++ b/Framework/API/test/CostFunctionFactoryTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/DataProcessorAlgorithmTest.h b/Framework/API/test/DataProcessorAlgorithmTest.h index 779e8842504f40fb6f35606635c74d7fc841f6fc..0f4feb5f83fae1f196f6b17d19f0f3e909cfdac5 100644 --- a/Framework/API/test/DataProcessorAlgorithmTest.h +++ b/Framework/API/test/DataProcessorAlgorithmTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/DetectorInfoTest.h b/Framework/API/test/DetectorInfoTest.h index 926b04fa93c4064c98eda7280f2c80ef71e87375..79903e48aa75e16bc85088e50584e50969b065c4 100644 --- a/Framework/API/test/DetectorInfoTest.h +++ b/Framework/API/test/DetectorInfoTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/DetectorSearcherTest.h b/Framework/API/test/DetectorSearcherTest.h index 94215b8700ab0303d33a397fcd690721d37111c3..750475c0a11e2f561433611010bd109063e9cc35 100644 --- a/Framework/API/test/DetectorSearcherTest.h +++ b/Framework/API/test/DetectorSearcherTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/EnabledWhenWorkspaceIsTypeTest.h b/Framework/API/test/EnabledWhenWorkspaceIsTypeTest.h index 42aeca5fc68d931e1edeb4f1c6e753b521638a53..27303d98832ece4a54c1dacf23e59d37843192cb 100644 --- a/Framework/API/test/EnabledWhenWorkspaceIsTypeTest.h +++ b/Framework/API/test/EnabledWhenWorkspaceIsTypeTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/EqualBinSizesValidatorTest.h b/Framework/API/test/EqualBinSizesValidatorTest.h index 9dc0b375f8b1b4e7ff23b916420ea604b35de38e..752b63bbd36152b0bd2bb9917014fd919638683d 100644 --- a/Framework/API/test/EqualBinSizesValidatorTest.h +++ b/Framework/API/test/EqualBinSizesValidatorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/ExperimentInfoTest.h b/Framework/API/test/ExperimentInfoTest.h index a53c70b0f4bf3f2622a44bc0782ba47216330a8c..09cef48c58a4bb6a460faecbb51acc1fd84a5e0d 100644 --- a/Framework/API/test/ExperimentInfoTest.h +++ b/Framework/API/test/ExperimentInfoTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -880,14 +880,14 @@ private: } Instrument_sptr - addInstrumentWithIndirectEmodeParameter(ExperimentInfo_sptr exptInfo) { + addInstrumentWithIndirectEmodeParameter(const ExperimentInfo_sptr &exptInfo) { Instrument_sptr inst = addInstrument(exptInfo); exptInfo->instrumentParameters().addString(inst.get(), "deltaE-mode", "indirect"); return inst; } - Instrument_sptr addInstrument(ExperimentInfo_sptr exptInfo) { + Instrument_sptr addInstrument(const ExperimentInfo_sptr &exptInfo) { Instrument_sptr inst = ComponentCreationHelper::createTestInstrumentCylindrical(1); exptInfo->setInstrument(inst); diff --git a/Framework/API/test/ExpressionTest.h b/Framework/API/test/ExpressionTest.h index 43be7349777b23c2b7846f699378ab4c7e5efa2d..43177d956c00e2dc56a5e539f356a547cea69a01 100644 --- a/Framework/API/test/ExpressionTest.h +++ b/Framework/API/test/ExpressionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/FakeAlgorithms.h b/Framework/API/test/FakeAlgorithms.h index 62eb4e9217edced61c41ed80504deec4af8e0c07..4a4edcf7157c3f9137cd99cc84ac27cb022dd7c0 100644 --- a/Framework/API/test/FakeAlgorithms.h +++ b/Framework/API/test/FakeAlgorithms.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/FileBackedExperimentInfoTest.h b/Framework/API/test/FileBackedExperimentInfoTest.h index 9a71f9d107435cc5bc8d7acab06bee40c43d9ba8..d17f8ae1ed7efbbfdf959f39f1d115fa5566a7a9 100644 --- a/Framework/API/test/FileBackedExperimentInfoTest.h +++ b/Framework/API/test/FileBackedExperimentInfoTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/FileFinderTest.h b/Framework/API/test/FileFinderTest.h index 6fa43e8df9aa97edf05f94e435f9521c55f383d9..3c90bb3aca00b611b883ddab72207bad589f0d32 100644 --- a/Framework/API/test/FileFinderTest.h +++ b/Framework/API/test/FileFinderTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -215,7 +215,6 @@ public: } void testGetInstrument() { - std::string name; // place to put results ConfigService::Instance().setFacility("ISIS"); ConfigService::Instance().setString("default.instrument", "HRPD"); diff --git a/Framework/API/test/FilePropertyTest.h b/Framework/API/test/FilePropertyTest.h index 659aa8636fd3788028dd9e1288b00b0c73fb9627..ab43b43dc58ea5a41cf014612e35ed9d432704bf 100644 --- a/Framework/API/test/FilePropertyTest.h +++ b/Framework/API/test/FilePropertyTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/FrameworkManagerTest.h b/Framework/API/test/FrameworkManagerTest.h index 500fe5a5ca0a6ce065f46abde251aca9d488d5de..eff6f5b03e97e92c0291d26f314dd063394d7c3d 100644 --- a/Framework/API/test/FrameworkManagerTest.h +++ b/Framework/API/test/FrameworkManagerTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/FuncMinimizerFactoryTest.h b/Framework/API/test/FuncMinimizerFactoryTest.h index f0568f4f6ead34f31f2a3aeb6e6beb280616de1e..fd06dc680f1a5c848d9412eaca3b22a61e38db8c 100644 --- a/Framework/API/test/FuncMinimizerFactoryTest.h +++ b/Framework/API/test/FuncMinimizerFactoryTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/FunctionAttributeTest.h b/Framework/API/test/FunctionAttributeTest.h index e9bb3af88c21093426b47ad117c4309cce5b0084..17f533689f481cc69599959f65743a82f231b841 100644 --- a/Framework/API/test/FunctionAttributeTest.h +++ b/Framework/API/test/FunctionAttributeTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/FunctionDomainGeneralTest.h b/Framework/API/test/FunctionDomainGeneralTest.h index b4cf8ab419cb7c5f95c33297377595ecf519846a..6690def95375ddd0ff0ba2ca4b85cba6ca1ea9c7 100644 --- a/Framework/API/test/FunctionDomainGeneralTest.h +++ b/Framework/API/test/FunctionDomainGeneralTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/FunctionDomainTest.h b/Framework/API/test/FunctionDomainTest.h index 05ef8cb95884417bf8aa73f2affac99f6732062d..4975471d4c0fc9590a04d8b2de90a4b21e0af78c 100644 --- a/Framework/API/test/FunctionDomainTest.h +++ b/Framework/API/test/FunctionDomainTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/FunctionFactoryTest.h b/Framework/API/test/FunctionFactoryTest.h index 0488dd71af6240ac140875672ee1ad59a7059701..71f77b73cceea6c06c0e101112edae00ed9c3e96 100644 --- a/Framework/API/test/FunctionFactoryTest.h +++ b/Framework/API/test/FunctionFactoryTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -476,7 +476,7 @@ public: TS_ASSERT(second); // test each individual function - auto testFunc = [](CompositeFunction_sptr f) { + auto testFunc = [](const CompositeFunction_sptr &f) { if (f) { TS_ASSERT_EQUALS(f->nFunctions(), 2); TS_ASSERT_EQUALS(f->getFunction(0)->name(), diff --git a/Framework/API/test/FunctionParameterDecoratorTest.h b/Framework/API/test/FunctionParameterDecoratorTest.h index b4d64110946cda7a4451f3358b538fbbd9251707..378976bae03cf9c7645f16f2864d560f90a5504c 100644 --- a/Framework/API/test/FunctionParameterDecoratorTest.h +++ b/Framework/API/test/FunctionParameterDecoratorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/FunctionPropertyTest.h b/Framework/API/test/FunctionPropertyTest.h index e491c8c80e476e6a0b893c8c1949e5abbc10541e..92b15eb6192ac8e7e17e49d229e87d41521d6a63 100644 --- a/Framework/API/test/FunctionPropertyTest.h +++ b/Framework/API/test/FunctionPropertyTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -87,7 +87,6 @@ public: void test_Assignment_By_SharedPtr() { FunctionProperty prop("fun"); - std::string error; auto fun_p = FunctionFactory::Instance().createInitialized( createTestFunctionString()); TS_ASSERT(fun_p); @@ -105,7 +104,6 @@ public: void test_Shared_Pointer() { FunctionProperty prop("fun"); - std::string error; boost::shared_ptr<FunctionPropertyTest_Function> fun_p( new FunctionPropertyTest_Function); TS_ASSERT(fun_p); diff --git a/Framework/API/test/FunctionTest.h b/Framework/API/test/FunctionTest.h index 6377993527825626f6c5ebf0207b502306404198..0c67731c8ebc2237d61028565b71c6d217eadb05 100644 --- a/Framework/API/test/FunctionTest.h +++ b/Framework/API/test/FunctionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/FunctionValuesTest.h b/Framework/API/test/FunctionValuesTest.h index e6777c00c3fc7cce080955fad8fba2ee5b303a18..1e804a1f1f0368a6e82c5c042c023adb2355216a 100644 --- a/Framework/API/test/FunctionValuesTest.h +++ b/Framework/API/test/FunctionValuesTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/GroupingLoaderTest.h b/Framework/API/test/GroupingLoaderTest.h index 5fbf81549b012f99b0e17f612bcc039997c871c4..114aefca39a7e2ba136810d074c5b16a8d4b764e 100644 --- a/Framework/API/test/GroupingLoaderTest.h +++ b/Framework/API/test/GroupingLoaderTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/HistogramValidatorTest.h b/Framework/API/test/HistogramValidatorTest.h index 45d25a2fcf26514a670ce05af75122f79bc57184..eaf44fcd8464f713904d8460c844e9118174975f 100644 --- a/Framework/API/test/HistogramValidatorTest.h +++ b/Framework/API/test/HistogramValidatorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/HistoryItemTest.h b/Framework/API/test/HistoryItemTest.h index 6daa394cc781bf97107160c34412410b96d425e5..7f05947170e753f7fe6831219c257f69cc2abac5 100644 --- a/Framework/API/test/HistoryItemTest.h +++ b/Framework/API/test/HistoryItemTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/HistoryViewTest.h b/Framework/API/test/HistoryViewTest.h index 7172ac129458e866133c67f20a7d5d9390ba59e2..85109067fa0b98dfd049ad2c14f94d37e8c198f7 100644 --- a/Framework/API/test/HistoryViewTest.h +++ b/Framework/API/test/HistoryViewTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/IEventListTest.h b/Framework/API/test/IEventListTest.h index ca521bfc3330ddc20ce36ca3cdd9db363c8a0816..3b4af65f637ec27089d6abcdfc0b00b86addf982 100644 --- a/Framework/API/test/IEventListTest.h +++ b/Framework/API/test/IEventListTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/IFunction1DSpectrumTest.h b/Framework/API/test/IFunction1DSpectrumTest.h index bdaf596946b925d20e0c3907ea6d46dd7a897f12..1df0f3d4f2b78e4bc4f09b083cb9836951b406c1 100644 --- a/Framework/API/test/IFunction1DSpectrumTest.h +++ b/Framework/API/test/IFunction1DSpectrumTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/IFunction1DTest.h b/Framework/API/test/IFunction1DTest.h index 0ff605919b5c474caad39d25f53822245d81c4a6..d2657d682e4b1e35593c49c5001a266761daca18 100644 --- a/Framework/API/test/IFunction1DTest.h +++ b/Framework/API/test/IFunction1DTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/IFunctionMDTest.h b/Framework/API/test/IFunctionMDTest.h index c20752887bf597580bbcb9c3adfc04a8bd18e590..a37d7d937832c8275ddf6354632df5d602975c83 100644 --- a/Framework/API/test/IFunctionMDTest.h +++ b/Framework/API/test/IFunctionMDTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/IFunctionTest.h b/Framework/API/test/IFunctionTest.h index 160434b081c2f5d522cd0b33c003c534c6d0ba5c..b390908a2ef732f993fad75c875c86110ebaa116 100644 --- a/Framework/API/test/IFunctionTest.h +++ b/Framework/API/test/IFunctionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/ILatticeFunctionTest.h b/Framework/API/test/ILatticeFunctionTest.h index 991a967893b82e0a3b6b69cf8d2a6c7ff71a4645..b4baa5aeed2bc5c2b4df7f74d8a84f23e64adb83 100644 --- a/Framework/API/test/ILatticeFunctionTest.h +++ b/Framework/API/test/ILatticeFunctionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/IMDWorkspaceTest.h b/Framework/API/test/IMDWorkspaceTest.h index 13da2b1c351043883a45d5fc5de86c7b8f06cbc5..501437219fc3e57879f1da7bd54f1b47dc462cde 100644 --- a/Framework/API/test/IMDWorkspaceTest.h +++ b/Framework/API/test/IMDWorkspaceTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/ISpectrumTest.h b/Framework/API/test/ISpectrumTest.h index 0b7a70d37a62ca79e9bc931a7f9bb5e1843a360b..8b5e490ee7dcf5962c4c710f8765857de623ae10 100644 --- a/Framework/API/test/ISpectrumTest.h +++ b/Framework/API/test/ISpectrumTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/ImmutableCompositeFunctionTest.h b/Framework/API/test/ImmutableCompositeFunctionTest.h index 8027335f97d98aacf08503cf11b46d0a6aad4866..f332d96729711ff3abb55a26a6e64cafb92df946 100644 --- a/Framework/API/test/ImmutableCompositeFunctionTest.h +++ b/Framework/API/test/ImmutableCompositeFunctionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/ImplicitFunctionFactoryTest.h b/Framework/API/test/ImplicitFunctionFactoryTest.h index 7f21d0817ef1da934693b6b2676ac0be8cf49461..d02b6b54ed0cd9eee1c8f84ec533280731a36bb8 100644 --- a/Framework/API/test/ImplicitFunctionFactoryTest.h +++ b/Framework/API/test/ImplicitFunctionFactoryTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/ImplicitFunctionParameterParserFactoryTest.h b/Framework/API/test/ImplicitFunctionParameterParserFactoryTest.h index 119a6217c65a88d4891a82ec94a9e7dd8546ba6c..7a8b03d36e79bfb73e212533b61890fac2ec56c0 100644 --- a/Framework/API/test/ImplicitFunctionParameterParserFactoryTest.h +++ b/Framework/API/test/ImplicitFunctionParameterParserFactoryTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/ImplicitFunctionParserFactoryTest.h b/Framework/API/test/ImplicitFunctionParserFactoryTest.h index 68baa071c7f0feaa59c867cc02609f5c140fd3f1..6ee2fbc23e8ae7180913ae392990849ee0f6dfcc 100644 --- a/Framework/API/test/ImplicitFunctionParserFactoryTest.h +++ b/Framework/API/test/ImplicitFunctionParserFactoryTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/IncreasingAxisValidatorTest.h b/Framework/API/test/IncreasingAxisValidatorTest.h index 2dc263aaef6cdffa7f40d9024e5cc5d6b72563c7..061689db825bcf734b171e3d50dc50d663a7e080 100644 --- a/Framework/API/test/IncreasingAxisValidatorTest.h +++ b/Framework/API/test/IncreasingAxisValidatorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/IndexPropertyTest.h b/Framework/API/test/IndexPropertyTest.h index 106dcb7cf567078ac1cd391880dd700cd9b78b21..c094207d144d00eb9b14533e17f4b14af8469089 100644 --- a/Framework/API/test/IndexPropertyTest.h +++ b/Framework/API/test/IndexPropertyTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/IndexTypePropertyTest.h b/Framework/API/test/IndexTypePropertyTest.h index bed1c63f3a69107c5fddd0b6509c7c638a7df2ec..27358f22fd2bb889d3b061f1838e74b185822b7e 100644 --- a/Framework/API/test/IndexTypePropertyTest.h +++ b/Framework/API/test/IndexTypePropertyTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/InstrumentDataServiceTest.h b/Framework/API/test/InstrumentDataServiceTest.h index 78dc14ea3d15a90670d154fdfed6e5fc2d0ba10c..94d21c3093ea5cfcba12e106877b2869cd55ebf9 100644 --- a/Framework/API/test/InstrumentDataServiceTest.h +++ b/Framework/API/test/InstrumentDataServiceTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/InstrumentValidatorTest.h b/Framework/API/test/InstrumentValidatorTest.h index 38230bdb8dfeacfbd942ff9b0e889e126fa85102..79d9ec5d8e38df131157f7fb10fbf91c726d55a1 100644 --- a/Framework/API/test/InstrumentValidatorTest.h +++ b/Framework/API/test/InstrumentValidatorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/LatticeDomainTest.h b/Framework/API/test/LatticeDomainTest.h index b1e1dd2d5d8cacdb2d52e53c3b493b99f7d4f1cd..99faaa780e594170bf96130bf082f0cce77bf189 100644 --- a/Framework/API/test/LatticeDomainTest.h +++ b/Framework/API/test/LatticeDomainTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/LiveListenerFactoryTest.h b/Framework/API/test/LiveListenerFactoryTest.h index 9605074491e82e8e649f2002774b073585b96b9b..c3fa9bdc09557cdad7fca627fb9d44a034bc218f 100644 --- a/Framework/API/test/LiveListenerFactoryTest.h +++ b/Framework/API/test/LiveListenerFactoryTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -14,6 +14,8 @@ #include <Poco/Path.h> #include <cxxtest/TestSuite.h> +#include <utility> + using namespace Mantid; using namespace Mantid::API; @@ -29,7 +31,7 @@ class MockLiveListenerInstantiator public: MockLiveListenerInstantiator( boost::shared_ptr<Mantid::API::ILiveListener> product) - : product(product) {} + : product(std::move(product)) {} boost::shared_ptr<Mantid::API::ILiveListener> createInstance() const override { diff --git a/Framework/API/test/LiveListenerTest.h b/Framework/API/test/LiveListenerTest.h index d8589a3c734c7bbac4062fa931a1ecc24b0ec56e..1d71e80bdba600883ace217397a83a2f719301c0 100644 --- a/Framework/API/test/LiveListenerTest.h +++ b/Framework/API/test/LiveListenerTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/LogFilterGeneratorTest.h b/Framework/API/test/LogFilterGeneratorTest.h index 63818d94a6157e77073fce6bdad11dc14b1abc04..e8442d8fa43f58c553ae555509cede5bf502b187 100644 --- a/Framework/API/test/LogFilterGeneratorTest.h +++ b/Framework/API/test/LogFilterGeneratorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/LogManagerTest.h b/Framework/API/test/LogManagerTest.h index d041920a898948939cf92cc88215fa06c18b0918..c047bd8e1e057e7196d78b95760644e810fd1ff1 100644 --- a/Framework/API/test/LogManagerTest.h +++ b/Framework/API/test/LogManagerTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -63,7 +63,8 @@ void addTestTimeSeries(LogManager &run, const std::string &name) { } } // namespace -void addTimeSeriesEntry(LogManager &runInfo, std::string name, double val) { +void addTimeSeriesEntry(LogManager &runInfo, const std::string &name, + double val) { TimeSeriesProperty<double> *tsp; tsp = new TimeSeriesProperty<double>(name); tsp->addValue("2011-05-24T00:00:00", val); @@ -554,8 +555,7 @@ private: LogManager runInfo; const std::string name = "T_prop"; runInfo.addProperty<T>(name, value); - int result(-1); - result = runInfo.getPropertyAsIntegerValue(name); + int result = runInfo.getPropertyAsIntegerValue(name); TS_ASSERT_THROWS_NOTHING(result = runInfo.getPropertyAsIntegerValue(name)); TS_ASSERT_EQUALS(value, static_cast<T>(result)); } @@ -579,12 +579,11 @@ public: } void test_Accessing_Single_Value_From_Times_Series_A_Large_Number_Of_Times() { - double value(0.0); for (size_t i = 0; i < 20000; ++i) { - value = m_testRun.getPropertyAsSingleValue(m_propName); + // This has an observable side-effect of calling, so we don't need + // to store its return value + m_testRun.getPropertyAsSingleValue(m_propName); } - // Enure variable is used so that it is not optimised away by the compiler - value += 1.0; } LogManager m_testRun; diff --git a/Framework/API/test/MDFrameValidatorTest.h b/Framework/API/test/MDFrameValidatorTest.h index c63213dc1cb47863cd175dec4624b1cb69e23c20..13ff4724cc59e291e57e001eac3a5ba74fb13b63 100644 --- a/Framework/API/test/MDFrameValidatorTest.h +++ b/Framework/API/test/MDFrameValidatorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/MDGeometryTest.h b/Framework/API/test/MDGeometryTest.h index 6a47c05bebd57cc50abe64794c20d5b1dce872b2..14852970a200c5be36fc67e90d3d341c1ce2dd9b 100644 --- a/Framework/API/test/MDGeometryTest.h +++ b/Framework/API/test/MDGeometryTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/MatrixWorkspaceMDIteratorTest.h b/Framework/API/test/MatrixWorkspaceMDIteratorTest.h index 734a3ddfd93724932e97e276efd9b9bf4e0e8e1e..0c64289081183eec5f6512247f94843f84eac99a 100644 --- a/Framework/API/test/MatrixWorkspaceMDIteratorTest.h +++ b/Framework/API/test/MatrixWorkspaceMDIteratorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/MatrixWorkspaceTest.h b/Framework/API/test/MatrixWorkspaceTest.h index 5271190336827052988f8aaa6d4f1b841332f5cf..591ec3fa3c24d92725574d838debdf7d5fcc2948 100644 --- a/Framework/API/test/MatrixWorkspaceTest.h +++ b/Framework/API/test/MatrixWorkspaceTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/MuParserUtilsTest.h b/Framework/API/test/MuParserUtilsTest.h index a48011253e3ffac447fd3aa83ba6e0366705be78..a7699b210b145beee34423f773190b998d7e2bce 100644 --- a/Framework/API/test/MuParserUtilsTest.h +++ b/Framework/API/test/MuParserUtilsTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/MultiDomainFunctionTest.h b/Framework/API/test/MultiDomainFunctionTest.h index 545fcf087b34befd551ed37857ce0c69ef42686f..31f604a5c32308830875da2e9ddbf8e00eb70e4a 100644 --- a/Framework/API/test/MultiDomainFunctionTest.h +++ b/Framework/API/test/MultiDomainFunctionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -324,7 +324,6 @@ public: void test_attribute_domain_range() { multi.clearDomainIndices(); multi.setLocalAttributeValue(0, "domains", "0-2"); - return; multi.setLocalAttributeValue(1, "domains", "i"); multi.setLocalAttributeValue(2, "domains", "i"); @@ -336,7 +335,7 @@ public: const FunctionDomain1D &d0 = static_cast<const FunctionDomain1D &>(domain.getDomain(0)); for (size_t i = 0; i < 9; ++i) { - TS_ASSERT_EQUALS(values.getCalculated(i), A + B * d0[i]); + TS_ASSERT_DELTA(values.getCalculated(i), A + B * d0[i], 1e-6); } A = multi.getFunction(0)->getParameter("A") + @@ -346,7 +345,7 @@ public: const FunctionDomain1D &d1 = static_cast<const FunctionDomain1D &>(domain.getDomain(1)); for (size_t i = 9; i < 19; ++i) { - TS_ASSERT_EQUALS(values.getCalculated(i), A + B * d1[i - 9]); + TS_ASSERT_DELTA(values.getCalculated(i), A + B * d1[i - 9], 1e-6); } A = multi.getFunction(0)->getParameter("A") + @@ -356,7 +355,7 @@ public: const FunctionDomain1D &d2 = static_cast<const FunctionDomain1D &>(domain.getDomain(2)); for (size_t i = 19; i < 30; ++i) { - TS_ASSERT_EQUALS(values.getCalculated(i), A + B * d2[i - 19]); + TS_ASSERT_DELTA(values.getCalculated(i), A + B * d2[i - 19], 1e-6); } } diff --git a/Framework/API/test/MultiPeriodGroupAlgorithmTest.h b/Framework/API/test/MultiPeriodGroupAlgorithmTest.h index a2519d79515212793ffc59b98c853c272de51fc8..a516d8e4bbd9cefd28cedf94bcf0e1a2be95ece6 100644 --- a/Framework/API/test/MultiPeriodGroupAlgorithmTest.h +++ b/Framework/API/test/MultiPeriodGroupAlgorithmTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/MultiPeriodGroupTestBase.h b/Framework/API/test/MultiPeriodGroupTestBase.h index 79f0c403b35fbc18227257caae5cd5703579172b..6a27600bb90b7afe45c1591bf4d0722278d80375 100644 --- a/Framework/API/test/MultiPeriodGroupTestBase.h +++ b/Framework/API/test/MultiPeriodGroupTestBase.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /* * MultiPeriodGroupTestBase.h @@ -28,7 +28,7 @@ class MultiPeriodGroupTestBase { protected: // Helper method to add multiperiod logs to make a workspacegroup look like a // real multiperiod workspace group. - void add_periods_logs(WorkspaceGroup_sptr ws) { + void add_periods_logs(const WorkspaceGroup_sptr &ws) { int nperiods = static_cast<int>(ws->size()); for (size_t i = 0; i < ws->size(); ++i) { MatrixWorkspace_sptr currentWS = @@ -45,7 +45,7 @@ protected: /// Helper to fabricate a workspace group consisting of equal sized /// matrixworkspaces. WorkspaceGroup_sptr - create_good_multiperiod_workspace_group(const std::string name) { + create_good_multiperiod_workspace_group(const std::string &name) { MatrixWorkspace_sptr a = MatrixWorkspace_sptr(new WorkspaceTester); MatrixWorkspace_sptr b = MatrixWorkspace_sptr(new WorkspaceTester); diff --git a/Framework/API/test/MultiPeriodGroupWorkerTest.h b/Framework/API/test/MultiPeriodGroupWorkerTest.h index 2c4c8c314215a70d6b92235903b98c0d4317bde8..5c2e7336f8d5f4784a15f4d6303493ca25c3a79b 100644 --- a/Framework/API/test/MultiPeriodGroupWorkerTest.h +++ b/Framework/API/test/MultiPeriodGroupWorkerTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/MultipleExperimentInfosTest.h b/Framework/API/test/MultipleExperimentInfosTest.h index c1d242e5104618f94e513dda4250e5d7bb144f07..76c13fb6d507c576d5d92ca7c24bf8a0908d55c4 100644 --- a/Framework/API/test/MultipleExperimentInfosTest.h +++ b/Framework/API/test/MultipleExperimentInfosTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/MultipleFilePropertyTest.h b/Framework/API/test/MultipleFilePropertyTest.h index 9aea20a643a777b7fa83949811d0b7ffafcbb5b5..c651135ace81b674ecc77ecc196bdf683ac67e04 100644 --- a/Framework/API/test/MultipleFilePropertyTest.h +++ b/Framework/API/test/MultipleFilePropertyTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/NotebookBuilderTest.h b/Framework/API/test/NotebookBuilderTest.h index 21032509fe260a047ca34edfeab1e0ed95ccfc8a..d927cc18ab745a68afc9c6465d236374cb94ccd2 100644 --- a/Framework/API/test/NotebookBuilderTest.h +++ b/Framework/API/test/NotebookBuilderTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/NotebookWriterTest.h b/Framework/API/test/NotebookWriterTest.h index bd35c72d269487573d39ee8bed0b044e031d4716..f13770bd7fb8794f3c8eba1e4077998450cec9a9 100644 --- a/Framework/API/test/NotebookWriterTest.h +++ b/Framework/API/test/NotebookWriterTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/NumericAxisTest.h b/Framework/API/test/NumericAxisTest.h index 7482d0d9602e09731b36aab94c36796aa02c0f2c..367bf57f04a3da03e4b7fb0740b3f1038d07a1b1 100644 --- a/Framework/API/test/NumericAxisTest.h +++ b/Framework/API/test/NumericAxisTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/NumericAxisValidatorTest.h b/Framework/API/test/NumericAxisValidatorTest.h index 22ab691a1da7f1949d0a6d6991368ddd143040cf..9ad2b74ba2a4cbe2d3d1395726cbd9e04401facb 100644 --- a/Framework/API/test/NumericAxisValidatorTest.h +++ b/Framework/API/test/NumericAxisValidatorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/OrientedLatticeValidatorTest.h b/Framework/API/test/OrientedLatticeValidatorTest.h index 1dc9c1bcfb71ab84fd32a94721954612cd496f5b..593cbeaef8ef69631d774b93eb9f01ca9c575d7e 100644 --- a/Framework/API/test/OrientedLatticeValidatorTest.h +++ b/Framework/API/test/OrientedLatticeValidatorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/ParamFunctionAttributeHolderTest.h b/Framework/API/test/ParamFunctionAttributeHolderTest.h index fc428ae99ee53862aa927590cd79a7c99cb514e0..a4b04297de3b5bb4ea33cbf8366e373051517186 100644 --- a/Framework/API/test/ParamFunctionAttributeHolderTest.h +++ b/Framework/API/test/ParamFunctionAttributeHolderTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/ParameterReferenceTest.h b/Framework/API/test/ParameterReferenceTest.h index 5ff7ea6b587e4e8630482a9dde7a1f2b60f83cf8..0f85a54b2e7de4975ba2240169373f0394f96793 100644 --- a/Framework/API/test/ParameterReferenceTest.h +++ b/Framework/API/test/ParameterReferenceTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/ParameterTieTest.h b/Framework/API/test/ParameterTieTest.h index dfff3637d169f22f38d66050dc703ee0ce2df452..ceb53cd88feca7648d171d683fe796f95ff38e7f 100644 --- a/Framework/API/test/ParameterTieTest.h +++ b/Framework/API/test/ParameterTieTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/PeakFunctionIntegratorTest.h b/Framework/API/test/PeakFunctionIntegratorTest.h index 76c3b80ecf7cf0679790bca5b7a67d02908b0f7d..e6a3303cd4dde48305482f92f8dfd85be6222659 100644 --- a/Framework/API/test/PeakFunctionIntegratorTest.h +++ b/Framework/API/test/PeakFunctionIntegratorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -84,7 +84,8 @@ private: return gaussian; } - double getGaussianAnalyticalInfiniteIntegral(IPeakFunction_sptr gaussian) { + double + getGaussianAnalyticalInfiniteIntegral(const IPeakFunction_sptr &gaussian) { return gaussian->height() * gaussian->fwhm() / (2.0 * sqrt(M_LN2)) * sqrt(M_PI); } diff --git a/Framework/API/test/PrecompiledHeader.h b/Framework/API/test/PrecompiledHeader.h index 2938ffd0a3e091e68eeb75289179e3af4211b5a3..e6fdf6551cbda585cc789772079a0760cddd669b 100644 --- a/Framework/API/test/PrecompiledHeader.h +++ b/Framework/API/test/PrecompiledHeader.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/ProgressTest.h b/Framework/API/test/ProgressTest.h index 769157044b3a07c8a0d62824ba4d5b8eed976304..2504e378f1cb461b18d7343af351e20a23866bc1 100644 --- a/Framework/API/test/ProgressTest.h +++ b/Framework/API/test/ProgressTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/ProjectionTest.h b/Framework/API/test/ProjectionTest.h index cd929c9fe8d26cd2996b6f11fed600f74d3928f6..d151cd6f79a275919425f8a263eda3be072da83f 100644 --- a/Framework/API/test/ProjectionTest.h +++ b/Framework/API/test/ProjectionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/PropertyManagerHelper.h b/Framework/API/test/PropertyManagerHelper.h index aa228d879bed8ae442dd39a3bb475de095e573dd..594e63608fdd4e5e1e9bf7f45091ba2af42ed4c3 100644 --- a/Framework/API/test/PropertyManagerHelper.h +++ b/Framework/API/test/PropertyManagerHelper.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/RawCountValidatorTest.h b/Framework/API/test/RawCountValidatorTest.h index b5114b2a0287b364eeb60ae7338d9147c6bebb15..270d6baff7e86a4085e12daeaf617a32c26c4e74 100644 --- a/Framework/API/test/RawCountValidatorTest.h +++ b/Framework/API/test/RawCountValidatorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/RemoteJobManagerFactoryTest.h b/Framework/API/test/RemoteJobManagerFactoryTest.h index 8a3682c7615f133e9d35265da4a350a4a13b89fa..80d42d4d7789bcd1ee421aa123e2c607e57b87b6 100644 --- a/Framework/API/test/RemoteJobManagerFactoryTest.h +++ b/Framework/API/test/RemoteJobManagerFactoryTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/ResizeRectangularDetectorHelperTest.h b/Framework/API/test/ResizeRectangularDetectorHelperTest.h index 350a07e748dfe06bde38bea7aaf959264e827bd0..833350dfa6653336f35ebd904256219b63373f53 100644 --- a/Framework/API/test/ResizeRectangularDetectorHelperTest.h +++ b/Framework/API/test/ResizeRectangularDetectorHelperTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/RunTest.h b/Framework/API/test/RunTest.h index 06611321aff2963520068d97a3dc5462e5aaf320..a41f319a7eae852b0a4d9b5ebdca618e2a06d844 100644 --- a/Framework/API/test/RunTest.h +++ b/Framework/API/test/RunTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -427,7 +427,7 @@ public: TS_ASSERT_EQUALS(runCopy.getGoniometer().getNumberAxes(), 3); } - void addTimeSeriesEntry(Run &runInfo, std::string name, double val) { + void addTimeSeriesEntry(Run &runInfo, const std::string &name, double val) { TimeSeriesProperty<double> *tsp; tsp = new TimeSeriesProperty<double>(name); tsp->addValue("2011-05-24T00:00:00", val); @@ -630,12 +630,9 @@ public: } void test_Accessing_Single_Value_From_Times_Series_A_Large_Number_Of_Times() { - double value(0.0); for (size_t i = 0; i < 20000; ++i) { - value = m_testRun.getPropertyAsSingleValue(m_propName); + m_testRun.getPropertyAsSingleValue(m_propName); } - // Enure variable is used so that it is not optimised away by the compiler - value += 1.0; } Run m_testRun; diff --git a/Framework/API/test/SampleShapeValidatorTest.h b/Framework/API/test/SampleShapeValidatorTest.h index fdba04a812cdea82486374cf243bdeeb2009b97a..c1c0f3c0942154122b548bc5a31495c80280b61b 100644 --- a/Framework/API/test/SampleShapeValidatorTest.h +++ b/Framework/API/test/SampleShapeValidatorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/SampleTest.h b/Framework/API/test/SampleTest.h index 2eec3db80505026386af7e4987dbe536efdeba86..b4583c3705678cf5d5f5aa5bb30e8d16f934710b 100644 --- a/Framework/API/test/SampleTest.h +++ b/Framework/API/test/SampleTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/SampleValidatorTest.h b/Framework/API/test/SampleValidatorTest.h index 9361d936ae4cb0b9837e0f63ca915dc06c3b15bd..b211b8f9ee9a345cfe221cae38d7399624c15dcd 100644 --- a/Framework/API/test/SampleValidatorTest.h +++ b/Framework/API/test/SampleValidatorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/ScopedWorkspaceTest.h b/Framework/API/test/ScopedWorkspaceTest.h index 1ba9386088cbd43fdd2ec07bb499fe43a1fa877c..4ef85a54313cad45e63aa45209df0bd5dfd1c6e7 100644 --- a/Framework/API/test/ScopedWorkspaceTest.h +++ b/Framework/API/test/ScopedWorkspaceTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/ScriptBuilderTest.h b/Framework/API/test/ScriptBuilderTest.h index e8768f09297f348470dea77a2a52b60622d6b0e0..a1afc488222460bbdcc86d058b3014eeed7622bb 100644 --- a/Framework/API/test/ScriptBuilderTest.h +++ b/Framework/API/test/ScriptBuilderTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/SingleCountValidatorTest.h b/Framework/API/test/SingleCountValidatorTest.h index 8ee809e79e18178e28ed712503b7fe89ce0bb806..ef2fbeae48551ddd313ae2d930d2fc8cbc64172a 100644 --- a/Framework/API/test/SingleCountValidatorTest.h +++ b/Framework/API/test/SingleCountValidatorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/SpectraAxisTest.h b/Framework/API/test/SpectraAxisTest.h index d8c15819eccf2312269457c52e3965a8f5c70662..83b5161beb710d6c1e38c93aad1790c9dda39dc4 100644 --- a/Framework/API/test/SpectraAxisTest.h +++ b/Framework/API/test/SpectraAxisTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/SpectraAxisValidatorTest.h b/Framework/API/test/SpectraAxisValidatorTest.h index 280a5cbed6fa7c0c21ddb442590c838fa0f0c667..3ac3f2048827bd27409d0b37ba25de5bd801046f 100644 --- a/Framework/API/test/SpectraAxisValidatorTest.h +++ b/Framework/API/test/SpectraAxisValidatorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/SpectrumDetectorMappingTest.h b/Framework/API/test/SpectrumDetectorMappingTest.h index a8e32d5bbb491074586e75cb5ffe5aa3da2c725f..4bb4eca62356c3ab0933b53fe3c4cae8d76f6bb1 100644 --- a/Framework/API/test/SpectrumDetectorMappingTest.h +++ b/Framework/API/test/SpectrumDetectorMappingTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/SpectrumInfoTest.h b/Framework/API/test/SpectrumInfoTest.h index a518f879366f8d0d4c8d7dcd1ecbfbf2e01fb0dd..69f15235e8f4274837a41c45172050949139744f 100644 --- a/Framework/API/test/SpectrumInfoTest.h +++ b/Framework/API/test/SpectrumInfoTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/TempFunctionTest.h b/Framework/API/test/TempFunctionTest.h index d4bcb44af5eecdbc16f124dab1cbc67d0da63e7e..85db4ba12a62516b0283f2798876a923cc4af49e 100644 --- a/Framework/API/test/TempFunctionTest.h +++ b/Framework/API/test/TempFunctionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/TextAxisTest.h b/Framework/API/test/TextAxisTest.h index 018e3e54e7d317728c18946a515bed87746e2a56..dcf87120c6824cbbeb2e1c2627eae9ed7d9f5bd5 100644 --- a/Framework/API/test/TextAxisTest.h +++ b/Framework/API/test/TextAxisTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/TransformScaleFactoryTest.h b/Framework/API/test/TransformScaleFactoryTest.h index b01991cb79948e3b7660348238ee4da3ee2215cf..0db6322ce7ce02923a6cf5c2c905278a1d1510a1 100644 --- a/Framework/API/test/TransformScaleFactoryTest.h +++ b/Framework/API/test/TransformScaleFactoryTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/VectorParameterParserTest.h b/Framework/API/test/VectorParameterParserTest.h index d02f0811d768df8362e2ae023df998f955bebd73..47254710415b834938510b1e8975135ead917182 100644 --- a/Framework/API/test/VectorParameterParserTest.h +++ b/Framework/API/test/VectorParameterParserTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/VectorParameterTest.h b/Framework/API/test/VectorParameterTest.h index b93fc602a20843704a44003e7fb4c174e00d5425..6460042487ead44345a75dd341d3cd97a2fd4202 100644 --- a/Framework/API/test/VectorParameterTest.h +++ b/Framework/API/test/VectorParameterTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/WorkspaceFactoryTest.h b/Framework/API/test/WorkspaceFactoryTest.h index e629c0fa97821c0713e7c685ecd898f8b4ed5f05..b9f7a8fc75d05dbf57b9d80d13138844b8e233f7 100644 --- a/Framework/API/test/WorkspaceFactoryTest.h +++ b/Framework/API/test/WorkspaceFactoryTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/WorkspaceGroupTest.h b/Framework/API/test/WorkspaceGroupTest.h index 0375af16d12e1045c7c9ec6bd84681b2c7fff900..37565ec2f0125c450b9ee63d35d6096932c8e2a9 100644 --- a/Framework/API/test/WorkspaceGroupTest.h +++ b/Framework/API/test/WorkspaceGroupTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -50,7 +50,7 @@ public: class WorkspaceGroupTest : public CxxTest::TestSuite { private: /// Helper method to add an 'nperiods' log value to each workspace in a group. - void add_periods_logs(WorkspaceGroup_sptr ws, int nperiods = -1) { + void add_periods_logs(const WorkspaceGroup_sptr &ws, int nperiods = -1) { for (size_t i = 0; i < ws->size(); ++i) { MatrixWorkspace_sptr currentWS = boost::dynamic_pointer_cast<MatrixWorkspace>(ws->getItem(i)); diff --git a/Framework/API/test/WorkspaceHasDxValidatorTest.h b/Framework/API/test/WorkspaceHasDxValidatorTest.h index de11b5597be03560677515f38999cf820324b652..d1f46b063ea6f8dfd99b31995380adaec9791cae 100644 --- a/Framework/API/test/WorkspaceHasDxValidatorTest.h +++ b/Framework/API/test/WorkspaceHasDxValidatorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/WorkspaceHistoryIOTest.h b/Framework/API/test/WorkspaceHistoryIOTest.h index 4e5bd24156f0d099dace5297ec99a4534efde226..29b4449a0e4fff67044bdeb17ac3cf8044b4a126 100644 --- a/Framework/API/test/WorkspaceHistoryIOTest.h +++ b/Framework/API/test/WorkspaceHistoryIOTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/WorkspaceHistoryTest.h b/Framework/API/test/WorkspaceHistoryTest.h index 9d8de9a165fbe879cdfb4a506f3adf5d7c198c6d..a61316193a82c4069f95018df5bd1be4c2f1b0f5 100644 --- a/Framework/API/test/WorkspaceHistoryTest.h +++ b/Framework/API/test/WorkspaceHistoryTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/WorkspaceNearestNeighbourInfoTest.h b/Framework/API/test/WorkspaceNearestNeighbourInfoTest.h index a8c418b2b1a1a782bae140ea6eee4454da745f30..71c5ff379a1247078b84924d647574fcaaf7a54d 100644 --- a/Framework/API/test/WorkspaceNearestNeighbourInfoTest.h +++ b/Framework/API/test/WorkspaceNearestNeighbourInfoTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/WorkspaceNearestNeighboursTest.h b/Framework/API/test/WorkspaceNearestNeighboursTest.h index b997db7daa5ff95c0d2d6fc69feb9e48c41732d0..d5ec89e9485439b67fac4f776dd7ee075f22e499 100644 --- a/Framework/API/test/WorkspaceNearestNeighboursTest.h +++ b/Framework/API/test/WorkspaceNearestNeighboursTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -59,7 +59,7 @@ private: : public Mantid::API::WorkspaceNearestNeighbours { public: ExposedNearestNeighbours(const SpectrumInfo &spectrumInfo, - const std::vector<specnum_t> spectrumNumbers, + const std::vector<specnum_t> &spectrumNumbers, bool ignoreMasked = false) : WorkspaceNearestNeighbours(8, spectrumInfo, spectrumNumbers, ignoreMasked) {} diff --git a/Framework/API/test/WorkspaceOpOverloadsTest.h b/Framework/API/test/WorkspaceOpOverloadsTest.h index 58b6fb52c78478595bfafb6488691b3428467a5a..a9f8193711a866f33dcaaebe145b9282a147db11 100644 --- a/Framework/API/test/WorkspaceOpOverloadsTest.h +++ b/Framework/API/test/WorkspaceOpOverloadsTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/WorkspacePropertyTest.h b/Framework/API/test/WorkspacePropertyTest.h index 2c8b09d7423ead4c52ca8177358cd015eabf1094..3d888cbbaaf9de04053ef18a78ad25bb5917e055 100644 --- a/Framework/API/test/WorkspacePropertyTest.h +++ b/Framework/API/test/WorkspacePropertyTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/API/test/WorkspaceUnitValidatorTest.h b/Framework/API/test/WorkspaceUnitValidatorTest.h index 2dabb19e75a07e1b20188b473dedbd3f6b2ebdff..044c8d5ef5d7899ac8386c58356cadf190adbd30 100644 --- a/Framework/API/test/WorkspaceUnitValidatorTest.h +++ b/Framework/API/test/WorkspaceUnitValidatorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/AbsorptionCorrection.h b/Framework/Algorithms/inc/MantidAlgorithms/AbsorptionCorrection.h index 63204b0ce58f3f8a168879076665ff70884785e3..b12fba3150984541d7c364be257e296b4f4493cf 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/AbsorptionCorrection.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/AbsorptionCorrection.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/AddLogDerivative.h b/Framework/Algorithms/inc/MantidAlgorithms/AddLogDerivative.h index db1aef6c266454a995bc726f24e2fcf58d26c036..9c276b4cbb5ad2ebeca3d42d13fa3a6bebe64cb3 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/AddLogDerivative.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/AddLogDerivative.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/AddNote.h b/Framework/Algorithms/inc/MantidAlgorithms/AddNote.h index c42f801d3302d84eece309ee1be9fb1c31794e9e..ed30b23f3a086d20f957e42bca0b6d835452b149 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/AddNote.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/AddNote.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/AddPeak.h b/Framework/Algorithms/inc/MantidAlgorithms/AddPeak.h index ff355cce5efb4b081dded26f1d7b1fbf8d3e273f..d0edc4e6c2f010df4af39a4dec793a7669415e96 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/AddPeak.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/AddPeak.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/AddSampleLog.h b/Framework/Algorithms/inc/MantidAlgorithms/AddSampleLog.h index 7a6d28ac040290be48407dc2da125d11e82852d4..5f59e620a7bdc08bb02724ffd93db19a9fb84560 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/AddSampleLog.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/AddSampleLog.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -76,21 +76,22 @@ private: Types::Core::DateAndTime getRunStart(API::Run &run_obj); /// get value vector of the integer TimeSeriesProperty entries - std::vector<int> getIntValues(API::MatrixWorkspace_const_sptr dataws, + std::vector<int> getIntValues(const API::MatrixWorkspace_const_sptr &dataws, int workspace_index); /// get value vector of the double TimeSeriesProperty entries - std::vector<double> getDblValues(API::MatrixWorkspace_const_sptr dataws, - int workspace_index); + std::vector<double> + getDblValues(const API::MatrixWorkspace_const_sptr &dataws, + int workspace_index); /// get the vector of times of the TimeSeriesProperty entries std::vector<Types::Core::DateAndTime> - getTimes(API::MatrixWorkspace_const_sptr dataws, int workspace_index, + getTimes(const API::MatrixWorkspace_const_sptr &dataws, int workspace_index, bool is_epoch, bool is_second, API::Run &run_obj); /// get meta data from input workspace or user input - void getMetaData(API::MatrixWorkspace_const_sptr dataws, bool &epochtime, - std::string &timeunit); + void getMetaData(const API::MatrixWorkspace_const_sptr &dataws, + bool &epochtime, std::string &timeunit); }; } // namespace Algorithms diff --git a/Framework/Algorithms/inc/MantidAlgorithms/AddTimeSeriesLog.h b/Framework/Algorithms/inc/MantidAlgorithms/AddTimeSeriesLog.h index acd5059a0a142cb37c6f77d1b1742c7f5642b83f..28eea19e64cbf96fcaa8df8cc08795a0f533ee13 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/AddTimeSeriesLog.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/AddTimeSeriesLog.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/AlignDetectors.h b/Framework/Algorithms/inc/MantidAlgorithms/AlignDetectors.h index 1bc385de128f306c2768566ec014064a4fb52f4c..b2dba6d8716db4b3252f7a350b47245f59f04e81 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/AlignDetectors.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/AlignDetectors.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -73,9 +73,9 @@ private: void align(const ConversionFactors &converter, API::Progress &progress, DataObjects::EventWorkspace &outputWS); - void loadCalFile(API::MatrixWorkspace_sptr inputWS, + void loadCalFile(const API::MatrixWorkspace_sptr &inputWS, const std::string &filename); - void getCalibrationWS(API::MatrixWorkspace_sptr inputWS); + void getCalibrationWS(const API::MatrixWorkspace_sptr &inputWS); Mantid::API::ITableWorkspace_sptr m_calibrationWS; diff --git a/Framework/Algorithms/inc/MantidAlgorithms/AnnularRingAbsorption.h b/Framework/Algorithms/inc/MantidAlgorithms/AnnularRingAbsorption.h index 45409f06dca1a25c6bc2bbf362003e5fb3bd6b7c..7822f866e3a5c0292c800b21fcf30e510abcdffb 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/AnnularRingAbsorption.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/AnnularRingAbsorption.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/AnyShapeAbsorption.h b/Framework/Algorithms/inc/MantidAlgorithms/AnyShapeAbsorption.h index d677a66df7bf68e1891307e9e013518836d66392..c84c287d186304e50500bba01b3af95c167a4322 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/AnyShapeAbsorption.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/AnyShapeAbsorption.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ApodizationFunctions.h b/Framework/Algorithms/inc/MantidAlgorithms/ApodizationFunctions.h index a4b18737727ecd7f45b2950a05afde704e1f9864..f5abe826c90afec0cd7b7c195650ca5e2fb1a0f1 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/ApodizationFunctions.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/ApodizationFunctions.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/AppendSpectra.h b/Framework/Algorithms/inc/MantidAlgorithms/AppendSpectra.h index 9446aa444bb5a2b5ddea6009a4946e80a51a7529..6afe05b55a2f6146b426a7ce8e3216a4f875d307 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/AppendSpectra.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/AppendSpectra.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ApplyCalibration.h b/Framework/Algorithms/inc/MantidAlgorithms/ApplyCalibration.h index eb4dd9cabc983671e3975be1a3372d01005c19c1..c212f50a899b37c2892e57cce74218b69602383d 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/ApplyCalibration.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/ApplyCalibration.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ApplyDetailedBalance.h b/Framework/Algorithms/inc/MantidAlgorithms/ApplyDetailedBalance.h index 181d8ba881294df173cf9009fedca100facb8aa5..3cc6ec643393fa30cd3d93419f45a10ebb43091c 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/ApplyDetailedBalance.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/ApplyDetailedBalance.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ApplyFloodWorkspace.h b/Framework/Algorithms/inc/MantidAlgorithms/ApplyFloodWorkspace.h index c94ee7dc6375a1ce06d779b140b71649d9e803d7..14f204eea106a64cc11cec0a4b27c9a6a536f292 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/ApplyFloodWorkspace.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/ApplyFloodWorkspace.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ApplyTransmissionCorrection.h b/Framework/Algorithms/inc/MantidAlgorithms/ApplyTransmissionCorrection.h index cccc011216203213f66724bc25d845ed2f882295..c483951a2c554e6e73929ed4e3bb9e67e6125983 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/ApplyTransmissionCorrection.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/ApplyTransmissionCorrection.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/AverageLogData.h b/Framework/Algorithms/inc/MantidAlgorithms/AverageLogData.h index 336dcdfa85fa0c1c6b19902d51a1164d47137a8f..a24f8fc9400c4155c37583a4fc3ec83bfbe60d8e 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/AverageLogData.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/AverageLogData.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/Bin2DPowderDiffraction.h b/Framework/Algorithms/inc/MantidAlgorithms/Bin2DPowderDiffraction.h index bc88ad0d626c522b169b43619e0992dfbc8e3c46..5bd4f7d1bd5c6c8f3df6faa7f27c8c33f25b3342 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/Bin2DPowderDiffraction.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/Bin2DPowderDiffraction.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -47,7 +47,7 @@ private: DataObjects::EventWorkspace_sptr m_inputWS; ///< Pointer to the input event workspace int m_numberOfSpectra; ///< The number of spectra in the workspace - void normalizeToBinArea(API::MatrixWorkspace_sptr outWS); + void normalizeToBinArea(const API::MatrixWorkspace_sptr &outWS); }; double calcD(double wavelength, double sintheta); diff --git a/Framework/Algorithms/inc/MantidAlgorithms/BinaryOperateMasks.h b/Framework/Algorithms/inc/MantidAlgorithms/BinaryOperateMasks.h index f3aa75fef31548f02967d08fff980739ef3b2280..880540c40b2caffa37d448bc6dc8b7e0b5a998f2 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/BinaryOperateMasks.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/BinaryOperateMasks.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/BinaryOperation.h b/Framework/Algorithms/inc/MantidAlgorithms/BinaryOperation.h index e34fcd54b7900cd409cb1cfadf2fb27aef54a5f5..f8598c52cdf2b22216541b3d9968a09f78db9c47 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/BinaryOperation.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/BinaryOperation.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -193,7 +193,7 @@ protected: (void)ans; }; - OperandType getOperandType(const API::MatrixWorkspace_const_sptr ws); + OperandType getOperandType(const API::MatrixWorkspace_const_sptr &ws); virtual void checkRequirements(); @@ -255,8 +255,8 @@ private: void doSingleColumn(); void do2D(bool mismatchedSpectra); - void propagateBinMasks(const API::MatrixWorkspace_const_sptr rhs, - API::MatrixWorkspace_sptr out); + void propagateBinMasks(const API::MatrixWorkspace_const_sptr &rhs, + const API::MatrixWorkspace_sptr &out); /// Progress reporting std::unique_ptr<API::Progress> m_progress = nullptr; }; diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CalculateCarpenterSampleCorrection.h b/Framework/Algorithms/inc/MantidAlgorithms/CalculateCarpenterSampleCorrection.h index b44a6f568137066a5e3a1069a615c8d44a98a9b0..f1be5292a6be993923b03832422a9cfcb6faa734 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/CalculateCarpenterSampleCorrection.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/CalculateCarpenterSampleCorrection.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -61,10 +61,10 @@ private: API::MatrixWorkspace_sptr createOutputWorkspace(const API::MatrixWorkspace_sptr &inputWS, - const std::string) const; - void deleteWorkspace(API::MatrixWorkspace_sptr workspace); + const std::string &) const; + void deleteWorkspace(const API::MatrixWorkspace_sptr &workspace); API::MatrixWorkspace_sptr - setUncertainties(API::MatrixWorkspace_sptr workspace); + setUncertainties(const API::MatrixWorkspace_sptr &workspace); }; } // namespace Algorithms diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CalculateCountRate.h b/Framework/Algorithms/inc/MantidAlgorithms/CalculateCountRate.h index 33002207b0f52caf77121f858c9be2007f449a2b..46e26d08e66df7d919d75500e7f38c10711cc366 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/CalculateCountRate.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/CalculateCountRate.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CalculateDIFC.h b/Framework/Algorithms/inc/MantidAlgorithms/CalculateDIFC.h index a23046749f0f9329305064755ee9dde562e659c4..cd7b0cf95e0a15c69b374429935ac6b268d25405 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/CalculateDIFC.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/CalculateDIFC.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CalculateDynamicRange.h b/Framework/Algorithms/inc/MantidAlgorithms/CalculateDynamicRange.h index 065401b1f95a158665339ab2034d5f5db9a27b24..bdf3f4a5bfc4b05ce5f77be4098d99f77dfcfefa 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/CalculateDynamicRange.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/CalculateDynamicRange.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -25,8 +25,8 @@ public: private: void init() override; void exec() override; - void calculateQMinMax(API::MatrixWorkspace_sptr, const std::vector<size_t> &, - const std::string &); + void calculateQMinMax(const API::MatrixWorkspace_sptr &, + const std::vector<size_t> &, const std::string &); }; } // namespace Algorithms diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CalculateEfficiency.h b/Framework/Algorithms/inc/MantidAlgorithms/CalculateEfficiency.h index 6080224a8cfdf75a6c8802a2fae0b5c60a1e7155..b88b74a74fa40b7352af657a57d96e7a6672a7a7 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/CalculateEfficiency.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/CalculateEfficiency.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -70,19 +70,19 @@ private: void exec() override; /// Sum all detectors, excluding monitors and masked detectors - void sumUnmaskedDetectors(API::MatrixWorkspace_sptr rebinnedWS, double &sum, - double &error, int &nPixels); + void sumUnmaskedDetectors(const API::MatrixWorkspace_sptr &rebinnedWS, + double &sum, double &error, int &nPixels); /// Normalize all detectors to get the relative efficiency - void normalizeDetectors(API::MatrixWorkspace_sptr rebinnedWS, - API::MatrixWorkspace_sptr outputWS, double sum, + void normalizeDetectors(const API::MatrixWorkspace_sptr &rebinnedWS, + const API::MatrixWorkspace_sptr &outputWS, double sum, double error, int nPixels, double min_eff, double max_eff); void maskComponent(API::MatrixWorkspace &ws, const std::string &componentName); - void maskEdges(API::MatrixWorkspace_sptr ws, int high, int low, int left, - int right, const std::string &componentName); + void maskEdges(const API::MatrixWorkspace_sptr &ws, int high, int low, + int left, int right, const std::string &componentName); }; } // namespace Algorithms diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CalculateEfficiency2.h b/Framework/Algorithms/inc/MantidAlgorithms/CalculateEfficiency2.h index f9868ce58c526152dec21a9db84904178eda1da4..c93dbcf677c3a8d055ed9521e4273b019e289a80 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/CalculateEfficiency2.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/CalculateEfficiency2.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CalculateFlatBackground.h b/Framework/Algorithms/inc/MantidAlgorithms/CalculateFlatBackground.h index 5921aebeecb7240dbcafc13585cf8d105bc9126f..c2c3e918f72ef01ca6b30f5181ac10de179b7da7 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/CalculateFlatBackground.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/CalculateFlatBackground.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CalculateIqt.h b/Framework/Algorithms/inc/MantidAlgorithms/CalculateIqt.h index cba028ac9c8c378e77a636afd2f59dd9fab03842..e060732d340ebfb03447639628ab3a4925add227 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/CalculateIqt.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/CalculateIqt.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -28,24 +28,26 @@ private: std::map<std::string, std::string> validateInputs() override; std::string rebinParamsAsString(); API::MatrixWorkspace_sptr - monteCarloErrorCalculation(API::MatrixWorkspace_sptr sample, - API::MatrixWorkspace_sptr resolution, + monteCarloErrorCalculation(const API::MatrixWorkspace_sptr &sample, + const API::MatrixWorkspace_sptr &resolution, const std::string &rebinParams, const int seed, const bool calculateErrors, const int nIterations); - API::MatrixWorkspace_sptr rebin(API::MatrixWorkspace_sptr workspace, + API::MatrixWorkspace_sptr rebin(const API::MatrixWorkspace_sptr &workspace, const std::string ¶ms); - API::MatrixWorkspace_sptr integration(API::MatrixWorkspace_sptr workspace); API::MatrixWorkspace_sptr - convertToPointData(API::MatrixWorkspace_sptr workspace); + integration(const API::MatrixWorkspace_sptr &workspace); API::MatrixWorkspace_sptr - extractFFTSpectrum(API::MatrixWorkspace_sptr workspace); - API::MatrixWorkspace_sptr divide(API::MatrixWorkspace_sptr lhsWorkspace, - API::MatrixWorkspace_sptr rhsWorkspace); - API::MatrixWorkspace_sptr cropWorkspace(API::MatrixWorkspace_sptr workspace, - const double xMax); + convertToPointData(const API::MatrixWorkspace_sptr &workspace); API::MatrixWorkspace_sptr - replaceSpecialValues(API::MatrixWorkspace_sptr workspace); + extractFFTSpectrum(const API::MatrixWorkspace_sptr &workspace); + API::MatrixWorkspace_sptr + divide(const API::MatrixWorkspace_sptr &lhsWorkspace, + const API::MatrixWorkspace_sptr &rhsWorkspace); + API::MatrixWorkspace_sptr + cropWorkspace(const API::MatrixWorkspace_sptr &workspace, const double xMax); + API::MatrixWorkspace_sptr + replaceSpecialValues(const API::MatrixWorkspace_sptr &workspace); API::MatrixWorkspace_sptr removeInvalidData(API::MatrixWorkspace_sptr workspace); @@ -54,7 +56,7 @@ private: const std::string &rebinParams); API::MatrixWorkspace_sptr calculateIqt(API::MatrixWorkspace_sptr workspace, - API::MatrixWorkspace_sptr resolutionWorkspace, + const API::MatrixWorkspace_sptr &resolutionWorkspace, const std::string &rebinParams); API::MatrixWorkspace_sptr doSimulation(API::MatrixWorkspace_sptr sample, API::MatrixWorkspace_sptr resolution, diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CalculatePlaczekSelfScattering.h b/Framework/Algorithms/inc/MantidAlgorithms/CalculatePlaczekSelfScattering.h index 43f1ccd6dafe6e1c1fbed741cf6ca15546e4f310..22f065380f7167a16ad7410d44ffafba1b092740 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/CalculatePlaczekSelfScattering.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/CalculatePlaczekSelfScattering.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CalculatePolynomialBackground.h b/Framework/Algorithms/inc/MantidAlgorithms/CalculatePolynomialBackground.h index ea37a67a56dffa417ec5e9c5636f76671b5bba2b..c250bedc6d31d59c19d1930b3a0b19df64594e44 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/CalculatePolynomialBackground.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/CalculatePolynomialBackground.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CalculateSlits.h b/Framework/Algorithms/inc/MantidAlgorithms/CalculateSlits.h index c2f4e1be7d3234316384699c98314856f826ff25..818fc5a5f25065ea85fb5f22fe12605a1f809cf6 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/CalculateSlits.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/CalculateSlits.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CalculateTransmission.h b/Framework/Algorithms/inc/MantidAlgorithms/CalculateTransmission.h index a25a9d0746c528064cef1577bb4945f0b169a874..1a9c176f94447ceee85a412531eae1a93e600160 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/CalculateTransmission.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/CalculateTransmission.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -80,27 +80,27 @@ private: void exec() override; /// Pull out a single spectrum from a 2D workspace - API::MatrixWorkspace_sptr extractSpectra(API::MatrixWorkspace_sptr ws, + API::MatrixWorkspace_sptr extractSpectra(const API::MatrixWorkspace_sptr &ws, const std::vector<size_t> &indices); /// Returns a workspace with the evaulation of the fit to the calculated /// transmission fraction - API::MatrixWorkspace_sptr fit(API::MatrixWorkspace_sptr raw, + API::MatrixWorkspace_sptr fit(const API::MatrixWorkspace_sptr &raw, const std::vector<double> &rebinParams, - const std::string fitMethod); + const std::string &fitMethod); /// Call the Linear fitting algorithm as a child algorithm - API::MatrixWorkspace_sptr fitData(API::MatrixWorkspace_sptr WS, double &grad, - double &offset); + API::MatrixWorkspace_sptr fitData(const API::MatrixWorkspace_sptr &WS, + double &grad, double &offset); /// Call the Polynomial fitting algorithm as a child algorithm - API::MatrixWorkspace_sptr fitPolynomial(API::MatrixWorkspace_sptr WS, + API::MatrixWorkspace_sptr fitPolynomial(const API::MatrixWorkspace_sptr &WS, int order, std::vector<double> &coeficients); /// Calls the rebin algorithm API::MatrixWorkspace_sptr rebin(const std::vector<double> &binParams, - API::MatrixWorkspace_sptr ws); + const API::MatrixWorkspace_sptr &ws); /// Outpus message to log if the detector at the given index is not a monitor /// in both input workspaces. - void logIfNotMonitor(API::MatrixWorkspace_sptr sampleWS, - API::MatrixWorkspace_sptr directWS, size_t index); + void logIfNotMonitor(const API::MatrixWorkspace_sptr &sampleWS, + const API::MatrixWorkspace_sptr &directWS, size_t index); }; } // namespace Algorithms diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CalculateTransmissionBeamSpreader.h b/Framework/Algorithms/inc/MantidAlgorithms/CalculateTransmissionBeamSpreader.h index f8794b98e783cb03a419930a748b45e7481ac621..ed1123c24199e4b23405f5550a290c26533c0c3c 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/CalculateTransmissionBeamSpreader.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/CalculateTransmissionBeamSpreader.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -85,12 +85,12 @@ private: void exec() override; /// Pull out a single spectrum from a 2D workspace - API::MatrixWorkspace_sptr extractSpectrum(API::MatrixWorkspace_sptr WS, + API::MatrixWorkspace_sptr extractSpectrum(const API::MatrixWorkspace_sptr &WS, const size_t index); /// Call the Linear fitting algorithm as a child algorithm - API::MatrixWorkspace_sptr fitToData(API::MatrixWorkspace_sptr WS); + API::MatrixWorkspace_sptr fitToData(const API::MatrixWorkspace_sptr &WS); /// Sum the total detector, excluding masked pixels and monitors - API::MatrixWorkspace_sptr sumSpectra(API::MatrixWorkspace_sptr WS); + API::MatrixWorkspace_sptr sumSpectra(const API::MatrixWorkspace_sptr &WS); bool logFit = false; ///< If true, will take log of transmission curve before fitting diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CalculateZscore.h b/Framework/Algorithms/inc/MantidAlgorithms/CalculateZscore.h index bd5c5395df2870c91ef83cbfc7faba7fb7cf5216..98765bc12f5c955a31c28495f69b286dc8c967a2 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/CalculateZscore.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/CalculateZscore.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CarpenterSampleCorrection.h b/Framework/Algorithms/inc/MantidAlgorithms/CarpenterSampleCorrection.h index 75257563a13d929f0f2dcd4e733edb4c30eda3e4..3077f12a103e26b77a9359fcf93507127650c4af 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/CarpenterSampleCorrection.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/CarpenterSampleCorrection.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidAPI/DataProcessorAlgorithm.h" @@ -58,10 +58,10 @@ private: double coeff1, double coeff2, double coeff3, bool doAbs, bool doMS); - API::MatrixWorkspace_sptr multiply(const API::MatrixWorkspace_sptr lhsWS, - const API::MatrixWorkspace_sptr rhsWS); - API::MatrixWorkspace_sptr minus(const API::MatrixWorkspace_sptr lhsWS, - const API::MatrixWorkspace_sptr rhsWS); + API::MatrixWorkspace_sptr multiply(const API::MatrixWorkspace_sptr &lhsWS, + const API::MatrixWorkspace_sptr &rhsWS); + API::MatrixWorkspace_sptr minus(const API::MatrixWorkspace_sptr &lhsWS, + const API::MatrixWorkspace_sptr &rhsWS); }; } // namespace Algorithms diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ChangeBinOffset.h b/Framework/Algorithms/inc/MantidAlgorithms/ChangeBinOffset.h index 307368d5caa98f4ae73e70fc5e16fc0d5a13b585..f017cc0b32dcab69af8fda6ce8dcc63d0a0036cf 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/ChangeBinOffset.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/ChangeBinOffset.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ChangeLogTime.h b/Framework/Algorithms/inc/MantidAlgorithms/ChangeLogTime.h index 0b74530b11fe26ea4c59d20ee159228e8a99b597..be858712106e7abbdc80d250e9f2506fc90cfe43 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/ChangeLogTime.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/ChangeLogTime.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ChangePulsetime.h b/Framework/Algorithms/inc/MantidAlgorithms/ChangePulsetime.h index cd604e1272ec0fb07fa38a99572ea9f1f1cd03a9..e1a5e049adb4d2178b3360902947712476411d29 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/ChangePulsetime.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/ChangePulsetime.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ChangePulsetime2.h b/Framework/Algorithms/inc/MantidAlgorithms/ChangePulsetime2.h index 2cc864988a3f9d201c7a07233abbd02d86de369d..6f1acb0411433a147e81a1e62e53b52d9ce8244e 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/ChangePulsetime2.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/ChangePulsetime2.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ChangeTimeZero.h b/Framework/Algorithms/inc/MantidAlgorithms/ChangeTimeZero.h index c10e3741f56691e7182cabb5b81b9bcafa1150ba..ec2099ea8f25d8d51eec5fd3b5c8e1ecf41a8d12 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/ChangeTimeZero.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/ChangeTimeZero.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -39,23 +39,24 @@ private: void exec() override; /// Create the output workspace Mantid::API::MatrixWorkspace_sptr - createOutputWS(Mantid::API::MatrixWorkspace_sptr input, double startProgress, - double stopProgress); + createOutputWS(const Mantid::API::MatrixWorkspace_sptr &input, + double startProgress, double stopProgress); /// Get the time shift - double getTimeShift(API::MatrixWorkspace_sptr ws) const; + double getTimeShift(const API::MatrixWorkspace_sptr &ws) const; /// Shift the time of the logs - void shiftTimeOfLogs(Mantid::API::MatrixWorkspace_sptr ws, double timeShift, - double startProgress, double stopProgress); + void shiftTimeOfLogs(const Mantid::API::MatrixWorkspace_sptr &ws, + double timeShift, double startProgress, + double stopProgress); /// Get the date and time of the first good frame of a workspace Mantid::Types::Core::DateAndTime - getStartTimeFromWorkspace(Mantid::API::MatrixWorkspace_sptr ws) const; + getStartTimeFromWorkspace(const Mantid::API::MatrixWorkspace_sptr &ws) const; /// Can the string be transformed to double - bool checkForDouble(std::string val) const; + bool checkForDouble(const std::string &val) const; /// Can the string be transformed to a DateTime bool checkForDateTime(const std::string &val) const; /// Time shift the log of a double series property - void shiftTimeInLogForTimeSeries(Mantid::API::MatrixWorkspace_sptr ws, + void shiftTimeInLogForTimeSeries(const Mantid::API::MatrixWorkspace_sptr &ws, Mantid::Kernel::Property *prop, double timeShift) const; /// Time shift the log of a string property @@ -63,7 +64,7 @@ private: Mantid::Kernel::PropertyWithValue<std::string> *logEntry, double timeShift) const; // Shift the time of the neutrons - void shiftTimeOfNeutrons(Mantid::API::MatrixWorkspace_sptr ws, + void shiftTimeOfNeutrons(const Mantid::API::MatrixWorkspace_sptr &ws, double timeShift, double startProgress, double stopProgress); diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CheckWorkspacesMatch.h b/Framework/Algorithms/inc/MantidAlgorithms/CheckWorkspacesMatch.h index 24d00f7e40ff12bd971a2a131c160a4479b7ba21..96819cc8285f0be998712359840ffff3444d0abb 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/CheckWorkspacesMatch.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/CheckWorkspacesMatch.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ChopData.h b/Framework/Algorithms/inc/MantidAlgorithms/ChopData.h index fd777e25d7b5368878f20bc4b93c312b1265aec4..9c86fee3ea8ef19aebe6b2fe60899a65108c64cc 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/ChopData.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/ChopData.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ClearCache.h b/Framework/Algorithms/inc/MantidAlgorithms/ClearCache.h index bbb47ff3e5f91954b941b76f5139f9297d4edffc..9bf34f93a53e1ac2a919e84c97ce1ccd5616d8ae 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/ClearCache.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/ClearCache.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ClearInstrumentParameters.h b/Framework/Algorithms/inc/MantidAlgorithms/ClearInstrumentParameters.h index 6ffd3771a03c183520bb22c72da5ad7f2bc8d68b..5f938bbca092a6a762c7baefc6f14ecac10cdf20 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/ClearInstrumentParameters.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/ClearInstrumentParameters.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ClearMaskFlag.h b/Framework/Algorithms/inc/MantidAlgorithms/ClearMaskFlag.h index a26742b16d31d0622fe747409a5921d0295ab937..b4689466931c3cbdbb552de1bd96f3f98347b87a 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/ClearMaskFlag.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/ClearMaskFlag.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ClearMaskedSpectra.h b/Framework/Algorithms/inc/MantidAlgorithms/ClearMaskedSpectra.h index 6e6d40fb4adb4f7288f9f0de5e2cc41b2c878201..8651084b9b94efc314179105950fe4745dec2ff0 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/ClearMaskedSpectra.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/ClearMaskedSpectra.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CloneWorkspace.h b/Framework/Algorithms/inc/MantidAlgorithms/CloneWorkspace.h index 58017f18bb7582f0ff006ccaa3b72e612a9fb33b..1885ba633922ad7f53f0412f48988f122749fbd1 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/CloneWorkspace.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/CloneWorkspace.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/Comment.h b/Framework/Algorithms/inc/MantidAlgorithms/Comment.h index f24316e9c28b6117fc6a8d053e927bda1dbd3567..e7f63e6c4e10c457a3c57e7a4678d297ed79d052 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/Comment.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/Comment.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CommutativeBinaryOperation.h b/Framework/Algorithms/inc/MantidAlgorithms/CommutativeBinaryOperation.h index 70561e17001b14a4e9238f611d4b3d0993f7710c..651ddf3b2bc9fca7249e0936fc1a0c96e39c48ae 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/CommutativeBinaryOperation.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/CommutativeBinaryOperation.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CompareWorkspaces.h b/Framework/Algorithms/inc/MantidAlgorithms/CompareWorkspaces.h index bbba6aaba7f3fe14963cb92a3efb48f57e9302a1..107db8a58bf43e244442a0e9206bf911c0a12f58 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/CompareWorkspaces.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/CompareWorkspaces.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -95,28 +95,30 @@ private: bool processGroups() override; /// Process the two groups - void processGroups(boost::shared_ptr<const API::WorkspaceGroup> groupOne, - boost::shared_ptr<const API::WorkspaceGroup> groupTwo); + void + processGroups(const boost::shared_ptr<const API::WorkspaceGroup> &groupOne, + const boost::shared_ptr<const API::WorkspaceGroup> &groupTwo); void doComparison(); void doPeaksComparison(DataObjects::PeaksWorkspace_sptr tws1, DataObjects::PeaksWorkspace_sptr tws2); - void doTableComparison(API::ITableWorkspace_const_sptr tws1, - API::ITableWorkspace_const_sptr tws2); - void doMDComparison(API::Workspace_sptr w1, API::Workspace_sptr w2); + void doTableComparison(const API::ITableWorkspace_const_sptr &tws1, + const API::ITableWorkspace_const_sptr &tws2); + void doMDComparison(const API::Workspace_sptr &w1, + const API::Workspace_sptr &w2); bool compareEventWorkspaces(const DataObjects::EventWorkspace &ews1, const DataObjects::EventWorkspace &ews2); - bool checkData(API::MatrixWorkspace_const_sptr ws1, - API::MatrixWorkspace_const_sptr ws2); - bool checkAxes(API::MatrixWorkspace_const_sptr ws1, - API::MatrixWorkspace_const_sptr ws2); - bool checkSpectraMap(API::MatrixWorkspace_const_sptr ws1, - API::MatrixWorkspace_const_sptr ws2); - bool checkInstrument(API::MatrixWorkspace_const_sptr ws1, - API::MatrixWorkspace_const_sptr ws2); - bool checkMasking(API::MatrixWorkspace_const_sptr ws1, - API::MatrixWorkspace_const_sptr ws2); + bool checkData(const API::MatrixWorkspace_const_sptr &ws1, + const API::MatrixWorkspace_const_sptr &ws2); + bool checkAxes(const API::MatrixWorkspace_const_sptr &ws1, + const API::MatrixWorkspace_const_sptr &ws2); + bool checkSpectraMap(const API::MatrixWorkspace_const_sptr &ws1, + const API::MatrixWorkspace_const_sptr &ws2); + bool checkInstrument(const API::MatrixWorkspace_const_sptr &ws1, + const API::MatrixWorkspace_const_sptr &ws2); + bool checkMasking(const API::MatrixWorkspace_const_sptr &ws1, + const API::MatrixWorkspace_const_sptr &ws2); bool checkSample(const API::Sample &sample1, const API::Sample &sample2); bool checkRunProperties(const API::Run &run1, const API::Run &run2); @@ -130,7 +132,7 @@ private: size_t &numdiffweight) const; /// Records a mismatch in the Messages workspace and sets Result to false - void recordMismatch(std::string msg, std::string ws1 = "", + void recordMismatch(const std::string &msg, std::string ws1 = "", std::string ws2 = ""); bool relErr(double x1, double x2, double errorVal) const; diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ConjoinWorkspaces.h b/Framework/Algorithms/inc/MantidAlgorithms/ConjoinWorkspaces.h index 1e3d902eb4af19f8bacc8be67def4b14c45bd470..fe5a12c347c3f0af8c21f94e201101e7aa31e067 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/ConjoinWorkspaces.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/ConjoinWorkspaces.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ConjoinXRuns.h b/Framework/Algorithms/inc/MantidAlgorithms/ConjoinXRuns.h index 3f40d5b973e8ce3e8b092a9f72ff67a306488eae..bd95f9d9988782ed3962573994b3df313135b119 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/ConjoinXRuns.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/ConjoinXRuns.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -42,8 +42,8 @@ private: void init() override; void exec() override; - std::string checkLogEntry(API::MatrixWorkspace_sptr) const; - std::vector<double> getXAxis(API::MatrixWorkspace_sptr) const; + std::string checkLogEntry(const API::MatrixWorkspace_sptr &) const; + std::vector<double> getXAxis(const API::MatrixWorkspace_sptr &) const; void joinSpectrum(int64_t); /// Sample log entry name diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ConvertAxesToRealSpace.h b/Framework/Algorithms/inc/MantidAlgorithms/ConvertAxesToRealSpace.h index 86075329976ae651f65e177daef72616e51db95e..0e874d552729b47c41b42cc43d15efe6d7f1076b 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/ConvertAxesToRealSpace.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/ConvertAxesToRealSpace.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ConvertAxisByFormula.h b/Framework/Algorithms/inc/MantidAlgorithms/ConvertAxisByFormula.h index ccf89ee9100194ec250ccf8e972330c03e07935f..c17990feb52d246364fee590e97876d6242b15dc 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/ConvertAxisByFormula.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/ConvertAxisByFormula.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ConvertDiffCal.h b/Framework/Algorithms/inc/MantidAlgorithms/ConvertDiffCal.h index 829b6559d651ddc7b49c3e3364ed3fa06c24e81f..b873450f69ac06c3f6e049c2308386e6cb160d1e 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/ConvertDiffCal.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/ConvertDiffCal.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ConvertEmptyToTof.h b/Framework/Algorithms/inc/MantidAlgorithms/ConvertEmptyToTof.h index 26bd6cf0fd73f89c3be65b8bc142fbf8bde74ed6..ddb8efc44bf35ece27d37adfcc5d33717e50dbd7 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/ConvertEmptyToTof.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/ConvertEmptyToTof.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -58,7 +58,8 @@ private: bool areEqual(double, double, double); int roundUp(double); std::vector<double> makeTofAxis(int, double, size_t, double); - void setTofInWS(const std::vector<double> &, API::MatrixWorkspace_sptr); + void setTofInWS(const std::vector<double> &, + const API::MatrixWorkspace_sptr &); DataObjects::Workspace2D_sptr m_inputWS; API::MatrixWorkspace_sptr m_outputWS; diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ConvertFromDistribution.h b/Framework/Algorithms/inc/MantidAlgorithms/ConvertFromDistribution.h index ecb51ac1bc6ae3f5305ec7b4aa3608031d90b57d..e252ef06ecbd1fba89029a4b93bccbe2d9ecbb01 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/ConvertFromDistribution.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/ConvertFromDistribution.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ConvertSpectrumAxis.h b/Framework/Algorithms/inc/MantidAlgorithms/ConvertSpectrumAxis.h index 6cd89de6f1a80c806e176de01d1451e58a35738d..c901152c2a8bbceaf409ec0f41fdd1c4869e49d6 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/ConvertSpectrumAxis.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/ConvertSpectrumAxis.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -61,7 +61,8 @@ private: void exec() override; /// Getting Efixed double getEfixed(const Mantid::Geometry::IDetector &detector, - API::MatrixWorkspace_const_sptr inputWS, int emode) const; + const API::MatrixWorkspace_const_sptr &inputWS, + int emode) const; }; } // namespace Algorithms diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ConvertSpectrumAxis2.h b/Framework/Algorithms/inc/MantidAlgorithms/ConvertSpectrumAxis2.h index 2b910898ba488574ee55412cb4ff40e17cb61bbd..976c57bc5bf003a853a2eed8ad2c520a2de417be 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/ConvertSpectrumAxis2.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/ConvertSpectrumAxis2.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ConvertTableToMatrixWorkspace.h b/Framework/Algorithms/inc/MantidAlgorithms/ConvertTableToMatrixWorkspace.h index a189ed3396fdac2d6506c0572bf5b31d661f1966..16058f67354a4eb55a86ec43b203ea4f1fa6bc55 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/ConvertTableToMatrixWorkspace.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/ConvertTableToMatrixWorkspace.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ConvertToConstantL2.h b/Framework/Algorithms/inc/MantidAlgorithms/ConvertToConstantL2.h index 32e6efb389877cfdce5f8049beed7468bf15f488..0b7263119f73b4f0dae996dce28a484d827496bf 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/ConvertToConstantL2.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/ConvertToConstantL2.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -51,8 +51,8 @@ private: void init() override; void exec() override; void initWorkspaces(); - double getRunProperty(std::string); - double getInstrumentProperty(std::string); + double getRunProperty(const std::string &); + double getInstrumentProperty(const std::string &); double calculateTOF(double); /// The user selected (input) workspace diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ConvertToDistribution.h b/Framework/Algorithms/inc/MantidAlgorithms/ConvertToDistribution.h index eebbe58bc628df9315e9f13dec27a4f16cc98ece..142a8fb8547acd0204b00e6f49225de9a936b390 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/ConvertToDistribution.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/ConvertToDistribution.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ConvertToEventWorkspace.h b/Framework/Algorithms/inc/MantidAlgorithms/ConvertToEventWorkspace.h index 5118c9bc26d28701506c397ebb836a93bec290b5..f21bd1c773c284edb5116421479019ee0d5f72a4 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/ConvertToEventWorkspace.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/ConvertToEventWorkspace.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ConvertToHistogram.h b/Framework/Algorithms/inc/MantidAlgorithms/ConvertToHistogram.h index 660b3e95ba8bee0e645da364e50c31251db516df..dd4284fef622ba75d8cbcea550a63d0223a7fab4 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/ConvertToHistogram.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/ConvertToHistogram.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ConvertToMatrixWorkspace.h b/Framework/Algorithms/inc/MantidAlgorithms/ConvertToMatrixWorkspace.h index 401802b780728b3ea40b116403693cb3726453da..58f026e0938931f15d66005d440c71c362f3bbe3 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/ConvertToMatrixWorkspace.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/ConvertToMatrixWorkspace.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ConvertToPointData.h b/Framework/Algorithms/inc/MantidAlgorithms/ConvertToPointData.h index e2c139b872ef36d6243388c96e5c520d2b3734dc..a3bc44edb0e6844d762c33db0fc41449543b6810 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/ConvertToPointData.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/ConvertToPointData.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ConvertUnits.h b/Framework/Algorithms/inc/MantidAlgorithms/ConvertUnits.h index 7ccb010bbaaac4f710f9243b0cebc70d5d7f02ee..aef3ddfa017ab62fa36e41e4a8270af7d220f1f9 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/ConvertUnits.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/ConvertUnits.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -69,12 +69,12 @@ public: protected: /// Reverses the workspace if X values are in descending order - void reverse(API::MatrixWorkspace_sptr WS); + void reverse(const API::MatrixWorkspace_sptr &WS); /// For conversions to energy transfer, removes bins corresponding to /// inaccessible values API::MatrixWorkspace_sptr - removeUnphysicalBins(const API::MatrixWorkspace_const_sptr workspace); + removeUnphysicalBins(const API::MatrixWorkspace_const_sptr &workspace); const std::string workspaceMethodName() const override { return "convertUnits"; @@ -87,21 +87,21 @@ protected: void init() override; void exec() override; - void setupMemberVariables(const API::MatrixWorkspace_const_sptr inputWS); + void setupMemberVariables(const API::MatrixWorkspace_const_sptr &inputWS); virtual void storeEModeOnWorkspace(API::MatrixWorkspace_sptr outputWS); API::MatrixWorkspace_sptr - setupOutputWorkspace(const API::MatrixWorkspace_const_sptr inputWS); + setupOutputWorkspace(const API::MatrixWorkspace_const_sptr &inputWS); /// Executes the main part of the algorithm that handles the conversion of the /// units API::MatrixWorkspace_sptr - executeUnitConversion(const API::MatrixWorkspace_sptr inputWS); + executeUnitConversion(const API::MatrixWorkspace_sptr &inputWS); /// Convert the workspace units according to a simple output = a * (input^b) /// relationship API::MatrixWorkspace_sptr - convertQuickly(API::MatrixWorkspace_const_sptr inputWS, const double &factor, - const double &power); + convertQuickly(const API::MatrixWorkspace_const_sptr &inputWS, + const double &factor, const double &power); /// Internal function to gather detector specific L2, theta and efixed values bool getDetectorValues(const API::SpectrumInfo &spectrumInfo, @@ -118,11 +118,11 @@ protected: // Calls Rebin as a Child Algorithm to align the bins of the output workspace API::MatrixWorkspace_sptr - alignBins(const API::MatrixWorkspace_sptr workspace); + alignBins(const API::MatrixWorkspace_sptr &workspace); const std::vector<double> - calculateRebinParams(const API::MatrixWorkspace_const_sptr workspace) const; + calculateRebinParams(const API::MatrixWorkspace_const_sptr &workspace) const; - void putBackBinWidth(const API::MatrixWorkspace_sptr outputWS); + void putBackBinWidth(const API::MatrixWorkspace_sptr &outputWS); std::size_t m_numberOfSpectra{ 0}; ///< The number of spectra in the input workspace diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ConvertUnitsUsingDetectorTable.h b/Framework/Algorithms/inc/MantidAlgorithms/ConvertUnitsUsingDetectorTable.h index b35b0c56674ba58dab31f78e53340fd3a6286c9d..2b3555d150d0a0ebae91b4b87dbbfc69da93bbd0 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/ConvertUnitsUsingDetectorTable.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/ConvertUnitsUsingDetectorTable.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CopyDataRange.h b/Framework/Algorithms/inc/MantidAlgorithms/CopyDataRange.h index 28761cd240bf94fcbef260adae65342b772947cb..c7cc0f8dd81701c3a3b617c75fe0f9019bfb0d5f 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/CopyDataRange.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/CopyDataRange.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CopyDetectorMapping.h b/Framework/Algorithms/inc/MantidAlgorithms/CopyDetectorMapping.h index ec4ce64db753ddd36a4392acb910a4fa9b5a6bd3..babb58a0145b0663d402f6cdbc6f4fd299eff150 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/CopyDetectorMapping.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/CopyDetectorMapping.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CopyInstrumentParameters.h b/Framework/Algorithms/inc/MantidAlgorithms/CopyInstrumentParameters.h index 9506daecfe520f788c91a4a82a1596259af860cd..39a5f075d5a4475fddf4d614cc7cd3649bbb1636 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/CopyInstrumentParameters.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/CopyInstrumentParameters.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CopyLogs.h b/Framework/Algorithms/inc/MantidAlgorithms/CopyLogs.h index bda67e2dbe9b084c31e15a4a796c7095676c6cc7..e72749b1c387a488598596cef79f9491ce17f0d6 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/CopyLogs.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/CopyLogs.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CopySample.h b/Framework/Algorithms/inc/MantidAlgorithms/CopySample.h index 01d637eda02ffc8e3804e9c863ec845c199424de..9a48d162b96ce8a0901f7751eda435c8691a3b48 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/CopySample.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/CopySample.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CorelliCrossCorrelate.h b/Framework/Algorithms/inc/MantidAlgorithms/CorelliCrossCorrelate.h index 64589bce8ce95b8d767415428d5752e49ad8ed09..f6eaee73bd8acf94f74ab8273c32d621836372d2 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/CorelliCrossCorrelate.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/CorelliCrossCorrelate.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CorrectKiKf.h b/Framework/Algorithms/inc/MantidAlgorithms/CorrectKiKf.h index 07b85c7d8a256619dad93acbfeac590bf998d0d4..3d802a8f70a232898e1ca7c767ec3a3145f724e0 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/CorrectKiKf.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/CorrectKiKf.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -75,7 +75,7 @@ private: */ template <class T> void correctKiKfEventHelper(std::vector<T> &wevector, double efixed, - const std::string emodeStr); + const std::string &emodeStr); void getEfixedFromParameterMap(double &Efi, int64_t i, const Mantid::API::SpectrumInfo &spectrumInfo, const Mantid::Geometry::ParameterMap &pmap); diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CorrectTOFAxis.h b/Framework/Algorithms/inc/MantidAlgorithms/CorrectTOFAxis.h index 1498d884f2cb8269365aae498af6a6179e544c11..cc380fc5809a251fc2e578b4d8f5cb45918a897d 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/CorrectTOFAxis.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/CorrectTOFAxis.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -43,8 +43,8 @@ private: void init() override; std::map<std::string, std::string> validateInputs() override; void exec() override; - void useReferenceWorkspace(API::MatrixWorkspace_sptr outputWs); - void correctManually(API::MatrixWorkspace_sptr outputWs); + void useReferenceWorkspace(const API::MatrixWorkspace_sptr &outputWs); + void correctManually(const API::MatrixWorkspace_sptr &outputWs); double averageL2(const API::SpectrumInfo &spectrumInfo); void averageL2AndEPP(const API::SpectrumInfo &spectrumInfo, double &l2, double &epp); diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CorrectToFile.h b/Framework/Algorithms/inc/MantidAlgorithms/CorrectToFile.h index 72a6f270bd10ed5ab0a4bc07aa667311db63e018..345a4d5f1c95aad8ebb2dd55ac9b5ebfec2f7215 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/CorrectToFile.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/CorrectToFile.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -54,8 +54,9 @@ private: /// Load in the RKH file for that has the correction information API::MatrixWorkspace_sptr loadInFile(const std::string &corrFile); /// Multiply or divide the input workspace as specified by the user - void doWkspAlgebra(API::MatrixWorkspace_sptr lhs, - API::MatrixWorkspace_sptr rhs, const std::string &algName, + void doWkspAlgebra(const API::MatrixWorkspace_sptr &lhs, + const API::MatrixWorkspace_sptr &rhs, + const std::string &algName, API::MatrixWorkspace_sptr &result); }; } // namespace Algorithms diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CreateCalFileByNames.h b/Framework/Algorithms/inc/MantidAlgorithms/CreateCalFileByNames.h index 724ad0d5ed51032445c90301d2347235244eea19..a454bf06e4b5bdddafc3cd1d9a1d4fa3d4e5fd78 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/CreateCalFileByNames.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/CreateCalFileByNames.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CreateDetectorTable.h b/Framework/Algorithms/inc/MantidAlgorithms/CreateDetectorTable.h index 09a7d82563b25d7e3df658c1988951929e92e619..3f13c9c229b45d4df5db2c770447b58f6093a236 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/CreateDetectorTable.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/CreateDetectorTable.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CreateDummyCalFile.h b/Framework/Algorithms/inc/MantidAlgorithms/CreateDummyCalFile.h index 9dc4f626b0b0ae376d63f431f1461ef45f86b0ad..3f37c505157a4849ee93baf05b9c1d315b96b859 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/CreateDummyCalFile.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/CreateDummyCalFile.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CreateEPP.h b/Framework/Algorithms/inc/MantidAlgorithms/CreateEPP.h index ef73f3279caea87e38cca20dcd57d1b84bbd7642..63f262df95ddacb491b79f0537382673f9f456e6 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/CreateEPP.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/CreateEPP.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CreateFlatEventWorkspace.h b/Framework/Algorithms/inc/MantidAlgorithms/CreateFlatEventWorkspace.h index f58767407639e18f28a0f4852622ee7e5527dc6b..aa3b28c9b158a25574599c43e0f8c5b9af144c63 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/CreateFlatEventWorkspace.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/CreateFlatEventWorkspace.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CreateFloodWorkspace.h b/Framework/Algorithms/inc/MantidAlgorithms/CreateFloodWorkspace.h index 0bfd9a8aa475736d76b5ee569e06ae08b5e5db2c..5ee9bb5ebaae98f5eea734a5c109ca21b6387b32 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/CreateFloodWorkspace.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/CreateFloodWorkspace.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -30,8 +30,8 @@ private: void exec() override; API::MatrixWorkspace_sptr getInputWorkspace(); std::string getBackgroundFunction(); - API::MatrixWorkspace_sptr integrate(API::MatrixWorkspace_sptr ws); - API::MatrixWorkspace_sptr transpose(API::MatrixWorkspace_sptr ws); + API::MatrixWorkspace_sptr integrate(const API::MatrixWorkspace_sptr &ws); + API::MatrixWorkspace_sptr transpose(const API::MatrixWorkspace_sptr &ws); bool shouldRemoveBackground(); void collectExcludedSpectra(); bool isExcludedSpectrum(double spec) const; diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CreateGroupingWorkspace.h b/Framework/Algorithms/inc/MantidAlgorithms/CreateGroupingWorkspace.h index 4b53f55b2ba8e714b5f81e170acf130a3701e55a..9807639354c56d9f42d8552b349edb55690a459f 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/CreateGroupingWorkspace.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/CreateGroupingWorkspace.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CreateLogPropertyTable.h b/Framework/Algorithms/inc/MantidAlgorithms/CreateLogPropertyTable.h index fa3fba2fd4a1b2620cdab4e06ae35154b0d158f2..b6ace5b6e17c9f67e5ffb3123a2bf0a1fc4e9386 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/CreateLogPropertyTable.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/CreateLogPropertyTable.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CreateLogTimeCorrection.h b/Framework/Algorithms/inc/MantidAlgorithms/CreateLogTimeCorrection.h index 96c715cbec0886f5b7b9b35d3f814dcfc6a19398..3b394e4a005198b9dbf42a54f27579fb1335e6d3 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/CreateLogTimeCorrection.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/CreateLogTimeCorrection.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -65,7 +65,7 @@ private: const std::vector<double> &corrections) const; /// Write correction map to a text file - void writeCorrectionToFile(const std::string filename, + void writeCorrectionToFile(const std::string &filename, const Geometry::DetectorInfo &detectorInfo, const std::vector<double> &corrections) const; }; diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CreatePSDBleedMask.h b/Framework/Algorithms/inc/MantidAlgorithms/CreatePSDBleedMask.h index 4ff91e0315cdb06967f171630b39175777d159b1..eef18d270f10da0133c6f46b6e8be189bf21a7e4 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/CreatePSDBleedMask.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/CreatePSDBleedMask.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -53,11 +53,11 @@ private: /// Process a tube bool performBleedTest(const std::vector<int> &tubeIndices, - API::MatrixWorkspace_const_sptr inputWS, double maxRate, - int numIgnoredPixels); + const API::MatrixWorkspace_const_sptr &inputWS, + double maxRate, int numIgnoredPixels); /// Mask a tube with the given workspace indices void maskTube(const std::vector<int> &tubeIndices, - API::MatrixWorkspace_sptr workspace); + const API::MatrixWorkspace_sptr &workspace); }; } // namespace Algorithms diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CreatePeaksWorkspace.h b/Framework/Algorithms/inc/MantidAlgorithms/CreatePeaksWorkspace.h index c16af8bb2f66d62ee79b7331b1043ba211bfa432..b315967bfd1d938248c0564ac4d574d188bd5c7e 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/CreatePeaksWorkspace.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/CreatePeaksWorkspace.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CreateSampleWorkspace.h b/Framework/Algorithms/inc/MantidAlgorithms/CreateSampleWorkspace.h index 59fd1c3aef08965bb51fe886adbb330f8a31957c..31f7422b0e544e75548d900e2f0a7fa423ece1ef 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/CreateSampleWorkspace.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/CreateSampleWorkspace.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -42,16 +42,18 @@ private: DataObjects::EventWorkspace_sptr createEventWorkspace(int numPixels, int numBins, int numMonitors, int numEvents, double x0, double binDelta, - Geometry::Instrument_sptr inst, + const Geometry::Instrument_sptr &inst, const std::string &functionString, bool isRandom); API::MatrixWorkspace_sptr createHistogramWorkspace(int numPixels, int numBins, int numMonitors, double x0, double binDelta, - Geometry::Instrument_sptr inst, + const Geometry::Instrument_sptr &inst, const std::string &functionString, bool isRandom); - API::MatrixWorkspace_sptr createScanningWorkspace( - int numBins, double x0, double binDelta, Geometry::Instrument_sptr inst, - const std::string &functionString, bool isRandom, int numScanPoints); + API::MatrixWorkspace_sptr + createScanningWorkspace(int numBins, double x0, double binDelta, + const Geometry::Instrument_sptr &inst, + const std::string &functionString, bool isRandom, + int numScanPoints); Geometry::Instrument_sptr createTestInstrumentRectangular( API::Progress &progress, int numBanks, int numMonitors, int pixels, double pixelSpacing, const double bankDistanceFromSample, diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CreateSingleValuedWorkspace.h b/Framework/Algorithms/inc/MantidAlgorithms/CreateSingleValuedWorkspace.h index 6b06c01e51d8d48716c289c755342aabc8ff9480..db3eb3e611b1599c145541a3402840a69a8f4d58 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/CreateSingleValuedWorkspace.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/CreateSingleValuedWorkspace.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CreateTransmissionWorkspace.h b/Framework/Algorithms/inc/MantidAlgorithms/CreateTransmissionWorkspace.h index af0601654d130f0494475ee69337303a6f27d78d..2b0f5b58f403202174edacae001f9e066299ac5b 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/CreateTransmissionWorkspace.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/CreateTransmissionWorkspace.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -35,7 +35,7 @@ private: const OptionalMinMax &wavelengthMonitorBackgroundInterval, const OptionalMinMax &wavelengthMonitorIntegrationInterval, const OptionalInteger &i0MonitorIndex, - API::MatrixWorkspace_sptr firstTransmissionRun, + const API::MatrixWorkspace_sptr &firstTransmissionRun, OptionalMatrixWorkspace_sptr secondTransmissionRun, const OptionalDouble &stitchingStart, const OptionalDouble &stitchingDelta, const OptionalDouble &stitchingEnd, diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CreateTransmissionWorkspace2.h b/Framework/Algorithms/inc/MantidAlgorithms/CreateTransmissionWorkspace2.h index 7d03d4c8994c40607fda77ec8dde2a59f4d00de6..b277f7a731506e1228c68a030bd760ab495e1f22 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/CreateTransmissionWorkspace2.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/CreateTransmissionWorkspace2.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -36,15 +36,15 @@ private: /// Normalize by monitors API::MatrixWorkspace_sptr - normalizeDetectorsByMonitors(API::MatrixWorkspace_sptr IvsTOF); + normalizeDetectorsByMonitors(const API::MatrixWorkspace_sptr &IvsTOF); /// Get the run numbers of the input workspaces void getRunNumbers(); /// Get the run number of a given workspace std::string getRunNumber(std::string const &propertyName); /// Store a transition run in ADS - void setOutputTransmissionRun(int which, API::MatrixWorkspace_sptr ws); + void setOutputTransmissionRun(int which, const API::MatrixWorkspace_sptr &ws); /// Store the stitched transition workspace run in ADS - void setOutputWorkspace(API::MatrixWorkspace_sptr ws); + void setOutputWorkspace(const API::MatrixWorkspace_sptr &ws); /// Run numbers for the first/second transmission run std::string m_firstTransmissionRunNumber; diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CreateTransmissionWorkspaceAuto.h b/Framework/Algorithms/inc/MantidAlgorithms/CreateTransmissionWorkspaceAuto.h index 638a8b18a22a06818a7577167120e6e2355757fa..75546c2e0858a3ec1d51a7809506bc73962eb8e6 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/CreateTransmissionWorkspaceAuto.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/CreateTransmissionWorkspaceAuto.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -36,7 +36,8 @@ private: void init() override; void exec() override; - template <typename T> boost::optional<T> isSet(std::string propName) const; + template <typename T> + boost::optional<T> isSet(const std::string &propName) const; }; } // namespace Algorithms diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CreateTransmissionWorkspaceAuto2.h b/Framework/Algorithms/inc/MantidAlgorithms/CreateTransmissionWorkspaceAuto2.h index 015b147d37523eebbedf2bddd12de55540fd76c3..e9ea048b1458076a89a60c2f31dfd041e6157261 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/CreateTransmissionWorkspaceAuto2.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/CreateTransmissionWorkspaceAuto2.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CreateUserDefinedBackground.h b/Framework/Algorithms/inc/MantidAlgorithms/CreateUserDefinedBackground.h index 24454b51d0649ca89d362ca5c532379798fc3ee8..b5a2eb47f5fd7bf168ffdaffd64776cfe7692794 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/CreateUserDefinedBackground.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/CreateUserDefinedBackground.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CreateWorkspace.h b/Framework/Algorithms/inc/MantidAlgorithms/CreateWorkspace.h index 1d7b6e14b842158ab5ffc8e0227c055f4ea326df..9685eb1dbb758cbff6a271947d8bfeea4264d880 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/CreateWorkspace.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/CreateWorkspace.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CropToComponent.h b/Framework/Algorithms/inc/MantidAlgorithms/CropToComponent.h index 5195d7a3a78ecf5cce32ae57a5e981c320266c0b..40050de84043f4d014a538df0cc12b1ef44152d3 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/CropToComponent.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/CropToComponent.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CropWorkspace.h b/Framework/Algorithms/inc/MantidAlgorithms/CropWorkspace.h index 210736e961423c808df2d19df5dda6603d6f28da..59e22420b694f517f2cb5b8a5a63ac95391989e8 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/CropWorkspace.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/CropWorkspace.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CrossCorrelate.h b/Framework/Algorithms/inc/MantidAlgorithms/CrossCorrelate.h index 55cd4372aac77291663fce9e4d120c4fc9f35d59..cab5c9fb7e7f28499da67ada508d7372705d4336 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/CrossCorrelate.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/CrossCorrelate.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CuboidGaugeVolumeAbsorption.h b/Framework/Algorithms/inc/MantidAlgorithms/CuboidGaugeVolumeAbsorption.h index 64949e0d76d9886fc24f2a8f43cb68d509bc0318..bf54a2b23ac79cb003664caffec2654c060df59f 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/CuboidGaugeVolumeAbsorption.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/CuboidGaugeVolumeAbsorption.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CylinderAbsorption.h b/Framework/Algorithms/inc/MantidAlgorithms/CylinderAbsorption.h index 2660740dc7391975177c181422a95ab5e7e48fc7..330838aa3bb8ec449b35fc1144e4c8f3725749bc 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/CylinderAbsorption.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/CylinderAbsorption.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/DeadTimeCorrection.h b/Framework/Algorithms/inc/MantidAlgorithms/DeadTimeCorrection.h index f17e117ef8d7f47d78311839b60a25ede5f746d5..0cb9c52bb62958f6a692bd05a91eb1fb6a9145fc 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/DeadTimeCorrection.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/DeadTimeCorrection.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/DeleteLog.h b/Framework/Algorithms/inc/MantidAlgorithms/DeleteLog.h index 7404b2d17c2c8a3568a36fbdbe5eebaa3ed6e538..c44e2cf8fcaa35c99fd690bdceac27246d9f5988 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/DeleteLog.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/DeleteLog.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/DeleteWorkspace.h b/Framework/Algorithms/inc/MantidAlgorithms/DeleteWorkspace.h index add9ee4ed380d30b84f2a23c0b06d070829c0271..2179ac8d2d252d0955407b6fdb3ca90d678ca508 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/DeleteWorkspace.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/DeleteWorkspace.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2001 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/DeleteWorkspaces.h b/Framework/Algorithms/inc/MantidAlgorithms/DeleteWorkspaces.h index 3d55a5298bc24d0fb7d145d3029814a58734d429..7c5bad0a2dc496999f5f1e24abfc259ae50fab84 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/DeleteWorkspaces.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/DeleteWorkspaces.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/DetectorDiagnostic.h b/Framework/Algorithms/inc/MantidAlgorithms/DetectorDiagnostic.h index 655462225981fb37898ee45cee0de8f037d68bdd..612883192212260bbadda9a33632d8098cb44849 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/DetectorDiagnostic.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/DetectorDiagnostic.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -54,21 +54,21 @@ private: void init() override; void exec() override; /// Apply a given mask - void applyMask(API::MatrixWorkspace_sptr inputWS, - API::MatrixWorkspace_sptr maskWS); + void applyMask(const API::MatrixWorkspace_sptr &inputWS, + const API::MatrixWorkspace_sptr &maskWS); /// Perform checks on detector vanadium - API::MatrixWorkspace_sptr doDetVanTest(API::MatrixWorkspace_sptr inputWS, - int &nFails); + API::MatrixWorkspace_sptr + doDetVanTest(const API::MatrixWorkspace_sptr &inputWS, int &nFails); protected: /// Get the total counts for each spectra API::MatrixWorkspace_sptr - integrateSpectra(API::MatrixWorkspace_sptr inputWS, const int indexMin, + integrateSpectra(const API::MatrixWorkspace_sptr &inputWS, const int indexMin, const int indexMax, const double lower, const double upper, const bool outputWorkspace2D = false); DataObjects::MaskWorkspace_sptr - generateEmptyMask(API::MatrixWorkspace_const_sptr inputWS); + generateEmptyMask(const API::MatrixWorkspace_const_sptr &inputWS); /// Calculate the median of the given workspace. This assumes that the input /// workspace contains @@ -80,7 +80,8 @@ protected: API::MatrixWorkspace_sptr convertToRate(API::MatrixWorkspace_sptr workspace); /// method to check which spectra should be grouped when calculating the /// median - std::vector<std::vector<size_t>> makeMap(API::MatrixWorkspace_sptr countsWS); + std::vector<std::vector<size_t>> + makeMap(const API::MatrixWorkspace_sptr &countsWS); /// method to create the map with all spectra std::vector<std::vector<size_t>> makeInstrumentMap(const API::MatrixWorkspace &countsWS); diff --git a/Framework/Algorithms/inc/MantidAlgorithms/DetectorEfficiencyCor.h b/Framework/Algorithms/inc/MantidAlgorithms/DetectorEfficiencyCor.h index 0fb837219cdac830e91bd85bf9b105a3ba89438b..b637889e1b4dc1918e94b7ff99894e0d5ae7f49a 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/DetectorEfficiencyCor.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/DetectorEfficiencyCor.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/DetectorEfficiencyCorUser.h b/Framework/Algorithms/inc/MantidAlgorithms/DetectorEfficiencyCorUser.h index 79b8ef1c7ea0222063a4c920ce12d38a836d1218..56b22da4c5b932cf4149d1d7d4a675f7e123b0f1 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/DetectorEfficiencyCorUser.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/DetectorEfficiencyCorUser.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/DetectorEfficiencyVariation.h b/Framework/Algorithms/inc/MantidAlgorithms/DetectorEfficiencyVariation.h index 43ffd71d133f3d0e1340225e07bf6be2b1422543..205ada7ea22361b0f31514d046f73933cc9fe95c 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/DetectorEfficiencyVariation.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/DetectorEfficiencyVariation.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -72,8 +72,8 @@ protected: API::MatrixWorkspace_sptr &whiteBeam2, double &variation, int &minSpec, int &maxSpec); /// Apply the detector test criterion - int doDetectorTests(API::MatrixWorkspace_const_sptr counts1, - API::MatrixWorkspace_const_sptr counts2, + int doDetectorTests(const API::MatrixWorkspace_const_sptr &counts1, + const API::MatrixWorkspace_const_sptr &counts2, const double average, double variation); private: diff --git a/Framework/Algorithms/inc/MantidAlgorithms/DiffractionEventCalibrateDetectors.h b/Framework/Algorithms/inc/MantidAlgorithms/DiffractionEventCalibrateDetectors.h index 9c9e028311ac097828406fc0eceeba47620e3869..1bf164a22f2f4725dc88258b22b027f51b689441 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/DiffractionEventCalibrateDetectors.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/DiffractionEventCalibrateDetectors.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -49,12 +49,13 @@ public: } /// Function to optimize double intensity(double x, double y, double z, double rotx, double roty, - double rotz, std::string detname, std::string inname, - std::string outname, std::string peakOpt, - std::string rb_param, std::string groupWSName); + double rotz, const std::string &detname, + const std::string &inname, const std::string &outname, + const std::string &peakOpt, const std::string &rb_param, + const std::string &groupWSName); void movedetector(double x, double y, double z, double rotx, double roty, - double rotz, std::string detname, - Mantid::DataObjects::EventWorkspace_sptr inputW); + double rotz, const std::string &detname, + const Mantid::DataObjects::EventWorkspace_sptr &inputW); private: // Overridden Algorithm methods diff --git a/Framework/Algorithms/inc/MantidAlgorithms/DiffractionFocussing.h b/Framework/Algorithms/inc/MantidAlgorithms/DiffractionFocussing.h index 38dbdad90e73ec91fbaa2786e3bfe8feee559a91..ffe71bb24d0e090bd83f7d0c350ce684a70ad231 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/DiffractionFocussing.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/DiffractionFocussing.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -78,7 +78,7 @@ private: void calculateRebinParams(const API::MatrixWorkspace_const_sptr &workspace, double &min, double &max, double &step); std::multimap<int64_t, int64_t> - readGroupingFile(std::string groupingFileName); + readGroupingFile(const std::string &groupingFileName); }; } // namespace Algorithms diff --git a/Framework/Algorithms/inc/MantidAlgorithms/DiffractionFocussing2.h b/Framework/Algorithms/inc/MantidAlgorithms/DiffractionFocussing2.h index 9dd2aaacccaa5e27be562aa48cf1d16b42522c78..0508fac56a57e21de02f81a017bdd819f1a48f3e 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/DiffractionFocussing2.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/DiffractionFocussing2.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/DirectILLTubeBackground.h b/Framework/Algorithms/inc/MantidAlgorithms/DirectILLTubeBackground.h index 56212f309e222dcbd089dabc9459c81a883ebe76..871be8e0117a4732c6c6ea2dabc7bbcc6807f9c6 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/DirectILLTubeBackground.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/DirectILLTubeBackground.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/Divide.h b/Framework/Algorithms/inc/MantidAlgorithms/Divide.h index ee8138696dbf888e8dac8532f1c1120b2bb052e7..7835b6b82b0011b7c72af24b08ce2aadd932e2c6 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/Divide.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/Divide.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/EQSANSCorrectFrame.h b/Framework/Algorithms/inc/MantidAlgorithms/EQSANSCorrectFrame.h index f4706afb1ec01ae27cd490b3904903f868946f2b..292c82a4519da4cd19e79f5f36bf9416c4f633a0 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/EQSANSCorrectFrame.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/EQSANSCorrectFrame.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/EQSANSResolution.h b/Framework/Algorithms/inc/MantidAlgorithms/EQSANSResolution.h index e5513c6189c1f43dd7bc9fc9c8204a2fe0ea021f..e7c2b19b7c5e78f326547279cff19169caee3330 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/EQSANSResolution.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/EQSANSResolution.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/EQSANSTofStructure.h b/Framework/Algorithms/inc/MantidAlgorithms/EQSANSTofStructure.h index 477306730879d414e0dfdaab44337565dab78941..3b131ab4ed52a5c9974261f237786bef68a667cb 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/EQSANSTofStructure.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/EQSANSTofStructure.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -60,12 +60,12 @@ private: void exec() override; // void execEvent(Mantid::DataObjects::EventWorkspace_sptr inputWS, bool // frame_skipping); - void execEvent(Mantid::DataObjects::EventWorkspace_sptr inputWS, + void execEvent(const Mantid::DataObjects::EventWorkspace_sptr &inputWS, double threshold, double frame_offset, double tof_frame_width, double tmp_frame_width, bool frame_skipping); /// Compute TOF offset - double getTofOffset(DataObjects::EventWorkspace_const_sptr inputWS, + double getTofOffset(const DataObjects::EventWorkspace_const_sptr &inputWS, bool frame_skipping); double frame_tof0; bool flight_path_correction; diff --git a/Framework/Algorithms/inc/MantidAlgorithms/EditInstrumentGeometry.h b/Framework/Algorithms/inc/MantidAlgorithms/EditInstrumentGeometry.h index a82a010f58369f9d231c1c80dac09f68c8d78564..f8bb347871b3354af06b31a61f54fbe78e941554 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/EditInstrumentGeometry.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/EditInstrumentGeometry.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ElasticWindow.h b/Framework/Algorithms/inc/MantidAlgorithms/ElasticWindow.h index 26d4bd2d408fa77395d952417e8cbaf2590da025..1d80c0e9f803616143bb9115825f5bc474b02dc1 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/ElasticWindow.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/ElasticWindow.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/EstimateDivergence.h b/Framework/Algorithms/inc/MantidAlgorithms/EstimateDivergence.h index 8af4a16a9df7f0068b18f4b3dee2daa7c7b166cd..5440dcf5e3d623af81a3759c0ea459855cae9efe 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/EstimateDivergence.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/EstimateDivergence.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/EstimateResolutionDiffraction.h b/Framework/Algorithms/inc/MantidAlgorithms/EstimateResolutionDiffraction.h index cbb2ff46f9d695d36b21a333d9f6ae612754b423..18740e98c6b5e3da658d77e5281fd2d119e0e813 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/EstimateResolutionDiffraction.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/EstimateResolutionDiffraction.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/EventWorkspaceAccess.h b/Framework/Algorithms/inc/MantidAlgorithms/EventWorkspaceAccess.h index 756cf7bca58bfa8b24ff445d79a55aca141f79d0..859f279baf05da316a454d6737f5c3e31efb2464 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/EventWorkspaceAccess.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/EventWorkspaceAccess.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/Exponential.h b/Framework/Algorithms/inc/MantidAlgorithms/Exponential.h index c6002d5d506cf7fac142b312b558177fecb08d86..5f793f82960ca4ad1e665ad07e6c59aed67b0ff7 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/Exponential.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/Exponential.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ExponentialCorrection.h b/Framework/Algorithms/inc/MantidAlgorithms/ExponentialCorrection.h index a471494657db610aa8edf8e9320ea1b3f19adc66..ca60103bf06e74710b501f9a9936a725ec60483d 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/ExponentialCorrection.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/ExponentialCorrection.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ExportTimeSeriesLog.h b/Framework/Algorithms/inc/MantidAlgorithms/ExportTimeSeriesLog.h index 04d25c1e14d86c3b934d6e78d7d7dddfe58ebb14..e2e3a903912d35914e64ec547ae4231ce9263a94 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/ExportTimeSeriesLog.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/ExportTimeSeriesLog.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -58,7 +58,7 @@ private: const double &rel_start_time, size_t &i_start, const double &rel_stop_time, size_t &i_stop, const double &time_factor); - void exportLog(const std::string &logname, const std::string timeunit, + void exportLog(const std::string &logname, const std::string &timeunit, const double &starttime, const double &stoptime, const bool exportepoch, bool outputeventws, int numentries, bool cal_first_deriv); diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ExtractFFTSpectrum.h b/Framework/Algorithms/inc/MantidAlgorithms/ExtractFFTSpectrum.h index 99486a5f111945375315102f628cbc9e7db823f8..ad42b74f567a56785cfec60105770acda7175509 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/ExtractFFTSpectrum.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/ExtractFFTSpectrum.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ExtractMask.h b/Framework/Algorithms/inc/MantidAlgorithms/ExtractMask.h index 944435afbf875e51cde6b614f61d12a8acb3a45c..23ab5c08f2309cfe7eefe09cc45200b4543269e4 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/ExtractMask.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/ExtractMask.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ExtractMaskToTable.h b/Framework/Algorithms/inc/MantidAlgorithms/ExtractMaskToTable.h index dd48ae1e7b6a7dbf59ea9beff37e508b1ceccaf0..7c0173f5e99ec2fb0a521e2b91156649c7d3c82b 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/ExtractMaskToTable.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/ExtractMaskToTable.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -54,11 +54,11 @@ private: /// Parse input TableWorkspace to get a list of detectors IDs of which /// detector are already masked std::vector<detid_t> - parseMaskTable(DataObjects::TableWorkspace_sptr masktablews); + parseMaskTable(const DataObjects::TableWorkspace_sptr &masktablews); /// Parse a string containing list in format (x, xx-yy, x, x, ...) to a vector /// of detid_t - std::vector<detid_t> parseStringToVector(std::string liststr); + std::vector<detid_t> parseStringToVector(const std::string &liststr); /// Extract mask from a workspace to a list of detectors std::vector<detid_t> extractMaskFromMatrixWorkspace(); @@ -67,11 +67,12 @@ private: std::vector<detid_t> extractMaskFromMaskWorkspace(); /// Copy table workspace content from one workspace to another - void copyTableWorkspaceContent(DataObjects::TableWorkspace_sptr sourceWS, - DataObjects::TableWorkspace_sptr targetWS); + void + copyTableWorkspaceContent(const DataObjects::TableWorkspace_sptr &sourceWS, + const DataObjects::TableWorkspace_sptr &targetWS); /// Add a list of spectra (detector IDs) to the output table workspace - void addToTableWorkspace(DataObjects::TableWorkspace_sptr outws, + void addToTableWorkspace(const DataObjects::TableWorkspace_sptr &outws, std::vector<detid_t> maskeddetids, double xmin, double xmax, std::vector<detid_t> prevmaskedids); }; diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ExtractSingleSpectrum.h b/Framework/Algorithms/inc/MantidAlgorithms/ExtractSingleSpectrum.h index 29b3c7459ffb798c668b1940cd242d3a4b564228..c2e7d05798c6798c76353c0d3eb93ea461f96d53 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/ExtractSingleSpectrum.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/ExtractSingleSpectrum.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ExtractSpectra.h b/Framework/Algorithms/inc/MantidAlgorithms/ExtractSpectra.h index 2b936e9d32cd93dd625becb59610b8d4d7538e47..a539ae2e2838c15f660a388fc2e989f2576a37ee 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/ExtractSpectra.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/ExtractSpectra.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ExtractSpectra2.h b/Framework/Algorithms/inc/MantidAlgorithms/ExtractSpectra2.h index fbbbf71e2ece347921bf5a8e7dd90d533c98295c..a3c8389dccc700290cb607e083b0ed5d1d5b45c3 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/ExtractSpectra2.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/ExtractSpectra2.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ExtractUnmaskedSpectra.h b/Framework/Algorithms/inc/MantidAlgorithms/ExtractUnmaskedSpectra.h index 84e897b741fe64596f7d7e97b5ac164c01ac22a5..3d75db94747ad6d9dd85bc1272b07add92b53157 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/ExtractUnmaskedSpectra.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/ExtractUnmaskedSpectra.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/FFT.h b/Framework/Algorithms/inc/MantidAlgorithms/FFT.h index 543169b5a6e8e6973d55b5b0be6aa0d7f2b856b1..f6ffbede6b3319cc124ac1f03161ab5ae186392c 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/FFT.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/FFT.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/FFTDerivative.h b/Framework/Algorithms/inc/MantidAlgorithms/FFTDerivative.h index c4552527b829ac72f16baf1efcd802a000b93ab9..cb1f23f8d6026d68a51da79f24d757ce35ca5e31 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/FFTDerivative.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/FFTDerivative.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/FFTSmooth.h b/Framework/Algorithms/inc/MantidAlgorithms/FFTSmooth.h index c96cfa8f7f163f071d794cde77b0d587620f3113..dbc18f7adb222276983c175b7f50089c38624ffb 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/FFTSmooth.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/FFTSmooth.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/FFTSmooth2.h b/Framework/Algorithms/inc/MantidAlgorithms/FFTSmooth2.h index 7cd7b77af0dc149c6ab4fd7dc6031c1afd7d4b8f..1715d95b9eba356296912cd17c78f4de078aaac7 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/FFTSmooth2.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/FFTSmooth2.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/FilterBadPulses.h b/Framework/Algorithms/inc/MantidAlgorithms/FilterBadPulses.h index fe5ea3c0e93640819f97eb7b7b97f3f3b3307696..12c0f84cae0384349286807f827967e34909334d 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/FilterBadPulses.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/FilterBadPulses.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/FilterByLogValue.h b/Framework/Algorithms/inc/MantidAlgorithms/FilterByLogValue.h index e6545e24fb768dd59af8d4e3bab735cf92f2d4cd..eace233f3078ebad605982af039418c717f715b5 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/FilterByLogValue.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/FilterByLogValue.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/FilterByTime.h b/Framework/Algorithms/inc/MantidAlgorithms/FilterByTime.h index 42cd91c409bd5db7d455732331309be32f3eeef2..7826922492f8e3ada348e93d68bc2b7485d9eb1d 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/FilterByTime.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/FilterByTime.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/FilterByTime2.h b/Framework/Algorithms/inc/MantidAlgorithms/FilterByTime2.h index 14935c8b60c4d08f1b0876e624bc47439ec09b11..61d6bf451e19ce0c5378184c6e2ea9eee37a8a41 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/FilterByTime2.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/FilterByTime2.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/FilterByXValue.h b/Framework/Algorithms/inc/MantidAlgorithms/FilterByXValue.h index 252bc8cfa55a6fdcb44b2c723ccd62dfcf62f909..941e65e6ead81a349ec72987b490385dc3be830c 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/FilterByXValue.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/FilterByXValue.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/FilterEvents.h b/Framework/Algorithms/inc/MantidAlgorithms/FilterEvents.h index fa295f071011d073bc1942b4a16ced43ea884cc8..1dc122367aa66a707615ff06ee06acb740e363a8 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/FilterEvents.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/FilterEvents.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/FindCenterOfMassPosition.h b/Framework/Algorithms/inc/MantidAlgorithms/FindCenterOfMassPosition.h index 56259242261a301e4d960183f725af88d9d007e0..8a71ccbf7455d6a87fa0cb6674703cff18ded2da 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/FindCenterOfMassPosition.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/FindCenterOfMassPosition.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/FindCenterOfMassPosition2.h b/Framework/Algorithms/inc/MantidAlgorithms/FindCenterOfMassPosition2.h index 32d547ead2947e8c6f0a24dd39f79bdc2c0b38f6..8db8380a5ea17ed4e630d5f32464f47b90699a8e 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/FindCenterOfMassPosition2.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/FindCenterOfMassPosition2.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/FindDeadDetectors.h b/Framework/Algorithms/inc/MantidAlgorithms/FindDeadDetectors.h index 0a4e68fb633886c4afdd971019f488ea0d374385..5f88c7289f715ed27090dd11dc5474c46b57296a 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/FindDeadDetectors.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/FindDeadDetectors.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/FindDetectorsOutsideLimits.h b/Framework/Algorithms/inc/MantidAlgorithms/FindDetectorsOutsideLimits.h index ca77b0f97b44e29c44c30dbc646be39140df07fd..9d3845637525e34f692f0781b6aa2759e3046d84 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/FindDetectorsOutsideLimits.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/FindDetectorsOutsideLimits.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/FindEPP.h b/Framework/Algorithms/inc/MantidAlgorithms/FindEPP.h index 722e42a424d8bd61adc03b3d71bfb5f41a31cffd..9a723b2a7fd3fcf4dff8de8a48b502ba92c7d23e 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/FindEPP.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/FindEPP.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/FindPeakBackground.h b/Framework/Algorithms/inc/MantidAlgorithms/FindPeakBackground.h index c94b53b96bb8e842f3ffbc39452870e8c0c6d7af..b0d4bc4a4849ef0f5befbe7c767bb8d6bcaa6cea 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/FindPeakBackground.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/FindPeakBackground.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/FindPeaks.h b/Framework/Algorithms/inc/MantidAlgorithms/FindPeaks.h index 643224e7f4fc50efd0f77726b472ecf50598c790..95f0cedf2c8b31da6635ae8100bc297ff576cba2 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/FindPeaks.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/FindPeaks.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -170,8 +170,8 @@ private: /// Fit peak by calling 'FitPeak' double callFitPeak(const API::MatrixWorkspace_sptr &dataws, int wsindex, - const API::IPeakFunction_sptr peakfunction, - const API::IBackgroundFunction_sptr backgroundfunction, + const API::IPeakFunction_sptr &peakfunction, + const API::IBackgroundFunction_sptr &backgroundfunction, const std::vector<double> &vec_fitwindow, const std::vector<double> &vec_peakrange, int minGuessFWHM, int maxGuessFWHM, int guessedFWHMStep, diff --git a/Framework/Algorithms/inc/MantidAlgorithms/FindReflectometryLines2.h b/Framework/Algorithms/inc/MantidAlgorithms/FindReflectometryLines2.h index a0dabc304033a071584d907c77c6200b39d11a60..d071a57b3f37a2215cacd1a8d30b8df50b24ba36 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/FindReflectometryLines2.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/FindReflectometryLines2.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/FitPeak.h b/Framework/Algorithms/inc/MantidAlgorithms/FitPeak.h index 696c084d75e041ac56be02b4a042d7827be75aa9..692741c7a35052c6f5c57739356aac9ab3660c9b 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/FitPeak.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/FitPeak.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -38,14 +38,14 @@ public: } /// Set workspaces - void setWorskpace(API::MatrixWorkspace_sptr dataws, size_t wsindex); + void setWorskpace(const API::MatrixWorkspace_sptr &dataws, size_t wsindex); /// Set fitting method - void setFittingMethod(std::string minimizer, std::string costfunction); + void setFittingMethod(std::string minimizer, const std::string &costfunction); /// Set functions - void setFunctions(API::IPeakFunction_sptr peakfunc, - API::IBackgroundFunction_sptr bkgdfunc); + void setFunctions(const API::IPeakFunction_sptr &peakfunc, + const API::IBackgroundFunction_sptr &bkgdfunc); /// Set fit range void setFitWindow(double leftwindow, double rightwindow); @@ -95,52 +95,52 @@ private: bool hasSetupToFitPeak(std::string &errmsg); /// Estimate the peak height from a set of data containing pure peaks - double estimatePeakHeight(API::IPeakFunction_const_sptr peakfunc, - API::MatrixWorkspace_sptr dataws, size_t wsindex, - size_t ixmin, size_t ixmax); + double estimatePeakHeight(const API::IPeakFunction_const_sptr &peakfunc, + const API::MatrixWorkspace_sptr &dataws, + size_t wsindex, size_t ixmin, size_t ixmax); /// Check a peak function whether it is valid comparing to user specified /// criteria - double checkFittedPeak(API::IPeakFunction_sptr peakfunc, double costfuncvalue, - std::string &errorreason); + double checkFittedPeak(const API::IPeakFunction_sptr &peakfunc, + double costfuncvalue, std::string &errorreason); /// Fit peak function (flexible) - double fitPeakFunction(API::IPeakFunction_sptr peakfunc, - API::MatrixWorkspace_sptr dataws, size_t wsindex, - double startx, double endx); + double fitPeakFunction(const API::IPeakFunction_sptr &peakfunc, + const API::MatrixWorkspace_sptr &dataws, + size_t wsindex, double startx, double endx); /// Fit function in single domain double fitFunctionSD(API::IFunction_sptr fitfunc, - API::MatrixWorkspace_sptr dataws, size_t wsindex, + const API::MatrixWorkspace_sptr &dataws, size_t wsindex, double xmin, double xmax); /// Calculate chi-square of a single domain function - double calChiSquareSD(API::IFunction_sptr fitfunc, - API::MatrixWorkspace_sptr dataws, size_t wsindex, + double calChiSquareSD(const API::IFunction_sptr &fitfunc, + const API::MatrixWorkspace_sptr &dataws, size_t wsindex, double xmin, double xmax); /// Fit peak and background composite function - double fitCompositeFunction(API::IPeakFunction_sptr peakfunc, - API::IBackgroundFunction_sptr bkgdfunc, - API::MatrixWorkspace_sptr dataws, size_t wsindex, - double startx, double endx); + double fitCompositeFunction(const API::IPeakFunction_sptr &peakfunc, + const API::IBackgroundFunction_sptr &bkgdfunc, + const API::MatrixWorkspace_sptr &dataws, + size_t wsindex, double startx, double endx); /// Fit function in multiple-domain - double fitFunctionMD(API::IFunction_sptr fitfunc, - API::MatrixWorkspace_sptr dataws, size_t wsindex, + double fitFunctionMD(const API::IFunction_sptr &fitfunc, + const API::MatrixWorkspace_sptr &dataws, size_t wsindex, std::vector<double> vec_xmin, std::vector<double> vec_xmax); /// remove background - void removeBackground(API::MatrixWorkspace_sptr purePeakWS); + void removeBackground(const API::MatrixWorkspace_sptr &purePeakWS); /// Process and store fit result void processNStoreFitResult(double rwp, bool storebkgd); /// Back up fit result - std::map<std::string, double> backup(API::IFunction_const_sptr func); + std::map<std::string, double> backup(const API::IFunction_const_sptr &func); void pop(const std::map<std::string, double> &funcparammap, - API::IFunction_sptr func); + const API::IFunction_sptr &func); /// Store function fitting error std::map<std::string, double> @@ -316,14 +316,14 @@ private: /// Generate table workspace DataObjects::TableWorkspace_sptr - genOutputTableWS(API::IPeakFunction_sptr peakfunc, + genOutputTableWS(const API::IPeakFunction_sptr &peakfunc, std::map<std::string, double> peakerrormap, - API::IBackgroundFunction_sptr bkgdfunc, + const API::IBackgroundFunction_sptr &bkgdfunc, std::map<std::string, double> bkgderrormap); /// Add function's parameter names after peak function name std::vector<std::string> - addFunctionParameterNames(std::vector<std::string> funcnames); + addFunctionParameterNames(const std::vector<std::string> &funcnames); /// Parse peak type from full peak type/parameter names string std::string parseFunctionTypeFull(const std::string &fullstring, diff --git a/Framework/Algorithms/inc/MantidAlgorithms/FitPeaks.h b/Framework/Algorithms/inc/MantidAlgorithms/FitPeaks.h index 65ff3c11f9ede5226f7fbde9f1c8de9b428b90dc..286faf480dbb79b8440686e56a7caf196a3c8b8c 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/FitPeaks.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/FitPeaks.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -43,7 +43,7 @@ public: double getParameterValue(size_t ipeak, size_t iparam) const; double getParameterError(size_t ipeak, size_t iparam) const; void setRecord(size_t ipeak, const double cost, const double peak_position, - const FitFunction fit_functions); + const FitFunction &fit_functions); void setBadRecord(size_t ipeak, const double peak_position); void setFunctionParameters(size_t ipeak, std::vector<double> ¶m_values); @@ -122,46 +122,45 @@ private: /// fit peaks in a same spectrum void fitSpectrumPeaks( size_t wi, const std::vector<double> &expected_peak_centers, - boost::shared_ptr<FitPeaksAlgorithm::PeakFitResult> fit_result); + const boost::shared_ptr<FitPeaksAlgorithm::PeakFitResult> &fit_result); /// fit background bool fitBackground(const size_t &ws_index, const std::pair<double, double> &fit_window, const double &expected_peak_pos, - API::IBackgroundFunction_sptr bkgd_func); + const API::IBackgroundFunction_sptr &bkgd_func); // Peak fitting suite - double fitIndividualPeak(size_t wi, API::IAlgorithm_sptr fitter, + double fitIndividualPeak(size_t wi, const API::IAlgorithm_sptr &fitter, const double expected_peak_center, const std::pair<double, double> &fitwindow, const bool observe_peak_params, - API::IPeakFunction_sptr peakfunction, - API::IBackgroundFunction_sptr bkgdfunc); + const API::IPeakFunction_sptr &peakfunction, + const API::IBackgroundFunction_sptr &bkgdfunc); /// Methods to fit functions (general) - double fitFunctionSD(API::IAlgorithm_sptr fit, - API::IPeakFunction_sptr peak_function, - API::IBackgroundFunction_sptr bkgd_function, - API::MatrixWorkspace_sptr dataws, size_t wsindex, + double fitFunctionSD(const API::IAlgorithm_sptr &fit, + const API::IPeakFunction_sptr &peak_function, + const API::IBackgroundFunction_sptr &bkgd_function, + const API::MatrixWorkspace_sptr &dataws, size_t wsindex, double xmin, double xmax, const double &expected_peak_center, bool observe_peak_shape, bool estimate_background); double fitFunctionMD(API::IFunction_sptr fit_function, - API::MatrixWorkspace_sptr dataws, size_t wsindex, + const API::MatrixWorkspace_sptr &dataws, size_t wsindex, std::vector<double> &vec_xmin, std::vector<double> &vec_xmax); /// fit a single peak with high background - double fitFunctionHighBackground(API::IAlgorithm_sptr fit, - const std::pair<double, double> &fit_window, - const size_t &ws_index, - const double &expected_peak_center, - bool observe_peak_shape, - API::IPeakFunction_sptr peakfunction, - API::IBackgroundFunction_sptr bkgdfunc); - - void setupParameterTableWorkspace(API::ITableWorkspace_sptr table_ws, + double fitFunctionHighBackground( + const API::IAlgorithm_sptr &fit, + const std::pair<double, double> &fit_window, const size_t &ws_index, + const double &expected_peak_center, bool observe_peak_shape, + const API::IPeakFunction_sptr &peakfunction, + const API::IBackgroundFunction_sptr &bkgdfunc); + + void setupParameterTableWorkspace(const API::ITableWorkspace_sptr &table_ws, const std::vector<std::string> ¶m_names, bool with_chi2); @@ -171,7 +170,7 @@ private: std::vector<double> &vec_e); /// Reduce background - void reduceByBackground(API::IBackgroundFunction_sptr bkgd_func, + void reduceByBackground(const API::IBackgroundFunction_sptr &bkgd_func, const std::vector<double> &vec_x, std::vector<double> &vec_y); @@ -183,7 +182,7 @@ private: /// Esitmate background by 'observation' void estimateBackground(const HistogramData::Histogram &histogram, const std::pair<double, double> &peak_window, - API::IBackgroundFunction_sptr bkgd_function); + const API::IBackgroundFunction_sptr &bkgd_function); /// estimate linear background void estimateLinearBackground(const HistogramData::Histogram &histogram, double left_window_boundary, @@ -193,12 +192,12 @@ private: /// Estimate peak parameters by 'observation' int estimatePeakParameters(const HistogramData::Histogram &histogram, const std::pair<double, double> &peak_window, - API::IPeakFunction_sptr peakfunction, - API::IBackgroundFunction_sptr bkgdfunction, + const API::IPeakFunction_sptr &peakfunction, + const API::IBackgroundFunction_sptr &bkgdfunction, bool observe_peak_width); bool decideToEstimatePeakParams(const bool firstPeakInSpectrum, - API::IPeakFunction_sptr peak_function); + const API::IPeakFunction_sptr &peak_function); /// observe peak center int observePeakCenter(const HistogramData::Histogram &histogram, @@ -215,8 +214,8 @@ private: void processSinglePeakFitResult( size_t wsindex, size_t peakindex, const double cost, const std::vector<double> &expected_peak_positions, - FitPeaksAlgorithm::FitFunction fitfunction, - boost::shared_ptr<FitPeaksAlgorithm::PeakFitResult> fit_result); + const FitPeaksAlgorithm::FitFunction &fitfunction, + const boost::shared_ptr<FitPeaksAlgorithm::PeakFitResult> &fit_result); /// calculate peak+background for fitted void calculateFittedPeaks( @@ -224,8 +223,8 @@ private: fit_results); /// Get the parameter name for peak height (I or height or etc) - std::string - getPeakHeightParameterName(API::IPeakFunction_const_sptr peak_function); + std::string getPeakHeightParameterName( + const API::IPeakFunction_const_sptr &peak_function); /// Set the workspaces and etc to output properties void processOutputs( @@ -235,7 +234,7 @@ private: /// Write result of peak fit per spectrum to output analysis workspaces void writeFitResult( size_t wi, const std::vector<double> &expected_positions, - boost::shared_ptr<FitPeaksAlgorithm::PeakFitResult> fit_result); + const boost::shared_ptr<FitPeaksAlgorithm::PeakFitResult> &fit_result); /// check whether FitPeaks supports observation on a certain peak profile's /// parameters (width!) diff --git a/Framework/Algorithms/inc/MantidAlgorithms/FixGSASInstrumentFile.h b/Framework/Algorithms/inc/MantidAlgorithms/FixGSASInstrumentFile.h index 4cf823b6fa6d61d58c2535588da996cabb870bc2..22ed611f806f5b67cb910e3611154c93e00fc82d 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/FixGSASInstrumentFile.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/FixGSASInstrumentFile.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/FlatPlateAbsorption.h b/Framework/Algorithms/inc/MantidAlgorithms/FlatPlateAbsorption.h index f733c4a482bb3b74e3c945db93ade064e1fc15e4..0a3f68cf33854d33d3376453b9e8c627993a21a2 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/FlatPlateAbsorption.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/FlatPlateAbsorption.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/GSLFunctions.h b/Framework/Algorithms/inc/MantidAlgorithms/GSLFunctions.h index feac893ebeff545907aebddb37b4756d695868fa..4675bb3e66cebf39411ae291e69701f155955528 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/GSLFunctions.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/GSLFunctions.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/GeneralisedSecondDifference.h b/Framework/Algorithms/inc/MantidAlgorithms/GeneralisedSecondDifference.h index 60aa8562abf58326c28c983aec482ffe7a47fc51..fc1f11a9646fcb5830e60da3df88fefa2a71f2a0 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/GeneralisedSecondDifference.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/GeneralisedSecondDifference.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/GenerateEventsFilter.h b/Framework/Algorithms/inc/MantidAlgorithms/GenerateEventsFilter.h index 83dba6fa65cd3b036bb744a60dd0a937567505d8..5326180be0858270ae48fda558b1d3caf5978f80 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/GenerateEventsFilter.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/GenerateEventsFilter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -76,7 +76,7 @@ private: void processInputTime(); void setFilterByTimeOnly(); - void setFilterByLogValue(std::string logname); + void setFilterByLogValue(const std::string &logname); void processSingleValueFilter(double minvalue, double maxvalue, bool filterincrease, bool filterdecrease); @@ -93,7 +93,7 @@ private: /// Make multiple-log-value filters in serial void makeMultipleFiltersByValues(std::map<size_t, int> indexwsindexmap, - std::vector<double> logvalueranges, + const std::vector<double> &logvalueranges, bool centre, bool filterIncrease, bool filterDecrease, Types::Core::DateAndTime startTime, @@ -101,17 +101,19 @@ private: /// Make multiple-log-value filters in serial in parallel void makeMultipleFiltersByValuesParallel( - std::map<size_t, int> indexwsindexmap, std::vector<double> logvalueranges, - bool centre, bool filterIncrease, bool filterDecrease, + const std::map<size_t, int> &indexwsindexmap, + const std::vector<double> &logvalueranges, bool centre, + bool filterIncrease, bool filterDecrease, Types::Core::DateAndTime startTime, Types::Core::DateAndTime stopTime); /// Generate event splitters for partial sample log (serial) void makeMultipleFiltersByValuesPartialLog( int istart, int iend, std::vector<Types::Core::DateAndTime> &vecSplitTime, std::vector<int> &vecSplitGroup, std::map<size_t, int> indexwsindexmap, - const std::vector<double> &logvalueranges, Types::Core::time_duration tol, - bool filterIncrease, bool filterDecrease, - Types::Core::DateAndTime startTime, Types::Core::DateAndTime stopTime); + const std::vector<double> &logvalueranges, + const Types::Core::time_duration &tol, bool filterIncrease, + bool filterDecrease, Types::Core::DateAndTime startTime, + Types::Core::DateAndTime stopTime); /// Generate event filters for integer sample log void processIntegerValueFilter(int minvalue, int maxvalue, @@ -124,7 +126,7 @@ private: /// Add a splitter void addNewTimeFilterSplitter(Types::Core::DateAndTime starttime, Types::Core::DateAndTime stoptime, int wsindex, - std::string info); + const std::string &info); /// Create a splitter and add to the vector of time splitters Types::Core::DateAndTime diff --git a/Framework/Algorithms/inc/MantidAlgorithms/GenerateIPythonNotebook.h b/Framework/Algorithms/inc/MantidAlgorithms/GenerateIPythonNotebook.h index 324ae2481f1a34085312ac212e0b81be89dfc25a..1b6684823182fb11edc6a1e2db5d6d8489eefafc 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/GenerateIPythonNotebook.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/GenerateIPythonNotebook.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/GeneratePeaks.h b/Framework/Algorithms/inc/MantidAlgorithms/GeneratePeaks.h index 9ddc54f7adeba6e3a9ef9116acb2a2618c4d651f..b10f8c3c6deaa673b2e50db2477f4e4630440489 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/GeneratePeaks.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/GeneratePeaks.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -69,10 +69,11 @@ private: const std::map<specnum_t, std::vector<std::pair<double, API::IFunction_sptr>>> &functionmap, - API::MatrixWorkspace_sptr dataWS); + const API::MatrixWorkspace_sptr &dataWS); /// Check whether function has a certain parameter - bool hasParameter(API::IFunction_sptr function, std::string paramname); + bool hasParameter(const API::IFunction_sptr &function, + const std::string ¶mname); /// Create output workspace API::MatrixWorkspace_sptr createOutputWorkspace(); @@ -82,14 +83,15 @@ private: void createFunction(std::string &peaktype, std::string &bkgdtype); - void getSpectraSet(DataObjects::TableWorkspace_const_sptr peakParmsWS); + void getSpectraSet(const DataObjects::TableWorkspace_const_sptr &peakParmsWS); /// Get the IPeakFunction part in the input function - API::IPeakFunction_sptr getPeakFunction(API::IFunction_sptr infunction); + API::IPeakFunction_sptr + getPeakFunction(const API::IFunction_sptr &infunction); /// Add function parameter names to std::vector<std::string> - addFunctionParameterNames(std::vector<std::string> funcnames); + addFunctionParameterNames(const std::vector<std::string> &funcnames); /// Peak function API::IPeakFunction_sptr m_peakFunction; diff --git a/Framework/Algorithms/inc/MantidAlgorithms/GeneratePythonScript.h b/Framework/Algorithms/inc/MantidAlgorithms/GeneratePythonScript.h index 2c78e9ad5a8480d23ff8cddfb85a2b2202c57111..b98c4820c0c173c0d85505f30bc5a05621bb6512 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/GeneratePythonScript.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/GeneratePythonScript.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/GetAllEi.h b/Framework/Algorithms/inc/MantidAlgorithms/GetAllEi.h index 086e301961a6b6dd5ee04cf223da690a7d3fbcce..67fc71dd0f8c3bfd66b6b1ddf1e10eb49beb0b40 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/GetAllEi.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/GetAllEi.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/GetDetOffsetsMultiPeaks.h b/Framework/Algorithms/inc/MantidAlgorithms/GetDetOffsetsMultiPeaks.h index 68268f8fcdb59d18ca6ffdb18f103e0055ff1467..acdd85574617520b751566f61ebcc953c164bcd1 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/GetDetOffsetsMultiPeaks.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/GetDetOffsetsMultiPeaks.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -80,11 +80,11 @@ private: /// Main function to calculate all detectors' offsets void calculateDetectorsOffsets(); - void - importFitWindowTableWorkspace(DataObjects::TableWorkspace_sptr windowtablews); + void importFitWindowTableWorkspace( + const DataObjects::TableWorkspace_sptr &windowtablews); /// Call Gaussian as a Child Algorithm to fit the peak in a spectrum - int fitSpectra(const int64_t wi, API::MatrixWorkspace_sptr inputW, + int fitSpectra(const int64_t wi, const API::MatrixWorkspace_sptr &inputW, const std::vector<double> &peakPositions, const std::vector<double> &fitWindows, size_t &nparams, double &minD, double &maxD, std::vector<double> &peakPosToFit, @@ -94,7 +94,7 @@ private: /// Add peak fitting and offset calculation information to information table /// workspaces per spectrum - void addInfoToReportWS(int wi, FitPeakOffsetResult offsetresult, + void addInfoToReportWS(int wi, const FitPeakOffsetResult &offsetresult, const std::vector<double> &tofitpeakpositions, const std::vector<double> &fittedpeakpositions); diff --git a/Framework/Algorithms/inc/MantidAlgorithms/GetDetectorOffsets.h b/Framework/Algorithms/inc/MantidAlgorithms/GetDetectorOffsets.h index 75b2f44f0028c1ce76563b38d147e2fb07f49b2e..2678eaed214c432eed82538a77600778aa7014c8 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/GetDetectorOffsets.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/GetDetectorOffsets.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/GetEi.h b/Framework/Algorithms/inc/MantidAlgorithms/GetEi.h index b4aa90c62138bc516a35074b7e2fff749a269a9e..424499f333ca434da570da36447f62e1522bfa1a 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/GetEi.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/GetEi.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -68,15 +68,15 @@ private: void init() override; void exec() override; - void getGeometry(API::MatrixWorkspace_const_sptr WS, specnum_t mon0Spec, - specnum_t mon1Spec, double &monitor0Dist, + void getGeometry(const API::MatrixWorkspace_const_sptr &WS, + specnum_t mon0Spec, specnum_t mon1Spec, double &monitor0Dist, double &monitor1Dist) const; - std::vector<size_t> getMonitorWsIndexs(API::MatrixWorkspace_const_sptr WS, - specnum_t specNum1, - specnum_t specNum2) const; + std::vector<size_t> + getMonitorWsIndexs(const API::MatrixWorkspace_const_sptr &WS, + specnum_t specNum1, specnum_t specNum2) const; double timeToFly(double s, double E_KE) const; - double getPeakCentre(API::MatrixWorkspace_const_sptr WS, const size_t monitIn, - const double peakTime); + double getPeakCentre(const API::MatrixWorkspace_const_sptr &WS, + const size_t monitIn, const double peakTime); void extractSpec(int wsInd, double start, double end); void getPeakEstimates(double &height, int64_t ¢reInd, double &background) const; diff --git a/Framework/Algorithms/inc/MantidAlgorithms/GetEi2.h b/Framework/Algorithms/inc/MantidAlgorithms/GetEi2.h index 6f232e34017c261ffe3b63951161843650423ab8..ac6fc8d9d710a35e248f6b4c98c345b17e785c29 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/GetEi2.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/GetEi2.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -84,16 +84,15 @@ private: API::MatrixWorkspace_sptr extractSpectrum(const size_t ws_index, const double start, const double end); /// Calculate peak width - double calculatePeakWidthAtHalfHeight(API::MatrixWorkspace_sptr data_ws, - const double prominence, - std::vector<double> &peak_x, - std::vector<double> &peak_y, - std::vector<double> &peak_e) const; + double calculatePeakWidthAtHalfHeight( + const API::MatrixWorkspace_sptr &data_ws, const double prominence, + std::vector<double> &peak_x, std::vector<double> &peak_y, + std::vector<double> &peak_e) const; /// Calculate the value of the first moment of the given spectrum - double calculateFirstMoment(API::MatrixWorkspace_sptr monitor_ws, + double calculateFirstMoment(const API::MatrixWorkspace_sptr &monitor_ws, const double prominence); /// Rebin the given workspace using the given parameters - API::MatrixWorkspace_sptr rebin(API::MatrixWorkspace_sptr monitor_ws, + API::MatrixWorkspace_sptr rebin(const API::MatrixWorkspace_sptr &monitor_ws, const double first, const double width, const double end); /// Integrate the point data diff --git a/Framework/Algorithms/inc/MantidAlgorithms/GetEiMonDet3.h b/Framework/Algorithms/inc/MantidAlgorithms/GetEiMonDet3.h index 68bde2e457455782fe34faa52be53042dc985ee3..faf915971f26df0ed655415730af28862824bdc3 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/GetEiMonDet3.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/GetEiMonDet3.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/GetQsInQENSData.h b/Framework/Algorithms/inc/MantidAlgorithms/GetQsInQENSData.h index 8387eea48456e82993aabf9ac148a6ef2ebe65f1..26243e70c43f716e130e70b2ad97171444df3b70 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/GetQsInQENSData.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/GetQsInQENSData.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -53,7 +53,7 @@ private: void exec() override; /// Extracts Q-values from the specified matrix workspace - MantidVec extractQValues(const Mantid::API::MatrixWorkspace_sptr workspace); + MantidVec extractQValues(const Mantid::API::MatrixWorkspace_sptr &workspace); }; } // namespace Algorithms } // namespace Mantid diff --git a/Framework/Algorithms/inc/MantidAlgorithms/GetTimeSeriesLogInformation.h b/Framework/Algorithms/inc/MantidAlgorithms/GetTimeSeriesLogInformation.h index 852020cfb8cea5e3b4bde9a7d1d0c6a60a2104d9..d271bef466daa0e90fe6014a0c9bef0ab5e5e84b 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/GetTimeSeriesLogInformation.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/GetTimeSeriesLogInformation.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -89,7 +89,7 @@ private: void execQuickStatistics(); - void exportErrorLog(API::MatrixWorkspace_sptr ws, + void exportErrorLog(const API::MatrixWorkspace_sptr &ws, std::vector<Types::Core::DateAndTime> abstimevec, double dts); diff --git a/Framework/Algorithms/inc/MantidAlgorithms/GravitySANSHelper.h b/Framework/Algorithms/inc/MantidAlgorithms/GravitySANSHelper.h index 5a9b556b81d7fdf5258c4d63c622fa87b93d556e..dfdc1f4b24c09e43e7832f495485a721d5245f10 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/GravitySANSHelper.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/GravitySANSHelper.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/GroupToXResolution.h b/Framework/Algorithms/inc/MantidAlgorithms/GroupToXResolution.h index 905b0c557c7452b13182e38314fddec025ee0b03..329d15fc03f38a37d2b45be2ea82a4a0e3d3dd2e 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/GroupToXResolution.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/GroupToXResolution.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/GroupWorkspaces.h b/Framework/Algorithms/inc/MantidAlgorithms/GroupWorkspaces.h index e639b63e72a08b84ad1f9176e19e726dead87ba5..dda6ffd86a7932b1aff0c817da78433f0442bec5 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/GroupWorkspaces.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/GroupWorkspaces.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/HRPDSlabCanAbsorption.h b/Framework/Algorithms/inc/MantidAlgorithms/HRPDSlabCanAbsorption.h index 407658c6c24b7c1a8d7c101233186106a4867ea3..62bb0eed6870f473430f26174b85323008d53c4b 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/HRPDSlabCanAbsorption.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/HRPDSlabCanAbsorption.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/He3TubeEfficiency.h b/Framework/Algorithms/inc/MantidAlgorithms/He3TubeEfficiency.h index 9eb8caa529b2c24a3a9d54e84718508b4f3a41d8..77c6a08bdd537237e1983d03cdb81c92b9b69119 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/He3TubeEfficiency.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/He3TubeEfficiency.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -94,8 +94,9 @@ private: /// Log any errors with spectra that occurred void logErrors() const; /// Retrieve the detector parameters from workspace or detector properties - double getParameter(std::string wsPropName, std::size_t currentIndex, - std::string detPropName, const Geometry::IDetector &idet); + double getParameter(const std::string &wsPropName, std::size_t currentIndex, + const std::string &detPropName, + const Geometry::IDetector &idet); /// Helper for event handling template <class T> void eventHelper(std::vector<T> &events, double expval); /// Function to calculate exponential contribution diff --git a/Framework/Algorithms/inc/MantidAlgorithms/HyspecScharpfCorrection.h b/Framework/Algorithms/inc/MantidAlgorithms/HyspecScharpfCorrection.h index 844867e12396a69b51f33e745a6060fd8021f69c..ad30ef215d52388ca87c9d444a2a9831851463b1 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/HyspecScharpfCorrection.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/HyspecScharpfCorrection.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/IQTransform.h b/Framework/Algorithms/inc/MantidAlgorithms/IQTransform.h index ab0ff92f55be184d61bf108a8591c2f36dc7de09..6343d9f8392b6f216995ec9c7d1d4479507ea42b 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/IQTransform.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/IQTransform.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -67,10 +67,11 @@ private: void exec() override; inline API::MatrixWorkspace_sptr - subtractBackgroundWS(API::MatrixWorkspace_sptr ws, - API::MatrixWorkspace_sptr background); + subtractBackgroundWS(const API::MatrixWorkspace_sptr &ws, + const API::MatrixWorkspace_sptr &background); - using TransformFunc = void (IQTransform::*)(API::MatrixWorkspace_sptr); + using TransformFunc = + void (IQTransform::*)(const API::MatrixWorkspace_sptr &); using TransformMap = std::map<std::string, TransformFunc>; TransformMap m_transforms; ///< A map of transformation name and function pointers @@ -78,16 +79,16 @@ private: boost::shared_ptr<Kernel::Units::Label> m_label; // A function for each transformation - void guinierSpheres(API::MatrixWorkspace_sptr ws); - void guinierRods(API::MatrixWorkspace_sptr ws); - void guinierSheets(API::MatrixWorkspace_sptr ws); - void zimm(API::MatrixWorkspace_sptr ws); - void debyeBueche(API::MatrixWorkspace_sptr ws); - void kratky(API::MatrixWorkspace_sptr ws); - void porod(API::MatrixWorkspace_sptr ws); - void holtzer(API::MatrixWorkspace_sptr ws); - void logLog(API::MatrixWorkspace_sptr ws); - void general(API::MatrixWorkspace_sptr ws); + void guinierSpheres(const API::MatrixWorkspace_sptr &ws); + void guinierRods(const API::MatrixWorkspace_sptr &ws); + void guinierSheets(const API::MatrixWorkspace_sptr &ws); + void zimm(const API::MatrixWorkspace_sptr &ws); + void debyeBueche(const API::MatrixWorkspace_sptr &ws); + void kratky(const API::MatrixWorkspace_sptr &ws); + void porod(const API::MatrixWorkspace_sptr &ws); + void holtzer(const API::MatrixWorkspace_sptr &ws); + void logLog(const API::MatrixWorkspace_sptr &ws); + void general(const API::MatrixWorkspace_sptr &ws); }; } // namespace Algorithms diff --git a/Framework/Algorithms/inc/MantidAlgorithms/IdentifyNoisyDetectors.h b/Framework/Algorithms/inc/MantidAlgorithms/IdentifyNoisyDetectors.h index 7b61b6c58ed176fbcdb5efa24495d34793b77ba1..39b39f5bec5857b77cca4e9180cc60090fba3782 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/IdentifyNoisyDetectors.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/IdentifyNoisyDetectors.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -49,8 +49,8 @@ private: void exec() override; ///< Executes the algorithm. void getStdDev(API::Progress &progress, - Mantid::API::MatrixWorkspace_sptr valid, - Mantid::API::MatrixWorkspace_sptr values); + const Mantid::API::MatrixWorkspace_sptr &valid, + const Mantid::API::MatrixWorkspace_sptr &values); }; } // namespace Algorithms } // namespace Mantid diff --git a/Framework/Algorithms/inc/MantidAlgorithms/IntegrateByComponent.h b/Framework/Algorithms/inc/MantidAlgorithms/IntegrateByComponent.h index ef7273fd8adca43252d28d1ad0c42c5eb7c3b2af..526d705d2a85e6f54f2c6eaee7279fb0759973aa 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/IntegrateByComponent.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/IntegrateByComponent.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -34,11 +34,11 @@ private: void exec() override; /// method to check which spectra should be averaged - std::vector<std::vector<size_t>> makeMap(API::MatrixWorkspace_sptr countsWS, - int parents); + std::vector<std::vector<size_t>> + makeMap(const API::MatrixWorkspace_sptr &countsWS, int parents); /// method to create the map with all spectra std::vector<std::vector<size_t>> - makeInstrumentMap(API::MatrixWorkspace_sptr countsWS); + makeInstrumentMap(const API::MatrixWorkspace_sptr &countsWS); }; } // namespace Algorithms diff --git a/Framework/Algorithms/inc/MantidAlgorithms/IntegrateEPP.h b/Framework/Algorithms/inc/MantidAlgorithms/IntegrateEPP.h index 6ad47984e109fc45727123afe0d056b8d90681e8..0da63a4b23a1a9d9152e2aafd99013a603f50c35 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/IntegrateEPP.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/IntegrateEPP.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/Integration.h b/Framework/Algorithms/inc/MantidAlgorithms/Integration.h index f2cbe779e60819f7aeac7ca0a1546e9a6bc35ad8..d35d07f4742377db50ebd2cc1a0144d599ee70f0 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/Integration.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/Integration.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -66,7 +66,7 @@ private: void exec() override; API::MatrixWorkspace_sptr - rangeFilterEventWorkspace(API::MatrixWorkspace_sptr workspace, + rangeFilterEventWorkspace(const API::MatrixWorkspace_sptr &workspace, double minRange, double maxRange); /// Get the input workspace diff --git a/Framework/Algorithms/inc/MantidAlgorithms/InterpolatingRebin.h b/Framework/Algorithms/inc/MantidAlgorithms/InterpolatingRebin.h index 551ef22da1ecb06578ed9bcbc0338bd40ff4e340..fb5c7d267364d0dc7a1bbf475991b6c653c65f03 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/InterpolatingRebin.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/InterpolatingRebin.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -78,9 +78,9 @@ protected: void init() override; void exec() override; - void outputYandEValues(API::MatrixWorkspace_const_sptr inputW, + void outputYandEValues(const API::MatrixWorkspace_const_sptr &inputW, const HistogramData::BinEdges &XValues_new, - API::MatrixWorkspace_sptr outputW); + const API::MatrixWorkspace_sptr &outputW); HistogramData::Histogram cubicInterpolation(const HistogramData::Histogram &oldHistogram, const HistogramData::BinEdges &xNew) const; diff --git a/Framework/Algorithms/inc/MantidAlgorithms/InterpolationOption.h b/Framework/Algorithms/inc/MantidAlgorithms/InterpolationOption.h index 86aee185a51e0c02ca7df742cfbfa427fc3e1785..2a2c56b02083af158a814e99804423a9d50412a6 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/InterpolationOption.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/InterpolationOption.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/InvertMask.h b/Framework/Algorithms/inc/MantidAlgorithms/InvertMask.h index d7c33c4070f9acdaf104e7b987dec0b1d9b51883..af95d12a9b098f1a0fe71b899ca27aea84485ab4 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/InvertMask.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/InvertMask.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/LineProfile.h b/Framework/Algorithms/inc/MantidAlgorithms/LineProfile.h index 9d516cfdaf08bcf41c9c67a1d51930c716ddbec4..3c2adb5d5a0dec605eafe45593fa97596248b355 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/LineProfile.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/LineProfile.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/Logarithm.h b/Framework/Algorithms/inc/MantidAlgorithms/Logarithm.h index 0360240c9d24346df4668499b7e0ef157fbe6f25..1f36677fb63a2bf42bd7ee5f3bed9f9ce29290b3 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/Logarithm.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/Logarithm.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/LorentzCorrection.h b/Framework/Algorithms/inc/MantidAlgorithms/LorentzCorrection.h index 17bc3b0d000051f12557fc8fd79cbe02457b2da7..f42c7e1e6515442b5ae97a3425c9900e338b3ad1 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/LorentzCorrection.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/LorentzCorrection.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/MagFormFactorCorrection.h b/Framework/Algorithms/inc/MantidAlgorithms/MagFormFactorCorrection.h index 50b7cad1cabcd048f6c6243cab223d79d13d3c5d..239f0c84f9000f116f04f08631b656b40b4d0744 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/MagFormFactorCorrection.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/MagFormFactorCorrection.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/MaskBins.h b/Framework/Algorithms/inc/MantidAlgorithms/MaskBins.h index 17a53dc83acbae1ff2eabac354bce3f592249699..e5d65d6f523c8c8b6bddae9e6fec495d104ae09c 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/MaskBins.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/MaskBins.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/MaskBinsFromTable.h b/Framework/Algorithms/inc/MantidAlgorithms/MaskBinsFromTable.h index 0baf93b5337320431478260c94c4c074dba6d4eb..e5db169d12f3de85b4771f87f5e82c107ef697f3 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/MaskBinsFromTable.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/MaskBinsFromTable.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -43,14 +43,15 @@ private: void exec() override; /// Process input Mask bin TableWorkspace. - void processMaskBinWorkspace(DataObjects::TableWorkspace_sptr masktblws, - API::MatrixWorkspace_sptr dataws); + void + processMaskBinWorkspace(const DataObjects::TableWorkspace_sptr &masktblws, + const API::MatrixWorkspace_sptr &dataws); /// Call MaskBins - void maskBins(API::MatrixWorkspace_sptr dataws); + void maskBins(const API::MatrixWorkspace_sptr &dataws); /// Convert a list of detector IDs list (string) to a list of /// spectra/workspace indexes list - std::string convertToSpectraList(API::MatrixWorkspace_sptr dataws, - std::string detidliststr); + std::string convertToSpectraList(const API::MatrixWorkspace_sptr &dataws, + const std::string &detidliststr); /// Column indexes of XMin, XMax, SpectraList, DetectorIDsList int id_xmin, id_xmax, id_spec, id_dets; diff --git a/Framework/Algorithms/inc/MantidAlgorithms/MaskBinsFromWorkspace.h b/Framework/Algorithms/inc/MantidAlgorithms/MaskBinsFromWorkspace.h index 087e9c86e61e05ccb7a7376445674cdf03bec0be..2cd43f7c7b7926b7f1155dd4a4abbecfe499d153 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/MaskBinsFromWorkspace.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/MaskBinsFromWorkspace.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/MaskBinsIf.h b/Framework/Algorithms/inc/MantidAlgorithms/MaskBinsIf.h index 3bd8ab85c98cfc5e31f899c05b07b529e1ffc454..1b5200c0613e3373e6543de80f017dfde1e9ffdb 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/MaskBinsIf.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/MaskBinsIf.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/MaskDetectorsIf.h b/Framework/Algorithms/inc/MantidAlgorithms/MaskDetectorsIf.h index 32b58208087dd2257576f1bb9a175eed647c5eb4..fea5926b4ac67f19c16aff2892048138395a17cc 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/MaskDetectorsIf.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/MaskDetectorsIf.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/MaskInstrument.h b/Framework/Algorithms/inc/MantidAlgorithms/MaskInstrument.h index 2bb02e0800cc2fe9968deaa0061646e06bcc7661..120555c6d3f2e1c35aed3d1048a66a09bdeccb9a 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/MaskInstrument.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/MaskInstrument.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/MaskNonOverlappingBins.h b/Framework/Algorithms/inc/MantidAlgorithms/MaskNonOverlappingBins.h index 392d14d11a4b770d3007eea63a6d8992e008d7f4..8795b414940922967aafedaedd4f7436dc10f8b0 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/MaskNonOverlappingBins.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/MaskNonOverlappingBins.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/MatrixWorkspaceAccess.h b/Framework/Algorithms/inc/MantidAlgorithms/MatrixWorkspaceAccess.h index 53127e36eeaa775acd536014df00284900d5823d..ef75652d138ea36cb30580f2366d7709e4512ac4 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/MatrixWorkspaceAccess.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/MatrixWorkspaceAccess.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/Max.h b/Framework/Algorithms/inc/MantidAlgorithms/Max.h index b9b0ba67c4d5df35b7e7e3137fdeecc95dbb6454..ef449aab3b413a6bb23de1bb4ce091cab51ef1aa 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/Max.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/Max.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/MaxEnt.h b/Framework/Algorithms/inc/MantidAlgorithms/MaxEnt.h index 25b5f1e85686986bd07d7cfe070b8575d4b32991..970b3a383e905b272c60c64e4c603216901ab70e 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/MaxEnt.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/MaxEnt.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -67,7 +67,7 @@ private: /// Updates the image std::vector<double> updateImage(const std::vector<double> &image, const std::vector<double> &delta, - const std::vector<std::vector<double>> dirs); + const std::vector<std::vector<double>> &dirs); /// Populates the output workspace containing the reconstructed data void populateDataWS(API::MatrixWorkspace_const_sptr &inWS, size_t spec, diff --git a/Framework/Algorithms/inc/MantidAlgorithms/MaxEnt/MaxentCalculator.h b/Framework/Algorithms/inc/MantidAlgorithms/MaxEnt/MaxentCalculator.h index 2fd2d36891c8bafbc15a5a0d14d35ac20b8b654d..592ca0f7afffbc88b463979c4d2867d81061efb1 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/MaxEnt/MaxentCalculator.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/MaxEnt/MaxentCalculator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/MaxEnt/MaxentCoefficients.h b/Framework/Algorithms/inc/MantidAlgorithms/MaxEnt/MaxentCoefficients.h index 9043aafb9ed6c839e0f5c198059b6b088be4c8b2..85fd316b96b8dc28003193e23625c30290d2f01c 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/MaxEnt/MaxentCoefficients.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/MaxEnt/MaxentCoefficients.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/MaxEnt/MaxentEntropy.h b/Framework/Algorithms/inc/MantidAlgorithms/MaxEnt/MaxentEntropy.h index 184b096ced3071c5cd0ecc9e86c7e44bf18ba387..9b1d47e360d34744a88d9b8673fe95fd4049e2b9 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/MaxEnt/MaxentEntropy.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/MaxEnt/MaxentEntropy.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/MaxEnt/MaxentEntropyNegativeValues.h b/Framework/Algorithms/inc/MantidAlgorithms/MaxEnt/MaxentEntropyNegativeValues.h index 6d9da981b2efaebe2acf9b27e767c214cfa5dc72..de6dfcc32f859aaa7dbf5460b6603a0f5e5eceef 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/MaxEnt/MaxentEntropyNegativeValues.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/MaxEnt/MaxentEntropyNegativeValues.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/MaxEnt/MaxentEntropyPositiveValues.h b/Framework/Algorithms/inc/MantidAlgorithms/MaxEnt/MaxentEntropyPositiveValues.h index b9a5c9fa4f4266cdbe6973a4eff1cb19cd50be57..f2099c46db8da2d24f47714638aa061812a152bd 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/MaxEnt/MaxentEntropyPositiveValues.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/MaxEnt/MaxentEntropyPositiveValues.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/MaxEnt/MaxentSpace.h b/Framework/Algorithms/inc/MantidAlgorithms/MaxEnt/MaxentSpace.h index 9e959c52b5320b2b97e9bf6640a2f76297203b7d..d4b95c73e09008e62259094da625baf14e803eb3 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/MaxEnt/MaxentSpace.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/MaxEnt/MaxentSpace.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/MaxEnt/MaxentSpaceComplex.h b/Framework/Algorithms/inc/MantidAlgorithms/MaxEnt/MaxentSpaceComplex.h index 216e495381aa6ca62cb131935394691257ea6b6e..417c3afaff60e1d20eb4762828a12b655192831a 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/MaxEnt/MaxentSpaceComplex.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/MaxEnt/MaxentSpaceComplex.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/MaxEnt/MaxentSpaceReal.h b/Framework/Algorithms/inc/MantidAlgorithms/MaxEnt/MaxentSpaceReal.h index 1c081589eaf42b838b8129b963f57ffe8c6fc1ec..396455ebeca04d54cafb16e2af597c84dadac775 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/MaxEnt/MaxentSpaceReal.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/MaxEnt/MaxentSpaceReal.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/MaxEnt/MaxentTransform.h b/Framework/Algorithms/inc/MantidAlgorithms/MaxEnt/MaxentTransform.h index 17de8d6bb1b3667be88053bc70b7b38d1045315e..a3239ce244b801ead2e4ffcf58f8e8cc2c7be177 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/MaxEnt/MaxentTransform.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/MaxEnt/MaxentTransform.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/MaxEnt/MaxentTransformFourier.h b/Framework/Algorithms/inc/MantidAlgorithms/MaxEnt/MaxentTransformFourier.h index b4942291165bf580313814bfb10475709ab1e614..e7d5803f9760a0836d6b5e59959bea7bef1e65e3 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/MaxEnt/MaxentTransformFourier.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/MaxEnt/MaxentTransformFourier.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/MaxEnt/MaxentTransformMultiFourier.h b/Framework/Algorithms/inc/MantidAlgorithms/MaxEnt/MaxentTransformMultiFourier.h index 7750e7671a169080a7b85de32f2ca047182b7e61..69d1ac3e34c91faf04fc6d0ab807670faceedb15 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/MaxEnt/MaxentTransformMultiFourier.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/MaxEnt/MaxentTransformMultiFourier.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -36,7 +36,7 @@ public: // Deleted default constructor MaxentTransformMultiFourier() = delete; // Constructor - MaxentTransformMultiFourier(MaxentSpaceComplex_sptr dataSpace, + MaxentTransformMultiFourier(const MaxentSpaceComplex_sptr &dataSpace, MaxentSpace_sptr imageSpace, size_t numSpec); // Transfoms form image space to data space std::vector<double> imageToData(const std::vector<double> &image) override; diff --git a/Framework/Algorithms/inc/MantidAlgorithms/MaxMin.h b/Framework/Algorithms/inc/MantidAlgorithms/MaxMin.h index aa7832fcd973ba443bf95cf60efd5c4734095f5d..cf23731ace2c5cce5ee634abfb39492e5f20c0aa 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/MaxMin.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/MaxMin.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/MedianDetectorTest.h b/Framework/Algorithms/inc/MantidAlgorithms/MedianDetectorTest.h index 982a331283efed100682e30ee4dd680a43f2385d..e1ab2d7c02cbb80b844512d486c71fadca709df0 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/MedianDetectorTest.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/MedianDetectorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -76,14 +76,14 @@ private: /// Calculates the sum of solid angles of detectors for each histogram API::MatrixWorkspace_sptr getSolidAngles(int firstSpec, int lastSpec); /// Mask the outlier values to get a better median value - int maskOutliers(const std::vector<double> medianvec, - API::MatrixWorkspace_sptr countsWS, + int maskOutliers(const std::vector<double> &medianvec, + const API::MatrixWorkspace_sptr &countsWS, std::vector<std::vector<size_t>> indexmap); /// Do the tests and mask those that fail - int doDetectorTests(const API::MatrixWorkspace_sptr countsWS, - const std::vector<double> medianvec, + int doDetectorTests(const API::MatrixWorkspace_sptr &countsWS, + const std::vector<double> &medianvec, std::vector<std::vector<size_t>> indexmap, - API::MatrixWorkspace_sptr maskWS); + const API::MatrixWorkspace_sptr &maskWS); API::MatrixWorkspace_sptr m_inputWS; /// The proportion of the median value below which a detector is considered diff --git a/Framework/Algorithms/inc/MantidAlgorithms/MergeLogs.h b/Framework/Algorithms/inc/MantidAlgorithms/MergeLogs.h index f79dcdb4e3957e865423dcdf04eeb7e21dfd7098..e4e397bf9b18ed8299047d07f7ea6296698db03d 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/MergeLogs.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/MergeLogs.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/MergeRuns.h b/Framework/Algorithms/inc/MantidAlgorithms/MergeRuns.h index e24ec0469802e2bf460852693fb95742d868f2dd..3209ae593419108d0258090e75df7c0a30396df0 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/MergeRuns.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/MergeRuns.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/Min.h b/Framework/Algorithms/inc/MantidAlgorithms/Min.h index 4ccad7156b399765c51de6a05526ba34f8413ba3..ab9ec5741cc0bab33d2b64f7e5393f20fe669e6c 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/Min.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/Min.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/Minus.h b/Framework/Algorithms/inc/MantidAlgorithms/Minus.h index b5e058d3c7fc1360a30f72d20f3a152d21f02601..8dd896560879f1fcc343b22b789b7cbcab5035d7 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/Minus.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/Minus.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidAlgorithms/BinaryOperation.h" @@ -66,8 +66,8 @@ private: std::string checkSizeCompatibility( const API::MatrixWorkspace_const_sptr lhs, const API::MatrixWorkspace_const_sptr rhs) const override; - bool checkUnitCompatibility(const API::MatrixWorkspace_const_sptr lhs, - const API::MatrixWorkspace_const_sptr rhs) const; + bool checkUnitCompatibility(const API::MatrixWorkspace_const_sptr &lhs, + const API::MatrixWorkspace_const_sptr &rhs) const; bool checkCompatibility(const API::MatrixWorkspace_const_sptr lhs, const API::MatrixWorkspace_const_sptr rhs) const override; diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ModeratorTzero.h b/Framework/Algorithms/inc/MantidAlgorithms/ModeratorTzero.h index c56e65f26bce808fe94fae8a18b94fd3971d5599..b61c826dbe75c557f74af5cefd809fcb622c864b 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/ModeratorTzero.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/ModeratorTzero.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ModeratorTzeroLinear.h b/Framework/Algorithms/inc/MantidAlgorithms/ModeratorTzeroLinear.h index df41e6fbe7b8fbe7840907f9aec0adfa241f93bf..8be71afb855da293be999ac84d01cff454f03d21 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/ModeratorTzeroLinear.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/ModeratorTzeroLinear.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/MonitorEfficiencyCorUser.h b/Framework/Algorithms/inc/MantidAlgorithms/MonitorEfficiencyCorUser.h index 20c50e9b878f34c20dfcedf21d98c1de86ec3136..e974e8abb9d5b0314b6edd9d6ce5dd089648c79f 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/MonitorEfficiencyCorUser.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/MonitorEfficiencyCorUser.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/MonteCarloAbsorption.h b/Framework/Algorithms/inc/MantidAlgorithms/MonteCarloAbsorption.h index d3e0ae52ddf1459a24660e98270f7fab5c82eb43..31b7bb98a5b3c8d71560c8c127915ba0e73e9128 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/MonteCarloAbsorption.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/MonteCarloAbsorption.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/MostLikelyMean.h b/Framework/Algorithms/inc/MantidAlgorithms/MostLikelyMean.h index 82116fa14f2637603b5d8313a28b64dfedba3082..3588d307f25b812524aa9c490f08d39805a42191 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/MostLikelyMean.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/MostLikelyMean.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/MultipleScatteringCylinderAbsorption.h b/Framework/Algorithms/inc/MantidAlgorithms/MultipleScatteringCylinderAbsorption.h index e3c9f4e2a6da8e85bfed38dc04c30338a21542a5..388c6a906334497e2f52434aaa82bf20dded84c7 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/MultipleScatteringCylinderAbsorption.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/MultipleScatteringCylinderAbsorption.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/Multiply.h b/Framework/Algorithms/inc/MantidAlgorithms/Multiply.h index 78193cdd973cc36ab84e2dacac89948a8509539b..063af562531d40efe9278c55be2f13aaf3acbdbd 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/Multiply.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/Multiply.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/MultiplyRange.h b/Framework/Algorithms/inc/MantidAlgorithms/MultiplyRange.h index cbb56c693454f1667e9812c71d3a6e31dfb0629e..1026760f08f98681c2a0b6f13abe642a7a260f58 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/MultiplyRange.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/MultiplyRange.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/NRCalculateSlitResolution.h b/Framework/Algorithms/inc/MantidAlgorithms/NRCalculateSlitResolution.h index e19841622caf8283b97c38b63a4d3ef5d82c5a4a..767823d1de139f7ae63b5e5accabe45dc653ca44 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/NRCalculateSlitResolution.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/NRCalculateSlitResolution.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/NormaliseByCurrent.h b/Framework/Algorithms/inc/MantidAlgorithms/NormaliseByCurrent.h index ea4e57e7688de2acfe7163e18d692a2f6404fcde..3fbe4eb3e86e867ea17e1153f57257a94effeab3 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/NormaliseByCurrent.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/NormaliseByCurrent.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -55,8 +55,9 @@ private: void init() override; void exec() override; // Extract the charge value from the logs. - double extractCharge(boost::shared_ptr<Mantid::API::MatrixWorkspace> inputWS, - const bool integratePCharge) const; + double + extractCharge(const boost::shared_ptr<Mantid::API::MatrixWorkspace> &inputWS, + const bool integratePCharge) const; }; } // namespace Algorithms diff --git a/Framework/Algorithms/inc/MantidAlgorithms/NormaliseByDetector.h b/Framework/Algorithms/inc/MantidAlgorithms/NormaliseByDetector.h index 707eaa43f47b1e1dcb48d0dec77641bbb893d379..6a9a6febdb011c353e63291f9525077eff5cad49 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/NormaliseByDetector.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/NormaliseByDetector.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -48,16 +48,16 @@ private: /// Try to parse a function parameter and extract the correctly typed /// parameter. const Mantid::Geometry::FitParameter - tryParseFunctionParameter(Mantid::Geometry::Parameter_sptr parameter, + tryParseFunctionParameter(const Mantid::Geometry::Parameter_sptr ¶meter, const Geometry::IDetector &det); /// Block to process histograms. - boost::shared_ptr<Mantid::API::MatrixWorkspace> - processHistograms(boost::shared_ptr<Mantid::API::MatrixWorkspace> inWS); + boost::shared_ptr<Mantid::API::MatrixWorkspace> processHistograms( + const boost::shared_ptr<Mantid::API::MatrixWorkspace> &inWS); /// Process indivdual histogram. void processHistogram( size_t wsIndex, - boost::shared_ptr<const Mantid::API::MatrixWorkspace> inWS, - boost::shared_ptr<Mantid::API::MatrixWorkspace> denominatorWS, + const boost::shared_ptr<const Mantid::API::MatrixWorkspace> &inWS, + const boost::shared_ptr<Mantid::API::MatrixWorkspace> &denominatorWS, Mantid::API::Progress &prog); void init() override; diff --git a/Framework/Algorithms/inc/MantidAlgorithms/NormaliseToMonitor.h b/Framework/Algorithms/inc/MantidAlgorithms/NormaliseToMonitor.h index 724c3c9d32749a631679b5737e1572d233b9a591..c36d200e4f4e137d9f5eee9e94a2b716b06d4521 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/NormaliseToMonitor.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/NormaliseToMonitor.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -166,7 +166,7 @@ private: mutable bool is_enabled; // auxiliary function to obtain list of monitor's ID-s (allowed_values) from a // workspace; - bool monitorIdReader(API::MatrixWorkspace_const_sptr inputWS) const; + bool monitorIdReader(const API::MatrixWorkspace_const_sptr &inputWS) const; }; } // namespace Algorithms diff --git a/Framework/Algorithms/inc/MantidAlgorithms/NormaliseToUnity.h b/Framework/Algorithms/inc/MantidAlgorithms/NormaliseToUnity.h index de28940308d7598bd67763ab09205abf62a29cc2..c13139323721025f4ba46160ad73a2df8031ceda 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/NormaliseToUnity.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/NormaliseToUnity.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/OneMinusExponentialCor.h b/Framework/Algorithms/inc/MantidAlgorithms/OneMinusExponentialCor.h index bf9ae24d4c0b2f8c87f0265912c403c2ace7b71e..63b1e09f0663aeba99471fcb248d36c803dbff89 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/OneMinusExponentialCor.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/OneMinusExponentialCor.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/PDCalibration.h b/Framework/Algorithms/inc/MantidAlgorithms/PDCalibration.h index 12200de94471f5d32fd24832400703f73f593c7f..aa46946a5183c933090ac4b8875ef41a146e7a8f 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/PDCalibration.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/PDCalibration.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -40,7 +40,7 @@ private: void exec() override; API::MatrixWorkspace_sptr loadAndBin(); API::MatrixWorkspace_sptr rebin(API::MatrixWorkspace_sptr wksp); - API::MatrixWorkspace_sptr load(const std::string filename); + API::MatrixWorkspace_sptr load(const std::string &filename); void createCalTableFromExisting(); void createCalTableNew(); void createInformationWorkspaces(); @@ -59,8 +59,9 @@ private: /// NEW: convert peak positions in dSpacing to peak centers workspace std::pair<API::MatrixWorkspace_sptr, API::MatrixWorkspace_sptr> - createTOFPeakCenterFitWindowWorkspaces(API::MatrixWorkspace_sptr dataws, - const double peakWindowMaxInDSpacing); + createTOFPeakCenterFitWindowWorkspaces( + const API::MatrixWorkspace_sptr &dataws, + const double peakWindowMaxInDSpacing); API::ITableWorkspace_sptr sortTableWorkspace(API::ITableWorkspace_sptr &table); diff --git a/Framework/Algorithms/inc/MantidAlgorithms/PDDetermineCharacterizations.h b/Framework/Algorithms/inc/MantidAlgorithms/PDDetermineCharacterizations.h index 2608d09d4a6e9d7462fea0f336984abb073df686..9d946a7338fbc6685067b34c7c69410ab937699b 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/PDDetermineCharacterizations.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/PDDetermineCharacterizations.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/PDFFourierTransform.h b/Framework/Algorithms/inc/MantidAlgorithms/PDFFourierTransform.h index 1a8657fa17ba41a52896e2f8d312a5f73609d571..47cad4ad45651ae4a29434969c435a97e660afb3 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/PDFFourierTransform.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/PDFFourierTransform.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/PaddingAndApodization.h b/Framework/Algorithms/inc/MantidAlgorithms/PaddingAndApodization.h index 7f52c57c6e8654ca9f86d97d6e8d0b66a98bca0a..748cb88668927fa071f43fadc974f6d688b24a80 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/PaddingAndApodization.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/PaddingAndApodization.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -53,7 +53,7 @@ private: void init() override; void exec() override; using fptr = double (*)(const double, const double); - fptr getApodizationFunction(const std::string method); + fptr getApodizationFunction(const std::string &method); HistogramData::Histogram applyApodizationFunction(const HistogramData::Histogram &histogram, const double decayConstant, fptr function); diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ParallaxCorrection.h b/Framework/Algorithms/inc/MantidAlgorithms/ParallaxCorrection.h index e85732c71613a78249beb53715c008caa7fe9b76..d3d2bf817b965adad15b72e899cff4309ef3ebda 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/ParallaxCorrection.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/ParallaxCorrection.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -25,8 +25,9 @@ public: private: void init() override; void exec() override; - void performCorrection(API::MatrixWorkspace_sptr, const std::vector<size_t> &, - const std::string &, const std::string &); + void performCorrection(const API::MatrixWorkspace_sptr &, + const std::vector<size_t> &, const std::string &, + const std::string &); }; } // namespace Algorithms diff --git a/Framework/Algorithms/inc/MantidAlgorithms/Pause.h b/Framework/Algorithms/inc/MantidAlgorithms/Pause.h index 2ce85b2b13bb7b6f222ec4b5d0c5b6fcd0c03da3..92a9967321ea4008bfac719926908d0b0a560436 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/Pause.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/Pause.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/PerformIndexOperations.h b/Framework/Algorithms/inc/MantidAlgorithms/PerformIndexOperations.h index 4b7c3b1024bb7e161416b80f5a2648d13e841f33..b7364b416d6ad01b305311dd93b97217ad309e66 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/PerformIndexOperations.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/PerformIndexOperations.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/Plus.h b/Framework/Algorithms/inc/MantidAlgorithms/Plus.h index afbe35d94f5c8d5922c8e5da8eef40e85c2f378f..c6c7a6d1b4f9f9a4477a913d24f6a96fa26b1f54 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/Plus.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/Plus.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -75,8 +75,8 @@ private: API::Run &ans) const override; // Overridden event-specific operation - bool checkUnitCompatibility(const API::MatrixWorkspace_const_sptr lhs, - const API::MatrixWorkspace_const_sptr rhs) const; + bool checkUnitCompatibility(const API::MatrixWorkspace_const_sptr &lhs, + const API::MatrixWorkspace_const_sptr &rhs) const; }; } // namespace Algorithms diff --git a/Framework/Algorithms/inc/MantidAlgorithms/PointByPointVCorrection.h b/Framework/Algorithms/inc/MantidAlgorithms/PointByPointVCorrection.h index 167dcea67fc8feb870a36621fad58a581573ca2c..cb21f1ace2e4f6b9fdf4e72a861e45916059ed53 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/PointByPointVCorrection.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/PointByPointVCorrection.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/PoissonErrors.h b/Framework/Algorithms/inc/MantidAlgorithms/PoissonErrors.h index 6bda74b9731cb3bd958cff7f7168f30c9f604d95..47a2d2accad3464fc666ffcd1b61ef2623d59613 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/PoissonErrors.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/PoissonErrors.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/PolarizationCorrectionFredrikze.h b/Framework/Algorithms/inc/MantidAlgorithms/PolarizationCorrectionFredrikze.h index c6b1a90c402a7147c3a6b4088b313df5a705ade0..e6586dbb8051a84ccd2389ca4279237d92925d8b 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/PolarizationCorrectionFredrikze.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/PolarizationCorrectionFredrikze.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -41,9 +41,9 @@ private: boost::shared_ptr<Mantid::API::MatrixWorkspace> getEfficiencyWorkspace(const std::string &label); boost::shared_ptr<Mantid::API::WorkspaceGroup> - execPA(boost::shared_ptr<Mantid::API::WorkspaceGroup> inWS); + execPA(const boost::shared_ptr<Mantid::API::WorkspaceGroup> &inWS); boost::shared_ptr<Mantid::API::WorkspaceGroup> - execPNR(boost::shared_ptr<Mantid::API::WorkspaceGroup> inWS); + execPNR(const boost::shared_ptr<Mantid::API::WorkspaceGroup> &inWS); boost::shared_ptr<Mantid::API::MatrixWorkspace> add(boost::shared_ptr<Mantid::API::MatrixWorkspace> &lhsWS, const double &rhs); diff --git a/Framework/Algorithms/inc/MantidAlgorithms/PolarizationCorrectionWildes.h b/Framework/Algorithms/inc/MantidAlgorithms/PolarizationCorrectionWildes.h index 6676037f6fe1afe562ab326b8f85292da60c179d..88b2c8aff17e3e197aa090de76ef3a0fd36b5e71 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/PolarizationCorrectionWildes.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/PolarizationCorrectionWildes.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/PolarizationEfficiencyCor.h b/Framework/Algorithms/inc/MantidAlgorithms/PolarizationEfficiencyCor.h index 57eab6d7609cfc5a7683b1966911c75cdbe11266..46d3da8102a5b0fdbca9f8ff6cbe785ffcc51ab9 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/PolarizationEfficiencyCor.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/PolarizationEfficiencyCor.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -45,8 +45,9 @@ private: API::MatrixWorkspace const &inWS) const; API::MatrixWorkspace_sptr convertToHistogram(API::MatrixWorkspace_sptr efficiencies); - API::MatrixWorkspace_sptr interpolate(API::MatrixWorkspace_sptr efficiencies, - API::MatrixWorkspace_sptr inWS); + API::MatrixWorkspace_sptr + interpolate(const API::MatrixWorkspace_sptr &efficiencies, + const API::MatrixWorkspace_sptr &inWS); }; } // namespace Algorithms diff --git a/Framework/Algorithms/inc/MantidAlgorithms/PolynomialCorrection.h b/Framework/Algorithms/inc/MantidAlgorithms/PolynomialCorrection.h index 3fd36d372ca77c3271e6918eb77c7bc4a4ba27fe..5c0cfd1fa084a4e94de8fc981bcacaec744c70b1 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/PolynomialCorrection.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/PolynomialCorrection.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/Power.h b/Framework/Algorithms/inc/MantidAlgorithms/Power.h index fb72905cc33a16fd835715ab4face83875592aff..8a76762f782a13555da2e6e96aa28ee740976cdd 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/Power.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/Power.h @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #pragma once //---------------------------------------------------------------------- diff --git a/Framework/Algorithms/inc/MantidAlgorithms/PowerLawCorrection.h b/Framework/Algorithms/inc/MantidAlgorithms/PowerLawCorrection.h index 72a6488b9df20362dffbdf49ed50bb499e65041a..83d646cb195c30081c177b60e0d21fca27569a54 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/PowerLawCorrection.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/PowerLawCorrection.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/PrecompiledHeader.h b/Framework/Algorithms/inc/MantidAlgorithms/PrecompiledHeader.h index 6c428c279dd926bb8a5648b5985725fa46d4e76c..ee50ae4d79d27236975c55a5b99c18d4322f8259 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/PrecompiledHeader.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/PrecompiledHeader.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/Q1D2.h b/Framework/Algorithms/inc/MantidAlgorithms/Q1D2.h index 89651584d56201206e67a64bddbfe1ffc43857c4..a930255c0c5f7f5daf548b1c637190a6438bdaa6 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/Q1D2.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/Q1D2.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -63,13 +63,13 @@ private: // these are the steps that are run on each individual spectrum void calculateNormalization(const size_t wavStart, const size_t wsIndex, - API::MatrixWorkspace_const_sptr pixelAdj, - API::MatrixWorkspace_const_sptr wavePixelAdj, + const API::MatrixWorkspace_const_sptr &pixelAdj, + const API::MatrixWorkspace_const_sptr &wavePixelAdj, double const *const binNorms, double const *const binNormEs, HistogramData::HistogramY::iterator norm, HistogramData::HistogramY::iterator normETo2) const; - void pixelWeight(API::MatrixWorkspace_const_sptr pixelAdj, + void pixelWeight(const API::MatrixWorkspace_const_sptr &pixelAdj, const size_t wsIndex, double &weight, double &error) const; void addWaveAdj(const double *c, const double *Dc, HistogramData::HistogramY::iterator bInOut, diff --git a/Framework/Algorithms/inc/MantidAlgorithms/Q1DWeighted.h b/Framework/Algorithms/inc/MantidAlgorithms/Q1DWeighted.h index ea5e960010e227d46b89c50a34a6c323695d0b7a..a542b5ee4fc74137f0c3ae7ad33764d1bc82ca4a 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/Q1DWeighted.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/Q1DWeighted.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -70,12 +70,12 @@ public: private: /// Create an output workspace API::MatrixWorkspace_sptr - createOutputWorkspace(API::MatrixWorkspace_const_sptr, const size_t, + createOutputWorkspace(const API::MatrixWorkspace_const_sptr &, const size_t, const std::vector<double> &); - void bootstrap(API::MatrixWorkspace_const_sptr); - void calculate(API::MatrixWorkspace_const_sptr); - void finalize(API::MatrixWorkspace_const_sptr); + void bootstrap(const API::MatrixWorkspace_const_sptr &); + void calculate(const API::MatrixWorkspace_const_sptr &); + void finalize(const API::MatrixWorkspace_const_sptr &); std::vector<std::vector<std::vector<double>>> m_intensities; std::vector<std::vector<std::vector<double>>> m_errors; diff --git a/Framework/Algorithms/inc/MantidAlgorithms/Qhelper.h b/Framework/Algorithms/inc/MantidAlgorithms/Qhelper.h index b8b884e60a5a1861f5406b072647ff52ae89c9af..30d9028be9c94cffcae53adc3909abe6684d1f43 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/Qhelper.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/Qhelper.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -19,22 +19,23 @@ namespace Algorithms { */ class Qhelper { public: - void examineInput(API::MatrixWorkspace_const_sptr dataWS, - API::MatrixWorkspace_const_sptr binAdj, - API::MatrixWorkspace_const_sptr detectAdj, - API::MatrixWorkspace_const_sptr qResolution); + void examineInput(const API::MatrixWorkspace_const_sptr &dataWS, + const API::MatrixWorkspace_const_sptr &binAdj, + const API::MatrixWorkspace_const_sptr &detectAdj, + const API::MatrixWorkspace_const_sptr &qResolution); - void examineInput(API::MatrixWorkspace_const_sptr dataWS, - API::MatrixWorkspace_const_sptr binAdj, - API::MatrixWorkspace_const_sptr detectAdj); + void examineInput(const API::MatrixWorkspace_const_sptr &dataWS, + const API::MatrixWorkspace_const_sptr &binAdj, + const API::MatrixWorkspace_const_sptr &detectAdj); - size_t waveLengthCutOff(API::MatrixWorkspace_const_sptr dataWS, + size_t waveLengthCutOff(const API::MatrixWorkspace_const_sptr &dataWS, const API::SpectrumInfo &spectrumInfo, const double RCut, const double WCut, const size_t wsInd) const; - void outputParts(API::Algorithm *alg, API::MatrixWorkspace_sptr sumOfCounts, - API::MatrixWorkspace_sptr sumOfNormFactors); + void outputParts(API::Algorithm *alg, + const API::MatrixWorkspace_sptr &sumOfCounts, + const API::MatrixWorkspace_sptr &sumOfNormFactors); private: /// the experimental workspace with counts across the detector diff --git a/Framework/Algorithms/inc/MantidAlgorithms/Qxy.h b/Framework/Algorithms/inc/MantidAlgorithms/Qxy.h index 1ec09b017277b2756266177815289d06bd4cd154..49b1cef9c863c4f1c37343cc4536fcfa0292701e 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/Qxy.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/Qxy.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -55,7 +55,7 @@ private: std::vector<double> logBinning(double min, double max, int num); API::MatrixWorkspace_sptr - setUpOutputWorkspace(API::MatrixWorkspace_const_sptr inputWorkspace); + setUpOutputWorkspace(const API::MatrixWorkspace_const_sptr &inputWorkspace); double getQminFromWs(const API::MatrixWorkspace &inputWorkspace); }; diff --git a/Framework/Algorithms/inc/MantidAlgorithms/RadiusSum.h b/Framework/Algorithms/inc/MantidAlgorithms/RadiusSum.h index edc09189e5f57e73d3bc35d2327c31df53e3389f..1a10f80ca0ec3e26a07770a0962f7be7f2e01272 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/RadiusSum.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/RadiusSum.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -35,13 +35,14 @@ public: } const std::string category() const override; - static bool inputWorkspaceHasInstrumentAssociated(API::MatrixWorkspace_sptr); + static bool + inputWorkspaceHasInstrumentAssociated(const API::MatrixWorkspace_sptr &); static std::vector<double> - getBoundariesOfNumericImage(API::MatrixWorkspace_sptr); + getBoundariesOfNumericImage(const API::MatrixWorkspace_sptr &); static std::vector<double> - getBoundariesOfInstrument(API::MatrixWorkspace_sptr); + getBoundariesOfInstrument(const API::MatrixWorkspace_sptr &); static void centerIsInsideLimits(const std::vector<double> ¢re, const std::vector<double> &boundaries); @@ -71,8 +72,8 @@ private: API::MatrixWorkspace_sptr inputWS; double min_radius = 0.0, max_radius = 0.0; - double getMinBinSizeForInstrument(API::MatrixWorkspace_sptr); - double getMinBinSizeForNumericImage(API::MatrixWorkspace_sptr); + double getMinBinSizeForInstrument(const API::MatrixWorkspace_sptr &); + double getMinBinSizeForNumericImage(const API::MatrixWorkspace_sptr &); /** Return the bin position for a given distance * From the input, it is defined the limits of distances as: diff --git a/Framework/Algorithms/inc/MantidAlgorithms/RayTracerTester.h b/Framework/Algorithms/inc/MantidAlgorithms/RayTracerTester.h index 3c9a19e50799b80de71be0cc024967d127eced6b..f40bc340955edbce6c01aae7257e5f839c93656e 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/RayTracerTester.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/RayTracerTester.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ReadGroupsFromFile.h b/Framework/Algorithms/inc/MantidAlgorithms/ReadGroupsFromFile.h index 88a307879da6f6412cff44579594ef40d949f572..3246112763dc2ebf5aa4e9bf9f813c536186c3bd 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/ReadGroupsFromFile.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/ReadGroupsFromFile.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/RealFFT.h b/Framework/Algorithms/inc/MantidAlgorithms/RealFFT.h index 54d8c3ac4ca1abd2d3a8d16e98eb24d86375d58e..7733d7bb85a92985984050f2b41686f6b0faedaf 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/RealFFT.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/RealFFT.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/Rebin.h b/Framework/Algorithms/inc/MantidAlgorithms/Rebin.h index ef0b906e214bb5eae25b92781412012ed1f7b0db..d46fda033bb8af861c4b9d98804629cf29a22b9e 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/Rebin.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/Rebin.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -76,8 +76,8 @@ protected: void init() override; void exec() override; - void propagateMasks(API::MatrixWorkspace_const_sptr inputWS, - API::MatrixWorkspace_sptr outputWS, int hist); + void propagateMasks(const API::MatrixWorkspace_const_sptr &inputWS, + const API::MatrixWorkspace_sptr &outputWS, int hist); }; } // namespace Algorithms diff --git a/Framework/Algorithms/inc/MantidAlgorithms/Rebin2D.h b/Framework/Algorithms/inc/MantidAlgorithms/Rebin2D.h index f9cb306c9d48afe1c826a399d7774789f5189691..aee539762162b2e2fb5c88bcd66116d4e1dbc91b 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/Rebin2D.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/Rebin2D.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/RebinByPulseTimes.h b/Framework/Algorithms/inc/MantidAlgorithms/RebinByPulseTimes.h index 63c4ae42cb7c2a2191d7e58db835eed18bd740f2..1bac47829d2ab52f83c65415c98ca45e4cb4d53e 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/RebinByPulseTimes.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/RebinByPulseTimes.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/RebinByTimeAtSample.h b/Framework/Algorithms/inc/MantidAlgorithms/RebinByTimeAtSample.h index b6577eeae4d3883d9bedb30002135c7ea2afb3b9..8b886d5e703ba9f4b15893f4f7103af533f567f8 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/RebinByTimeAtSample.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/RebinByTimeAtSample.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/RebinByTimeBase.h b/Framework/Algorithms/inc/MantidAlgorithms/RebinByTimeBase.h index bbf3a704e7e9570ef67f6b0320eb9b2da81eae27..0c02447d88c0efc665b7a463a59b4e8758895057 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/RebinByTimeBase.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/RebinByTimeBase.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/RebinToWorkspace.h b/Framework/Algorithms/inc/MantidAlgorithms/RebinToWorkspace.h index b365b3664d1a2c056ac191b89eca10dc0cbb49cc..3649d33c7ed1dffee0e8f105f5f6a8079967f996 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/RebinToWorkspace.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/RebinToWorkspace.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/Rebunch.h b/Framework/Algorithms/inc/MantidAlgorithms/Rebunch.h index 3afe6931c4fe7e60d4e1cdd77f88d27597485aef..9bba6c495d5600a4c8daa62dd80d2b661666e35c 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/Rebunch.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/Rebunch.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/RecordPythonScript.h b/Framework/Algorithms/inc/MantidAlgorithms/RecordPythonScript.h index 1d70be39df2478c945f6e8ec9122bc7986d86459..a83580ec23e05d3e03de04db6a53d4cdc241a67a 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/RecordPythonScript.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/RecordPythonScript.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ReflectometryBackgroundSubtraction.h b/Framework/Algorithms/inc/MantidAlgorithms/ReflectometryBackgroundSubtraction.h index 38caba504c65924e7a680f42b8f6b9e0f5de7986..c24eb84ccb91e0b76d719ac95bec1a4240d6a300 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/ReflectometryBackgroundSubtraction.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/ReflectometryBackgroundSubtraction.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -27,13 +27,13 @@ public: private: void - calculateAverageSpectrumBackground(API::MatrixWorkspace_sptr inputWS, + calculateAverageSpectrumBackground(const API::MatrixWorkspace_sptr &inputWS, const std::vector<specnum_t> &spectraList); void calculatePolynomialBackground(API::MatrixWorkspace_sptr inputWS, const std::vector<double> &spectrumRanges); std::vector<double> findSpectrumRanges(const std::vector<specnum_t> &spectraList); - void calculatePixelBackground(API::MatrixWorkspace_sptr inputWS, + void calculatePixelBackground(const API::MatrixWorkspace_sptr &inputWS, const std::vector<double> &indexRanges); /** Overridden Algorithm methods **/ diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ReflectometryBeamStatistics.h b/Framework/Algorithms/inc/MantidAlgorithms/ReflectometryBeamStatistics.h index 6b4dead2206ca1ccbeb8047f5c099ac42d8af01e..9f995f2f39e101f43f4f4188f789e1bb9fdde718 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/ReflectometryBeamStatistics.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/ReflectometryBeamStatistics.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -26,9 +26,9 @@ public: const static std::string SAMPLE_WAVINESS; const static std::string SECOND_SLIT_ANGULAR_SPREAD; }; - static double slitSeparation(Geometry::Instrument_const_sptr instrument, - const std::string &slit1Name, - const std::string &slit2Name); + static double + slitSeparation(const Geometry::Instrument_const_sptr &instrument, + const std::string &slit1Name, const std::string &slit2Name); const std::string name() const override; int version() const override; const std::string category() const override; diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ReflectometryMomentumTransfer.h b/Framework/Algorithms/inc/MantidAlgorithms/ReflectometryMomentumTransfer.h index 304bc391ccd97fc607d59b17f8a104c852a966d9..7b365266b47206089d4cd4d7c3297108f23f4ba6 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/ReflectometryMomentumTransfer.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/ReflectometryMomentumTransfer.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ReflectometryReductionOne2.h b/Framework/Algorithms/inc/MantidAlgorithms/ReflectometryReductionOne2.h index f2b1e5a1dd53535aa2989079439b244b8f7667e5..4c720c38d542fffdd6f4f3662e1164bc79462cbf 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/ReflectometryReductionOne2.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/ReflectometryReductionOne2.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -66,30 +66,30 @@ private: directBeamCorrection(Mantid::API::MatrixWorkspace_sptr detectorWS); // Performs transmission or algorithm correction Mantid::API::MatrixWorkspace_sptr - transOrAlgCorrection(Mantid::API::MatrixWorkspace_sptr detectorWS, + transOrAlgCorrection(const Mantid::API::MatrixWorkspace_sptr &detectorWS, const bool detectorWSReduced); // Performs background subtraction Mantid::API::MatrixWorkspace_sptr backgroundSubtraction(Mantid::API::MatrixWorkspace_sptr detectorWS); // Performs transmission corrections Mantid::API::MatrixWorkspace_sptr - transmissionCorrection(Mantid::API::MatrixWorkspace_sptr detectorWS, + transmissionCorrection(const Mantid::API::MatrixWorkspace_sptr &detectorWS, const bool detectorWSReduced); // Performs transmission corrections using alternative correction algorithms Mantid::API::MatrixWorkspace_sptr - algorithmicCorrection(Mantid::API::MatrixWorkspace_sptr detectorWS); + algorithmicCorrection(const Mantid::API::MatrixWorkspace_sptr &detectorWS); // Performs monitor corrections Mantid::API::MatrixWorkspace_sptr monitorCorrection(Mantid::API::MatrixWorkspace_sptr detectorWS); // convert to momentum transfer Mantid::API::MatrixWorkspace_sptr - convertToQ(Mantid::API::MatrixWorkspace_sptr inputWS); + convertToQ(const Mantid::API::MatrixWorkspace_sptr &inputWS); // Get the twoTheta width of a given detector double getDetectorTwoThetaRange(const size_t spectrumIdx); // Utility function to create name for diagnostic workspaces std::string createDebugWorkspaceName(const std::string &inputName); // Utility function to output a diagnostic workspace to the ADS - void outputDebugWorkspace(API::MatrixWorkspace_sptr ws, + void outputDebugWorkspace(const API::MatrixWorkspace_sptr &ws, const std::string &wsName, const std::string &wsSuffix, const bool debug, int &step); @@ -97,7 +97,7 @@ private: Mantid::API::MatrixWorkspace_sptr makeIvsLam(); // Do the reduction by summation in Q Mantid::API::MatrixWorkspace_sptr - sumInQ(API::MatrixWorkspace_sptr detectorWS); + sumInQ(const API::MatrixWorkspace_sptr &detectorWS); // Do the summation in Q for a single input value void sumInQProcessValue(const int inputIdx, const double twoTheta, const double bTwoTheta, @@ -106,23 +106,23 @@ private: const HistogramData::HistogramE &inputE, const std::vector<size_t> &detectors, const size_t outSpecIdx, - API::MatrixWorkspace_sptr IvsLam, + const API::MatrixWorkspace_sptr &IvsLam, std::vector<double> &outputE); // Share counts to a projected value for summation in Q void sumInQShareCounts(const double inputCounts, const double inputErr, const double bLambda, const double lambdaMin, const double lambdaMax, const size_t outSpecIdx, - API::MatrixWorkspace_sptr IvsLam, + const API::MatrixWorkspace_sptr &IvsLam, std::vector<double> &outputE); - void findWavelengthMinMax(API::MatrixWorkspace_sptr inputWS); + void findWavelengthMinMax(const API::MatrixWorkspace_sptr &inputWS); // Construct the output workspace - void findIvsLamRange(API::MatrixWorkspace_sptr detectorWS, + void findIvsLamRange(const API::MatrixWorkspace_sptr &detectorWS, const std::vector<size_t> &detectors, const double lambdaMin, const double lambdaMax, double &projectedMin, double &projectedMax); // Construct the output workspace Mantid::API::MatrixWorkspace_sptr - constructIvsLamWS(API::MatrixWorkspace_sptr detectorWS); + constructIvsLamWS(const API::MatrixWorkspace_sptr &detectorWS); // Whether summation should be done in Q or the default lambda bool summingInQ(); // Get projected coordinates onto twoThetaR @@ -132,8 +132,8 @@ private: double &lambdaTop, double &lambdaBot, const bool outerCorners = true); // Check whether two spectrum maps match - void verifySpectrumMaps(API::MatrixWorkspace_const_sptr ws1, - API::MatrixWorkspace_const_sptr ws2); + void verifySpectrumMaps(const API::MatrixWorkspace_const_sptr &ws1, + const API::MatrixWorkspace_const_sptr &ws2); // Find and cache constants void findDetectorGroups(); @@ -149,10 +149,10 @@ private: double wavelengthMax() { return m_wavelengthMax; }; size_t findIvsLamRangeMinDetector(const std::vector<size_t> &detectors); size_t findIvsLamRangeMaxDetector(const std::vector<size_t> &detectors); - double findIvsLamRangeMin(Mantid::API::MatrixWorkspace_sptr detectorWS, + double findIvsLamRangeMin(const Mantid::API::MatrixWorkspace_sptr &detectorWS, const std::vector<size_t> &detectors, const double lambda); - double findIvsLamRangeMax(Mantid::API::MatrixWorkspace_sptr detectorWS, + double findIvsLamRangeMax(const Mantid::API::MatrixWorkspace_sptr &detectorWS, const std::vector<size_t> &detectors, const double lambda); diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ReflectometryReductionOneAuto2.h b/Framework/Algorithms/inc/MantidAlgorithms/ReflectometryReductionOneAuto2.h index 34216331495ff04e0a3439a46e128deb1baee8a3..e769ba96ff556e4bc69d5498504155aa40b1fee2 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/ReflectometryReductionOneAuto2.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/ReflectometryReductionOneAuto2.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -47,7 +47,7 @@ private: class RebinParams { public: RebinParams(const double qMin, const bool qMinIsDefault, const double qMax, - const bool qMaxIsDefault, const boost::optional<double> qStep) + const bool qMaxIsDefault, const boost::optional<double> &qStep) : m_qMin(qMin), m_qMinIsDefault(qMinIsDefault), m_qMax(qMax), m_qMaxIsDefault(qMaxIsDefault), m_qStep(qStep){}; @@ -72,33 +72,34 @@ private: void init() override; void exec() override; std::string - getRunNumberForWorkspaceGroup(WorkspaceGroup_const_sptr workspace); + getRunNumberForWorkspaceGroup(const WorkspaceGroup_const_sptr &workspace); WorkspaceNames getOutputWorkspaceNames(); void setDefaultOutputWorkspaceNames(); /// Get the name of the detectors of interest based on processing instructions std::vector<std::string> - getDetectorNames(Mantid::API::MatrixWorkspace_sptr inputWS); + getDetectorNames(const Mantid::API::MatrixWorkspace_sptr &inputWS); /// Correct detector positions vertically Mantid::API::MatrixWorkspace_sptr correctDetectorPositions(Mantid::API::MatrixWorkspace_sptr inputWS, const double twoTheta); /// Calculate theta - double calculateTheta(Mantid::API::MatrixWorkspace_sptr inputWS); + double calculateTheta(const Mantid::API::MatrixWorkspace_sptr &inputWS); /// Find cropping and binning parameters - RebinParams getRebinParams(MatrixWorkspace_sptr inputWS, const double theta); - boost::optional<double> getQStep(MatrixWorkspace_sptr inputWS, + RebinParams getRebinParams(const MatrixWorkspace_sptr &inputWS, + const double theta); + boost::optional<double> getQStep(const MatrixWorkspace_sptr &inputWS, const double theta); /// Rebin and scale a workspace in Q Mantid::API::MatrixWorkspace_sptr - rebinAndScale(Mantid::API::MatrixWorkspace_sptr inputWS, + rebinAndScale(const Mantid::API::MatrixWorkspace_sptr &inputWS, RebinParams const ¶ms); /// Crop a workspace in Q - MatrixWorkspace_sptr cropQ(MatrixWorkspace_sptr inputWS, + MatrixWorkspace_sptr cropQ(const MatrixWorkspace_sptr &inputWS, RebinParams const ¶ms); /// Populate algorithmic correction properties void populateAlgorithmicCorrectionProperties( - Mantid::API::IAlgorithm_sptr alg, - Mantid::Geometry::Instrument_const_sptr instrument); + const Mantid::API::IAlgorithm_sptr &alg, + const Mantid::Geometry::Instrument_const_sptr &instrument); /// Get a polarization efficiencies workspace. std::tuple<API::MatrixWorkspace_sptr, std::string, std::string> getPolarizationEfficiencies(); diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ReflectometryReductionOneAuto3.h b/Framework/Algorithms/inc/MantidAlgorithms/ReflectometryReductionOneAuto3.h index 07001209fa12c31b686243e00f28da80eba8dd16..7c0193309122668aab971e68b207638c5c5bd2f3 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/ReflectometryReductionOneAuto3.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/ReflectometryReductionOneAuto3.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -58,35 +58,37 @@ private: void init() override; void exec() override; std::string - getRunNumberForWorkspaceGroup(WorkspaceGroup_const_sptr workspace); + getRunNumberForWorkspaceGroup(const WorkspaceGroup_const_sptr &workspace); WorkspaceNames getOutputWorkspaceNames(); void setDefaultOutputWorkspaceNames(); /// Get the name of the detectors of interest based on processing instructions std::vector<std::string> - getDetectorNames(Mantid::API::MatrixWorkspace_sptr inputWS); + getDetectorNames(const Mantid::API::MatrixWorkspace_sptr &inputWS); /// Correct detector positions vertically Mantid::API::MatrixWorkspace_sptr correctDetectorPositions(Mantid::API::MatrixWorkspace_sptr inputWS, const double twoTheta); /// Calculate theta - double calculateTheta(Mantid::API::MatrixWorkspace_sptr inputWS); + double calculateTheta(const Mantid::API::MatrixWorkspace_sptr &inputWS); /// Find cropping and binning parameters - RebinParams getRebinParams(MatrixWorkspace_sptr inputWS, const double theta); - boost::optional<double> getQStep(MatrixWorkspace_sptr inputWS, + RebinParams getRebinParams(const MatrixWorkspace_sptr &inputWS, + const double theta); + boost::optional<double> getQStep(const MatrixWorkspace_sptr &inputWS, const double theta); // Optionally scale a workspace Mantid::API::MatrixWorkspace_sptr scale(Mantid::API::MatrixWorkspace_sptr inputWS); /// Rebin a workspace in Q Mantid::API::MatrixWorkspace_sptr - rebin(Mantid::API::MatrixWorkspace_sptr inputWS, const RebinParams ¶ms); + rebin(const Mantid::API::MatrixWorkspace_sptr &inputWS, + const RebinParams ¶ms); /// Optionally crop a workspace in Q MatrixWorkspace_sptr cropQ(MatrixWorkspace_sptr inputWS, const RebinParams ¶ms); /// Populate algorithmic correction properties void populateAlgorithmicCorrectionProperties( - Mantid::API::IAlgorithm_sptr alg, - Mantid::Geometry::Instrument_const_sptr instrument); + const Mantid::API::IAlgorithm_sptr &alg, + const Mantid::Geometry::Instrument_const_sptr &instrument); /// Get a polarization efficiencies workspace. std::tuple<API::MatrixWorkspace_sptr, std::string, std::string> getPolarizationEfficiencies(); diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ReflectometrySumInQ.h b/Framework/Algorithms/inc/MantidAlgorithms/ReflectometrySumInQ.h index 1f1141be0b1c45387191a52a604d7d8db1d95927..03e1a8928c67b982e039a90f5673a2a2fb3f2822 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/ReflectometrySumInQ.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/ReflectometrySumInQ.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ReflectometryWorkflowBase.h b/Framework/Algorithms/inc/MantidAlgorithms/ReflectometryWorkflowBase.h index c52b12a7893de9f744df97b0452ef404907e363d..f79bd7b6713a48af8941276f98d1fb4e83e4fb1d 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/ReflectometryWorkflowBase.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/ReflectometryWorkflowBase.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -44,9 +44,9 @@ public: /// Convert the input workspace to wavelength, splitting according to the /// properties provided. DetectorMonitorWorkspacePair - toLam(Mantid::API::MatrixWorkspace_sptr toConvert, + toLam(const Mantid::API::MatrixWorkspace_sptr &toConvert, const std::string &processingCommands, - const OptionalInteger monitorIndex, const MinMax &wavelengthMinMax, + const OptionalInteger &monitorIndex, const MinMax &wavelengthMinMax, const OptionalMinMax &backgroundMinMax); /// Convert the detector spectrum of the input workspace to wavelength @@ -70,12 +70,11 @@ protected: /// Get the min/max property values MinMax getMinMax(const std::string &minProperty, const std::string &maxProperty) const; - OptionalMinMax getOptionalMinMax(Mantid::API::Algorithm *const alg, - const std::string &minProperty, - const std::string &maxProperty, - Mantid::Geometry::Instrument_const_sptr inst, - std::string minIdfName, - std::string maxIdfName) const; + OptionalMinMax getOptionalMinMax( + Mantid::API::Algorithm *const alg, const std::string &minProperty, + const std::string &maxProperty, + const Mantid::Geometry::Instrument_const_sptr &inst, + const std::string &minIdfName, const std::string &maxIdfName) const; /// Get the transmission correction properties void getTransmissionRunInfo( OptionalMatrixWorkspace_sptr &firstTransmissionRun, @@ -102,7 +101,7 @@ private: /// Convert the monitor parts of the input workspace to wavelength API::MatrixWorkspace_sptr toLamMonitor(const API::MatrixWorkspace_sptr &toConvert, - const OptionalInteger monitorIndex, + const OptionalInteger &monitorIndex, const OptionalMinMax &backgroundMinMax); /// Make a unity workspace diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ReflectometryWorkflowBase2.h b/Framework/Algorithms/inc/MantidAlgorithms/ReflectometryWorkflowBase2.h index a8760a8b3b05d98c0976b23b60d540fa67c406bc..6b28e816c9d2eef0bc15a76b301c471e22de9571 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/ReflectometryWorkflowBase2.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/ReflectometryWorkflowBase2.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -54,10 +54,10 @@ protected: std::map<std::string, std::string> validateWavelengthRanges() const; /// Convert a workspace from TOF to wavelength Mantid::API::MatrixWorkspace_sptr - convertToWavelength(Mantid::API::MatrixWorkspace_sptr inputWS); + convertToWavelength(const Mantid::API::MatrixWorkspace_sptr &inputWS); /// Crop a workspace in wavelength Mantid::API::MatrixWorkspace_sptr - cropWavelength(Mantid::API::MatrixWorkspace_sptr inputWS, + cropWavelength(const Mantid::API::MatrixWorkspace_sptr &inputWS, const bool useArgs = false, const double argMin = 0.0, const double argMax = 0.0); // Create a detector workspace from input workspace in wavelength @@ -66,43 +66,44 @@ protected: const bool convert = true, const bool sum = true); // Create a monitor workspace from input workspace in wavelength Mantid::API::MatrixWorkspace_sptr - makeMonitorWS(Mantid::API::MatrixWorkspace_sptr inputWS, + makeMonitorWS(const Mantid::API::MatrixWorkspace_sptr &inputWS, bool integratedMonitors); // Rebin detectors to monitors Mantid::API::MatrixWorkspace_sptr - rebinDetectorsToMonitors(Mantid::API::MatrixWorkspace_sptr detectorWS, - Mantid::API::MatrixWorkspace_sptr monitorWS); + rebinDetectorsToMonitors(const Mantid::API::MatrixWorkspace_sptr &detectorWS, + const Mantid::API::MatrixWorkspace_sptr &monitorWS); // Read monitor properties from instrument - void - populateMonitorProperties(Mantid::API::IAlgorithm_sptr alg, - Mantid::Geometry::Instrument_const_sptr instrument); + void populateMonitorProperties( + const Mantid::API::IAlgorithm_sptr &alg, + const Mantid::Geometry::Instrument_const_sptr &instrument); /// Populate processing instructions - std::string - findProcessingInstructions(Mantid::Geometry::Instrument_const_sptr instrument, - Mantid::API::MatrixWorkspace_sptr inputWS) const; + std::string findProcessingInstructions( + const Mantid::Geometry::Instrument_const_sptr &instrument, + const Mantid::API::MatrixWorkspace_sptr &inputWS) const; /// Populate transmission properties - bool populateTransmissionProperties(Mantid::API::IAlgorithm_sptr alg) const; + bool + populateTransmissionProperties(const Mantid::API::IAlgorithm_sptr &alg) const; /// Find theta from a named log value - double getThetaFromLogs(Mantid::API::MatrixWorkspace_sptr inputWs, + double getThetaFromLogs(const Mantid::API::MatrixWorkspace_sptr &inputWs, const std::string &logName); // Retrieve the run number from the logs of the input workspace. std::string getRunNumber(Mantid::API::MatrixWorkspace const &ws) const; - void convertProcessingInstructions(Instrument_const_sptr instrument, - MatrixWorkspace_sptr inputWS); - void convertProcessingInstructions(MatrixWorkspace_sptr inputWS); + void convertProcessingInstructions(const Instrument_const_sptr &instrument, + const MatrixWorkspace_sptr &inputWS); + void convertProcessingInstructions(const MatrixWorkspace_sptr &inputWS); std::string m_processingInstructionsWorkspaceIndex; std::string m_processingInstructions; protected: - std::string - convertToSpectrumNumber(const std::string &workspaceIndex, - Mantid::API::MatrixWorkspace_const_sptr ws) const; + std::string convertToSpectrumNumber( + const std::string &workspaceIndex, + const Mantid::API::MatrixWorkspace_const_sptr &ws) const; std::string convertProcessingInstructionsToSpectrumNumbers( const std::string &instructions, - Mantid::API::MatrixWorkspace_const_sptr ws) const; + const Mantid::API::MatrixWorkspace_const_sptr &ws) const; - void setWorkspacePropertyFromChild(Algorithm_sptr alg, + void setWorkspacePropertyFromChild(const Algorithm_sptr &alg, std::string const &propertyName); }; } // namespace Algorithms diff --git a/Framework/Algorithms/inc/MantidAlgorithms/Regroup.h b/Framework/Algorithms/inc/MantidAlgorithms/Regroup.h index 8a7895124c607a598c57d58723fabab87c71581b..632dd1f7f4da9692f44882172c263452e43507f8 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/Regroup.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/Regroup.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/RemoveBackground.h b/Framework/Algorithms/inc/MantidAlgorithms/RemoveBackground.h index 69b0f2b744f9d8def6b73dc94e656c98eef693b2..0b4cbfa584c6d44cc0a73a4f0109126e2d7bf5a5 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/RemoveBackground.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/RemoveBackground.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/RemoveBins.h b/Framework/Algorithms/inc/MantidAlgorithms/RemoveBins.h index 3db399a5fbf09bca604f9e42c2cad6cf1c7cb0db..b3862afea157cd89bf1012e731ef06ec3753c539 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/RemoveBins.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/RemoveBins.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/RemoveLowResTOF.h b/Framework/Algorithms/inc/MantidAlgorithms/RemoveLowResTOF.h index 7efea595735fa65e5369ae3300d5befd8a413c7e..456513d60e3c5a5833db8f80210df965ac03bb8b 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/RemoveLowResTOF.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/RemoveLowResTOF.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/RemoveMaskedSpectra.h b/Framework/Algorithms/inc/MantidAlgorithms/RemoveMaskedSpectra.h index eadd93da3d17d8d7f91545b59c8daf15b6de2edb..36762ef5953acb5b38af32a667b55e861c4e2fe7 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/RemoveMaskedSpectra.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/RemoveMaskedSpectra.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/RemovePromptPulse.h b/Framework/Algorithms/inc/MantidAlgorithms/RemovePromptPulse.h index eb64a5c4eb1d246fa9d8057c9fd16aa1aec60c26..170aa550756e46dbcbf938f4f23b5c07ddcd6b42 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/RemovePromptPulse.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/RemovePromptPulse.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/RemoveSpectra.h b/Framework/Algorithms/inc/MantidAlgorithms/RemoveSpectra.h index f10fd853886a6f881b22eeb2729e413fa23fb5d0..70b25bd52cc31038c4c11d368c888b81f3516b38 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/RemoveSpectra.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/RemoveSpectra.h @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #pragma once #include "MantidAPI/Algorithm.h" diff --git a/Framework/Algorithms/inc/MantidAlgorithms/RemoveWorkspaceHistory.h b/Framework/Algorithms/inc/MantidAlgorithms/RemoveWorkspaceHistory.h index df5ec0165876a1815252c635892f3efe19b3bee6..2acfa7f87d4d9ebd87c76b92036b837a55569b68 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/RemoveWorkspaceHistory.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/RemoveWorkspaceHistory.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/RenameWorkspace.h b/Framework/Algorithms/inc/MantidAlgorithms/RenameWorkspace.h index 509ad33407267e05b489e75f3a8bf3aa04e6940f..6d9a6dccfa1b74950d101c467fdc3d43728dc79c 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/RenameWorkspace.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/RenameWorkspace.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/RenameWorkspaces.h b/Framework/Algorithms/inc/MantidAlgorithms/RenameWorkspaces.h index 3c51ce5b2422fef47643a472fd65a0240052c792..93904c4beb0dc73a259770e1fd4f40e0a2fb7210 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/RenameWorkspaces.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/RenameWorkspaces.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ReplaceSpecialValues.h b/Framework/Algorithms/inc/MantidAlgorithms/ReplaceSpecialValues.h index 386f04079cc2a296b385a62e0f0e8b389023c5e4..fb81491b66b6f600e888ad98a20a8576ae3bc4b1 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/ReplaceSpecialValues.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/ReplaceSpecialValues.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ResampleX.h b/Framework/Algorithms/inc/MantidAlgorithms/ResampleX.h index ad7a488f3f824751229b08830a9284954eada708..5e072f3b62ada286ddfdc0050b67b4162555c2f1 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/ResampleX.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/ResampleX.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ResetNegatives.h b/Framework/Algorithms/inc/MantidAlgorithms/ResetNegatives.h index 1bb025c047bbd6836d11297030af3fc3dac85a8e..f39ddda72208170fb41dcb6aaf871cb725fb3632 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/ResetNegatives.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/ResetNegatives.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -30,11 +30,12 @@ public: private: void init() override; void exec() override; - void pushMinimum(API::MatrixWorkspace_const_sptr minWS, - API::MatrixWorkspace_sptr wksp, API::Progress &prog); - void changeNegatives(API::MatrixWorkspace_const_sptr minWS, + void pushMinimum(const API::MatrixWorkspace_const_sptr &minWS, + const API::MatrixWorkspace_sptr &wksp, API::Progress &prog); + void changeNegatives(const API::MatrixWorkspace_const_sptr &minWS, const double spectrumNegativeValues, - API::MatrixWorkspace_sptr wksp, API::Progress &prog); + const API::MatrixWorkspace_sptr &wksp, + API::Progress &prog); }; } // namespace Algorithms diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ResizeRectangularDetector.h b/Framework/Algorithms/inc/MantidAlgorithms/ResizeRectangularDetector.h index 206ed9f7779a2a984bd5247ba3390497bd216e06..7809daf8dce1afed41530a917b35c0fefbad68bf 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/ResizeRectangularDetector.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/ResizeRectangularDetector.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/RingProfile.h b/Framework/Algorithms/inc/MantidAlgorithms/RingProfile.h index 3973a7183232e55d3aa426be23ea33057053c780..40d04682f612dee3e4636f4a9330105366e72938 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/RingProfile.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/RingProfile.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -47,17 +47,18 @@ private: /// get the bin position for the given angle int fromAngleToBin(double angle, bool degree = true); /// validate the inputs of the algorithm for instrument based workspace - void checkInputsForSpectraWorkspace(const API::MatrixWorkspace_sptr); + void checkInputsForSpectraWorkspace(const API::MatrixWorkspace_sptr &); /// validate the inputs of the algorithm for 2d matrix based instrument - void checkInputsForNumericWorkspace(const API::MatrixWorkspace_sptr); + void checkInputsForNumericWorkspace(const API::MatrixWorkspace_sptr &); /// process ring profile for instrument based workspace - void processInstrumentRingProfile(const API::MatrixWorkspace_sptr inputWS, + void processInstrumentRingProfile(const API::MatrixWorkspace_sptr &inputWS, std::vector<double> &output_bins); /// process ring profile for image based workspace - void processNumericImageRingProfile(const API::MatrixWorkspace_sptr inputWS, + void processNumericImageRingProfile(const API::MatrixWorkspace_sptr &inputWS, std::vector<double> &output_bins); /// identify the bin position for the given pixel in the image based workspace - void getBinForPixel(const API::MatrixWorkspace_sptr, int, std::vector<int> &); + void getBinForPixel(const API::MatrixWorkspace_sptr &, int, + std::vector<int> &); //// identify the bin position for the pixel related to the given detector int getBinForPixel(const Kernel::V3D &position); /// copy of the minRadius input diff --git a/Framework/Algorithms/inc/MantidAlgorithms/RunCombinationHelpers/RunCombinationHelper.h b/Framework/Algorithms/inc/MantidAlgorithms/RunCombinationHelpers/RunCombinationHelper.h index b86dc068ad935f3a4bf79349483390829869ea56..5f9c62603467ef292a74ee3260a2bc4477a748e3 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/RunCombinationHelpers/RunCombinationHelper.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/RunCombinationHelpers/RunCombinationHelper.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -30,9 +30,9 @@ static const std::string FAIL_BEHAVIOUR = "Fail"; class MANTID_ALGORITHMS_DLL RunCombinationHelper { public: - std::string checkCompatibility(API::MatrixWorkspace_sptr, + std::string checkCompatibility(const API::MatrixWorkspace_sptr &, bool checkNumberHistograms = false); - void setReferenceProperties(API::MatrixWorkspace_sptr); + void setReferenceProperties(const API::MatrixWorkspace_sptr &); static std::vector<std::string> unWrapGroups(const std::vector<std::string> &); std::list<API::MatrixWorkspace_sptr> diff --git a/Framework/Algorithms/inc/MantidAlgorithms/RunCombinationHelpers/SampleLogsBehaviour.h b/Framework/Algorithms/inc/MantidAlgorithms/RunCombinationHelpers/SampleLogsBehaviour.h index f4ea0ea99dadcca257b3c74abf497b1f77f26e96..81a1e521e5d13da19156cec65f9c3233243e9dd1 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/RunCombinationHelpers/SampleLogsBehaviour.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/RunCombinationHelpers/SampleLogsBehaviour.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -69,17 +69,18 @@ public: std::string sampleLogsFailTolerances; }; - SampleLogsBehaviour(API::MatrixWorkspace_sptr ws, Kernel::Logger &logger, + SampleLogsBehaviour(const API::MatrixWorkspace_sptr &ws, + Kernel::Logger &logger, const SampleLogNames &logEntries = {}, const ParameterName &parName = {}); /// Create and update sample logs according to instrument parameters - void mergeSampleLogs(API::MatrixWorkspace_sptr addeeWS, - API::MatrixWorkspace_sptr outWS); - void setUpdatedSampleLogs(API::MatrixWorkspace_sptr outWS); - void removeSampleLogsFromWorkspace(API::MatrixWorkspace_sptr addeeWS); - void readdSampleLogToWorkspace(API::MatrixWorkspace_sptr addeeWS); - void resetSampleLogs(API::MatrixWorkspace_sptr ws); + void mergeSampleLogs(const API::MatrixWorkspace_sptr &addeeWS, + const API::MatrixWorkspace_sptr &outWS); + void setUpdatedSampleLogs(const API::MatrixWorkspace_sptr &outWS); + void removeSampleLogsFromWorkspace(const API::MatrixWorkspace_sptr &addeeWS); + void readdSampleLogToWorkspace(const API::MatrixWorkspace_sptr &addeeWS); + void resetSampleLogs(const API::MatrixWorkspace_sptr &ws); private: Kernel::Logger &m_logger; diff --git a/Framework/Algorithms/inc/MantidAlgorithms/SANSCollimationLengthEstimator.h b/Framework/Algorithms/inc/MantidAlgorithms/SANSCollimationLengthEstimator.h index b2ce8743f71c2b9d14d5f9e7405d1134fcf37a85..77290e6f4783f4aef90e6e05524bb7862e2e7e2f 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/SANSCollimationLengthEstimator.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/SANSCollimationLengthEstimator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -15,11 +15,12 @@ namespace Mantid { namespace Algorithms { class MANTID_ALGORITHMS_DLL SANSCollimationLengthEstimator { public: - double provideCollimationLength(Mantid::API::MatrixWorkspace_sptr workspace); + double + provideCollimationLength(const Mantid::API::MatrixWorkspace_sptr &workspace); private: double getCollimationLengthWithGuides( - Mantid::API::MatrixWorkspace_sptr inOutWS, const double L1, + const Mantid::API::MatrixWorkspace_sptr &inOutWS, const double L1, const double collimationLengthCorrection) const; double getGuideValue(Mantid::Kernel::Property *prop) const; }; diff --git a/Framework/Algorithms/inc/MantidAlgorithms/SampleCorrections/DetectorGridDefinition.h b/Framework/Algorithms/inc/MantidAlgorithms/SampleCorrections/DetectorGridDefinition.h index fc280ec04df050455ba5bbadb169e92d05d51ccc..66c8c34c04d288b818ac15b917612c9801bdeace 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/SampleCorrections/DetectorGridDefinition.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/SampleCorrections/DetectorGridDefinition.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/SampleCorrections/IBeamProfile.h b/Framework/Algorithms/inc/MantidAlgorithms/SampleCorrections/IBeamProfile.h index d0ae5f916ca85ed71f933f9c8136e58ebe40e8ce..8aa70c27307ace0720b8c2cc67208ee7da17181c 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/SampleCorrections/IBeamProfile.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/SampleCorrections/IBeamProfile.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/SampleCorrections/MCAbsorptionStrategy.h b/Framework/Algorithms/inc/MantidAlgorithms/SampleCorrections/MCAbsorptionStrategy.h index 522638f094a07eaa5a1b5bfb7f1f5cba3b48d0b3..f418bb49411b822eb7609310e82b8e07efc09d04 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/SampleCorrections/MCAbsorptionStrategy.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/SampleCorrections/MCAbsorptionStrategy.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -47,7 +47,8 @@ public: Kernel::Logger &logger); void calculate(Kernel::PseudoRandomNumberGenerator &rng, const Kernel::V3D &finalPos, - Mantid::HistogramData::Points lambdas, double lambdaFixed, + const Mantid::HistogramData::Points &lambdas, + double lambdaFixed, Mantid::API::ISpectrum &attenuationFactorsSpectrum); private: diff --git a/Framework/Algorithms/inc/MantidAlgorithms/SampleCorrections/MCInteractionVolume.h b/Framework/Algorithms/inc/MantidAlgorithms/SampleCorrections/MCInteractionVolume.h index 8fb0da40d3cd865a7ee6c044b3653140ae0468c4..d40a18eae8172343c1e0989dd70975661ea3b119 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/SampleCorrections/MCInteractionVolume.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/SampleCorrections/MCInteractionVolume.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/SampleCorrections/MayersSampleCorrection.h b/Framework/Algorithms/inc/MantidAlgorithms/SampleCorrections/MayersSampleCorrection.h index e95b15f25866c492cac81fc2a27217ce3116cc90..91c148ec8ac6ea39bb9a7243ae911c68f1abe659 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/SampleCorrections/MayersSampleCorrection.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/SampleCorrections/MayersSampleCorrection.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/SampleCorrections/MayersSampleCorrectionStrategy.h b/Framework/Algorithms/inc/MantidAlgorithms/SampleCorrections/MayersSampleCorrectionStrategy.h index 71f1ad03a7c78c0dfd6743825d76daaceabd26b6..d505c7d875112cb0225727f411f563c5d30cf7f1 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/SampleCorrections/MayersSampleCorrectionStrategy.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/SampleCorrections/MayersSampleCorrectionStrategy.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/SampleCorrections/RectangularBeamProfile.h b/Framework/Algorithms/inc/MantidAlgorithms/SampleCorrections/RectangularBeamProfile.h index 899cdba9d6538135eab89523ace84cd7a6197dec..c3da81e0e6ad0c313d55804440f7e85c84a11548 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/SampleCorrections/RectangularBeamProfile.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/SampleCorrections/RectangularBeamProfile.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/SampleCorrections/SparseInstrument.h b/Framework/Algorithms/inc/MantidAlgorithms/SampleCorrections/SparseInstrument.h index b4026ab40bcfa00d9480291ef0fa5fabcbb9170f..07e408f8759f552ad0ba9fb18211bc96e0d3ff26 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/SampleCorrections/SparseInstrument.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/SampleCorrections/SparseInstrument.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/SassenaFFT.h b/Framework/Algorithms/inc/MantidAlgorithms/SassenaFFT.h index a578c4afa35bd8f564847230c6aa3459f4aa9c72..ae3ee8dc48e39cab01262bb196bcaadf7e5d4e40 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/SassenaFFT.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/SassenaFFT.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/Scale.h b/Framework/Algorithms/inc/MantidAlgorithms/Scale.h index 7dbd9195917268f9c4ddb6089b2d6b1198e29770..220c08d04454250d8cd9689a328a223047c1d524 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/Scale.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/Scale.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ScaleX.h b/Framework/Algorithms/inc/MantidAlgorithms/ScaleX.h index 6b68e5e916565c9246860a65ad7ae8acb562676e..ff0e931aa1fb4333ebc8a40c9e98a58c89274fd9 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/ScaleX.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/ScaleX.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/Segfault.h b/Framework/Algorithms/inc/MantidAlgorithms/Segfault.h index cad8e4f8ccc2fde8c093467959c1f9daabd6648a..4d93f74a02f77c0ff5e28fafce41a554d626827d 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/Segfault.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/Segfault.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/SetInstrumentParameter.h b/Framework/Algorithms/inc/MantidAlgorithms/SetInstrumentParameter.h index a0d53085c122bd1ff9c3d24d9ba221920352c53a..4aa7b365cdff4164473002987bfcb0e3475cf52a 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/SetInstrumentParameter.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/SetInstrumentParameter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/SetUncertainties.h b/Framework/Algorithms/inc/MantidAlgorithms/SetUncertainties.h index 65a33107dda52ef8e13b0ccf7cbb974e87536dc4..c7aeaf76a7d52a05ceaf64fe9eaac5aca84554d4 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/SetUncertainties.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/SetUncertainties.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ShiftLogTime.h b/Framework/Algorithms/inc/MantidAlgorithms/ShiftLogTime.h index acb0aa67d0c0ad99011a9f44d0455c6f5cf718a7..62b0e4004ee5758141a2743a0cb6602387b61aa9 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/ShiftLogTime.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/ShiftLogTime.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/SignalOverError.h b/Framework/Algorithms/inc/MantidAlgorithms/SignalOverError.h index ea4fde17f96ce3e688d72503c55b45f581493779..8707b7e55878e134886629835f6ee24f5ac50a5d 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/SignalOverError.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/SignalOverError.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/SmoothData.h b/Framework/Algorithms/inc/MantidAlgorithms/SmoothData.h index 8023d1ae9ea19bfd5639cce8de1f048ce84c2bd4..0c566d4d731602e2fa53abd5850b884936d1cb25 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/SmoothData.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/SmoothData.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/SmoothNeighbours.h b/Framework/Algorithms/inc/MantidAlgorithms/SmoothNeighbours.h index 60b4a8938013e03115a2d2974cc918cb6546342c..3faf5a6651ce9102e482a5bfdeeda69586ce9042 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/SmoothNeighbours.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/SmoothNeighbours.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -105,7 +105,7 @@ private: void setupNewInstrument(API::MatrixWorkspace &outws) const; /// Build the instrument/detector setup in workspace - void spreadPixels(API::MatrixWorkspace_sptr outws); + void spreadPixels(const API::MatrixWorkspace_sptr &outws); /// Non rectangular detector group name static const std::string NON_UNIFORM_GROUP; diff --git a/Framework/Algorithms/inc/MantidAlgorithms/SofQCommon.h b/Framework/Algorithms/inc/MantidAlgorithms/SofQCommon.h index 7413f7f6e58833440a88b5af8cceca17e99951bf..b608dfd6883ea2bc800e71a4b54c2c20f774fbc6 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/SofQCommon.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/SofQCommon.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/SofQW.h b/Framework/Algorithms/inc/MantidAlgorithms/SofQW.h index 2eca91d13e038aadbce33d3b173a152b87ed601e..008ad7b312f1527f2356ed14d30136b894609f00 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/SofQW.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/SofQW.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/SofQWCentre.h b/Framework/Algorithms/inc/MantidAlgorithms/SofQWCentre.h index 8c37c84fd7d6b35d7ae08d4b3c6699649e4a6adf..43dbe1cceffe51a56888dfdeb095cb366d4c3a1b 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/SofQWCentre.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/SofQWCentre.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/SofQWNormalisedPolygon.h b/Framework/Algorithms/inc/MantidAlgorithms/SofQWNormalisedPolygon.h index bf40b88bf46cafe6f15c5c78f529e9d21eae90b5..ad62897f8244a5fa3044e7df636e62dcde023df8 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/SofQWNormalisedPolygon.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/SofQWNormalisedPolygon.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/SofQWPolygon.h b/Framework/Algorithms/inc/MantidAlgorithms/SofQWPolygon.h index a84a8ef4b1e185417e001d6b9a451e979310fe94..7bcad9d82b43a12c091fa675c2757554ffb7bb7f 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/SofQWPolygon.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/SofQWPolygon.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once //---------------------------------------------------------------------- @@ -65,7 +65,7 @@ private: /// Run the algorithm void exec() override; /// Init variables cache base on the given workspace - void initCachedValues(API::MatrixWorkspace_const_sptr workspace); + void initCachedValues(const API::MatrixWorkspace_const_sptr &workspace); /// Init the theta index void initThetaCache(const API::MatrixWorkspace &workspace); diff --git a/Framework/Algorithms/inc/MantidAlgorithms/SolidAngle.h b/Framework/Algorithms/inc/MantidAlgorithms/SolidAngle.h index a1d02d40fbd26b752ee455b5edcdd0e4a42becfd..d1b360083e0baf56035aa79edbf71edf6aa485f3 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/SolidAngle.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/SolidAngle.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/SortEvents.h b/Framework/Algorithms/inc/MantidAlgorithms/SortEvents.h index 594849ef55b8d3be2548ed294fe28b195b1303fe..3fcf1f485c3886603347d7dbb6d3a9f175dfd6d4 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/SortEvents.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/SortEvents.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/SortXAxis.h b/Framework/Algorithms/inc/MantidAlgorithms/SortXAxis.h index 82f1ea942a6af96ef70f85d135768b4fc67ec700..c55bd2ba79f83a12ad06d1e26d8b86708628b20f 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/SortXAxis.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/SortXAxis.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -34,7 +34,7 @@ private: std::vector<std::size_t> createIndexes(const size_t); void sortIndicesByX(std::vector<std::size_t> &workspaceIndecies, - std::string order, + const std::string &order, const Mantid::API::MatrixWorkspace &inputWorkspace, unsigned int specNum); diff --git a/Framework/Algorithms/inc/MantidAlgorithms/SpatialGrouping.h b/Framework/Algorithms/inc/MantidAlgorithms/SpatialGrouping.h index acbe927dd19a321e6c3b9c366fe578a5d233c0a3..5167830e7b40e97ee1173263c6188b5076c1f51a 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/SpatialGrouping.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/SpatialGrouping.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/SpectrumAlgorithm.h b/Framework/Algorithms/inc/MantidAlgorithms/SpectrumAlgorithm.h index c053aa47e157b39715ad13472054d1de9c5a3a63..0d092ff64bfdd4e8da91fcab90ae7f30a2713788 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/SpectrumAlgorithm.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/SpectrumAlgorithm.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/SpecularReflectionAlgorithm.h b/Framework/Algorithms/inc/MantidAlgorithms/SpecularReflectionAlgorithm.h index 5e024f0bc04516c4c0f2071a63d11a4f665d5920..2a5b2f7fa4cec9b428e47cd924e6ebb1d534bd0f 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/SpecularReflectionAlgorithm.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/SpecularReflectionAlgorithm.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -25,12 +25,12 @@ protected: SpecularReflectionAlgorithm() = default; /// Get the surface sample component - Mantid::Geometry::IComponent_const_sptr - getSurfaceSampleComponent(Mantid::Geometry::Instrument_const_sptr inst) const; + Mantid::Geometry::IComponent_const_sptr getSurfaceSampleComponent( + const Mantid::Geometry::Instrument_const_sptr &inst) const; /// Get the detector component Mantid::Geometry::IComponent_const_sptr - getDetectorComponent(Mantid::API::MatrixWorkspace_sptr workspace, + getDetectorComponent(const Mantid::API::MatrixWorkspace_sptr &workspace, const bool isPointDetector) const; /// Does the property have a default value. diff --git a/Framework/Algorithms/inc/MantidAlgorithms/SpecularReflectionCalculateTheta.h b/Framework/Algorithms/inc/MantidAlgorithms/SpecularReflectionCalculateTheta.h index c1e550c009d82b354e5538aef706b28006bcd29c..e45c4cc0bf57f1c7f85d1b75db1dd819f05e650b 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/SpecularReflectionCalculateTheta.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/SpecularReflectionCalculateTheta.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/SpecularReflectionCalculateTheta2.h b/Framework/Algorithms/inc/MantidAlgorithms/SpecularReflectionCalculateTheta2.h index be8771fd39f2ea7df23748e4f87861f13fa1c81e..a598f5a9b3cdcddd636139a3987a6287fc6211b0 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/SpecularReflectionCalculateTheta2.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/SpecularReflectionCalculateTheta2.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/SpecularReflectionPositionCorrect.h b/Framework/Algorithms/inc/MantidAlgorithms/SpecularReflectionPositionCorrect.h index dcfe56f481c08240068d1f4252aa6a63c50005dd..06fb59bbfaf030cff78c5e1869eab2fece74ed24 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/SpecularReflectionPositionCorrect.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/SpecularReflectionPositionCorrect.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -34,15 +34,15 @@ private: void exec() override; /// Correct detector positions. - void correctPosition(API::MatrixWorkspace_sptr toCorrect, + void correctPosition(const API::MatrixWorkspace_sptr &toCorrect, const double &twoThetaInDeg, - Geometry::IComponent_const_sptr sample, - Geometry::IComponent_const_sptr detector); + const Geometry::IComponent_const_sptr &sample, + const Geometry::IComponent_const_sptr &detector); /// Move detectors. - void moveDetectors(API::MatrixWorkspace_sptr toCorrect, + void moveDetectors(const API::MatrixWorkspace_sptr &toCorrect, Geometry::IComponent_const_sptr detector, - Geometry::IComponent_const_sptr sample, + const Geometry::IComponent_const_sptr &sample, const double &upOffset, const double &acrossOffset, const Mantid::Kernel::V3D &detectorPosition); }; diff --git a/Framework/Algorithms/inc/MantidAlgorithms/SpecularReflectionPositionCorrect2.h b/Framework/Algorithms/inc/MantidAlgorithms/SpecularReflectionPositionCorrect2.h index c9bf8ed6c59b4fa55562c06cbb343e6773a026b6..b8968378518da4a2b8bc61643d380a809d0888b0 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/SpecularReflectionPositionCorrect2.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/SpecularReflectionPositionCorrect2.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/SphericalAbsorption.h b/Framework/Algorithms/inc/MantidAlgorithms/SphericalAbsorption.h index ed2e111183f76e154a392212d3e18d741ee34132..f06dea1ebead641093e83ee1219f4d017f7f9064 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/SphericalAbsorption.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/SphericalAbsorption.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/Stitch1D.h b/Framework/Algorithms/inc/MantidAlgorithms/Stitch1D.h index 3e3ddd522ab8abf3b0d4d8fbdd13dc11eb627be7..bd3f19787a9a214239eec539335f34557f5d5585 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/Stitch1D.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/Stitch1D.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -84,7 +84,7 @@ private: /// Mask out everything but the data in the ranges, but do it inplace. void maskInPlace(int a1, int a2, Mantid::API::MatrixWorkspace_sptr &source); /// Add back in any special values - void reinsertSpecialValues(Mantid::API::MatrixWorkspace_sptr ws); + void reinsertSpecialValues(const Mantid::API::MatrixWorkspace_sptr &ws); /// Range tolerance static const double range_tolerance; /// Scaling factors diff --git a/Framework/Algorithms/inc/MantidAlgorithms/Stitch1DMany.h b/Framework/Algorithms/inc/MantidAlgorithms/Stitch1DMany.h index 22aedae47b92b4fc688aa02c8472d2d1d377b2f0..75ad4d753db0a2e74e50ab95775ba5f9938fb07f 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/Stitch1DMany.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/Stitch1DMany.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/StripPeaks.h b/Framework/Algorithms/inc/MantidAlgorithms/StripPeaks.h index c2dea24b70b2e1a181eee0454f4d001df9eb661b..6e5db58f75b305c5e5e2ba6ee5660377755ae11e 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/StripPeaks.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/StripPeaks.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -62,9 +62,10 @@ private: /// Execution code void exec() override; - API::ITableWorkspace_sptr findPeaks(API::MatrixWorkspace_sptr WS); - API::MatrixWorkspace_sptr removePeaks(API::MatrixWorkspace_const_sptr input, - API::ITableWorkspace_sptr peakslist); + API::ITableWorkspace_sptr findPeaks(const API::MatrixWorkspace_sptr &WS); + API::MatrixWorkspace_sptr + removePeaks(const API::MatrixWorkspace_const_sptr &input, + const API::ITableWorkspace_sptr &peakslist); double m_maxChiSq{0.0}; }; diff --git a/Framework/Algorithms/inc/MantidAlgorithms/StripVanadiumPeaks.h b/Framework/Algorithms/inc/MantidAlgorithms/StripVanadiumPeaks.h index 40043ba481761b9ac64838202fe7a792871e71be..5cd37b7e9d5ebfcfb304ea9f1c43ce163075beab 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/StripVanadiumPeaks.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/StripVanadiumPeaks.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /* * StripVanadiumPeaks.h diff --git a/Framework/Algorithms/inc/MantidAlgorithms/StripVanadiumPeaks2.h b/Framework/Algorithms/inc/MantidAlgorithms/StripVanadiumPeaks2.h index c70d89d67c727cac8c74af508e682aa0ea09bad4..01ee398f5e8a4eb6f37370593f54e27752b7a916 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/StripVanadiumPeaks2.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/StripVanadiumPeaks2.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/SumEventsByLogValue.h b/Framework/Algorithms/inc/MantidAlgorithms/SumEventsByLogValue.h index dcf0ba4454623e2d51684fbe9a4fb5e5c705979b..fc92892ce814bd106f8c7f4fa47e8a188bb95985 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/SumEventsByLogValue.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/SumEventsByLogValue.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -55,7 +55,7 @@ private: const int maxVal, const Kernel::TimeSeriesProperty<int> *log, std::vector<int> &Y); - void addMonitorCounts(API::ITableWorkspace_sptr outputWorkspace, + void addMonitorCounts(const API::ITableWorkspace_sptr &outputWorkspace, const Kernel::TimeSeriesProperty<int> *log, const int minVal, const int maxVal); std::vector<std::pair<std::string, const Kernel::ITimeSeriesProperty *>> diff --git a/Framework/Algorithms/inc/MantidAlgorithms/SumNeighbours.h b/Framework/Algorithms/inc/MantidAlgorithms/SumNeighbours.h index 06793d08a9c7533a1b84374e6b7673f19f77ec13..1eb959caad63fa4a442702dca68b4838715a68b8 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/SumNeighbours.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/SumNeighbours.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/SumOverlappingTubes.h b/Framework/Algorithms/inc/MantidAlgorithms/SumOverlappingTubes.h index 950f55acc34cb1be22fb81c6f69123c5825a1c94..8a0fa4982b9373b16d5cbe06ebecabb2447ae9e2 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/SumOverlappingTubes.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/SumOverlappingTubes.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/SumRowColumn.h b/Framework/Algorithms/inc/MantidAlgorithms/SumRowColumn.h index a5b3e631c23a27bd5d9b4b19ab38f0067baea905..c68729d56ecce43249972d1eb5e11142b9497d69 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/SumRowColumn.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/SumRowColumn.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/SumSpectra.h b/Framework/Algorithms/inc/MantidAlgorithms/SumSpectra.h index 0cf5c4dc974eb1b86ba71d0b005410b156500b2f..1c5e291c7b37bcded8ce6448e6a827a8ede5fbb3 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/SumSpectra.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/SumSpectra.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -60,21 +60,22 @@ public: private: /// Handle logic for RebinnedOutput workspaces - void doFractionalSum(API::MatrixWorkspace_sptr outputWorkspace, + void doFractionalSum(const API::MatrixWorkspace_sptr &outputWorkspace, API::Progress &progress, size_t &numSpectra, size_t &numMasked, size_t &numZeros); /// Handle logic for Workspace2D workspaces - void doSimpleSum(API::MatrixWorkspace_sptr outputWorkspace, + void doSimpleSum(const API::MatrixWorkspace_sptr &outputWorkspace, API::Progress &progress, size_t &numSpectra, size_t &numMasked, size_t &numZeros); // Overridden Algorithm methods void init() override; void exec() override; - void execEvent(API::MatrixWorkspace_sptr outputWorkspace, + void execEvent(const API::MatrixWorkspace_sptr &outputWorkspace, API::Progress &progress, size_t &numSpectra, size_t &numMasked, size_t &numZeros); - specnum_t getOutputSpecNo(API::MatrixWorkspace_const_sptr localworkspace); + specnum_t + getOutputSpecNo(const API::MatrixWorkspace_const_sptr &localworkspace); API::MatrixWorkspace_sptr replaceSpecialValues(); void determineIndices(const size_t numberOfSpectra); diff --git a/Framework/Algorithms/inc/MantidAlgorithms/TOFSANSResolution.h b/Framework/Algorithms/inc/MantidAlgorithms/TOFSANSResolution.h index bc2d5ac5d67c539f90d299747cfa4fa6033d9517..5674c61084469c2c7ad3c2f7680e2eca96cfebce 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/TOFSANSResolution.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/TOFSANSResolution.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/TOFSANSResolutionByPixel.h b/Framework/Algorithms/inc/MantidAlgorithms/TOFSANSResolutionByPixel.h index 77da908e862947ec5e4fbcf6f98ff7d628b5a209..7ab48b1ff4783dcc31ff3656b1a51b188136f941 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/TOFSANSResolutionByPixel.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/TOFSANSResolutionByPixel.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -58,13 +58,13 @@ private: double provideDefaultLCollimationLength( Mantid::API::MatrixWorkspace_sptr inWS) const; /// Check input - void checkInput(Mantid::API::MatrixWorkspace_sptr inWS); + void checkInput(const Mantid::API::MatrixWorkspace_sptr &inWS); /// Get the moderator workspace - Mantid::API::MatrixWorkspace_sptr - getModeratorWorkspace(Mantid::API::MatrixWorkspace_sptr inputWorkspace); + Mantid::API::MatrixWorkspace_sptr getModeratorWorkspace( + const Mantid::API::MatrixWorkspace_sptr &inputWorkspace); /// Create an output workspace Mantid::API::MatrixWorkspace_sptr - setupOutputWorkspace(Mantid::API::MatrixWorkspace_sptr inputWorkspace); + setupOutputWorkspace(const Mantid::API::MatrixWorkspace_sptr &inputWorkspace); /// Wavelength resolution (constant for all wavelengths) double m_wl_resolution; }; diff --git a/Framework/Algorithms/inc/MantidAlgorithms/TOFSANSResolutionByPixelCalculator.h b/Framework/Algorithms/inc/MantidAlgorithms/TOFSANSResolutionByPixelCalculator.h index f3ea7b02ae625748e039a0c59401d7f4081eeb92..d10da994d5cd84816385f90f87cde8dfa59dd794 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/TOFSANSResolutionByPixelCalculator.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/TOFSANSResolutionByPixelCalculator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidAlgorithms/DllConfig.h" diff --git a/Framework/Algorithms/inc/MantidAlgorithms/TimeAtSampleStrategy.h b/Framework/Algorithms/inc/MantidAlgorithms/TimeAtSampleStrategy.h index 607a5b68a93ebc31c553c9b777c7c32973ba4276..dd167adc30df06b9bcc648ac3e13de3d1e3084b8 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/TimeAtSampleStrategy.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/TimeAtSampleStrategy.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/TimeAtSampleStrategyDirect.h b/Framework/Algorithms/inc/MantidAlgorithms/TimeAtSampleStrategyDirect.h index 6f40c93a73445843031191eb2f8775acab617865..6ba3418f9a37bd195bb44c8a16d4321182cb7f5e 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/TimeAtSampleStrategyDirect.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/TimeAtSampleStrategyDirect.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -23,7 +23,8 @@ class MANTID_ALGORITHMS_DLL TimeAtSampleStrategyDirect : public TimeAtSampleStrategy { public: TimeAtSampleStrategyDirect( - boost::shared_ptr<const Mantid::API::MatrixWorkspace> ws, double ei); + const boost::shared_ptr<const Mantid::API::MatrixWorkspace> &ws, + double ei); Correction calculate(const size_t &workspace_index) const override; private: diff --git a/Framework/Algorithms/inc/MantidAlgorithms/TimeAtSampleStrategyElastic.h b/Framework/Algorithms/inc/MantidAlgorithms/TimeAtSampleStrategyElastic.h index e9f28a63f46660d2789d0e15da4a0d2f2f5fecc6..9b95e894adae7ed7e86b19d34eae7e64ea9778a9 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/TimeAtSampleStrategyElastic.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/TimeAtSampleStrategyElastic.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/TimeAtSampleStrategyIndirect.h b/Framework/Algorithms/inc/MantidAlgorithms/TimeAtSampleStrategyIndirect.h index 5df0776cf913b63b10efb2c82da5b3bcb3dea31b..356c2c3fc114d38a0dbfde9b6c173b6fcd8247d7 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/TimeAtSampleStrategyIndirect.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/TimeAtSampleStrategyIndirect.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/Transpose.h b/Framework/Algorithms/inc/MantidAlgorithms/Transpose.h index 546987ba3a3f7edbfcb91b8f7affb6ddd13bdf12..db1e2c7b70fbbc935b34627e6c516dbfcce4a3f3 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/Transpose.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/Transpose.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -56,9 +56,10 @@ private: void exec() override; /// Create the output workspace API::MatrixWorkspace_sptr - createOutputWorkspace(API::MatrixWorkspace_const_sptr inputWorkspace); + createOutputWorkspace(const API::MatrixWorkspace_const_sptr &inputWorkspace); /// Return the vertical axis on the workspace, throwing if it is not valid - API::Axis *getVerticalAxis(API::MatrixWorkspace_const_sptr workspace) const; + API::Axis * + getVerticalAxis(const API::MatrixWorkspace_const_sptr &workspace) const; }; } // namespace Algorithms diff --git a/Framework/Algorithms/inc/MantidAlgorithms/UnGroupWorkspace.h b/Framework/Algorithms/inc/MantidAlgorithms/UnGroupWorkspace.h index 0cc1f94cc927805c454ee5b4217d620493a473a0..d7ef8bc2d4f6ff65589d1e6bf51e6d6aff58d470 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/UnGroupWorkspace.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/UnGroupWorkspace.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/UnaryOperation.h b/Framework/Algorithms/inc/MantidAlgorithms/UnaryOperation.h index c6bc0796366f123ed4b52aa89a895aa76155907f..0e8aa16bce89caa46bad1bb0cdb0184228758063 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/UnaryOperation.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/UnaryOperation.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/UnwrapMonitor.h b/Framework/Algorithms/inc/MantidAlgorithms/UnwrapMonitor.h index 495d15cb5960a81a30cddde48bf096f9d901c871..8d026ff0d0315136ac00210e9d320f8554314204 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/UnwrapMonitor.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/UnwrapMonitor.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/UnwrapMonitorsInTOF.h b/Framework/Algorithms/inc/MantidAlgorithms/UnwrapMonitorsInTOF.h index c34fda74b67c2bf4273ffb4af46d817d5639cd91..26b6ae78acba317e0951f84e8fa02c002007fac7 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/UnwrapMonitorsInTOF.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/UnwrapMonitorsInTOF.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/UnwrapSNS.h b/Framework/Algorithms/inc/MantidAlgorithms/UnwrapSNS.h index 81daf2f6824db1c57f73106e28fccf7e43d9878e..2a2bf3fdd4e27f003597e1e083620e90e4ba7521 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/UnwrapSNS.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/UnwrapSNS.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/UpdateScriptRepository.h b/Framework/Algorithms/inc/MantidAlgorithms/UpdateScriptRepository.h index c5f6a37e3b9e6b7f4bdb166bbf81b1beb195b184..a1586dc4b698b7bc58d46c9b0ac1186eed8a2d7b 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/UpdateScriptRepository.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/UpdateScriptRepository.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/VesuvioL1ThetaResolution.h b/Framework/Algorithms/inc/MantidAlgorithms/VesuvioL1ThetaResolution.h index b1e848048d21bcc375feb518231266da9cb9e5f5..1445c2365c8d8da40880d902b545537ccc2c49b3 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/VesuvioL1ThetaResolution.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/VesuvioL1ThetaResolution.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/WeightedMean.h b/Framework/Algorithms/inc/MantidAlgorithms/WeightedMean.h index e78985f5e8106324fafb6ecaa7d906515824a752..fc9bc62cfd36e5204d5d8e7f10ecbde85c82af28 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/WeightedMean.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/WeightedMean.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/WeightedMeanOfWorkspace.h b/Framework/Algorithms/inc/MantidAlgorithms/WeightedMeanOfWorkspace.h index c4776f18e3c92c7f20e529d8419ded085f2428f3..3f41ec4c0b244e947ddcce821c5dedd6a3ccc85b 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/WeightedMeanOfWorkspace.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/WeightedMeanOfWorkspace.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/WeightingStrategy.h b/Framework/Algorithms/inc/MantidAlgorithms/WeightingStrategy.h index 854b78782b50e36e40bc9f36ddd95aa6a5c4b746..3a35044206a923f7fc76e088476a83fb78b0cd71 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/WeightingStrategy.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/WeightingStrategy.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/WienerSmooth.h b/Framework/Algorithms/inc/MantidAlgorithms/WienerSmooth.h index dc9af01449cfbfd01631c9f8b7cbd67b2d936e7a..f7888fff4df99aaee5c4645e69ebe6f9d7c484e0 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/WienerSmooth.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/WienerSmooth.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -35,7 +35,7 @@ private: std::pair<double, double> getStartEnd(const Mantid::HistogramData::HistogramX &X, bool isHistogram) const; - API::MatrixWorkspace_sptr copyInput(API::MatrixWorkspace_sptr inputWS, + API::MatrixWorkspace_sptr copyInput(const API::MatrixWorkspace_sptr &inputWS, size_t wsIndex); API::MatrixWorkspace_sptr smoothSingleSpectrum(API::MatrixWorkspace_sptr inputWS, size_t wsIndex); diff --git a/Framework/Algorithms/inc/MantidAlgorithms/WorkflowAlgorithmRunner.h b/Framework/Algorithms/inc/MantidAlgorithms/WorkflowAlgorithmRunner.h index 3604a53221cfe5e71da78d4abf29d177d440a229..91444c287d472837c6e8b5f725fc323c36300167 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/WorkflowAlgorithmRunner.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/WorkflowAlgorithmRunner.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/WorkspaceJoiners.h b/Framework/Algorithms/inc/MantidAlgorithms/WorkspaceJoiners.h index eb84f751094be6e57fd0541b1632d5d59deb199a..ab32dccaca1d624715aca5103d98950338abc597 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/WorkspaceJoiners.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/WorkspaceJoiners.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/inc/MantidAlgorithms/XDataConverter.h b/Framework/Algorithms/inc/MantidAlgorithms/XDataConverter.h index 5cf9376fc35152ecfab984008b4898188ca5eaa4..b15e66e66bc674f306118ab2f5fa4d514c3e13a0 100644 --- a/Framework/Algorithms/inc/MantidAlgorithms/XDataConverter.h +++ b/Framework/Algorithms/inc/MantidAlgorithms/XDataConverter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -51,11 +51,11 @@ private: /// Override exec void exec() override; - std::size_t getNewYSize(const API::MatrixWorkspace_sptr inputWS); + std::size_t getNewYSize(const API::MatrixWorkspace_sptr &inputWS); /// Set the X data on given spectra - void setXData(API::MatrixWorkspace_sptr outputWS, - const API::MatrixWorkspace_sptr inputWS, const int index); + void setXData(const API::MatrixWorkspace_sptr &outputWS, + const API::MatrixWorkspace_sptr &inputWS, const int index); /// Flag if the X data is shared bool m_sharedX; diff --git a/Framework/Algorithms/src/AbsorptionCorrection.cpp b/Framework/Algorithms/src/AbsorptionCorrection.cpp index b5750619ad0c76af2c7f2695ef47f6b52cd6d739..a208e6091fbee69da2871bf9ee8d11b906f8b4ee 100644 --- a/Framework/Algorithms/src/AbsorptionCorrection.cpp +++ b/Framework/Algorithms/src/AbsorptionCorrection.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/AbsorptionCorrection.h" #include "MantidAPI/HistoWorkspace.h" diff --git a/Framework/Algorithms/src/AddLogDerivative.cpp b/Framework/Algorithms/src/AddLogDerivative.cpp index 5e03eebe96e4819433fdca7fa294098ba7687bbd..a30db421d6543f1f68c0f169dfa7c5e939eb632f 100644 --- a/Framework/Algorithms/src/AddLogDerivative.cpp +++ b/Framework/Algorithms/src/AddLogDerivative.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/AddLogDerivative.h" #include "MantidAPI/MatrixWorkspace.h" @@ -103,8 +103,9 @@ Mantid::Kernel::TimeSeriesProperty<double> *AddLogDerivative::makeDerivative( DateAndTime start = input->nthTime(0); std::vector<DateAndTime> timeFull; timeFull.reserve(times.size()); - for (const double time : times) - timeFull.emplace_back(start + time); + + std::transform(times.begin(), times.end(), std::back_inserter(timeFull), + [&start](const double time) { return start + time; }); // Create the TSP out of it auto out = new TimeSeriesProperty<double>(name); diff --git a/Framework/Algorithms/src/AddNote.cpp b/Framework/Algorithms/src/AddNote.cpp index 0b491d5c63a2a8b989f9c02fc184cfd7758c256c..e2f8c91d139b05d4fadcec56c4f90311b69ef5d7 100644 --- a/Framework/Algorithms/src/AddNote.cpp +++ b/Framework/Algorithms/src/AddNote.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/AddNote.h" #include "MantidAPI/MatrixWorkspace.h" diff --git a/Framework/Algorithms/src/AddPeak.cpp b/Framework/Algorithms/src/AddPeak.cpp index a8a6647c5717c084b26f6cb222184f9617561acc..cbdace7378d903c3ad877528c59eeca4a4df16f4 100644 --- a/Framework/Algorithms/src/AddPeak.cpp +++ b/Framework/Algorithms/src/AddPeak.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/AddPeak.h" #include "MantidAPI/Axis.h" diff --git a/Framework/Algorithms/src/AddSampleLog.cpp b/Framework/Algorithms/src/AddSampleLog.cpp index 1452c02943573b53ae9c09bb5b520e47df9edca0..4f49a04355892b673ce1e94e99a3be27d8ed30b3 100644 --- a/Framework/Algorithms/src/AddSampleLog.cpp +++ b/Framework/Algorithms/src/AddSampleLog.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/AddSampleLog.h" #include "MantidAPI/ExperimentInfo.h" @@ -369,7 +369,7 @@ void AddSampleLog::setTimeSeriesData(Run &run_obj, * @return */ std::vector<Types::Core::DateAndTime> -AddSampleLog::getTimes(API::MatrixWorkspace_const_sptr dataws, +AddSampleLog::getTimes(const API::MatrixWorkspace_const_sptr &dataws, int workspace_index, bool is_epoch, bool is_second, API::Run &run_obj) { // get run start time @@ -421,7 +421,7 @@ Types::Core::DateAndTime AddSampleLog::getRunStart(API::Run &run_obj) { * @return */ std::vector<double> -AddSampleLog::getDblValues(API::MatrixWorkspace_const_sptr dataws, +AddSampleLog::getDblValues(const API::MatrixWorkspace_const_sptr &dataws, int workspace_index) { std::vector<double> valuevec; size_t vecsize = dataws->readY(workspace_index).size(); @@ -439,7 +439,7 @@ AddSampleLog::getDblValues(API::MatrixWorkspace_const_sptr dataws, * @return */ std::vector<int> -AddSampleLog::getIntValues(API::MatrixWorkspace_const_sptr dataws, +AddSampleLog::getIntValues(const API::MatrixWorkspace_const_sptr &dataws, int workspace_index) { std::vector<int> valuevec; size_t vecsize = dataws->readY(workspace_index).size(); @@ -455,7 +455,7 @@ AddSampleLog::getIntValues(API::MatrixWorkspace_const_sptr dataws, * @param epochtime * @param timeunit */ -void AddSampleLog::getMetaData(API::MatrixWorkspace_const_sptr dataws, +void AddSampleLog::getMetaData(const API::MatrixWorkspace_const_sptr &dataws, bool &epochtime, std::string &timeunit) { bool auto_meta = getProperty("AutoMetaData"); if (auto_meta) { diff --git a/Framework/Algorithms/src/AddTimeSeriesLog.cpp b/Framework/Algorithms/src/AddTimeSeriesLog.cpp index 5888339fcac42ba64efc4d15eab1caa5cffde124..70c05b54df8060f28d7ab049ed707545a5b54058 100644 --- a/Framework/Algorithms/src/AddTimeSeriesLog.cpp +++ b/Framework/Algorithms/src/AddTimeSeriesLog.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/AddTimeSeriesLog.h" #include "MantidAPI/MatrixWorkspace.h" diff --git a/Framework/Algorithms/src/AlignDetectors.cpp b/Framework/Algorithms/src/AlignDetectors.cpp index fec36b2acdcaf3d212b3b698b3cffb204a077797..5df9f9c859b0d9a20e38502de988ef05935727d3 100644 --- a/Framework/Algorithms/src/AlignDetectors.cpp +++ b/Framework/Algorithms/src/AlignDetectors.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes @@ -24,6 +24,7 @@ #include <fstream> #include <sstream> +#include <utility> using namespace Mantid::Kernel; using namespace Mantid::API; @@ -41,7 +42,7 @@ namespace { // anonymous namespace class ConversionFactors { public: - explicit ConversionFactors(ITableWorkspace_const_sptr table) + explicit ConversionFactors(const ITableWorkspace_const_sptr &table) : m_difcCol(table->getColumn("difc")), m_difaCol(table->getColumn("difa")), m_tzeroCol(table->getColumn("tzero")) { @@ -70,7 +71,7 @@ public: } private: - void generateDetidToRow(ITableWorkspace_const_sptr table) { + void generateDetidToRow(const ITableWorkspace_const_sptr &table) { ConstColumnVector<int> detIDs = table->getVector("detid"); const size_t numDets = detIDs.size(); for (size_t i = 0; i < numDets; ++i) { @@ -188,7 +189,7 @@ std::map<std::string, std::string> AlignDetectors::validateInputs() { return result; } -void AlignDetectors::loadCalFile(MatrixWorkspace_sptr inputWS, +void AlignDetectors::loadCalFile(const MatrixWorkspace_sptr &inputWS, const std::string &filename) { IAlgorithm_sptr alg = createChildAlgorithm("LoadDiffCal"); alg->setProperty("InputWorkspace", inputWS); @@ -202,7 +203,7 @@ void AlignDetectors::loadCalFile(MatrixWorkspace_sptr inputWS, m_calibrationWS = alg->getProperty("OutputCalWorkspace"); } -void AlignDetectors::getCalibrationWS(MatrixWorkspace_sptr inputWS) { +void AlignDetectors::getCalibrationWS(const MatrixWorkspace_sptr &inputWS) { m_calibrationWS = getProperty("CalibrationWorkspace"); if (m_calibrationWS) return; // nothing more to do @@ -220,14 +221,14 @@ void AlignDetectors::getCalibrationWS(MatrixWorkspace_sptr inputWS) { const std::string calFileName = getPropertyValue("CalibrationFile"); if (!calFileName.empty()) { progress(0.0, "Reading calibration file"); - loadCalFile(inputWS, calFileName); + loadCalFile(std::move(inputWS), calFileName); return; } throw std::runtime_error("Failed to determine calibration information"); } -void setXAxisUnits(API::MatrixWorkspace_sptr outputWS) { +void setXAxisUnits(const API::MatrixWorkspace_sptr &outputWS) { outputWS->getAxis(0)->unit() = UnitFactory::Instance().create("dSpacing"); } diff --git a/Framework/Algorithms/src/AnnularRingAbsorption.cpp b/Framework/Algorithms/src/AnnularRingAbsorption.cpp index ac9ac404813d47d402fb50b09790e093f56e272d..5f041f56338e81930c8790589c206a3af1a9985e 100644 --- a/Framework/Algorithms/src/AnnularRingAbsorption.cpp +++ b/Framework/Algorithms/src/AnnularRingAbsorption.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/AnnularRingAbsorption.h" diff --git a/Framework/Algorithms/src/AnyShapeAbsorption.cpp b/Framework/Algorithms/src/AnyShapeAbsorption.cpp index 2bf3243ca2d0a10962113f0bc9828c4d6fef2edf..0533ec9d6d08ced8b7c7ae0125f0dbe804cde6e9 100644 --- a/Framework/Algorithms/src/AnyShapeAbsorption.cpp +++ b/Framework/Algorithms/src/AnyShapeAbsorption.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/AnyShapeAbsorption.h" #include "MantidAPI/MatrixWorkspace.h" diff --git a/Framework/Algorithms/src/ApodizationFunctions.cpp b/Framework/Algorithms/src/ApodizationFunctions.cpp index b71d540049da9b3fd0a397d270ade54816f3edec..4880f3b2d4f9988d9265744751859726af40eca8 100644 --- a/Framework/Algorithms/src/ApodizationFunctions.cpp +++ b/Framework/Algorithms/src/ApodizationFunctions.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/Algorithms/src/AppendSpectra.cpp b/Framework/Algorithms/src/AppendSpectra.cpp index ca9d606a15fad59d44882059ebc668bdcc120ca1..c22f8f498e2cd890a187859638337913829fea56 100644 --- a/Framework/Algorithms/src/AppendSpectra.cpp +++ b/Framework/Algorithms/src/AppendSpectra.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/AppendSpectra.h" #include "MantidAPI/CommonBinsValidator.h" diff --git a/Framework/Algorithms/src/ApplyCalibration.cpp b/Framework/Algorithms/src/ApplyCalibration.cpp index 0f4581ec65a6e9e14045f4460ac10cc215002f1f..06441f5fe865089c6fcd240c38e462c41d17f0d6 100644 --- a/Framework/Algorithms/src/ApplyCalibration.cpp +++ b/Framework/Algorithms/src/ApplyCalibration.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/ApplyCalibration.h" #include "MantidAPI/ITableWorkspace.h" diff --git a/Framework/Algorithms/src/ApplyDetailedBalance.cpp b/Framework/Algorithms/src/ApplyDetailedBalance.cpp index 6c6b3a0fe77d46222c7c4872c326eebf0226a0a4..0eec9659ba0492ad805aaccda4f051d42ac8f39b 100644 --- a/Framework/Algorithms/src/ApplyDetailedBalance.cpp +++ b/Framework/Algorithms/src/ApplyDetailedBalance.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/ApplyDetailedBalance.h" #include "MantidAPI/Run.h" diff --git a/Framework/Algorithms/src/ApplyFloodWorkspace.cpp b/Framework/Algorithms/src/ApplyFloodWorkspace.cpp index e134707029a91cbbcca729951db9cca0d36f524b..1933c21d7797a35e380121a748137ef6e2d16e7b 100644 --- a/Framework/Algorithms/src/ApplyFloodWorkspace.cpp +++ b/Framework/Algorithms/src/ApplyFloodWorkspace.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/ApplyFloodWorkspace.h" #include "MantidAPI/Axis.h" diff --git a/Framework/Algorithms/src/ApplyTransmissionCorrection.cpp b/Framework/Algorithms/src/ApplyTransmissionCorrection.cpp index 23f5c090ddd770d72f3fcc8e05e58c39ebd63d4b..08dbfc16f378fe2ed3ff7de8affbd48a0806db54 100644 --- a/Framework/Algorithms/src/ApplyTransmissionCorrection.cpp +++ b/Framework/Algorithms/src/ApplyTransmissionCorrection.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/ApplyTransmissionCorrection.h" #include "MantidAPI/HistogramValidator.h" diff --git a/Framework/Algorithms/src/AverageLogData.cpp b/Framework/Algorithms/src/AverageLogData.cpp index f080ecaed12cfc610f8bcfcc0853a60efa65724e..36d12a534d1d89f9e4e0b0efa16f412de5895990 100644 --- a/Framework/Algorithms/src/AverageLogData.cpp +++ b/Framework/Algorithms/src/AverageLogData.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/AverageLogData.h" #include "MantidAPI/MatrixWorkspace.h" diff --git a/Framework/Algorithms/src/Bin2DPowderDiffraction.cpp b/Framework/Algorithms/src/Bin2DPowderDiffraction.cpp index cd1db4c3ed8556a39714f8068621e55ceacae015..1ec74a6976e6d04afe727f5273ea7efb658cb900 100644 --- a/Framework/Algorithms/src/Bin2DPowderDiffraction.cpp +++ b/Framework/Algorithms/src/Bin2DPowderDiffraction.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/Bin2DPowderDiffraction.h" #include "MantidAPI/BinEdgeAxis.h" @@ -365,7 +365,8 @@ size_t Bin2DPowderDiffraction::UnifyXBins( return max_size; } -void Bin2DPowderDiffraction::normalizeToBinArea(MatrixWorkspace_sptr outWS) { +void Bin2DPowderDiffraction::normalizeToBinArea( + const MatrixWorkspace_sptr &outWS) { NumericAxis *verticalAxis = dynamic_cast<NumericAxis *>(outWS->getAxis(1)); const std::vector<double> &yValues = verticalAxis->getValues(); auto nhist = outWS->getNumberHistograms(); diff --git a/Framework/Algorithms/src/BinaryOperateMasks.cpp b/Framework/Algorithms/src/BinaryOperateMasks.cpp index cf76edab57cd71742234d552a75cb1962f93dc9a..b273f637f41ccd8bd480dfa450800d210ff1a97b 100644 --- a/Framework/Algorithms/src/BinaryOperateMasks.cpp +++ b/Framework/Algorithms/src/BinaryOperateMasks.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/BinaryOperateMasks.h" #include "MantidDataObjects/MaskWorkspace.h" diff --git a/Framework/Algorithms/src/BinaryOperation.cpp b/Framework/Algorithms/src/BinaryOperation.cpp index a2be3c0cd36cae2274d2d78634d1ff522ad59bfa..df4143ea17c09bf4446ceb68024cdc061394f1ba 100644 --- a/Framework/Algorithms/src/BinaryOperation.cpp +++ b/Framework/Algorithms/src/BinaryOperation.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/BinaryOperation.h" #include "MantidAPI/Axis.h" @@ -795,7 +795,8 @@ void BinaryOperation::do2D(bool mismatchedSpectra) { * @param out :: The result workspace */ void BinaryOperation::propagateBinMasks( - const API::MatrixWorkspace_const_sptr rhs, API::MatrixWorkspace_sptr out) { + const API::MatrixWorkspace_const_sptr &rhs, + const API::MatrixWorkspace_sptr &out) { const int64_t outHists = out->getNumberHistograms(); const int64_t rhsHists = rhs->getNumberHistograms(); for (int64_t i = 0; i < outHists; ++i) { @@ -876,7 +877,7 @@ void BinaryOperation::performEventBinaryOperation(DataObjects::EventList &lhs, * @return OperandType describing what type of workspace it will be operated as. */ OperandType -BinaryOperation::getOperandType(const API::MatrixWorkspace_const_sptr ws) { +BinaryOperation::getOperandType(const API::MatrixWorkspace_const_sptr &ws) { // An event workspace? EventWorkspace_const_sptr ews = boost::dynamic_pointer_cast<const EventWorkspace>(ws); diff --git a/Framework/Algorithms/src/CalculateCarpenterSampleCorrection.cpp b/Framework/Algorithms/src/CalculateCarpenterSampleCorrection.cpp index 3909b972fd1f234e705c0575a8d9a7f65757ecec..7d2997186d538952750887c6f703510d5d6b2332 100644 --- a/Framework/Algorithms/src/CalculateCarpenterSampleCorrection.cpp +++ b/Framework/Algorithms/src/CalculateCarpenterSampleCorrection.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/CalculateCarpenterSampleCorrection.h" #include "MantidAPI/HistoWorkspace.h" @@ -413,7 +413,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 = create<HistoWorkspace>(*inputWksp); // The algorithm computes the signal values at bin centres so they should // be treated as a distribution @@ -424,7 +424,7 @@ MatrixWorkspace_sptr CalculateCarpenterSampleCorrection::createOutputWorkspace( } MatrixWorkspace_sptr CalculateCarpenterSampleCorrection::setUncertainties( - MatrixWorkspace_sptr workspace) { + const MatrixWorkspace_sptr &workspace) { auto alg = this->createChildAlgorithm("SetUncertainties"); alg->initialize(); alg->setProperty("InputWorkspace", workspace); @@ -433,7 +433,7 @@ MatrixWorkspace_sptr CalculateCarpenterSampleCorrection::setUncertainties( } void CalculateCarpenterSampleCorrection::deleteWorkspace( - MatrixWorkspace_sptr workspace) { + const MatrixWorkspace_sptr &workspace) { auto alg = this->createChildAlgorithm("DeleteWorkspace"); alg->initialize(); alg->setChild(true); diff --git a/Framework/Algorithms/src/CalculateCountRate.cpp b/Framework/Algorithms/src/CalculateCountRate.cpp index ca39f37652766f5fd0a01f7f6c365238743e9f4d..dea463072d46fea3d3fe65e7d86701dbc324d5c9 100644 --- a/Framework/Algorithms/src/CalculateCountRate.cpp +++ b/Framework/Algorithms/src/CalculateCountRate.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/CalculateCountRate.h" diff --git a/Framework/Algorithms/src/CalculateDIFC.cpp b/Framework/Algorithms/src/CalculateDIFC.cpp index 78f764a4e050a7c45b8d79e712ee3a4c2c96ed47..4909325f3230b3512fab04e49c599b5a5da47abc 100644 --- a/Framework/Algorithms/src/CalculateDIFC.cpp +++ b/Framework/Algorithms/src/CalculateDIFC.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/CalculateDIFC.h" #include "MantidAPI/ITableWorkspace.h" diff --git a/Framework/Algorithms/src/CalculateDynamicRange.cpp b/Framework/Algorithms/src/CalculateDynamicRange.cpp index f6a98e46ed1864e0d7cf53d5fdc4f73b4c9f8b45..c379339928254015cf5f4e413036607dd335d62f 100644 --- a/Framework/Algorithms/src/CalculateDynamicRange.cpp +++ b/Framework/Algorithms/src/CalculateDynamicRange.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/CalculateDynamicRange.h" #include "MantidAPI/Run.h" @@ -73,9 +73,9 @@ void CalculateDynamicRange::init() { * @param indices : the list of workspace indices * @param compName : the name of the detector component */ -void CalculateDynamicRange::calculateQMinMax(MatrixWorkspace_sptr workspace, - const std::vector<size_t> &indices, - const std::string &compName = "") { +void CalculateDynamicRange::calculateQMinMax( + const MatrixWorkspace_sptr &workspace, const std::vector<size_t> &indices, + const std::string &compName = "") { const auto &spectrumInfo = workspace->spectrumInfo(); double min = std::numeric_limits<double>::max(), max = std::numeric_limits<double>::min(); @@ -146,9 +146,9 @@ void CalculateDynamicRange::exec() { } if (!dets.empty()) { detIDs.reserve(dets.size()); - for (const auto &det : dets) { - detIDs.emplace_back(det->getID()); - } + std::transform(dets.begin(), dets.end(), std::back_inserter(detIDs), + [](const auto &det) { return det->getID(); }); + const auto indices = workspace->getIndicesFromDetectorIDs(detIDs); calculateQMinMax(workspace, indices, compName); } diff --git a/Framework/Algorithms/src/CalculateEfficiency.cpp b/Framework/Algorithms/src/CalculateEfficiency.cpp index 9a3797238060bc5273d2e9b939ce019b73f1fa3c..97d115ef78c156580aab0089f12d3389b9eae123 100644 --- a/Framework/Algorithms/src/CalculateEfficiency.cpp +++ b/Framework/Algorithms/src/CalculateEfficiency.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/CalculateEfficiency.h" #include "MantidAPI/SpectrumInfo.h" @@ -156,9 +156,9 @@ void CalculateEfficiency::exec() { * @param error: error on sum (counts) * @param nPixels: number of unmasked detector pixels that contributed to sum */ -void CalculateEfficiency::sumUnmaskedDetectors(MatrixWorkspace_sptr rebinnedWS, - double &sum, double &error, - int &nPixels) { +void CalculateEfficiency::sumUnmaskedDetectors( + const MatrixWorkspace_sptr &rebinnedWS, double &sum, double &error, + int &nPixels) { // Number of spectra const auto numberOfSpectra = static_cast<int>(rebinnedWS->getNumberHistograms()); @@ -200,11 +200,10 @@ void CalculateEfficiency::sumUnmaskedDetectors(MatrixWorkspace_sptr rebinnedWS, * @param nPixels: number of unmasked detector pixels that contributed to sum */ -void CalculateEfficiency::normalizeDetectors(MatrixWorkspace_sptr rebinnedWS, - MatrixWorkspace_sptr outputWS, - double sum, double error, - int nPixels, double min_eff, - double max_eff) { +void CalculateEfficiency::normalizeDetectors( + const MatrixWorkspace_sptr &rebinnedWS, + const MatrixWorkspace_sptr &outputWS, double sum, double error, int nPixels, + double min_eff, double max_eff) { // Number of spectra const size_t numberOfSpectra = rebinnedWS->getNumberHistograms(); @@ -337,7 +336,7 @@ void CalculateEfficiency::maskComponent(MatrixWorkspace &ws, * @param low :: number of rows to mask Bottom * @param componentName :: Must be a RectangularDetector */ -void CalculateEfficiency::maskEdges(MatrixWorkspace_sptr ws, int left, +void CalculateEfficiency::maskEdges(const MatrixWorkspace_sptr &ws, int left, int right, int high, int low, const std::string &componentName) { diff --git a/Framework/Algorithms/src/CalculateEfficiency2.cpp b/Framework/Algorithms/src/CalculateEfficiency2.cpp index c956e4e22fa0064042372a25105a5162056118f6..45b25e0738acc766f8b4bcb044ffcb9d8c3a499b 100644 --- a/Framework/Algorithms/src/CalculateEfficiency2.cpp +++ b/Framework/Algorithms/src/CalculateEfficiency2.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/CalculateEfficiency2.h" #include "MantidAPI/SpectrumInfo.h" diff --git a/Framework/Algorithms/src/CalculateFlatBackground.cpp b/Framework/Algorithms/src/CalculateFlatBackground.cpp index 4b05440bf441975df5413d32bc36898566d8a47b..1780a9a5240e0cd8c51bcc357512cb3f40fa188a 100644 --- a/Framework/Algorithms/src/CalculateFlatBackground.cpp +++ b/Framework/Algorithms/src/CalculateFlatBackground.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/CalculateFlatBackground.h" #include "MantidAPI/FunctionFactory.h" diff --git a/Framework/Algorithms/src/CalculateIqt.cpp b/Framework/Algorithms/src/CalculateIqt.cpp index 501b52dcbfaf6afefb32bf38cc4316afccca3e5b..6d18d84ed86bd681ed5024a77f975136b646a952 100644 --- a/Framework/Algorithms/src/CalculateIqt.cpp +++ b/Framework/Algorithms/src/CalculateIqt.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/CalculateIqt.h" #include "MantidAPI/AlgorithmManager.h" @@ -15,6 +15,7 @@ #include <boost/numeric/conversion/cast.hpp> #include <cmath> #include <functional> +#include <utility> using namespace Mantid::Algorithms; using namespace Mantid::API; @@ -90,7 +91,7 @@ allYValuesAtIndex(const std::vector<MatrixWorkspace_sptr> &workspaces, return yValues; } -int getWorkspaceNumberOfHistograms(MatrixWorkspace_sptr workspace) { +int getWorkspaceNumberOfHistograms(const MatrixWorkspace_sptr &workspace) { return boost::numeric_cast<int>(workspace->getNumberHistograms()); } @@ -172,7 +173,7 @@ std::string CalculateIqt::rebinParamsAsString() { } MatrixWorkspace_sptr CalculateIqt::monteCarloErrorCalculation( - MatrixWorkspace_sptr sample, MatrixWorkspace_sptr resolution, + const MatrixWorkspace_sptr &sample, const MatrixWorkspace_sptr &resolution, const std::string &rebinParams, const int seed, const bool calculateErrors, const int nIterations) { auto outputWorkspace = calculateIqt(sample, resolution, rebinParams); @@ -211,7 +212,7 @@ std::map<std::string, std::string> CalculateIqt::validateInputs() { return issues; } -MatrixWorkspace_sptr CalculateIqt::rebin(MatrixWorkspace_sptr workspace, +MatrixWorkspace_sptr CalculateIqt::rebin(const MatrixWorkspace_sptr &workspace, const std::string ¶ms) { IAlgorithm_sptr rebinAlgorithm = this->createChildAlgorithm("Rebin"); rebinAlgorithm->initialize(); @@ -222,7 +223,8 @@ MatrixWorkspace_sptr CalculateIqt::rebin(MatrixWorkspace_sptr workspace, return rebinAlgorithm->getProperty("OutputWorkspace"); } -MatrixWorkspace_sptr CalculateIqt::integration(MatrixWorkspace_sptr workspace) { +MatrixWorkspace_sptr +CalculateIqt::integration(const MatrixWorkspace_sptr &workspace) { IAlgorithm_sptr integrationAlgorithm = this->createChildAlgorithm("Integration"); integrationAlgorithm->initialize(); @@ -233,7 +235,7 @@ MatrixWorkspace_sptr CalculateIqt::integration(MatrixWorkspace_sptr workspace) { } MatrixWorkspace_sptr -CalculateIqt::convertToPointData(MatrixWorkspace_sptr workspace) { +CalculateIqt::convertToPointData(const MatrixWorkspace_sptr &workspace) { IAlgorithm_sptr pointDataAlgorithm = this->createChildAlgorithm("ConvertToPointData"); pointDataAlgorithm->initialize(); @@ -244,7 +246,7 @@ CalculateIqt::convertToPointData(MatrixWorkspace_sptr workspace) { } MatrixWorkspace_sptr -CalculateIqt::extractFFTSpectrum(MatrixWorkspace_sptr workspace) { +CalculateIqt::extractFFTSpectrum(const MatrixWorkspace_sptr &workspace) { IAlgorithm_sptr FFTAlgorithm = this->createChildAlgorithm("ExtractFFTSpectrum"); FFTAlgorithm->initialize(); @@ -255,8 +257,9 @@ CalculateIqt::extractFFTSpectrum(MatrixWorkspace_sptr workspace) { return FFTAlgorithm->getProperty("OutputWorkspace"); } -MatrixWorkspace_sptr CalculateIqt::divide(MatrixWorkspace_sptr lhsWorkspace, - MatrixWorkspace_sptr rhsWorkspace) { +MatrixWorkspace_sptr +CalculateIqt::divide(const MatrixWorkspace_sptr &lhsWorkspace, + const MatrixWorkspace_sptr &rhsWorkspace) { IAlgorithm_sptr divideAlgorithm = this->createChildAlgorithm("Divide"); divideAlgorithm->initialize(); divideAlgorithm->setProperty("LHSWorkspace", lhsWorkspace); @@ -266,8 +269,9 @@ MatrixWorkspace_sptr CalculateIqt::divide(MatrixWorkspace_sptr lhsWorkspace, return divideAlgorithm->getProperty("OutputWorkspace"); } -MatrixWorkspace_sptr CalculateIqt::cropWorkspace(MatrixWorkspace_sptr workspace, - const double xMax) { +MatrixWorkspace_sptr +CalculateIqt::cropWorkspace(const MatrixWorkspace_sptr &workspace, + const double xMax) { IAlgorithm_sptr cropAlgorithm = this->createChildAlgorithm("CropWorkspace"); cropAlgorithm->initialize(); cropAlgorithm->setProperty("InputWorkspace", workspace); @@ -278,7 +282,7 @@ MatrixWorkspace_sptr CalculateIqt::cropWorkspace(MatrixWorkspace_sptr workspace, } MatrixWorkspace_sptr -CalculateIqt::replaceSpecialValues(MatrixWorkspace_sptr workspace) { +CalculateIqt::replaceSpecialValues(const MatrixWorkspace_sptr &workspace) { IAlgorithm_sptr specialValuesAlgorithm = this->createChildAlgorithm("ReplaceSpecialValues"); specialValuesAlgorithm->initialize(); @@ -311,18 +315,19 @@ CalculateIqt::normalizedFourierTransform(MatrixWorkspace_sptr workspace, MatrixWorkspace_sptr CalculateIqt::calculateIqt(MatrixWorkspace_sptr workspace, - MatrixWorkspace_sptr resolutionWorkspace, + const MatrixWorkspace_sptr &resolutionWorkspace, const std::string &rebinParams) { workspace = normalizedFourierTransform(workspace, rebinParams); - return divide(workspace, resolutionWorkspace); + return divide(workspace, std::move(resolutionWorkspace)); } MatrixWorkspace_sptr CalculateIqt::doSimulation(MatrixWorkspace_sptr sample, MatrixWorkspace_sptr resolution, const std::string &rebinParams, MersenneTwister &mTwister) { - auto simulatedWorkspace = randomizeWorkspaceWithinError(sample, mTwister); - return calculateIqt(simulatedWorkspace, resolution, rebinParams); + auto simulatedWorkspace = + randomizeWorkspaceWithinError(std::move(sample), mTwister); + return calculateIqt(simulatedWorkspace, std::move(resolution), rebinParams); } MatrixWorkspace_sptr CalculateIqt::setErrorsToStandardDeviation( diff --git a/Framework/Algorithms/src/CalculatePlaczekSelfScattering.cpp b/Framework/Algorithms/src/CalculatePlaczekSelfScattering.cpp index 90fca6e0e4147c29efbb062c95283fa2cee65a0a..9db3a1f2615d036badab8c2af2e4ab020c746f40 100644 --- a/Framework/Algorithms/src/CalculatePlaczekSelfScattering.cpp +++ b/Framework/Algorithms/src/CalculatePlaczekSelfScattering.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/CalculatePlaczekSelfScattering.h" #include "MantidAPI/Axis.h" @@ -21,7 +21,7 @@ namespace Mantid { namespace Algorithms { std::map<std::string, std::map<std::string, double>> -getSampleSpeciesInfo(const API::MatrixWorkspace_const_sptr ws) { +getSampleSpeciesInfo(const API::MatrixWorkspace_const_sptr &ws) { // get sample information : mass, total scattering length, and concentration // of each species double totalStoich = 0.0; @@ -91,7 +91,6 @@ CalculatePlaczekSelfScattering::validateInputs() { void CalculatePlaczekSelfScattering::exec() { const API::MatrixWorkspace_sptr inWS = getProperty("InputWorkspace"); const API::MatrixWorkspace_sptr incidentWS = getProperty("IncidentSpecta"); - API::MatrixWorkspace_sptr outWS = getProperty("OutputWorkspace"); constexpr double factor = 1.0 / 1.66053906660e-27; // atomic mass unit-kilogram relationship constexpr double neutronMass = factor * 1.674927471e-27; // neutron mass @@ -99,11 +98,15 @@ void CalculatePlaczekSelfScattering::exec() { // of each species auto atomSpecies = getSampleSpeciesInfo(inWS); // calculate summation term w/ neutron mass over molecular mass ratio - double summationTerm = 0.0; - for (auto atom : atomSpecies) { - summationTerm += atom.second["concentration"] * atom.second["bSqrdBar"] * + + auto sumLambda = [&neutronMass](double sum, auto &atom) { + return sum + atom.second["concentration"] * atom.second["bSqrdBar"] * neutronMass / atom.second["mass"]; - } + }; + + double summationTerm = + std::accumulate(atomSpecies.begin(), atomSpecies.end(), 0.0, sumLambda); + // get incident spectrum and 1st derivative const MantidVec xLambda = incidentWS->readX(0); const MantidVec incident = incidentWS->readY(0); diff --git a/Framework/Algorithms/src/CalculatePolynomialBackground.cpp b/Framework/Algorithms/src/CalculatePolynomialBackground.cpp index 15df545d983f12a0a37957ee8c5cd0572dfe6760..a7cd74411a39195521300179caa52ef7e58ab5e5 100644 --- a/Framework/Algorithms/src/CalculatePolynomialBackground.cpp +++ b/Framework/Algorithms/src/CalculatePolynomialBackground.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/CalculatePolynomialBackground.h" diff --git a/Framework/Algorithms/src/CalculateSlits.cpp b/Framework/Algorithms/src/CalculateSlits.cpp index c94ad0b94c6e0b59db22c15512af3d50a832a0a5..cfacd367bf126863d8bbf1f4e4fc6318d2dc38d7 100644 --- a/Framework/Algorithms/src/CalculateSlits.cpp +++ b/Framework/Algorithms/src/CalculateSlits.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/CalculateSlits.h" diff --git a/Framework/Algorithms/src/CalculateTransmission.cpp b/Framework/Algorithms/src/CalculateTransmission.cpp index 03ae985212d38f3a58aaf2e2f8f0c34fa4838b9e..e2269b9791d5418b9ec30b5cae0413a0fe357a35 100644 --- a/Framework/Algorithms/src/CalculateTransmission.cpp +++ b/Framework/Algorithms/src/CalculateTransmission.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/CalculateTransmission.h" #include "MantidAPI/CommonBinsValidator.h" @@ -25,6 +25,7 @@ #include <boost/algorithm/string/join.hpp> #include <boost/lexical_cast.hpp> +#include <utility> namespace Mantid { namespace Algorithms { @@ -264,7 +265,7 @@ void CalculateTransmission::exec() { *execution */ API::MatrixWorkspace_sptr -CalculateTransmission::extractSpectra(API::MatrixWorkspace_sptr ws, +CalculateTransmission::extractSpectra(const API::MatrixWorkspace_sptr &ws, const std::vector<size_t> &indices) { // Compile a comma separated list of indices that we can pass to SumSpectra. std::vector<std::string> indexStrings(indices.size()); @@ -301,11 +302,11 @@ CalculateTransmission::extractSpectra(API::MatrixWorkspace_sptr ws, * execution */ API::MatrixWorkspace_sptr -CalculateTransmission::fit(API::MatrixWorkspace_sptr raw, +CalculateTransmission::fit(const API::MatrixWorkspace_sptr &raw, const std::vector<double> &rebinParams, - const std::string fitMethod) { + const std::string &fitMethod) { MatrixWorkspace_sptr output = - this->extractSpectra(raw, std::vector<size_t>(1, 0)); + this->extractSpectra(std::move(raw), std::vector<size_t>(1, 0)); Progress progress(this, m_done, 1.0, 4); progress.report("CalculateTransmission: Performing fit"); @@ -403,8 +404,8 @@ CalculateTransmission::fit(API::MatrixWorkspace_sptr raw, * @throw runtime_error if the Linear algorithm fails during execution */ API::MatrixWorkspace_sptr -CalculateTransmission::fitData(API::MatrixWorkspace_sptr WS, double &grad, - double &offset) { +CalculateTransmission::fitData(const API::MatrixWorkspace_sptr &WS, + double &grad, double &offset) { g_log.information("Fitting the experimental transmission curve"); double start = m_done; IAlgorithm_sptr childAlg = createChildAlgorithm("Fit", start, m_done + 0.9); @@ -436,7 +437,8 @@ CalculateTransmission::fitData(API::MatrixWorkspace_sptr WS, double &grad, * @param[out] coeficients of the polynomial. c[0] + c[1]x + c[2]x^2 + ... */ API::MatrixWorkspace_sptr -CalculateTransmission::fitPolynomial(API::MatrixWorkspace_sptr WS, int order, +CalculateTransmission::fitPolynomial(const API::MatrixWorkspace_sptr &WS, + int order, std::vector<double> &coeficients) { g_log.notice("Fitting the experimental transmission curve fitpolyno"); double start = m_done; @@ -473,7 +475,7 @@ CalculateTransmission::fitPolynomial(API::MatrixWorkspace_sptr WS, int order, */ API::MatrixWorkspace_sptr CalculateTransmission::rebin(const std::vector<double> &binParams, - API::MatrixWorkspace_sptr ws) { + const API::MatrixWorkspace_sptr &ws) { double start = m_done; IAlgorithm_sptr childAlg = createChildAlgorithm("Rebin", start, m_done += 0.05); @@ -493,9 +495,9 @@ CalculateTransmission::rebin(const std::vector<double> &binParams, * @param directWS :: the input direct workspace * @param index :: the index of the detector to checked */ -void CalculateTransmission::logIfNotMonitor(API::MatrixWorkspace_sptr sampleWS, - API::MatrixWorkspace_sptr directWS, - size_t index) { +void CalculateTransmission::logIfNotMonitor( + const API::MatrixWorkspace_sptr &sampleWS, + const API::MatrixWorkspace_sptr &directWS, size_t index) { const std::string message = "The detector at index " + std::to_string(index) + " is not a monitor in the "; if (!sampleWS->spectrumInfo().isMonitor(index)) diff --git a/Framework/Algorithms/src/CalculateTransmissionBeamSpreader.cpp b/Framework/Algorithms/src/CalculateTransmissionBeamSpreader.cpp index d2dc527332185e9708d466a59b80b032916627e7..2fde4715f04155e90ec6e462f9e1faf3aaac0797 100644 --- a/Framework/Algorithms/src/CalculateTransmissionBeamSpreader.cpp +++ b/Framework/Algorithms/src/CalculateTransmissionBeamSpreader.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes @@ -240,8 +240,8 @@ void CalculateTransmissionBeamSpreader::exec() { * @param WS :: The workspace containing the spectrum to sum * @return A Workspace2D containing the sum */ -API::MatrixWorkspace_sptr -CalculateTransmissionBeamSpreader::sumSpectra(API::MatrixWorkspace_sptr WS) { +API::MatrixWorkspace_sptr CalculateTransmissionBeamSpreader::sumSpectra( + const API::MatrixWorkspace_sptr &WS) { Algorithm_sptr childAlg = createChildAlgorithm("SumSpectra"); childAlg->setProperty<MatrixWorkspace_sptr>("InputWorkspace", WS); childAlg->setProperty<bool>("IncludeMonitors", false); @@ -255,9 +255,8 @@ CalculateTransmissionBeamSpreader::sumSpectra(API::MatrixWorkspace_sptr WS) { * @param index :: The workspace index of the spectrum to extract * @return A Workspace2D containing the extracted spectrum */ -API::MatrixWorkspace_sptr -CalculateTransmissionBeamSpreader::extractSpectrum(API::MatrixWorkspace_sptr WS, - const size_t index) { +API::MatrixWorkspace_sptr CalculateTransmissionBeamSpreader::extractSpectrum( + const API::MatrixWorkspace_sptr &WS, const size_t index) { // Check that given spectra are monitors if (!WS->spectrumInfo().isMonitor(index)) { g_log.information( @@ -277,8 +276,8 @@ CalculateTransmissionBeamSpreader::extractSpectrum(API::MatrixWorkspace_sptr WS, * @param WS :: The single-spectrum workspace to fit * @return A workspace containing the fit */ -API::MatrixWorkspace_sptr -CalculateTransmissionBeamSpreader::fitToData(API::MatrixWorkspace_sptr WS) { +API::MatrixWorkspace_sptr CalculateTransmissionBeamSpreader::fitToData( + const API::MatrixWorkspace_sptr &WS) { g_log.information("Fitting the experimental transmission curve"); Algorithm_sptr childAlg = createChildAlgorithm("Linear", 0.6, 1.0); childAlg->setProperty<MatrixWorkspace_sptr>("InputWorkspace", WS); diff --git a/Framework/Algorithms/src/CalculateZscore.cpp b/Framework/Algorithms/src/CalculateZscore.cpp index 0899cef4aa4ffe35c63076d78f7dbc2317af12e4..60f9908bb624f857fa8d62ddbb18f884ae00404b 100644 --- a/Framework/Algorithms/src/CalculateZscore.cpp +++ b/Framework/Algorithms/src/CalculateZscore.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/CalculateZscore.h" #include "MantidAPI/MatrixWorkspace.h" diff --git a/Framework/Algorithms/src/CarpenterSampleCorrection.cpp b/Framework/Algorithms/src/CarpenterSampleCorrection.cpp index e4ff9c2ee781353a8fb7b27747aad669e1d7da3a..404c19988b3dafda7b0afa4420f5d2d7f5df965c 100644 --- a/Framework/Algorithms/src/CarpenterSampleCorrection.cpp +++ b/Framework/Algorithms/src/CarpenterSampleCorrection.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/CarpenterSampleCorrection.h" #include "MantidAPI/InstrumentValidator.h" @@ -131,8 +131,8 @@ WorkspaceGroup_sptr CarpenterSampleCorrection::calculateCorrection( } MatrixWorkspace_sptr -CarpenterSampleCorrection::minus(const MatrixWorkspace_sptr lhsWS, - const MatrixWorkspace_sptr rhsWS) { +CarpenterSampleCorrection::minus(const MatrixWorkspace_sptr &lhsWS, + const MatrixWorkspace_sptr &rhsWS) { auto minus = this->createChildAlgorithm("Minus", 0.5, 0.75); minus->setProperty("LHSWorkspace", lhsWS); minus->setProperty("RHSWorkspace", rhsWS); @@ -142,8 +142,8 @@ CarpenterSampleCorrection::minus(const MatrixWorkspace_sptr lhsWS, } MatrixWorkspace_sptr -CarpenterSampleCorrection::multiply(const MatrixWorkspace_sptr lhsWS, - const MatrixWorkspace_sptr rhsWS) { +CarpenterSampleCorrection::multiply(const MatrixWorkspace_sptr &lhsWS, + const MatrixWorkspace_sptr &rhsWS) { auto multiply = this->createChildAlgorithm("Multiply", 0.75, 1.0); multiply->setProperty("LHSWorkspace", lhsWS); multiply->setProperty("RHSWorkspace", rhsWS); diff --git a/Framework/Algorithms/src/ChangeBinOffset.cpp b/Framework/Algorithms/src/ChangeBinOffset.cpp index 8f7868acde146516d73338424e484fed4cd9c6b0..869acd987f53bdeffead33ced7b1d1027880a323 100644 --- a/Framework/Algorithms/src/ChangeBinOffset.cpp +++ b/Framework/Algorithms/src/ChangeBinOffset.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/ChangeBinOffset.h" #include "MantidAPI/MatrixWorkspace.h" @@ -54,8 +54,8 @@ void ChangeBinOffset::exec() { this->for_each<Indices::FromProperty>( *outputW, std::make_tuple(MatrixWorkspaceAccess::x), [offset](std::vector<double> &dataX) { - for (auto &x : dataX) - x += offset; + std::transform(dataX.begin(), dataX.end(), dataX.begin(), + [offset](double x) { return x + offset; }); }); } } diff --git a/Framework/Algorithms/src/ChangeLogTime.cpp b/Framework/Algorithms/src/ChangeLogTime.cpp index b43c79409378d9cf3022c6429ce5f903619cc9b2..b8e7e02ef5e6e800269dedfec89cedb538e99364 100644 --- a/Framework/Algorithms/src/ChangeLogTime.cpp +++ b/Framework/Algorithms/src/ChangeLogTime.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/ChangeLogTime.h" #include "MantidAPI/Run.h" diff --git a/Framework/Algorithms/src/ChangePulsetime.cpp b/Framework/Algorithms/src/ChangePulsetime.cpp index bd938081de213e7de31042bc07c3cbf3e0253cdc..ff9c1fcc4a8bcab9147c4c1b31986ba795d1eb36 100644 --- a/Framework/Algorithms/src/ChangePulsetime.cpp +++ b/Framework/Algorithms/src/ChangePulsetime.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/ChangePulsetime.h" #include "MantidDataObjects/EventWorkspace.h" diff --git a/Framework/Algorithms/src/ChangePulsetime2.cpp b/Framework/Algorithms/src/ChangePulsetime2.cpp index b4d59975b950cbee836941a6604f1d119fddf722..2b09751ca6f198a85b09ad33ad5fd41b0d8c7adb 100644 --- a/Framework/Algorithms/src/ChangePulsetime2.cpp +++ b/Framework/Algorithms/src/ChangePulsetime2.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/ChangePulsetime2.h" #include "MantidAPI/Algorithm.tcc" diff --git a/Framework/Algorithms/src/ChangeTimeZero.cpp b/Framework/Algorithms/src/ChangeTimeZero.cpp index c9ec2e63aa56fb1509cd6d0004615d09fd1f4920..f8375d2062a6071b66c89b2b04e28786fd13db92 100644 --- a/Framework/Algorithms/src/ChangeTimeZero.cpp +++ b/Framework/Algorithms/src/ChangeTimeZero.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/ChangeTimeZero.h" #include "MantidAPI/IEventWorkspace.h" @@ -20,6 +20,7 @@ #include <boost/lexical_cast.hpp> #include <boost/shared_ptr.hpp> +#include <utility> namespace Mantid { namespace Algorithms { @@ -82,12 +83,11 @@ void ChangeTimeZero::exec() { // Set up remaining progress points const double progressStartShiftTimeLogs = progressStopCreateOutputWs; - double progressStopShiftTimeLogs = progressStartShiftTimeLogs; - if (boost::dynamic_pointer_cast<Mantid::API::IEventWorkspace>(out_ws)) { - progressStopShiftTimeLogs = progressStartShiftTimeLogs + 0.1; - } else { - progressStopShiftTimeLogs = 1.0; - } + + double progressStopShiftTimeLogs = + boost::dynamic_pointer_cast<Mantid::API::IEventWorkspace>(out_ws) + ? progressStartShiftTimeLogs + 0.1 + : 1.0; const double progressStartShiftNeutrons = progressStopShiftTimeLogs; const double progressStopShiftNeutrons = 1.0; @@ -112,7 +112,7 @@ void ChangeTimeZero::exec() { * @returns :: pointer to the outputworkspace */ API::MatrixWorkspace_sptr -ChangeTimeZero::createOutputWS(API::MatrixWorkspace_sptr input, +ChangeTimeZero::createOutputWS(const API::MatrixWorkspace_sptr &input, double startProgress, double stopProgress) { MatrixWorkspace_sptr output = getProperty("OutputWorkspace"); // Check whether input == output to see whether a new workspace is required. @@ -135,13 +135,13 @@ ChangeTimeZero::createOutputWS(API::MatrixWorkspace_sptr input, * @param ws :: a workspace with time stamp information * @returns A time shift in seconds */ -double ChangeTimeZero::getTimeShift(API::MatrixWorkspace_sptr ws) const { +double ChangeTimeZero::getTimeShift(const API::MatrixWorkspace_sptr &ws) const { auto timeShift = m_defaultTimeShift; // Check if we are dealing with an absolute time std::string timeOffset = getProperty("AbsoluteTimeOffset"); if (isAbsoluteTimeShift(timeOffset)) { DateAndTime desiredTime(timeOffset); - DateAndTime originalTime(getStartTimeFromWorkspace(ws)); + DateAndTime originalTime(getStartTimeFromWorkspace(std::move(ws))); timeShift = DateAndTime::secondsFromDuration(desiredTime - originalTime); } else { timeShift = getProperty("RelativeTimeOffset"); @@ -156,9 +156,9 @@ double ChangeTimeZero::getTimeShift(API::MatrixWorkspace_sptr ws) const { * @param startProgress :: start point of the progress * @param stopProgress :: end point of the progress */ -void ChangeTimeZero::shiftTimeOfLogs(Mantid::API::MatrixWorkspace_sptr ws, - double timeShift, double startProgress, - double stopProgress) { +void ChangeTimeZero::shiftTimeOfLogs( + const Mantid::API::MatrixWorkspace_sptr &ws, double timeShift, + double startProgress, double stopProgress) { // We need to change the entries for each log which can be: // 1. any time series: here we change the time values // 2. string properties: here we change the values if they are ISO8601 times @@ -184,7 +184,7 @@ void ChangeTimeZero::shiftTimeOfLogs(Mantid::API::MatrixWorkspace_sptr ws, * @param timeShift :: the time shift in seconds */ void ChangeTimeZero::shiftTimeInLogForTimeSeries( - Mantid::API::MatrixWorkspace_sptr ws, Mantid::Kernel::Property *prop, + const Mantid::API::MatrixWorkspace_sptr &ws, Mantid::Kernel::Property *prop, double timeShift) const { if (auto timeSeries = dynamic_cast<Mantid::Kernel::ITimeSeriesProperty *>(prop)) { @@ -216,9 +216,9 @@ void ChangeTimeZero::shiftTimeOfLogForStringProperty( * @param startProgress :: start point of the progress * @param stopProgress :: end point of the progress */ -void ChangeTimeZero::shiftTimeOfNeutrons(Mantid::API::MatrixWorkspace_sptr ws, - double timeShift, double startProgress, - double stopProgress) { +void ChangeTimeZero::shiftTimeOfNeutrons( + const Mantid::API::MatrixWorkspace_sptr &ws, double timeShift, + double startProgress, double stopProgress) { if (auto eventWs = boost::dynamic_pointer_cast<Mantid::API::IEventWorkspace>(ws)) { // Use the change pulse time algorithm to change the neutron time stamp @@ -237,8 +237,8 @@ void ChangeTimeZero::shiftTimeOfNeutrons(Mantid::API::MatrixWorkspace_sptr ws, * @param ws :: a workspace * @returns the date and time of the first good frame */ -DateAndTime -ChangeTimeZero::getStartTimeFromWorkspace(API::MatrixWorkspace_sptr ws) const { +DateAndTime ChangeTimeZero::getStartTimeFromWorkspace( + const API::MatrixWorkspace_sptr &ws) const { auto run = ws->run(); // Check for the first good frame in the log Mantid::Kernel::TimeSeriesProperty<double> *goodFrame = nullptr; @@ -318,7 +318,7 @@ std::map<std::string, std::string> ChangeTimeZero::validateInputs() { * @param val :: value to check * @return True if the string can be cast to double and otherwise false. */ -bool ChangeTimeZero::checkForDouble(std::string val) const { +bool ChangeTimeZero::checkForDouble(const std::string &val) const { auto isDouble = false; try { boost::lexical_cast<double>(val); diff --git a/Framework/Algorithms/src/CheckWorkspacesMatch.cpp b/Framework/Algorithms/src/CheckWorkspacesMatch.cpp index 9ad0448f19cdd2b584db0969eb3f692fb26293cc..f28bff3fc9d747541e1d0aba94dc7d3d17da0ffa 100644 --- a/Framework/Algorithms/src/CheckWorkspacesMatch.cpp +++ b/Framework/Algorithms/src/CheckWorkspacesMatch.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/Algorithms/src/ChopData.cpp b/Framework/Algorithms/src/ChopData.cpp index bea4e4232290f58d3fc9fc85046fde2fc0efe2f7..ab4ceb8f9d038c62e0081e97d60cff965a156509 100644 --- a/Framework/Algorithms/src/ChopData.cpp +++ b/Framework/Algorithms/src/ChopData.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/ChopData.h" #include "MantidAPI/HistogramValidator.h" diff --git a/Framework/Algorithms/src/ClearCache.cpp b/Framework/Algorithms/src/ClearCache.cpp index 718cee833c82f2cc6e6bb8ec56d29e49ce78b02e..57a0c895d2bd13f89b2da187eba1560a2f131905 100644 --- a/Framework/Algorithms/src/ClearCache.cpp +++ b/Framework/Algorithms/src/ClearCache.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/ClearCache.h" #include "MantidAPI/AlgorithmManager.h" diff --git a/Framework/Algorithms/src/ClearInstrumentParameters.cpp b/Framework/Algorithms/src/ClearInstrumentParameters.cpp index 72be3a869fb26a744e359eb4a04b8afb2dfb2bb5..c6ae5399c0922f03db97ef368c24362016965201 100644 --- a/Framework/Algorithms/src/ClearInstrumentParameters.cpp +++ b/Framework/Algorithms/src/ClearInstrumentParameters.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/ClearInstrumentParameters.h" #include "MantidAPI/InstrumentValidator.h" diff --git a/Framework/Algorithms/src/ClearMaskFlag.cpp b/Framework/Algorithms/src/ClearMaskFlag.cpp index a0fbd99afcc4f8f7d363d3b59705a8ae1ab43729..1e8c6c898a6905f9b71cb8afb302d67332d5d873 100644 --- a/Framework/Algorithms/src/ClearMaskFlag.cpp +++ b/Framework/Algorithms/src/ClearMaskFlag.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/ClearMaskFlag.h" diff --git a/Framework/Algorithms/src/ClearMaskedSpectra.cpp b/Framework/Algorithms/src/ClearMaskedSpectra.cpp index c7d5cf2bafe72a05d10edb619ef210eb841aa14a..5d4219abd3241fa9c4147f5acfdec3e7d8849918 100644 --- a/Framework/Algorithms/src/ClearMaskedSpectra.cpp +++ b/Framework/Algorithms/src/ClearMaskedSpectra.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/ClearMaskedSpectra.h" #include "MantidAPI/MatrixWorkspace.h" diff --git a/Framework/Algorithms/src/CloneWorkspace.cpp b/Framework/Algorithms/src/CloneWorkspace.cpp index a424a975d16b13ccc7bc4b9f8905e1554a17018b..884a1a92a316ea4bc09b691f790f22462e86b9e4 100644 --- a/Framework/Algorithms/src/CloneWorkspace.cpp +++ b/Framework/Algorithms/src/CloneWorkspace.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/CloneWorkspace.h" #include "MantidAPI/IMDEventWorkspace.h" diff --git a/Framework/Algorithms/src/Comment.cpp b/Framework/Algorithms/src/Comment.cpp index fdb0eecec602dbef2cf34d99a0bbbf8d1ada9226..1744f8c572145c52329233741d43bfd06f9b4f42 100644 --- a/Framework/Algorithms/src/Comment.cpp +++ b/Framework/Algorithms/src/Comment.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/Comment.h" #include "MantidKernel/MandatoryValidator.h" diff --git a/Framework/Algorithms/src/CommutativeBinaryOperation.cpp b/Framework/Algorithms/src/CommutativeBinaryOperation.cpp index b20f75726bb2b49652a8957aeafb7c9348ec940c..ae3c918e84eb719e81e67e588ad059aa0d1dcee6 100644 --- a/Framework/Algorithms/src/CommutativeBinaryOperation.cpp +++ b/Framework/Algorithms/src/CommutativeBinaryOperation.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/CommutativeBinaryOperation.h" diff --git a/Framework/Algorithms/src/CompareWorkspaces.cpp b/Framework/Algorithms/src/CompareWorkspaces.cpp index e8a4d192daa18b83cffa0d7ec4cba5c963a55044..156043256c193b0c8571b16a52999a0a4764181e 100644 --- a/Framework/Algorithms/src/CompareWorkspaces.cpp +++ b/Framework/Algorithms/src/CompareWorkspaces.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/CompareWorkspaces.h" @@ -262,8 +262,8 @@ bool CompareWorkspaces::processGroups() { * @param groupTwo */ void CompareWorkspaces::processGroups( - boost::shared_ptr<const API::WorkspaceGroup> groupOne, - boost::shared_ptr<const API::WorkspaceGroup> groupTwo) { + const boost::shared_ptr<const API::WorkspaceGroup> &groupOne, + const boost::shared_ptr<const API::WorkspaceGroup> &groupTwo) { // Check their sizes const auto totalNum = static_cast<size_t>(groupOne->getNumberOfEntries()); @@ -618,8 +618,8 @@ bool CompareWorkspaces::compareEventWorkspaces( * @retval true The data matches * @retval false The data does not matches */ -bool CompareWorkspaces::checkData(API::MatrixWorkspace_const_sptr ws1, - API::MatrixWorkspace_const_sptr ws2) { +bool CompareWorkspaces::checkData(const API::MatrixWorkspace_const_sptr &ws1, + const API::MatrixWorkspace_const_sptr &ws2) { // Cache a few things for later use const size_t numHists = ws1->getNumberHistograms(); const size_t numBins = ws1->blocksize(); @@ -712,8 +712,8 @@ bool CompareWorkspaces::checkData(API::MatrixWorkspace_const_sptr ws1, * @retval true The axes match * @retval false The axes do not match */ -bool CompareWorkspaces::checkAxes(API::MatrixWorkspace_const_sptr ws1, - API::MatrixWorkspace_const_sptr ws2) { +bool CompareWorkspaces::checkAxes(const API::MatrixWorkspace_const_sptr &ws1, + const API::MatrixWorkspace_const_sptr &ws2) { const int numAxes = ws1->axes(); if (numAxes != ws2->axes()) { @@ -790,8 +790,8 @@ bool CompareWorkspaces::checkAxes(API::MatrixWorkspace_const_sptr ws1, /// @param ws2 :: the second sp det map /// @retval true The maps match /// @retval false The maps do not match -bool CompareWorkspaces::checkSpectraMap(MatrixWorkspace_const_sptr ws1, - MatrixWorkspace_const_sptr ws2) { +bool CompareWorkspaces::checkSpectraMap(const MatrixWorkspace_const_sptr &ws1, + const MatrixWorkspace_const_sptr &ws2) { if (ws1->getNumberHistograms() != ws2->getNumberHistograms()) { recordMismatch("Number of spectra mismatch"); return false; @@ -832,8 +832,9 @@ bool CompareWorkspaces::checkSpectraMap(MatrixWorkspace_const_sptr ws1, /// @param ws2 :: the second workspace /// @retval true The instruments match /// @retval false The instruments do not match -bool CompareWorkspaces::checkInstrument(API::MatrixWorkspace_const_sptr ws1, - API::MatrixWorkspace_const_sptr ws2) { +bool CompareWorkspaces::checkInstrument( + const API::MatrixWorkspace_const_sptr &ws1, + const API::MatrixWorkspace_const_sptr &ws2) { // First check the name matches if (ws1->getInstrument()->getName() != ws2->getInstrument()->getName()) { g_log.debug() << "Instrument names: WS1 = " @@ -871,8 +872,9 @@ bool CompareWorkspaces::checkInstrument(API::MatrixWorkspace_const_sptr ws1, /// @param ws2 :: the second workspace /// @retval true The masking matches /// @retval false The masking does not match -bool CompareWorkspaces::checkMasking(API::MatrixWorkspace_const_sptr ws1, - API::MatrixWorkspace_const_sptr ws2) { +bool CompareWorkspaces::checkMasking( + const API::MatrixWorkspace_const_sptr &ws1, + const API::MatrixWorkspace_const_sptr &ws2) { const auto numHists = static_cast<int>(ws1->getNumberHistograms()); for (int i = 0; i < numHists; ++i) { @@ -1111,8 +1113,8 @@ void CompareWorkspaces::doPeaksComparison(PeaksWorkspace_sptr tws1, //------------------------------------------------------------------------------------------------ void CompareWorkspaces::doTableComparison( - API::ITableWorkspace_const_sptr tws1, - API::ITableWorkspace_const_sptr tws2) { + const API::ITableWorkspace_const_sptr &tws1, + const API::ITableWorkspace_const_sptr &tws2) { // First the easy things const auto numCols = tws1->columnCount(); if (numCols != tws2->columnCount()) { @@ -1177,7 +1179,8 @@ void CompareWorkspaces::doTableComparison( } //------------------------------------------------------------------------------------------------ -void CompareWorkspaces::doMDComparison(Workspace_sptr w1, Workspace_sptr w2) { +void CompareWorkspaces::doMDComparison(const Workspace_sptr &w1, + const Workspace_sptr &w2) { IMDWorkspace_sptr mdws1, mdws2; mdws1 = boost::dynamic_pointer_cast<IMDWorkspace>(w1); mdws2 = boost::dynamic_pointer_cast<IMDWorkspace>(w2); @@ -1204,7 +1207,7 @@ void CompareWorkspaces::doMDComparison(Workspace_sptr w1, Workspace_sptr w2) { * @param ws1 Name of first workspace being compared * @param ws2 Name of second workspace being compared */ -void CompareWorkspaces::recordMismatch(std::string msg, std::string ws1, +void CompareWorkspaces::recordMismatch(const std::string &msg, std::string ws1, std::string ws2) { // Workspace names default to the workspaces currently being compared if (ws1.empty()) { diff --git a/Framework/Algorithms/src/ConjoinWorkspaces.cpp b/Framework/Algorithms/src/ConjoinWorkspaces.cpp index 22bd96ced764db5af2c4de8b1775fd7a549febdb..4a502740df4466b8000c6e44c2e7f877d12f106a 100644 --- a/Framework/Algorithms/src/ConjoinWorkspaces.cpp +++ b/Framework/Algorithms/src/ConjoinWorkspaces.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/ConjoinWorkspaces.h" #include "MantidAPI/AnalysisDataService.h" diff --git a/Framework/Algorithms/src/ConjoinXRuns.cpp b/Framework/Algorithms/src/ConjoinXRuns.cpp index feeacc4f71c10526000b0e3e48a36b1081871b3b..aa1ef64161227ec8ee7f330b940102d32d64689b 100644 --- a/Framework/Algorithms/src/ConjoinXRuns.cpp +++ b/Framework/Algorithms/src/ConjoinXRuns.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/ConjoinXRuns.h" @@ -198,7 +198,7 @@ std::map<std::string, std::string> ConjoinXRuns::validateInputs() { * @return : empty if the log exists, is numeric, and matches the size of the * workspace, error message otherwise */ -std::string ConjoinXRuns::checkLogEntry(MatrixWorkspace_sptr ws) const { +std::string ConjoinXRuns::checkLogEntry(const MatrixWorkspace_sptr &ws) const { std::string result; if (!m_logEntry.empty()) { @@ -250,7 +250,8 @@ std::string ConjoinXRuns::checkLogEntry(MatrixWorkspace_sptr ws) const { * @param ws : the input workspace * @return : the x-axis to use for the output workspace */ -std::vector<double> ConjoinXRuns::getXAxis(MatrixWorkspace_sptr ws) const { +std::vector<double> +ConjoinXRuns::getXAxis(const MatrixWorkspace_sptr &ws) const { std::vector<double> axis; axis.reserve(ws->y(0).size()); @@ -403,7 +404,7 @@ void ConjoinXRuns::exec() { << ". Reason: \"" << e.what() << "\". Skipping.\n"; sampleLogsBehaviour.resetSampleLogs(temp); // remove the skipped one from the list - m_inputWS.erase(it); + it = m_inputWS.erase(it); --it; } else { throw std::invalid_argument(e); diff --git a/Framework/Algorithms/src/ConvertAxesToRealSpace.cpp b/Framework/Algorithms/src/ConvertAxesToRealSpace.cpp index 620f196abee40410a68b68fea39273df70f63271..a780ea742ab840a2cc1a9ff7f0493cb5c393bd54 100644 --- a/Framework/Algorithms/src/ConvertAxesToRealSpace.cpp +++ b/Framework/Algorithms/src/ConvertAxesToRealSpace.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/ConvertAxesToRealSpace.h" #include "MantidAPI/NumericAxis.h" diff --git a/Framework/Algorithms/src/ConvertAxisByFormula.cpp b/Framework/Algorithms/src/ConvertAxisByFormula.cpp index 47357e3d7ee2f700a2636ada59598f3f7bbd6609..bb9f10fa6c588a0e7a4348803a8c4bd7deedc790 100644 --- a/Framework/Algorithms/src/ConvertAxisByFormula.cpp +++ b/Framework/Algorithms/src/ConvertAxisByFormula.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/ConvertAxisByFormula.h" #include "MantidAPI/RefAxis.h" diff --git a/Framework/Algorithms/src/ConvertDiffCal.cpp b/Framework/Algorithms/src/ConvertDiffCal.cpp index da76d48c763271089da45347f3e6b9c1c8ed4722..a8c0718a3f566b5c161565732086765b6e9f0b1d 100644 --- a/Framework/Algorithms/src/ConvertDiffCal.cpp +++ b/Framework/Algorithms/src/ConvertDiffCal.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/ConvertDiffCal.h" #include "MantidAPI/IAlgorithm.h" @@ -69,7 +69,8 @@ void ConvertDiffCal::init() { * @param index * @return The proper detector id. */ -detid_t getDetID(OffsetsWorkspace_const_sptr offsetsWS, const size_t index) { +detid_t getDetID(const OffsetsWorkspace_const_sptr &offsetsWS, + const size_t index) { auto detIDs = offsetsWS->getSpectrum(index).getDetectorIDs(); if (detIDs.size() != 1) { std::stringstream msg; @@ -86,7 +87,8 @@ detid_t getDetID(OffsetsWorkspace_const_sptr offsetsWS, const size_t index) { * @param detid * @return The offset value or zero if not specified. */ -double getOffset(OffsetsWorkspace_const_sptr offsetsWS, const detid_t detid) { +double getOffset(const OffsetsWorkspace_const_sptr &offsetsWS, + const detid_t detid) { const double offset = offsetsWS->getValue(detid, 0.0); if (offset <= -1.) { // non-physical std::stringstream msg; @@ -104,7 +106,8 @@ double getOffset(OffsetsWorkspace_const_sptr offsetsWS, const detid_t detid) { * @param spectrumInfo * @return The offset adjusted value of DIFC */ -double calculateDIFC(OffsetsWorkspace_const_sptr offsetsWS, const size_t index, +double calculateDIFC(const OffsetsWorkspace_const_sptr &offsetsWS, + const size_t index, const Mantid::API::SpectrumInfo &spectrumInfo) { const detid_t detid = getDetID(offsetsWS, index); const double offset = getOffset(offsetsWS, detid); diff --git a/Framework/Algorithms/src/ConvertEmptyToTof.cpp b/Framework/Algorithms/src/ConvertEmptyToTof.cpp index ea219764331718fb452442e22f8185ac5a6914f5..70dd3af9bf6a278de0d8eed1fdd2a9983b08f7e7 100644 --- a/Framework/Algorithms/src/ConvertEmptyToTof.cpp +++ b/Framework/Algorithms/src/ConvertEmptyToTof.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/ConvertEmptyToTof.h" @@ -500,7 +500,7 @@ std::vector<double> ConvertEmptyToTof::makeTofAxis(int epp, double epTof, } void ConvertEmptyToTof::setTofInWS(const std::vector<double> &tofAxis, - API::MatrixWorkspace_sptr outputWS) { + const API::MatrixWorkspace_sptr &outputWS) { const size_t numberOfSpectra = m_inputWS->getNumberHistograms(); diff --git a/Framework/Algorithms/src/ConvertFromDistribution.cpp b/Framework/Algorithms/src/ConvertFromDistribution.cpp index b8e8cc5225f86874276d27c7d59d42f2349ae742..1e1a5bc73d83e4b90b723c70b25338e54e85303f 100644 --- a/Framework/Algorithms/src/ConvertFromDistribution.cpp +++ b/Framework/Algorithms/src/ConvertFromDistribution.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/Algorithms/src/ConvertSpectrumAxis.cpp b/Framework/Algorithms/src/ConvertSpectrumAxis.cpp index 28d196f097e56f70f08d1a8b30832e622d616093..4445fa6829efb517574a111caec27dd2628a7f95 100644 --- a/Framework/Algorithms/src/ConvertSpectrumAxis.cpp +++ b/Framework/Algorithms/src/ConvertSpectrumAxis.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/ConvertSpectrumAxis.h" #include "MantidAPI/InstrumentValidator.h" @@ -186,7 +186,7 @@ void ConvertSpectrumAxis::exec() { double ConvertSpectrumAxis::getEfixed(const Mantid::Geometry::IDetector &detector, - MatrixWorkspace_const_sptr inputWS, + const MatrixWorkspace_const_sptr &inputWS, int emode) const { double efixed(0); double efixedProp = getProperty("Efixed"); diff --git a/Framework/Algorithms/src/ConvertSpectrumAxis2.cpp b/Framework/Algorithms/src/ConvertSpectrumAxis2.cpp index 3251a53e72c181c6fefd28132377bd401237a181..f224599c47acf85b47b190ed7c49cbdf9b3885c5 100644 --- a/Framework/Algorithms/src/ConvertSpectrumAxis2.cpp +++ b/Framework/Algorithms/src/ConvertSpectrumAxis2.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/ConvertSpectrumAxis2.h" #include "MantidAPI/InstrumentValidator.h" @@ -238,9 +238,10 @@ MatrixWorkspace_sptr ConvertSpectrumAxis2::createOutputWorkspace( create<MatrixWorkspace>(*inputWS, m_indexMap.size(), hist); std::vector<double> axis; axis.reserve(m_indexMap.size()); - for (const auto &it : m_indexMap) { - axis.emplace_back(it.first); - } + std::transform(m_indexMap.begin(), m_indexMap.end(), + std::back_inserter(axis), + [](const auto &it) { return it.first; }); + newAxis = std::make_unique<NumericAxis>(std::move(axis)); } else { // If there is no reordering we can simply clone. diff --git a/Framework/Algorithms/src/ConvertTableToMatrixWorkspace.cpp b/Framework/Algorithms/src/ConvertTableToMatrixWorkspace.cpp index fce52bf88460f92c7b76fa15686ec9640080a16c..f4cc47d1414093a8cc4b927850a9aecbfc645734 100644 --- a/Framework/Algorithms/src/ConvertTableToMatrixWorkspace.cpp +++ b/Framework/Algorithms/src/ConvertTableToMatrixWorkspace.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/Algorithms/src/ConvertToConstantL2.cpp b/Framework/Algorithms/src/ConvertToConstantL2.cpp index b624aa3e0c3a892eb6edf87bbed0104174fbd281..d863ded28228c97068ed78e99a214fa2e8bd0f7e 100644 --- a/Framework/Algorithms/src/ConvertToConstantL2.cpp +++ b/Framework/Algorithms/src/ConvertToConstantL2.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/ConvertToConstantL2.h" #include "MantidAPI/HistogramValidator.h" @@ -141,7 +141,7 @@ void ConvertToConstantL2::exec() { * @s - input property name * */ -double ConvertToConstantL2::getRunProperty(std::string s) { +double ConvertToConstantL2::getRunProperty(const std::string &s) { const auto &run = m_inputWS->run(); if (!run.hasProperty(s)) { throw Exception::NotFoundError("Sample log property not found", s); @@ -160,7 +160,7 @@ double ConvertToConstantL2::getRunProperty(std::string s) { * @s - input property name * */ -double ConvertToConstantL2::getInstrumentProperty(std::string s) { +double ConvertToConstantL2::getInstrumentProperty(const std::string &s) { std::vector<std::string> prop = m_instrument->getStringParameter(s); if (prop.empty()) { const std::string mesg = "Property <" + s + "> doesn't exist!"; diff --git a/Framework/Algorithms/src/ConvertToDistribution.cpp b/Framework/Algorithms/src/ConvertToDistribution.cpp index 2a9361e4cb58b163e7fae3ef35efa326020bba0c..2fa9896d49eca6c2f60f680b99d449e59fbc3138 100644 --- a/Framework/Algorithms/src/ConvertToDistribution.cpp +++ b/Framework/Algorithms/src/ConvertToDistribution.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/Algorithms/src/ConvertToEventWorkspace.cpp b/Framework/Algorithms/src/ConvertToEventWorkspace.cpp index 63361eadcf71b2f22d9c2e456fcd4edf00184971..83c1060bcc969f8f72d4207b9310d09a3ec0b1f2 100644 --- a/Framework/Algorithms/src/ConvertToEventWorkspace.cpp +++ b/Framework/Algorithms/src/ConvertToEventWorkspace.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/ConvertToEventWorkspace.h" #include "MantidDataObjects/EventWorkspace.h" diff --git a/Framework/Algorithms/src/ConvertToHistogram.cpp b/Framework/Algorithms/src/ConvertToHistogram.cpp index 1edb4354ac4d1a0152e3c4780750fcfbc4ed50b0..6fcc61f507809fe6ebd60296c64e13ef9203cb2b 100644 --- a/Framework/Algorithms/src/ConvertToHistogram.cpp +++ b/Framework/Algorithms/src/ConvertToHistogram.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //------------------------------------------------------------------------------ // Includes diff --git a/Framework/Algorithms/src/ConvertToMatrixWorkspace.cpp b/Framework/Algorithms/src/ConvertToMatrixWorkspace.cpp index 26d78cf33504b24d9e6bb2f4e8593bf7a7259eb2..efb446cf5a8fd786e7555585e4972ac62e5ec8df 100644 --- a/Framework/Algorithms/src/ConvertToMatrixWorkspace.cpp +++ b/Framework/Algorithms/src/ConvertToMatrixWorkspace.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/Algorithms/src/ConvertToPointData.cpp b/Framework/Algorithms/src/ConvertToPointData.cpp index dda5532dfa278e248153416d2d34f0da279e1eb4..83f79467f7c34a997e64e79797ac024cdf9b3b87 100644 --- a/Framework/Algorithms/src/ConvertToPointData.cpp +++ b/Framework/Algorithms/src/ConvertToPointData.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //------------------------------------------------------------------------------ // Includes diff --git a/Framework/Algorithms/src/ConvertUnits.cpp b/Framework/Algorithms/src/ConvertUnits.cpp index d969d41817db7ea7a8aa46c6b31df4234899d264..fd8d9fbe29039bdcb683ca6a7f24e4884432f50d 100644 --- a/Framework/Algorithms/src/ConvertUnits.cpp +++ b/Framework/Algorithms/src/ConvertUnits.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/ConvertUnits.h" #include "MantidAPI/AlgorithmFactory.h" @@ -186,7 +186,7 @@ void ConvertUnits::exec() { * @return A pointer to a MatrixWorkspace_sptr that contains the converted units */ MatrixWorkspace_sptr -ConvertUnits::executeUnitConversion(const API::MatrixWorkspace_sptr inputWS) { +ConvertUnits::executeUnitConversion(const API::MatrixWorkspace_sptr &inputWS) { // A WS holding BinEdges cannot have less than 2 values, as a bin has // 2 edges, having less than 2 values would mean that the WS contains Points @@ -251,7 +251,7 @@ ConvertUnits::executeUnitConversion(const API::MatrixWorkspace_sptr inputWS) { * @param inputWS The input workspace */ void ConvertUnits::setupMemberVariables( - const API::MatrixWorkspace_const_sptr inputWS) { + const API::MatrixWorkspace_const_sptr &inputWS) { m_numberOfSpectra = inputWS->getNumberHistograms(); // In the context of this algorithm, we treat things as a distribution if // the flag is set AND the data are not dimensionless @@ -271,7 +271,7 @@ void ConvertUnits::setupMemberVariables( * @param inputWS The input workspace */ API::MatrixWorkspace_sptr ConvertUnits::setupOutputWorkspace( - const API::MatrixWorkspace_const_sptr inputWS) { + const API::MatrixWorkspace_const_sptr &inputWS) { MatrixWorkspace_sptr outputWS = getProperty("OutputWorkspace"); // If input and output workspaces are NOT the same, create a new workspace @@ -328,7 +328,7 @@ void ConvertUnits::storeEModeOnWorkspace(API::MatrixWorkspace_sptr outputWS) { * @returns A shared pointer to the output workspace */ MatrixWorkspace_sptr -ConvertUnits::convertQuickly(API::MatrixWorkspace_const_sptr inputWS, +ConvertUnits::convertQuickly(const API::MatrixWorkspace_const_sptr &inputWS, const double &factor, const double &power) { Progress prog(this, 0.2, 1.0, m_numberOfSpectra); auto numberOfSpectra_i = @@ -603,7 +603,7 @@ ConvertUnits::convertViaTOF(Kernel::Unit_const_sptr fromUnit, /// Calls Rebin as a Child Algorithm to align the bins API::MatrixWorkspace_sptr -ConvertUnits::alignBins(API::MatrixWorkspace_sptr workspace) { +ConvertUnits::alignBins(const API::MatrixWorkspace_sptr &workspace) { if (communicator().size() != 1) throw std::runtime_error( "ConvertUnits: Parallel support for aligning bins not implemented."); @@ -623,7 +623,7 @@ ConvertUnits::alignBins(API::MatrixWorkspace_sptr workspace) { /// The Rebin parameters should cover the full range of the converted unit, /// with the same number of bins const std::vector<double> ConvertUnits::calculateRebinParams( - const API::MatrixWorkspace_const_sptr workspace) const { + const API::MatrixWorkspace_const_sptr &workspace) const { const auto &spectrumInfo = workspace->spectrumInfo(); // Need to loop round and find the full range double XMin = DBL_MAX, XMax = DBL_MIN; @@ -650,7 +650,7 @@ const std::vector<double> ConvertUnits::calculateRebinParams( /** Reverses the workspace if X values are in descending order * @param WS The workspace to operate on */ -void ConvertUnits::reverse(API::MatrixWorkspace_sptr WS) { +void ConvertUnits::reverse(const API::MatrixWorkspace_sptr &WS) { EventWorkspace_sptr eventWS = boost::dynamic_pointer_cast<EventWorkspace>(WS); auto isInputEvents = static_cast<bool>(eventWS); size_t numberOfSpectra = WS->getNumberHistograms(); @@ -700,7 +700,7 @@ void ConvertUnits::reverse(API::MatrixWorkspace_sptr WS) { * @return The workspace after bins have been removed */ API::MatrixWorkspace_sptr ConvertUnits::removeUnphysicalBins( - const Mantid::API::MatrixWorkspace_const_sptr workspace) { + const Mantid::API::MatrixWorkspace_const_sptr &workspace) { MatrixWorkspace_sptr result; const auto &spectrumInfo = workspace->spectrumInfo(); @@ -786,7 +786,7 @@ API::MatrixWorkspace_sptr ConvertUnits::removeUnphysicalBins( /** Divide by the bin width if workspace is a distribution * @param outputWS The workspace to operate on */ -void ConvertUnits::putBackBinWidth(const API::MatrixWorkspace_sptr outputWS) { +void ConvertUnits::putBackBinWidth(const API::MatrixWorkspace_sptr &outputWS) { const size_t outSize = outputWS->blocksize(); for (size_t i = 0; i < m_numberOfSpectra; ++i) { diff --git a/Framework/Algorithms/src/ConvertUnitsUsingDetectorTable.cpp b/Framework/Algorithms/src/ConvertUnitsUsingDetectorTable.cpp index ffbf9b641d7ba3332b2c76eda1dff17fa56af839..3b107c42bc140a6ae5fc5681a6527ade6659d95f 100644 --- a/Framework/Algorithms/src/ConvertUnitsUsingDetectorTable.cpp +++ b/Framework/Algorithms/src/ConvertUnitsUsingDetectorTable.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/ConvertUnitsUsingDetectorTable.h" diff --git a/Framework/Algorithms/src/CopyDataRange.cpp b/Framework/Algorithms/src/CopyDataRange.cpp index 8942d7235e646277dfabcaf552bfc017f900207c..1697ef5f70d78264c65b6b1c2b41a93fc3f5a932 100644 --- a/Framework/Algorithms/src/CopyDataRange.cpp +++ b/Framework/Algorithms/src/CopyDataRange.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/CopyDataRange.h" @@ -11,6 +11,7 @@ #include "MantidKernel/BoundedValidator.h" #include <algorithm> +#include <utility> using namespace Mantid::API; using namespace Mantid::Kernel; @@ -18,9 +19,9 @@ using namespace Mantid::HistogramData; namespace { -void copyDataRange(MatrixWorkspace_const_sptr inputWorkspace, - MatrixWorkspace_sptr destWorkspace, int const &specMin, - int const &specMax, int const &xMinIndex, +void copyDataRange(const MatrixWorkspace_const_sptr &inputWorkspace, + const MatrixWorkspace_sptr &destWorkspace, + int const &specMin, int const &specMax, int const &xMinIndex, int const &xMaxIndex, int yInsertionIndex, int const &xInsertionIndex) { for (auto specIndex = specMin; specIndex <= specMax; ++specIndex) { @@ -36,17 +37,18 @@ void copyDataRange(MatrixWorkspace_const_sptr inputWorkspace, } } -void copyDataRange(MatrixWorkspace_const_sptr inputWorkspace, - MatrixWorkspace_sptr destWorkspace, int const &specMin, - int const &specMax, double const &xMin, double const &xMax, - int yInsertionIndex, int const &xInsertionIndex) { +void copyDataRange(const MatrixWorkspace_const_sptr &inputWorkspace, + const MatrixWorkspace_sptr &destWorkspace, + int const &specMin, int const &specMax, double const &xMin, + double const &xMax, int yInsertionIndex, + int const &xInsertionIndex) { auto const xMinIndex = static_cast<int>(inputWorkspace->yIndexOfX(xMin, 0, 0.000001)); auto const xMaxIndex = static_cast<int>(inputWorkspace->yIndexOfX(xMax, 0, 0.000001)); - copyDataRange(inputWorkspace, destWorkspace, specMin, specMax, xMinIndex, - xMaxIndex, yInsertionIndex, xInsertionIndex); + copyDataRange(inputWorkspace, std::move(destWorkspace), specMin, specMax, + xMinIndex, xMaxIndex, yInsertionIndex, xInsertionIndex); } } // namespace diff --git a/Framework/Algorithms/src/CopyDetectorMapping.cpp b/Framework/Algorithms/src/CopyDetectorMapping.cpp index 6877f45cdeba6d6008b658d2dd4c12c1a613a89a..fce836dfa7f2e88fdba4a6ba527cb092502ecd1f 100644 --- a/Framework/Algorithms/src/CopyDetectorMapping.cpp +++ b/Framework/Algorithms/src/CopyDetectorMapping.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/Algorithms/src/CopyInstrumentParameters.cpp b/Framework/Algorithms/src/CopyInstrumentParameters.cpp index b8f6837f718a302c50b1797d6c73424ae4b33cfd..fc4c13f3c84ce7b8d04df19583136b53114a0f47 100644 --- a/Framework/Algorithms/src/CopyInstrumentParameters.cpp +++ b/Framework/Algorithms/src/CopyInstrumentParameters.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/CopyInstrumentParameters.h" #include "MantidAPI/MatrixWorkspace.h" diff --git a/Framework/Algorithms/src/CopyLogs.cpp b/Framework/Algorithms/src/CopyLogs.cpp index 681c455ffc18216898179078cbdcb7d41848005d..afe3c33075648995b1613f42adf5743426de5529 100644 --- a/Framework/Algorithms/src/CopyLogs.cpp +++ b/Framework/Algorithms/src/CopyLogs.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/CopyLogs.h" diff --git a/Framework/Algorithms/src/CopySample.cpp b/Framework/Algorithms/src/CopySample.cpp index 76dd0cc31ee52575f63cc04d099512b044460b77..f44a41efe4312f337727bf8383c01a24a8985289 100644 --- a/Framework/Algorithms/src/CopySample.cpp +++ b/Framework/Algorithms/src/CopySample.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/CopySample.h" #include "MantidAPI/IMDEventWorkspace.h" diff --git a/Framework/Algorithms/src/CorelliCrossCorrelate.cpp b/Framework/Algorithms/src/CorelliCrossCorrelate.cpp index 5107ddd2013cf3909276185551f526485cf7f1a6..2916214366385107feb4465ffc8f55176c51b85a 100644 --- a/Framework/Algorithms/src/CorelliCrossCorrelate.cpp +++ b/Framework/Algorithms/src/CorelliCrossCorrelate.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/CorelliCrossCorrelate.h" #include "MantidAPI/InstrumentValidator.h" @@ -157,8 +157,9 @@ void CorelliCrossCorrelate::exec() { int offset_int = getProperty("TimingOffset"); const auto offset = static_cast<int64_t>(offset_int); - for (auto &timing : tdc) - timing += offset; + + std::transform(tdc.begin(), tdc.end(), tdc.begin(), + [offset](auto timing) { return timing + offset; }); // Determine period from chopper frequency. auto motorSpeed = dynamic_cast<TimeSeriesProperty<double> *>( diff --git a/Framework/Algorithms/src/CorrectKiKf.cpp b/Framework/Algorithms/src/CorrectKiKf.cpp index 9cc3b2dc48b7a40598a1162f38dda94193f1a6c8..c4b97099dc2fc3dc5c0859667971677049fc0ba6 100644 --- a/Framework/Algorithms/src/CorrectKiKf.cpp +++ b/Framework/Algorithms/src/CorrectKiKf.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/CorrectKiKf.h" #include "MantidAPI/Run.h" @@ -220,11 +220,10 @@ void CorrectKiKf::execEvent() { PARALLEL_FOR_IF(Kernel::threadSafe(*outputWS)) for (int64_t i = 0; i < numHistograms; ++i) { PARALLEL_START_INTERUPT_REGION - - double Efi = 0; // Now get the detector object for this histogram to check if monitor // or to get Ef for indirect geometry if (emodeStr == "Indirect") { + double Efi = 0; if (efixedProp != EMPTY_DBL()) { Efi = efixedProp; // If a DetectorGroup is present should provide a value as a property @@ -279,7 +278,7 @@ void CorrectKiKf::execEvent() { template <class T> void CorrectKiKf::correctKiKfEventHelper(std::vector<T> &wevector, double efixed, - const std::string emodeStr) { + const std::string &emodeStr) { double Ei, Ef; float kioverkf; typename std::vector<T>::iterator it; diff --git a/Framework/Algorithms/src/CorrectTOFAxis.cpp b/Framework/Algorithms/src/CorrectTOFAxis.cpp index 2ca45ad53307b059eed5752df029123dbc3c9485..c6840afcdee04eb9d86d19c62e35dc39694a7480 100644 --- a/Framework/Algorithms/src/CorrectTOFAxis.cpp +++ b/Framework/Algorithms/src/CorrectTOFAxis.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/CorrectTOFAxis.h" @@ -105,7 +105,7 @@ template <typename Map> size_t mapIndex(const int index, const Map &indexMap) { * @return A workspace index corresponding to index. */ size_t toWorkspaceIndex(const int index, const std::string &indexType, - API::MatrixWorkspace_const_sptr ws) { + const API::MatrixWorkspace_const_sptr &ws) { if (indexType == IndexTypes::DETECTOR_ID) { const auto indexMap = ws->getDetectorIDToWorkspaceIndexMap(); return mapIndex(index, indexMap); @@ -345,7 +345,8 @@ void CorrectTOFAxis::exec() { * corrected workspace. * @param outputWs The corrected workspace */ -void CorrectTOFAxis::useReferenceWorkspace(API::MatrixWorkspace_sptr outputWs) { +void CorrectTOFAxis::useReferenceWorkspace( + const API::MatrixWorkspace_sptr &outputWs) { const auto histogramCount = static_cast<int64_t>(m_referenceWs->getNumberHistograms()); PARALLEL_FOR_IF(threadSafe(*m_referenceWs, *outputWs)) @@ -377,7 +378,8 @@ void CorrectTOFAxis::useReferenceWorkspace(API::MatrixWorkspace_sptr outputWs) { * specifically, also adjusts the 'Ei' and 'wavelength' sample logs. * @param outputWs The corrected workspace */ -void CorrectTOFAxis::correctManually(API::MatrixWorkspace_sptr outputWs) { +void CorrectTOFAxis::correctManually( + const API::MatrixWorkspace_sptr &outputWs) { const auto &spectrumInfo = m_inputWs->spectrumInfo(); const double l1 = spectrumInfo.l1(); double l2 = 0; diff --git a/Framework/Algorithms/src/CorrectToFile.cpp b/Framework/Algorithms/src/CorrectToFile.cpp index 3490fff15ea786d377ca40d3a862c9db950b22c0..8c426ffa0f5a0121d24041ff1ae316ff8b079137 100644 --- a/Framework/Algorithms/src/CorrectToFile.cpp +++ b/Framework/Algorithms/src/CorrectToFile.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/CorrectToFile.h" #include "MantidAPI/Axis.h" @@ -186,8 +186,8 @@ MatrixWorkspace_sptr CorrectToFile::loadInFile(const std::string &corrFile) { * @throw NotFoundError if requested algorithm requested doesn't exist * @throw runtime_error if algorithm encounters an error */ -void CorrectToFile::doWkspAlgebra(API::MatrixWorkspace_sptr lhs, - API::MatrixWorkspace_sptr rhs, +void CorrectToFile::doWkspAlgebra(const API::MatrixWorkspace_sptr &lhs, + const API::MatrixWorkspace_sptr &rhs, const std::string &algName, API::MatrixWorkspace_sptr &result) { g_log.information() << "Initalising the algorithm " << algName << '\n'; diff --git a/Framework/Algorithms/src/CreateCalFileByNames.cpp b/Framework/Algorithms/src/CreateCalFileByNames.cpp index 03a12ebccd3ca2380041ad05dd7483c2c0eefa13..eec1b78bc26f50776250701c25fb5fc3f6d4dbbe 100644 --- a/Framework/Algorithms/src/CreateCalFileByNames.cpp +++ b/Framework/Algorithms/src/CreateCalFileByNames.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/Algorithms/src/CreateDetectorTable.cpp b/Framework/Algorithms/src/CreateDetectorTable.cpp index c254aab6746ca088582031b502ce5e89af10d122..1e9ad552f9d79fa69fc76a183a7e05980343e2ec 100644 --- a/Framework/Algorithms/src/CreateDetectorTable.cpp +++ b/Framework/Algorithms/src/CreateDetectorTable.cpp @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #include "MantidAlgorithms/CreateDetectorTable.h" using namespace Mantid::API; diff --git a/Framework/Algorithms/src/CreateDummyCalFile.cpp b/Framework/Algorithms/src/CreateDummyCalFile.cpp index 6e0783c073dcc54603ad7337b3041c0d67b2e20c..afa35e62f7bdbe3bc9c14a3b6eae47a8a534512d 100644 --- a/Framework/Algorithms/src/CreateDummyCalFile.cpp +++ b/Framework/Algorithms/src/CreateDummyCalFile.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes @@ -110,9 +110,6 @@ void CreateDummyCalFile::exec() { std::string filename = getProperty("CalFilename"); - // Plan to overwrite file, so do not check if it exists - const bool overwrite = false; - int number = 0; Progress prog(this, 0.0, 0.8, assemblies.size()); while (!assemblies.empty()) // Travel the tree from the instrument point @@ -128,12 +125,7 @@ void CreateDummyCalFile::exec() { currentIComp); if (currentDet.get()) // Is detector { - if (overwrite) // Map will contains udet as the key - instrcalib[currentDet->getID()] = - std::make_pair(number++, top_group); - else // Map will contains the entry number as the key - instrcalib[number++] = - std::make_pair(currentDet->getID(), top_group); + instrcalib[number++] = std::make_pair(currentDet->getID(), top_group); } else // Is an assembly, push in the queue { currentchild = @@ -151,6 +143,8 @@ void CreateDummyCalFile::exec() { prog.report(); } // Write the results in a file + // Plan to overwrite file, so do not check if it exists + const bool overwrite = false; saveGroupingFile(filename, overwrite); progress(0.2); } diff --git a/Framework/Algorithms/src/CreateEPP.cpp b/Framework/Algorithms/src/CreateEPP.cpp index 86f3b7da49d507e6deb033da9728de70b993ad9a..0efb5dc39549f1133941f5dec5dece08eeb8ed12 100644 --- a/Framework/Algorithms/src/CreateEPP.cpp +++ b/Framework/Algorithms/src/CreateEPP.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/CreateEPP.h" @@ -49,7 +49,7 @@ const static std::string STATUS("FitStatus"); * * @param ws The TableWorkspace to add the columns to. */ -void addEPPColumns(API::ITableWorkspace_sptr ws) { +void addEPPColumns(const API::ITableWorkspace_sptr &ws) { ws->addColumn("int", ColumnNames::WS_INDEX); ws->addColumn("double", ColumnNames::PEAK_CENTRE); ws->addColumn("double", ColumnNames::PEAK_CENTRE_ERR); diff --git a/Framework/Algorithms/src/CreateFlatEventWorkspace.cpp b/Framework/Algorithms/src/CreateFlatEventWorkspace.cpp index ebc94a95169a1769c1121feb7a1256550c6502a9..a884f401d915c2d4b695466f19b421e772536dd6 100644 --- a/Framework/Algorithms/src/CreateFlatEventWorkspace.cpp +++ b/Framework/Algorithms/src/CreateFlatEventWorkspace.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/CreateFlatEventWorkspace.h" diff --git a/Framework/Algorithms/src/CreateFloodWorkspace.cpp b/Framework/Algorithms/src/CreateFloodWorkspace.cpp index 5f48e1a79aad0b359f14b230f98ea870f6f6403d..c7099c8ccc6226ccfbe99f822c20cc99ac38ceee 100644 --- a/Framework/Algorithms/src/CreateFloodWorkspace.cpp +++ b/Framework/Algorithms/src/CreateFloodWorkspace.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/CreateFloodWorkspace.h" #include "MantidAPI/FileProperty.h" @@ -129,7 +129,8 @@ std::string CreateFloodWorkspace::getBackgroundFunction() { return funMap.at(getPropertyValue(Prop::BACKGROUND)); } -MatrixWorkspace_sptr CreateFloodWorkspace::integrate(MatrixWorkspace_sptr ws) { +MatrixWorkspace_sptr +CreateFloodWorkspace::integrate(const MatrixWorkspace_sptr &ws) { auto alg = createChildAlgorithm("Integration"); alg->setProperty("InputWorkspace", ws); alg->setProperty("OutputWorkspace", "dummy"); @@ -145,7 +146,8 @@ MatrixWorkspace_sptr CreateFloodWorkspace::integrate(MatrixWorkspace_sptr ws) { return alg->getProperty("OutputWorkspace"); } -MatrixWorkspace_sptr CreateFloodWorkspace::transpose(MatrixWorkspace_sptr ws) { +MatrixWorkspace_sptr +CreateFloodWorkspace::transpose(const MatrixWorkspace_sptr &ws) { auto alg = createChildAlgorithm("Transpose"); alg->setProperty("InputWorkspace", ws); alg->setProperty("OutputWorkspace", "dummy"); diff --git a/Framework/Algorithms/src/CreateGroupingWorkspace.cpp b/Framework/Algorithms/src/CreateGroupingWorkspace.cpp index 8296f960cd61cc0725f80a2f9a7decb0813c37c5..14db984fea74fc7e7ca82163aa94aa3494488eb7 100644 --- a/Framework/Algorithms/src/CreateGroupingWorkspace.cpp +++ b/Framework/Algorithms/src/CreateGroupingWorkspace.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/CreateGroupingWorkspace.h" #include "MantidAPI/FileProperty.h" @@ -19,6 +19,7 @@ #include <boost/algorithm/string/trim.hpp> #include <fstream> #include <queue> +#include <utility> namespace { Mantid::Kernel::Logger g_log("CreateGroupingWorkspace"); @@ -207,10 +208,9 @@ std::map<detid_t, int> readGroupingFile(const std::string &groupingFileName, * @param prog Progress reporter * @returns :: Map of detector IDs to group number */ -std::map<detid_t, int> makeGroupingByNumGroups(const std::string compName, - int numGroups, - Instrument_const_sptr inst, - Progress &prog) { +std::map<detid_t, int> +makeGroupingByNumGroups(const std::string &compName, int numGroups, + const Instrument_const_sptr &inst, Progress &prog) { std::map<detid_t, int> detIDtoGroup; // Get detectors for given instument component @@ -250,14 +250,14 @@ std::map<detid_t, int> makeGroupingByNumGroups(const std::string compName, bool groupnumber(std::string groupi, std::string groupj) { int i = 0; - std::string groupName = groupi; + std::string groupName = std::move(groupi); // Take out the "group" part of the group name and convert to an int groupName.erase( remove_if(groupName.begin(), groupName.end(), std::not_fn(::isdigit)), groupName.end()); Strings::convert(groupName, i); int j = 0; - groupName = groupj; + groupName = std::move(groupj); // Take out the "group" part of the group name and convert to an int groupName.erase( remove_if(groupName.begin(), groupName.end(), std::not_fn(::isdigit)), @@ -276,7 +276,7 @@ bool groupnumber(std::string groupi, std::string groupj) { * @returns:: map of detID to group number */ std::map<detid_t, int> makeGroupingByNames(std::string GroupNames, - Instrument_const_sptr inst, + const Instrument_const_sptr &inst, Progress &prog, bool sortnames) { // This will contain the grouping std::map<detid_t, int> detIDtoGroup; @@ -432,7 +432,6 @@ void CreateGroupingWorkspace::exec() { sortnames = true; GroupNames = ""; int maxRecurseDepth = this->getProperty("MaxRecursionDepth"); - // cppcheck-suppress syntaxError PRAGMA_OMP(parallel for schedule(dynamic, 1) ) for (int num = 0; num < 300; ++num) { diff --git a/Framework/Algorithms/src/CreateLogPropertyTable.cpp b/Framework/Algorithms/src/CreateLogPropertyTable.cpp index b1d149a1124ce88d1bf8627177751b7ab29e3e7c..ab9cda98e3862ba327ba05bdab86b5418123cd9f 100644 --- a/Framework/Algorithms/src/CreateLogPropertyTable.cpp +++ b/Framework/Algorithms/src/CreateLogPropertyTable.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/CreateLogPropertyTable.h" @@ -195,9 +195,12 @@ retrieveMatrixWsList(const std::vector<std::string> &wsNames, // Retrieve pointers to all the child workspaces. std::vector<MatrixWorkspace_sptr> childWsList; childWsList.reserve(childNames.size()); - for (const auto &childName : childNames) { - childWsList.emplace_back(ADS.retrieveWS<MatrixWorkspace>(childName)); - } + + std::transform(childNames.begin(), childNames.end(), + std::back_inserter(childWsList), + [&ADS](const auto &childName) { + return ADS.retrieveWS<MatrixWorkspace>(childName); + }); // Deal with child workspaces according to policy. switch (groupPolicy) { diff --git a/Framework/Algorithms/src/CreateLogTimeCorrection.cpp b/Framework/Algorithms/src/CreateLogTimeCorrection.cpp index 72cb6be94385c175cb0949e7b9af1255385486ce..9eed0c6079e0788f992f916f424545ff9b7a7d81 100644 --- a/Framework/Algorithms/src/CreateLogTimeCorrection.cpp +++ b/Framework/Algorithms/src/CreateLogTimeCorrection.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/CreateLogTimeCorrection.h" #include "MantidAPI/FileProperty.h" @@ -149,7 +149,7 @@ TableWorkspace_sptr CreateLogTimeCorrection::generateCorrectionTable( /** Write correction map to a text file */ void CreateLogTimeCorrection::writeCorrectionToFile( - const string filename, const Geometry::DetectorInfo &detectorInfo, + const string &filename, const Geometry::DetectorInfo &detectorInfo, const std::vector<double> &corrections) const { ofstream ofile; ofile.open(filename.c_str()); diff --git a/Framework/Algorithms/src/CreatePSDBleedMask.cpp b/Framework/Algorithms/src/CreatePSDBleedMask.cpp index 8ec154c6d932feba18f56e7f05990cdbeb7adef6..8b1aba621f7c5bdfa0ab9d455f1c90e87e9d528c 100644 --- a/Framework/Algorithms/src/CreatePSDBleedMask.cpp +++ b/Framework/Algorithms/src/CreatePSDBleedMask.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/CreatePSDBleedMask.h" #include "MantidAPI/Run.h" @@ -201,7 +201,7 @@ void CreatePSDBleedMask::exec() { */ bool CreatePSDBleedMask::performBleedTest( const std::vector<int> &tubeIndices, - API::MatrixWorkspace_const_sptr inputWS, double maxRate, + const API::MatrixWorkspace_const_sptr &inputWS, double maxRate, int numIgnoredPixels) { // Require ordered pixels so that we can define the centre. @@ -263,7 +263,7 @@ bool CreatePSDBleedMask::performBleedTest( * @param workspace :: The workspace to accumulate the masking */ void CreatePSDBleedMask::maskTube(const std::vector<int> &tubeIndices, - API::MatrixWorkspace_sptr workspace) { + const API::MatrixWorkspace_sptr &workspace) { const double deadValue(1.0); // delete the data for (auto tubeIndice : tubeIndices) { workspace->mutableY(tubeIndice)[0] = deadValue; diff --git a/Framework/Algorithms/src/CreatePeaksWorkspace.cpp b/Framework/Algorithms/src/CreatePeaksWorkspace.cpp index fc0f065d5948611db7c6449195f066d3253893ce..fe18664b768fb63329071129a6dcfbf53c99edc1 100644 --- a/Framework/Algorithms/src/CreatePeaksWorkspace.cpp +++ b/Framework/Algorithms/src/CreatePeaksWorkspace.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/CreatePeaksWorkspace.h" #include "MantidAPI/IMDEventWorkspace.h" diff --git a/Framework/Algorithms/src/CreateSampleWorkspace.cpp b/Framework/Algorithms/src/CreateSampleWorkspace.cpp index ea473d62aa0ca2e8a1b9abf184479ae18f5bc1d8..300a2842a67df0f4f8795979075a0ff3345ff693 100644 --- a/Framework/Algorithms/src/CreateSampleWorkspace.cpp +++ b/Framework/Algorithms/src/CreateSampleWorkspace.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/CreateSampleWorkspace.h" #include "MantidAPI/Axis.h" @@ -309,7 +309,7 @@ void CreateSampleWorkspace::addChopperParameters( */ MatrixWorkspace_sptr CreateSampleWorkspace::createHistogramWorkspace( int numPixels, int numBins, int numMonitors, double x0, double binDelta, - Geometry::Instrument_sptr inst, const std::string &functionString, + const Geometry::Instrument_sptr &inst, const std::string &functionString, bool isRandom) { BinEdges x(numBins + 1, LinearGenerator(x0, binDelta)); @@ -330,8 +330,9 @@ MatrixWorkspace_sptr CreateSampleWorkspace::createHistogramWorkspace( /** Create scanning histogram workspace */ MatrixWorkspace_sptr CreateSampleWorkspace::createScanningWorkspace( - int numBins, double x0, double binDelta, Geometry::Instrument_sptr inst, - const std::string &functionString, bool isRandom, int numScanPoints) { + int numBins, double x0, double binDelta, + const Geometry::Instrument_sptr &inst, const std::string &functionString, + bool isRandom, int numScanPoints) { auto builder = ScanningWorkspaceBuilder(inst, numScanPoints, numBins); auto angles = std::vector<double>(); @@ -359,7 +360,7 @@ MatrixWorkspace_sptr CreateSampleWorkspace::createScanningWorkspace( */ EventWorkspace_sptr CreateSampleWorkspace::createEventWorkspace( int numPixels, int numBins, int numMonitors, int numEvents, double x0, - double binDelta, Geometry::Instrument_sptr inst, + double binDelta, const Geometry::Instrument_sptr &inst, const std::string &functionString, bool isRandom) { DateAndTime run_start("2010-01-01T00:00:00"); diff --git a/Framework/Algorithms/src/CreateSingleValuedWorkspace.cpp b/Framework/Algorithms/src/CreateSingleValuedWorkspace.cpp index c5c5756ef621f5afa1ebacdfe5d22702e109faeb..6733f65d4f51b554efdad4e031f7c2e9a06d60dd 100644 --- a/Framework/Algorithms/src/CreateSingleValuedWorkspace.cpp +++ b/Framework/Algorithms/src/CreateSingleValuedWorkspace.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/CreateSingleValuedWorkspace.h" #include "MantidDataObjects/WorkspaceCreation.h" diff --git a/Framework/Algorithms/src/CreateTransmissionWorkspace.cpp b/Framework/Algorithms/src/CreateTransmissionWorkspace.cpp index a5f07e0fbb77fe8c6c36f0d62590457fed3579ba..a4332c2603fa162fd8a4e7fc64ecc3c7053f0e6e 100644 --- a/Framework/Algorithms/src/CreateTransmissionWorkspace.cpp +++ b/Framework/Algorithms/src/CreateTransmissionWorkspace.cpp @@ -1,11 +1,13 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + -#include "MantidAlgorithms/CreateTransmissionWorkspace.h" +#include <utility> + #include "MantidAPI/BoostOptionalToAlgorithmProperty.h" +#include "MantidAlgorithms/CreateTransmissionWorkspace.h" #include "MantidAPI/AnalysisDataService.h" #include "MantidAPI/WorkspaceUnitValidator.h" @@ -154,7 +156,7 @@ MatrixWorkspace_sptr CreateTransmissionWorkspace::makeTransmissionCorrection( const OptionalMinMax &wavelengthMonitorBackgroundInterval, const OptionalMinMax &wavelengthMonitorIntegrationInterval, const OptionalInteger &i0MonitorIndex, - MatrixWorkspace_sptr firstTransmissionRun, + const MatrixWorkspace_sptr &firstTransmissionRun, OptionalMatrixWorkspace_sptr secondTransmissionRun, const OptionalDouble &stitchingStart, const OptionalDouble &stitchingDelta, const OptionalDouble &stitchingEnd, @@ -163,7 +165,7 @@ MatrixWorkspace_sptr CreateTransmissionWorkspace::makeTransmissionCorrection( /*make struct of optional inputs to refactor method arguments*/ /*make a using statements defining OptionalInteger for MonitorIndex*/ auto trans1InLam = - toLam(firstTransmissionRun, processingCommands, i0MonitorIndex, + toLam(std::move(firstTransmissionRun), processingCommands, i0MonitorIndex, wavelengthInterval, wavelengthMonitorBackgroundInterval); MatrixWorkspace_sptr trans1Detector = trans1InLam.get<0>(); MatrixWorkspace_sptr trans1Monitor = trans1InLam.get<1>(); diff --git a/Framework/Algorithms/src/CreateTransmissionWorkspace2.cpp b/Framework/Algorithms/src/CreateTransmissionWorkspace2.cpp index a6afaed45819d50804ddd683cd0415e02d8c284e..bf6b018ee136954709a06d22ac9d7b870ace1616 100644 --- a/Framework/Algorithms/src/CreateTransmissionWorkspace2.cpp +++ b/Framework/Algorithms/src/CreateTransmissionWorkspace2.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/CreateTransmissionWorkspace2.h" @@ -183,7 +183,7 @@ void CreateTransmissionWorkspace2::exec() { * @return :: the normalized workspace in Wavelength */ MatrixWorkspace_sptr CreateTransmissionWorkspace2::normalizeDetectorsByMonitors( - const MatrixWorkspace_sptr IvsTOF) { + const MatrixWorkspace_sptr &IvsTOF) { // Detector workspace MatrixWorkspace_sptr detectorWS = makeDetectorWS(IvsTOF); @@ -249,7 +249,7 @@ CreateTransmissionWorkspace2::getRunNumber(std::string const &propertyName) { * @param ws A workspace to store. */ void CreateTransmissionWorkspace2::setOutputTransmissionRun( - int which, MatrixWorkspace_sptr ws) { + int which, const MatrixWorkspace_sptr &ws) { bool const isDebug = getProperty("Debug"); if (!isDebug) return; @@ -291,7 +291,7 @@ void CreateTransmissionWorkspace2::setOutputTransmissionRun( * be found */ void CreateTransmissionWorkspace2::setOutputWorkspace( - API::MatrixWorkspace_sptr ws) { + const API::MatrixWorkspace_sptr &ws) { // If the user provided an output name, just set the value if (!isDefault("OutputWorkspace")) { setProperty("OutputWorkspace", ws); diff --git a/Framework/Algorithms/src/CreateTransmissionWorkspaceAuto.cpp b/Framework/Algorithms/src/CreateTransmissionWorkspaceAuto.cpp index f1a74ee83f2418258d141cf684952fcc9de82c4c..132efa67800b69173914c73520fef9b296d7ae90 100644 --- a/Framework/Algorithms/src/CreateTransmissionWorkspaceAuto.cpp +++ b/Framework/Algorithms/src/CreateTransmissionWorkspaceAuto.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /*WIKI* Facade over [[CreateTransmissionWorkspace]]. Pull numeric parameters out of the @@ -240,7 +240,7 @@ void CreateTransmissionWorkspaceAuto::exec() { template <typename T> boost::optional<T> -CreateTransmissionWorkspaceAuto::isSet(std::string propName) const { +CreateTransmissionWorkspaceAuto::isSet(const std::string &propName) const { auto algProperty = this->getPointerToProperty(propName); if (algProperty->isDefault()) { return boost::optional<T>(); diff --git a/Framework/Algorithms/src/CreateTransmissionWorkspaceAuto2.cpp b/Framework/Algorithms/src/CreateTransmissionWorkspaceAuto2.cpp index f782740a917fa9cf6fb7a06bb58268c12fe36bb4..10e18640ecc943bbdb3418f61179aac3fde17d4f 100644 --- a/Framework/Algorithms/src/CreateTransmissionWorkspaceAuto2.cpp +++ b/Framework/Algorithms/src/CreateTransmissionWorkspaceAuto2.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/CreateTransmissionWorkspaceAuto2.h" #include "MantidAPI/BoostOptionalToAlgorithmProperty.h" diff --git a/Framework/Algorithms/src/CreateUserDefinedBackground.cpp b/Framework/Algorithms/src/CreateUserDefinedBackground.cpp index b558847050d0153abf5e9fe9466795c542d85e4f..f1c3f584183fe64de7a969513a78ef403f671a97 100644 --- a/Framework/Algorithms/src/CreateUserDefinedBackground.cpp +++ b/Framework/Algorithms/src/CreateUserDefinedBackground.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/CreateUserDefinedBackground.h" #include "MantidAPI/Axis.h" diff --git a/Framework/Algorithms/src/CreateWorkspace.cpp b/Framework/Algorithms/src/CreateWorkspace.cpp index fd3a1730863bc8393603ae0f584d3ff9336fb32b..19a446073fed989758ae85d0df9d232478518822 100644 --- a/Framework/Algorithms/src/CreateWorkspace.cpp +++ b/Framework/Algorithms/src/CreateWorkspace.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/CreateWorkspace.h" diff --git a/Framework/Algorithms/src/CropToComponent.cpp b/Framework/Algorithms/src/CropToComponent.cpp index bd73a0921462ac6f627160be4309993ed4d64db4..5ff7697d73928be3fcebc835d1fce699416754c4 100644 --- a/Framework/Algorithms/src/CropToComponent.cpp +++ b/Framework/Algorithms/src/CropToComponent.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/CropToComponent.h" #include "MantidAPI/AlgorithmManager.h" diff --git a/Framework/Algorithms/src/CropWorkspace.cpp b/Framework/Algorithms/src/CropWorkspace.cpp index 043242bb420740b360056ea4fd86bc088caa9261..aee007c599045abf82f9f65599d8abdafe931a58 100644 --- a/Framework/Algorithms/src/CropWorkspace.cpp +++ b/Framework/Algorithms/src/CropWorkspace.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/CropWorkspace.h" #include "MantidAPI/MatrixWorkspace.h" diff --git a/Framework/Algorithms/src/CrossCorrelate.cpp b/Framework/Algorithms/src/CrossCorrelate.cpp index 761fded612431eea5e9c465d78ae524a1987b4b0..ee7f169f28b2ed0246da823a85ac5522f55457ec 100644 --- a/Framework/Algorithms/src/CrossCorrelate.cpp +++ b/Framework/Algorithms/src/CrossCorrelate.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/Algorithms/src/CuboidGaugeVolumeAbsorption.cpp b/Framework/Algorithms/src/CuboidGaugeVolumeAbsorption.cpp index ef9e0bed651b0f23fa3b3d371e0af125114f26d7..87d79f21611ca0104d6fb0fbcc6627b158d6f660 100644 --- a/Framework/Algorithms/src/CuboidGaugeVolumeAbsorption.cpp +++ b/Framework/Algorithms/src/CuboidGaugeVolumeAbsorption.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/Algorithms/src/CylinderAbsorption.cpp b/Framework/Algorithms/src/CylinderAbsorption.cpp index 8809a115fd1483433c2f380df2b90c62c91fc779..8239e9ecd793938afcbf317735706843fdf98c32 100644 --- a/Framework/Algorithms/src/CylinderAbsorption.cpp +++ b/Framework/Algorithms/src/CylinderAbsorption.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/CylinderAbsorption.h" #include "MantidAPI/MatrixWorkspace.h" diff --git a/Framework/Algorithms/src/DeadTimeCorrection.cpp b/Framework/Algorithms/src/DeadTimeCorrection.cpp index 2e5cd9ebebfbc8295b6bf6e3eb4ddf30503f4088..52fd0df5579303c3d3e217048956ad3198309300 100644 --- a/Framework/Algorithms/src/DeadTimeCorrection.cpp +++ b/Framework/Algorithms/src/DeadTimeCorrection.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/DeadTimeCorrection.h" #include "MantidAPI/FileProperty.h" diff --git a/Framework/Algorithms/src/DeleteLog.cpp b/Framework/Algorithms/src/DeleteLog.cpp index 1d413e3241ef46d6e804e81c00dc086157f57d5a..fd963397ef39fc7fac435aba5092b1d334055636 100644 --- a/Framework/Algorithms/src/DeleteLog.cpp +++ b/Framework/Algorithms/src/DeleteLog.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/DeleteLog.h" #include "MantidAPI/MatrixWorkspace.h" diff --git a/Framework/Algorithms/src/DeleteWorkspace.cpp b/Framework/Algorithms/src/DeleteWorkspace.cpp index fab355d9eba340e08103da0115912c8567d1aa7a..825f2527b6ce2d4767ad30c9060224fa32b80d03 100644 --- a/Framework/Algorithms/src/DeleteWorkspace.cpp +++ b/Framework/Algorithms/src/DeleteWorkspace.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/DeleteWorkspace.h" #include "MantidAPI/AnalysisDataService.h" diff --git a/Framework/Algorithms/src/DeleteWorkspaces.cpp b/Framework/Algorithms/src/DeleteWorkspaces.cpp index 707c399e422d2a912aeb800c11105419f8a9a7e3..d1de15690cc7266fe58725c176ea4ce938e9e744 100644 --- a/Framework/Algorithms/src/DeleteWorkspaces.cpp +++ b/Framework/Algorithms/src/DeleteWorkspaces.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/DeleteWorkspaces.h" #include "MantidAPI/ADSValidator.h" diff --git a/Framework/Algorithms/src/DetectorDiagnostic.cpp b/Framework/Algorithms/src/DetectorDiagnostic.cpp index 19e0a0932ece80ebe0095458488cfff811bc21eb..816779e650d9caf470a175c147bc72aa836a483f 100644 --- a/Framework/Algorithms/src/DetectorDiagnostic.cpp +++ b/Framework/Algorithms/src/DetectorDiagnostic.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/DetectorDiagnostic.h" #include "MantidAPI/SpectrumInfo.h" @@ -376,8 +376,8 @@ void DetectorDiagnostic::exec() { * @param inputWS : the workspace to mask * @param maskWS : the workspace containing the masking information */ -void DetectorDiagnostic::applyMask(API::MatrixWorkspace_sptr inputWS, - API::MatrixWorkspace_sptr maskWS) { +void DetectorDiagnostic::applyMask(const API::MatrixWorkspace_sptr &inputWS, + const API::MatrixWorkspace_sptr &maskWS) { IAlgorithm_sptr maskAlg = createChildAlgorithm("MaskDetectors"); // should set progress bar maskAlg->setProperty("Workspace", inputWS); @@ -394,7 +394,7 @@ void DetectorDiagnostic::applyMask(API::MatrixWorkspace_sptr inputWS, * @return : the resulting mask from the checks */ API::MatrixWorkspace_sptr -DetectorDiagnostic::doDetVanTest(API::MatrixWorkspace_sptr inputWS, +DetectorDiagnostic::doDetVanTest(const API::MatrixWorkspace_sptr &inputWS, int &nFails) { MatrixWorkspace_sptr localMask; @@ -483,7 +483,7 @@ DetectorDiagnostic::DetectorDiagnostic() * @returns A workspace containing the integrated counts */ MatrixWorkspace_sptr DetectorDiagnostic::integrateSpectra( - MatrixWorkspace_sptr inputWS, const int indexMin, const int indexMax, + const MatrixWorkspace_sptr &inputWS, const int indexMin, const int indexMax, const double lower, const double upper, const bool outputWorkspace2D) { g_log.debug() << "Integrating input spectra.\n"; // If the input spectra only has one bin, assume it has been integrated @@ -525,8 +525,8 @@ MatrixWorkspace_sptr DetectorDiagnostic::integrateSpectra( * @param inputWS The workspace to initialize from. The instrument is copied *from this. */ -DataObjects::MaskWorkspace_sptr -DetectorDiagnostic::generateEmptyMask(API::MatrixWorkspace_const_sptr inputWS) { +DataObjects::MaskWorkspace_sptr DetectorDiagnostic::generateEmptyMask( + const API::MatrixWorkspace_const_sptr &inputWS) { // Create a new workspace for the results, copy from the input to ensure that // we copy over the instrument and current masking auto maskWS = @@ -547,7 +547,7 @@ DetectorDiagnostic::makeInstrumentMap(const API::MatrixWorkspace &countsWS) { * */ std::vector<std::vector<size_t>> -DetectorDiagnostic::makeMap(API::MatrixWorkspace_sptr countsWS) { +DetectorDiagnostic::makeMap(const API::MatrixWorkspace_sptr &countsWS) { std::multimap<Mantid::Geometry::ComponentID, size_t> mymap; Geometry::Instrument_const_sptr instrument = countsWS->getInstrument(); diff --git a/Framework/Algorithms/src/DetectorEfficiencyCor.cpp b/Framework/Algorithms/src/DetectorEfficiencyCor.cpp index e34f7283479e799c45376d2d35b9b95d52f502df..1a297715a64168d4172c829c72d98e7f5a9c90ea 100644 --- a/Framework/Algorithms/src/DetectorEfficiencyCor.cpp +++ b/Framework/Algorithms/src/DetectorEfficiencyCor.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/DetectorEfficiencyCor.h" #include "MantidAPI/Axis.h" diff --git a/Framework/Algorithms/src/DetectorEfficiencyCorUser.cpp b/Framework/Algorithms/src/DetectorEfficiencyCorUser.cpp index 32dcdcf18cac54a5b36429b2817f463d9ac57f55..7593b59b3f2a0745666eb6a918991e30fb9f76e5 100644 --- a/Framework/Algorithms/src/DetectorEfficiencyCorUser.cpp +++ b/Framework/Algorithms/src/DetectorEfficiencyCorUser.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/DetectorEfficiencyCorUser.h" #include "MantidAPI/HistogramValidator.h" diff --git a/Framework/Algorithms/src/DetectorEfficiencyVariation.cpp b/Framework/Algorithms/src/DetectorEfficiencyVariation.cpp index d69119cbfdef061a6612c9f21a8f8eb67a2820cf..cba50b3442bef9daebb8d77a581afc220e176cff 100644 --- a/Framework/Algorithms/src/DetectorEfficiencyVariation.cpp +++ b/Framework/Algorithms/src/DetectorEfficiencyVariation.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/DetectorEfficiencyVariation.h" #include "MantidAPI/HistogramValidator.h" @@ -187,8 +187,8 @@ void DetectorEfficiencyVariation::retrieveProperties( * @return number of detectors for which tests failed */ int DetectorEfficiencyVariation::doDetectorTests( - API::MatrixWorkspace_const_sptr counts1, - API::MatrixWorkspace_const_sptr counts2, const double average, + const API::MatrixWorkspace_const_sptr &counts1, + const API::MatrixWorkspace_const_sptr &counts2, const double average, double variation) { // DIAG in libISIS did this. A variation of less than 1 doesn't make sense in // this algorithm diff --git a/Framework/Algorithms/src/DiffractionEventCalibrateDetectors.cpp b/Framework/Algorithms/src/DiffractionEventCalibrateDetectors.cpp index 42e2121ad4e4ae67dd100c250dad87d8ad43d75e..de4557eec625df285d7391efc920046c35d6705a 100644 --- a/Framework/Algorithms/src/DiffractionEventCalibrateDetectors.cpp +++ b/Framework/Algorithms/src/DiffractionEventCalibrateDetectors.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/DiffractionEventCalibrateDetectors.h" #include "MantidAPI/AnalysisDataService.h" @@ -84,7 +84,7 @@ static double gsl_costFunction(const gsl_vector *v, void *params) { void DiffractionEventCalibrateDetectors::movedetector( double x, double y, double z, double rotx, double roty, double rotz, - std::string detname, EventWorkspace_sptr inputW) { + const std::string &detname, const EventWorkspace_sptr &inputW) { IAlgorithm_sptr alg1 = createChildAlgorithm("MoveInstrumentComponent"); alg1->setProperty<EventWorkspace_sptr>("Workspace", inputW); @@ -145,8 +145,9 @@ void DiffractionEventCalibrateDetectors::movedetector( double DiffractionEventCalibrateDetectors::intensity( double x, double y, double z, double rotx, double roty, double rotz, - std::string detname, std::string inname, std::string outname, - std::string peakOpt, std::string rb_param, std::string groupWSName) { + const std::string &detname, const std::string &inname, + const std::string &outname, const std::string &peakOpt, + const std::string &rb_param, const std::string &groupWSName) { EventWorkspace_sptr inputW = boost::dynamic_pointer_cast<EventWorkspace>( AnalysisDataService::Instance().retrieve(inname)); diff --git a/Framework/Algorithms/src/DiffractionFocussing.cpp b/Framework/Algorithms/src/DiffractionFocussing.cpp index 5e522dc13e1c7cddbae5891f07296b2f54737889..94c575cc38c61dedb943269f0443cce7d80724b5 100644 --- a/Framework/Algorithms/src/DiffractionFocussing.cpp +++ b/Framework/Algorithms/src/DiffractionFocussing.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/DiffractionFocussing.h" #include "MantidAPI/Axis.h" @@ -241,7 +241,7 @@ void DiffractionFocussing::calculateRebinParams( * @throws FileError if can't read the file */ std::multimap<int64_t, int64_t> -DiffractionFocussing::readGroupingFile(std::string groupingFileName) { +DiffractionFocussing::readGroupingFile(const std::string &groupingFileName) { std::ifstream grFile(groupingFileName.c_str()); if (!grFile) { g_log.error() << "Unable to open grouping file " << groupingFileName diff --git a/Framework/Algorithms/src/DiffractionFocussing2.cpp b/Framework/Algorithms/src/DiffractionFocussing2.cpp index f433942af3208ef08dc4f9ebae55c87c9fe98a68..9444e68fa4a1f5bafa614f234e02e9047297eeae 100644 --- a/Framework/Algorithms/src/DiffractionFocussing2.cpp +++ b/Framework/Algorithms/src/DiffractionFocussing2.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/DiffractionFocussing2.h" #include "MantidAPI/Axis.h" @@ -590,11 +590,10 @@ void DiffractionFocussing2::determineRebinParameters() { nGroups = group2minmax.size(); // Number of unique groups - double Xmin, Xmax, step; const int64_t xPoints = nPoints + 1; - // Iterator over all groups to create the new X vectors - for (gpit = group2minmax.begin(); gpit != group2minmax.end(); gpit++) { + for (gpit = group2minmax.begin(); gpit != group2minmax.end(); ++gpit) { + double Xmin, Xmax, step; Xmin = (gpit->second).first; Xmax = (gpit->second).second; diff --git a/Framework/Algorithms/src/DirectILLTubeBackground.cpp b/Framework/Algorithms/src/DirectILLTubeBackground.cpp index 8bbe574be6861d6d12f723be46f3fe93036c7ed8..488fd51fb3de11903911ef1a1ce2ff18c1ee6d47 100644 --- a/Framework/Algorithms/src/DirectILLTubeBackground.cpp +++ b/Framework/Algorithms/src/DirectILLTubeBackground.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/DirectILLTubeBackground.h" diff --git a/Framework/Algorithms/src/Divide.cpp b/Framework/Algorithms/src/Divide.cpp index 2d3dd9d814cea793b0b1fd56148fb1ae2e3efc25..f4328182e2b30a8e889270fe9540337d14decf8c 100644 --- a/Framework/Algorithms/src/Divide.cpp +++ b/Framework/Algorithms/src/Divide.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/Divide.h" diff --git a/Framework/Algorithms/src/EQSANSCorrectFrame.cpp b/Framework/Algorithms/src/EQSANSCorrectFrame.cpp index dfff7a6373839ffd466b48d7817d6edb2ef63e28..b7cebbb4dec62beba0e4382b054a5078f1db1ed2 100644 --- a/Framework/Algorithms/src/EQSANSCorrectFrame.cpp +++ b/Framework/Algorithms/src/EQSANSCorrectFrame.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/EQSANSCorrectFrame.h" #include "MantidAPI/SpectrumInfo.h" @@ -95,11 +95,11 @@ void EQSANSCorrectFrame::exec() { double newTOF = tof + m_framesOffsetTime; // TOF values smaller than that of the fastest neutrons have been // 'folded' by the data acquisition system. They must be shifted - double minTOF = m_minTOF * pathToPixelFactor; - if (newTOF < minTOF) + double scaledMinTOF = m_minTOF * pathToPixelFactor; + if (newTOF < scaledMinTOF) newTOF += m_frameWidth; // Events from the skipped pulse are delayed by one pulse period - if (m_isFrameSkipping && newTOF > minTOF + m_pulsePeriod) + if (m_isFrameSkipping && newTOF > scaledMinTOF + m_pulsePeriod) newTOF += m_pulsePeriod; return newTOF; } diff --git a/Framework/Algorithms/src/EQSANSResolution.cpp b/Framework/Algorithms/src/EQSANSResolution.cpp index 2f83955aacdaf254e63fa6eba70431bf06b2bc1a..345b3518b29691582c60affc53aa6af3bbfe627e 100644 --- a/Framework/Algorithms/src/EQSANSResolution.cpp +++ b/Framework/Algorithms/src/EQSANSResolution.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/Algorithms/src/EQSANSTofStructure.cpp b/Framework/Algorithms/src/EQSANSTofStructure.cpp index 4e88f7fe61af2bce3ec11eea634ce0f6b5ce9358..b7c89f3708e672944c39092f05946a29a03f28e8 100644 --- a/Framework/Algorithms/src/EQSANSTofStructure.cpp +++ b/Framework/Algorithms/src/EQSANSTofStructure.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/EQSANSTofStructure.h" #include "MantidAPI/Run.h" @@ -118,7 +118,7 @@ void EQSANSTofStructure::exec() { } void EQSANSTofStructure::execEvent( - Mantid::DataObjects::EventWorkspace_sptr inputWS, double threshold, + const Mantid::DataObjects::EventWorkspace_sptr &inputWS, double threshold, double frame_offset, double tof_frame_width, double tmp_frame_width, bool frame_skipping) { const size_t numHists = inputWS->getNumberHistograms(); @@ -190,8 +190,9 @@ void EQSANSTofStructure::execEvent( PARALLEL_CHECK_INTERUPT_REGION } -double EQSANSTofStructure::getTofOffset(EventWorkspace_const_sptr inputWS, - bool frame_skipping) { +double +EQSANSTofStructure::getTofOffset(const EventWorkspace_const_sptr &inputWS, + bool frame_skipping) { //# Storage for chopper information read from the logs double chopper_set_phase[4] = {0, 0, 0, 0}; double chopper_speed[4] = {0, 0, 0, 0}; diff --git a/Framework/Algorithms/src/EditInstrumentGeometry.cpp b/Framework/Algorithms/src/EditInstrumentGeometry.cpp index 576988751432e9c6772ddf54da85b6a9c3fd94c7..c8af7a977a7a9b6abbb4da7de0b638dbd862ae34 100644 --- a/Framework/Algorithms/src/EditInstrumentGeometry.cpp +++ b/Framework/Algorithms/src/EditInstrumentGeometry.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/EditInstrumentGeometry.h" #include "MantidAPI/ISpectrum.h" diff --git a/Framework/Algorithms/src/ElasticWindow.cpp b/Framework/Algorithms/src/ElasticWindow.cpp index 974af35005303419c282dee8442bff71c230b5d7..35747277b53a309623967b2872e87aee57736a32 100644 --- a/Framework/Algorithms/src/ElasticWindow.cpp +++ b/Framework/Algorithms/src/ElasticWindow.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/Algorithms/src/EstimateDivergence.cpp b/Framework/Algorithms/src/EstimateDivergence.cpp index 0a71058733e36aa5a8374025ab6c3c9fb3cfaa7b..55424d56bfb4baa8b69a8659942cb0b81eee25da 100644 --- a/Framework/Algorithms/src/EstimateDivergence.cpp +++ b/Framework/Algorithms/src/EstimateDivergence.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/EstimateDivergence.h" #include "MantidAPI/MatrixWorkspace.h" diff --git a/Framework/Algorithms/src/EstimateResolutionDiffraction.cpp b/Framework/Algorithms/src/EstimateResolutionDiffraction.cpp index 39e117600b1d1a44b65155a6d33666aec21f5d19..1f7c0305e32ec996ccb006f2bb81bb4c331cbc29 100644 --- a/Framework/Algorithms/src/EstimateResolutionDiffraction.cpp +++ b/Framework/Algorithms/src/EstimateResolutionDiffraction.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/EstimateResolutionDiffraction.h" #include "MantidAPI/MatrixWorkspace.h" @@ -96,8 +96,6 @@ void EstimateResolutionDiffraction::init() { "Workspaces created showing the various resolution terms"); } -/** - */ void EstimateResolutionDiffraction::exec() { processAlgProperties(); @@ -132,8 +130,6 @@ void EstimateResolutionDiffraction::exec() { setProperty("PartialResolutionWorkspaces", partialsGroup); } -/** - */ void EstimateResolutionDiffraction::processAlgProperties() { m_inputWS = getProperty("InputWorkspace"); m_divergenceWS = getProperty("DivergenceWorkspace"); @@ -167,8 +163,6 @@ double EstimateResolutionDiffraction::getWavelength() { return cwltimeseries->timeAverageValue(); } -/** - */ void EstimateResolutionDiffraction::retrieveInstrumentParameters() { double centrewavelength = getWavelength(); g_log.notice() << "Centre wavelength = " << centrewavelength << " Angstrom\n"; @@ -181,8 +175,6 @@ void EstimateResolutionDiffraction::retrieveInstrumentParameters() { g_log.notice() << "Centre neutron velocity = " << m_centreVelocity << "\n"; } -/** - */ void EstimateResolutionDiffraction::estimateDetectorResolution() { const auto &spectrumInfo = m_inputWS->spectrumInfo(); const auto l1 = spectrumInfo.l1(); diff --git a/Framework/Algorithms/src/EventWorkspaceAccess.cpp b/Framework/Algorithms/src/EventWorkspaceAccess.cpp index ccc0e57bc82dba1a3c49f42879b5f0a3a83f32e4..9cf03ee1fc8cee80a3da7561b4975b4b2b44b647 100644 --- a/Framework/Algorithms/src/EventWorkspaceAccess.cpp +++ b/Framework/Algorithms/src/EventWorkspaceAccess.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/EventWorkspaceAccess.h" diff --git a/Framework/Algorithms/src/Exponential.cpp b/Framework/Algorithms/src/Exponential.cpp index 641eee70bccefbf90569780392b86ae2933a47df..5161d710620eac1435db0d1c1016b9ef6c0e6afc 100644 --- a/Framework/Algorithms/src/Exponential.cpp +++ b/Framework/Algorithms/src/Exponential.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/Algorithms/src/ExponentialCorrection.cpp b/Framework/Algorithms/src/ExponentialCorrection.cpp index 75258d6b1e9b481ca9a7c486c4346a659e7a49bc..626c9284c99dbc35eb8d0e30bce6b8131b1ed074 100644 --- a/Framework/Algorithms/src/ExponentialCorrection.cpp +++ b/Framework/Algorithms/src/ExponentialCorrection.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/Algorithms/src/ExportTimeSeriesLog.cpp b/Framework/Algorithms/src/ExportTimeSeriesLog.cpp index 71762b96f67ed2f6168d6a8803d0c39b0c5e948f..8b373182922ca145651ee606d0a179d342707147 100644 --- a/Framework/Algorithms/src/ExportTimeSeriesLog.cpp +++ b/Framework/Algorithms/src/ExportTimeSeriesLog.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/ExportTimeSeriesLog.h" #include "MantidAPI/Axis.h" @@ -131,7 +131,7 @@ void ExportTimeSeriesLog::exec() { * @param cal_first_deriv :: flag to calcualte the first derivative */ void ExportTimeSeriesLog::exportLog(const std::string &logname, - const std::string timeunit, + const std::string &timeunit, const double &starttime, const double &stoptime, const bool exportepoch, bool outputeventws, diff --git a/Framework/Algorithms/src/ExtractFFTSpectrum.cpp b/Framework/Algorithms/src/ExtractFFTSpectrum.cpp index cbf168d7fce9f2c554f37eac85e7cbd380c6e66d..c1d03e4821fce208fa0c2221a95b196ff4d7dc20 100644 --- a/Framework/Algorithms/src/ExtractFFTSpectrum.cpp +++ b/Framework/Algorithms/src/ExtractFFTSpectrum.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/Algorithms/src/ExtractMask.cpp b/Framework/Algorithms/src/ExtractMask.cpp index 97a7b5361944f3c3b27bb67b30f5f552b07b58da..b0fba6e963c00e54577cf2ba6ef7e1475fd3e975 100644 --- a/Framework/Algorithms/src/ExtractMask.cpp +++ b/Framework/Algorithms/src/ExtractMask.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/ExtractMask.h" #include "MantidAPI/SpectrumInfo.h" diff --git a/Framework/Algorithms/src/ExtractMaskToTable.cpp b/Framework/Algorithms/src/ExtractMaskToTable.cpp index 5537f5ef7a646de8aff8be3785f6de5e3d742235..d3fbe14f280df1eefe255a5e907734678c30a64e 100644 --- a/Framework/Algorithms/src/ExtractMaskToTable.cpp +++ b/Framework/Algorithms/src/ExtractMaskToTable.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/ExtractMaskToTable.h" #include "MantidAPI/TableRow.h" @@ -124,7 +124,7 @@ void ExtractMaskToTable::exec() { * @returns :: vector of detector IDs that are masked */ std::vector<detid_t> ExtractMaskToTable::parseMaskTable( - DataObjects::TableWorkspace_sptr masktablews) { + const DataObjects::TableWorkspace_sptr &masktablews) { // Output vector std::vector<detid_t> maskeddetectorids; @@ -174,7 +174,7 @@ std::vector<detid_t> ExtractMaskToTable::parseMaskTable( * @returns :: vector genrated from input string containing the list */ std::vector<detid_t> -ExtractMaskToTable::parseStringToVector(std::string liststr) { +ExtractMaskToTable::parseStringToVector(const std::string &liststr) { std::vector<detid_t> detidvec; // Use ArrayProperty to parse the list @@ -264,7 +264,7 @@ std::vector<detid_t> ExtractMaskToTable::extractMaskFromMaskWorkspace() { * @param targetWS :: table workspace to which the content is copied; */ void ExtractMaskToTable::copyTableWorkspaceContent( - TableWorkspace_sptr sourceWS, TableWorkspace_sptr targetWS) { + const TableWorkspace_sptr &sourceWS, const TableWorkspace_sptr &targetWS) { // Compare the column names. They must be exactly the same vector<string> sourcecolnames = sourceWS->getColumnNames(); vector<string> targetcolnames = targetWS->getColumnNames(); @@ -310,7 +310,7 @@ void ExtractMaskToTable::copyTableWorkspaceContent( * @param xmax :: maximum x * @param prevmaskedids :: vector of previous masked detector IDs */ -void ExtractMaskToTable::addToTableWorkspace(TableWorkspace_sptr outws, +void ExtractMaskToTable::addToTableWorkspace(const TableWorkspace_sptr &outws, vector<detid_t> maskeddetids, double xmin, double xmax, vector<detid_t> prevmaskedids) { diff --git a/Framework/Algorithms/src/ExtractSingleSpectrum.cpp b/Framework/Algorithms/src/ExtractSingleSpectrum.cpp index 4dff1b3456ee6ed1927f1bd7aff55a7bb2be4f32..0769485bf6b52a20d0e48a825d1d99ff8a9e7acf 100644 --- a/Framework/Algorithms/src/ExtractSingleSpectrum.cpp +++ b/Framework/Algorithms/src/ExtractSingleSpectrum.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/ExtractSingleSpectrum.h" #include "MantidAPI/MatrixWorkspace.h" diff --git a/Framework/Algorithms/src/ExtractSpectra.cpp b/Framework/Algorithms/src/ExtractSpectra.cpp index f8642d4b730c7d7b0f485303e36697171f906166..ca03bf47c08283cd03559b401824c3bfd5bddd18 100644 --- a/Framework/Algorithms/src/ExtractSpectra.cpp +++ b/Framework/Algorithms/src/ExtractSpectra.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/ExtractSpectra.h" #include "MantidAlgorithms/ExtractSpectra2.h" diff --git a/Framework/Algorithms/src/ExtractSpectra2.cpp b/Framework/Algorithms/src/ExtractSpectra2.cpp index 426162060a9a7f2657aba0ca853ac464e39820ee..3aa1ec1ba76ad24ba9519d951edde5e69a2c3ea9 100644 --- a/Framework/Algorithms/src/ExtractSpectra2.cpp +++ b/Framework/Algorithms/src/ExtractSpectra2.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/ExtractSpectra2.h" #include "MantidAPI/Algorithm.tcc" diff --git a/Framework/Algorithms/src/ExtractUnmaskedSpectra.cpp b/Framework/Algorithms/src/ExtractUnmaskedSpectra.cpp index 1c7766c5235517c9a86e8f98cf3c45147bb1fa29..b1b2bfdcb0e9f173ddea75fdcee07c3bff0f1f0c 100644 --- a/Framework/Algorithms/src/ExtractUnmaskedSpectra.cpp +++ b/Framework/Algorithms/src/ExtractUnmaskedSpectra.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/ExtractUnmaskedSpectra.h" #include "MantidAPI/IMaskWorkspace.h" diff --git a/Framework/Algorithms/src/FFT.cpp b/Framework/Algorithms/src/FFT.cpp index d0fe6ddd3102519d840f739a365d9852e313c3ed..b22277d244fd07532b01f1057eed82f31e48eba1 100644 --- a/Framework/Algorithms/src/FFT.cpp +++ b/Framework/Algorithms/src/FFT.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/Algorithms/src/FFTDerivative.cpp b/Framework/Algorithms/src/FFTDerivative.cpp index 9872f527ba835e970e2e6fc78fe0762d49dd017a..76801b3c6d0d9d6b7dc7def7d9ea44933d54f87a 100644 --- a/Framework/Algorithms/src/FFTDerivative.cpp +++ b/Framework/Algorithms/src/FFTDerivative.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/FFTDerivative.h" #include "MantidAPI/MatrixWorkspace.h" diff --git a/Framework/Algorithms/src/FFTSmooth.cpp b/Framework/Algorithms/src/FFTSmooth.cpp index 26be4b33f599921ff1d3805619fd88a2ef3e6d8a..977bfd35cd143300e4b38efbf6e24c9c82ddcd6f 100644 --- a/Framework/Algorithms/src/FFTSmooth.cpp +++ b/Framework/Algorithms/src/FFTSmooth.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/Algorithms/src/FFTSmooth2.cpp b/Framework/Algorithms/src/FFTSmooth2.cpp index 1806d3e1b328dea26874a6f510aa7282839137f7..e317009cf235a9d6c58e0df9b13ffbdc93d31618 100644 --- a/Framework/Algorithms/src/FFTSmooth2.cpp +++ b/Framework/Algorithms/src/FFTSmooth2.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/FFTSmooth2.h" #include "MantidAPI/MatrixWorkspace.h" diff --git a/Framework/Algorithms/src/FilterBadPulses.cpp b/Framework/Algorithms/src/FilterBadPulses.cpp index 7cb0dbcb49b374df04d89b7cf5072adbc3cbddaa..23ab22e2c6a2acbc6e39b4c04e4a17f529697f01 100644 --- a/Framework/Algorithms/src/FilterBadPulses.cpp +++ b/Framework/Algorithms/src/FilterBadPulses.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/FilterBadPulses.h" #include "MantidAPI/FileProperty.h" diff --git a/Framework/Algorithms/src/FilterByLogValue.cpp b/Framework/Algorithms/src/FilterByLogValue.cpp index 1196599b791a6a0c358593a99c7ff1f4d2e011f2..e58ee91b2828518eec6a8f9b53f0e347508bdd5a 100644 --- a/Framework/Algorithms/src/FilterByLogValue.cpp +++ b/Framework/Algorithms/src/FilterByLogValue.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/FilterByLogValue.h" #include "MantidAPI/Run.h" diff --git a/Framework/Algorithms/src/FilterByTime.cpp b/Framework/Algorithms/src/FilterByTime.cpp index 50869287467ec2a92aba9af456ecb9dc5f965d09..1456571003801522228721bcbba87d27f2d428fc 100644 --- a/Framework/Algorithms/src/FilterByTime.cpp +++ b/Framework/Algorithms/src/FilterByTime.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/FilterByTime.h" #include "MantidAPI/Run.h" diff --git a/Framework/Algorithms/src/FilterByTime2.cpp b/Framework/Algorithms/src/FilterByTime2.cpp index df4e25d8889261b3746adb98171bb0d9ac25b65b..7d9c751fee5cbdd463d153e664bc30e4f4993513 100644 --- a/Framework/Algorithms/src/FilterByTime2.cpp +++ b/Framework/Algorithms/src/FilterByTime2.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/FilterByTime2.h" #include "MantidAPI/WorkspaceProperty.h" diff --git a/Framework/Algorithms/src/FilterByXValue.cpp b/Framework/Algorithms/src/FilterByXValue.cpp index cc0490d2c960d939b9e21e50943099c95cebbbcf..8629edc97914b3c489f429aa585569d450bf9644 100644 --- a/Framework/Algorithms/src/FilterByXValue.cpp +++ b/Framework/Algorithms/src/FilterByXValue.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/FilterByXValue.h" #include "MantidDataObjects/EventWorkspace.h" diff --git a/Framework/Algorithms/src/FilterEvents.cpp b/Framework/Algorithms/src/FilterEvents.cpp index 6441a324fff44ae02ca1bd1894da37aa72628d42..c9eae967b211c264a5025258f18891e5be28b16d 100644 --- a/Framework/Algorithms/src/FilterEvents.cpp +++ b/Framework/Algorithms/src/FilterEvents.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/FilterEvents.h" #include "MantidAPI/AnalysisDataService.h" diff --git a/Framework/Algorithms/src/FindCenterOfMassPosition.cpp b/Framework/Algorithms/src/FindCenterOfMassPosition.cpp index 42edf1c31f1fbccf9f6c23ddd7d0c9e62bac7316..031d7c216537b270e5fd74be5870319013f42967 100644 --- a/Framework/Algorithms/src/FindCenterOfMassPosition.cpp +++ b/Framework/Algorithms/src/FindCenterOfMassPosition.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/FindCenterOfMassPosition.h" #include "MantidAPI/HistogramValidator.h" diff --git a/Framework/Algorithms/src/FindCenterOfMassPosition2.cpp b/Framework/Algorithms/src/FindCenterOfMassPosition2.cpp index f4f5ecc8c36816455fb079cfb7e8562275617415..c0cc522a7067c35c8492954286537e6c5a5bceba 100644 --- a/Framework/Algorithms/src/FindCenterOfMassPosition2.cpp +++ b/Framework/Algorithms/src/FindCenterOfMassPosition2.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/FindCenterOfMassPosition2.h" #include "MantidAPI/HistogramValidator.h" diff --git a/Framework/Algorithms/src/FindDeadDetectors.cpp b/Framework/Algorithms/src/FindDeadDetectors.cpp index 25bb1c4a40695999a798b6c8c75f5a44929e5ae2..fbef8f4aff49080fe53dddb3dd61ace7e4540651 100644 --- a/Framework/Algorithms/src/FindDeadDetectors.cpp +++ b/Framework/Algorithms/src/FindDeadDetectors.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/FindDeadDetectors.h" #include "MantidAPI/MatrixWorkspace.h" diff --git a/Framework/Algorithms/src/FindDetectorsOutsideLimits.cpp b/Framework/Algorithms/src/FindDetectorsOutsideLimits.cpp index ec20d4f98073ea5d86c02385cad323b3e3903a05..eec4dc975feb54566e64b1a23ad1965d4b34fd70 100644 --- a/Framework/Algorithms/src/FindDetectorsOutsideLimits.cpp +++ b/Framework/Algorithms/src/FindDetectorsOutsideLimits.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/FindDetectorsOutsideLimits.h" #include "MantidAPI/FileProperty.h" diff --git a/Framework/Algorithms/src/FindEPP.cpp b/Framework/Algorithms/src/FindEPP.cpp index 8580862be1cee1e3f73ed89e3f5bc08ddc327845..b1c231a79d5fdf69f1205be9cb3b75367d4eb3d2 100644 --- a/Framework/Algorithms/src/FindEPP.cpp +++ b/Framework/Algorithms/src/FindEPP.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/FindEPP.h" #include "MantidAPI/TableRow.h" diff --git a/Framework/Algorithms/src/FindPeakBackground.cpp b/Framework/Algorithms/src/FindPeakBackground.cpp index 998477b52c5d4235acdb5090a88f2c3905953d1d..d8bb92edaea88557971e4739a995481398389cbb 100644 --- a/Framework/Algorithms/src/FindPeakBackground.cpp +++ b/Framework/Algorithms/src/FindPeakBackground.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/FindPeakBackground.h" #include "MantidAPI/MatrixWorkspace.h" diff --git a/Framework/Algorithms/src/FindPeaks.cpp b/Framework/Algorithms/src/FindPeaks.cpp index 1283de64ae96442955f1b4ccb7ad2d3a409cf6c8..f3e7414505010263d2773512fc243ac38eb61595 100644 --- a/Framework/Algorithms/src/FindPeaks.cpp +++ b/Framework/Algorithms/src/FindPeaks.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/FindPeaks.h" #include "MantidAlgorithms/SmoothData.h" @@ -1508,8 +1508,8 @@ void FindPeaks::createFunctions() { */ double FindPeaks::callFitPeak(const MatrixWorkspace_sptr &dataws, int wsindex, - const API::IPeakFunction_sptr peakfunction, - const API::IBackgroundFunction_sptr backgroundfunction, + const API::IPeakFunction_sptr &peakfunction, + const API::IBackgroundFunction_sptr &backgroundfunction, const std::vector<double> &vec_fitwindow, const std::vector<double> &vec_peakrange, int minGuessFWHM, int maxGuessFWHM, int guessedFWHMStep, diff --git a/Framework/Algorithms/src/FindReflectometryLines2.cpp b/Framework/Algorithms/src/FindReflectometryLines2.cpp index 64b6ebe7836e41de3fcf2671a8fc4adc8cce726e..6fb872aae6928e5cb42a3dd89a947dc56544a307 100644 --- a/Framework/Algorithms/src/FindReflectometryLines2.cpp +++ b/Framework/Algorithms/src/FindReflectometryLines2.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/FindReflectometryLines2.h" diff --git a/Framework/Algorithms/src/FitPeak.cpp b/Framework/Algorithms/src/FitPeak.cpp index 4cdf8cd74f6b51c0f1ddf6035e0812d461dce436..98a8764daf55ae1b5fd8590e5d721425961cd5c2 100644 --- a/Framework/Algorithms/src/FitPeak.cpp +++ b/Framework/Algorithms/src/FitPeak.cpp @@ -1,13 +1,14 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes //---------------------------------------------------------------------- -#include "MantidAlgorithms/FitPeak.h" +#include <utility> + #include "MantidAPI/CompositeFunction.h" #include "MantidAPI/CostFunctionFactory.h" #include "MantidAPI/FuncMinimizerFactory.h" @@ -17,6 +18,7 @@ #include "MantidAPI/MultiDomainFunction.h" #include "MantidAPI/TableRow.h" #include "MantidAPI/WorkspaceProperty.h" +#include "MantidAlgorithms/FitPeak.h" #include "MantidDataObjects/TableWorkspace.h" #include "MantidDataObjects/Workspace2D.h" #include "MantidDataObjects/WorkspaceCreation.h" @@ -62,7 +64,7 @@ FitOneSinglePeak::FitOneSinglePeak() //---------------------------------------------------------------------------------------------- /** Set workspaces */ -void FitOneSinglePeak::setWorskpace(API::MatrixWorkspace_sptr dataws, +void FitOneSinglePeak::setWorskpace(const API::MatrixWorkspace_sptr &dataws, size_t wsindex) { if (dataws) { m_dataWS = dataws; @@ -80,8 +82,8 @@ void FitOneSinglePeak::setWorskpace(API::MatrixWorkspace_sptr dataws, //---------------------------------------------------------------------------------------------- /** Set peaks */ -void FitOneSinglePeak::setFunctions(IPeakFunction_sptr peakfunc, - IBackgroundFunction_sptr bkgdfunc) { +void FitOneSinglePeak::setFunctions(const IPeakFunction_sptr &peakfunc, + const IBackgroundFunction_sptr &bkgdfunc) { if (peakfunc) m_peakFunc = peakfunc; @@ -129,8 +131,8 @@ void FitOneSinglePeak::setPeakRange(double xpeakleft, double xpeakright) { * @param costfunction :: string of the name of the cost function */ void FitOneSinglePeak::setFittingMethod(std::string minimizer, - std::string costfunction) { - m_minimizer = minimizer; + const std::string &costfunction) { + m_minimizer = std::move(minimizer); if (costfunction == "Chi-Square") { m_costFunction = "Least squares"; } else if (costfunction == "Rwp") { @@ -387,8 +389,9 @@ API::MatrixWorkspace_sptr FitOneSinglePeak::genFitWindowWS() { /** Estimate the peak height from a set of data containing pure peaks */ double FitOneSinglePeak::estimatePeakHeight( - API::IPeakFunction_const_sptr peakfunc, MatrixWorkspace_sptr dataws, - size_t wsindex, size_t ixmin, size_t ixmax) { + const API::IPeakFunction_const_sptr &peakfunc, + const MatrixWorkspace_sptr &dataws, size_t wsindex, size_t ixmin, + size_t ixmax) { // Get current peak height: from current peak centre (previously setup) double peakcentre = peakfunc->centre(); vector<double> svvec(1, peakcentre); @@ -424,7 +427,8 @@ double FitOneSinglePeak::estimatePeakHeight( /** Make a pure peak WS in the fit window region from m_background_function * @param purePeakWS :: workspace containing pure peak (w/ background removed) */ -void FitOneSinglePeak::removeBackground(MatrixWorkspace_sptr purePeakWS) { +void FitOneSinglePeak::removeBackground( + const MatrixWorkspace_sptr &purePeakWS) { // Calculate background // FIXME - This can be costly to use FunctionDomain and FunctionValue auto &vecX = purePeakWS->x(0); @@ -449,10 +453,10 @@ void FitOneSinglePeak::removeBackground(MatrixWorkspace_sptr purePeakWS) { * some fit with unphysical result. * @return :: chi-square/Rwp */ -double FitOneSinglePeak::fitPeakFunction(API::IPeakFunction_sptr peakfunc, - MatrixWorkspace_sptr dataws, - size_t wsindex, double startx, - double endx) { +double +FitOneSinglePeak::fitPeakFunction(const API::IPeakFunction_sptr &peakfunc, + const MatrixWorkspace_sptr &dataws, + size_t wsindex, double startx, double endx) { // Check validity and debug output if (!peakfunc) throw std::runtime_error( @@ -461,7 +465,8 @@ double FitOneSinglePeak::fitPeakFunction(API::IPeakFunction_sptr peakfunc, m_sstream << "Function (to fit): " << peakfunc->asString() << " From " << startx << " to " << endx << ".\n"; - double goodness = fitFunctionSD(peakfunc, dataws, wsindex, startx, endx); + double goodness = + fitFunctionSD(peakfunc, std::move(dataws), wsindex, startx, endx); return goodness; } @@ -574,7 +579,7 @@ void FitOneSinglePeak::highBkgdFit() { * @returns :: map to store function parameter's names and value */ std::map<std::string, double> -FitOneSinglePeak::backup(IFunction_const_sptr func) { +FitOneSinglePeak::backup(const IFunction_const_sptr &func) { std::map<std::string, double> funcparammap; // Set up @@ -614,7 +619,7 @@ FitOneSinglePeak::storeFunctionError(const IFunction_const_sptr &func) { /** Restore the parameters value to a function from a string/double map */ void FitOneSinglePeak::pop(const std::map<std::string, double> &funcparammap, - API::IFunction_sptr func) { + const API::IFunction_sptr &func) { std::map<std::string, double>::const_iterator miter; for (miter = funcparammap.begin(); miter != funcparammap.end(); ++miter) { string parname = miter->first; @@ -633,8 +638,8 @@ void FitOneSinglePeak::pop(const std::map<std::string, double> &funcparammap, * @param xmax * @return */ -double FitOneSinglePeak::calChiSquareSD(IFunction_sptr fitfunc, - MatrixWorkspace_sptr dataws, +double FitOneSinglePeak::calChiSquareSD(const IFunction_sptr &fitfunc, + const MatrixWorkspace_sptr &dataws, size_t wsindex, double xmin, double xmax) { // Set up sub algorithm fit @@ -675,7 +680,7 @@ double FitOneSinglePeak::calChiSquareSD(IFunction_sptr fitfunc, * return DBL_MAX */ double FitOneSinglePeak::fitFunctionSD(IFunction_sptr fitfunc, - MatrixWorkspace_sptr dataws, + const MatrixWorkspace_sptr &dataws, size_t wsindex, double xmin, double xmax) { // Set up sub algorithm fit @@ -733,8 +738,8 @@ double FitOneSinglePeak::fitFunctionSD(IFunction_sptr fitfunc, * @param vec_xmin :: minimin values of domains * @param vec_xmax :: maximim values of domains */ -double FitOneSinglePeak::fitFunctionMD(IFunction_sptr fitfunc, - MatrixWorkspace_sptr dataws, +double FitOneSinglePeak::fitFunctionMD(const IFunction_sptr &fitfunc, + const MatrixWorkspace_sptr &dataws, size_t wsindex, vector<double> vec_xmin, vector<double> vec_xmax) { // Validate @@ -823,8 +828,9 @@ double FitOneSinglePeak::fitFunctionMD(IFunction_sptr fitfunc, * @return :: Rwp/chi2 */ double FitOneSinglePeak::fitCompositeFunction( - API::IPeakFunction_sptr peakfunc, API::IBackgroundFunction_sptr bkgdfunc, - API::MatrixWorkspace_sptr dataws, size_t wsindex, double startx, + const API::IPeakFunction_sptr &peakfunc, + const API::IBackgroundFunction_sptr &bkgdfunc, + const API::MatrixWorkspace_sptr &dataws, size_t wsindex, double startx, double endx) { // Construct composit function boost::shared_ptr<CompositeFunction> compfunc = @@ -883,7 +889,7 @@ double FitOneSinglePeak::fitCompositeFunction( /** Check the fitted peak value to see whether it is valid * @return :: Rwp/chi2 */ -double FitOneSinglePeak::checkFittedPeak(IPeakFunction_sptr peakfunc, +double FitOneSinglePeak::checkFittedPeak(const IPeakFunction_sptr &peakfunc, double costfuncvalue, std::string &errorreason) { if (costfuncvalue < DBL_MAX) { @@ -1234,7 +1240,7 @@ void FitPeak::exec() { /** Add function's parameter names after peak function name */ std::vector<std::string> -FitPeak::addFunctionParameterNames(std::vector<std::string> funcnames) { +FitPeak::addFunctionParameterNames(const std::vector<std::string> &funcnames) { vector<string> vec_funcparnames; for (auto &funcname : funcnames) { @@ -1599,9 +1605,11 @@ size_t getIndex(const HistogramX &vecx, double x) { //---------------------------------------------------------------------------------------------- /** Generate table workspace */ -TableWorkspace_sptr FitPeak::genOutputTableWS( - IPeakFunction_sptr peakfunc, map<string, double> peakerrormap, - IBackgroundFunction_sptr bkgdfunc, map<string, double> bkgderrormap) { +TableWorkspace_sptr +FitPeak::genOutputTableWS(const IPeakFunction_sptr &peakfunc, + map<string, double> peakerrormap, + const IBackgroundFunction_sptr &bkgdfunc, + map<string, double> bkgderrormap) { // Empty table TableWorkspace_sptr outtablews = boost::make_shared<TableWorkspace>(); outtablews->addColumn("str", "Name"); diff --git a/Framework/Algorithms/src/FitPeaks.cpp b/Framework/Algorithms/src/FitPeaks.cpp index 4b591f79a66fd184bc77056100b62fadf5973187..17a439ef3d196662fdb83562f5fc85ece8f2e052 100644 --- a/Framework/Algorithms/src/FitPeaks.cpp +++ b/Framework/Algorithms/src/FitPeaks.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes @@ -34,6 +34,7 @@ #include "boost/algorithm/string.hpp" #include "boost/algorithm/string/trim.hpp" #include <limits> +#include <utility> using namespace Mantid; using namespace Mantid::API; @@ -148,7 +149,7 @@ double PeakFitResult::getCost(size_t ipeak) const { return m_costs[ipeak]; } /// set the peak fitting record/parameter for one peak void PeakFitResult::setRecord(size_t ipeak, const double cost, const double peak_position, - const FitFunction fit_functions) { + const FitFunction &fit_functions) { // check input if (ipeak >= m_costs.size()) throw std::runtime_error("Peak index is out of range."); @@ -1026,7 +1027,7 @@ double numberCounts(const Histogram &histogram, const double xmin, */ void FitPeaks::fitSpectrumPeaks( size_t wi, const std::vector<double> &expected_peak_centers, - boost::shared_ptr<FitPeaksAlgorithm::PeakFitResult> fit_result) { + const boost::shared_ptr<FitPeaksAlgorithm::PeakFitResult> &fit_result) { if (numberCounts(m_inputMatrixWS->histogram(wi)) <= m_minPeakHeight) { for (size_t i = 0; i < fit_result->getNumberPeaks(); ++i) fit_result->setBadRecord(i, -1.); @@ -1131,7 +1132,8 @@ void FitPeaks::fitSpectrumPeaks( * @return :: flag whether the peak width shall be observed */ bool FitPeaks::decideToEstimatePeakParams( - const bool firstPeakInSpectrum, API::IPeakFunction_sptr peak_function) { + const bool firstPeakInSpectrum, + const API::IPeakFunction_sptr &peak_function) { // should observe the peak width if the user didn't supply all of the peak // function parameters bool observe_peak_shape(m_initParamIndexes.size() != @@ -1173,8 +1175,8 @@ bool FitPeaks::decideToEstimatePeakParams( void FitPeaks::processSinglePeakFitResult( size_t wsindex, size_t peakindex, const double cost, const std::vector<double> &expected_peak_positions, - FitPeaksAlgorithm::FitFunction fitfunction, - boost::shared_ptr<FitPeaksAlgorithm::PeakFitResult> fit_result) { + const FitPeaksAlgorithm::FitFunction &fitfunction, + const boost::shared_ptr<FitPeaksAlgorithm::PeakFitResult> &fit_result) { // determine peak position tolerance double postol(DBL_MAX); bool case23(false); @@ -1403,9 +1405,9 @@ vector<double> calculateMomentsAboutMean(const Histogram &histogram, * First, algorithm FindPeakBackground will be tried; * If it fails, then a linear background estimator will be called. */ -void FitPeaks::estimateBackground(const Histogram &histogram, - const std::pair<double, double> &peak_window, - API::IBackgroundFunction_sptr bkgd_function) { +void FitPeaks::estimateBackground( + const Histogram &histogram, const std::pair<double, double> &peak_window, + const API::IBackgroundFunction_sptr &bkgd_function) { if (peak_window.first >= peak_window.second) throw std::runtime_error("Invalid peak window"); @@ -1440,8 +1442,9 @@ void FitPeaks::estimateBackground(const Histogram &histogram, */ int FitPeaks::estimatePeakParameters( const Histogram &histogram, const std::pair<double, double> &peak_window, - API::IPeakFunction_sptr peakfunction, - API::IBackgroundFunction_sptr bkgdfunction, bool observe_peak_width) { + const API::IPeakFunction_sptr &peakfunction, + const API::IBackgroundFunction_sptr &bkgdfunction, + bool observe_peak_width) { // get the range of start and stop to construct a function domain const auto &vector_x = histogram.points(); @@ -1608,7 +1611,7 @@ double FitPeaks::observePeakWidth(const Histogram &histogram, bool FitPeaks::fitBackground(const size_t &ws_index, const std::pair<double, double> &fit_window, const double &expected_peak_pos, - API::IBackgroundFunction_sptr bkgd_func) { + const API::IBackgroundFunction_sptr &bkgd_func) { // find out how to fit background const auto &points = m_inputMatrixWS->histogram(ws_index).points(); @@ -1656,12 +1659,13 @@ bool FitPeaks::fitBackground(const size_t &ws_index, //---------------------------------------------------------------------------------------------- /** Fit an individual peak */ -double FitPeaks::fitIndividualPeak(size_t wi, API::IAlgorithm_sptr fitter, - const double expected_peak_center, - const std::pair<double, double> &fitwindow, - const bool observe_peak_params, - API::IPeakFunction_sptr peakfunction, - API::IBackgroundFunction_sptr bkgdfunc) { +double +FitPeaks::fitIndividualPeak(size_t wi, const API::IAlgorithm_sptr &fitter, + const double expected_peak_center, + const std::pair<double, double> &fitwindow, + const bool observe_peak_params, + const API::IPeakFunction_sptr &peakfunction, + const API::IBackgroundFunction_sptr &bkgdfunc) { double cost(DBL_MAX); // confirm that there is something to fit @@ -1690,14 +1694,12 @@ double FitPeaks::fitIndividualPeak(size_t wi, API::IAlgorithm_sptr fitter, * This is the core fitting algorithm to deal with the simplest situation * @exception :: Fit.isExecuted is false (cannot be executed) */ -double FitPeaks::fitFunctionSD(IAlgorithm_sptr fit, - API::IPeakFunction_sptr peak_function, - API::IBackgroundFunction_sptr bkgd_function, - API::MatrixWorkspace_sptr dataws, size_t wsindex, - double xmin, double xmax, - const double &expected_peak_center, - bool observe_peak_shape, - bool estimate_background) { +double FitPeaks::fitFunctionSD( + const IAlgorithm_sptr &fit, const API::IPeakFunction_sptr &peak_function, + const API::IBackgroundFunction_sptr &bkgd_function, + const API::MatrixWorkspace_sptr &dataws, size_t wsindex, double xmin, + double xmax, const double &expected_peak_center, bool observe_peak_shape, + bool estimate_background) { std::stringstream errorid; errorid << "(WorkspaceIndex=" << wsindex << " PeakCentre=" << expected_peak_center << ")"; @@ -1769,7 +1771,6 @@ double FitPeaks::fitFunctionSD(IAlgorithm_sptr fit, errorid << ": " << e.what(); g_log.warning() << "While fitting " + errorid.str(); return DBL_MAX; // probably the wrong thing to do - throw std::runtime_error("While fitting " + errorid.str()); } // Retrieve result @@ -1784,8 +1785,8 @@ double FitPeaks::fitFunctionSD(IAlgorithm_sptr fit, //---------------------------------------------------------------------------------------------- double FitPeaks::fitFunctionMD(API::IFunction_sptr fit_function, - API::MatrixWorkspace_sptr dataws, size_t wsindex, - std::vector<double> &vec_xmin, + const API::MatrixWorkspace_sptr &dataws, + size_t wsindex, std::vector<double> &vec_xmin, std::vector<double> &vec_xmax) { // Validate if (vec_xmin.size() != vec_xmax.size()) @@ -1845,7 +1846,6 @@ double FitPeaks::fitFunctionMD(API::IFunction_sptr fit_function, double chi2 = DBL_MAX; if (fitStatus == "success") { chi2 = fit->getProperty("OutputChi2overDoF"); - fit_function = fit->getProperty("Function"); } return chi2; @@ -1854,10 +1854,10 @@ double FitPeaks::fitFunctionMD(API::IFunction_sptr fit_function, //---------------------------------------------------------------------------------------------- /// Fit peak with high background double FitPeaks::fitFunctionHighBackground( - IAlgorithm_sptr fit, const std::pair<double, double> &fit_window, + const IAlgorithm_sptr &fit, const std::pair<double, double> &fit_window, const size_t &ws_index, const double &expected_peak_center, - bool observe_peak_shape, API::IPeakFunction_sptr peakfunction, - API::IBackgroundFunction_sptr bkgdfunc) { + bool observe_peak_shape, const API::IPeakFunction_sptr &peakfunction, + const API::IBackgroundFunction_sptr &bkgdfunc) { // high background to reduce API::IBackgroundFunction_sptr high_bkgd_function(nullptr); if (m_linearBackgroundFunction) @@ -1881,9 +1881,8 @@ double FitPeaks::fitFunctionHighBackground( createMatrixWorkspace(vec_x, vec_y, vec_e); // Fit peak with background - double cost = fitFunctionSD(fit, peakfunction, bkgdfunc, reduced_bkgd_ws, 0, - vec_x.front(), vec_x.back(), expected_peak_center, - observe_peak_shape, false); + fitFunctionSD(fit, peakfunction, bkgdfunc, reduced_bkgd_ws, 0, vec_x.front(), + vec_x.back(), expected_peak_center, observe_peak_shape, false); // add the reduced background back bkgdfunc->setParameter(0, bkgdfunc->getParameter(0) + @@ -1891,9 +1890,9 @@ double FitPeaks::fitFunctionHighBackground( bkgdfunc->setParameter(1, bkgdfunc->getParameter(1) + high_bkgd_function->getParameter(1)); - cost = fitFunctionSD(fit, peakfunction, bkgdfunc, m_inputMatrixWS, ws_index, - vec_x.front(), vec_x.back(), expected_peak_center, false, - false); + double cost = fitFunctionSD(fit, peakfunction, bkgdfunc, m_inputMatrixWS, + ws_index, vec_x.front(), vec_x.back(), + expected_peak_center, false, false); return cost; } @@ -1954,7 +1953,7 @@ void FitPeaks::generateOutputPeakPositionWS() { * @param with_chi2:: flag to append chi^2 to the table */ void FitPeaks::setupParameterTableWorkspace( - API::ITableWorkspace_sptr table_ws, + const API::ITableWorkspace_sptr &table_ws, const std::vector<std::string> ¶m_names, bool with_chi2) { // add columns @@ -2063,7 +2062,7 @@ void FitPeaks::processOutputs( // optional if (m_fittedPeakWS && m_fittedParamTable) { g_log.debug("about to calcualte fitted peaks"); - calculateFittedPeaks(fit_result_vec); + calculateFittedPeaks(std::move(fit_result_vec)); setProperty(PropertyNames::OUTPUT_WKSP_MODEL, m_fittedPeakWS); } } @@ -2215,9 +2214,9 @@ void FitPeaks::getRangeData(size_t iws, * @param vec_x :: vector of X valye * @param vec_y :: (input/output) vector Y to be reduced by background function */ -void FitPeaks::reduceByBackground(API::IBackgroundFunction_sptr bkgd_func, - const std::vector<double> &vec_x, - std::vector<double> &vec_y) { +void FitPeaks::reduceByBackground( + const API::IBackgroundFunction_sptr &bkgd_func, + const std::vector<double> &vec_x, std::vector<double> &vec_y) { // calculate the background FunctionDomain1DVector vectorx(vec_x.begin(), vec_x.end()); FunctionValues vector_bkgd(vectorx); @@ -2278,7 +2277,7 @@ void FitPeaks::estimateLinearBackground(const Histogram &histogram, */ void FitPeaks::writeFitResult( size_t wi, const std::vector<double> &expected_positions, - boost::shared_ptr<FitPeaksAlgorithm::PeakFitResult> fit_result) { + const boost::shared_ptr<FitPeaksAlgorithm::PeakFitResult> &fit_result) { // convert to size_t out_wi = wi - m_startWorkspaceIndex; if (out_wi >= m_outputPeakPositionWorkspace->getNumberHistograms()) { @@ -2395,7 +2394,7 @@ void FitPeaks::writeFitResult( //---------------------------------------------------------------------------------------------- std::string FitPeaks::getPeakHeightParameterName( - API::IPeakFunction_const_sptr peak_function) { + const API::IPeakFunction_const_sptr &peak_function) { std::string height_name(""); std::vector<std::string> peak_parameters = peak_function->getParameterNames(); diff --git a/Framework/Algorithms/src/FixGSASInstrumentFile.cpp b/Framework/Algorithms/src/FixGSASInstrumentFile.cpp index 396897e4c8498bd9839618aaa7c8b3e7dac49173..b23d59089606436d6904ea75b0d7b151c564183c 100644 --- a/Framework/Algorithms/src/FixGSASInstrumentFile.cpp +++ b/Framework/Algorithms/src/FixGSASInstrumentFile.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/FixGSASInstrumentFile.h" diff --git a/Framework/Algorithms/src/FlatPlateAbsorption.cpp b/Framework/Algorithms/src/FlatPlateAbsorption.cpp index b3a75e851962b4734a38d19f785f95162bbbf993..77f5db7e6e15603bf1e03006314a3131dba10b15 100644 --- a/Framework/Algorithms/src/FlatPlateAbsorption.cpp +++ b/Framework/Algorithms/src/FlatPlateAbsorption.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/FlatPlateAbsorption.h" #include "MantidAPI/MatrixWorkspace.h" diff --git a/Framework/Algorithms/src/GeneralisedSecondDifference.cpp b/Framework/Algorithms/src/GeneralisedSecondDifference.cpp index 9ed8cae0dc07e7d22274d2c160b9e58b8500c070..4c552ee3aee690e1a6181786f7586f73512b606c 100644 --- a/Framework/Algorithms/src/GeneralisedSecondDifference.cpp +++ b/Framework/Algorithms/src/GeneralisedSecondDifference.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/GeneralisedSecondDifference.h" diff --git a/Framework/Algorithms/src/GenerateEventsFilter.cpp b/Framework/Algorithms/src/GenerateEventsFilter.cpp index 6c23db87a42d3f9ab22dd7679765bcefbca0ffac..2e0de3025f26870196ec34f3889188d602cddaa4 100644 --- a/Framework/Algorithms/src/GenerateEventsFilter.cpp +++ b/Framework/Algorithms/src/GenerateEventsFilter.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/GenerateEventsFilter.h" #include "MantidAPI/MatrixWorkspace.h" @@ -18,6 +18,7 @@ #include "MantidKernel/VisibleWhenProperty.h" #include <boost/math/special_functions/round.hpp> +#include <utility> using namespace Mantid; using namespace Mantid::Kernel; @@ -455,10 +456,9 @@ void GenerateEventsFilter::setFilterByTimeOnly() { int64_t curtime_ns = m_startTime.totalNanoseconds(); int wsindex = 0; while (curtime_ns < m_stopTime.totalNanoseconds()) { - int64_t deltatime_ns; for (size_t id = 0; id < numtimeintervals; ++id) { // get next time interval value - deltatime_ns = vec_dtimens[id]; + int64_t deltatime_ns = vec_dtimens[id]; // Calculate next.time int64_t nexttime_ns = curtime_ns + deltatime_ns; bool breaklater = false; @@ -500,7 +500,7 @@ void GenerateEventsFilter::setFilterByTimeOnly() { /** Generate filters by log values. * @param logname :: name of the log to filter with */ -void GenerateEventsFilter::setFilterByLogValue(std::string logname) { +void GenerateEventsFilter::setFilterByLogValue(const std::string &logname) { // Obtain reference of sample log to filter with m_dblLog = dynamic_cast<TimeSeriesProperty<double> *>( m_dataWS->run().getProperty(logname)); @@ -830,7 +830,6 @@ void GenerateEventsFilter::makeFilterBySingleValue( // Initialize control parameters bool lastGood = false; - bool isGood = false; time_duration tol = DateAndTime::durationFromSeconds(TimeTolerance); int numgood = 0; DateAndTime lastTime, currT; @@ -843,8 +842,8 @@ void GenerateEventsFilter::makeFilterBySingleValue( currT = m_dblLog->nthTime(i); // A good value? - isGood = identifyLogEntry(i, currT, lastGood, min, max, startTime, stopTime, - filterIncrease, filterDecrease); + bool isGood = identifyLogEntry(i, currT, lastGood, min, max, startTime, + stopTime, filterIncrease, filterDecrease); if (isGood) numgood++; @@ -962,7 +961,7 @@ bool GenerateEventsFilter::identifyLogEntry( * @param stopTime :: Stop time. */ void GenerateEventsFilter::makeMultipleFiltersByValues( - map<size_t, int> indexwsindexmap, vector<double> logvalueranges, + map<size_t, int> indexwsindexmap, const vector<double> &logvalueranges, bool centre, bool filterIncrease, bool filterDecrease, DateAndTime startTime, DateAndTime stopTime) { g_log.notice("Starting method 'makeMultipleFiltersByValues'. "); @@ -994,8 +993,9 @@ void GenerateEventsFilter::makeMultipleFiltersByValues( auto iend = static_cast<int>(logsize - 1); makeMultipleFiltersByValuesPartialLog( - istart, iend, m_vecSplitterTime, m_vecSplitterGroup, indexwsindexmap, - logvalueranges, tol, filterIncrease, filterDecrease, startTime, stopTime); + istart, iend, m_vecSplitterTime, m_vecSplitterGroup, + std::move(indexwsindexmap), logvalueranges, tol, filterIncrease, + filterDecrease, startTime, stopTime); progress(1.0); } @@ -1018,9 +1018,9 @@ void GenerateEventsFilter::makeMultipleFiltersByValues( * @param stopTime :: Stop time. */ void GenerateEventsFilter::makeMultipleFiltersByValuesParallel( - map<size_t, int> indexwsindexmap, vector<double> logvalueranges, - bool centre, bool filterIncrease, bool filterDecrease, - DateAndTime startTime, DateAndTime stopTime) { + const map<size_t, int> &indexwsindexmap, + const vector<double> &logvalueranges, bool centre, bool filterIncrease, + bool filterDecrease, DateAndTime startTime, DateAndTime stopTime) { // Return if the log is empty. int logsize = m_dblLog->size(); if (logsize == 0) { @@ -1178,7 +1178,7 @@ void GenerateEventsFilter::makeMultipleFiltersByValuesParallel( void GenerateEventsFilter::makeMultipleFiltersByValuesPartialLog( int istart, int iend, std::vector<Types::Core::DateAndTime> &vecSplitTime, std::vector<int> &vecSplitGroup, map<size_t, int> indexwsindexmap, - const vector<double> &logvalueranges, time_duration tol, + const vector<double> &logvalueranges, const time_duration &tol, bool filterIncrease, bool filterDecrease, DateAndTime startTime, DateAndTime stopTime) { // Check @@ -1217,7 +1217,6 @@ void GenerateEventsFilter::makeMultipleFiltersByValuesPartialLog( double currValue = m_dblLog->nthValue(i); // Filter out by time and direction (optional) - bool intime = true; if (currTime < startTime) { // case i. Too early, do nothing createsplitter = false; @@ -1252,130 +1251,127 @@ void GenerateEventsFilter::makeMultipleFiltersByValuesPartialLog( prevDirection = direction; // Examine log value for filter - if (intime) { - // Determine whether direction is fine - bool correctdir = true; - if (filterIncrease && filterDecrease) { - // Both direction is fine + // Determine whether direction is fine + bool correctdir = true; + if (filterIncrease && filterDecrease) { + // Both direction is fine + correctdir = true; + } else { + // Filter out one direction + if (filterIncrease && direction > 0) correctdir = true; - } else { - // Filter out one direction - if (filterIncrease && direction > 0) - correctdir = true; - else if (filterDecrease && direction < 0) - correctdir = true; - else if (direction == 0) - throw runtime_error("Direction is not determined."); - else - correctdir = false; - } // END-IF-ELSE: Direction - - // Treat the log entry based on: changing direction (+ time range) - if (correctdir) { - // Check this value whether it falls into any range - size_t index = searchValue(logvalueranges, currValue); - - bool valueWithinMinMax = true; - if (index > logvalueranges.size()) { - // Out of range - valueWithinMinMax = false; - } + else if (filterDecrease && direction < 0) + correctdir = true; + else if (direction == 0) + throw runtime_error("Direction is not determined."); + else + correctdir = false; + } // END-IF-ELSE: Direction + + // Treat the log entry based on: changing direction (+ time range) + if (correctdir) { + // Check this value whether it falls into any range + size_t index = searchValue(logvalueranges, currValue); + + bool valueWithinMinMax = true; + if (index > logvalueranges.size()) { + // Out of range + valueWithinMinMax = false; + } - if (g_log.is(Logger::Priority::PRIO_DEBUG)) { - stringstream dbss; - dbss << "[DBx257] Examine Log Index " << i - << ", Value = " << currValue << ", Data Range Index = " << index - << "; " - << "Group Index = " << indexwsindexmap[index / 2] - << " (log value range vector size = " << logvalueranges.size() - << "): "; - if (index == 0) - dbss << logvalueranges[index] << ", " << logvalueranges[index + 1]; - else if (index == logvalueranges.size()) - dbss << logvalueranges[index - 1] << ", " << logvalueranges[index]; - else if (valueWithinMinMax) - dbss << logvalueranges[index - 1] << ", " << logvalueranges[index] - << ", " << logvalueranges[index + 1]; - g_log.debug(dbss.str()); - } + if (g_log.is(Logger::Priority::PRIO_DEBUG)) { + stringstream dbss; + dbss << "[DBx257] Examine Log Index " << i << ", Value = " << currValue + << ", Data Range Index = " << index << "; " + << "Group Index = " << indexwsindexmap[index / 2] + << " (log value range vector size = " << logvalueranges.size() + << "): "; + if (index == 0) + dbss << logvalueranges[index] << ", " << logvalueranges[index + 1]; + else if (index == logvalueranges.size()) + dbss << logvalueranges[index - 1] << ", " << logvalueranges[index]; + else if (valueWithinMinMax) + dbss << logvalueranges[index - 1] << ", " << logvalueranges[index] + << ", " << logvalueranges[index + 1]; + g_log.debug(dbss.str()); + } - if (valueWithinMinMax) { - if (index % 2 == 0) { - // [Situation] Falls in the interval - currindex = indexwsindexmap[index / 2]; - - if (currindex != lastindex && start.totalNanoseconds() == 0) { - // Group index is different from last and start is not set up: new - // a region! - newsplitter = true; - } else if (currindex != lastindex && start.totalNanoseconds() > 0) { - // Group index is different from last and start is set up: close - // a region and new a region + if (valueWithinMinMax) { + if (index % 2 == 0) { + // [Situation] Falls in the interval + currindex = indexwsindexmap[index / 2]; + + if (currindex != lastindex && start.totalNanoseconds() == 0) { + // Group index is different from last and start is not set up: new + // a region! + newsplitter = true; + } else if (currindex != lastindex && start.totalNanoseconds() > 0) { + // Group index is different from last and start is set up: close + // a region and new a region + stop = currTime; + createsplitter = true; + newsplitter = true; + } else if (currindex == lastindex && start.totalNanoseconds() > 0) { + // Still of the group index + if (i == iend) { + // Last entry in this section of log. Need to flag to close the + // pair stop = currTime; createsplitter = true; - newsplitter = true; - } else if (currindex == lastindex && start.totalNanoseconds() > 0) { - // Still of the group index - if (i == iend) { - // Last entry in this section of log. Need to flag to close the - // pair - stop = currTime; - createsplitter = true; - newsplitter = false; - } else { - // Do nothing - ; - } + newsplitter = false; } else { - // An impossible situation - std::stringstream errmsg; - double lastvalue = m_dblLog->nthValue(i - 1); - errmsg << "Impossible to have currindex == lastindex == " - << currindex - << ", while start is not init. Log Index = " << i - << "\t value = " << currValue << "\t, Index = " << index - << " in range " << logvalueranges[index] << ", " - << logvalueranges[index + 1] - << "; Last value = " << lastvalue; - throw std::runtime_error(errmsg.str()); + // Do nothing + ; } - } // [In-bound: Inside interval] - else { - // [Situation] Fall between interval (which is not likley happen) - currindex = -1; - g_log.warning() - << "Not likely to happen! Current value = " << currValue - << " is within value range but its index = " << index - << " has no map to group index. " - << "\n"; - if (start.totalNanoseconds() > 0) { - // Close the interval pair if it has been started. - stop = currTime; - createsplitter = true; - } - } // [In-bound: Between interval] - } else { - // Out of a range: check whether there is a splitter started + } else { + // An impossible situation + std::stringstream errmsg; + double lastvalue = m_dblLog->nthValue(i - 1); + errmsg << "Impossible to have currindex == lastindex == " + << currindex + << ", while start is not init. Log Index = " << i + << "\t value = " << currValue << "\t, Index = " << index + << " in range " << logvalueranges[index] << ", " + << logvalueranges[index + 1] + << "; Last value = " << lastvalue; + throw std::runtime_error(errmsg.str()); + } + } // [In-bound: Inside interval] + else { + // [Situation] Fall between interval (which is not likley happen) currindex = -1; + g_log.warning() << "Not likely to happen! Current value = " + << currValue + << " is within value range but its index = " << index + << " has no map to group index. " + << "\n"; if (start.totalNanoseconds() > 0) { - // End situation + // Close the interval pair if it has been started. stop = currTime; createsplitter = true; } - } // [Out-bound] - - } // [CORRECT DIRECTION] - else { - // Log Index i falls out b/c out of wrong direction + } // [In-bound: Between interval] + } else { + // Out of a range: check whether there is a splitter started currindex = -1; - - // Condition to generate a Splitter (close parenthesis) - if (!correctdir && start.totalNanoseconds() > 0) { + if (start.totalNanoseconds() > 0) { + // End situation stop = currTime; createsplitter = true; } + } // [Out-bound] + + } // [CORRECT DIRECTION] + else { + // Log Index i falls out b/c out of wrong direction + currindex = -1; + + // Condition to generate a Splitter (close parenthesis) + if (!correctdir && start.totalNanoseconds() > 0) { + stop = currTime; + createsplitter = true; } - } // ENDIF (log entry in specified time) + } // d) Create Splitter if (createsplitter) { @@ -1662,7 +1658,7 @@ int GenerateEventsFilter::determineChangingDirection(int startindex) { */ void GenerateEventsFilter::addNewTimeFilterSplitter( Types::Core::DateAndTime starttime, Types::Core::DateAndTime stoptime, - int wsindex, string info) { + int wsindex, const string &info) { if (m_forFastLog) { // For MatrixWorkspace splitter // Start of splitter diff --git a/Framework/Algorithms/src/GenerateIPythonNotebook.cpp b/Framework/Algorithms/src/GenerateIPythonNotebook.cpp index 7e06d731c8737b0a160a49bcc7438a924da0123c..d51c64a828c2465f802a68cb21d5333ccbf2c88e 100644 --- a/Framework/Algorithms/src/GenerateIPythonNotebook.cpp +++ b/Framework/Algorithms/src/GenerateIPythonNotebook.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/GenerateIPythonNotebook.h" #include "MantidAPI/AlgorithmHistory.h" diff --git a/Framework/Algorithms/src/GeneratePeaks.cpp b/Framework/Algorithms/src/GeneratePeaks.cpp index 547d9fd14790f9e62c7a2038c056d830a494444b..d694db8a4a7920e575acf5abe5d854f3eda04369 100644 --- a/Framework/Algorithms/src/GeneratePeaks.cpp +++ b/Framework/Algorithms/src/GeneratePeaks.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/GeneratePeaks.h" #include "MantidAPI/Column.h" @@ -429,7 +429,7 @@ void GeneratePeaks::generatePeaks( const std::map<specnum_t, std::vector<std::pair<double, API::IFunction_sptr>>> &functionmap, - API::MatrixWorkspace_sptr dataWS) { + const API::MatrixWorkspace_sptr &dataWS) { // Calcualte function std::map<specnum_t, std::vector<std::pair<double, API::IFunction_sptr>>>::const_iterator @@ -627,7 +627,7 @@ void GeneratePeaks::processTableColumnNames() { * Algorithm supports multiple peaks in multiple spectra */ void GeneratePeaks::getSpectraSet( - DataObjects::TableWorkspace_const_sptr peakParmsWS) { + const DataObjects::TableWorkspace_const_sptr &peakParmsWS) { size_t numpeaks = peakParmsWS->rowCount(); API::Column_const_sptr col = peakParmsWS->getColumn("spectrum"); @@ -652,7 +652,7 @@ void GeneratePeaks::getSpectraSet( /** Get the IPeakFunction part in the input function */ API::IPeakFunction_sptr -GeneratePeaks::getPeakFunction(API::IFunction_sptr infunction) { +GeneratePeaks::getPeakFunction(const API::IFunction_sptr &infunction) { // Not a composite function API::CompositeFunction_sptr compfunc = boost::dynamic_pointer_cast<API::CompositeFunction>(infunction); @@ -678,8 +678,8 @@ GeneratePeaks::getPeakFunction(API::IFunction_sptr infunction) { //---------------------------------------------------------------------------------------------- /** Find out whether a function has a certain parameter */ -bool GeneratePeaks::hasParameter(API::IFunction_sptr function, - std::string paramname) { +bool GeneratePeaks::hasParameter(const API::IFunction_sptr &function, + const std::string ¶mname) { std::vector<std::string> parnames = function->getParameterNames(); std::vector<std::string>::iterator piter; piter = std::find(parnames.begin(), parnames.end(), paramname); @@ -793,8 +793,8 @@ GeneratePeaks::createDataWorkspace(std::vector<double> binparameters) { /** Add function's parameter names after peak function name */ -std::vector<std::string> -GeneratePeaks::addFunctionParameterNames(std::vector<std::string> funcnames) { +std::vector<std::string> GeneratePeaks::addFunctionParameterNames( + const std::vector<std::string> &funcnames) { std::vector<std::string> vec_funcparnames; for (auto &funcname : funcnames) { diff --git a/Framework/Algorithms/src/GeneratePythonScript.cpp b/Framework/Algorithms/src/GeneratePythonScript.cpp index 4c2105213919fa9752ecc7a8cbf1c112c1f98c57..5d622545013169b6917c1c26a5d25f57d6c619f3 100644 --- a/Framework/Algorithms/src/GeneratePythonScript.cpp +++ b/Framework/Algorithms/src/GeneratePythonScript.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/GeneratePythonScript.h" #include "MantidAPI/AlgorithmHistory.h" diff --git a/Framework/Algorithms/src/GetAllEi.cpp b/Framework/Algorithms/src/GetAllEi.cpp index cb236e26c1790d527ca31513b3d257f73d7887d3..109491f2e9797e7d51233d665602d4b96ddd8b62 100644 --- a/Framework/Algorithms/src/GetAllEi.cpp +++ b/Framework/Algorithms/src/GetAllEi.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/GetAllEi.h" #include "MantidAPI/Axis.h" diff --git a/Framework/Algorithms/src/GetDetOffsetsMultiPeaks.cpp b/Framework/Algorithms/src/GetDetOffsetsMultiPeaks.cpp index 0cac10f6c2d9e38ef62d0f1d59e08c8560d44d74..d0aae901fc3ad91d3e187ad89837cad9e9043fd7 100644 --- a/Framework/Algorithms/src/GetDetOffsetsMultiPeaks.cpp +++ b/Framework/Algorithms/src/GetDetOffsetsMultiPeaks.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/GetDetOffsetsMultiPeaks.h" #include "MantidAPI/CompositeFunction.h" @@ -399,7 +399,7 @@ void GetDetOffsetsMultiPeaks::processProperties() { * @throw Exception::RuntimeError If ... ... */ void GetDetOffsetsMultiPeaks::importFitWindowTableWorkspace( - TableWorkspace_sptr windowtablews) { + const TableWorkspace_sptr &windowtablews) { // Check number of columns matches number of peaks size_t numcols = windowtablews->columnCount(); size_t numpeaks = m_peakPositions.size(); @@ -721,7 +721,7 @@ void GetDetOffsetsMultiPeaks::fitPeaksOffset( // Set up GSL minimzer const gsl_multimin_fminimizer_type *T = gsl_multimin_fminimizer_nmsimplex; - gsl_multimin_fminimizer *s = nullptr; + gsl_vector *ss, *x; gsl_multimin_function minex_func; @@ -729,7 +729,6 @@ void GetDetOffsetsMultiPeaks::fitPeaksOffset( size_t nopt = 1; size_t iter = 0; int status = 0; - double size; /* Starting point */ x = gsl_vector_alloc(nopt); @@ -744,7 +743,7 @@ void GetDetOffsetsMultiPeaks::fitPeaksOffset( minex_func.f = &gsl_costFunction; minex_func.params = ¶ms; - s = gsl_multimin_fminimizer_alloc(T, nopt); + gsl_multimin_fminimizer *s = gsl_multimin_fminimizer_alloc(T, nopt); gsl_multimin_fminimizer_set(s, &minex_func, x, ss); do { @@ -753,7 +752,7 @@ void GetDetOffsetsMultiPeaks::fitPeaksOffset( if (status) break; - size = gsl_multimin_fminimizer_size(s); + double size = gsl_multimin_fminimizer_size(s); status = gsl_multimin_test_size(size, 1e-4); } while (status == GSL_CONTINUE && iter < 50); @@ -831,7 +830,7 @@ void deletePeaks(std::vector<size_t> &banned, std::vector<double> &peakPosToFit, * @return The number of peaks in range */ int GetDetOffsetsMultiPeaks::fitSpectra( - const int64_t wi, MatrixWorkspace_sptr inputW, + const int64_t wi, const MatrixWorkspace_sptr &inputW, const std::vector<double> &peakPositions, const std::vector<double> &fitWindows, size_t &nparams, double &minD, double &maxD, std::vector<double> &peakPosToFit, @@ -1127,8 +1126,7 @@ void GetDetOffsetsMultiPeaks::generatePeaksList( } //---------------------------------------------------------------------------------------------- -/** - */ + void GetDetOffsetsMultiPeaks::createInformationWorkspaces() { // Init size_t numspec = m_inputWS->getNumberHistograms(); @@ -1179,7 +1177,7 @@ void GetDetOffsetsMultiPeaks::createInformationWorkspaces() { * (thread-safe) */ void GetDetOffsetsMultiPeaks::addInfoToReportWS( - int wi, FitPeakOffsetResult offsetresult, + int wi, const FitPeakOffsetResult &offsetresult, const std::vector<double> &tofitpeakpositions, const std::vector<double> &fittedpeakpositions) { // Offset calculation status diff --git a/Framework/Algorithms/src/GetDetectorOffsets.cpp b/Framework/Algorithms/src/GetDetectorOffsets.cpp index 2ff4082f327323ea4e96f917eda05c88e0008387..b903b1e6df32230ea3c97265ed408ccac58ec27e 100644 --- a/Framework/Algorithms/src/GetDetectorOffsets.cpp +++ b/Framework/Algorithms/src/GetDetectorOffsets.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/GetDetectorOffsets.h" #include "MantidAPI/CompositeFunction.h" diff --git a/Framework/Algorithms/src/GetEi.cpp b/Framework/Algorithms/src/GetEi.cpp index 1fae783221e08ce4b121316b01d850b269dd0f5d..0484e539f0343fe4da0c48a01ef760842df84fd1 100644 --- a/Framework/Algorithms/src/GetEi.cpp +++ b/Framework/Algorithms/src/GetEi.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/GetEi.h" #include "MantidAPI/HistogramValidator.h" @@ -163,9 +163,9 @@ void GetEi::exec() { * passed to this function second * @throw NotFoundError if no detector is found for the detector ID given */ -void GetEi::getGeometry(API::MatrixWorkspace_const_sptr WS, specnum_t mon0Spec, - specnum_t mon1Spec, double &monitor0Dist, - double &monitor1Dist) const { +void GetEi::getGeometry(const API::MatrixWorkspace_const_sptr &WS, + specnum_t mon0Spec, specnum_t mon1Spec, + double &monitor0Dist, double &monitor1Dist) const { const IComponent_const_sptr source = WS->getInstrument()->getSource(); // retrieve a pointer to the first detector and get its distance @@ -220,7 +220,7 @@ void GetEi::getGeometry(API::MatrixWorkspace_const_sptr WS, specnum_t mon0Spec, * in the workspace */ std::vector<size_t> GetEi::getMonitorWsIndexs( - API::MatrixWorkspace_const_sptr WS, specnum_t specNum1, + const API::MatrixWorkspace_const_sptr &WS, specnum_t specNum1, specnum_t specNum2) const { // getting spectra numbers from detector IDs is // hard because the map works the other way, // getting index numbers from spectra numbers has @@ -285,7 +285,7 @@ double GetEi::timeToFly(double s, double E_KE) const { * @throw out_of_range if the peak runs off the edge of the histogram * @throw runtime_error a Child Algorithm just falls over */ -double GetEi::getPeakCentre(API::MatrixWorkspace_const_sptr WS, +double GetEi::getPeakCentre(const API::MatrixWorkspace_const_sptr &WS, const size_t monitIn, const double peakTime) { const auto ×Array = WS->x(monitIn); // we search for the peak only inside some window because there are often more diff --git a/Framework/Algorithms/src/GetEi2.cpp b/Framework/Algorithms/src/GetEi2.cpp index db502a910e68d1c0a4ff5af6dd4dcd16c2df0f04..205a6222d5eb9b4ae0fd15aae05e85aa9a5ea0fd 100644 --- a/Framework/Algorithms/src/GetEi2.cpp +++ b/Framework/Algorithms/src/GetEi2.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/GetEi2.h" @@ -24,6 +24,7 @@ #include <boost/lexical_cast.hpp> #include <cmath> #include <sstream> +#include <utility> using namespace Mantid::Kernel; using namespace Mantid::API; @@ -395,7 +396,7 @@ GetEi2::extractSpectrum(size_t ws_index, const double start, const double end) { * @returns The width of the peak at half height */ double GetEi2::calculatePeakWidthAtHalfHeight( - API::MatrixWorkspace_sptr data_ws, const double prominence, + const API::MatrixWorkspace_sptr &data_ws, const double prominence, std::vector<double> &peak_x, std::vector<double> &peak_y, std::vector<double> &peak_e) const { // Use WS->points() to create a temporary vector of bin_centre values to work @@ -622,11 +623,11 @@ double GetEi2::calculatePeakWidthAtHalfHeight( * considered a "real" peak * @return The calculated first moment */ -double GetEi2::calculateFirstMoment(API::MatrixWorkspace_sptr monitor_ws, +double GetEi2::calculateFirstMoment(const API::MatrixWorkspace_sptr &monitor_ws, const double prominence) { std::vector<double> peak_x, peak_y, peak_e; - calculatePeakWidthAtHalfHeight(monitor_ws, prominence, peak_x, peak_y, - peak_e); + calculatePeakWidthAtHalfHeight(std::move(monitor_ws), prominence, peak_x, + peak_y, peak_e); // Area double area(0.0), dummy(0.0); @@ -649,9 +650,9 @@ double GetEi2::calculateFirstMoment(API::MatrixWorkspace_sptr monitor_ws, * @param end :: The maximum value for the new bin range * @returns The rebinned workspace */ -API::MatrixWorkspace_sptr GetEi2::rebin(API::MatrixWorkspace_sptr monitor_ws, - const double first, const double width, - const double end) { +API::MatrixWorkspace_sptr +GetEi2::rebin(const API::MatrixWorkspace_sptr &monitor_ws, const double first, + const double width, const double end) { IAlgorithm_sptr childAlg = createChildAlgorithm("Rebin"); childAlg->setProperty("InputWorkspace", monitor_ws); std::ostringstream binParams; diff --git a/Framework/Algorithms/src/GetEiMonDet3.cpp b/Framework/Algorithms/src/GetEiMonDet3.cpp index 26ad516a3223a93042640d9a29fe0097b6b13e58..00e77e491fd28224eda3bd98370507b18e7d5597 100644 --- a/Framework/Algorithms/src/GetEiMonDet3.cpp +++ b/Framework/Algorithms/src/GetEiMonDet3.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/GetEiMonDet3.h" diff --git a/Framework/Algorithms/src/GetQsInQENSData.cpp b/Framework/Algorithms/src/GetQsInQENSData.cpp index d880f03a00b495f50aabc75c4ce181e687b066ca..1d70e67da631b9624a0cdcfab13f5b2ab2a2e5de 100644 --- a/Framework/Algorithms/src/GetQsInQENSData.cpp +++ b/Framework/Algorithms/src/GetQsInQENSData.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/GetQsInQENSData.h" @@ -88,7 +88,7 @@ void GetQsInQENSData::exec() { * @return The extracted Q-values as a vector. */ MantidVec GetQsInQENSData::extractQValues( - const Mantid::API::MatrixWorkspace_sptr workspace) { + const Mantid::API::MatrixWorkspace_sptr &workspace) { size_t numSpectra = workspace->getNumberHistograms(); Axis *qAxis; diff --git a/Framework/Algorithms/src/GetTimeSeriesLogInformation.cpp b/Framework/Algorithms/src/GetTimeSeriesLogInformation.cpp index b25003790a1606e9b5dd7e5c502eaeaa5ee055ec..531e79371687406d82ed0fec125bb6d733bd3dc1 100644 --- a/Framework/Algorithms/src/GetTimeSeriesLogInformation.cpp +++ b/Framework/Algorithms/src/GetTimeSeriesLogInformation.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/GetTimeSeriesLogInformation.h" #include "MantidAPI/Run.h" @@ -299,7 +299,7 @@ TableWorkspace_sptr GetTimeSeriesLogInformation::generateStatisticTable() { * * This algorithm should be reconsidered how to work with it. */ -void GetTimeSeriesLogInformation::exportErrorLog(MatrixWorkspace_sptr ws, +void GetTimeSeriesLogInformation::exportErrorLog(const MatrixWorkspace_sptr &ws, vector<DateAndTime> abstimevec, double dts) { std::string outputdir = getProperty("OutputDirectory"); diff --git a/Framework/Algorithms/src/GravitySANSHelper.cpp b/Framework/Algorithms/src/GravitySANSHelper.cpp index d47138d387d936794849d9132c9f5188d357ef99..9b49609b171d5a2922e2a82bddd40e4b992d81c3 100644 --- a/Framework/Algorithms/src/GravitySANSHelper.cpp +++ b/Framework/Algorithms/src/GravitySANSHelper.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/GravitySANSHelper.h" #include "MantidAPI/SpectrumInfo.h" diff --git a/Framework/Algorithms/src/GroupToXResolution.cpp b/Framework/Algorithms/src/GroupToXResolution.cpp index 8773c58b7d3892a0d67bffc1e505f9f755ff4fe3..f9fcec2a339926707138d59ea1bfa2c6ca732411 100644 --- a/Framework/Algorithms/src/GroupToXResolution.cpp +++ b/Framework/Algorithms/src/GroupToXResolution.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/GroupToXResolution.h" diff --git a/Framework/Algorithms/src/GroupWorkspaces.cpp b/Framework/Algorithms/src/GroupWorkspaces.cpp index 65e739af082f552b16b9424e1a4b76c06c1a4dfe..f76ef85a51036e7a19390ba3a5cf921ac0f07ab4 100644 --- a/Framework/Algorithms/src/GroupWorkspaces.cpp +++ b/Framework/Algorithms/src/GroupWorkspaces.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/GroupWorkspaces.h" #include "MantidAPI/ADSValidator.h" diff --git a/Framework/Algorithms/src/HRPDSlabCanAbsorption.cpp b/Framework/Algorithms/src/HRPDSlabCanAbsorption.cpp index 40d13f0701fde77e45977d375ed401ce71d52e29..5ca8d596a1090d7926d00e7f5d69440f71b1bb70 100644 --- a/Framework/Algorithms/src/HRPDSlabCanAbsorption.cpp +++ b/Framework/Algorithms/src/HRPDSlabCanAbsorption.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/HRPDSlabCanAbsorption.h" #include "MantidAPI/MatrixWorkspace.h" diff --git a/Framework/Algorithms/src/He3TubeEfficiency.cpp b/Framework/Algorithms/src/He3TubeEfficiency.cpp index 430d38dbe4085093a182e9183fb0f4680f783edb..2c71546a9c36d506b20ce5311a9b17e6c7aaae60 100644 --- a/Framework/Algorithms/src/He3TubeEfficiency.cpp +++ b/Framework/Algorithms/src/He3TubeEfficiency.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/He3TubeEfficiency.h" #include "MantidAPI/Axis.h" @@ -381,9 +381,9 @@ void He3TubeEfficiency::logErrors() const { * @param idet :: the current detector * @return the value of the detector property */ -double He3TubeEfficiency::getParameter(std::string wsPropName, +double He3TubeEfficiency::getParameter(const std::string &wsPropName, std::size_t currentIndex, - std::string detPropName, + const std::string &detPropName, const Geometry::IDetector &idet) { std::vector<double> wsProp = this->getProperty(wsPropName); diff --git a/Framework/Algorithms/src/HyspecScharpfCorrection.cpp b/Framework/Algorithms/src/HyspecScharpfCorrection.cpp index 0efaf0b98472033088d6e8896f15905a60137afa..853bcb8e5bd91bd9d19cec2ec143bfd2222b55c5 100644 --- a/Framework/Algorithms/src/HyspecScharpfCorrection.cpp +++ b/Framework/Algorithms/src/HyspecScharpfCorrection.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/HyspecScharpfCorrection.h" #include "MantidAPI/InstrumentValidator.h" diff --git a/Framework/Algorithms/src/IQTransform.cpp b/Framework/Algorithms/src/IQTransform.cpp index e79818a4309a1df95087eac757caf01cd098b28b..4f289f16ee27a142c19425ccf7ab99008382ad10 100644 --- a/Framework/Algorithms/src/IQTransform.cpp +++ b/Framework/Algorithms/src/IQTransform.cpp @@ -1,18 +1,20 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes //---------------------------------------------------------------------- -#include "MantidAlgorithms/IQTransform.h" +#include <utility> + #include "MantidAPI/Axis.h" #include "MantidAPI/IncreasingAxisValidator.h" #include "MantidAPI/MatrixWorkspace.h" #include "MantidAPI/RawCountValidator.h" #include "MantidAPI/WorkspaceUnitValidator.h" +#include "MantidAlgorithms/IQTransform.h" #include "MantidDataObjects/TableWorkspace.h" #include "MantidDataObjects/Workspace2D.h" #include "MantidDataObjects/WorkspaceCreation.h" @@ -157,11 +159,11 @@ void IQTransform::exec() { * @param background The workspace containing the background values */ API::MatrixWorkspace_sptr -IQTransform::subtractBackgroundWS(API::MatrixWorkspace_sptr ws, - API::MatrixWorkspace_sptr background) { +IQTransform::subtractBackgroundWS(const API::MatrixWorkspace_sptr &ws, + const API::MatrixWorkspace_sptr &background) { g_log.debug() << "Subtracting the workspace " << background->getName() << " from the input workspace.\n"; - return ws - background; + return std::move(ws) - background; } /** @name Available transformation functions */ @@ -172,7 +174,7 @@ IQTransform::subtractBackgroundWS(API::MatrixWorkspace_sptr ws, * @throw std::range_error if an attempt is made to take log of a negative * number */ -void IQTransform::guinierSpheres(API::MatrixWorkspace_sptr ws) { +void IQTransform::guinierSpheres(const API::MatrixWorkspace_sptr &ws) { auto &X = ws->mutableX(0); auto &Y = ws->mutableY(0); auto &E = ws->mutableE(0); @@ -192,7 +194,7 @@ void IQTransform::guinierSpheres(API::MatrixWorkspace_sptr ws) { * @throw std::range_error if an attempt is made to take log of a negative * number */ -void IQTransform::guinierRods(API::MatrixWorkspace_sptr ws) { +void IQTransform::guinierRods(const API::MatrixWorkspace_sptr &ws) { auto &X = ws->mutableX(0); auto &Y = ws->mutableY(0); auto &E = ws->mutableE(0); @@ -215,7 +217,7 @@ void IQTransform::guinierRods(API::MatrixWorkspace_sptr ws) { * @throw std::range_error if an attempt is made to take log of a negative * number */ -void IQTransform::guinierSheets(API::MatrixWorkspace_sptr ws) { +void IQTransform::guinierSheets(const API::MatrixWorkspace_sptr &ws) { auto &X = ws->mutableX(0); auto &Y = ws->mutableY(0); auto &E = ws->mutableE(0); @@ -237,7 +239,7 @@ void IQTransform::guinierSheets(API::MatrixWorkspace_sptr ws) { * The output is set to zero for negative input Y values * @param ws The workspace to be transformed */ -void IQTransform::zimm(API::MatrixWorkspace_sptr ws) { +void IQTransform::zimm(const API::MatrixWorkspace_sptr &ws) { auto &X = ws->mutableX(0); auto &Y = ws->mutableY(0); auto &E = ws->mutableE(0); @@ -261,7 +263,7 @@ void IQTransform::zimm(API::MatrixWorkspace_sptr ws) { * The output is set to zero for negative input Y values * @param ws The workspace to be transformed */ -void IQTransform::debyeBueche(API::MatrixWorkspace_sptr ws) { +void IQTransform::debyeBueche(const API::MatrixWorkspace_sptr &ws) { auto &X = ws->mutableX(0); auto &Y = ws->mutableY(0); auto &E = ws->mutableE(0); @@ -284,7 +286,7 @@ void IQTransform::debyeBueche(API::MatrixWorkspace_sptr ws) { /** Performs the Holtzer transformation: IQ v Q * @param ws The workspace to be transformed */ -void IQTransform::holtzer(API::MatrixWorkspace_sptr ws) { +void IQTransform::holtzer(const API::MatrixWorkspace_sptr &ws) { auto &X = ws->mutableX(0); auto &Y = ws->mutableY(0); auto &E = ws->mutableE(0); @@ -299,7 +301,7 @@ void IQTransform::holtzer(API::MatrixWorkspace_sptr ws) { /** Performs the Kratky transformation: IQ^2 v Q * @param ws The workspace to be transformed */ -void IQTransform::kratky(API::MatrixWorkspace_sptr ws) { +void IQTransform::kratky(const API::MatrixWorkspace_sptr &ws) { auto &X = ws->mutableX(0); auto &Y = ws->mutableY(0); auto &E = ws->mutableE(0); @@ -317,7 +319,7 @@ void IQTransform::kratky(API::MatrixWorkspace_sptr ws) { /** Performs the Porod transformation: IQ^4 v Q * @param ws The workspace to be transformed */ -void IQTransform::porod(API::MatrixWorkspace_sptr ws) { +void IQTransform::porod(const API::MatrixWorkspace_sptr &ws) { auto &X = ws->mutableX(0); auto &Y = ws->mutableY(0); auto &E = ws->mutableE(0); @@ -337,7 +339,7 @@ void IQTransform::porod(API::MatrixWorkspace_sptr ws) { * @throw std::range_error if an attempt is made to take log of a negative * number */ -void IQTransform::logLog(API::MatrixWorkspace_sptr ws) { +void IQTransform::logLog(const API::MatrixWorkspace_sptr &ws) { auto &X = ws->mutableX(0); auto &Y = ws->mutableY(0); auto &E = ws->mutableE(0); @@ -360,7 +362,7 @@ void IQTransform::logLog(API::MatrixWorkspace_sptr ws) { * @throw std::range_error if an attempt is made to take log of a negative * number */ -void IQTransform::general(API::MatrixWorkspace_sptr ws) { +void IQTransform::general(const API::MatrixWorkspace_sptr &ws) { auto &X = ws->mutableX(0); auto &Y = ws->mutableY(0); auto &E = ws->mutableE(0); diff --git a/Framework/Algorithms/src/IdentifyNoisyDetectors.cpp b/Framework/Algorithms/src/IdentifyNoisyDetectors.cpp index 3aeb33db4a480657ee8b3e813cd914a2333385d5..a60e373cc3918313aaea2ff815afff2435a2363a 100644 --- a/Framework/Algorithms/src/IdentifyNoisyDetectors.cpp +++ b/Framework/Algorithms/src/IdentifyNoisyDetectors.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/IdentifyNoisyDetectors.h" #include "MantidAPI/HistogramValidator.h" @@ -149,8 +149,8 @@ void IdentifyNoisyDetectors::exec() { * @param values :: stddeviations of each spectra (I think) */ void IdentifyNoisyDetectors::getStdDev(API::Progress &progress, - MatrixWorkspace_sptr valid, - MatrixWorkspace_sptr values) { + const MatrixWorkspace_sptr &valid, + const MatrixWorkspace_sptr &values) { const auto nhist = static_cast<int>(valid->getNumberHistograms()); int count = 0; double mean = 0.0; diff --git a/Framework/Algorithms/src/IntegrateByComponent.cpp b/Framework/Algorithms/src/IntegrateByComponent.cpp index 15d021253e77075de6878271bc1a4f478a32f3f2..f0da9938dff934b73e7fb7b3b3d05d9d2a26cc7c 100644 --- a/Framework/Algorithms/src/IntegrateByComponent.cpp +++ b/Framework/Algorithms/src/IntegrateByComponent.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/IntegrateByComponent.h" #include "MantidAPI/HistogramValidator.h" @@ -158,8 +158,8 @@ void IntegrateByComponent::exec() { * @return vector of vectors, containing each spectrum that belongs to each * group */ -std::vector<std::vector<size_t>> -IntegrateByComponent::makeInstrumentMap(API::MatrixWorkspace_sptr countsWS) { +std::vector<std::vector<size_t>> IntegrateByComponent::makeInstrumentMap( + const API::MatrixWorkspace_sptr &countsWS) { std::vector<std::vector<size_t>> mymap; std::vector<size_t> single; @@ -178,7 +178,8 @@ IntegrateByComponent::makeInstrumentMap(API::MatrixWorkspace_sptr countsWS) { * group */ std::vector<std::vector<size_t>> -IntegrateByComponent::makeMap(API::MatrixWorkspace_sptr countsWS, int parents) { +IntegrateByComponent::makeMap(const API::MatrixWorkspace_sptr &countsWS, + int parents) { std::unordered_multimap<Mantid::Geometry::ComponentID, size_t> mymap; if (parents == 0) // this should not happen in this file, but if one reuses diff --git a/Framework/Algorithms/src/IntegrateEPP.cpp b/Framework/Algorithms/src/IntegrateEPP.cpp index 8a1c96915ca4b51881ae8accef12fb684171a629..2cfc9b55facae0a735cf41c6cc279267185d9fba 100644 --- a/Framework/Algorithms/src/IntegrateEPP.cpp +++ b/Framework/Algorithms/src/IntegrateEPP.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/IntegrateEPP.h" diff --git a/Framework/Algorithms/src/Integration.cpp b/Framework/Algorithms/src/Integration.cpp index 10401c8ee997017dadc5faa7e9001a0a1f8d3162..0db822108e6a91eaaddb5bc5f53c74aa6a61dc12 100644 --- a/Framework/Algorithms/src/Integration.cpp +++ b/Framework/Algorithms/src/Integration.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes @@ -349,9 +349,9 @@ void Integration::exec() { /** * Uses rebin to reduce event workspaces to a single bin histogram */ -API::MatrixWorkspace_sptr -Integration::rangeFilterEventWorkspace(API::MatrixWorkspace_sptr workspace, - double minRange, double maxRange) { +API::MatrixWorkspace_sptr Integration::rangeFilterEventWorkspace( + const API::MatrixWorkspace_sptr &workspace, double minRange, + double maxRange) { bool childLog = g_log.is(Logger::Priority::PRIO_DEBUG); auto childAlg = createChildAlgorithm("Rebin", 0, 0.5, childLog); childAlg->setProperty("InputWorkspace", workspace); diff --git a/Framework/Algorithms/src/InterpolatingRebin.cpp b/Framework/Algorithms/src/InterpolatingRebin.cpp index d4fee2dc18cefb691bda92c0e9b7387981c0651c..05466d4790c93ac2603e41b6c27ec219a2a16e96 100644 --- a/Framework/Algorithms/src/InterpolatingRebin.cpp +++ b/Framework/Algorithms/src/InterpolatingRebin.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/InterpolatingRebin.h" #include "MantidAPI/Axis.h" @@ -144,9 +144,9 @@ void InterpolatingRebin::exec() { * the histograms must corrospond with the number of x-values in XValues_new */ void InterpolatingRebin::outputYandEValues( - API::MatrixWorkspace_const_sptr inputW, + const API::MatrixWorkspace_const_sptr &inputW, const HistogramData::BinEdges &XValues_new, - API::MatrixWorkspace_sptr outputW) { + const API::MatrixWorkspace_sptr &outputW) { g_log.debug() << "Preparing to calculate y-values using splines and estimate errors\n"; diff --git a/Framework/Algorithms/src/InterpolationOption.cpp b/Framework/Algorithms/src/InterpolationOption.cpp index b379dab05e95d8b7ac4f3f5579370b40bad3ca94..3358c985d2341d2135c84ed7d361c6b7dc2b0b58 100644 --- a/Framework/Algorithms/src/InterpolationOption.cpp +++ b/Framework/Algorithms/src/InterpolationOption.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/InterpolationOption.h" #include "MantidHistogramData/Histogram.h" diff --git a/Framework/Algorithms/src/InvertMask.cpp b/Framework/Algorithms/src/InvertMask.cpp index 5ed3ca4dc5e797ce4e10e394f67a898bf29d8096..2bdd327cf388ab780595d84f22972bb03494d402 100644 --- a/Framework/Algorithms/src/InvertMask.cpp +++ b/Framework/Algorithms/src/InvertMask.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/InvertMask.h" #include "MantidAPI/WorkspaceProperty.h" diff --git a/Framework/Algorithms/src/LineProfile.cpp b/Framework/Algorithms/src/LineProfile.cpp index c817e61112500fa08fb124f1f9dc9470408cd1fc..21a73622474cc80f3fa809e8c852d655293a7af1 100644 --- a/Framework/Algorithms/src/LineProfile.cpp +++ b/Framework/Algorithms/src/LineProfile.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/LineProfile.h" diff --git a/Framework/Algorithms/src/Logarithm.cpp b/Framework/Algorithms/src/Logarithm.cpp index 7b0ffcb44fd208baa8b95c47d2535909f00c0c16..1091b6dad41ecf7170fad4b62acb765439422d45 100644 --- a/Framework/Algorithms/src/Logarithm.cpp +++ b/Framework/Algorithms/src/Logarithm.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/Logarithm.h" #include "MantidAPI/WorkspaceProperty.h" diff --git a/Framework/Algorithms/src/LorentzCorrection.cpp b/Framework/Algorithms/src/LorentzCorrection.cpp index ed27387e8de2ab06284a92f137a62061c2e22882..55b21a516e2e37a5b3e8d1353ab180b5fbc5bc80 100644 --- a/Framework/Algorithms/src/LorentzCorrection.cpp +++ b/Framework/Algorithms/src/LorentzCorrection.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/LorentzCorrection.h" #include "MantidAPI/Axis.h" diff --git a/Framework/Algorithms/src/MagFormFactorCorrection.cpp b/Framework/Algorithms/src/MagFormFactorCorrection.cpp index 40f5f512ad9f8fc18f747cacd3f383c301620dc5..d49836999fcbb4cecfe60c19affbdf2d9764ea44 100644 --- a/Framework/Algorithms/src/MagFormFactorCorrection.cpp +++ b/Framework/Algorithms/src/MagFormFactorCorrection.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/MagFormFactorCorrection.h" #include "MantidAPI/AnalysisDataService.h" @@ -96,9 +96,11 @@ void MagFormFactorCorrection::exec() { // Gets the vector of form factor values std::vector<double> FF; FF.reserve(Qvals.size()); - for (double Qval : Qvals) { - FF.emplace_back(ion.analyticalFormFactor(Qval * Qval)); - } + + std::transform( + Qvals.begin(), Qvals.end(), std::back_inserter(FF), + [&ion](double qval) { return ion.analyticalFormFactor(qval * qval); }); + if (!ffwsStr.empty()) { HistogramBuilder builder; builder.setX(Qvals.size()); diff --git a/Framework/Algorithms/src/MaskBins.cpp b/Framework/Algorithms/src/MaskBins.cpp index 443102ee62ca2342ac25310ca0db23c3a928a2aa..7377f32ef3c4cd587f948ff5e63a7d403bb702ae 100644 --- a/Framework/Algorithms/src/MaskBins.cpp +++ b/Framework/Algorithms/src/MaskBins.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/MaskBins.h" #include "MantidAPI/Algorithm.tcc" diff --git a/Framework/Algorithms/src/MaskBinsFromTable.cpp b/Framework/Algorithms/src/MaskBinsFromTable.cpp index 06c2cc6d611a437fb8b9f0fbc430c4bee2c2663e..e951b48c5bf1c21f124a9448507793c0c05269f4 100644 --- a/Framework/Algorithms/src/MaskBinsFromTable.cpp +++ b/Framework/Algorithms/src/MaskBinsFromTable.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/MaskBinsFromTable.h" #include "MantidAPI/HistogramValidator.h" @@ -68,7 +68,7 @@ void MaskBinsFromTable::exec() { /** Call MaskBins * @param dataws :: MatrixWorkspace to mask bins for */ -void MaskBinsFromTable::maskBins(API::MatrixWorkspace_sptr dataws) { +void MaskBinsFromTable::maskBins(const API::MatrixWorkspace_sptr &dataws) { bool firstloop = true; API::MatrixWorkspace_sptr outputws; @@ -134,7 +134,8 @@ void MaskBinsFromTable::maskBins(API::MatrixWorkspace_sptr dataws) { * @param dataws :: MatrixWorkspace to mask */ void MaskBinsFromTable::processMaskBinWorkspace( - TableWorkspace_sptr masktblws, API::MatrixWorkspace_sptr dataws) { + const TableWorkspace_sptr &masktblws, + const API::MatrixWorkspace_sptr &dataws) { // Check input if (!masktblws) throw std::invalid_argument("Input workspace is not a table workspace."); @@ -213,8 +214,8 @@ void MaskBinsFromTable::processMaskBinWorkspace( * @return :: list of spectra/workspace index IDs in string format */ std::string -MaskBinsFromTable::convertToSpectraList(API::MatrixWorkspace_sptr dataws, - std::string detidliststr) { +MaskBinsFromTable::convertToSpectraList(const API::MatrixWorkspace_sptr &dataws, + const std::string &detidliststr) { // Use array property to get a list of detectors vector<int> detidvec; ArrayProperty<int> parser("detids", detidliststr); diff --git a/Framework/Algorithms/src/MaskBinsFromWorkspace.cpp b/Framework/Algorithms/src/MaskBinsFromWorkspace.cpp index 0a1c51c6fd9b8eef6e403bbe0101f5b85eb27650..150979c1d66b6f2bccc801670d7358b2a7a3f975 100644 --- a/Framework/Algorithms/src/MaskBinsFromWorkspace.cpp +++ b/Framework/Algorithms/src/MaskBinsFromWorkspace.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/MaskBinsFromWorkspace.h" #include "MantidAPI/Algorithm.tcc" diff --git a/Framework/Algorithms/src/MaskBinsIf.cpp b/Framework/Algorithms/src/MaskBinsIf.cpp index 43a3fa079268b5956c564aaa535d5b0c1022e0bd..320aa4106aee1dbbd4b3fbc44c8ae01baebe9522 100644 --- a/Framework/Algorithms/src/MaskBinsIf.cpp +++ b/Framework/Algorithms/src/MaskBinsIf.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/MaskBinsIf.h" #include "MantidAPI/MatrixWorkspace.h" diff --git a/Framework/Algorithms/src/MaskDetectorsIf.cpp b/Framework/Algorithms/src/MaskDetectorsIf.cpp index ed651bf4f8657c875d16d48a37bf900cfd9d5bd7..061539c744fdd433d851aa007757c57a8092ead8 100644 --- a/Framework/Algorithms/src/MaskDetectorsIf.cpp +++ b/Framework/Algorithms/src/MaskDetectorsIf.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/MaskDetectorsIf.h" #include "MantidAPI/FileProperty.h" diff --git a/Framework/Algorithms/src/MaskInstrument.cpp b/Framework/Algorithms/src/MaskInstrument.cpp index 272ac2e7bd1513530b290e79e3c761f617a33c9e..6b703b6d2b117d4d446476efacd4ece6df7f8d57 100644 --- a/Framework/Algorithms/src/MaskInstrument.cpp +++ b/Framework/Algorithms/src/MaskInstrument.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/MaskInstrument.h" #include "MantidAPI/MatrixWorkspace.h" diff --git a/Framework/Algorithms/src/MaskNonOverlappingBins.cpp b/Framework/Algorithms/src/MaskNonOverlappingBins.cpp index 12d50bd2d478421eff495fa3cf008e2044d29be5..188838ac67ba8e4ef9abbf9e08786e2d1b889af2 100644 --- a/Framework/Algorithms/src/MaskNonOverlappingBins.cpp +++ b/Framework/Algorithms/src/MaskNonOverlappingBins.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/MaskNonOverlappingBins.h" diff --git a/Framework/Algorithms/src/MatrixWorkspaceAccess.cpp b/Framework/Algorithms/src/MatrixWorkspaceAccess.cpp index c9716b526c5c91c4e82e1ead79ee49069195d019..89f68311292be8dcebfd0794453bd24782a2eaeb 100644 --- a/Framework/Algorithms/src/MatrixWorkspaceAccess.cpp +++ b/Framework/Algorithms/src/MatrixWorkspaceAccess.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/MatrixWorkspaceAccess.h" diff --git a/Framework/Algorithms/src/Max.cpp b/Framework/Algorithms/src/Max.cpp index 4a36d45069f4258d7b30f0c6d6215df0bab9272a..3a1ec9e6429db3c45fed336223850c80d600aca6 100644 --- a/Framework/Algorithms/src/Max.cpp +++ b/Framework/Algorithms/src/Max.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/Algorithms/src/MaxEnt.cpp b/Framework/Algorithms/src/MaxEnt.cpp index 8c3c42d81c8cf4d33e62e12b3c386b81a72cef67..bfbf95127907bc20710ec00d24315ace441bd0aa 100644 --- a/Framework/Algorithms/src/MaxEnt.cpp +++ b/Framework/Algorithms/src/MaxEnt.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/MaxEnt.h" #include "MantidAPI/EqualBinSizesValidator.h" @@ -826,7 +826,7 @@ std::vector<double> MaxEnt::applyDistancePenalty( std::vector<double> MaxEnt::updateImage(const std::vector<double> &image, const std::vector<double> &delta, - const std::vector<std::vector<double>> dirs) { + const std::vector<std::vector<double>> &dirs) { if (image.empty() || dirs.empty() || (delta.size() != dirs.size())) { throw std::runtime_error("Cannot calculate new image"); diff --git a/Framework/Algorithms/src/MaxEnt/MaxentCalculator.cpp b/Framework/Algorithms/src/MaxEnt/MaxentCalculator.cpp index 83f7694a38556dfb4bbd2abfc871bb4d136b9d77..4b9603e8f2b861bd3a2d4493ef45d1b6121b79f1 100644 --- a/Framework/Algorithms/src/MaxEnt/MaxentCalculator.cpp +++ b/Framework/Algorithms/src/MaxEnt/MaxentCalculator.cpp @@ -1,11 +1,12 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/MaxEnt/MaxentCalculator.h" #include <cmath> +#include <utility> namespace Mantid { namespace Algorithms { @@ -21,7 +22,7 @@ MaxentCalculator::MaxentCalculator(MaxentEntropy_sptr entropy, MaxentTransform_sptr transform) : m_data(), m_errors(), m_image(), m_dataCalc(), m_background(1.0), m_angle(-1.), m_chisq(-1.), m_directionsIm(), m_coeffs(), - m_entropy(entropy), m_transform(transform) {} + m_entropy(std::move(entropy)), m_transform(std::move(transform)) {} /** * Calculates the gradient of chi-square using the experimental data, calculated diff --git a/Framework/Algorithms/src/MaxEnt/MaxentEntropyNegativeValues.cpp b/Framework/Algorithms/src/MaxEnt/MaxentEntropyNegativeValues.cpp index 17db7ad537c6194401fb5af1ebfd7434437419af..a002934e62635b15571455043f3dc55a570d37b9 100644 --- a/Framework/Algorithms/src/MaxEnt/MaxentEntropyNegativeValues.cpp +++ b/Framework/Algorithms/src/MaxEnt/MaxentEntropyNegativeValues.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/MaxEnt/MaxentEntropyNegativeValues.h" #include <cmath> diff --git a/Framework/Algorithms/src/MaxEnt/MaxentEntropyPositiveValues.cpp b/Framework/Algorithms/src/MaxEnt/MaxentEntropyPositiveValues.cpp index f1e158877a40b0042aaffcfb5bc1dae0e5e9f18c..9e780c140d06012e9c83f10523f69ce2d6ee633a 100644 --- a/Framework/Algorithms/src/MaxEnt/MaxentEntropyPositiveValues.cpp +++ b/Framework/Algorithms/src/MaxEnt/MaxentEntropyPositiveValues.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/MaxEnt/MaxentEntropyPositiveValues.h" #include <cmath> diff --git a/Framework/Algorithms/src/MaxEnt/MaxentSpaceComplex.cpp b/Framework/Algorithms/src/MaxEnt/MaxentSpaceComplex.cpp index 05d5791c525b7b2047c830ffb27a11ce6cf21b33..e0deb1573060936ff677c3516e49008014376f97 100644 --- a/Framework/Algorithms/src/MaxEnt/MaxentSpaceComplex.cpp +++ b/Framework/Algorithms/src/MaxEnt/MaxentSpaceComplex.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/MaxEnt/MaxentSpaceComplex.h" #include <cmath> diff --git a/Framework/Algorithms/src/MaxEnt/MaxentSpaceReal.cpp b/Framework/Algorithms/src/MaxEnt/MaxentSpaceReal.cpp index 465aaa01fc6d88ce7572f0fb236475c4f7a4bc96..f2a25423d44b5777d517c76ad020accd58fc7909 100644 --- a/Framework/Algorithms/src/MaxEnt/MaxentSpaceReal.cpp +++ b/Framework/Algorithms/src/MaxEnt/MaxentSpaceReal.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/MaxEnt/MaxentSpaceReal.h" #include <stdexcept> diff --git a/Framework/Algorithms/src/MaxEnt/MaxentTransformFourier.cpp b/Framework/Algorithms/src/MaxEnt/MaxentTransformFourier.cpp index ebc39d7a72c1021b2498f283b3247b8fe29b793e..ed0aabea5546a4eaadc44f1c60548a702c1c728a 100644 --- a/Framework/Algorithms/src/MaxEnt/MaxentTransformFourier.cpp +++ b/Framework/Algorithms/src/MaxEnt/MaxentTransformFourier.cpp @@ -1,11 +1,13 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/MaxEnt/MaxentTransformFourier.h" #include <boost/shared_array.hpp> +#include <utility> + #include <gsl/gsl_fft_complex.h> namespace Mantid { @@ -14,7 +16,7 @@ namespace Algorithms { /** Constructor */ MaxentTransformFourier::MaxentTransformFourier(MaxentSpace_sptr dataSpace, MaxentSpace_sptr imageSpace) - : m_dataSpace(dataSpace), m_imageSpace(imageSpace) {} + : m_dataSpace(std::move(dataSpace)), m_imageSpace(std::move(imageSpace)) {} /** * Transforms a 1D signal from image space to data space, performing an diff --git a/Framework/Algorithms/src/MaxEnt/MaxentTransformMultiFourier.cpp b/Framework/Algorithms/src/MaxEnt/MaxentTransformMultiFourier.cpp index 652c1f07eacb89758edfa600d386f4bc805d5254..7b9e4f392cf82279089da2617ef269244ff7731e 100644 --- a/Framework/Algorithms/src/MaxEnt/MaxentTransformMultiFourier.cpp +++ b/Framework/Algorithms/src/MaxEnt/MaxentTransformMultiFourier.cpp @@ -1,21 +1,23 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/MaxEnt/MaxentTransformMultiFourier.h" #include <gsl/gsl_fft_complex.h> +#include <utility> + namespace Mantid { namespace Algorithms { /** Constructor */ MaxentTransformMultiFourier::MaxentTransformMultiFourier( - MaxentSpaceComplex_sptr dataSpace, MaxentSpace_sptr imageSpace, + const MaxentSpaceComplex_sptr &dataSpace, MaxentSpace_sptr imageSpace, size_t numSpec) - : MaxentTransformFourier(dataSpace, imageSpace), m_numSpec(numSpec), - m_linearAdjustments(), m_constAdjustments() {} + : MaxentTransformFourier(dataSpace, std::move(imageSpace)), + m_numSpec(numSpec), m_linearAdjustments(), m_constAdjustments() {} /** * Transforms a 1D signal from image space to data space, performing an @@ -40,9 +42,7 @@ MaxentTransformMultiFourier::imageToData(const std::vector<double> &image) { std::vector<double> data; data.reserve(m_numSpec * dataOneSpec.size()); for (size_t s = 0; s < m_numSpec; s++) { - for (const double &data_item : dataOneSpec) { - data.emplace_back(data_item); - } + std::copy(dataOneSpec.begin(), dataOneSpec.end(), std::back_inserter(data)); } // Apply adjustments (we assume there are sufficient adjustments supplied) diff --git a/Framework/Algorithms/src/MaxMin.cpp b/Framework/Algorithms/src/MaxMin.cpp index 6b4f1415d41bb9d4ace7ab09203fbb595b1267a3..988ec4ec680b57ee620e99555acefca147c02b39 100644 --- a/Framework/Algorithms/src/MaxMin.cpp +++ b/Framework/Algorithms/src/MaxMin.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/Algorithms/src/MedianDetectorTest.cpp b/Framework/Algorithms/src/MedianDetectorTest.cpp index 8e41cd13df35479308e9cf3ae709d73b562d7f87..e385cbf6f9e4301f93ed55c0af35c1f9281f0152 100644 --- a/Framework/Algorithms/src/MedianDetectorTest.cpp +++ b/Framework/Algorithms/src/MedianDetectorTest.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/MedianDetectorTest.h" #include "MantidAPI/HistogramValidator.h" @@ -238,7 +238,8 @@ API::MatrixWorkspace_sptr MedianDetectorTest::getSolidAngles(int firstSpec, * @returns The number failed. */ int MedianDetectorTest::maskOutliers( - const std::vector<double> medianvec, API::MatrixWorkspace_sptr countsWS, + const std::vector<double> &medianvec, + const API::MatrixWorkspace_sptr &countsWS, std::vector<std::vector<size_t>> indexmap) { // Fractions of the median @@ -300,10 +301,10 @@ int MedianDetectorTest::maskOutliers( * skipped. */ int MedianDetectorTest::doDetectorTests( - const API::MatrixWorkspace_sptr countsWS, - const std::vector<double> medianvec, + const API::MatrixWorkspace_sptr &countsWS, + const std::vector<double> &medianvec, std::vector<std::vector<size_t>> indexmap, - API::MatrixWorkspace_sptr maskWS) { + const API::MatrixWorkspace_sptr &maskWS) { g_log.debug("Applying the criteria to find failing detectors"); // A spectra can't fail if the statistics show its value is consistent with diff --git a/Framework/Algorithms/src/MergeLogs.cpp b/Framework/Algorithms/src/MergeLogs.cpp index ce86dc244a723bbd611ead153f25b8b85ac3988e..2edbe27fb1f30a8e8330d9113497b578e7752e50 100644 --- a/Framework/Algorithms/src/MergeLogs.cpp +++ b/Framework/Algorithms/src/MergeLogs.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/MergeLogs.h" #include "MantidAPI/MatrixWorkspace.h" diff --git a/Framework/Algorithms/src/MergeRuns.cpp b/Framework/Algorithms/src/MergeRuns.cpp index bc652381e516da2813ab285541803bb181e1dcd5..b8835ea3fbdd340a016dd1996b997842c8f6016f 100644 --- a/Framework/Algorithms/src/MergeRuns.cpp +++ b/Framework/Algorithms/src/MergeRuns.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/MergeRuns.h" diff --git a/Framework/Algorithms/src/Min.cpp b/Framework/Algorithms/src/Min.cpp index 805d5c3d19a29c8293b11668b49ca73723853f19..6de90c10757761fdfe3666989f8262e92f9412f6 100644 --- a/Framework/Algorithms/src/Min.cpp +++ b/Framework/Algorithms/src/Min.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/Algorithms/src/Minus.cpp b/Framework/Algorithms/src/Minus.cpp index f5598050c3521146e35cc9966a3e96ac445df13e..12999ca54492af943a544ab43cf462b8c8d49c5f 100644 --- a/Framework/Algorithms/src/Minus.cpp +++ b/Framework/Algorithms/src/Minus.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/Minus.h" #include "MantidKernel/VectorHelper.h" @@ -22,7 +22,7 @@ void Minus::performBinaryOperation(const HistogramData::Histogram &lhs, HistogramData::HistogramY &YOut, HistogramData::HistogramE &EOut) { std::transform(lhs.y().begin(), lhs.y().end(), rhs.y().begin(), YOut.begin(), - std::minus<double>()); + std::minus<>()); std::transform(lhs.e().begin(), lhs.e().end(), rhs.e().begin(), EOut.begin(), VectorHelper::SumGaussError<double>()); } @@ -33,12 +33,13 @@ void Minus::performBinaryOperation(const HistogramData::Histogram &lhs, HistogramData::HistogramE &EOut) { using std::placeholders::_1; std::transform(lhs.y().begin(), lhs.y().end(), YOut.begin(), - std::bind(std::minus<double>(), _1, rhsY)); + [rhsY](double l) { return l - rhsY; }); // Only do E if non-zero, otherwise just copy - if (rhsE != 0) + if (rhsE != 0) { + double rhsE2 = rhsE * rhsE; std::transform(lhs.e().begin(), lhs.e().end(), EOut.begin(), - std::bind(VectorHelper::SumGaussError<double>(), _1, rhsE)); - else + [rhsE2](double l) { return std::sqrt(l * l + rhsE2); }); + } else EOut = lhs.e(); } @@ -136,8 +137,8 @@ void Minus::checkRequirements() { * @return workspace unit compatibility flag */ bool Minus::checkUnitCompatibility( - const API::MatrixWorkspace_const_sptr lhs, - const API::MatrixWorkspace_const_sptr rhs) const { + const API::MatrixWorkspace_const_sptr &lhs, + const API::MatrixWorkspace_const_sptr &rhs) const { if (lhs->size() > 1 && rhs->size() > 1) { if (lhs->YUnit() != rhs->YUnit()) { g_log.error("The two workspaces are not compatible because they have " diff --git a/Framework/Algorithms/src/ModeratorTzero.cpp b/Framework/Algorithms/src/ModeratorTzero.cpp index 4a161af92c859bf3dd40471a902e3542b04533b5..67e1a3395f14356c10f7f78dcde053f8499ba141 100644 --- a/Framework/Algorithms/src/ModeratorTzero.cpp +++ b/Framework/Algorithms/src/ModeratorTzero.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/ModeratorTzero.h" #include "MantidAPI/Axis.h" @@ -354,9 +354,9 @@ void ModeratorTzero::execEvent(const std::string &emode) { evlist.mutableX() -= t0_direct; MantidVec tofs = evlist.getTofs(); - for (double &tof : tofs) { - tof -= t0_direct; - } + + std::transform(tofs.begin(), tofs.end(), tofs.begin(), + [&t0_direct](double tof) { return tof - t0_direct; }); evlist.setTofs(tofs); evlist.setSortOrder(Mantid::DataObjects::EventSortType::UNSORTED); } // end of else if(emode=="Direct") diff --git a/Framework/Algorithms/src/ModeratorTzeroLinear.cpp b/Framework/Algorithms/src/ModeratorTzeroLinear.cpp index 3b74008346f05eec37929f3ec6d642e8545af042..12901484321da38f04acf702ed4cf4e69e00d219 100644 --- a/Framework/Algorithms/src/ModeratorTzeroLinear.cpp +++ b/Framework/Algorithms/src/ModeratorTzeroLinear.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/ModeratorTzeroLinear.h" #include "MantidAPI/Axis.h" diff --git a/Framework/Algorithms/src/MonitorEfficiencyCorUser.cpp b/Framework/Algorithms/src/MonitorEfficiencyCorUser.cpp index fd227d35ec612c9c9e6fa4851c82e67d5e82cfa4..8c11ed8943e720abb0a161de07c4de53bfdbcaad 100644 --- a/Framework/Algorithms/src/MonitorEfficiencyCorUser.cpp +++ b/Framework/Algorithms/src/MonitorEfficiencyCorUser.cpp @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #include "MantidAlgorithms/MonitorEfficiencyCorUser.h" #include "MantidAPI/InstrumentValidator.h" #include "MantidAPI/MatrixWorkspace.h" diff --git a/Framework/Algorithms/src/MonteCarloAbsorption.cpp b/Framework/Algorithms/src/MonteCarloAbsorption.cpp index 01e3f4dbd0f8ca14db0174daf05d797294653f74..5e186b527464db29e33d4cedaa623243d9aa33da 100644 --- a/Framework/Algorithms/src/MonteCarloAbsorption.cpp +++ b/Framework/Algorithms/src/MonteCarloAbsorption.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/MonteCarloAbsorption.h" #include "MantidAPI/AnalysisDataService.h" diff --git a/Framework/Algorithms/src/MostLikelyMean.cpp b/Framework/Algorithms/src/MostLikelyMean.cpp index 6c4f436bf79069c0e8da967c27fee95da5b05932..8e77611c962aad2632507c8c9b73b22e85b1446b 100644 --- a/Framework/Algorithms/src/MostLikelyMean.cpp +++ b/Framework/Algorithms/src/MostLikelyMean.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/MostLikelyMean.h" #include "MantidKernel/ArrayLengthValidator.h" diff --git a/Framework/Algorithms/src/Multiply.cpp b/Framework/Algorithms/src/Multiply.cpp index f078e9affbf8a9d884dedc6a42cf0ca44593fae9..091ebc0de7f3803400cee7c9daba373e2b1a4609 100644 --- a/Framework/Algorithms/src/Multiply.cpp +++ b/Framework/Algorithms/src/Multiply.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/Multiply.h" diff --git a/Framework/Algorithms/src/MultiplyRange.cpp b/Framework/Algorithms/src/MultiplyRange.cpp index 7ced286e845dfdd715ad155e6308ae52a5047f55..f681b3ddbc40b83f9ca77b325b558854d2d04446 100644 --- a/Framework/Algorithms/src/MultiplyRange.cpp +++ b/Framework/Algorithms/src/MultiplyRange.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/Algorithms/src/NRCalculateSlitResolution.cpp b/Framework/Algorithms/src/NRCalculateSlitResolution.cpp index d89a93b54fe57cc3712fe3147230e5fb15a6aafe..e36026728e248ea3a5cd93ebd9c472e2dd83a177 100644 --- a/Framework/Algorithms/src/NRCalculateSlitResolution.cpp +++ b/Framework/Algorithms/src/NRCalculateSlitResolution.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/NRCalculateSlitResolution.h" #include "MantidAPI/InstrumentValidator.h" diff --git a/Framework/Algorithms/src/NormaliseByCurrent.cpp b/Framework/Algorithms/src/NormaliseByCurrent.cpp index 0c5af0fe07280c7b3a41543c4492f18ce611a1e5..fce8815e6c6d02bcfc7a2450a5edf127c6c3abb8 100644 --- a/Framework/Algorithms/src/NormaliseByCurrent.cpp +++ b/Framework/Algorithms/src/NormaliseByCurrent.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/NormaliseByCurrent.h" #include "MantidAPI/Run.h" @@ -45,7 +45,7 @@ void NormaliseByCurrent::init() { * workspace logs or if the values are invalid (0) */ double NormaliseByCurrent::extractCharge( - boost::shared_ptr<Mantid::API::MatrixWorkspace> inputWS, + const boost::shared_ptr<Mantid::API::MatrixWorkspace> &inputWS, const bool integratePCharge) const { // Get the good proton charge and check it's valid double charge(-1.0); diff --git a/Framework/Algorithms/src/NormaliseByDetector.cpp b/Framework/Algorithms/src/NormaliseByDetector.cpp index 1fa91ba45b9884919437088622d24b4cee8aedfd..a118ba7e13e61db4d457783f18513ad89b6e9750 100644 --- a/Framework/Algorithms/src/NormaliseByDetector.cpp +++ b/Framework/Algorithms/src/NormaliseByDetector.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/NormaliseByDetector.h" #include "MantidAPI/FunctionDomain1D.h" @@ -73,7 +73,7 @@ void NormaliseByDetector::init() { } const Geometry::FitParameter NormaliseByDetector::tryParseFunctionParameter( - Geometry::Parameter_sptr parameter, const Geometry::IDetector &det) { + const Geometry::Parameter_sptr ¶meter, const Geometry::IDetector &det) { if (parameter == nullptr) { std::stringstream stream; stream << det.getName() @@ -99,10 +99,9 @@ normalisation routine. use. @param prog: progress reporting object. */ -void NormaliseByDetector::processHistogram(size_t wsIndex, - MatrixWorkspace_const_sptr inWS, - MatrixWorkspace_sptr denominatorWS, - Progress &prog) { +void NormaliseByDetector::processHistogram( + size_t wsIndex, const MatrixWorkspace_const_sptr &inWS, + const MatrixWorkspace_sptr &denominatorWS, Progress &prog) { const auto ¶mMap = inWS->constInstrumentParameters(); const auto &spectrumInfo = inWS->spectrumInfo(); const auto &det = spectrumInfo.detector(wsIndex); @@ -164,7 +163,7 @@ sequentially. use. */ MatrixWorkspace_sptr -NormaliseByDetector::processHistograms(MatrixWorkspace_sptr inWS) { +NormaliseByDetector::processHistograms(const MatrixWorkspace_sptr &inWS) { const size_t nHistograms = inWS->getNumberHistograms(); const auto progress_items = static_cast<size_t>(double(nHistograms) * 1.2); Progress prog(this, 0.0, 1.0, progress_items); diff --git a/Framework/Algorithms/src/NormaliseToMonitor.cpp b/Framework/Algorithms/src/NormaliseToMonitor.cpp index 35c33cebf637a72857149ec3bf669e5dbd7007b8..bad96c37993a3e24f3bacb9263c0d2ecc818b242 100644 --- a/Framework/Algorithms/src/NormaliseToMonitor.cpp +++ b/Framework/Algorithms/src/NormaliseToMonitor.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/NormaliseToMonitor.h" #include "MantidAPI/HistogramValidator.h" @@ -102,7 +102,7 @@ void MonIDPropChanger::applyChanges(const IPropertyManager *algo, // read the monitors list from the workspace and try to do it once for any // particular ws; bool MonIDPropChanger::monitorIdReader( - MatrixWorkspace_const_sptr inputWS) const { + const MatrixWorkspace_const_sptr &inputWS) const { // no workspace if (!inputWS) return false; diff --git a/Framework/Algorithms/src/NormaliseToUnity.cpp b/Framework/Algorithms/src/NormaliseToUnity.cpp index 9cd40da8f55f0a0f60180a4d3b06b80861cc8ccb..c6a1892c0ae7d132d46610b29787aa81cb247acd 100644 --- a/Framework/Algorithms/src/NormaliseToUnity.cpp +++ b/Framework/Algorithms/src/NormaliseToUnity.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/Algorithms/src/OneMinusExponentialCor.cpp b/Framework/Algorithms/src/OneMinusExponentialCor.cpp index 70d301794c9a790011d3d501054124820ef95aae..3720fc2ee5d5dc59c3274bbe3d5fca34a918717a 100644 --- a/Framework/Algorithms/src/OneMinusExponentialCor.cpp +++ b/Framework/Algorithms/src/OneMinusExponentialCor.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/Algorithms/src/PDCalibration.cpp b/Framework/Algorithms/src/PDCalibration.cpp index d5e0e616a648cad66c6aaf90a94092c1d5203be1..a5de2509c4725be4aa58f533c5bfa965497156f3 100644 --- a/Framework/Algorithms/src/PDCalibration.cpp +++ b/Framework/Algorithms/src/PDCalibration.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/PDCalibration.h" #include "MantidAPI/FileProperty.h" @@ -70,7 +70,7 @@ const auto isNonZero = [](const double value) { return value != 0.; }; /// private inner class class PDCalibration::FittedPeaks { public: - FittedPeaks(API::MatrixWorkspace_const_sptr wksp, + FittedPeaks(const API::MatrixWorkspace_const_sptr &wksp, const std::size_t wkspIndex) { this->wkspIndex = wkspIndex; @@ -108,7 +108,7 @@ public: void setPositions(const std::vector<double> &peaksInD, const std::vector<double> &peaksInDWindows, - std::function<double(double)> toTof) { + const std::function<double(double)> &toTof) { // clear out old values inDPos.clear(); inTofPos.clear(); @@ -307,7 +307,7 @@ std::map<std::string, std::string> PDCalibration::validateInputs() { namespace { -bool hasDasIDs(API::ITableWorkspace_const_sptr table) { +bool hasDasIDs(const API::ITableWorkspace_const_sptr &table) { const auto columnNames = table->getColumnNames(); return (std::find(columnNames.begin(), columnNames.end(), std::string("dasid")) != columnNames.end()); @@ -755,14 +755,13 @@ double fitDIFCtZeroDIFA(std::vector<double> &peaks, double &difc, double &t0, size_t iter = 0; // number of iterations const size_t MAX_ITER = 75 * numParams; int status = 0; - double size; do { iter++; status = gsl_multimin_fminimizer_iterate(minimizer); if (status) break; - size = gsl_multimin_fminimizer_size(minimizer); + double size = gsl_multimin_fminimizer_size(minimizer); status = gsl_multimin_test_size(size, 1e-4); } while (status == GSL_CONTINUE && iter < MAX_ITER); @@ -939,7 +938,7 @@ vector<double> PDCalibration::getTOFminmax(const double difc, const double difa, return tofminmax; } -MatrixWorkspace_sptr PDCalibration::load(const std::string filename) { +MatrixWorkspace_sptr PDCalibration::load(const std::string &filename) { // TODO this assumes that all files are event-based const double maxChunkSize = getProperty("MaxChunkSize"); const double filterBadPulses = getProperty("FilterBadPulses"); @@ -1186,7 +1185,8 @@ PDCalibration::sortTableWorkspace(API::ITableWorkspace_sptr &table) { /// NEW: convert peak positions in dSpacing to peak centers workspace std::pair<API::MatrixWorkspace_sptr, API::MatrixWorkspace_sptr> PDCalibration::createTOFPeakCenterFitWindowWorkspaces( - API::MatrixWorkspace_sptr dataws, const double peakWindowMaxInDSpacing) { + const API::MatrixWorkspace_sptr &dataws, + const double peakWindowMaxInDSpacing) { // calculate from peaks in dpsacing to peak fit window in dspacing const auto windowsInDSpacing = diff --git a/Framework/Algorithms/src/PDDetermineCharacterizations.cpp b/Framework/Algorithms/src/PDDetermineCharacterizations.cpp index beaab3c7a6857d3ef31c0878450f00c45dace952..96a4095fee2aec5a132f210ed905da7826b337b4 100644 --- a/Framework/Algorithms/src/PDDetermineCharacterizations.cpp +++ b/Framework/Algorithms/src/PDDetermineCharacterizations.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/PDDetermineCharacterizations.h" #include "MantidAPI/ITableWorkspace.h" diff --git a/Framework/Algorithms/src/PDFFourierTransform.cpp b/Framework/Algorithms/src/PDFFourierTransform.cpp index 951e953409f1a6eccec38619fed7ca843ee3975f..4c855fe521490f2767078734c49c28cf93f7c286 100644 --- a/Framework/Algorithms/src/PDFFourierTransform.cpp +++ b/Framework/Algorithms/src/PDFFourierTransform.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/PDFFourierTransform.h" #include "MantidAPI/Axis.h" diff --git a/Framework/Algorithms/src/PaddingAndApodization.cpp b/Framework/Algorithms/src/PaddingAndApodization.cpp index 924c3ce781f28f33404f09e89f8c92e1a5e9dd59..c4222210c4b5a5beaed425bdcd6808e4841971fb 100644 --- a/Framework/Algorithms/src/PaddingAndApodization.cpp +++ b/Framework/Algorithms/src/PaddingAndApodization.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes @@ -115,7 +115,6 @@ void PaddingAndApodization::exec() { fptr apodizationFunction = getApodizationFunction(method); // Do the specified spectra only auto specLength = static_cast<int>(spectra.size()); - std::vector<double> norm(specLength, 0.0); PARALLEL_FOR_IF(Kernel::threadSafe(*inputWS, *outputWS)) for (int i = 0; i < specLength; ++i) { PARALLEL_START_INTERUPT_REGION @@ -145,7 +144,7 @@ using fptr = double (*)(const double, const double); * @param method :: [input] The name of the chosen function * @returns :: pointer to the function */ -fptr PaddingAndApodization::getApodizationFunction(const std::string method) { +fptr PaddingAndApodization::getApodizationFunction(const std::string &method) { if (method == "None") { return ApodizationFunctions::none; } else if (method == "Lorentz") { diff --git a/Framework/Algorithms/src/ParallaxCorrection.cpp b/Framework/Algorithms/src/ParallaxCorrection.cpp index 08b6086e5d77f817fa19e03d4daf8e22f7ae02f5..7d93a5df9d6aa57f81ac55b2784398ddbab1573c 100644 --- a/Framework/Algorithms/src/ParallaxCorrection.cpp +++ b/Framework/Algorithms/src/ParallaxCorrection.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/ParallaxCorrection.h" #include "MantidAPI/InstrumentValidator.h" @@ -104,10 +104,9 @@ void ParallaxCorrection::init() { * @param parallax : the correction formula for the bank * @param direction : the tube direction in the bank */ -void ParallaxCorrection::performCorrection(API::MatrixWorkspace_sptr outWS, - const std::vector<size_t> &indices, - const std::string ¶llax, - const std::string &direction) { +void ParallaxCorrection::performCorrection( + const API::MatrixWorkspace_sptr &outWS, const std::vector<size_t> &indices, + const std::string ¶llax, const std::string &direction) { double t; mu::Parser muParser; muParser.DefineVar("t", &t); diff --git a/Framework/Algorithms/src/Pause.cpp b/Framework/Algorithms/src/Pause.cpp index d66611fe00c638fd4c12a043c89bc43d9b414674..bd620de3ad1cca622e0e6face5dd748157a38cbb 100644 --- a/Framework/Algorithms/src/Pause.cpp +++ b/Framework/Algorithms/src/Pause.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/Pause.h" #include "MantidAPI/Algorithm.h" diff --git a/Framework/Algorithms/src/PerformIndexOperations.cpp b/Framework/Algorithms/src/PerformIndexOperations.cpp index c46a1c4f8aabf669c86cc38cdc0a38328e3f0138..9ba817654d218e7e3464a0c17d70b11871b31d34 100644 --- a/Framework/Algorithms/src/PerformIndexOperations.cpp +++ b/Framework/Algorithms/src/PerformIndexOperations.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/PerformIndexOperations.h" #include "MantidAPI/AlgorithmManager.h" @@ -10,6 +10,7 @@ #include "MantidKernel/Strings.h" #include <boost/algorithm/string.hpp> #include <boost/regex.hpp> +#include <utility> using namespace Mantid::Kernel; using namespace Mantid::API; @@ -31,7 +32,7 @@ public: if (!this->isValid()) { return toAppend; } else { - MatrixWorkspace_sptr current = this->execute(inputWS); + MatrixWorkspace_sptr current = this->execute(std::move(inputWS)); Mantid::API::AlgorithmManagerImpl &factory = Mantid::API::AlgorithmManager::Instance(); auto conjoinWorkspaceAlg = factory.create("ConjoinWorkspaces"); diff --git a/Framework/Algorithms/src/Plus.cpp b/Framework/Algorithms/src/Plus.cpp index 4186592e1d78de1956b8384368aac66e38d365fd..94d98002c264b3e558a13eca2b56b46dad987c4d 100644 --- a/Framework/Algorithms/src/Plus.cpp +++ b/Framework/Algorithms/src/Plus.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/Plus.h" #include "MantidKernel/VectorHelper.h" @@ -24,7 +24,7 @@ void Plus::performBinaryOperation(const HistogramData::Histogram &lhs, HistogramData::HistogramY &YOut, HistogramData::HistogramE &EOut) { std::transform(lhs.y().begin(), lhs.y().end(), rhs.y().begin(), YOut.begin(), - std::plus<double>()); + std::plus<>()); std::transform(lhs.e().begin(), lhs.e().end(), rhs.e().begin(), EOut.begin(), VectorHelper::SumGaussError<double>()); } @@ -36,12 +36,14 @@ void Plus::performBinaryOperation(const HistogramData::Histogram &lhs, HistogramData::HistogramE &EOut) { using std::placeholders::_1; std::transform(lhs.y().begin(), lhs.y().end(), YOut.begin(), - std::bind(std::plus<double>(), _1, rhsY)); + [rhsY](double l) { return l + rhsY; }); // Only do E if non-zero, otherwise just copy - if (rhsE != 0) + + if (rhsE != 0.) { + double rhsE2 = rhsE * rhsE; std::transform(lhs.e().begin(), lhs.e().end(), EOut.begin(), - std::bind(VectorHelper::SumGaussError<double>(), _1, rhsE)); - else + [rhsE2](double l) { return std::sqrt(l * l + rhsE2); }); + } else EOut = lhs.e(); } @@ -143,8 +145,8 @@ void Plus::checkRequirements() { * @return workspace unit compatibility flag */ bool Plus::checkUnitCompatibility( - const API::MatrixWorkspace_const_sptr lhs, - const API::MatrixWorkspace_const_sptr rhs) const { + const API::MatrixWorkspace_const_sptr &lhs, + const API::MatrixWorkspace_const_sptr &rhs) const { if (lhs->size() > 1 && rhs->size() > 1) { if (lhs->YUnit() != rhs->YUnit()) { g_log.error("The two workspaces are not compatible because they have " diff --git a/Framework/Algorithms/src/PointByPointVCorrection.cpp b/Framework/Algorithms/src/PointByPointVCorrection.cpp index fce798593e34568049133ffd34280e605e6b8a81..96fc5e9a6e90cd55431adc9efaf6b22b628852fc 100644 --- a/Framework/Algorithms/src/PointByPointVCorrection.cpp +++ b/Framework/Algorithms/src/PointByPointVCorrection.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes @@ -125,10 +125,10 @@ void PointByPointVCorrection::exec() { // builds which caused the unit tests // to sometimes fail. Maybe this is some compiler bug to do with // using bind2nd within the parrallel macros. - for (double &rY : resultY) { - // Now result is s_i/v_i*Dlam_i*(sum_i s_i)/(sum_i S_i/v_i*Dlam_i) - rY *= factor; - } + + // Now result is s_i/v_i*Dlam_i*(sum_i s_i)/(sum_i S_i/v_i*Dlam_i) + std::transform(resultY.begin(), resultY.end(), resultY.begin(), + [&factor](double rY) { return rY * factor; }); // Finally get the normalized errors for (int j = 0; j < size - 1; j++) diff --git a/Framework/Algorithms/src/PoissonErrors.cpp b/Framework/Algorithms/src/PoissonErrors.cpp index b43d8e8d6ced3e73157804d84baad028d3e345cb..8a692067a3cc5a4e31f332703d89aed8b8bdef96 100644 --- a/Framework/Algorithms/src/PoissonErrors.cpp +++ b/Framework/Algorithms/src/PoissonErrors.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/PoissonErrors.h" diff --git a/Framework/Algorithms/src/PolarizationCorrectionFredrikze.cpp b/Framework/Algorithms/src/PolarizationCorrectionFredrikze.cpp index 6970ce79c38db6ed611116e766b57c5428d02235..12e68df35d18d8aa05e345170d69fc7d36db9fbf 100644 --- a/Framework/Algorithms/src/PolarizationCorrectionFredrikze.cpp +++ b/Framework/Algorithms/src/PolarizationCorrectionFredrikze.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/PolarizationCorrectionFredrikze.h" #include "MantidAPI/Axis.h" @@ -206,7 +206,7 @@ void PolarizationCorrectionFredrikze::init() { } WorkspaceGroup_sptr -PolarizationCorrectionFredrikze::execPA(WorkspaceGroup_sptr inWS) { +PolarizationCorrectionFredrikze::execPA(const WorkspaceGroup_sptr &inWS) { size_t itemIndex = 0; MatrixWorkspace_sptr Ipp = @@ -276,7 +276,7 @@ PolarizationCorrectionFredrikze::execPA(WorkspaceGroup_sptr inWS) { } WorkspaceGroup_sptr -PolarizationCorrectionFredrikze::execPNR(WorkspaceGroup_sptr inWS) { +PolarizationCorrectionFredrikze::execPNR(const WorkspaceGroup_sptr &inWS) { size_t itemIndex = 0; MatrixWorkspace_sptr Ip = boost::dynamic_pointer_cast<MatrixWorkspace>(inWS->getItem(itemIndex++)); diff --git a/Framework/Algorithms/src/PolarizationCorrectionWildes.cpp b/Framework/Algorithms/src/PolarizationCorrectionWildes.cpp index d762fa85a1020244bc7ceb1ab95810b5aa5a2cd7..95cb7c112f6b7b999c5db21c7b929323d6e0b8dd 100644 --- a/Framework/Algorithms/src/PolarizationCorrectionWildes.cpp +++ b/Framework/Algorithms/src/PolarizationCorrectionWildes.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/PolarizationCorrectionWildes.h" @@ -98,6 +98,7 @@ void fourInputsCorrectedAndErrors( Eigen::Matrix4d F1m; F1m << 1., 0., 0., 0., 0., 1., 0., 0., off1, 0., diag1, 0., 0., off1, 0., diag1; + const auto diag2 = 1. / f2; const auto off2 = (f2 - 1.) / f2; Eigen::Matrix4d F2m; @@ -357,8 +358,8 @@ double twoInputsErrorEstimate10(const double i00, const double e00, return std::sqrt(e10_I00 + e10_I11 + e10_F1 + e10_F2 + e10_P1 + e10_P2); } -Mantid::API::MatrixWorkspace_sptr -createWorkspaceWithHistory(Mantid::API::MatrixWorkspace_const_sptr inputWS) { +Mantid::API::MatrixWorkspace_sptr createWorkspaceWithHistory( + const Mantid::API::MatrixWorkspace_const_sptr &inputWS) { Mantid::API::MatrixWorkspace_sptr outputWS = Mantid::DataObjects::create<Mantid::DataObjects::Workspace2D>(*inputWS); outputWS->history().addHistory(inputWS->getHistory()); diff --git a/Framework/Algorithms/src/PolarizationEfficiencyCor.cpp b/Framework/Algorithms/src/PolarizationEfficiencyCor.cpp index 0e0afda8706fa3f2bd574a3a050f38dee80f8016..fb26c987fcb8afa48ab48c626def7e27f11f8252 100644 --- a/Framework/Algorithms/src/PolarizationEfficiencyCor.cpp +++ b/Framework/Algorithms/src/PolarizationEfficiencyCor.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/PolarizationEfficiencyCor.h" @@ -309,8 +309,8 @@ MatrixWorkspace_sptr PolarizationEfficiencyCor::convertToHistogram( //---------------------------------------------------------------------------------------------- /// Convert the efficiencies to histogram MatrixWorkspace_sptr -PolarizationEfficiencyCor::interpolate(MatrixWorkspace_sptr efficiencies, - MatrixWorkspace_sptr inWS) { +PolarizationEfficiencyCor::interpolate(const MatrixWorkspace_sptr &efficiencies, + const MatrixWorkspace_sptr &inWS) { efficiencies->setDistribution(true); auto alg = createChildAlgorithm("RebinToWorkspace"); diff --git a/Framework/Algorithms/src/PolynomialCorrection.cpp b/Framework/Algorithms/src/PolynomialCorrection.cpp index 5e4b9df94d4079943ca00224e91bd6b062bc1a6d..51e45f4c86fd52757b74dfe9128ac89c36e8b5f0 100644 --- a/Framework/Algorithms/src/PolynomialCorrection.cpp +++ b/Framework/Algorithms/src/PolynomialCorrection.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/Algorithms/src/Power.cpp b/Framework/Algorithms/src/Power.cpp index 40a66a66f0746da5cb08b93e0a8561d24a405a1b..142e87b70a82ee7a15e9b7996f54fee7019534d4 100644 --- a/Framework/Algorithms/src/Power.cpp +++ b/Framework/Algorithms/src/Power.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/Algorithms/src/PowerLawCorrection.cpp b/Framework/Algorithms/src/PowerLawCorrection.cpp index eab3552c02471bc092526e5b580d5b9965f9a22c..cc38c2040fb5c3e1b965ad9ca2ba3e852ac0be08 100644 --- a/Framework/Algorithms/src/PowerLawCorrection.cpp +++ b/Framework/Algorithms/src/PowerLawCorrection.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/Algorithms/src/Q1D2.cpp b/Framework/Algorithms/src/Q1D2.cpp index 43f6466e8127bd6f2adbc4a0e6c63a86503edcbb..8a09881898619db57aaee4d2e15f9485202dbb24 100644 --- a/Framework/Algorithms/src/Q1D2.cpp +++ b/Framework/Algorithms/src/Q1D2.cpp @@ -1,10 +1,11 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + -#include "MantidAlgorithms/Q1D2.h" +#include <utility> + #include "MantidAPI/Axis.h" #include "MantidAPI/CommonBinsValidator.h" #include "MantidAPI/HistogramValidator.h" @@ -14,6 +15,7 @@ #include "MantidAPI/WorkspaceFactory.h" #include "MantidAPI/WorkspaceUnitValidator.h" #include "MantidAlgorithms/GravitySANSHelper.h" +#include "MantidAlgorithms/Q1D2.h" #include "MantidAlgorithms/Qhelper.h" #include "MantidDataObjects/Histogram1D.h" #include "MantidDataObjects/Workspace2D.h" @@ -409,12 +411,13 @@ Q1D2::setUpOutputWorkspace(const std::vector<double> &binParams) const { */ void Q1D2::calculateNormalization( const size_t wavStart, const size_t wsIndex, - API::MatrixWorkspace_const_sptr pixelAdj, - API::MatrixWorkspace_const_sptr wavePixelAdj, double const *const binNorms, - double const *const binNormEs, HistogramData::HistogramY::iterator norm, + const API::MatrixWorkspace_const_sptr &pixelAdj, + const API::MatrixWorkspace_const_sptr &wavePixelAdj, + double const *const binNorms, double const *const binNormEs, + HistogramData::HistogramY::iterator norm, HistogramData::HistogramY::iterator normETo2) const { double detectorAdj, detAdjErr; - pixelWeight(pixelAdj, wsIndex, detectorAdj, detAdjErr); + pixelWeight(std::move(pixelAdj), wsIndex, detectorAdj, detAdjErr); // use that the normalization array ends at the start of the error array for (auto n = norm, e = normETo2; n != normETo2; ++n, ++e) { *n = detectorAdj; @@ -444,7 +447,7 @@ void Q1D2::calculateNormalization( * @param[out] error the error on the weight, only non-zero if pixelAdj * @throw LogicError if the solid angle is tiny or negative */ -void Q1D2::pixelWeight(API::MatrixWorkspace_const_sptr pixelAdj, +void Q1D2::pixelWeight(const API::MatrixWorkspace_const_sptr &pixelAdj, const size_t wsIndex, double &weight, double &error) const { const auto &detectorInfo = m_dataWS->detectorInfo(); diff --git a/Framework/Algorithms/src/Q1DWeighted.cpp b/Framework/Algorithms/src/Q1DWeighted.cpp index 6efb0a6b190c7dab967f98cd034d3719fd231814..84c54c709cd8100fd0943dc7f7bb098ed4a3de64 100644 --- a/Framework/Algorithms/src/Q1DWeighted.cpp +++ b/Framework/Algorithms/src/Q1DWeighted.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/Q1DWeighted.h" #include "MantidAPI/Axis.h" @@ -105,7 +105,7 @@ void Q1DWeighted::exec() { * initializes the user inputs * @param inputWS : input workspace */ -void Q1DWeighted::bootstrap(MatrixWorkspace_const_sptr inputWS) { +void Q1DWeighted::bootstrap(const MatrixWorkspace_const_sptr &inputWS) { // Get pixel size and pixel sub-division m_pixelSizeX = getProperty("PixelSizeX"); m_pixelSizeY = getProperty("PixelSizeY"); @@ -167,7 +167,7 @@ void Q1DWeighted::bootstrap(MatrixWorkspace_const_sptr inputWS) { * Performs the azimuthal averaging for each wavelength bin * @param inputWS : the input workspace */ -void Q1DWeighted::calculate(MatrixWorkspace_const_sptr inputWS) { +void Q1DWeighted::calculate(const MatrixWorkspace_const_sptr &inputWS) { // Set up the progress Progress progress(this, 0.0, 1.0, m_nSpec * m_nLambda); @@ -313,7 +313,7 @@ void Q1DWeighted::calculate(MatrixWorkspace_const_sptr inputWS) { * performs final averaging and sets the output workspaces * @param inputWS : the input workspace */ -void Q1DWeighted::finalize(MatrixWorkspace_const_sptr inputWS) { +void Q1DWeighted::finalize(const MatrixWorkspace_const_sptr &inputWS) { MatrixWorkspace_sptr outputWS = createOutputWorkspace(inputWS, m_nQ, m_qBinEdges); setProperty("OutputWorkspace", outputWS); @@ -383,7 +383,7 @@ void Q1DWeighted::finalize(MatrixWorkspace_const_sptr inputWS) { * @return output I(Q) workspace */ MatrixWorkspace_sptr -Q1DWeighted::createOutputWorkspace(MatrixWorkspace_const_sptr parent, +Q1DWeighted::createOutputWorkspace(const MatrixWorkspace_const_sptr &parent, const size_t nBins, const std::vector<double> &binEdges) { diff --git a/Framework/Algorithms/src/Qhelper.cpp b/Framework/Algorithms/src/Qhelper.cpp index 75726d648d0925786448a5f7fde9abbb7e867c7a..d827741972e5227a653007d5a348e085d5982089 100644 --- a/Framework/Algorithms/src/Qhelper.cpp +++ b/Framework/Algorithms/src/Qhelper.cpp @@ -1,12 +1,14 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + -#include "MantidAlgorithms/Qhelper.h" +#include <utility> + #include "MantidAPI/MatrixWorkspace.h" #include "MantidAPI/SpectrumInfo.h" +#include "MantidAlgorithms/Qhelper.h" namespace Mantid { namespace Algorithms { @@ -25,13 +27,13 @@ using namespace Geometry; @param qResolution: the QResolution workspace @throw invalid_argument if the workspaces are not mututially compatible */ -void Qhelper::examineInput(API::MatrixWorkspace_const_sptr dataWS, - API::MatrixWorkspace_const_sptr binAdj, - API::MatrixWorkspace_const_sptr detectAdj, - API::MatrixWorkspace_const_sptr qResolution) { +void Qhelper::examineInput(const API::MatrixWorkspace_const_sptr &dataWS, + const API::MatrixWorkspace_const_sptr &binAdj, + const API::MatrixWorkspace_const_sptr &detectAdj, + const API::MatrixWorkspace_const_sptr &qResolution) { // Check the compatibility of dataWS, binAdj and detectAdj - examineInput(dataWS, binAdj, detectAdj); + examineInput(dataWS, std::move(binAdj), std::move(detectAdj)); // Check the compatibility of the QResolution workspace if (qResolution) { @@ -64,9 +66,9 @@ void Qhelper::examineInput(API::MatrixWorkspace_const_sptr dataWS, one bin @throw invalid_argument if the workspaces are not mututially compatible */ -void Qhelper::examineInput(API::MatrixWorkspace_const_sptr dataWS, - API::MatrixWorkspace_const_sptr binAdj, - API::MatrixWorkspace_const_sptr detectAdj) { +void Qhelper::examineInput(const API::MatrixWorkspace_const_sptr &dataWS, + const API::MatrixWorkspace_const_sptr &binAdj, + const API::MatrixWorkspace_const_sptr &detectAdj) { if (dataWS->getNumberHistograms() < 1) { throw std::invalid_argument( "Empty data workspace passed, can not continue"); @@ -152,7 +154,7 @@ void Qhelper::examineInput(API::MatrixWorkspace_const_sptr dataWS, * @param wsInd spectrum that is being analysed * @return index number of the first bin to include in the calculation */ -size_t Qhelper::waveLengthCutOff(API::MatrixWorkspace_const_sptr dataWS, +size_t Qhelper::waveLengthCutOff(const API::MatrixWorkspace_const_sptr &dataWS, const SpectrumInfo &spectrumInfo, const double RCut, const double WCut, const size_t wsInd) const { @@ -188,8 +190,8 @@ sumOfCounts/sumOfNormFactors equals the * @param sumOfNormFactors sum of normalisation factors */ void Qhelper::outputParts(API::Algorithm *alg, - API::MatrixWorkspace_sptr sumOfCounts, - API::MatrixWorkspace_sptr sumOfNormFactors) { + const API::MatrixWorkspace_sptr &sumOfCounts, + const API::MatrixWorkspace_sptr &sumOfNormFactors) { std::string baseName = alg->getPropertyValue("OutputWorkspace"); alg->declareProperty( diff --git a/Framework/Algorithms/src/Qxy.cpp b/Framework/Algorithms/src/Qxy.cpp index fc8058f446d50ea7fa0987bdfafb262e4d4b6073..72923aa7c0de8b9c9bbfdc35829705d07166988a 100644 --- a/Framework/Algorithms/src/Qxy.cpp +++ b/Framework/Algorithms/src/Qxy.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/Qxy.h" #include "MantidAPI/BinEdgeAxis.h" @@ -402,8 +402,8 @@ double Qxy::getQminFromWs(const API::MatrixWorkspace &inputWorkspace) { * Qx. * @return A pointer to the newly-created workspace */ -API::MatrixWorkspace_sptr -Qxy::setUpOutputWorkspace(API::MatrixWorkspace_const_sptr inputWorkspace) { +API::MatrixWorkspace_sptr Qxy::setUpOutputWorkspace( + const API::MatrixWorkspace_const_sptr &inputWorkspace) { const double max = getProperty("MaxQxy"); const double delta = getProperty("DeltaQ"); const bool log_binning = getProperty("IQxQyLogBinning"); diff --git a/Framework/Algorithms/src/RadiusSum.cpp b/Framework/Algorithms/src/RadiusSum.cpp index f97173c32675d0bef95339e45bcb3639ed084847..1eb1c907f7253402874001b9bda592cafb2c0f50 100644 --- a/Framework/Algorithms/src/RadiusSum.cpp +++ b/Framework/Algorithms/src/RadiusSum.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/RadiusSum.h" #include "MantidAPI/MatrixWorkspace.h" @@ -272,7 +272,7 @@ void RadiusSum::inputValidationSanityCheck() { * @return True if it is an instrument related workspace. */ bool RadiusSum::inputWorkspaceHasInstrumentAssociated( - API::MatrixWorkspace_sptr inWS) { + const API::MatrixWorkspace_sptr &inWS) { return inWS->getAxis(1)->isSpectra(); } @@ -302,7 +302,7 @@ std::vector<double> RadiusSum::getBoundariesOfInputWorkspace() { *Xmin, Xmax, Ymin, Ymax */ std::vector<double> -RadiusSum::getBoundariesOfNumericImage(API::MatrixWorkspace_sptr inWS) { +RadiusSum::getBoundariesOfNumericImage(const API::MatrixWorkspace_sptr &inWS) { // horizontal axis @@ -359,7 +359,7 @@ RadiusSum::getBoundariesOfNumericImage(API::MatrixWorkspace_sptr inWS) { *Xmin, Xmax, Ymin, Ymax, Zmin, Zmax */ std::vector<double> -RadiusSum::getBoundariesOfInstrument(API::MatrixWorkspace_sptr inWS) { +RadiusSum::getBoundariesOfInstrument(const API::MatrixWorkspace_sptr &inWS) { // This function is implemented based in the following assumption: // - The workspace is composed by spectrum with associated spectrum No which @@ -521,7 +521,8 @@ void RadiusSum::numBinsIsReasonable() { << '\n'; } -double RadiusSum::getMinBinSizeForInstrument(API::MatrixWorkspace_sptr inWS) { +double +RadiusSum::getMinBinSizeForInstrument(const API::MatrixWorkspace_sptr &inWS) { // Assumption made: the detectors are placed one after the other, so the // minimum // reasonalbe size for the bin is the width of one detector. @@ -538,7 +539,8 @@ double RadiusSum::getMinBinSizeForInstrument(API::MatrixWorkspace_sptr inWS) { throw std::invalid_argument("Did not find any non monitor detector position"); } -double RadiusSum::getMinBinSizeForNumericImage(API::MatrixWorkspace_sptr inWS) { +double +RadiusSum::getMinBinSizeForNumericImage(const API::MatrixWorkspace_sptr &inWS) { // The pixel dimensions: // - width: image width/ number of pixels in one row // - height: image height/ number of pixels in one column diff --git a/Framework/Algorithms/src/RayTracerTester.cpp b/Framework/Algorithms/src/RayTracerTester.cpp index 422d87e4062c728c394b755b78cd60543e2ba630..b91cd35ad81b3a7ee094c8467b8f4e9494302962 100644 --- a/Framework/Algorithms/src/RayTracerTester.cpp +++ b/Framework/Algorithms/src/RayTracerTester.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/RayTracerTester.h" #include "MantidAPI/FileProperty.h" diff --git a/Framework/Algorithms/src/ReadGroupsFromFile.cpp b/Framework/Algorithms/src/ReadGroupsFromFile.cpp index 99c37c11a68bd86259e0180650591e874e5298bb..30f195bd5d90ea7edcb85166a58744906f80e6ba 100644 --- a/Framework/Algorithms/src/ReadGroupsFromFile.cpp +++ b/Framework/Algorithms/src/ReadGroupsFromFile.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/ReadGroupsFromFile.h" #include "MantidAPI/FileProperty.h" diff --git a/Framework/Algorithms/src/RealFFT.cpp b/Framework/Algorithms/src/RealFFT.cpp index a23cdf106b191b89cb00ea45604bfaec812eb173..0b5d675f11c6f889daaf2f96ab5a04ae15e35975 100644 --- a/Framework/Algorithms/src/RealFFT.cpp +++ b/Framework/Algorithms/src/RealFFT.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/RealFFT.h" #include "MantidAPI/MatrixWorkspace.h" diff --git a/Framework/Algorithms/src/Rebin.cpp b/Framework/Algorithms/src/Rebin.cpp index 8f946ecfd8fd420beaa7a85129d205d86ca80fb7..7343535d6f43cc138787aadb5442ed3587b7678b 100644 --- a/Framework/Algorithms/src/Rebin.cpp +++ b/Framework/Algorithms/src/Rebin.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/Rebin.h" #include "MantidHistogramData/Exception.h" @@ -309,8 +309,9 @@ void Rebin::exec() { * @param outputWS :: The output workspace * @param hist :: The index of the current histogram */ -void Rebin::propagateMasks(API::MatrixWorkspace_const_sptr inputWS, - API::MatrixWorkspace_sptr outputWS, int hist) { +void Rebin::propagateMasks(const API::MatrixWorkspace_const_sptr &inputWS, + const API::MatrixWorkspace_sptr &outputWS, + int hist) { // Not too happy with the efficiency of this way of doing it, but it's a lot // simpler to use the // existing rebin algorithm to distribute the weights than to re-implement it diff --git a/Framework/Algorithms/src/Rebin2D.cpp b/Framework/Algorithms/src/Rebin2D.cpp index 8301c3292612451ade37a55d912988c65bc9c984..61de05ec1e77fdadf41bcabe5aa8e8e82cef975e 100644 --- a/Framework/Algorithms/src/Rebin2D.cpp +++ b/Framework/Algorithms/src/Rebin2D.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/Rebin2D.h" #include "MantidAPI/BinEdgeAxis.h" @@ -84,7 +84,7 @@ void Rebin2D::exec() { "If it is a spectra axis try running ConvertSpectrumAxis first."); } - const auto &oldXEdges = inputWS->x(0); + const auto &oldXEdges = inputWS->binEdges(0); const size_t numXBins = inputWS->blocksize(); const size_t numYBins = inputWS->getNumberHistograms(); // This will convert plain NumericAxis to bin edges while diff --git a/Framework/Algorithms/src/RebinByPulseTimes.cpp b/Framework/Algorithms/src/RebinByPulseTimes.cpp index acac75e6c188756fba430bd24266c7395ca8c4ee..d4152197fe5f9fe066e4cc8cd0821f1ae64d81f1 100644 --- a/Framework/Algorithms/src/RebinByPulseTimes.cpp +++ b/Framework/Algorithms/src/RebinByPulseTimes.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/RebinByPulseTimes.h" #include "MantidDataObjects/EventWorkspace.h" diff --git a/Framework/Algorithms/src/RebinByTimeAtSample.cpp b/Framework/Algorithms/src/RebinByTimeAtSample.cpp index 995321a55b6b6e24c5fca21b6158e78511ed9248..1955ce2f618fcc137acd5dbb8fc60bd4a9d94987 100644 --- a/Framework/Algorithms/src/RebinByTimeAtSample.cpp +++ b/Framework/Algorithms/src/RebinByTimeAtSample.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/RebinByTimeAtSample.h" #include "MantidAlgorithms/TimeAtSampleStrategyElastic.h" diff --git a/Framework/Algorithms/src/RebinByTimeBase.cpp b/Framework/Algorithms/src/RebinByTimeBase.cpp index 843f4af9d69574fa50d1914d67d5d930d0c4978a..636427072dd0e3bdfd94d0872db3ce8ecb76ff70 100644 --- a/Framework/Algorithms/src/RebinByTimeBase.cpp +++ b/Framework/Algorithms/src/RebinByTimeBase.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/RebinByTimeBase.h" #include "MantidAPI/Axis.h" diff --git a/Framework/Algorithms/src/RebinToWorkspace.cpp b/Framework/Algorithms/src/RebinToWorkspace.cpp index 837baa0df60f509b1c369e9e4189316061500863..5683581017a086c8009de9538c1b7ee3eb370a64 100644 --- a/Framework/Algorithms/src/RebinToWorkspace.cpp +++ b/Framework/Algorithms/src/RebinToWorkspace.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/RebinToWorkspace.h" #include "MantidAPI/HistogramValidator.h" diff --git a/Framework/Algorithms/src/Rebunch.cpp b/Framework/Algorithms/src/Rebunch.cpp index 34984599af47d98a764f8e75eccb7faca831b48c..02c12949afb53c533d01ee2050fd3f2ac0ada047 100644 --- a/Framework/Algorithms/src/Rebunch.cpp +++ b/Framework/Algorithms/src/Rebunch.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/Algorithms/src/RecordPythonScript.cpp b/Framework/Algorithms/src/RecordPythonScript.cpp index 5484caccf3d33cf3bc5ab2655c14ebdb0256d9d0..5a9660846c504e3190b993b22febf3d23575bbaf 100644 --- a/Framework/Algorithms/src/RecordPythonScript.cpp +++ b/Framework/Algorithms/src/RecordPythonScript.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/RecordPythonScript.h" #include "MantidAPI/FileProperty.h" diff --git a/Framework/Algorithms/src/ReflectometryBackgroundSubtraction.cpp b/Framework/Algorithms/src/ReflectometryBackgroundSubtraction.cpp index a28347a70e774e989bdb9b80c374e53fd641d5c3..76639056586c9ab9dee093d3ccee69a19bac62dd 100644 --- a/Framework/Algorithms/src/ReflectometryBackgroundSubtraction.cpp +++ b/Framework/Algorithms/src/ReflectometryBackgroundSubtraction.cpp @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #include "MantidAlgorithms/ReflectometryBackgroundSubtraction.h" #include "MantidAPI/Algorithm.tcc" #include "MantidAPI/AnalysisDataService.h" @@ -51,7 +50,8 @@ const std::string ReflectometryBackgroundSubtraction::summary() const { * background */ void ReflectometryBackgroundSubtraction::calculateAverageSpectrumBackground( - MatrixWorkspace_sptr inputWS, const std::vector<specnum_t> &spectraList) { + const MatrixWorkspace_sptr &inputWS, + const std::vector<specnum_t> &spectraList) { auto alg = this->createChildAlgorithm("GroupDetectors"); alg->setProperty("InputWorkspace", inputWS); @@ -157,7 +157,7 @@ void ReflectometryBackgroundSubtraction::calculatePolynomialBackground( * @param indexList :: the ranges of the background region */ void ReflectometryBackgroundSubtraction::calculatePixelBackground( - MatrixWorkspace_sptr inputWS, const std::vector<double> &indexList) { + const MatrixWorkspace_sptr &inputWS, const std::vector<double> &indexList) { const std::vector<int> backgroundRange{static_cast<int>(indexList.front()), static_cast<int>(indexList.back())}; diff --git a/Framework/Algorithms/src/ReflectometryBeamStatistics.cpp b/Framework/Algorithms/src/ReflectometryBeamStatistics.cpp index f8f3ce730de139a047f900f52719c7ee5b53e6ed..5ccc81e765e4a1dd5a9dde6253562e8fbd92b272 100644 --- a/Framework/Algorithms/src/ReflectometryBeamStatistics.cpp +++ b/Framework/Algorithms/src/ReflectometryBeamStatistics.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/ReflectometryBeamStatistics.h" @@ -66,8 +66,8 @@ const std::string * @return the slit gap, in meters */ double ReflectometryBeamStatistics::slitSeparation( - Geometry::Instrument_const_sptr instrument, const std::string &slit1Name, - const std::string &slit2Name) { + const Geometry::Instrument_const_sptr &instrument, + const std::string &slit1Name, const std::string &slit2Name) { auto slit1 = instrument->getComponentByName(slit1Name); auto slit2 = instrument->getComponentByName(slit2Name); return (slit1->getPos() - slit2->getPos()).norm(); diff --git a/Framework/Algorithms/src/ReflectometryMomentumTransfer.cpp b/Framework/Algorithms/src/ReflectometryMomentumTransfer.cpp index 62521358b498fcfe6f59343c5805e6cd060f65fb..4ed46257f2a132bdac7f92a560fd9f34db00e99f 100644 --- a/Framework/Algorithms/src/ReflectometryMomentumTransfer.cpp +++ b/Framework/Algorithms/src/ReflectometryMomentumTransfer.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/ReflectometryMomentumTransfer.h" diff --git a/Framework/Algorithms/src/ReflectometryReductionOne2.cpp b/Framework/Algorithms/src/ReflectometryReductionOne2.cpp index f13d5438c333a847784374236eedb076d556c609..b78e1286933688d1afa5ec3399aecfc88c88a633 100644 --- a/Framework/Algorithms/src/ReflectometryReductionOne2.cpp +++ b/Framework/Algorithms/src/ReflectometryReductionOne2.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/ReflectometryReductionOne2.h" #include "MantidAPI/AnalysisDataService.h" @@ -25,6 +25,7 @@ #include "MantidKernel/UnitFactory.h" #include <algorithm> +#include <utility> using namespace Mantid::Kernel; using namespace Mantid::API; @@ -344,7 +345,7 @@ std::string ReflectometryReductionOne2::createDebugWorkspaceName( * and is incremented after the workspace is output */ void ReflectometryReductionOne2::outputDebugWorkspace( - MatrixWorkspace_sptr ws, const std::string &wsName, + const MatrixWorkspace_sptr &ws, const std::string &wsName, const std::string &wsSuffix, const bool debug, int &step) { // Nothing to do if debug is not enabled if (debug) { @@ -503,7 +504,7 @@ MatrixWorkspace_sptr ReflectometryReductionOne2::backgroundSubtraction( * @return : corrected workspace */ MatrixWorkspace_sptr ReflectometryReductionOne2::transOrAlgCorrection( - MatrixWorkspace_sptr detectorWS, const bool detectorWSReduced) { + const MatrixWorkspace_sptr &detectorWS, const bool detectorWSReduced) { MatrixWorkspace_sptr normalized; MatrixWorkspace_sptr transRun = getProperty("FirstTransmissionRun"); @@ -526,7 +527,7 @@ MatrixWorkspace_sptr ReflectometryReductionOne2::transOrAlgCorrection( * @return :: the input workspace normalized by transmission */ MatrixWorkspace_sptr ReflectometryReductionOne2::transmissionCorrection( - MatrixWorkspace_sptr detectorWS, const bool detectorWSReduced) { + const MatrixWorkspace_sptr &detectorWS, const bool detectorWSReduced) { MatrixWorkspace_sptr transmissionWS = getProperty("FirstTransmissionRun"); auto transmissionWSName = transmissionWS->getName(); @@ -615,7 +616,7 @@ MatrixWorkspace_sptr ReflectometryReductionOne2::transmissionCorrection( * @return : corrected workspace */ MatrixWorkspace_sptr ReflectometryReductionOne2::algorithmicCorrection( - MatrixWorkspace_sptr detectorWS) { + const MatrixWorkspace_sptr &detectorWS) { const std::string corrAlgName = getProperty("CorrectionAlgorithm"); @@ -643,7 +644,7 @@ MatrixWorkspace_sptr ReflectometryReductionOne2::algorithmicCorrection( * @return : output workspace in Q */ MatrixWorkspace_sptr -ReflectometryReductionOne2::convertToQ(MatrixWorkspace_sptr inputWS) { +ReflectometryReductionOne2::convertToQ(const MatrixWorkspace_sptr &inputWS) { bool const moreThanOneDetector = inputWS->getDetector(0)->nDets() > 1; bool const shouldCorrectAngle = !(*getProperty("ThetaIn")).isDefault() && !summingInQ(); @@ -709,7 +710,7 @@ void ReflectometryReductionOne2::findDetectorGroups() { // Sort the groups by the first spectrum number in the group (to give the same // output order as GroupDetectors) std::sort(m_detectorGroups.begin(), m_detectorGroups.end(), - [](const std::vector<size_t> a, const std::vector<size_t> b) { + [](const std::vector<size_t> &a, const std::vector<size_t> &b) { return a.front() < b.front(); }); @@ -807,7 +808,7 @@ size_t ReflectometryReductionOne2::twoThetaRDetectorIdx( } void ReflectometryReductionOne2::findWavelengthMinMax( - MatrixWorkspace_sptr inputWS) { + const MatrixWorkspace_sptr &inputWS) { // Get the max/min wavelength of region of interest const double lambdaMin = getProperty("WavelengthMin"); @@ -879,8 +880,8 @@ size_t ReflectometryReductionOne2::findIvsLamRangeMaxDetector( } double ReflectometryReductionOne2::findIvsLamRangeMin( - MatrixWorkspace_sptr detectorWS, const std::vector<size_t> &detectors, - const double lambda) { + const MatrixWorkspace_sptr &detectorWS, + const std::vector<size_t> &detectors, const double lambda) { double projectedMin = 0.0; const size_t spIdx = findIvsLamRangeMinDetector(detectors); @@ -898,8 +899,8 @@ double ReflectometryReductionOne2::findIvsLamRangeMin( } double ReflectometryReductionOne2::findIvsLamRangeMax( - MatrixWorkspace_sptr detectorWS, const std::vector<size_t> &detectors, - const double lambda) { + const MatrixWorkspace_sptr &detectorWS, + const std::vector<size_t> &detectors, const double lambda) { double projectedMax = 0.0; const size_t spIdx = findIvsLamRangeMaxDetector(detectors); @@ -928,9 +929,9 @@ double ReflectometryReductionOne2::findIvsLamRangeMax( * @param projectedMax [out] : the end of the resulting projected range */ void ReflectometryReductionOne2::findIvsLamRange( - MatrixWorkspace_sptr detectorWS, const std::vector<size_t> &detectors, - const double lambdaMin, const double lambdaMax, double &projectedMin, - double &projectedMax) { + const MatrixWorkspace_sptr &detectorWS, + const std::vector<size_t> &detectors, const double lambdaMin, + const double lambdaMax, double &projectedMin, double &projectedMax) { // Get the new max and min X values of the projected (virtual) lambda range projectedMin = findIvsLamRangeMin(detectorWS, detectors, lambdaMin); @@ -952,8 +953,8 @@ void ReflectometryReductionOne2::findIvsLamRange( * * @return : a 1D workspace where y values are all zero */ -MatrixWorkspace_sptr -ReflectometryReductionOne2::constructIvsLamWS(MatrixWorkspace_sptr detectorWS) { +MatrixWorkspace_sptr ReflectometryReductionOne2::constructIvsLamWS( + const MatrixWorkspace_sptr &detectorWS) { // There is one output spectrum for each detector group const size_t numGroups = detectorGroups().size(); @@ -1001,7 +1002,7 @@ ReflectometryReductionOne2::constructIvsLamWS(MatrixWorkspace_sptr detectorWS) { * @return :: the output workspace in wavelength */ MatrixWorkspace_sptr -ReflectometryReductionOne2::sumInQ(MatrixWorkspace_sptr detectorWS) { +ReflectometryReductionOne2::sumInQ(const MatrixWorkspace_sptr &detectorWS) { // Construct the output array in virtual lambda MatrixWorkspace_sptr IvsLam = constructIvsLamWS(detectorWS); @@ -1078,7 +1079,7 @@ void ReflectometryReductionOne2::sumInQProcessValue( const int inputIdx, const double twoTheta, const double bTwoTheta, const HistogramX &inputX, const HistogramY &inputY, const HistogramE &inputE, const std::vector<size_t> &detectors, - const size_t outSpecIdx, MatrixWorkspace_sptr IvsLam, + const size_t outSpecIdx, const MatrixWorkspace_sptr &IvsLam, std::vector<double> &outputE) { // Check whether there are any counts (if not, nothing to share) @@ -1097,7 +1098,7 @@ void ReflectometryReductionOne2::sumInQProcessValue( lambdaVMin, lambdaVMax); // Share the input counts into the output array sumInQShareCounts(inputCounts, inputE[inputIdx], bLambda, lambdaVMin, - lambdaVMax, outSpecIdx, IvsLam, outputE); + lambdaVMax, outSpecIdx, std::move(IvsLam), outputE); } /** @@ -1118,7 +1119,7 @@ void ReflectometryReductionOne2::sumInQProcessValue( void ReflectometryReductionOne2::sumInQShareCounts( const double inputCounts, const double inputErr, const double bLambda, const double lambdaMin, const double lambdaMax, const size_t outSpecIdx, - MatrixWorkspace_sptr IvsLam, std::vector<double> &outputE) { + const MatrixWorkspace_sptr &IvsLam, std::vector<double> &outputE) { // Check that we have histogram data const auto &outputX = IvsLam->dataX(outSpecIdx); auto &outputY = IvsLam->dataY(outSpecIdx); @@ -1239,7 +1240,8 @@ Check whether the spectra for the given workspaces are the same. exception. Otherwise a warning is generated. */ void ReflectometryReductionOne2::verifySpectrumMaps( - MatrixWorkspace_const_sptr ws1, MatrixWorkspace_const_sptr ws2) { + const MatrixWorkspace_const_sptr &ws1, + const MatrixWorkspace_const_sptr &ws2) { bool mismatch = false; // Check that the number of histograms is the same diff --git a/Framework/Algorithms/src/ReflectometryReductionOneAuto2.cpp b/Framework/Algorithms/src/ReflectometryReductionOneAuto2.cpp index 49bd47c340df7d34200a03b800245c9908d3040a..d9bfc3dae5c648098682c7c0ee5dc985e166668f 100644 --- a/Framework/Algorithms/src/ReflectometryReductionOneAuto2.cpp +++ b/Framework/Algorithms/src/ReflectometryReductionOneAuto2.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/ReflectometryReductionOneAuto2.h" #include "MantidAPI/BoostOptionalToAlgorithmProperty.h" @@ -172,7 +172,7 @@ ReflectometryReductionOneAuto2::validateInputs() { } std::string ReflectometryReductionOneAuto2::getRunNumberForWorkspaceGroup( - WorkspaceGroup_const_sptr group) { + const WorkspaceGroup_const_sptr &group) { // Return the run number for the first child workspace if (!group) throw std::runtime_error("Invalid workspace group type"); @@ -495,8 +495,8 @@ void ReflectometryReductionOneAuto2::exec() { * @param inputWS :: the input workspace * @return :: the names of the detectors of interest */ -std::vector<std::string> -ReflectometryReductionOneAuto2::getDetectorNames(MatrixWorkspace_sptr inputWS) { +std::vector<std::string> ReflectometryReductionOneAuto2::getDetectorNames( + const MatrixWorkspace_sptr &inputWS) { std::vector<std::string> wsIndices; boost::split(wsIndices, m_processingInstructionsWorkspaceIndex, @@ -572,8 +572,8 @@ MatrixWorkspace_sptr ReflectometryReductionOneAuto2::correctDetectorPositions( * @param inputWS :: the input workspace * @return :: the angle of the detector (only the first detector is considered) */ -double -ReflectometryReductionOneAuto2::calculateTheta(MatrixWorkspace_sptr inputWS) { +double ReflectometryReductionOneAuto2::calculateTheta( + const MatrixWorkspace_sptr &inputWS) { const auto detectorsOfInterest = getDetectorNames(inputWS); @@ -600,7 +600,7 @@ ReflectometryReductionOneAuto2::calculateTheta(MatrixWorkspace_sptr inputWS) { * @param instrument :: The instrument attached to the workspace */ void ReflectometryReductionOneAuto2::populateAlgorithmicCorrectionProperties( - IAlgorithm_sptr alg, Instrument_const_sptr instrument) { + const IAlgorithm_sptr &alg, const Instrument_const_sptr &instrument) { // With algorithmic corrections, monitors should not be integrated, see below @@ -664,7 +664,7 @@ void ReflectometryReductionOneAuto2::populateAlgorithmicCorrectionProperties( } auto ReflectometryReductionOneAuto2::getRebinParams( - MatrixWorkspace_sptr inputWS, const double theta) -> RebinParams { + const MatrixWorkspace_sptr &inputWS, const double theta) -> RebinParams { bool qMinIsDefault = true, qMaxIsDefault = true; auto const qMin = getPropertyOrDefault("MomentumTransferMin", inputWS->x(0).front(), qMinIsDefault); @@ -681,7 +681,7 @@ auto ReflectometryReductionOneAuto2::getRebinParams( * @return :: the rebin step in Q, or none if it could not be found */ boost::optional<double> -ReflectometryReductionOneAuto2::getQStep(MatrixWorkspace_sptr inputWS, +ReflectometryReductionOneAuto2::getQStep(const MatrixWorkspace_sptr &inputWS, const double theta) { Property *qStepProp = getProperty("MomentumTransferStep"); double qstep; @@ -718,9 +718,8 @@ ReflectometryReductionOneAuto2::getQStep(MatrixWorkspace_sptr inputWS, * and max) * @return :: the output workspace */ -MatrixWorkspace_sptr -ReflectometryReductionOneAuto2::rebinAndScale(MatrixWorkspace_sptr inputWS, - RebinParams const ¶ms) { +MatrixWorkspace_sptr ReflectometryReductionOneAuto2::rebinAndScale( + const MatrixWorkspace_sptr &inputWS, RebinParams const ¶ms) { // Rebin IAlgorithm_sptr algRebin = createChildAlgorithm("Rebin"); algRebin->initialize(); @@ -747,7 +746,7 @@ ReflectometryReductionOneAuto2::rebinAndScale(MatrixWorkspace_sptr inputWS, } MatrixWorkspace_sptr -ReflectometryReductionOneAuto2::cropQ(MatrixWorkspace_sptr inputWS, +ReflectometryReductionOneAuto2::cropQ(const MatrixWorkspace_sptr &inputWS, RebinParams const ¶ms) { IAlgorithm_sptr algCrop = createChildAlgorithm("CropWorkspace"); algCrop->initialize(); diff --git a/Framework/Algorithms/src/ReflectometryReductionOneAuto3.cpp b/Framework/Algorithms/src/ReflectometryReductionOneAuto3.cpp index 952f0173fd82b48d300133a34a1f0fd2701510f7..365b8b41fa14cc318b3e3180b4fefaddd4e9bae0 100644 --- a/Framework/Algorithms/src/ReflectometryReductionOneAuto3.cpp +++ b/Framework/Algorithms/src/ReflectometryReductionOneAuto3.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/ReflectometryReductionOneAuto3.h" #include "MantidAPI/BoostOptionalToAlgorithmProperty.h" @@ -163,7 +163,7 @@ ReflectometryReductionOneAuto3::validateInputs() { } std::string ReflectometryReductionOneAuto3::getRunNumberForWorkspaceGroup( - WorkspaceGroup_const_sptr group) { + const WorkspaceGroup_const_sptr &group) { // Return the run number for the first child workspace if (!group) throw std::runtime_error("Invalid workspace group type"); @@ -471,8 +471,8 @@ void ReflectometryReductionOneAuto3::exec() { * @param inputWS :: the input workspace * @return :: the names of the detectors of interest */ -std::vector<std::string> -ReflectometryReductionOneAuto3::getDetectorNames(MatrixWorkspace_sptr inputWS) { +std::vector<std::string> ReflectometryReductionOneAuto3::getDetectorNames( + const MatrixWorkspace_sptr &inputWS) { std::vector<std::string> wsIndices; boost::split(wsIndices, m_processingInstructionsWorkspaceIndex, boost::is_any_of(":,-+")); @@ -546,8 +546,8 @@ MatrixWorkspace_sptr ReflectometryReductionOneAuto3::correctDetectorPositions( * @param inputWS :: the input workspace * @return :: the angle of the detector (only the first detector is considered) */ -double -ReflectometryReductionOneAuto3::calculateTheta(MatrixWorkspace_sptr inputWS) { +double ReflectometryReductionOneAuto3::calculateTheta( + const MatrixWorkspace_sptr &inputWS) { const auto detectorsOfInterest = getDetectorNames(inputWS); // Detectors of interest may be empty. This happens for instance when we input @@ -573,7 +573,7 @@ ReflectometryReductionOneAuto3::calculateTheta(MatrixWorkspace_sptr inputWS) { * @param instrument :: The instrument attached to the workspace */ void ReflectometryReductionOneAuto3::populateAlgorithmicCorrectionProperties( - IAlgorithm_sptr alg, Instrument_const_sptr instrument) { + const IAlgorithm_sptr &alg, const Instrument_const_sptr &instrument) { // With algorithmic corrections, monitors should not be integrated, see below const std::string correctionAlgorithm = getProperty("CorrectionAlgorithm"); @@ -635,7 +635,7 @@ void ReflectometryReductionOneAuto3::populateAlgorithmicCorrectionProperties( } auto ReflectometryReductionOneAuto3::getRebinParams( - MatrixWorkspace_sptr inputWS, const double theta) -> RebinParams { + const MatrixWorkspace_sptr &inputWS, const double theta) -> RebinParams { bool qMinIsDefault = true, qMaxIsDefault = true; auto const qMin = getPropertyOrDefault("MomentumTransferMin", inputWS->x(0).front(), qMinIsDefault); @@ -652,7 +652,7 @@ auto ReflectometryReductionOneAuto3::getRebinParams( * @return :: the rebin step in Q, or none if it could not be found */ boost::optional<double> -ReflectometryReductionOneAuto3::getQStep(MatrixWorkspace_sptr inputWS, +ReflectometryReductionOneAuto3::getQStep(const MatrixWorkspace_sptr &inputWS, const double theta) { Property *qStepProp = getProperty("MomentumTransferStep"); double qstep; @@ -690,7 +690,7 @@ ReflectometryReductionOneAuto3::getQStep(MatrixWorkspace_sptr inputWS, * @return :: the output workspace */ MatrixWorkspace_sptr -ReflectometryReductionOneAuto3::rebin(MatrixWorkspace_sptr inputWS, +ReflectometryReductionOneAuto3::rebin(const MatrixWorkspace_sptr &inputWS, const RebinParams ¶ms) { IAlgorithm_sptr algRebin = createChildAlgorithm("Rebin"); algRebin->initialize(); diff --git a/Framework/Algorithms/src/ReflectometrySumInQ.cpp b/Framework/Algorithms/src/ReflectometrySumInQ.cpp index 615ad2cfe8850131fe7789612fce835ddc4b9c9e..cee33ecaa16b8e0912a81e96e13f745e6bbe8fef 100644 --- a/Framework/Algorithms/src/ReflectometrySumInQ.cpp +++ b/Framework/Algorithms/src/ReflectometrySumInQ.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/ReflectometrySumInQ.h" diff --git a/Framework/Algorithms/src/ReflectometryWorkflowBase.cpp b/Framework/Algorithms/src/ReflectometryWorkflowBase.cpp index bcecebfcb3778eec56ebd98acf9226d693807b9f..7753d5f99c8b0175951189386e5665bf838978bb 100644 --- a/Framework/Algorithms/src/ReflectometryWorkflowBase.cpp +++ b/Framework/Algorithms/src/ReflectometryWorkflowBase.cpp @@ -1,12 +1,14 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + -#include "MantidAlgorithms/ReflectometryWorkflowBase.h" +#include <utility> + #include "MantidAPI/BoostOptionalToAlgorithmProperty.h" #include "MantidAPI/WorkspaceUnitValidator.h" +#include "MantidAlgorithms/ReflectometryWorkflowBase.h" #include "MantidKernel/ArrayProperty.h" #include "MantidKernel/BoundedValidator.h" #include "MantidKernel/CompositeValidator.h" @@ -196,12 +198,12 @@ ReflectometryWorkflowBase::OptionalMinMax ReflectometryWorkflowBase::getOptionalMinMax( Mantid::API::Algorithm *const alg, const std::string &minProperty, const std::string &maxProperty, - Mantid::Geometry::Instrument_const_sptr inst, std::string minIdfName, - std::string maxIdfName) const { - const auto min = checkForOptionalInstrumentDefault<double>(alg, minProperty, - inst, minIdfName); - const auto max = checkForOptionalInstrumentDefault<double>(alg, maxProperty, - inst, maxIdfName); + const Mantid::Geometry::Instrument_const_sptr &inst, + const std::string &minIdfName, const std::string &maxIdfName) const { + const auto min = checkForOptionalInstrumentDefault<double>( + alg, minProperty, inst, std::move(minIdfName)); + const auto max = checkForOptionalInstrumentDefault<double>( + alg, maxProperty, inst, std::move(maxIdfName)); if (min.is_initialized() && max.is_initialized()) { MinMax result = getMinMax(minProperty, maxProperty); return OptionalMinMax(result); @@ -361,7 +363,7 @@ void ReflectometryWorkflowBase::getTransmissionRunInfo( * @return The cropped and corrected monitor workspace. */ MatrixWorkspace_sptr ReflectometryWorkflowBase::toLamMonitor( - const MatrixWorkspace_sptr &toConvert, const OptionalInteger monitorIndex, + const MatrixWorkspace_sptr &toConvert, const OptionalInteger &monitorIndex, const OptionalMinMax &backgroundMinMax) { // Convert Units. auto convertUnitsAlg = this->createChildAlgorithm("ConvertUnits"); @@ -473,9 +475,9 @@ ReflectometryWorkflowBase::makeUnityWorkspace(const HistogramX &x) { * @return Tuple of detector and monitor workspaces */ ReflectometryWorkflowBase::DetectorMonitorWorkspacePair -ReflectometryWorkflowBase::toLam(MatrixWorkspace_sptr toConvert, +ReflectometryWorkflowBase::toLam(const MatrixWorkspace_sptr &toConvert, const std::string &processingCommands, - const OptionalInteger monitorIndex, + const OptionalInteger &monitorIndex, const MinMax &wavelengthMinMax, const OptionalMinMax &backgroundMinMax) { // Detector Workspace Processing diff --git a/Framework/Algorithms/src/ReflectometryWorkflowBase2.cpp b/Framework/Algorithms/src/ReflectometryWorkflowBase2.cpp index 262aff90e31d5dc93ac4884a4471b2e866bdc000..5336598c54277c201e94de6cf533ae9ef8d06971 100644 --- a/Framework/Algorithms/src/ReflectometryWorkflowBase2.cpp +++ b/Framework/Algorithms/src/ReflectometryWorkflowBase2.cpp @@ -1,15 +1,17 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + -#include "MantidAlgorithms/ReflectometryWorkflowBase2.h" +#include <utility> + #include "MantidAPI/Axis.h" #include "MantidAPI/BoostOptionalToAlgorithmProperty.h" #include "MantidAPI/MatrixWorkspace.h" #include "MantidAPI/Run.h" #include "MantidAPI/WorkspaceUnitValidator.h" +#include "MantidAlgorithms/ReflectometryWorkflowBase2.h" #include "MantidGeometry/Instrument.h" #include "MantidIndexing/IndexInfo.h" #include "MantidKernel/ArrayProperty.h" @@ -40,16 +42,15 @@ int convertStringNumToInt(const std::string &string) { } std::string convertToWorkspaceIndex(const std::string &spectrumNumber, - MatrixWorkspace_const_sptr ws) { + const MatrixWorkspace_const_sptr &ws) { auto specNum = convertStringNumToInt(spectrumNumber); std::string wsIdx = std::to_string( ws->getIndexFromSpectrumNumber(static_cast<Mantid::specnum_t>(specNum))); return wsIdx; } -std::string -convertProcessingInstructionsToWorkspaceIndices(const std::string &instructions, - MatrixWorkspace_const_sptr ws) { +std::string convertProcessingInstructionsToWorkspaceIndices( + const std::string &instructions, const MatrixWorkspace_const_sptr &ws) { std::string converted = ""; std::string currentNumber = ""; std::string ignoreThese = "-,:+"; @@ -79,7 +80,7 @@ convertProcessingInstructionsToWorkspaceIndices(const std::string &instructions, */ std::vector<size_t> getProcessingInstructionsAsIndices(std::string const &instructions, - MatrixWorkspace_sptr workspace) { + const MatrixWorkspace_sptr &workspace) { auto instructionsInWSIndex = convertProcessingInstructionsToWorkspaceIndices(instructions, workspace); auto groups = @@ -517,8 +518,8 @@ ReflectometryWorkflowBase2::validateWavelengthRanges() const { * @param inputWS :: the workspace to convert * @return :: the workspace in wavelength */ -MatrixWorkspace_sptr -ReflectometryWorkflowBase2::convertToWavelength(MatrixWorkspace_sptr inputWS) { +MatrixWorkspace_sptr ReflectometryWorkflowBase2::convertToWavelength( + const MatrixWorkspace_sptr &inputWS) { auto convertUnitsAlg = createChildAlgorithm("ConvertUnits"); convertUnitsAlg->initialize(); @@ -541,8 +542,8 @@ ReflectometryWorkflowBase2::convertToWavelength(MatrixWorkspace_sptr inputWS) { * @return :: the cropped workspace */ MatrixWorkspace_sptr ReflectometryWorkflowBase2::cropWavelength( - MatrixWorkspace_sptr inputWS, const bool useArgs, const double argMin, - const double argMax) { + const MatrixWorkspace_sptr &inputWS, const bool useArgs, + const double argMin, const double argMax) { double wavelengthMin = 0.0; double wavelengthMax = 0.0; @@ -584,7 +585,7 @@ MatrixWorkspace_sptr ReflectometryWorkflowBase2::cropWavelength( MatrixWorkspace_sptr ReflectometryWorkflowBase2::makeDetectorWS(MatrixWorkspace_sptr inputWS, const bool convert, const bool sum) { - auto detectorWS = inputWS; + auto detectorWS = std::move(inputWS); if (sum) { // Use GroupDetectors to extract and sum the detectors of interest @@ -635,7 +636,7 @@ ReflectometryWorkflowBase2::makeDetectorWS(MatrixWorkspace_sptr inputWS, * @return :: the monitor workspace in wavelength */ MatrixWorkspace_sptr -ReflectometryWorkflowBase2::makeMonitorWS(MatrixWorkspace_sptr inputWS, +ReflectometryWorkflowBase2::makeMonitorWS(const MatrixWorkspace_sptr &inputWS, const bool integratedMonitors) { // Extract the monitor workspace @@ -697,7 +698,8 @@ ReflectometryWorkflowBase2::makeMonitorWS(MatrixWorkspace_sptr inputWS, * @return :: the rebinned detector workspace */ MatrixWorkspace_sptr ReflectometryWorkflowBase2::rebinDetectorsToMonitors( - MatrixWorkspace_sptr detectorWS, MatrixWorkspace_sptr monitorWS) { + const MatrixWorkspace_sptr &detectorWS, + const MatrixWorkspace_sptr &monitorWS) { auto rebin = createChildAlgorithm("RebinToWorkspace"); rebin->initialize(); @@ -715,7 +717,7 @@ MatrixWorkspace_sptr ReflectometryWorkflowBase2::rebinDetectorsToMonitors( * @param instrument :: the instrument attached to the workspace */ void ReflectometryWorkflowBase2::populateMonitorProperties( - IAlgorithm_sptr alg, Instrument_const_sptr instrument) { + const IAlgorithm_sptr &alg, const Instrument_const_sptr &instrument) { const auto startOverlap = checkForOptionalInstrumentDefault<double>( this, "StartOverlap", instrument, "TransRunStartOverlap"); @@ -769,7 +771,8 @@ void ReflectometryWorkflowBase2::populateMonitorProperties( * @return :: processing instructions as a string */ std::string ReflectometryWorkflowBase2::findProcessingInstructions( - Instrument_const_sptr instrument, MatrixWorkspace_sptr inputWS) const { + const Instrument_const_sptr &instrument, + const MatrixWorkspace_sptr &inputWS) const { const std::string analysisMode = getProperty("AnalysisMode"); @@ -815,7 +818,7 @@ std::string ReflectometryWorkflowBase2::findProcessingInstructions( * @return Boolean, whether or not any transmission runs were found */ bool ReflectometryWorkflowBase2::populateTransmissionProperties( - IAlgorithm_sptr alg) const { + const IAlgorithm_sptr &alg) const { bool transRunsExist = false; @@ -845,9 +848,8 @@ bool ReflectometryWorkflowBase2::populateTransmissionProperties( * @return :: the value of theta found from the logs * @throw :: NotFoundError if the log value was not found */ -double -ReflectometryWorkflowBase2::getThetaFromLogs(MatrixWorkspace_sptr inputWs, - const std::string &logName) { +double ReflectometryWorkflowBase2::getThetaFromLogs( + const MatrixWorkspace_sptr &inputWs, const std::string &logName) { double theta = -1.; const Mantid::API::Run &run = inputWs->run(); Property *logData = run.getLogData(logName); @@ -884,7 +886,7 @@ ReflectometryWorkflowBase2::getRunNumber(MatrixWorkspace const &ws) const { std::string ReflectometryWorkflowBase2::convertProcessingInstructionsToSpectrumNumbers( const std::string &instructions, - Mantid::API::MatrixWorkspace_const_sptr ws) const { + const Mantid::API::MatrixWorkspace_const_sptr &ws) const { std::string converted = ""; std::string currentNumber = ""; std::string ignoreThese = "-,:+"; @@ -905,7 +907,7 @@ ReflectometryWorkflowBase2::convertProcessingInstructionsToSpectrumNumbers( } std::string ReflectometryWorkflowBase2::convertToSpectrumNumber( const std::string &workspaceIndex, - Mantid::API::MatrixWorkspace_const_sptr ws) const { + const Mantid::API::MatrixWorkspace_const_sptr &ws) const { auto wsIndx = convertStringNumToInt(workspaceIndex); std::string specId = std::to_string( static_cast<int32_t>(ws->indexInfo().spectrumNumber(wsIndx))); @@ -913,7 +915,8 @@ std::string ReflectometryWorkflowBase2::convertToSpectrumNumber( } void ReflectometryWorkflowBase2::convertProcessingInstructions( - Instrument_const_sptr instrument, MatrixWorkspace_sptr inputWS) { + const Instrument_const_sptr &instrument, + const MatrixWorkspace_sptr &inputWS) { m_processingInstructions = getPropertyValue("ProcessingInstructions"); if (!getPointerToProperty("ProcessingInstructions")->isDefault()) { m_processingInstructionsWorkspaceIndex = @@ -921,14 +924,14 @@ void ReflectometryWorkflowBase2::convertProcessingInstructions( m_processingInstructions, inputWS); } else { m_processingInstructionsWorkspaceIndex = - findProcessingInstructions(instrument, inputWS); + findProcessingInstructions(std::move(instrument), inputWS); m_processingInstructions = convertProcessingInstructionsToSpectrumNumbers( m_processingInstructionsWorkspaceIndex, inputWS); } } void ReflectometryWorkflowBase2::convertProcessingInstructions( - MatrixWorkspace_sptr inputWS) { + const MatrixWorkspace_sptr &inputWS) { m_processingInstructions = getPropertyValue("ProcessingInstructions"); m_processingInstructionsWorkspaceIndex = convertProcessingInstructionsToWorkspaceIndices(m_processingInstructions, @@ -938,7 +941,7 @@ void ReflectometryWorkflowBase2::convertProcessingInstructions( // Create an on-the-fly property to set an output workspace from a child // algorithm, if the child has that output value set void ReflectometryWorkflowBase2::setWorkspacePropertyFromChild( - Algorithm_sptr alg, std::string const &propertyName) { + const Algorithm_sptr &alg, std::string const &propertyName) { if (alg->isDefault(propertyName)) return; diff --git a/Framework/Algorithms/src/Regroup.cpp b/Framework/Algorithms/src/Regroup.cpp index 37512c8e43e5f641e287d207b9dff42447fd1608..91ea78d667e11956c6982a40c52635b0e5d35871 100644 --- a/Framework/Algorithms/src/Regroup.cpp +++ b/Framework/Algorithms/src/Regroup.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/Algorithms/src/RemoveBackground.cpp b/Framework/Algorithms/src/RemoveBackground.cpp index 89f3e2f87ce6d25334cb160f255c70918a972107..32bef338f62458d1eeb65a81e3fc7033879dbd04 100644 --- a/Framework/Algorithms/src/RemoveBackground.cpp +++ b/Framework/Algorithms/src/RemoveBackground.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/RemoveBackground.h" diff --git a/Framework/Algorithms/src/RemoveBins.cpp b/Framework/Algorithms/src/RemoveBins.cpp index e39d4cc5a23ca2214c36c6ff8a57bb44b1c88ae9..e8d8c17457fdb8ffff2151b2d531cadfc6e11d57 100644 --- a/Framework/Algorithms/src/RemoveBins.cpp +++ b/Framework/Algorithms/src/RemoveBins.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/RemoveBins.h" diff --git a/Framework/Algorithms/src/RemoveLowResTOF.cpp b/Framework/Algorithms/src/RemoveLowResTOF.cpp index ab0b3125d8601ce047cc2543ffc07a2c6c651eec..3fbc5f4869c4890dc250c84bb18f70e89dffaec8 100644 --- a/Framework/Algorithms/src/RemoveLowResTOF.cpp +++ b/Framework/Algorithms/src/RemoveLowResTOF.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/RemoveLowResTOF.h" #include "MantidAPI/HistogramValidator.h" diff --git a/Framework/Algorithms/src/RemoveMaskedSpectra.cpp b/Framework/Algorithms/src/RemoveMaskedSpectra.cpp index 19fcff368285c179a1b48cb54c3d062ca613ea74..7b96a6556f0ab7d7802b6a7a98534a88e4215b4b 100644 --- a/Framework/Algorithms/src/RemoveMaskedSpectra.cpp +++ b/Framework/Algorithms/src/RemoveMaskedSpectra.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/RemoveMaskedSpectra.h" diff --git a/Framework/Algorithms/src/RemovePromptPulse.cpp b/Framework/Algorithms/src/RemovePromptPulse.cpp index 3e692b2a12813520347348052997af520127ba62..412802216b0d4e35c37ddf646ef60bf1ddcbf3cb 100644 --- a/Framework/Algorithms/src/RemovePromptPulse.cpp +++ b/Framework/Algorithms/src/RemovePromptPulse.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/RemovePromptPulse.h" #include "MantidAPI/WorkspaceUnitValidator.h" @@ -68,7 +68,8 @@ double getMedian(const API::Run &run, const std::string &name) { return stats.median; } -void getTofRange(MatrixWorkspace_const_sptr wksp, double &tmin, double &tmax) { +void getTofRange(const MatrixWorkspace_const_sptr &wksp, double &tmin, + double &tmax) { DataObjects::EventWorkspace_const_sptr eventWksp = boost::dynamic_pointer_cast<const DataObjects::EventWorkspace>(wksp); if (eventWksp == nullptr) { diff --git a/Framework/Algorithms/src/RemoveSpectra.cpp b/Framework/Algorithms/src/RemoveSpectra.cpp index 76e0eb86d97947f020dc4898de2cb7aa801c9c5d..ab118c291792fb4834acbdda99d6ed11171ee2db 100644 --- a/Framework/Algorithms/src/RemoveSpectra.cpp +++ b/Framework/Algorithms/src/RemoveSpectra.cpp @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #include "MantidAlgorithms/RemoveSpectra.h" #include "MantidAPI/AlgorithmManager.h" #include "MantidAPI/AnalysisDataService.h" diff --git a/Framework/Algorithms/src/RemoveWorkspaceHistory.cpp b/Framework/Algorithms/src/RemoveWorkspaceHistory.cpp index 9b6e1c2c36854c95b70405f27d82b7e1dc011b05..d443574c3279a1f1d56142026024a452b8caf389 100644 --- a/Framework/Algorithms/src/RemoveWorkspaceHistory.cpp +++ b/Framework/Algorithms/src/RemoveWorkspaceHistory.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/RemoveWorkspaceHistory.h" #include "MantidAPI/Workspace.h" diff --git a/Framework/Algorithms/src/RenameWorkspace.cpp b/Framework/Algorithms/src/RenameWorkspace.cpp index 4312eb87a873cb2cb1955d2bcc90e1c24f244c3a..22728788e2d332a3d951ad0aa7e9f00e51be1f7a 100644 --- a/Framework/Algorithms/src/RenameWorkspace.cpp +++ b/Framework/Algorithms/src/RenameWorkspace.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/RenameWorkspace.h" #include "MantidAPI/AnalysisDataService.h" diff --git a/Framework/Algorithms/src/RenameWorkspaces.cpp b/Framework/Algorithms/src/RenameWorkspaces.cpp index 71a29b5483de0cbe3f8934c0234261eb64544c14..12160a41141e911d31832c42ec42114e4d239dc6 100644 --- a/Framework/Algorithms/src/RenameWorkspaces.cpp +++ b/Framework/Algorithms/src/RenameWorkspaces.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/Algorithms/src/ReplaceSpecialValues.cpp b/Framework/Algorithms/src/ReplaceSpecialValues.cpp index e98661089be870d8bdef745ae386e0c4af306787..021e35ee78a9667b6ab67e3e857059d5bed8af3f 100644 --- a/Framework/Algorithms/src/ReplaceSpecialValues.cpp +++ b/Framework/Algorithms/src/ReplaceSpecialValues.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/Algorithms/src/ResampleX.cpp b/Framework/Algorithms/src/ResampleX.cpp index 3e1049fce3822f87e4281c54298df08b553efe97..4a686c0ec29a545a4594bfc0af26f4effb60f706 100644 --- a/Framework/Algorithms/src/ResampleX.cpp +++ b/Framework/Algorithms/src/ResampleX.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/ResampleX.h" #include "MantidAPI/Axis.h" @@ -117,8 +117,8 @@ map<string, string> ResampleX::validateInputs() { *everything * went according to plan. */ -string determineXMinMax(MatrixWorkspace_sptr inputWS, vector<double> &xmins, - vector<double> &xmaxs) { +string determineXMinMax(const MatrixWorkspace_sptr &inputWS, + vector<double> &xmins, vector<double> &xmaxs) { const size_t numSpectra = inputWS->getNumberHistograms(); // pad out the ranges by copying the first value to the rest that are needed diff --git a/Framework/Algorithms/src/ResetNegatives.cpp b/Framework/Algorithms/src/ResetNegatives.cpp index e69d0cbca90f12762e7e1348cba77226bd9b9ea0..88f4fedbe3ded49e42ba201063a922ee2514a379 100644 --- a/Framework/Algorithms/src/ResetNegatives.cpp +++ b/Framework/Algorithms/src/ResetNegatives.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/ResetNegatives.h" #include "MantidAPI/WorkspaceFactory.h" @@ -141,8 +141,9 @@ inline double fixZero(const double value) { * @param wksp The workspace to modify. * @param prog The progress. */ -void ResetNegatives::pushMinimum(MatrixWorkspace_const_sptr minWS, - MatrixWorkspace_sptr wksp, Progress &prog) { +void ResetNegatives::pushMinimum(const MatrixWorkspace_const_sptr &minWS, + const MatrixWorkspace_sptr &wksp, + Progress &prog) { int64_t nHist = minWS->getNumberHistograms(); PARALLEL_FOR_IF(Kernel::threadSafe(*wksp, *minWS)) for (int64_t i = 0; i < nHist; i++) { @@ -151,9 +152,9 @@ void ResetNegatives::pushMinimum(MatrixWorkspace_const_sptr minWS, if (minValue <= 0) { minValue *= -1.; auto &y = wksp->mutableY(i); - for (double &value : y) { - value = fixZero(value + minValue); - } + std::transform(y.begin(), y.end(), y.begin(), [minValue](double value) { + return fixZero(value + minValue); + }); } prog.report(); PARALLEL_END_INTERUPT_REGION @@ -171,9 +172,9 @@ void ResetNegatives::pushMinimum(MatrixWorkspace_const_sptr minWS, * @param wksp The workspace to modify. * @param prog The progress. */ -void ResetNegatives::changeNegatives(MatrixWorkspace_const_sptr minWS, +void ResetNegatives::changeNegatives(const MatrixWorkspace_const_sptr &minWS, const double spectrumNegativeValues, - MatrixWorkspace_sptr wksp, + const MatrixWorkspace_sptr &wksp, Progress &prog) { int64_t nHist = wksp->getNumberHistograms(); PARALLEL_FOR_IF(Kernel::threadSafe(*minWS, *wksp)) diff --git a/Framework/Algorithms/src/ResizeRectangularDetector.cpp b/Framework/Algorithms/src/ResizeRectangularDetector.cpp index 1b5caae8388914b961abfd616de1feaaa6d834b4..f7c7da4663ae2af2f18a7bc31028b61c40bebf1d 100644 --- a/Framework/Algorithms/src/ResizeRectangularDetector.cpp +++ b/Framework/Algorithms/src/ResizeRectangularDetector.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/ResizeRectangularDetector.h" #include "MantidAPI/MatrixWorkspace.h" diff --git a/Framework/Algorithms/src/RingProfile.cpp b/Framework/Algorithms/src/RingProfile.cpp index bfe608c1e89b42c6b6e9edd92592368259fd7d22..e7647dc7c8275448d1ea0d2e4e887390bbd722db 100644 --- a/Framework/Algorithms/src/RingProfile.cpp +++ b/Framework/Algorithms/src/RingProfile.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/RingProfile.h" #include "MantidAPI/IEventWorkspace.h" @@ -215,7 +215,7 @@ void RingProfile::exec() { * @param inputWS: the input workspace */ void RingProfile::checkInputsForSpectraWorkspace( - const API::MatrixWorkspace_sptr inputWS) { + const API::MatrixWorkspace_sptr &inputWS) { try { // finding the limits of the instrument const auto &spectrumInfo = inputWS->spectrumInfo(); @@ -325,7 +325,7 @@ void RingProfile::checkInputsForSpectraWorkspace( * @param inputWS: pointer to the input workspace */ void RingProfile::checkInputsForNumericWorkspace( - const API::MatrixWorkspace_sptr inputWS) { + const API::MatrixWorkspace_sptr &inputWS) { g_log.notice() << "CheckingInputs For Numeric Workspace\n"; // The Axis0 is defined by the values of readX inside the spectra of the @@ -396,7 +396,8 @@ void RingProfile::checkInputsForNumericWorkspace( *integration values */ void RingProfile::processInstrumentRingProfile( - const API::MatrixWorkspace_sptr inputWS, std::vector<double> &output_bins) { + const API::MatrixWorkspace_sptr &inputWS, + std::vector<double> &output_bins) { const auto &spectrumInfo = inputWS->spectrumInfo(); for (int i = 0; i < static_cast<int>(inputWS->getNumberHistograms()); i++) { @@ -485,7 +486,8 @@ int RingProfile::getBinForPixel(const Kernel::V3D &position) { *integration values */ void RingProfile::processNumericImageRingProfile( - const API::MatrixWorkspace_sptr inputWS, std::vector<double> &output_bins) { + const API::MatrixWorkspace_sptr &inputWS, + std::vector<double> &output_bins) { // allocate the bin positions vector std::vector<int> bin_n(inputWS->dataY(0).size(), -1); @@ -538,7 +540,7 @@ void RingProfile::processNumericImageRingProfile( * @param bins_pos: bin positions (for each column inside the spectrum, the *correspondent bin_pos) */ -void RingProfile::getBinForPixel(const API::MatrixWorkspace_sptr ws, +void RingProfile::getBinForPixel(const API::MatrixWorkspace_sptr &ws, int spectrum_index, std::vector<int> &bins_pos) { diff --git a/Framework/Algorithms/src/RunCombinationHelpers/RunCombinationHelper.cpp b/Framework/Algorithms/src/RunCombinationHelpers/RunCombinationHelper.cpp index 574223de791286fdbe24606b4dcc18783fe2fa4c..6bc22fdb6582ac73e4c9324f4d888d1c6531f1f1 100644 --- a/Framework/Algorithms/src/RunCombinationHelpers/RunCombinationHelper.cpp +++ b/Framework/Algorithms/src/RunCombinationHelpers/RunCombinationHelper.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/RunCombinationHelpers/RunCombinationHelper.h" @@ -59,7 +59,8 @@ RunCombinationHelper::unWrapGroups(const std::vector<std::string> &inputs) { * to later check the compatibility of the others with the reference * @param ref : the reference workspace */ -void RunCombinationHelper::setReferenceProperties(MatrixWorkspace_sptr ref) { +void RunCombinationHelper::setReferenceProperties( + const MatrixWorkspace_sptr &ref) { m_numberSpectra = ref->getNumberHistograms(); m_numberDetectors = ref->detectorInfo().size(); m_xUnit = ref->getAxis(0)->unit()->unitID(); @@ -82,7 +83,7 @@ void RunCombinationHelper::setReferenceProperties(MatrixWorkspace_sptr ref) { * @return : empty if compatible, error message otherwises */ std::string -RunCombinationHelper::checkCompatibility(MatrixWorkspace_sptr ws, +RunCombinationHelper::checkCompatibility(const MatrixWorkspace_sptr &ws, bool checkNumberHistograms) { std::string errors; if (ws->getNumberHistograms() != m_numberSpectra && checkNumberHistograms) diff --git a/Framework/Algorithms/src/RunCombinationHelpers/SampleLogsBehaviour.cpp b/Framework/Algorithms/src/RunCombinationHelpers/SampleLogsBehaviour.cpp index 5815bfb3541c9b73fdb8e6a797c243909dea7f4b..03a6bf849742076c03dbb30636c356afaaa3c0cd 100644 --- a/Framework/Algorithms/src/RunCombinationHelpers/SampleLogsBehaviour.cpp +++ b/Framework/Algorithms/src/RunCombinationHelpers/SampleLogsBehaviour.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/RunCombinationHelpers/SampleLogsBehaviour.h" #include "MantidAPI/MatrixWorkspace.h" @@ -91,7 +91,7 @@ const std::string SampleLogsBehaviour::SUM_DOC = * @param parName the parameter names which specify the sample log sames to * merge given be the IPF */ -SampleLogsBehaviour::SampleLogsBehaviour(MatrixWorkspace_sptr ws, +SampleLogsBehaviour::SampleLogsBehaviour(const MatrixWorkspace_sptr &ws, Logger &logger, const SampleLogNames &logEntries, const ParameterName &parName) @@ -416,8 +416,8 @@ bool SampleLogsBehaviour::setNumericValue(const std::string &item, * @param addeeWS the workspace being merged * @param outWS the workspace the others are merged into */ -void SampleLogsBehaviour::mergeSampleLogs(MatrixWorkspace_sptr addeeWS, - MatrixWorkspace_sptr outWS) { +void SampleLogsBehaviour::mergeSampleLogs(const MatrixWorkspace_sptr &addeeWS, + const MatrixWorkspace_sptr &outWS) { for (const auto &item : m_logMap) { const std::string &logName = item.first.first; @@ -625,7 +625,8 @@ bool SampleLogsBehaviour::stringPropertiesMatch( * * @param outWS the merged workspace */ -void SampleLogsBehaviour::setUpdatedSampleLogs(MatrixWorkspace_sptr outWS) { +void SampleLogsBehaviour::setUpdatedSampleLogs( + const MatrixWorkspace_sptr &outWS) { for (auto &item : m_logMap) { std::string propertyToReset = item.first.first; @@ -647,7 +648,7 @@ void SampleLogsBehaviour::setUpdatedSampleLogs(MatrixWorkspace_sptr outWS) { * @param addeeWS the workspace being merged */ void SampleLogsBehaviour::removeSampleLogsFromWorkspace( - MatrixWorkspace_sptr addeeWS) { + const MatrixWorkspace_sptr &addeeWS) { for (const auto &prop : m_addeeLogMap) { const auto &propName = prop->name(); addeeWS->mutableRun().removeProperty(propName); @@ -663,7 +664,7 @@ void SampleLogsBehaviour::removeSampleLogsFromWorkspace( * @param addeeWS the workspace being merged */ void SampleLogsBehaviour::readdSampleLogToWorkspace( - MatrixWorkspace_sptr addeeWS) { + const MatrixWorkspace_sptr &addeeWS) { for (const auto &item : m_addeeLogMap) { auto property = std::unique_ptr<Kernel::Property>(item->clone()); addeeWS->mutableRun().addProperty(std::move(property)); @@ -676,7 +677,7 @@ void SampleLogsBehaviour::readdSampleLogToWorkspace( * * @param ws the merged workspace to reset the sample logs for */ -void SampleLogsBehaviour::resetSampleLogs(MatrixWorkspace_sptr ws) { +void SampleLogsBehaviour::resetSampleLogs(const MatrixWorkspace_sptr &ws) { for (auto const &item : m_logMap) { std::string const &propertyToReset = item.first.first; diff --git a/Framework/Algorithms/src/SANSCollimationLengthEstimator.cpp b/Framework/Algorithms/src/SANSCollimationLengthEstimator.cpp index fd926cfc9e60226399943aad7a4468060fe0a8db..fdf2f1b04448db1c06ff293ef4b78330fddc0c3d 100644 --- a/Framework/Algorithms/src/SANSCollimationLengthEstimator.cpp +++ b/Framework/Algorithms/src/SANSCollimationLengthEstimator.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/SANSCollimationLengthEstimator.h" #include "MantidAPI/MatrixWorkspace.h" @@ -22,7 +22,7 @@ Mantid::Kernel::Logger g_log("SANSCollimationLengthEstimator"); * @param val: a value as a string * @returns true if it is convertible else false */ -bool checkForDouble(std::string val) { +bool checkForDouble(const std::string &val) { auto isDouble = false; try { boost::lexical_cast<double>(val); @@ -45,7 +45,7 @@ using namespace API; * @returns the collimation length */ double SANSCollimationLengthEstimator::provideCollimationLength( - Mantid::API::MatrixWorkspace_sptr workspace) { + const Mantid::API::MatrixWorkspace_sptr &workspace) { // If the instrument does not have a correction specified then set the length // to 4 const double defaultLColim = 4.0; @@ -104,7 +104,7 @@ double SANSCollimationLengthEstimator::provideCollimationLength( * length */ double SANSCollimationLengthEstimator::getCollimationLengthWithGuides( - MatrixWorkspace_sptr inOutWS, const double L1, + const MatrixWorkspace_sptr &inOutWS, const double L1, const double collimationLengthCorrection) const { auto lCollim = L1 - collimationLengthCorrection; diff --git a/Framework/Algorithms/src/SampleCorrections/DetectorGridDefinition.cpp b/Framework/Algorithms/src/SampleCorrections/DetectorGridDefinition.cpp index fa8e20c796a60da94223e88ea846357c6e4cdacd..cdc3b4c86165e13eab38621c7399c86f22ef1158 100644 --- a/Framework/Algorithms/src/SampleCorrections/DetectorGridDefinition.cpp +++ b/Framework/Algorithms/src/SampleCorrections/DetectorGridDefinition.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/SampleCorrections/DetectorGridDefinition.h" diff --git a/Framework/Algorithms/src/SampleCorrections/MCAbsorptionStrategy.cpp b/Framework/Algorithms/src/SampleCorrections/MCAbsorptionStrategy.cpp index 3d8dd763b546d2dd883cca3634db1f03c539c633..41b007239b44cf0b732c44c1d2950b61eb512b7f 100644 --- a/Framework/Algorithms/src/SampleCorrections/MCAbsorptionStrategy.cpp +++ b/Framework/Algorithms/src/SampleCorrections/MCAbsorptionStrategy.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/SampleCorrections/MCAbsorptionStrategy.h" #include "MantidAlgorithms/SampleCorrections/IBeamProfile.h" @@ -64,7 +64,7 @@ MCAbsorptionStrategy::MCAbsorptionStrategy( */ void MCAbsorptionStrategy::calculate( Kernel::PseudoRandomNumberGenerator &rng, const Kernel::V3D &finalPos, - Mantid::HistogramData::Points lambdas, double lambdaFixed, + const Mantid::HistogramData::Points &lambdas, double lambdaFixed, Mantid::API::ISpectrum &attenuationFactorsSpectrum) { const auto scatterBounds = m_scatterVol.getBoundingBox(); const auto nbins = static_cast<int>(lambdas.size()); diff --git a/Framework/Algorithms/src/SampleCorrections/MCInteractionVolume.cpp b/Framework/Algorithms/src/SampleCorrections/MCInteractionVolume.cpp index 01c60ca586f1cdedb8d562fd17be591195b6c784..5ac1a7f3d442731053b94d72f71f6be2b4c6e344 100644 --- a/Framework/Algorithms/src/SampleCorrections/MCInteractionVolume.cpp +++ b/Framework/Algorithms/src/SampleCorrections/MCInteractionVolume.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/SampleCorrections/MCInteractionVolume.h" #include "MantidAPI/Sample.h" diff --git a/Framework/Algorithms/src/SampleCorrections/MayersSampleCorrection.cpp b/Framework/Algorithms/src/SampleCorrections/MayersSampleCorrection.cpp index 11498568245653cf0109e658301f462516a782a2..9bcb91d47b3b29a23e412a649c6905e0a5f411de 100644 --- a/Framework/Algorithms/src/SampleCorrections/MayersSampleCorrection.cpp +++ b/Framework/Algorithms/src/SampleCorrections/MayersSampleCorrection.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/SampleCorrections/MayersSampleCorrection.h" #include "MantidAPI/InstrumentValidator.h" @@ -88,8 +88,6 @@ void MayersSampleCorrection::init() { "An output workspace."); } -/** - */ void MayersSampleCorrection::exec() { using API::Progress; using API::WorkspaceFactory; diff --git a/Framework/Algorithms/src/SampleCorrections/MayersSampleCorrectionStrategy.cpp b/Framework/Algorithms/src/SampleCorrections/MayersSampleCorrectionStrategy.cpp index 4b87625cf8e5c6433b69bb20b3f929b4194a6fc9..0ba5fde8df5439ad780310dffb514b8adf390f15 100644 --- a/Framework/Algorithms/src/SampleCorrections/MayersSampleCorrectionStrategy.cpp +++ b/Framework/Algorithms/src/SampleCorrections/MayersSampleCorrectionStrategy.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //----------------------------------------------------------------------------- // Includes diff --git a/Framework/Algorithms/src/SampleCorrections/RectangularBeamProfile.cpp b/Framework/Algorithms/src/SampleCorrections/RectangularBeamProfile.cpp index 62fea5b43ab9a3762e8b49ef31294147026151d3..c9912faec8e3339403a3cbc00fd67884910192fb 100644 --- a/Framework/Algorithms/src/SampleCorrections/RectangularBeamProfile.cpp +++ b/Framework/Algorithms/src/SampleCorrections/RectangularBeamProfile.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/SampleCorrections/RectangularBeamProfile.h" #include "MantidAPI/Sample.h" diff --git a/Framework/Algorithms/src/SampleCorrections/SparseInstrument.cpp b/Framework/Algorithms/src/SampleCorrections/SparseInstrument.cpp index 1c12c8e035921c9a60004e0b791480acf4aa56b3..3a44fc01a4092f486c94333dffe14071405ef963 100644 --- a/Framework/Algorithms/src/SampleCorrections/SparseInstrument.cpp +++ b/Framework/Algorithms/src/SampleCorrections/SparseInstrument.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/SampleCorrections/SparseInstrument.h" diff --git a/Framework/Algorithms/src/SassenaFFT.cpp b/Framework/Algorithms/src/SassenaFFT.cpp index 2d6504178b6a21254a8ccc4da74ae801ead94258..6a3df78572be1d8e930a0e6d7239a447ffbcab8f 100644 --- a/Framework/Algorithms/src/SassenaFFT.cpp +++ b/Framework/Algorithms/src/SassenaFFT.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/Algorithms/src/Scale.cpp b/Framework/Algorithms/src/Scale.cpp index 67a48235f907ec268f0ae99d51360e185e1a02aa..3a0eb9be420de845eaa1e8959a620c5853329b96 100644 --- a/Framework/Algorithms/src/Scale.cpp +++ b/Framework/Algorithms/src/Scale.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/Scale.h" #include "MantidAPI/MatrixWorkspace.h" diff --git a/Framework/Algorithms/src/ScaleX.cpp b/Framework/Algorithms/src/ScaleX.cpp index 083720c5286d17e38a7857d8e256434110d15ad1..cf7c44a061aa5cdd3b997eb6b3abedd434072da9 100644 --- a/Framework/Algorithms/src/ScaleX.cpp +++ b/Framework/Algorithms/src/ScaleX.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/Algorithms/src/Segfault.cpp b/Framework/Algorithms/src/Segfault.cpp index 8aa3d4014a549e0910971cd0cfdfe1b9c2324fb0..3c34a8291eb8a0685c31a5c9e8d4b3c8c824f3d8 100644 --- a/Framework/Algorithms/src/Segfault.cpp +++ b/Framework/Algorithms/src/Segfault.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/Segfault.h" diff --git a/Framework/Algorithms/src/SetInstrumentParameter.cpp b/Framework/Algorithms/src/SetInstrumentParameter.cpp index 381aca5e2270169f61c85ec0f1307e495ebd8521..d9a60c2353912808d41e0303d0cfc869df017d03 100644 --- a/Framework/Algorithms/src/SetInstrumentParameter.cpp +++ b/Framework/Algorithms/src/SetInstrumentParameter.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/SetInstrumentParameter.h" #include "MantidAPI/InstrumentValidator.h" diff --git a/Framework/Algorithms/src/SetUncertainties.cpp b/Framework/Algorithms/src/SetUncertainties.cpp index e09129b279cb9c704c91cd928ab9f923a08f566c..c652e851177251d3b3866023630a50a512c2cea8 100644 --- a/Framework/Algorithms/src/SetUncertainties.cpp +++ b/Framework/Algorithms/src/SetUncertainties.cpp @@ -1,13 +1,14 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/SetUncertainties.h" #include "MantidAPI/MatrixWorkspace.h" #include "MantidAPI/SpectrumInfo.h" #include "MantidAPI/WorkspaceFactory.h" +#include "MantidDataObjects/EventWorkspace.h" #include "MantidGeometry/IDetector.h" #include "MantidGeometry/Instrument.h" #include "MantidKernel/BoundedValidator.h" @@ -111,6 +112,10 @@ void SetUncertainties::init() { void SetUncertainties::exec() { MatrixWorkspace_const_sptr inputWorkspace = getProperty("InputWorkspace"); + auto inputEventWorkspace = + boost::dynamic_pointer_cast<const DataObjects::EventWorkspace>( + inputWorkspace); + MatrixWorkspace_sptr outputWorkspace = getProperty("OutputWorkspace"); std::string errorType = getProperty("SetError"); bool zeroError = (errorType == ZERO); bool takeSqrt = ((errorType == SQRT) || (errorType == SQRT_OR_ONE)); @@ -120,32 +125,45 @@ void SetUncertainties::exec() { double valueToSet = resetOne ? 1.0 : getProperty("SetErrorTo"); double valueToCompare = resetOne ? 0.0 : getProperty("IfEqualTo"); int precision = getProperty("Precision"); - double tolerance = resetOne ? 1E-10 : std::pow(10.0, precision * (-1)); + double tolerance = resetOne ? 1E-10 : std::pow(10.0, -1. * precision); // Create the output workspace. This will copy many aspects from the input // one. - MatrixWorkspace_sptr outputWorkspace = - WorkspaceFactory::Instance().create(inputWorkspace); - // ...but not the data, so do that here. + const int64_t numHists = + static_cast<int64_t>(inputWorkspace->getNumberHistograms()); + if (inputEventWorkspace) { + if (inputWorkspace == outputWorkspace && errorType == SQRT && + inputEventWorkspace->getEventType() == Mantid::API::EventType::TOF) { + // Uncertainty is already square root of the y value + return; + } + // Copy the histogram representation over to a Workspace2D + outputWorkspace = WorkspaceFactory::Instance().create(inputWorkspace); + PARALLEL_FOR_IF(Kernel::threadSafe(*inputWorkspace, *outputWorkspace)) + for (int64_t i = 0; i < numHists; ++i) { + PARALLEL_START_INTERUPT_REGION + // copy X/Y/E + outputWorkspace->setSharedX(i, inputWorkspace->sharedX(i)); + outputWorkspace->setSharedY(i, inputWorkspace->sharedY(i)); + outputWorkspace->setSharedE(i, inputWorkspace->sharedE(i)); + PARALLEL_END_INTERUPT_REGION + } + PARALLEL_CHECK_INTERUPT_REGION + } else if (inputWorkspace != outputWorkspace) { + outputWorkspace = inputWorkspace->clone(); + } + const auto &spectrumInfo = inputWorkspace->spectrumInfo(); - const size_t numHists = inputWorkspace->getNumberHistograms(); Progress prog(this, 0.0, 1.0, numHists); - PARALLEL_FOR_IF(Kernel::threadSafe(*inputWorkspace, *outputWorkspace)) - for (int64_t i = 0; i < int64_t(numHists); ++i) { + for (int64_t i = 0; i < numHists; ++i) { PARALLEL_START_INTERUPT_REGION - - // copy the X/Y - outputWorkspace->setSharedX(i, inputWorkspace->sharedX(i)); - outputWorkspace->setSharedY(i, inputWorkspace->sharedY(i)); // copy the E or set to zero depending on the mode if (errorType == ONE_IF_ZERO || customError) { - outputWorkspace->setSharedE(i, inputWorkspace->sharedE(i)); } else { outputWorkspace->mutableE(i) = 0.0; } - // ZERO mode doesn't calculate anything further if ((!zeroError) && (!(spectrumInfo.hasDetectors(i) && spectrumInfo.isMasked(i)))) { @@ -159,13 +177,10 @@ void SetUncertainties::exec() { SetError(valueToSet, valueToCompare, tolerance)); } } - prog.report(); - PARALLEL_END_INTERUPT_REGION } PARALLEL_CHECK_INTERUPT_REGION - setProperty("OutputWorkspace", outputWorkspace); } diff --git a/Framework/Algorithms/src/ShiftLogTime.cpp b/Framework/Algorithms/src/ShiftLogTime.cpp index d648e5f3c37e8bdc0f2698c4ef9017ae4629b6cf..1ba56e13083f59c9aa65dcebae7be78f48ac4e01 100644 --- a/Framework/Algorithms/src/ShiftLogTime.cpp +++ b/Framework/Algorithms/src/ShiftLogTime.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/ShiftLogTime.h" #include "MantidAPI/MatrixWorkspace.h" diff --git a/Framework/Algorithms/src/SignalOverError.cpp b/Framework/Algorithms/src/SignalOverError.cpp index 2d2bfc6d60586aaf9ae6e5888b436fef8afc12f5..f2759b7f282aa84ed1f19208a972ca5574d349b9 100644 --- a/Framework/Algorithms/src/SignalOverError.cpp +++ b/Framework/Algorithms/src/SignalOverError.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/SignalOverError.h" #include "MantidKernel/System.h" diff --git a/Framework/Algorithms/src/SmoothData.cpp b/Framework/Algorithms/src/SmoothData.cpp index 2891f28192fc0d6bc34fcb289644c9130f464088..8893838585b9463e78f63b89be388df82924a679 100644 --- a/Framework/Algorithms/src/SmoothData.cpp +++ b/Framework/Algorithms/src/SmoothData.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/SmoothData.h" #include "MantidAPI/WorkspaceFactory.h" @@ -73,11 +73,12 @@ void SmoothData::exec() { int npts = nptsGroup[0]; if (groupWS) { const int group = validateSpectrumInGroup(static_cast<size_t>(i)); - if (group < 0) + if (group == -1) { npts = 3; - else - // group is never 0. We can safely subtract. + } else { + assert(group != 0); npts = nptsGroup[group - 1]; + } } if (npts >= vecSize) { g_log.error("The number of averaging points requested is larger than the " @@ -103,7 +104,7 @@ void SmoothData::exec() { // Set the output workspace to its property setProperty("OutputWorkspace", outputWorkspace); -} +} // namespace Algorithms //============================================================================= /** Verify that all the contributing detectors to a spectrum belongs to the same * group diff --git a/Framework/Algorithms/src/SmoothNeighbours.cpp b/Framework/Algorithms/src/SmoothNeighbours.cpp index ab85429e7602564db75617fb2c52a4d0750e3020..8689b4a52377abd36d7604d4d483c4c0fbd34473 100644 --- a/Framework/Algorithms/src/SmoothNeighbours.cpp +++ b/Framework/Algorithms/src/SmoothNeighbours.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/SmoothNeighbours.h" #include "MantidAPI/InstrumentValidator.h" @@ -685,7 +685,7 @@ void SmoothNeighbours::setupNewInstrument(MatrixWorkspace &outws) const { //-------------------------------------------------------------------------------------------- /** Spread the average over all the pixels */ -void SmoothNeighbours::spreadPixels(MatrixWorkspace_sptr outws) { +void SmoothNeighbours::spreadPixels(const MatrixWorkspace_sptr &outws) { // Get some stuff from the input workspace const size_t numberOfSpectra = inWS->getNumberHistograms(); diff --git a/Framework/Algorithms/src/SofQCommon.cpp b/Framework/Algorithms/src/SofQCommon.cpp index 9ded1f2e78699bb81c2090ee14ed155381d1188e..5ef94b6fa30e3dba765a31b488f258e47bb1de3c 100644 --- a/Framework/Algorithms/src/SofQCommon.cpp +++ b/Framework/Algorithms/src/SofQCommon.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/SofQCommon.h" #include "MantidAPI/Algorithm.h" diff --git a/Framework/Algorithms/src/SofQW.cpp b/Framework/Algorithms/src/SofQW.cpp index 905d7b816605134c078249f596b8ad4b361f9205..170d53db687c3d3d497308948c856a30262eed50 100644 --- a/Framework/Algorithms/src/SofQW.cpp +++ b/Framework/Algorithms/src/SofQW.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include <stdexcept> diff --git a/Framework/Algorithms/src/SofQWCentre.cpp b/Framework/Algorithms/src/SofQWCentre.cpp index 25ef87b08a8adb953bc9f4463f0849e1c00b297a..eaa4aa200308028a7b61b6452a682ffd4c7629d6 100644 --- a/Framework/Algorithms/src/SofQWCentre.cpp +++ b/Framework/Algorithms/src/SofQWCentre.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/SofQWCentre.h" #include "MantidAPI/SpectrumDetectorMapping.h" diff --git a/Framework/Algorithms/src/SofQWNormalisedPolygon.cpp b/Framework/Algorithms/src/SofQWNormalisedPolygon.cpp index e18a314c97e1b38a95457d50097c9c14cff13dde..4432ad7dfff84b4710239d025125969fab03fcb9 100644 --- a/Framework/Algorithms/src/SofQWNormalisedPolygon.cpp +++ b/Framework/Algorithms/src/SofQWNormalisedPolygon.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/SofQWNormalisedPolygon.h" #include "MantidAPI/AnalysisDataService.h" diff --git a/Framework/Algorithms/src/SofQWPolygon.cpp b/Framework/Algorithms/src/SofQWPolygon.cpp index 1f152ff2c7328abf049daa17a59392666a227efe..2cbaed6f6286c7a34c6a1f7e5b2bf875b557fe3e 100644 --- a/Framework/Algorithms/src/SofQWPolygon.cpp +++ b/Framework/Algorithms/src/SofQWPolygon.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/SofQWPolygon.h" #include "MantidAPI/SpectraAxis.h" @@ -146,7 +146,8 @@ void SofQWPolygon::exec() { * Init variables caches * @param workspace :: Workspace pointer */ -void SofQWPolygon::initCachedValues(API::MatrixWorkspace_const_sptr workspace) { +void SofQWPolygon::initCachedValues( + const API::MatrixWorkspace_const_sptr &workspace) { m_EmodeProperties.initCachedValues(*workspace, this); // Index theta cache initThetaCache(*workspace); diff --git a/Framework/Algorithms/src/SolidAngle.cpp b/Framework/Algorithms/src/SolidAngle.cpp index 57915e6b6faea1d0414e29f6f5f51505999dadb5..e69d1c39cf9706f0a408388b1409ba4105421064 100644 --- a/Framework/Algorithms/src/SolidAngle.cpp +++ b/Framework/Algorithms/src/SolidAngle.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/SolidAngle.h" #include "MantidAPI/InstrumentValidator.h" diff --git a/Framework/Algorithms/src/SortEvents.cpp b/Framework/Algorithms/src/SortEvents.cpp index 9a02757213a19eab756eb3f5776efd1926d2e353..f4209b86ce53d29662b7b961697ea9e430fce679 100644 --- a/Framework/Algorithms/src/SortEvents.cpp +++ b/Framework/Algorithms/src/SortEvents.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/Algorithms/src/SortXAxis.cpp b/Framework/Algorithms/src/SortXAxis.cpp index b51c0d94ea17247726c7560b5a248f2804bbee18..e20d1ac5deb590e1c07943ecb1538b529fcd0ec4 100644 --- a/Framework/Algorithms/src/SortXAxis.cpp +++ b/Framework/Algorithms/src/SortXAxis.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/SortXAxis.h" #include "MantidAPI/Algorithm.h" @@ -118,7 +118,7 @@ void sortByXValue(std::vector<std::size_t> &workspaceIndicies, } void SortXAxis::sortIndicesByX( - std::vector<std::size_t> &workspaceIndicies, std::string order, + std::vector<std::size_t> &workspaceIndicies, const std::string &order, const Mantid::API::MatrixWorkspace &inputWorkspace, unsigned int specNum) { if (order == "Ascending") { sortByXValue(workspaceIndicies, inputWorkspace, specNum, diff --git a/Framework/Algorithms/src/SpatialGrouping.cpp b/Framework/Algorithms/src/SpatialGrouping.cpp index 30f68db37d7ccd394bd48a831f9fa5e4d37af0d1..24d1ff1f2f75cd840cf47963e794f9a9d5db5a8f 100644 --- a/Framework/Algorithms/src/SpatialGrouping.cpp +++ b/Framework/Algorithms/src/SpatialGrouping.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/SpatialGrouping.h" diff --git a/Framework/Algorithms/src/SpectrumAlgorithm.cpp b/Framework/Algorithms/src/SpectrumAlgorithm.cpp index fba1949a27a63dbb39a98fc21e9815a34d8550a6..5a85d7b6ea20ef5d89a95c9958cf23bf61db037e 100644 --- a/Framework/Algorithms/src/SpectrumAlgorithm.cpp +++ b/Framework/Algorithms/src/SpectrumAlgorithm.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/SpectrumAlgorithm.h" diff --git a/Framework/Algorithms/src/SpecularReflectionAlgorithm.cpp b/Framework/Algorithms/src/SpecularReflectionAlgorithm.cpp index 65e1fa66e5df99007c1685c2d5d925c9d640d9dd..843e097cba6f8554f1af3e0ab1aa5881105a68e3 100644 --- a/Framework/Algorithms/src/SpecularReflectionAlgorithm.cpp +++ b/Framework/Algorithms/src/SpecularReflectionAlgorithm.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/SpecularReflectionAlgorithm.h" @@ -123,7 +123,7 @@ void SpecularReflectionAlgorithm::initCommonProperties() { */ Mantid::Geometry::IComponent_const_sptr SpecularReflectionAlgorithm::getSurfaceSampleComponent( - Mantid::Geometry::Instrument_const_sptr inst) const { + const Mantid::Geometry::Instrument_const_sptr &inst) const { std::string sampleComponent = "some-surface-holder"; if (!isPropertyDefault("SampleComponentName")) { sampleComponent = this->getPropertyValue("SampleComponentName"); @@ -148,7 +148,7 @@ SpecularReflectionAlgorithm::getSurfaceSampleComponent( */ boost::shared_ptr<const Mantid::Geometry::IComponent> SpecularReflectionAlgorithm::getDetectorComponent( - MatrixWorkspace_sptr workspace, const bool isPointDetector) const { + const MatrixWorkspace_sptr &workspace, const bool isPointDetector) const { boost::shared_ptr<const IComponent> searchResult; if (!isPropertyDefault("SpectrumNumbersOfDetectors")) { const std::vector<int> spectrumNumbers = diff --git a/Framework/Algorithms/src/SpecularReflectionCalculateTheta.cpp b/Framework/Algorithms/src/SpecularReflectionCalculateTheta.cpp index eea830cc281e4818ba35ca77a746adb62a0f03cf..cdcdc660bb619ad4ad2dee2c0b3a480e220ab59e 100644 --- a/Framework/Algorithms/src/SpecularReflectionCalculateTheta.cpp +++ b/Framework/Algorithms/src/SpecularReflectionCalculateTheta.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/SpecularReflectionCalculateTheta.h" #include "MantidAPI/MatrixWorkspace.h" diff --git a/Framework/Algorithms/src/SpecularReflectionCalculateTheta2.cpp b/Framework/Algorithms/src/SpecularReflectionCalculateTheta2.cpp index 6cc842613443ad7335f0477441eed93045afc6ea..e52aeec2d6ca21822fc1c834f2a209b46977d4d5 100644 --- a/Framework/Algorithms/src/SpecularReflectionCalculateTheta2.cpp +++ b/Framework/Algorithms/src/SpecularReflectionCalculateTheta2.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/SpecularReflectionCalculateTheta2.h" #include "MantidAPI/MatrixWorkspace.h" diff --git a/Framework/Algorithms/src/SpecularReflectionPositionCorrect.cpp b/Framework/Algorithms/src/SpecularReflectionPositionCorrect.cpp index 8534b7a610f21db5897d3f1f4ed65de36ee1c68b..5d0e86593514e0284e78222695d28b1a47dd6878 100644 --- a/Framework/Algorithms/src/SpecularReflectionPositionCorrect.cpp +++ b/Framework/Algorithms/src/SpecularReflectionPositionCorrect.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/SpecularReflectionPositionCorrect.h" @@ -138,8 +138,8 @@ void SpecularReflectionPositionCorrect::exec() { * @param detectorPosition: Actual detector or detector group position. */ void SpecularReflectionPositionCorrect::moveDetectors( - API::MatrixWorkspace_sptr toCorrect, IComponent_const_sptr detector, - IComponent_const_sptr sample, const double &upOffset, + const API::MatrixWorkspace_sptr &toCorrect, IComponent_const_sptr detector, + const IComponent_const_sptr &sample, const double &upOffset, const double &acrossOffset, const V3D &detectorPosition) { auto instrument = toCorrect->getInstrument(); const V3D samplePosition = sample->getPos(); @@ -203,8 +203,9 @@ void SpecularReflectionPositionCorrect::moveDetectors( * @param detector : Pointer to a given detector */ void SpecularReflectionPositionCorrect::correctPosition( - API::MatrixWorkspace_sptr toCorrect, const double &twoThetaInDeg, - IComponent_const_sptr sample, IComponent_const_sptr detector) { + const API::MatrixWorkspace_sptr &toCorrect, const double &twoThetaInDeg, + const IComponent_const_sptr &sample, + const IComponent_const_sptr &detector) { auto instrument = toCorrect->getInstrument(); diff --git a/Framework/Algorithms/src/SpecularReflectionPositionCorrect2.cpp b/Framework/Algorithms/src/SpecularReflectionPositionCorrect2.cpp index 32ce50eafb1f9667cb74f2ef99c3196211128ea8..c3de3099fd865a1df5bb15211f80b92759981e67 100644 --- a/Framework/Algorithms/src/SpecularReflectionPositionCorrect2.cpp +++ b/Framework/Algorithms/src/SpecularReflectionPositionCorrect2.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/SpecularReflectionPositionCorrect2.h" #include "MantidAPI/MatrixWorkspace.h" diff --git a/Framework/Algorithms/src/SphericalAbsorption.cpp b/Framework/Algorithms/src/SphericalAbsorption.cpp index 87d4a47488432e7e72bb38a7e347794694032fad..361b5b4ea73b4fb9b55a3a7c57ce5689481582f8 100644 --- a/Framework/Algorithms/src/SphericalAbsorption.cpp +++ b/Framework/Algorithms/src/SphericalAbsorption.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/Algorithms/src/Stitch1D.cpp b/Framework/Algorithms/src/Stitch1D.cpp index 476b215d5d1e29fde0e847190c7d270f464d50e9..fc882cff79683705453c2c5e26a4fd5401192a86 100644 --- a/Framework/Algorithms/src/Stitch1D.cpp +++ b/Framework/Algorithms/src/Stitch1D.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/Stitch1D.h" #include "MantidAPI/AnalysisDataService.h" @@ -644,7 +644,7 @@ void Stitch1D::exec() { /** Put special values back. * @param ws : MatrixWorkspace to resinsert special values into. */ -void Stitch1D::reinsertSpecialValues(MatrixWorkspace_sptr ws) { +void Stitch1D::reinsertSpecialValues(const MatrixWorkspace_sptr &ws) { auto histogramCount = static_cast<int>(ws->getNumberHistograms()); PARALLEL_FOR_IF(Kernel::threadSafe(*ws)) for (int i = 0; i < histogramCount; ++i) { diff --git a/Framework/Algorithms/src/Stitch1DMany.cpp b/Framework/Algorithms/src/Stitch1DMany.cpp index 4ef55989420f5099cb8cc45db618b302e2f1112a..bc582d28486ec715abf1847d4caf8f77056159a5 100644 --- a/Framework/Algorithms/src/Stitch1DMany.cpp +++ b/Framework/Algorithms/src/Stitch1DMany.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/Stitch1DMany.h" #include "MantidAPI/ADSValidator.h" @@ -269,8 +269,10 @@ void Stitch1DMany::exec() { for (size_t i = 0; i < m_inputWSMatrix.front().size(); ++i) { std::vector<MatrixWorkspace_sptr> inMatrix; inMatrix.reserve(m_inputWSMatrix.size()); - for (const auto &ws : m_inputWSMatrix) - inMatrix.emplace_back(ws[i]); + + std::transform(m_inputWSMatrix.begin(), m_inputWSMatrix.end(), + std::back_inserter(inMatrix), + [i](const auto &ws) { return ws[i]; }); outName = groupName; Workspace_sptr outStitchedWS; diff --git a/Framework/Algorithms/src/StripPeaks.cpp b/Framework/Algorithms/src/StripPeaks.cpp index d346b7a2901780bb3016f066f458c07a6fc34278..cc52ce60bd926761063fb5cca0b8051a2bc34188 100644 --- a/Framework/Algorithms/src/StripPeaks.cpp +++ b/Framework/Algorithms/src/StripPeaks.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/StripPeaks.h" @@ -107,7 +107,8 @@ void StripPeaks::exec() { * @param WS :: The workspace to search * @return list of found peaks */ -API::ITableWorkspace_sptr StripPeaks::findPeaks(API::MatrixWorkspace_sptr WS) { +API::ITableWorkspace_sptr +StripPeaks::findPeaks(const API::MatrixWorkspace_sptr &WS) { g_log.debug("Calling FindPeaks as a Child Algorithm"); // Read from properties @@ -172,8 +173,8 @@ API::ITableWorkspace_sptr StripPeaks::findPeaks(API::MatrixWorkspace_sptr WS) { * @return A workspace containing the peak-subtracted data */ API::MatrixWorkspace_sptr -StripPeaks::removePeaks(API::MatrixWorkspace_const_sptr input, - API::ITableWorkspace_sptr peakslist) { +StripPeaks::removePeaks(const API::MatrixWorkspace_const_sptr &input, + const API::ITableWorkspace_sptr &peakslist) { g_log.debug("Subtracting peaks"); // Create an output workspace - same size as input one MatrixWorkspace_sptr outputWS = WorkspaceFactory::Instance().create(input); diff --git a/Framework/Algorithms/src/StripVanadiumPeaks.cpp b/Framework/Algorithms/src/StripVanadiumPeaks.cpp index 442738e4836e039ee5092f80ae084133499b7198..993d42e33e1c4fd9d04a25ec8de5a82551c078be 100644 --- a/Framework/Algorithms/src/StripVanadiumPeaks.cpp +++ b/Framework/Algorithms/src/StripVanadiumPeaks.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/StripVanadiumPeaks.h" #include "MantidAPI/Axis.h" diff --git a/Framework/Algorithms/src/StripVanadiumPeaks2.cpp b/Framework/Algorithms/src/StripVanadiumPeaks2.cpp index 572606661bb1c9db0c712f2652730aeb2f4d33cd..76c38f309da907bc6dfe1b40247e851c79b4c73e 100644 --- a/Framework/Algorithms/src/StripVanadiumPeaks2.cpp +++ b/Framework/Algorithms/src/StripVanadiumPeaks2.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/StripVanadiumPeaks2.h" diff --git a/Framework/Algorithms/src/SumEventsByLogValue.cpp b/Framework/Algorithms/src/SumEventsByLogValue.cpp index 4fcbb88f09909cf5d7fec2b85631c0999aaaf833..a6f0eb8f8adcddf27422379d75870015519becc7 100644 --- a/Framework/Algorithms/src/SumEventsByLogValue.cpp +++ b/Framework/Algorithms/src/SumEventsByLogValue.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/SumEventsByLogValue.h" @@ -302,9 +302,9 @@ void SumEventsByLogValue::filterEventList( * @param minVal The minimum value of the log * @param maxVal The maximum value of the log */ -void SumEventsByLogValue::addMonitorCounts(ITableWorkspace_sptr outputWorkspace, - const TimeSeriesProperty<int> *log, - const int minVal, const int maxVal) { +void SumEventsByLogValue::addMonitorCounts( + const ITableWorkspace_sptr &outputWorkspace, + const TimeSeriesProperty<int> *log, const int minVal, const int maxVal) { DataObjects::EventWorkspace_const_sptr monitorWorkspace = getProperty("MonitorWorkspace"); // If no monitor workspace was given, there's nothing to do diff --git a/Framework/Algorithms/src/SumNeighbours.cpp b/Framework/Algorithms/src/SumNeighbours.cpp index f466daac698bde8cae6f9ebd914978c048a1d3b1..798d451a19108870a94c5092abed30d65622e081 100644 --- a/Framework/Algorithms/src/SumNeighbours.cpp +++ b/Framework/Algorithms/src/SumNeighbours.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/Algorithms/src/SumOverlappingTubes.cpp b/Framework/Algorithms/src/SumOverlappingTubes.cpp index 8c423dda3144dfad9cf0dbf252c744f14612b13a..30834a981a4fd9a370c492af02cdc9e7a2af7c84 100644 --- a/Framework/Algorithms/src/SumOverlappingTubes.cpp +++ b/Framework/Algorithms/src/SumOverlappingTubes.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/SumOverlappingTubes.h" diff --git a/Framework/Algorithms/src/SumRowColumn.cpp b/Framework/Algorithms/src/SumRowColumn.cpp index ea5d392ad78dd508850aa95daddff389e55cff6a..888b37b1d1c782f21958c5cef9100c4263c6dbba 100644 --- a/Framework/Algorithms/src/SumRowColumn.cpp +++ b/Framework/Algorithms/src/SumRowColumn.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/Algorithms/src/SumSpectra.cpp b/Framework/Algorithms/src/SumSpectra.cpp index 709247612b0812a9834b8ba8a3ef1cc755b808dc..4b0e1b3edfbebb8fd0284e18bb213d8f57d7c665 100644 --- a/Framework/Algorithms/src/SumSpectra.cpp +++ b/Framework/Algorithms/src/SumSpectra.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/SumSpectra.h" #include "MantidAPI/CommonBinsValidator.h" @@ -324,7 +324,7 @@ void SumSpectra::determineIndices(const size_t numberOfSpectra) { * @return The minimum spectrum No for all the spectra being summed. */ specnum_t -SumSpectra::getOutputSpecNo(MatrixWorkspace_const_sptr localworkspace) { +SumSpectra::getOutputSpecNo(const MatrixWorkspace_const_sptr &localworkspace) { // initial value - any included spectrum will do specnum_t specId = localworkspace->getSpectrum(*(m_indices.begin())).getSpectrumNo(); @@ -435,7 +435,7 @@ bool useSpectrum(const SpectrumInfo &spectrumInfo, const size_t wsIndex, * @param numZeros The number of zero bins in histogram workspace or empty * spectra for event workspace. */ -void SumSpectra::doSimpleSum(MatrixWorkspace_sptr outputWorkspace, +void SumSpectra::doSimpleSum(const MatrixWorkspace_sptr &outputWorkspace, Progress &progress, size_t &numSpectra, size_t &numMasked, size_t &numZeros) { // Clean workspace of any NANs or Inf values @@ -510,7 +510,7 @@ void SumSpectra::doSimpleSum(MatrixWorkspace_sptr outputWorkspace, * @param numZeros The number of zero bins in histogram workspace or empty * spectra for event workspace. */ -void SumSpectra::doFractionalSum(MatrixWorkspace_sptr outputWorkspace, +void SumSpectra::doFractionalSum(const MatrixWorkspace_sptr &outputWorkspace, Progress &progress, size_t &numSpectra, size_t &numMasked, size_t &numZeros) { // First, we need to clean the input workspace for nan's and inf's in order @@ -608,7 +608,7 @@ void SumSpectra::doFractionalSum(MatrixWorkspace_sptr outputWorkspace, * @param numZeros The number of zero bins in histogram workspace or empty * spectra for event workspace. */ -void SumSpectra::execEvent(MatrixWorkspace_sptr outputWorkspace, +void SumSpectra::execEvent(const MatrixWorkspace_sptr &outputWorkspace, Progress &progress, size_t &numSpectra, size_t &numMasked, size_t &numZeros) { MatrixWorkspace_const_sptr localworkspace = getProperty("InputWorkspace"); diff --git a/Framework/Algorithms/src/TOFSANSResolution.cpp b/Framework/Algorithms/src/TOFSANSResolution.cpp index 31b9c1039f65d7b76cdacd213af2fc40a2d980ce..280bf46385c16b56deed5c9600870bf7573c31c8 100644 --- a/Framework/Algorithms/src/TOFSANSResolution.cpp +++ b/Framework/Algorithms/src/TOFSANSResolution.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/TOFSANSResolution.h" #include "MantidAPI/SpectrumInfo.h" diff --git a/Framework/Algorithms/src/TOFSANSResolutionByPixel.cpp b/Framework/Algorithms/src/TOFSANSResolutionByPixel.cpp index 1d149c452545008f7f4ca34c60ed43776351c9ae..a5862b2866bf8cbe9625b432190474a028c3d686 100644 --- a/Framework/Algorithms/src/TOFSANSResolutionByPixel.cpp +++ b/Framework/Algorithms/src/TOFSANSResolutionByPixel.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/TOFSANSResolutionByPixel.h" #include "MantidAPI/SpectrumInfo.h" @@ -209,7 +209,7 @@ void TOFSANSResolutionByPixel::exec() { * @returns a copy of the input workspace */ MatrixWorkspace_sptr TOFSANSResolutionByPixel::setupOutputWorkspace( - MatrixWorkspace_sptr inputWorkspace) { + const MatrixWorkspace_sptr &inputWorkspace) { IAlgorithm_sptr duplicate = createChildAlgorithm("CloneWorkspace"); duplicate->initialize(); duplicate->setProperty<Workspace_sptr>("InputWorkspace", inputWorkspace); @@ -224,7 +224,7 @@ MatrixWorkspace_sptr TOFSANSResolutionByPixel::setupOutputWorkspace( * @returns the moderator workspace wiht the correct wavelength binning */ MatrixWorkspace_sptr TOFSANSResolutionByPixel::getModeratorWorkspace( - Mantid::API::MatrixWorkspace_sptr inputWorkspace) { + const Mantid::API::MatrixWorkspace_sptr &inputWorkspace) { MatrixWorkspace_sptr sigmaModerator = getProperty("SigmaModerator"); IAlgorithm_sptr rebinned = createChildAlgorithm("RebinToWorkspace"); @@ -242,7 +242,7 @@ MatrixWorkspace_sptr TOFSANSResolutionByPixel::getModeratorWorkspace( * @param inWS: the input workspace */ void TOFSANSResolutionByPixel::checkInput( - Mantid::API::MatrixWorkspace_sptr inWS) { + const Mantid::API::MatrixWorkspace_sptr &inWS) { // Make sure that input workspace has an instrument as we rely heavily on // thisa auto inst = inWS->getInstrument(); diff --git a/Framework/Algorithms/src/TOFSANSResolutionByPixelCalculator.cpp b/Framework/Algorithms/src/TOFSANSResolutionByPixelCalculator.cpp index e879c1bf81325a6dd8f7b2878da39f0d899438aa..8a9599192266c96699741503177439afd6162664 100644 --- a/Framework/Algorithms/src/TOFSANSResolutionByPixelCalculator.cpp +++ b/Framework/Algorithms/src/TOFSANSResolutionByPixelCalculator.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/TOFSANSResolutionByPixelCalculator.h" #include <cmath> diff --git a/Framework/Algorithms/src/TimeAtSampleStrategyDirect.cpp b/Framework/Algorithms/src/TimeAtSampleStrategyDirect.cpp index 0556921cb111bccd4c64e26943969c4a92080d89..e40755b92c351ce3e5db4d154d7e11255486f069 100644 --- a/Framework/Algorithms/src/TimeAtSampleStrategyDirect.cpp +++ b/Framework/Algorithms/src/TimeAtSampleStrategyDirect.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/TimeAtSampleStrategyDirect.h" #include "MantidAPI/MatrixWorkspace.h" @@ -27,7 +27,7 @@ namespace Algorithms { /** Constructor */ TimeAtSampleStrategyDirect::TimeAtSampleStrategyDirect( - MatrixWorkspace_const_sptr ws, double ei) + const MatrixWorkspace_const_sptr &ws, double ei) : m_constShift(0) { // A constant among all spectra diff --git a/Framework/Algorithms/src/TimeAtSampleStrategyElastic.cpp b/Framework/Algorithms/src/TimeAtSampleStrategyElastic.cpp index 0d7f3732da2714fad7fdfa8d2384bc47f39736ef..d8ba32fbadaee01dcd130590ad7f8a69c6ed94ef 100644 --- a/Framework/Algorithms/src/TimeAtSampleStrategyElastic.cpp +++ b/Framework/Algorithms/src/TimeAtSampleStrategyElastic.cpp @@ -1,12 +1,14 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + -#include "MantidAlgorithms/TimeAtSampleStrategyElastic.h" +#include <utility> + #include "MantidAPI/MatrixWorkspace.h" #include "MantidAPI/SpectrumInfo.h" +#include "MantidAlgorithms/TimeAtSampleStrategyElastic.h" #include "MantidGeometry/IComponent.h" #include "MantidGeometry/Instrument.h" #include "MantidGeometry/Instrument/ReferenceFrame.h" @@ -22,7 +24,7 @@ namespace Algorithms { */ TimeAtSampleStrategyElastic::TimeAtSampleStrategyElastic( Mantid::API::MatrixWorkspace_const_sptr ws) - : m_ws(ws), m_spectrumInfo(m_ws->spectrumInfo()), + : m_ws(std::move(ws)), m_spectrumInfo(m_ws->spectrumInfo()), m_beamDir( m_ws->getInstrument()->getReferenceFrame()->vecPointingAlongBeam()) {} diff --git a/Framework/Algorithms/src/TimeAtSampleStrategyIndirect.cpp b/Framework/Algorithms/src/TimeAtSampleStrategyIndirect.cpp index ee30d23235f1ac4557f91b60c7611ac3f7204628..1084de35630bd11f226445f06e5360f189680cab 100644 --- a/Framework/Algorithms/src/TimeAtSampleStrategyIndirect.cpp +++ b/Framework/Algorithms/src/TimeAtSampleStrategyIndirect.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/TimeAtSampleStrategyIndirect.h" #include "MantidAPI/MatrixWorkspace.h" @@ -18,6 +18,7 @@ #include <boost/shared_ptr.hpp> #include <cmath> #include <sstream> +#include <utility> using namespace Mantid::Kernel; using namespace Mantid::Geometry; @@ -30,7 +31,7 @@ namespace Algorithms { */ TimeAtSampleStrategyIndirect::TimeAtSampleStrategyIndirect( MatrixWorkspace_const_sptr ws) - : m_ws(ws), m_spectrumInfo(m_ws->spectrumInfo()) {} + : m_ws(std::move(ws)), m_spectrumInfo(m_ws->spectrumInfo()) {} Correction TimeAtSampleStrategyIndirect::calculate(const size_t &workspace_index) const { diff --git a/Framework/Algorithms/src/Transpose.cpp b/Framework/Algorithms/src/Transpose.cpp index cefc1dfc927e3706e7591eb7df08865609898bc1..ac7f1807bb9f779a8513cf16944f97e1107261fd 100644 --- a/Framework/Algorithms/src/Transpose.cpp +++ b/Framework/Algorithms/src/Transpose.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes @@ -98,7 +98,7 @@ void Transpose::exec() { * @return A pointer to the output workspace. */ API::MatrixWorkspace_sptr Transpose::createOutputWorkspace( - API::MatrixWorkspace_const_sptr inputWorkspace) { + const API::MatrixWorkspace_const_sptr &inputWorkspace) { Mantid::API::Axis *yAxis = getVerticalAxis(inputWorkspace); const size_t oldNhist = inputWorkspace->getNumberHistograms(); const auto &inX = inputWorkspace->x(0); @@ -138,8 +138,8 @@ API::MatrixWorkspace_sptr Transpose::createOutputWorkspace( * @param workspace :: A pointer to a workspace * @return An axis pointer for the vertical axis of the input workspace */ -API::Axis * -Transpose::getVerticalAxis(API::MatrixWorkspace_const_sptr workspace) const { +API::Axis *Transpose::getVerticalAxis( + const API::MatrixWorkspace_const_sptr &workspace) const { API::Axis *yAxis; try { yAxis = workspace->getAxis(1); diff --git a/Framework/Algorithms/src/UnGroupWorkspace.cpp b/Framework/Algorithms/src/UnGroupWorkspace.cpp index cbb247e0d1e9bbe9aa0706da2737c3e7e41aa5cd..bbd230dee1a384f1bee62880c1027442afdead56 100644 --- a/Framework/Algorithms/src/UnGroupWorkspace.cpp +++ b/Framework/Algorithms/src/UnGroupWorkspace.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/UnGroupWorkspace.h" #include "MantidAPI/AnalysisDataService.h" diff --git a/Framework/Algorithms/src/UnaryOperation.cpp b/Framework/Algorithms/src/UnaryOperation.cpp index e4ae32c4faeaa8f56d246efc152e5e16472bf597..689281f625142fff681156e19a3a46dec8a08823 100644 --- a/Framework/Algorithms/src/UnaryOperation.cpp +++ b/Framework/Algorithms/src/UnaryOperation.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/UnaryOperation.h" #include "MantidAPI/WorkspaceFactory.h" diff --git a/Framework/Algorithms/src/UnwrapMonitor.cpp b/Framework/Algorithms/src/UnwrapMonitor.cpp index 77019c9fa977910b23011048c1695cf1b5ae1b7e..988890a3827de2a1766bac962847d28df0d5a41b 100644 --- a/Framework/Algorithms/src/UnwrapMonitor.cpp +++ b/Framework/Algorithms/src/UnwrapMonitor.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/UnwrapMonitor.h" #include "MantidAPI/Axis.h" diff --git a/Framework/Algorithms/src/UnwrapMonitorsInTOF.cpp b/Framework/Algorithms/src/UnwrapMonitorsInTOF.cpp index 29ed71f5ca8e742e6aa280a39508e619b5a9f1de..0d2737d4afccea1417b0f7f82c4f5b3717f6d647 100644 --- a/Framework/Algorithms/src/UnwrapMonitorsInTOF.cpp +++ b/Framework/Algorithms/src/UnwrapMonitorsInTOF.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/UnwrapMonitorsInTOF.h" #include "MantidAPI/ISpectrum.h" diff --git a/Framework/Algorithms/src/UnwrapSNS.cpp b/Framework/Algorithms/src/UnwrapSNS.cpp index ac39530d2ee549dd393e37f36b46a8f154d82b12..82d280aba01534cc4402c79fdc5cebaacaee90fc 100644 --- a/Framework/Algorithms/src/UnwrapSNS.cpp +++ b/Framework/Algorithms/src/UnwrapSNS.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/UnwrapSNS.h" #include "MantidAPI/HistogramValidator.h" diff --git a/Framework/Algorithms/src/UpdateScriptRepository.cpp b/Framework/Algorithms/src/UpdateScriptRepository.cpp index a3f593f879ae922edcc479ab9aac1f31c4a759f4..15e9cd24e7d9b91f5d8eff00897535ce70f123a6 100644 --- a/Framework/Algorithms/src/UpdateScriptRepository.cpp +++ b/Framework/Algorithms/src/UpdateScriptRepository.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/UpdateScriptRepository.h" #include "MantidAPI/ScriptRepository.h" diff --git a/Framework/Algorithms/src/VesuvioL1ThetaResolution.cpp b/Framework/Algorithms/src/VesuvioL1ThetaResolution.cpp index e86e30e5fd7bf97c24694f820f6fe1540d6b5014..23319636a4ec20658fd0d474c4f4845e6459d117 100644 --- a/Framework/Algorithms/src/VesuvioL1ThetaResolution.cpp +++ b/Framework/Algorithms/src/VesuvioL1ThetaResolution.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/VesuvioL1ThetaResolution.h" diff --git a/Framework/Algorithms/src/WeightedMean.cpp b/Framework/Algorithms/src/WeightedMean.cpp index 8e9cbda86f37ddb4320fecfbc3ede8c834592cc1..4310e121b598ef5e2756616d74fae59655854768 100644 --- a/Framework/Algorithms/src/WeightedMean.cpp +++ b/Framework/Algorithms/src/WeightedMean.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/WeightedMean.h" diff --git a/Framework/Algorithms/src/WeightedMeanOfWorkspace.cpp b/Framework/Algorithms/src/WeightedMeanOfWorkspace.cpp index 6bd852bce06334edfac9fc47f805fe448299956d..7aa4d62747f1f5300049f61802c7ede1be3c2f51 100644 --- a/Framework/Algorithms/src/WeightedMeanOfWorkspace.cpp +++ b/Framework/Algorithms/src/WeightedMeanOfWorkspace.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/WeightedMeanOfWorkspace.h" #include "MantidAPI/SpectrumInfo.h" diff --git a/Framework/Algorithms/src/WeightingStrategy.cpp b/Framework/Algorithms/src/WeightingStrategy.cpp index c397670db58b25f08f8b30a76131b74ff15f5774..be04b9cc69bd20b574b341e4905f266ae7f6e75b 100644 --- a/Framework/Algorithms/src/WeightingStrategy.cpp +++ b/Framework/Algorithms/src/WeightingStrategy.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/WeightingStrategy.h" #include "MantidKernel/System.h" diff --git a/Framework/Algorithms/src/WienerSmooth.cpp b/Framework/Algorithms/src/WienerSmooth.cpp index 0e2e163c8f5b3087243f8dbb030636b02d241ae8..a2c56911f3b3cbb784669301468ac6abaf7b3f93 100644 --- a/Framework/Algorithms/src/WienerSmooth.cpp +++ b/Framework/Algorithms/src/WienerSmooth.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/WienerSmooth.h" @@ -420,7 +420,8 @@ WienerSmooth::getStartEnd(const Mantid::HistogramData::HistogramX &X, * @return :: Workspace with the copied spectrum. */ API::MatrixWorkspace_sptr -WienerSmooth::copyInput(API::MatrixWorkspace_sptr inputWS, size_t wsIndex) { +WienerSmooth::copyInput(const API::MatrixWorkspace_sptr &inputWS, + size_t wsIndex) { auto alg = createChildAlgorithm("ExtractSingleSpectrum"); alg->initialize(); alg->setProperty("InputWorkspace", inputWS); diff --git a/Framework/Algorithms/src/WorkflowAlgorithmRunner.cpp b/Framework/Algorithms/src/WorkflowAlgorithmRunner.cpp index 4c5c5c3255839807aa6c2cb8db5cbec0246a4524..4262dd66ef98633aad357f1077bcb83eaa302e70 100644 --- a/Framework/Algorithms/src/WorkflowAlgorithmRunner.cpp +++ b/Framework/Algorithms/src/WorkflowAlgorithmRunner.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/WorkflowAlgorithmRunner.h" @@ -59,7 +59,8 @@ std::string tidyWorkspaceName(const std::string &s) { * @throw std::runtime_error in case of errorneous entries in `table` */ template <typename MAP> -void cleanPropertyTable(ITableWorkspace_sptr table, const MAP &ioMapping) { +void cleanPropertyTable(const ITableWorkspace_sptr &table, + const MAP &ioMapping) { // Some output columns may be processed several times, but this should // not be a serious performance hit. for (const auto &ioPair : ioMapping) { diff --git a/Framework/Algorithms/src/WorkspaceJoiners.cpp b/Framework/Algorithms/src/WorkspaceJoiners.cpp index 704718b48571d1f2976ace369ebe4dece2291fbf..20d5ecb410353cd46e8763b113cd924df77c22a2 100644 --- a/Framework/Algorithms/src/WorkspaceJoiners.cpp +++ b/Framework/Algorithms/src/WorkspaceJoiners.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAlgorithms/WorkspaceJoiners.h" diff --git a/Framework/Algorithms/src/XDataConverter.cpp b/Framework/Algorithms/src/XDataConverter.cpp index d3ccd8b7075a39fb3d6818799dca7ed05c52c2d5..b656ca879a0962a0227f56ddbd8b16931e384341 100644 --- a/Framework/Algorithms/src/XDataConverter.cpp +++ b/Framework/Algorithms/src/XDataConverter.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //------------------------------------------------------------------------------ // Includes @@ -90,7 +90,7 @@ void XDataConverter::exec() { } std::size_t -XDataConverter::getNewYSize(const API::MatrixWorkspace_sptr inputWS) { +XDataConverter::getNewYSize(const API::MatrixWorkspace_sptr &inputWS) { // this is the old behavior of MatrixWorkspace::blocksize() return inputWS->y(0).size(); } @@ -101,8 +101,8 @@ XDataConverter::getNewYSize(const API::MatrixWorkspace_sptr inputWS) { * @param inputWS :: The input workspace * @param index :: The index */ -void XDataConverter::setXData(API::MatrixWorkspace_sptr outputWS, - const API::MatrixWorkspace_sptr inputWS, +void XDataConverter::setXData(const API::MatrixWorkspace_sptr &outputWS, + const API::MatrixWorkspace_sptr &inputWS, const int index) { if (m_sharedX) { PARALLEL_CRITICAL(XDataConverter_para) { diff --git a/Framework/Algorithms/test/AddLogDerivativeTest.h b/Framework/Algorithms/test/AddLogDerivativeTest.h index 5953bc3c7f0fc7c35207ff946ab188dd29f206c2..013e7d753fc22b120965c82ccda36642b0cb682e 100644 --- a/Framework/Algorithms/test/AddLogDerivativeTest.h +++ b/Framework/Algorithms/test/AddLogDerivativeTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/AddNoteTest.h b/Framework/Algorithms/test/AddNoteTest.h index 1c98d539c338a316e6ffc6078970cb202faba711..57338460fd0bfd680e407c6f0869fd5290df74de 100644 --- a/Framework/Algorithms/test/AddNoteTest.h +++ b/Framework/Algorithms/test/AddNoteTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -88,9 +88,9 @@ public: } private: - void executeAlgorithm(Mantid::API::MatrixWorkspace_sptr testWS, + void executeAlgorithm(const Mantid::API::MatrixWorkspace_sptr &testWS, const std::string &logName, const std::string &logTime, - const std::string logValue, + const std::string &logValue, const UpdateType update = Update) { Mantid::Algorithms::AddNote alg; @@ -110,11 +110,11 @@ private: } template <typename T> - void checkLogWithEntryExists(Mantid::API::MatrixWorkspace_sptr testWS, + void checkLogWithEntryExists(const Mantid::API::MatrixWorkspace_sptr &testWS, const std::string &logName, const std::string &logStartTime, const int &logEndTime, - const std::string logValue, + const std::string &logValue, const size_t position) { using Mantid::Kernel::TimeSeriesProperty; using Mantid::Types::Core::DateAndTime; diff --git a/Framework/Algorithms/test/AddPeakTest.h b/Framework/Algorithms/test/AddPeakTest.h index cdd54abb699ed1e01035348f8f88f5c4d60329b3..0c8a581d35a16e7331036e4c219d13d9d59bd195 100644 --- a/Framework/Algorithms/test/AddPeakTest.h +++ b/Framework/Algorithms/test/AddPeakTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/AddSampleLogTest.h b/Framework/Algorithms/test/AddSampleLogTest.h index 9fb1f0e49c5227aedc0a6ba8b9647fb7b8ccef6d..45d9bec83ff41af98f380b695ccc88368ed91ac5 100644 --- a/Framework/Algorithms/test/AddSampleLogTest.h +++ b/Framework/Algorithms/test/AddSampleLogTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -170,11 +170,12 @@ public: } template <typename T> - void - ExecuteAlgorithm(MatrixWorkspace_sptr testWS, std::string LogName, - std::string LogType, std::string LogText, T expectedValue, - bool fails = false, std::string LogUnit = "", - std::string NumberType = "AutoDetect", bool throws = false) { + void ExecuteAlgorithm(const MatrixWorkspace_sptr &testWS, + const std::string &LogName, const std::string &LogType, + const std::string &LogText, T expectedValue, + bool fails = false, const std::string &LogUnit = "", + const std::string &NumberType = "AutoDetect", + bool throws = false) { // add the workspace to the ADS AnalysisDataService::Instance().addOrReplace("AddSampleLogTest_Temporary", testWS); diff --git a/Framework/Algorithms/test/AddTimeSeriesLogTest.h b/Framework/Algorithms/test/AddTimeSeriesLogTest.h index 2c4f72fbc965c82a1e6a8380a95fd7ed5b5bd963..7a7fb480e888134123079dab752fa71926faf422 100644 --- a/Framework/Algorithms/test/AddTimeSeriesLogTest.h +++ b/Framework/Algorithms/test/AddTimeSeriesLogTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -134,7 +134,7 @@ public: } private: - void executeAlgorithm(Mantid::API::MatrixWorkspace_sptr testWS, + void executeAlgorithm(const Mantid::API::MatrixWorkspace_sptr &testWS, const std::string &logName, const std::string &logTime, const double logValue, const LogType type = Double, const UpdateType update = Update) { @@ -157,7 +157,7 @@ private: } template <typename T> - void checkLogWithEntryExists(Mantid::API::MatrixWorkspace_sptr testWS, + void checkLogWithEntryExists(const Mantid::API::MatrixWorkspace_sptr &testWS, const std::string &logName, const std::string &logTime, const T logValue, const size_t position) { diff --git a/Framework/Algorithms/test/AlignDetectorsTest.h b/Framework/Algorithms/test/AlignDetectorsTest.h index 9290d91f9db8d3c87722689c7fcc1fda67534f72..1f45d4ee8f5c4d1e7f47d3be2533f9eecaf08369 100644 --- a/Framework/Algorithms/test/AlignDetectorsTest.h +++ b/Framework/Algorithms/test/AlignDetectorsTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/AnnularRingAbsorptionTest.h b/Framework/Algorithms/test/AnnularRingAbsorptionTest.h index 21c17f87087a6f5e8b5a77e71d24482e20213e45..a7a3568e035fbe4ebdf6bda42055ad298095f4be 100644 --- a/Framework/Algorithms/test/AnnularRingAbsorptionTest.h +++ b/Framework/Algorithms/test/AnnularRingAbsorptionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/AnyShapeAbsorptionTest.h b/Framework/Algorithms/test/AnyShapeAbsorptionTest.h index b50c353e0546def39049940d9322fc84a821e208..00416e4ad487fde80e1613c6d4b4ea7b5d32e804 100644 --- a/Framework/Algorithms/test/AnyShapeAbsorptionTest.h +++ b/Framework/Algorithms/test/AnyShapeAbsorptionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -257,7 +257,6 @@ public: constexpr double WL_DELTA = (2.9 - WL_MIN) / static_cast<double>(NUM_VALS); // create the input workspace - const std::string IN_WS{"AbsorptionCorrection_Input"}; auto inputWS = WorkspaceCreationHelper::create2DWorkspaceBinned( 1, NUM_VALS, WL_MIN, WL_DELTA); auto testInst = diff --git a/Framework/Algorithms/test/AppendSpectraTest.h b/Framework/Algorithms/test/AppendSpectraTest.h index c558abc7fd51d1c3404d51f4c4e97be5fdd11e7c..261eb100c1fb797034f42f05e8cd230c4d29ef16 100644 --- a/Framework/Algorithms/test/AppendSpectraTest.h +++ b/Framework/Algorithms/test/AppendSpectraTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -432,9 +432,9 @@ private: } /** Creates a 2D workspace with 5 histograms */ - void createWorkspaceWithAxisAndLabel(const std::string outputName, + void createWorkspaceWithAxisAndLabel(const std::string &outputName, const std::string &axisType, - const std::string axisValue) { + const std::string &axisValue) { int nspec = 5; std::vector<std::string> YVals; std::vector<double> dataX; diff --git a/Framework/Algorithms/test/ApplyCalibrationTest.h b/Framework/Algorithms/test/ApplyCalibrationTest.h index 716e2671761b4af5b7d24d5b51a2d64492213eb1..fb596ef039a72c7add3b78fe715ad46eff55ef56 100644 --- a/Framework/Algorithms/test/ApplyCalibrationTest.h +++ b/Framework/Algorithms/test/ApplyCalibrationTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -82,11 +82,9 @@ public: TS_ASSERT(appCalib.isExecuted()); const auto &spectrumInfo = ws->spectrumInfo(); - const auto &componentInfo = ws->componentInfo(); int id = spectrumInfo.detector(0).getID(); V3D newPos = spectrumInfo.position(0); - V3D scaleFactor = componentInfo.scaleFactor(0); TS_ASSERT_EQUALS(id, 1); TS_ASSERT_DELTA(newPos.X(), 1.0, 0.0001); @@ -95,7 +93,6 @@ public: id = spectrumInfo.detector(ndets - 1).getID(); newPos = spectrumInfo.position(ndets - 1); - scaleFactor = componentInfo.scaleFactor(0); TS_ASSERT_EQUALS(id, ndets); TS_ASSERT_DELTA(newPos.X(), 1.0, 0.0001); diff --git a/Framework/Algorithms/test/ApplyDetailedBalanceTest.h b/Framework/Algorithms/test/ApplyDetailedBalanceTest.h index 8a1414d79c0bdc309abb66ab6f3c50c1b6fcd719..db26df62341e07187a743edb52d13c36185b10a1 100644 --- a/Framework/Algorithms/test/ApplyDetailedBalanceTest.h +++ b/Framework/Algorithms/test/ApplyDetailedBalanceTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/ApplyFloodWorkspaceTest.h b/Framework/Algorithms/test/ApplyFloodWorkspaceTest.h index f85362364118b0345e61d3da71eea02f29cc7a7f..513fa13adac8800cf9c17631ce33d53889596373 100644 --- a/Framework/Algorithms/test/ApplyFloodWorkspaceTest.h +++ b/Framework/Algorithms/test/ApplyFloodWorkspaceTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -65,9 +65,9 @@ public: } private: - MatrixWorkspace_sptr - createFloodWorkspace(Mantid::Geometry::Instrument_const_sptr instrument, - std::string const &xUnit = "TOF") { + MatrixWorkspace_sptr createFloodWorkspace( + const Mantid::Geometry::Instrument_const_sptr &instrument, + std::string const &xUnit = "TOF") { MatrixWorkspace_sptr flood = create2DWorkspace(4, 1); flood->mutableY(0)[0] = 0.7; flood->mutableY(1)[0] = 1.0; diff --git a/Framework/Algorithms/test/ApplyTransmissionCorrectionTest.h b/Framework/Algorithms/test/ApplyTransmissionCorrectionTest.h index f1a486f612c64340f281cb851743d6cabf36289b..aa6d3ea98e600bcb30b182a7764283952007f77a 100644 --- a/Framework/Algorithms/test/ApplyTransmissionCorrectionTest.h +++ b/Framework/Algorithms/test/ApplyTransmissionCorrectionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/AverageLogDataTest.h b/Framework/Algorithms/test/AverageLogDataTest.h index 0546e9e2e8af570d8acc5aade9b77fb4a4e8b7dc..b0a7d9922b2d7166d972e0a983c4c9bd8db390f7 100644 --- a/Framework/Algorithms/test/AverageLogDataTest.h +++ b/Framework/Algorithms/test/AverageLogDataTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/Bin2DPowderDiffractionTest.h b/Framework/Algorithms/test/Bin2DPowderDiffractionTest.h index 0ef08c776e7482f947354cd7f07a4ebe0b3e6890..d3e34e2f6d227f8fee16fb107e51dfd768b65b43 100644 --- a/Framework/Algorithms/test/Bin2DPowderDiffractionTest.h +++ b/Framework/Algorithms/test/Bin2DPowderDiffractionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -284,7 +284,7 @@ private: } // creates test file with bins description - void createBinFile(std::string fname) { + void createBinFile(const std::string &fname) { std::ofstream binfile; binfile.open(fname); binfile << "#dp_min #dp_max\n"; diff --git a/Framework/Algorithms/test/BinaryOperateMasksTest.h b/Framework/Algorithms/test/BinaryOperateMasksTest.h index ae8bcbd1efdb5b9dc4f62d70b3507190f9bdc39e..3fd6d196885707bdb9a1e7a6e1419707faa103d7 100644 --- a/Framework/Algorithms/test/BinaryOperateMasksTest.h +++ b/Framework/Algorithms/test/BinaryOperateMasksTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/BinaryOperationTest.h b/Framework/Algorithms/test/BinaryOperationTest.h index 4fc75e1eaf987a6ae307e507e3b598bcff80f61c..fb694bd5b81f19abc45df13f9f5faa9cead4496f 100644 --- a/Framework/Algorithms/test/BinaryOperationTest.h +++ b/Framework/Algorithms/test/BinaryOperationTest.h @@ -1,12 +1,14 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include <cmath> +#include <utility> + #include <cxxtest/TestSuite.h> #include "MantidAPI/AnalysisDataService.h" @@ -42,8 +44,8 @@ public: /// is provided. const std::string summary() const override { return "Summary of this test."; } - std::string checkSizeCompatibility(const MatrixWorkspace_const_sptr ws1, - const MatrixWorkspace_const_sptr ws2) { + std::string checkSizeCompatibility(const MatrixWorkspace_const_sptr &ws1, + const MatrixWorkspace_const_sptr &ws2) { m_lhs = ws1; m_rhs = ws2; m_lhsBlocksize = ws1->blocksize(); @@ -297,9 +299,11 @@ public: std::vector<std::vector<int>> rhs, bool expect_throw = false) { EventWorkspace_sptr lhsWS = - WorkspaceCreationHelper::createGroupedEventWorkspace(lhs, 50, 1.0); + WorkspaceCreationHelper::createGroupedEventWorkspace(std::move(lhs), 50, + 1.0); EventWorkspace_sptr rhsWS = - WorkspaceCreationHelper::createGroupedEventWorkspace(rhs, 50, 1.0); + WorkspaceCreationHelper::createGroupedEventWorkspace(std::move(rhs), 50, + 1.0); BinaryOperation::BinaryOperationTable_sptr table; Mantid::Kernel::Timer timer1; if (expect_throw) { diff --git a/Framework/Algorithms/test/CMakeLists.txt b/Framework/Algorithms/test/CMakeLists.txt index 602111597d52b6c8454affe4e3b82ad8b078c19a..a1eec78bb41469c05ae0d56eaecebea599b3eedb 100644 --- a/Framework/Algorithms/test/CMakeLists.txt +++ b/Framework/Algorithms/test/CMakeLists.txt @@ -1,8 +1,7 @@ if(CXXTEST_FOUND) include_directories(SYSTEM ${CXXTEST_INCLUDE_DIR} - ${GMOCK_INCLUDE_DIR} - ${GTEST_INCLUDE_DIR}) +) check_include_files(stdint.h stdint) if(stdint) add_definitions(-DHAVE_STDINT_H) @@ -60,8 +59,8 @@ if(CXXTEST_FOUND) DataHandling Nexus ${BCRYPT} - ${GMOCK_LIBRARIES} - ${GTEST_LIBRARIES}) + gmock +) add_dependencies(AlgorithmsTest Crystal CurveFitting) add_dependencies(FrameworkTests AlgorithmsTest) # Test data diff --git a/Framework/Algorithms/test/CalculateCarpenterSampleCorrectionTest.h b/Framework/Algorithms/test/CalculateCarpenterSampleCorrectionTest.h index 0504057ce49b6110783617f6ce54126429d20559..275c8335ae670a041160e937924aca36887e01f1 100644 --- a/Framework/Algorithms/test/CalculateCarpenterSampleCorrectionTest.h +++ b/Framework/Algorithms/test/CalculateCarpenterSampleCorrectionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/CalculateCountRateTest.h b/Framework/Algorithms/test/CalculateCountRateTest.h index 41594ebee4860ab6260f9b9c4a59e2d3dcfbaaba..a20a7b72b207b1ca9ff3613692d27592e5f7f23e 100644 --- a/Framework/Algorithms/test/CalculateCountRateTest.h +++ b/Framework/Algorithms/test/CalculateCountRateTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/CalculateDIFCTest.h b/Framework/Algorithms/test/CalculateDIFCTest.h index 1cf10cfa0cb34d2fabc44e6867478ef639abbd21..509a4925d6572ffec033bd3d26fe837dd4b25ad5 100644 --- a/Framework/Algorithms/test/CalculateDIFCTest.h +++ b/Framework/Algorithms/test/CalculateDIFCTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -39,8 +39,8 @@ public: TS_ASSERT(alg.isInitialized()) } - void runTest(Workspace2D_sptr inputWS, OffsetsWorkspace_sptr offsetsWS, - std::string &outWSName) { + void runTest(const Workspace2D_sptr &inputWS, + const OffsetsWorkspace_sptr &offsetsWS, std::string &outWSName) { CalculateDIFC alg; TS_ASSERT_THROWS_NOTHING(alg.initialize()) diff --git a/Framework/Algorithms/test/CalculateDynamicRangeTest.h b/Framework/Algorithms/test/CalculateDynamicRangeTest.h index 688e2a97de626b05b8105d480c04203600451ec8..5b87af247ca9849eb5c8722dc7d759e268f4dcb9 100644 --- a/Framework/Algorithms/test/CalculateDynamicRangeTest.h +++ b/Framework/Algorithms/test/CalculateDynamicRangeTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/CalculateEfficiency2Test.h b/Framework/Algorithms/test/CalculateEfficiency2Test.h index 8e1b1f36cdbb42870cc81e8bbb4e43c36bec30a2..6d23281e3e120a399600a3f69d98abdec9f68db7 100644 --- a/Framework/Algorithms/test/CalculateEfficiency2Test.h +++ b/Framework/Algorithms/test/CalculateEfficiency2Test.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/CalculateEfficiencyTest.h b/Framework/Algorithms/test/CalculateEfficiencyTest.h index ad1525afa063b50305addaeb1be676b2f87341d6..9daeea4b8b5ab3c0080d06f48751320faddb6321 100644 --- a/Framework/Algorithms/test/CalculateEfficiencyTest.h +++ b/Framework/Algorithms/test/CalculateEfficiencyTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/CalculateFlatBackgroundTest.h b/Framework/Algorithms/test/CalculateFlatBackgroundTest.h index 90e4678a60ed7b2275153ca064b186e235ee28d1..7c65acff010c91d5b4600d49e7bbc0c1f47f6966 100644 --- a/Framework/Algorithms/test/CalculateFlatBackgroundTest.h +++ b/Framework/Algorithms/test/CalculateFlatBackgroundTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -763,6 +763,7 @@ private: AnalysisDataService::Instance().retrieveWS<MatrixWorkspace>( "Removed1"); for (size_t j = 0; j < spectraCount; ++j) { + // cppcheck-suppress unreadVariable const double expected = (movingAverageSpecialY(j) + (static_cast<double>(windowWidth) - 1) * movingAverageStandardY(j)) / @@ -839,7 +840,8 @@ private: } void compareSubtractedAndBackgroundWorkspaces( - MatrixWorkspace_sptr originalWS, const std::string &subtractedWSName, + const MatrixWorkspace_sptr &originalWS, + const std::string &subtractedWSName, const std::string &backgroundWSName) { const std::string minusWSName("minused"); MatrixWorkspace_sptr backgroundWS = diff --git a/Framework/Algorithms/test/CalculateIqtTest.h b/Framework/Algorithms/test/CalculateIqtTest.h index a738f1c164108d475231008ae58051d63dbe421d..c0eb3d2d8f9a70a7a80eabceb64ea2087246192d 100644 --- a/Framework/Algorithms/test/CalculateIqtTest.h +++ b/Framework/Algorithms/test/CalculateIqtTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -54,8 +54,8 @@ Mantid::API::MatrixWorkspace_sptr setUpResolutionWorkspace() { return createWorkspace->getProperty("OutputWorkspace"); } -IAlgorithm_sptr calculateIqtAlgorithm(MatrixWorkspace_sptr sample, - MatrixWorkspace_sptr resolution, +IAlgorithm_sptr calculateIqtAlgorithm(const MatrixWorkspace_sptr &sample, + const MatrixWorkspace_sptr &resolution, const double EnergyMin = -0.5, const double EnergyMax = 0.5, const double EnergyWidth = 0.1, diff --git a/Framework/Algorithms/test/CalculatePlaczekSelfScatteringTest.h b/Framework/Algorithms/test/CalculatePlaczekSelfScatteringTest.h index 81e38efa15f2134be7f743c21ecc9034e1dcfefb..30b83216d1be2cf2544325b171bd4d80c3308b56 100644 --- a/Framework/Algorithms/test/CalculatePlaczekSelfScatteringTest.h +++ b/Framework/Algorithms/test/CalculatePlaczekSelfScatteringTest.h @@ -1,5 +1,11 @@ // Mantid Repository : https://github.com/mantidproject/mantid // +// Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS +// SPDX - License - Identifier: GPL - 3.0 + +// Mantid Repository : https://github.com/mantidproject/mantid +// // Copyright © 201p ISIS Rutherford Appleton Laboratory UKRI, // NScD Oak Ridge National Laboratory, European Spallation Source // & Institut Laue - Langevin diff --git a/Framework/Algorithms/test/CalculatePolynomialBackgroundTest.h b/Framework/Algorithms/test/CalculatePolynomialBackgroundTest.h index 18d2dc33f328b68bac4114e7971dbd9de8064747..5b1cd71c8bef9343b8bf691c6ddaa966b017359b 100644 --- a/Framework/Algorithms/test/CalculatePolynomialBackgroundTest.h +++ b/Framework/Algorithms/test/CalculatePolynomialBackgroundTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/CalculateSlitsTest.h b/Framework/Algorithms/test/CalculateSlitsTest.h index c2c2a3971c87f191b108ee3fcf569593e526dbe9..30f2d82e2d8cecdfc0b6f365e45be32a07e9067a 100644 --- a/Framework/Algorithms/test/CalculateSlitsTest.h +++ b/Framework/Algorithms/test/CalculateSlitsTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/CalculateTransmissionBeamSpreaderTest.h b/Framework/Algorithms/test/CalculateTransmissionBeamSpreaderTest.h index 19b91c28f413092ff9f38fa31ac3763623beba1f..382ae2e1857931fb1836f94de7af759257521997 100644 --- a/Framework/Algorithms/test/CalculateTransmissionBeamSpreaderTest.h +++ b/Framework/Algorithms/test/CalculateTransmissionBeamSpreaderTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/CalculateTransmissionTest.h b/Framework/Algorithms/test/CalculateTransmissionTest.h index ed637169f1d194fb586890c20ba9ac2023c4ecb3..f440374c3394b48968779ce29a492e780b275fcb 100644 --- a/Framework/Algorithms/test/CalculateTransmissionTest.h +++ b/Framework/Algorithms/test/CalculateTransmissionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -361,10 +361,9 @@ public: auto &fitted_x = fitted->x(0); // TS_ASSERT_EQUALS(fitted_y.size(), unfitted_y.size()); - double x; for (unsigned int i = 0; i < fitted_y.size(); ++i) { - x = fitted_x[i]; //(fitted_x[i] + fitted_x[i+1])* 0.5; + double x = fitted_x[i]; //(fitted_x[i] + fitted_x[i+1])* 0.5; TS_ASSERT_DELTA(fitted_y[i], 26.6936 - 9.31494 * x + 1.11532 * x * x - 0.044502 * x * x * x, @@ -405,10 +404,9 @@ public: auto &fitted_x = fitted->x(0); // TS_ASSERT_EQUALS(fitted_y.size(), unfitted_y.size()); - double x; for (unsigned int i = 0; i < fitted_y.size(); ++i) { - x = (fitted_x[i] + fitted_x[i + 1]) * 0.5; + double x = (fitted_x[i] + fitted_x[i + 1]) * 0.5; TS_ASSERT_DELTA(fitted_y[i], 26.6936 - 9.31494 * x + 1.11532 * x * x - 0.044502 * x * x * x, diff --git a/Framework/Algorithms/test/CalculateZscoreTest.h b/Framework/Algorithms/test/CalculateZscoreTest.h index a48a2ffa3d740aa1d9d28c460fd45a448a1710ba..e4cc524b2b2439b2c8a93c3d74e6d1c5caee73d9 100644 --- a/Framework/Algorithms/test/CalculateZscoreTest.h +++ b/Framework/Algorithms/test/CalculateZscoreTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/CarpenterSampleCorrectionTest.h b/Framework/Algorithms/test/CarpenterSampleCorrectionTest.h index d0667665fe99162a92b2b2e963f10b04cc917cb8..c0d7c6354b08b5d0ea2a62d86081db13520d28e2 100644 --- a/Framework/Algorithms/test/CarpenterSampleCorrectionTest.h +++ b/Framework/Algorithms/test/CarpenterSampleCorrectionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/ChainedOperatorTest.h b/Framework/Algorithms/test/ChainedOperatorTest.h index d40e6e98faee05f4c27708ac44725aa88a785eda..36ecc1c4749602673c2a75bb540d91fd1b61221a 100644 --- a/Framework/Algorithms/test/ChainedOperatorTest.h +++ b/Framework/Algorithms/test/ChainedOperatorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -70,8 +70,8 @@ public: performTest(work_in1, work_in2); } - void performTest(MatrixWorkspace_sptr work_in1, - MatrixWorkspace_sptr work_in2) { + void performTest(const MatrixWorkspace_sptr &work_in1, + const MatrixWorkspace_sptr &work_in2) { ComplexOpTest alg; std::string wsNameIn1 = "testChainedOperator_in21"; @@ -98,9 +98,9 @@ public: } private: - void checkData(const MatrixWorkspace_sptr work_in1, - const MatrixWorkspace_sptr work_in2, - const MatrixWorkspace_sptr work_out1) { + void checkData(const MatrixWorkspace_sptr &work_in1, + const MatrixWorkspace_sptr &work_in2, + const MatrixWorkspace_sptr &work_out1) { size_t ws2LoopCount = 0; if (work_in2->size() > 0) { ws2LoopCount = work_in1->size() / work_in2->size(); @@ -112,9 +112,9 @@ private: } } - void checkDataItem(const MatrixWorkspace_sptr work_in1, - const MatrixWorkspace_sptr work_in2, - const MatrixWorkspace_sptr work_out1, size_t i, + void checkDataItem(const MatrixWorkspace_sptr &work_in1, + const MatrixWorkspace_sptr &work_in2, + const MatrixWorkspace_sptr &work_out1, size_t i, size_t ws2Index) { double sig1 = work_in1->readY(i / work_in1->blocksize())[i % work_in1->blocksize()]; diff --git a/Framework/Algorithms/test/ChangeBinOffsetTest.h b/Framework/Algorithms/test/ChangeBinOffsetTest.h index f47f5485c14ac745207b36b823c906ec8572ee5b..164520e69b0589d3303183ebba327e516043e85c 100644 --- a/Framework/Algorithms/test/ChangeBinOffsetTest.h +++ b/Framework/Algorithms/test/ChangeBinOffsetTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/ChangeLogTimeTest.h b/Framework/Algorithms/test/ChangeLogTimeTest.h index 4c94a561b2989212ac3d7b6e239c63f074bb5116..e7007c0f3046126c0a3ecda4ba5ae8e8dd062fd4 100644 --- a/Framework/Algorithms/test/ChangeLogTimeTest.h +++ b/Framework/Algorithms/test/ChangeLogTimeTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -52,7 +52,7 @@ private: * @param in_name Name of the input workspace. * @param out_name Name of the output workspace. */ - void verify(const std::string in_name, const std::string out_name) { + void verify(const std::string &in_name, const std::string &out_name) { DateAndTime start(start_str); // create a workspace to mess with diff --git a/Framework/Algorithms/test/ChangePulsetime2Test.h b/Framework/Algorithms/test/ChangePulsetime2Test.h index 322c5540ca51b23044daaed2df022176ed1ed4d8..5e39d09bfcf7ca0597d0872b2ca4efc58e9f8287 100644 --- a/Framework/Algorithms/test/ChangePulsetime2Test.h +++ b/Framework/Algorithms/test/ChangePulsetime2Test.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -22,8 +22,9 @@ using Mantid::Types::Core::DateAndTime; namespace { EventWorkspace_sptr -execute_change_of_pulse_times(EventWorkspace_sptr in_ws, std::string timeOffset, - std::string workspaceIndexList) { +execute_change_of_pulse_times(const EventWorkspace_sptr &in_ws, + const std::string &timeOffset, + const std::string &workspaceIndexList) { // Create and run the algorithm ChangePulsetime2 alg; alg.initialize(); @@ -53,8 +54,8 @@ public: TS_ASSERT(alg.isInitialized()) } - void do_test(std::string in_ws_name, std::string out_ws_name, - std::string WorkspaceIndexList) { + void do_test(const std::string &in_ws_name, const std::string &out_ws_name, + const std::string &WorkspaceIndexList) { ChangePulsetime2 alg; TS_ASSERT_THROWS_NOTHING(alg.initialize()) TS_ASSERT(alg.isInitialized()) diff --git a/Framework/Algorithms/test/ChangePulsetimeTest.h b/Framework/Algorithms/test/ChangePulsetimeTest.h index df569708c193009598a049df0cb5a9722f938ad4..22500e9fc344b6056fee0d93165acbdaf3fa5a11 100644 --- a/Framework/Algorithms/test/ChangePulsetimeTest.h +++ b/Framework/Algorithms/test/ChangePulsetimeTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -21,8 +21,9 @@ using Mantid::Types::Core::DateAndTime; namespace { EventWorkspace_sptr -execute_change_of_pulse_times(EventWorkspace_sptr in_ws, std::string timeOffset, - std::string workspaceIndexList) { +execute_change_of_pulse_times(const EventWorkspace_sptr &in_ws, + const std::string &timeOffset, + const std::string &workspaceIndexList) { // Create and run the algorithm ChangePulsetime alg; alg.initialize(); @@ -51,8 +52,8 @@ public: TS_ASSERT(alg.isInitialized()) } - void do_test(std::string in_ws_name, std::string out_ws_name, - std::string WorkspaceIndexList) { + void do_test(const std::string &in_ws_name, const std::string &out_ws_name, + const std::string &WorkspaceIndexList) { ChangePulsetime alg; TS_ASSERT_THROWS_NOTHING(alg.initialize()) TS_ASSERT(alg.isInitialized()) diff --git a/Framework/Algorithms/test/ChangeTimeZeroTest.h b/Framework/Algorithms/test/ChangeTimeZeroTest.h index f802bec29774d87978572131acbf661d4f912985..8c69978f19eb48a2887e3dcf4bc861c1e1604fe1 100644 --- a/Framework/Algorithms/test/ChangeTimeZeroTest.h +++ b/Framework/Algorithms/test/ChangeTimeZeroTest.h @@ -1,14 +1,16 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidKernel/Timer.h" #include <cxxtest/TestSuite.h> +#include <utility> + #include "MantidAPI/MatrixWorkspace.h" #include "MantidAPI/ScopedWorkspace.h" #include "MantidAPI/WorkspaceGroup.h" @@ -36,8 +38,8 @@ DateAndTime stringPropertyTime("2010-01-01T00:10:00"); enum LogType { STANDARD, NOPROTONCHARGE }; template <typename T> -void addTimeSeriesLogToWorkspace(Mantid::API::MatrixWorkspace_sptr ws, - std::string id, DateAndTime startTime, +void addTimeSeriesLogToWorkspace(const Mantid::API::MatrixWorkspace_sptr &ws, + const std::string &id, DateAndTime startTime, T defaultValue, int length) { auto timeSeries = new TimeSeriesProperty<T>(id); timeSeries->setUnits("mm"); @@ -48,15 +50,15 @@ void addTimeSeriesLogToWorkspace(Mantid::API::MatrixWorkspace_sptr ws, } template <typename T> -void addProperyWithValueToWorkspace(Mantid::API::MatrixWorkspace_sptr ws, - std::string id, T value) { +void addProperyWithValueToWorkspace(const Mantid::API::MatrixWorkspace_sptr &ws, + const std::string &id, T value) { auto propWithVal = new PropertyWithValue<T>(id, value); propWithVal->setUnits("mm"); ws->mutableRun().addProperty(propWithVal, true); } // Provide the logs for matrix workspaces -void provideLogs(LogType logType, Mantid::API::MatrixWorkspace_sptr ws, +void provideLogs(LogType logType, const Mantid::API::MatrixWorkspace_sptr &ws, DateAndTime startTime, int length) { switch (logType) { case (STANDARD): @@ -96,7 +98,7 @@ void provideLogs(LogType logType, Mantid::API::MatrixWorkspace_sptr ws, // Provides a 2D workspace with a log Mantid::API::MatrixWorkspace_sptr provideWorkspace2D(LogType logType, - std::string wsName, + const std::string &wsName, DateAndTime startTime, int length) { Workspace2D_sptr ws(new Workspace2D); @@ -140,9 +142,9 @@ provideEventWorkspace(LogType logType, DateAndTime startTime, int length) { return provideEventWorkspaceCustom(logType, startTime, length, 100, 100, 100); } -MatrixWorkspace_sptr execute_change_time(MatrixWorkspace_sptr in_ws, +MatrixWorkspace_sptr execute_change_time(const MatrixWorkspace_sptr &in_ws, double relativeTimeOffset, - std::string absolutTimeOffset) { + const std::string &absolutTimeOffset) { // Create and run the algorithm ChangeTimeZero alg; alg.initialize(); @@ -441,8 +443,9 @@ private: int m_length; // act and assert - void act_and_assert(double relativeTimeShift, std::string absoluteTimeShift, - MatrixWorkspace_sptr in_ws, + void act_and_assert(double relativeTimeShift, + const std::string &absoluteTimeShift, + const MatrixWorkspace_sptr &in_ws, bool inputEqualsOutputWorkspace) { // Create a duplicate workspace EventWorkspace_sptr duplicate_ws; @@ -484,8 +487,8 @@ private: } // perform the verification - void do_test_shift(MatrixWorkspace_sptr ws, const double timeShift, - MatrixWorkspace_sptr duplicate) const { + void do_test_shift(const MatrixWorkspace_sptr &ws, const double timeShift, + const MatrixWorkspace_sptr &duplicate) const { // Check the logs TS_ASSERT(ws); @@ -501,7 +504,7 @@ private: // Check the neutrons if (auto outWs = boost::dynamic_pointer_cast<EventWorkspace>(ws)) { - do_check_workspace(outWs, timeShift, duplicate); + do_check_workspace(outWs, timeShift, std::move(duplicate)); } } @@ -536,8 +539,8 @@ private: } // Check contents of an event workspace. We compare the time stamps to the // time stamps of the duplicate workspace - void do_check_workspace(EventWorkspace_sptr ws, double timeShift, - MatrixWorkspace_sptr duplicate) const { + void do_check_workspace(const EventWorkspace_sptr &ws, double timeShift, + const MatrixWorkspace_sptr &duplicate) const { // Get the duplicate input workspace for comparison reasons auto duplicateWs = boost::dynamic_pointer_cast<EventWorkspace>(duplicate); @@ -562,7 +565,7 @@ private: // Create comparison workspace EventWorkspace_sptr - createComparisonWorkspace(EventWorkspace_sptr inputWorkspace) { + createComparisonWorkspace(const EventWorkspace_sptr &inputWorkspace) { CloneWorkspace alg; alg.setChild(true); TS_ASSERT_THROWS_NOTHING(alg.initialize()) diff --git a/Framework/Algorithms/test/CheckWorkspacesMatchTest.h b/Framework/Algorithms/test/CheckWorkspacesMatchTest.h index c1176cd5bf95605a31d02c77b13599b96586f0cc..87630794e631474e0411e9ac6b5c6c09d79a696d 100644 --- a/Framework/Algorithms/test/CheckWorkspacesMatchTest.h +++ b/Framework/Algorithms/test/CheckWorkspacesMatchTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -1140,7 +1140,7 @@ private: TS_ASSERT_EQUALS(matcher.getPropertyValue("Result"), expectedResult); } - void cleanupGroup(const WorkspaceGroup_sptr group) { + void cleanupGroup(const WorkspaceGroup_sptr &group) { // group->deepRemoveAll(); const std::string name = group->getName(); Mantid::API::AnalysisDataService::Instance().deepRemoveGroup(name); diff --git a/Framework/Algorithms/test/ChopDataTest.h b/Framework/Algorithms/test/ChopDataTest.h index 694feb2a984fe962d72743f08bdcf6b89b43eea9..d7972301f7044137dfb6451ef01ecdf5ac0e706a 100644 --- a/Framework/Algorithms/test/ChopDataTest.h +++ b/Framework/Algorithms/test/ChopDataTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/ClearCacheTest.h b/Framework/Algorithms/test/ClearCacheTest.h index 97ebc2be1a10549e113188941a4d8dd85ecbef72..d6f1a2a7a2a41f1d1ea6ca178d005513dc60cff8 100644 --- a/Framework/Algorithms/test/ClearCacheTest.h +++ b/Framework/Algorithms/test/ClearCacheTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -49,7 +49,7 @@ public: createDirectory(GeomPath); } - void createDirectory(Poco::Path path) { + void createDirectory(const Poco::Path &path) { Poco::File file(path); if (file.createDirectory()) { m_directoriesToRemove.emplace_back(file); diff --git a/Framework/Algorithms/test/ClearInstrumentParametersTest.h b/Framework/Algorithms/test/ClearInstrumentParametersTest.h index 153a2f3c9bf054859f8726f8b6da6e79fe8cdf80..2e8d40202a598a925faf87f32b48d9824fab1852 100644 --- a/Framework/Algorithms/test/ClearInstrumentParametersTest.h +++ b/Framework/Algorithms/test/ClearInstrumentParametersTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -47,21 +47,23 @@ public: TS_ASSERT_EQUALS(oldPos, m_ws->detectorInfo().position(0)); } - void setParam(std::string cName, std::string pName, std::string value) { + void setParam(const std::string &cName, const std::string &pName, + const std::string &value) { Instrument_const_sptr inst = m_ws->getInstrument(); ParameterMap ¶mMap = m_ws->instrumentParameters(); boost::shared_ptr<const IComponent> comp = inst->getComponentByName(cName); paramMap.addString(comp->getComponentID(), pName, value); } - void setParam(std::string cName, std::string pName, double value) { + void setParam(const std::string &cName, const std::string &pName, + double value) { Instrument_const_sptr inst = m_ws->getInstrument(); ParameterMap ¶mMap = m_ws->instrumentParameters(); boost::shared_ptr<const IComponent> comp = inst->getComponentByName(cName); paramMap.addDouble(comp->getComponentID(), pName, value); } - void checkEmpty(std::string cName, std::string pName) { + void checkEmpty(const std::string &cName, const std::string &pName) { Instrument_const_sptr inst = m_ws->getInstrument(); ParameterMap ¶mMap = m_ws->instrumentParameters(); boost::shared_ptr<const IComponent> comp = inst->getComponentByName(cName); diff --git a/Framework/Algorithms/test/ClearMaskFlagTest.h b/Framework/Algorithms/test/ClearMaskFlagTest.h index 6c047789ba2119c4a8fef04e4956251b5e678ee7..963cbc460fe369fc07270d541b58dd8970ff4a85 100644 --- a/Framework/Algorithms/test/ClearMaskFlagTest.h +++ b/Framework/Algorithms/test/ClearMaskFlagTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/ClearMaskedSpectraTest.h b/Framework/Algorithms/test/ClearMaskedSpectraTest.h index 81d4d89419fca1b7b1d9f2443715505e5ce7e33f..9710f6ab35ae651bd6b69a748414d5b3b87e3ee3 100644 --- a/Framework/Algorithms/test/ClearMaskedSpectraTest.h +++ b/Framework/Algorithms/test/ClearMaskedSpectraTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/CloneWorkspaceTest.h b/Framework/Algorithms/test/CloneWorkspaceTest.h index fe350969cc609397eebe4e13e9f12d80d352b235..fe614482aeff8835ae4d7a04c681b6496adb8548 100644 --- a/Framework/Algorithms/test/CloneWorkspaceTest.h +++ b/Framework/Algorithms/test/CloneWorkspaceTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/CommentTest.h b/Framework/Algorithms/test/CommentTest.h index 840c996c5a1b1966c91bbcd489ea8a2fc84114b5..a22e00d4c7fa18bb13598229621d55c95f53d926 100644 --- a/Framework/Algorithms/test/CommentTest.h +++ b/Framework/Algorithms/test/CommentTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/CommutativeBinaryOperationTest.h b/Framework/Algorithms/test/CommutativeBinaryOperationTest.h index 144f812380ac4e7db0108612849a983987cf2b88..a7c834710b1fa98356809efef6257143045949fc 100644 --- a/Framework/Algorithms/test/CommutativeBinaryOperationTest.h +++ b/Framework/Algorithms/test/CommutativeBinaryOperationTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -33,8 +33,8 @@ public: return "Commutative binary operation helper."; } - std::string checkSizeCompatibility(const MatrixWorkspace_const_sptr ws1, - const MatrixWorkspace_const_sptr ws2) { + std::string checkSizeCompatibility(const MatrixWorkspace_const_sptr &ws1, + const MatrixWorkspace_const_sptr &ws2) { m_lhs = ws1; m_rhs = ws2; m_lhsBlocksize = ws1->blocksize(); diff --git a/Framework/Algorithms/test/CompareWorkspacesTest.h b/Framework/Algorithms/test/CompareWorkspacesTest.h index 665bc30de5f910af2ff2d2f76208c48a5076c8dd..a2d907d86fa79e55636705aa119eea1e125c192a 100644 --- a/Framework/Algorithms/test/CompareWorkspacesTest.h +++ b/Framework/Algorithms/test/CompareWorkspacesTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -1351,7 +1351,7 @@ private: } } - void cleanupGroup(const WorkspaceGroup_sptr group) { + void cleanupGroup(const WorkspaceGroup_sptr &group) { // group->deepRemoveAll(); const std::string name = group->getName(); Mantid::API::AnalysisDataService::Instance().deepRemoveGroup(name); diff --git a/Framework/Algorithms/test/ConjoinWorkspacesTest.h b/Framework/Algorithms/test/ConjoinWorkspacesTest.h index 5b70d18cd8e8fcb9f544eb06462fe78901d29415..2485feebb729076714020c5f41df507c15974e38 100644 --- a/Framework/Algorithms/test/ConjoinWorkspacesTest.h +++ b/Framework/Algorithms/test/ConjoinWorkspacesTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -37,7 +37,7 @@ public: : ws1Name("ConjoinWorkspacesTest_grp1"), ws2Name("ConjoinWorkspacesTest_grp2") {} - MatrixWorkspace_sptr getWSFromADS(std::string wsName) { + MatrixWorkspace_sptr getWSFromADS(const std::string &wsName) { auto out = boost::dynamic_pointer_cast<MatrixWorkspace>( AnalysisDataService::Instance().retrieve(wsName)); TS_ASSERT(out); diff --git a/Framework/Algorithms/test/ConjoinXRunsTest.h b/Framework/Algorithms/test/ConjoinXRunsTest.h index 3db3113719a0146d7adf014fd188a22b1db933dd..7e0abf7ee8e31de31750f67defd6be8a13fd3e74 100644 --- a/Framework/Algorithms/test/ConjoinXRunsTest.h +++ b/Framework/Algorithms/test/ConjoinXRunsTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/ConvertAxesToRealSpaceTest.h b/Framework/Algorithms/test/ConvertAxesToRealSpaceTest.h index c277aff3a856e5c3eea8060fdebf88a0a98a04e3..56ae17def050ad508e455c8b1b11db6116f4f23d 100644 --- a/Framework/Algorithms/test/ConvertAxesToRealSpaceTest.h +++ b/Framework/Algorithms/test/ConvertAxesToRealSpaceTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -55,10 +55,10 @@ public: do_algorithm_run(baseWSName, "phi", "signed2theta", 100, 200); } - MatrixWorkspace_sptr do_algorithm_run(std::string baseWSName, - std::string verticalAxis, - std::string horizontalAxis, int nHBins, - int nVBins) { + MatrixWorkspace_sptr do_algorithm_run(const std::string &baseWSName, + const std::string &verticalAxis, + const std::string &horizontalAxis, + int nHBins, int nVBins) { std::string inWSName(baseWSName + "_InputWS"); std::string outWSName(baseWSName + "_OutputWS"); diff --git a/Framework/Algorithms/test/ConvertAxisByFormulaTest.h b/Framework/Algorithms/test/ConvertAxisByFormulaTest.h index 7603ccb6ae6f8c7a9200795474e471839021da20..6b55ecffeb14beef33741b690ca9bb8ef7543442 100644 --- a/Framework/Algorithms/test/ConvertAxisByFormulaTest.h +++ b/Framework/Algorithms/test/ConvertAxisByFormulaTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -197,8 +197,9 @@ public: cleanupWorkspaces(std::vector<std::string>{inputWs}); } - bool runConvertAxisByFormula(std::string testName, std::string formula, - std::string axis, std::string &inputWs, + bool runConvertAxisByFormula(const std::string &testName, + const std::string &formula, + const std::string &axis, std::string &inputWs, std::string &resultWs) { Mantid::Algorithms::ConvertAxisByFormula alg; alg.initialize(); diff --git a/Framework/Algorithms/test/ConvertDiffCalTest.h b/Framework/Algorithms/test/ConvertDiffCalTest.h index fc99734f1614659a27aeffbf8009b1a4cf0a45cd..5212b77ea212a657772f31f42f423abbd2482c21 100644 --- a/Framework/Algorithms/test/ConvertDiffCalTest.h +++ b/Framework/Algorithms/test/ConvertDiffCalTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/ConvertEmptyToTofTest.h b/Framework/Algorithms/test/ConvertEmptyToTofTest.h index 9b71eeafc2cb44e4e114ff118ae6b04ed85c97b4..0257d5f25b84ca57456a7401e60f7b67893e79da 100644 --- a/Framework/Algorithms/test/ConvertEmptyToTofTest.h +++ b/Framework/Algorithms/test/ConvertEmptyToTofTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/ConvertFromDistributionTest.h b/Framework/Algorithms/test/ConvertFromDistributionTest.h index 745852be15cdeaf3ebec9015c6b4ad51f2fa53a2..f15d828a5f29a0b5bb0617126db2a7c97e6d70d2 100644 --- a/Framework/Algorithms/test/ConvertFromDistributionTest.h +++ b/Framework/Algorithms/test/ConvertFromDistributionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/ConvertSpectrumAxis2Test.h b/Framework/Algorithms/test/ConvertSpectrumAxis2Test.h index b3f88e7457375df030526ca64f360192fa0fa2e7..78f9b1605ab800b91551c52857cc2d310665b88d 100644 --- a/Framework/Algorithms/test/ConvertSpectrumAxis2Test.h +++ b/Framework/Algorithms/test/ConvertSpectrumAxis2Test.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -23,8 +23,8 @@ using namespace Mantid::HistogramData::detail; class ConvertSpectrumAxis2Test : public CxxTest::TestSuite { private: - void do_algorithm_run(std::string target, std::string inputWS, - std::string outputWS, bool startYNegative = true, + void do_algorithm_run(const std::string &target, const std::string &inputWS, + const std::string &outputWS, bool startYNegative = true, bool isHistogram = true) { auto testWS = WorkspaceCreationHelper::create2DWorkspaceWithFullInstrument( 3, 1, false, startYNegative, isHistogram); @@ -45,7 +45,7 @@ private: } void check_output_values_for_signed_theta_conversion( - std::string outputWSSignedTheta) { + const std::string &outputWSSignedTheta) { MatrixWorkspace_const_sptr outputSignedTheta; TS_ASSERT_THROWS_NOTHING( outputSignedTheta = @@ -69,8 +69,9 @@ private: TS_ASSERT_DELTA((*thetaAxis)(2), 1.1458, 0.0001); } - void check_output_values_for_theta_conversion(std::string inputWSTheta, - std::string outputWSTheta) { + void + check_output_values_for_theta_conversion(const std::string &inputWSTheta, + const std::string &outputWSTheta) { MatrixWorkspace_const_sptr input, output; TS_ASSERT_THROWS_NOTHING( input = AnalysisDataService::Instance().retrieveWS<MatrixWorkspace>( @@ -101,8 +102,8 @@ private: const Mantid::Kernel::Exception::IndexError &); } - void clean_up_workspaces(const std::string inputWS, - const std::string outputWS) { + void clean_up_workspaces(const std::string &inputWS, + const std::string &outputWS) { AnalysisDataService::Instance().remove(inputWS); AnalysisDataService::Instance().remove(outputWS); } diff --git a/Framework/Algorithms/test/ConvertSpectrumAxisTest.h b/Framework/Algorithms/test/ConvertSpectrumAxisTest.h index 62399d234e6492f1cd6b784f17466ab9136776e0..fcab91851b1cd6322fa37ee7400e873442b0c2f6 100644 --- a/Framework/Algorithms/test/ConvertSpectrumAxisTest.h +++ b/Framework/Algorithms/test/ConvertSpectrumAxisTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -19,8 +19,8 @@ using namespace Mantid::HistogramData::detail; class ConvertSpectrumAxisTest : public CxxTest::TestSuite { private: - void do_algorithm_run(std::string target, std::string inputWS, - std::string outputWS) { + void do_algorithm_run(const std::string &target, const std::string &inputWS, + const std::string &outputWS) { Mantid::Algorithms::ConvertSpectrumAxis conv; conv.initialize(); diff --git a/Framework/Algorithms/test/ConvertTableToMatrixWorkspaceTest.h b/Framework/Algorithms/test/ConvertTableToMatrixWorkspaceTest.h index 1cc28c5b7a92bfeb539002970af6ca2519c41343..8752e7f9617b75bd19531c9afcd53e5f8acabe42 100644 --- a/Framework/Algorithms/test/ConvertTableToMatrixWorkspaceTest.h +++ b/Framework/Algorithms/test/ConvertTableToMatrixWorkspaceTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/ConvertToConstantL2Test.h b/Framework/Algorithms/test/ConvertToConstantL2Test.h index a71c77aca885269ec34dec1d8938199aa981124a..4937686131866414685542e4d665e7585869d3f6 100644 --- a/Framework/Algorithms/test/ConvertToConstantL2Test.h +++ b/Framework/Algorithms/test/ConvertToConstantL2Test.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -58,7 +58,7 @@ public: do_test_move(inputWS); } - void do_test_move(MatrixWorkspace_sptr inputWS) { + void do_test_move(const MatrixWorkspace_sptr &inputWS) { // BEFORE - check the L2 values differ const auto &spectrumInfoInput = inputWS->spectrumInfo(); for (size_t i = 0; i < inputWS->getNumberHistograms(); i++) { @@ -169,7 +169,7 @@ private: return inputWS; } - void addSampleLogs(MatrixWorkspace_sptr inputWS) { + void addSampleLogs(const MatrixWorkspace_sptr &inputWS) { inputWS->mutableRun().addProperty( "wavelength", boost::lexical_cast<std::string>(m_wavelength)); diff --git a/Framework/Algorithms/test/ConvertToDistributionTest.h b/Framework/Algorithms/test/ConvertToDistributionTest.h index 9d501508806fe1f1e81acc36ed28a52a89e3211c..4c8bdf3c1fe34c13dc84c2515535d0d8b7944376 100644 --- a/Framework/Algorithms/test/ConvertToDistributionTest.h +++ b/Framework/Algorithms/test/ConvertToDistributionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/ConvertToEventWorkspaceTest.h b/Framework/Algorithms/test/ConvertToEventWorkspaceTest.h index fdf2f6e238f34737bbf9d1cec02676db9cdcad66..f4e8d2699a39928a092d0b2fa9d53d8084674257 100644 --- a/Framework/Algorithms/test/ConvertToEventWorkspaceTest.h +++ b/Framework/Algorithms/test/ConvertToEventWorkspaceTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/ConvertToHistogramTest.h b/Framework/Algorithms/test/ConvertToHistogramTest.h index 40d04e87d0525bbc8c425e794b10ab5230a912cc..a693111185bbc58238bd5aa1e6513a66e560eb30 100644 --- a/Framework/Algorithms/test/ConvertToHistogramTest.h +++ b/Framework/Algorithms/test/ConvertToHistogramTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -110,7 +110,7 @@ public: } private: - MatrixWorkspace_sptr runAlgorithm(Workspace2D_sptr inputWS) { + MatrixWorkspace_sptr runAlgorithm(const Workspace2D_sptr &inputWS) { IAlgorithm_sptr alg(new ConvertToHistogram()); alg->initialize(); alg->setRethrows(true); diff --git a/Framework/Algorithms/test/ConvertToMatrixWorkspaceTest.h b/Framework/Algorithms/test/ConvertToMatrixWorkspaceTest.h index 1ca76778b033a839294f92ffd7d6dcafc411fbca..b51a965deaa735bf944ee642d0611e29c632abba 100644 --- a/Framework/Algorithms/test/ConvertToMatrixWorkspaceTest.h +++ b/Framework/Algorithms/test/ConvertToMatrixWorkspaceTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/ConvertToPointDataTest.h b/Framework/Algorithms/test/ConvertToPointDataTest.h index 44459687369786377ff7e9a327c7161ab91c7dca..10b4868b4d2bb28179ec4cdba88aee189d2e83f2 100644 --- a/Framework/Algorithms/test/ConvertToPointDataTest.h +++ b/Framework/Algorithms/test/ConvertToPointDataTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -171,7 +171,7 @@ public: } private: - MatrixWorkspace_sptr runAlgorithm(Workspace2D_sptr inputWS) { + MatrixWorkspace_sptr runAlgorithm(const Workspace2D_sptr &inputWS) { IAlgorithm_sptr alg(new ConvertToPointData()); alg->initialize(); alg->setRethrows(true); diff --git a/Framework/Algorithms/test/ConvertUnitsTest.h b/Framework/Algorithms/test/ConvertUnitsTest.h index 276388140f1c574e87c6c35568f8201617189034..ca345e3cb59181f7c47f22c8156c30b648183ecc 100644 --- a/Framework/Algorithms/test/ConvertUnitsTest.h +++ b/Framework/Algorithms/test/ConvertUnitsTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -713,7 +713,7 @@ public: * sorting flips the direction */ void do_testExecEvent_RemainsSorted(EventSortType sortType, - std::string targetUnit) { + const std::string &targetUnit) { EventWorkspace_sptr ws = WorkspaceCreationHelper::createEventWorkspaceWithFullInstrument(1, 10, false); diff --git a/Framework/Algorithms/test/ConvertUnitsUsingDetectorTableTest.h b/Framework/Algorithms/test/ConvertUnitsUsingDetectorTableTest.h index 4a997374e453843cdf715a27dcbdbdd646a6ab76..b81ecb8209d52a0d40448fd52dd4064495465f5f 100644 --- a/Framework/Algorithms/test/ConvertUnitsUsingDetectorTableTest.h +++ b/Framework/Algorithms/test/ConvertUnitsUsingDetectorTableTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/CopyDataRangeTest.h b/Framework/Algorithms/test/CopyDataRangeTest.h index 96427f9f3a4300665f81329ce686220d27109061..da41285003b3912b140abe268fcc32dea7a4c98b 100644 --- a/Framework/Algorithms/test/CopyDataRangeTest.h +++ b/Framework/Algorithms/test/CopyDataRangeTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -37,8 +37,8 @@ MatrixWorkspace_sptr getADSMatrixWorkspace(std::string const &workspaceName) { workspaceName); } -IAlgorithm_sptr setUpAlgorithm(MatrixWorkspace_sptr inputWorkspace, - MatrixWorkspace_sptr destWorkspace, +IAlgorithm_sptr setUpAlgorithm(const MatrixWorkspace_sptr &inputWorkspace, + const MatrixWorkspace_sptr &destWorkspace, int const &specMin, int const &specMax, double const &xMin, double const &xMax, int const &yInsertionIndex, @@ -68,7 +68,7 @@ IAlgorithm_sptr setUpAlgorithm(std::string const &inputName, xMax, yInsertionIndex, xInsertionIndex, outputName); } -void populateSpectrum(MatrixWorkspace_sptr workspace, +void populateSpectrum(const MatrixWorkspace_sptr &workspace, std::size_t const &spectrum, std::vector<double> const &yData, std::vector<double> const &xData, @@ -78,7 +78,7 @@ void populateSpectrum(MatrixWorkspace_sptr workspace, workspace->mutableE(spectrum) = HistogramE(eData); } -void populateWorkspace(MatrixWorkspace_sptr workspace, +void populateWorkspace(const MatrixWorkspace_sptr &workspace, std::vector<double> const &yData, std::vector<double> const &xData, std::vector<double> const &eData) { @@ -94,7 +94,7 @@ constructHistogramData(Mantid::MantidVec::const_iterator fromIterator, return histogram; } -void populateOutputWorkspace(MatrixWorkspace_sptr workspace, +void populateOutputWorkspace(const MatrixWorkspace_sptr &workspace, std::vector<double> const &yData, std::vector<double> const &eData) { std::vector<double> const xData = {2.1, 2.2, 2.3, 2.4, 2.5, 2.6}; @@ -111,8 +111,8 @@ void populateOutputWorkspace(MatrixWorkspace_sptr workspace, } } -ITableWorkspace_sptr compareWorkspaces(MatrixWorkspace_sptr workspace1, - MatrixWorkspace_sptr workspace2, +ITableWorkspace_sptr compareWorkspaces(const MatrixWorkspace_sptr &workspace1, + const MatrixWorkspace_sptr &workspace2, double tolerance = 0.000001) { auto compareAlg = AlgorithmManager::Instance().create("CompareWorkspaces"); compareAlg->setProperty("Workspace1", workspace1); diff --git a/Framework/Algorithms/test/CopyDetectorMappingTest.h b/Framework/Algorithms/test/CopyDetectorMappingTest.h index 6d40b4c4b11d6ad2ef6cfadbb8e23b3beb6ac320..dc7d6fb220c8b3f91419f0840b50ab2bcfb08aa2 100644 --- a/Framework/Algorithms/test/CopyDetectorMappingTest.h +++ b/Framework/Algorithms/test/CopyDetectorMappingTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/CopyInstrumentParametersTest.h b/Framework/Algorithms/test/CopyInstrumentParametersTest.h index f790bae1ab96ba9cbd8a1d0e17b4e33a297c4fc1..b898e439356c1baa813bb1d4595668e5afc380b1 100644 --- a/Framework/Algorithms/test/CopyInstrumentParametersTest.h +++ b/Framework/Algorithms/test/CopyInstrumentParametersTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/CopyLogsTest.h b/Framework/Algorithms/test/CopyLogsTest.h index 587dd6a9b0e81af9c423e94b5059665b578483ff..c67a5903e17e7c01ee5d680e085aeac88ca9dec7 100644 --- a/Framework/Algorithms/test/CopyLogsTest.h +++ b/Framework/Algorithms/test/CopyLogsTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -136,7 +136,7 @@ public: } // Run the Copy Logs algorithm - void runAlg(MatrixWorkspace_sptr in, MatrixWorkspace_sptr out, + void runAlg(const MatrixWorkspace_sptr &in, const MatrixWorkspace_sptr &out, const std::string &mode) { CopyLogs alg; TS_ASSERT_THROWS_NOTHING(alg.initialize()) @@ -149,14 +149,14 @@ public: } // Add a string sample log to the workspace - void addSampleLog(MatrixWorkspace_sptr ws, const std::string &name, + void addSampleLog(const MatrixWorkspace_sptr &ws, const std::string &name, const std::string &value) { Run &run = ws->mutableRun(); run.addLogData(new PropertyWithValue<std::string>(name, value)); } // Add a double sample log to the workspace - void addSampleLog(MatrixWorkspace_sptr ws, const std::string &name, + void addSampleLog(const MatrixWorkspace_sptr &ws, const std::string &name, const double value) { Run &run = ws->mutableRun(); run.addLogData(new PropertyWithValue<double>(name, value)); diff --git a/Framework/Algorithms/test/CopySampleTest.h b/Framework/Algorithms/test/CopySampleTest.h index 8f177f1a6656ae9b4eb48c25240273373fa9a5ba..f1db0efa6de7972d76295573322bb3c24f74dd94 100644 --- a/Framework/Algorithms/test/CopySampleTest.h +++ b/Framework/Algorithms/test/CopySampleTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/CorelliCrossCorrelateTest.h b/Framework/Algorithms/test/CorelliCrossCorrelateTest.h index 4b960783b3407772d05c76c9e5a63df5e7a864c5..654ee8b6f426d2d46b0cc02e05fd76c683ecacd3 100644 --- a/Framework/Algorithms/test/CorelliCrossCorrelateTest.h +++ b/Framework/Algorithms/test/CorelliCrossCorrelateTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/CorrectKiKfTest.h b/Framework/Algorithms/test/CorrectKiKfTest.h index cfd72834ffa178ddecb8c4119015ed8f8e5e4c56..ece1f98d59954d90cc5572356102e75ee3491f97 100644 --- a/Framework/Algorithms/test/CorrectKiKfTest.h +++ b/Framework/Algorithms/test/CorrectKiKfTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/CorrectTOFAxisTest.h b/Framework/Algorithms/test/CorrectTOFAxisTest.h index 97eb3d279736a189b695b41bb5b05046d5b18e52..6f376bda675306b70e982f85493ffcea34da9383 100644 --- a/Framework/Algorithms/test/CorrectTOFAxisTest.h +++ b/Framework/Algorithms/test/CorrectTOFAxisTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -323,7 +323,7 @@ public: } private: - static void addSampleLogs(MatrixWorkspace_sptr ws, const double TOF) { + static void addSampleLogs(const MatrixWorkspace_sptr &ws, const double TOF) { const double length = flightLengthIN4(ws); const double Ei = incidentEnergy(TOF, length); ws->mutableRun().addProperty("EI", Ei); @@ -331,8 +331,8 @@ private: ws->mutableRun().addProperty("wavelength", lambda); } - static void assertTOFShift(MatrixWorkspace_sptr shiftedWs, - MatrixWorkspace_sptr ws, const double ei, + static void assertTOFShift(const MatrixWorkspace_sptr &shiftedWs, + const MatrixWorkspace_sptr &ws, const double ei, const double wavelength, const double shift) { TS_ASSERT(shiftedWs); TS_ASSERT_EQUALS(shiftedWs->run().getPropertyAsSingleValue("EI"), ei); @@ -412,7 +412,7 @@ private: } } - static double flightLengthIN4(MatrixWorkspace_const_sptr ws) { + static double flightLengthIN4(const MatrixWorkspace_const_sptr &ws) { const double l1 = ws->spectrumInfo().l1(); const double l2 = ws->spectrumInfo().l2(1); return l1 + l2; diff --git a/Framework/Algorithms/test/CorrectToFileTest.h b/Framework/Algorithms/test/CorrectToFileTest.h index 4ddb4b825b8aa4a896f85115703763734ff07b77..532a0c8fdeb8f7948ed9db9e65e1a4899d01174e 100644 --- a/Framework/Algorithms/test/CorrectToFileTest.h +++ b/Framework/Algorithms/test/CorrectToFileTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -142,7 +142,7 @@ public: AnalysisDataService::Instance().remove(data->getName()); } - MatrixWorkspace_sptr executeAlgorithm(MatrixWorkspace_sptr testInput, + MatrixWorkspace_sptr executeAlgorithm(const MatrixWorkspace_sptr &testInput, const std::string &unit, const std::string &operation, bool newWksp = true) { diff --git a/Framework/Algorithms/test/CreateCalFileByNamesTest.h b/Framework/Algorithms/test/CreateCalFileByNamesTest.h index 41d036c5101f9a3df72b6e5132d841a24cef78ed..46cdc915b8b65eae98002b8df42ff419e988df84 100644 --- a/Framework/Algorithms/test/CreateCalFileByNamesTest.h +++ b/Framework/Algorithms/test/CreateCalFileByNamesTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/CreateDetectorTableTest.h b/Framework/Algorithms/test/CreateDetectorTableTest.h index 94f55a442512c3f91a9a636c728c6ea5a33319ca..81d3807ca5629ac45a80e267b2172d05a3694f20 100644 --- a/Framework/Algorithms/test/CreateDetectorTableTest.h +++ b/Framework/Algorithms/test/CreateDetectorTableTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/CreateDummyCalFileTest.h b/Framework/Algorithms/test/CreateDummyCalFileTest.h index 419f3fdf57e437e777ada00ac82edd79addad7d9..320390b1cd3e84b8b15eee4a7a95c39c93e83cd3 100644 --- a/Framework/Algorithms/test/CreateDummyCalFileTest.h +++ b/Framework/Algorithms/test/CreateDummyCalFileTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/CreateEPPTest.h b/Framework/Algorithms/test/CreateEPPTest.h index f6f6808813ad8a38a66da046342bb3bb2b5a9c76..2ed9d6e0c6da0fd7052f1a377b71532b324d381f 100644 --- a/Framework/Algorithms/test/CreateEPPTest.h +++ b/Framework/Algorithms/test/CreateEPPTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -177,7 +177,7 @@ private: return false; } for (const auto &columnName : columnNames) { - if (std::find(names.cbegin(), names.cend(), columnName) == names.end()) { + if (std::find(names.cbegin(), names.cend(), columnName) == names.cend()) { return false; } } diff --git a/Framework/Algorithms/test/CreateFlatEventWorkspaceTest.h b/Framework/Algorithms/test/CreateFlatEventWorkspaceTest.h index 64a232f9edbd801d37d152721d89939bfbe149c8..dff972d2be71d0ad5b5efe8ac2cc3b2f27085771 100644 --- a/Framework/Algorithms/test/CreateFlatEventWorkspaceTest.h +++ b/Framework/Algorithms/test/CreateFlatEventWorkspaceTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/CreateGroupingWorkspaceTest.h b/Framework/Algorithms/test/CreateGroupingWorkspaceTest.h index 6b17738320105948e8e78b9bdd7079c12615efc5..79cd24af8cb0243ba5620f5d8da59a1ce06b1c4d 100644 --- a/Framework/Algorithms/test/CreateGroupingWorkspaceTest.h +++ b/Framework/Algorithms/test/CreateGroupingWorkspaceTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -25,7 +25,7 @@ public: TS_ASSERT(alg.isInitialized()) } - void doTest(std::string outWSName) { + void doTest(const std::string &outWSName) { // Retrieve the workspace from data service. GroupingWorkspace_sptr ws; TS_ASSERT_THROWS_NOTHING( diff --git a/Framework/Algorithms/test/CreateLogPropertyTableTest.h b/Framework/Algorithms/test/CreateLogPropertyTableTest.h index b33b5c9b9c760f523fd44628b3a06585324b5aa2..5f3639ce2f1e41e8fc02c09235e21865c7f3633c 100644 --- a/Framework/Algorithms/test/CreateLogPropertyTableTest.h +++ b/Framework/Algorithms/test/CreateLogPropertyTableTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -110,7 +110,7 @@ public: private: void createSampleWorkspace( - std::string wsName = "__CreateLogPropertyTable__TestWorkspace", + const std::string &wsName = "__CreateLogPropertyTable__TestWorkspace", int runNumber = 12345, int64_t runStart = 3000000000) { using namespace WorkspaceCreationHelper; diff --git a/Framework/Algorithms/test/CreateLogTimeCorrectionTest.h b/Framework/Algorithms/test/CreateLogTimeCorrectionTest.h index ef10ad785e22a8e112e6e82f30f4865959e4ff91..d7b1bc74dd51ce9644be6a3211868d93e406f250 100644 --- a/Framework/Algorithms/test/CreateLogTimeCorrectionTest.h +++ b/Framework/Algorithms/test/CreateLogTimeCorrectionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/CreatePSDBleedMaskTest.h b/Framework/Algorithms/test/CreatePSDBleedMaskTest.h index fd399f6b24f0944b0c397de10728a00cb39d4bc1..e8614615ea0bc7459cecd06187a5efc9b50b0b17 100644 --- a/Framework/Algorithms/test/CreatePSDBleedMaskTest.h +++ b/Framework/Algorithms/test/CreatePSDBleedMaskTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/CreatePeaksWorkspaceTest.h b/Framework/Algorithms/test/CreatePeaksWorkspaceTest.h index 3af4f01d34953b71fe84565588b6dad2346c886c..2373ed301ac8dbe3dbf7796a9323407b9401f171 100644 --- a/Framework/Algorithms/test/CreatePeaksWorkspaceTest.h +++ b/Framework/Algorithms/test/CreatePeaksWorkspaceTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/CreateSampleWorkspaceTest.h b/Framework/Algorithms/test/CreateSampleWorkspaceTest.h index 464abf6a197d764c5be9acdd74d89dd4986c10bb..3e0e5f37ba44b75122a2e3fe6972f9a8faafd78a 100644 --- a/Framework/Algorithms/test/CreateSampleWorkspaceTest.h +++ b/Framework/Algorithms/test/CreateSampleWorkspaceTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -46,9 +46,10 @@ public: } MatrixWorkspace_sptr createSampleWorkspace( - std::string outWSName, std::string wsType = "", std::string function = "", - std::string userFunction = "", int numBanks = 2, int bankPixelWidth = 10, - int numEvents = 1000, bool isRandom = false, std::string xUnit = "TOF", + const std::string &outWSName, const std::string &wsType = "", + const std::string &function = "", const std::string &userFunction = "", + int numBanks = 2, int bankPixelWidth = 10, int numEvents = 1000, + bool isRandom = false, const std::string &xUnit = "TOF", double xMin = 0.0, double xMax = 20000.0, double binWidth = 200.0, int numScanPoints = 1) { diff --git a/Framework/Algorithms/test/CreateSingleValuedWorkspaceTest.h b/Framework/Algorithms/test/CreateSingleValuedWorkspaceTest.h index 8f29d8cf3fb3c67f35558a0c4ab0341c80c93fbf..ac303d63d094e3c56beaccc4fc9dfa32bda84e0d 100644 --- a/Framework/Algorithms/test/CreateSingleValuedWorkspaceTest.h +++ b/Framework/Algorithms/test/CreateSingleValuedWorkspaceTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/CreateTransmissionWorkspace2Test.h b/Framework/Algorithms/test/CreateTransmissionWorkspace2Test.h index c62ceeb09119ec6f6483b635482928a02ff155d2..cda64d11d6f629869c034d9c72c01daea3ed837c 100644 --- a/Framework/Algorithms/test/CreateTransmissionWorkspace2Test.h +++ b/Framework/Algorithms/test/CreateTransmissionWorkspace2Test.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -617,7 +617,7 @@ private: } } - void check_lambda_workspace(MatrixWorkspace_sptr ws) { + void check_lambda_workspace(const MatrixWorkspace_sptr &ws) { TS_ASSERT(ws); if (!ws) return; diff --git a/Framework/Algorithms/test/CreateTransmissionWorkspaceAuto2Test.h b/Framework/Algorithms/test/CreateTransmissionWorkspaceAuto2Test.h index c30a4c754a33c9e8465e5044f403b8b41bba1450..ecbf4e01bc626a7528b554328ba1422197c7bbca 100644 --- a/Framework/Algorithms/test/CreateTransmissionWorkspaceAuto2Test.h +++ b/Framework/Algorithms/test/CreateTransmissionWorkspaceAuto2Test.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/CreateTransmissionWorkspaceAutoTest.h b/Framework/Algorithms/test/CreateTransmissionWorkspaceAutoTest.h index b2b9909c187dbe6e807d86a63b4e2c24e24942e7..9961cfc9f4f12a2819e544c6499e15f97733e003 100644 --- a/Framework/Algorithms/test/CreateTransmissionWorkspaceAutoTest.h +++ b/Framework/Algorithms/test/CreateTransmissionWorkspaceAutoTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/CreateTransmissionWorkspaceTest.h b/Framework/Algorithms/test/CreateTransmissionWorkspaceTest.h index 4e94247565bb987a581b19f2e0ce454ef6e237bd..2eb11026bd0639b1bc71cbcb9e2dae5f3d15ddca 100644 --- a/Framework/Algorithms/test/CreateTransmissionWorkspaceTest.h +++ b/Framework/Algorithms/test/CreateTransmissionWorkspaceTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /* * CreateTransmissionWorkspaceTest.h diff --git a/Framework/Algorithms/test/CreateUserDefinedBackgroundTest.h b/Framework/Algorithms/test/CreateUserDefinedBackgroundTest.h index cca7ae4b42f2ed0d25910c4d840e1f4bdbe93423..aa502c2dd8662e258191ce336b324b4b0431ade5 100644 --- a/Framework/Algorithms/test/CreateUserDefinedBackgroundTest.h +++ b/Framework/Algorithms/test/CreateUserDefinedBackgroundTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -330,8 +330,8 @@ private: } /// Compare workspaces - bool workspacesEqual(const MatrixWorkspace_sptr lhs, - const MatrixWorkspace_sptr rhs, double tolerance, + bool workspacesEqual(const MatrixWorkspace_sptr &lhs, + const MatrixWorkspace_sptr &rhs, double tolerance, bool relativeError = false) { auto alg = Mantid::API::AlgorithmFactory::Instance().create( "CompareWorkspaces", 1); diff --git a/Framework/Algorithms/test/CreateWorkspaceTest.h b/Framework/Algorithms/test/CreateWorkspaceTest.h index a52d8565ae76430ee536c44e6da9a5384f922277..1b325130b28be06c9b46d46a423501dd54984bd9 100644 --- a/Framework/Algorithms/test/CreateWorkspaceTest.h +++ b/Framework/Algorithms/test/CreateWorkspaceTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include <cxxtest/TestSuite.h> diff --git a/Framework/Algorithms/test/CropToComponentTest.h b/Framework/Algorithms/test/CropToComponentTest.h index 0c33a3c7fe2ab0862721bf6b338ca91166dc80fb..1a6ae411b1fc2d86ae8ba2e44cf96141d234ff0e 100644 --- a/Framework/Algorithms/test/CropToComponentTest.h +++ b/Framework/Algorithms/test/CropToComponentTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -242,7 +242,7 @@ private: numberOfBanks, numbersOfPixelPerBank, 2); } - void doAsssert(Mantid::API::MatrixWorkspace_sptr workspace, + void doAsssert(const Mantid::API::MatrixWorkspace_sptr &workspace, std::vector<Mantid::detid_t> &expectedIDs, size_t expectedNumberOfHistograms) { // Assert diff --git a/Framework/Algorithms/test/CropWorkspaceTest.h b/Framework/Algorithms/test/CropWorkspaceTest.h index 64514b58e9b9419d50c1ce22f51db7f8d2422675..f5ab1f14d02305118681d59f17f93d4507e97503 100644 --- a/Framework/Algorithms/test/CropWorkspaceTest.h +++ b/Framework/Algorithms/test/CropWorkspaceTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -103,7 +103,7 @@ public: TS_ASSERT(!crop.isExecuted()); } - void makeFakeEventWorkspace(std::string wsName) { + void makeFakeEventWorkspace(const std::string &wsName) { // Make an event workspace with 2 events in each bin. EventWorkspace_sptr test_in = WorkspaceCreationHelper::createEventWorkspace(36, 50, 50, 0.0, 2., 2); diff --git a/Framework/Algorithms/test/CrossCorrelateTest.h b/Framework/Algorithms/test/CrossCorrelateTest.h index dae9958ef72d5e720a2ea4186cef45dd8059dfb3..8b60401adffd881de42f2f09cbe373a713cef12e 100644 --- a/Framework/Algorithms/test/CrossCorrelateTest.h +++ b/Framework/Algorithms/test/CrossCorrelateTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -161,7 +161,7 @@ private: // Run the algorithm and do some basic checks. Returns the output workspace. MatrixWorkspace_const_sptr - runAlgorithm(CrossCorrelate &alg, const MatrixWorkspace_const_sptr inWS) { + runAlgorithm(CrossCorrelate &alg, const MatrixWorkspace_const_sptr &inWS) { // run the algorithm TS_ASSERT_THROWS_NOTHING(alg.execute()); TS_ASSERT(alg.isExecuted()); diff --git a/Framework/Algorithms/test/CuboidGaugeVolumeAbsorptionTest.h b/Framework/Algorithms/test/CuboidGaugeVolumeAbsorptionTest.h index 31995383710575da4827ae5050acbe808958b1d1..6411771c1dfb4d5829cc44947ebc9e94de29b554 100644 --- a/Framework/Algorithms/test/CuboidGaugeVolumeAbsorptionTest.h +++ b/Framework/Algorithms/test/CuboidGaugeVolumeAbsorptionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/CylinderAbsorptionTest.h b/Framework/Algorithms/test/CylinderAbsorptionTest.h index c594c3ea089529678d165b561bf34cc8d8830338..ec2b9109b2c57695a387a7f0c534b0054f3b596d 100644 --- a/Framework/Algorithms/test/CylinderAbsorptionTest.h +++ b/Framework/Algorithms/test/CylinderAbsorptionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -305,9 +305,9 @@ private: void configureAbsCommon(Mantid::Algorithms::CylinderAbsorption &alg, MatrixWorkspace_sptr &inputWS, const std::string &outputWSname, - std::string numberOfSlices = "2", - std::string numberOfAnnuli = "2", - std::string cylinderAxis = "0,1,0") { + const std::string &numberOfSlices = "2", + const std::string &numberOfAnnuli = "2", + const std::string &cylinderAxis = "0,1,0") { if (!alg.isInitialized()) alg.initialize(); diff --git a/Framework/Algorithms/test/DeadTimeCorrectionTest.h b/Framework/Algorithms/test/DeadTimeCorrectionTest.h index 554a531f99a914ac7bc78157669b7a0976a660e6..8d17c4e328a2ff8c7837c0470f81933348327d26 100644 --- a/Framework/Algorithms/test/DeadTimeCorrectionTest.h +++ b/Framework/Algorithms/test/DeadTimeCorrectionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/DeleteLogTest.h b/Framework/Algorithms/test/DeleteLogTest.h index 97dc550e626b9a41d03cf85707a12df249821e40..3628b73468260797af4b526a7dd081dd708026c5 100644 --- a/Framework/Algorithms/test/DeleteLogTest.h +++ b/Framework/Algorithms/test/DeleteLogTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/DeleteWorkspaceTest.h b/Framework/Algorithms/test/DeleteWorkspaceTest.h index 5a26440da2a53605d1a0e908e5943af6fce8ef33..bd3d5c4be67546f0fb59ea0a39fd631394a83e23 100644 --- a/Framework/Algorithms/test/DeleteWorkspaceTest.h +++ b/Framework/Algorithms/test/DeleteWorkspaceTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //------------------------------------------------------------------------------ // Includes diff --git a/Framework/Algorithms/test/DeleteWorkspacesTest.h b/Framework/Algorithms/test/DeleteWorkspacesTest.h index f49fc21eb9d9d35b5b21233e8ab586f5f88b607c..99d0d42a5931169cb5a6e27fe9246e2713313696 100644 --- a/Framework/Algorithms/test/DeleteWorkspacesTest.h +++ b/Framework/Algorithms/test/DeleteWorkspacesTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //------------------------------------------------------------------------------ // Includes @@ -118,7 +118,7 @@ public: TS_ASSERT_EQUALS(dataStore.size(), storeSizeAtStart); } - void createAndStoreWorkspace(std::string name, int ylength = 10) { + void createAndStoreWorkspace(const std::string &name, int ylength = 10) { using namespace Mantid::API; using namespace Mantid::DataObjects; diff --git a/Framework/Algorithms/test/DetectorEfficiencyCorTest.h b/Framework/Algorithms/test/DetectorEfficiencyCorTest.h index 9a2bbe26a685f34ad06fa18906b4cf39b2c6fa63..9bf3cae230d0ba3431ad16f87655a3bb3e5d2150 100644 --- a/Framework/Algorithms/test/DetectorEfficiencyCorTest.h +++ b/Framework/Algorithms/test/DetectorEfficiencyCorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -41,7 +41,6 @@ public: WorkspaceCreationHelper::create2DWorkspaceWithFullInstrument(2, 1); dummyWS->getAxis(0)->unit() = Mantid::Kernel::UnitFactory::Instance().create("DeltaE"); - const std::string inputWS = "testInput"; Mantid::Algorithms::DetectorEfficiencyCor corrector; TS_ASSERT_THROWS_NOTHING(corrector.initialize()); diff --git a/Framework/Algorithms/test/DetectorEfficiencyCorUserTest.h b/Framework/Algorithms/test/DetectorEfficiencyCorUserTest.h index d11f3e06967898c6841de94636b126c22a2068fc..beb95b4bb373e085d776b4b942b03865587a969c 100644 --- a/Framework/Algorithms/test/DetectorEfficiencyCorUserTest.h +++ b/Framework/Algorithms/test/DetectorEfficiencyCorUserTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/DetectorEfficiencyVariationTest.h b/Framework/Algorithms/test/DetectorEfficiencyVariationTest.h index 9b0f86a6f730c5d9726e7cefa0190349e1a0005e..28621ed1d278ee8d7a49f2d65b2cd7df63008249 100644 --- a/Framework/Algorithms/test/DetectorEfficiencyVariationTest.h +++ b/Framework/Algorithms/test/DetectorEfficiencyVariationTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/DetectorGridDefinitionTest.h b/Framework/Algorithms/test/DetectorGridDefinitionTest.h index 1c9be8973cbefc64f2fccb7a5472849615796ba0..743031afd3813f034a5a0d86234dbcc23d756755 100644 --- a/Framework/Algorithms/test/DetectorGridDefinitionTest.h +++ b/Framework/Algorithms/test/DetectorGridDefinitionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/DiffractionEventCalibrateDetectorsTest.h b/Framework/Algorithms/test/DiffractionEventCalibrateDetectorsTest.h index a0f88100cdb37695f4c160d5c8a3902174b898df..33b2b892b048ae4d662c436d9e010ae5c8728632 100644 --- a/Framework/Algorithms/test/DiffractionEventCalibrateDetectorsTest.h +++ b/Framework/Algorithms/test/DiffractionEventCalibrateDetectorsTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/DiffractionFocussing2Test.h b/Framework/Algorithms/test/DiffractionFocussing2Test.h index 1224536c23dd754f24a9533222c785f5fea135fb..177dac578ca34ce10404027de8b7370d603288a6 100644 --- a/Framework/Algorithms/test/DiffractionFocussing2Test.h +++ b/Framework/Algorithms/test/DiffractionFocussing2Test.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/DiffractionFocussingTest.h b/Framework/Algorithms/test/DiffractionFocussingTest.h index 30c731df4742335d03edd248e8cb3ea34ff08df7..e88bff98175d8da6d841b0cc06b82a9975f60e7b 100644 --- a/Framework/Algorithms/test/DiffractionFocussingTest.h +++ b/Framework/Algorithms/test/DiffractionFocussingTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/DirectILLTubeBackgroundTest.h b/Framework/Algorithms/test/DirectILLTubeBackgroundTest.h index 15dd44abd160f14ebcd7faa96c3a7db85804267a..bbb2158d58bc73bc975e3fcf4d68c50b5286ad38 100644 --- a/Framework/Algorithms/test/DirectILLTubeBackgroundTest.h +++ b/Framework/Algorithms/test/DirectILLTubeBackgroundTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/EQSANSCorrectFrameTest.h b/Framework/Algorithms/test/EQSANSCorrectFrameTest.h index 99a3be351c39dbb33ce757c059663116a205e457..2492f4f0cfd5c1e014a54ff5e426a9b0010b0560 100644 --- a/Framework/Algorithms/test/EQSANSCorrectFrameTest.h +++ b/Framework/Algorithms/test/EQSANSCorrectFrameTest.h @@ -1,3 +1,9 @@ +// Mantid Repository : https://github.com/mantidproject/mantid +// +// Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS +// SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidAPI/Axis.h" diff --git a/Framework/Algorithms/test/EditInstrumentGeometryTest.h b/Framework/Algorithms/test/EditInstrumentGeometryTest.h index dbd122d976c552ea461d6277a37565f04295407c..25b3d79ee97257da2ed47da555a25ea43221442f 100644 --- a/Framework/Algorithms/test/EditInstrumentGeometryTest.h +++ b/Framework/Algorithms/test/EditInstrumentGeometryTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -158,7 +158,7 @@ public: //---------------------------------------------------------------------------------------------- /** Check detector parameter */ - void checkDetectorParameters(API::MatrixWorkspace_sptr workspace, + void checkDetectorParameters(const API::MatrixWorkspace_sptr &workspace, size_t wsindex, double realr, double realtth, double realphi) { @@ -175,8 +175,8 @@ public: //---------------------------------------------------------------------------------------------- /** Check detector parameter */ - void checkDetectorID(API::MatrixWorkspace_sptr workspace, size_t wsindex, - detid_t detid) { + void checkDetectorID(const API::MatrixWorkspace_sptr &workspace, + size_t wsindex, detid_t detid) { const auto &spectrumInfo = workspace->spectrumInfo(); TS_ASSERT_EQUALS(spectrumInfo.hasUniqueDetector(wsindex), true); diff --git a/Framework/Algorithms/test/ElasticWindowTest.h b/Framework/Algorithms/test/ElasticWindowTest.h index cee4abfa1325adbc623e7e83f383073b64c334ed..65328ac0a40b6cb25a8b9e1d9a197392bb4ce04b 100644 --- a/Framework/Algorithms/test/ElasticWindowTest.h +++ b/Framework/Algorithms/test/ElasticWindowTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -201,7 +201,7 @@ private: * * @param ws Workspace to test */ - void verifyQworkspace(MatrixWorkspace_sptr ws) { + void verifyQworkspace(const MatrixWorkspace_sptr &ws) { std::string unitID = ws->getAxis(0)->unit()->unitID(); TS_ASSERT_EQUALS(unitID, "MomentumTransfer"); } @@ -211,7 +211,7 @@ private: * * @param ws Workspace to test */ - void verifyQ2workspace(MatrixWorkspace_sptr ws) { + void verifyQ2workspace(const MatrixWorkspace_sptr &ws) { std::string unitID = ws->getAxis(0)->unit()->unitID(); TS_ASSERT_EQUALS(unitID, "QSquared"); } diff --git a/Framework/Algorithms/test/EstimateDivergenceTest.h b/Framework/Algorithms/test/EstimateDivergenceTest.h index 601add05f752f156084695f43aed7f26ba3dae4c..c78881221a940104e6585cf155f1df2bce9321c8 100644 --- a/Framework/Algorithms/test/EstimateDivergenceTest.h +++ b/Framework/Algorithms/test/EstimateDivergenceTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/EstimateResolutionDiffractionTest.h b/Framework/Algorithms/test/EstimateResolutionDiffractionTest.h index 16da9e9465f10b899995874dd261490539a89ed9..44aeba83be1fa6d253ee6c4b4399239e5d1745c4 100644 --- a/Framework/Algorithms/test/EstimateResolutionDiffractionTest.h +++ b/Framework/Algorithms/test/EstimateResolutionDiffractionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/ExponentialCorrectionTest.h b/Framework/Algorithms/test/ExponentialCorrectionTest.h index 8a2cba3934d70f3210592a401b26c0d46e629999..b00e5b356fb91dfd3675cbd7ccab0a64d52bef53 100644 --- a/Framework/Algorithms/test/ExponentialCorrectionTest.h +++ b/Framework/Algorithms/test/ExponentialCorrectionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/ExponentialTest.h b/Framework/Algorithms/test/ExponentialTest.h index 47f70c928524a8323681b57b9479ff122103bc34..28eec221b8561c92bbecb9741f7882f4e5cbb823 100644 --- a/Framework/Algorithms/test/ExponentialTest.h +++ b/Framework/Algorithms/test/ExponentialTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -98,8 +98,8 @@ public: private: // loopOrientation 0=Horizontal, 1=Vertical - void checkData(MatrixWorkspace_sptr work_in1, - MatrixWorkspace_sptr work_out1) { + void checkData(const MatrixWorkspace_sptr &work_in1, + const MatrixWorkspace_sptr &work_out1) { for (size_t i = 0; i < work_out1->size(); i++) { double sig1 = @@ -123,7 +123,7 @@ private: } } // loopOrientation 0=Horizontal, 1=Vertical - void setError(MatrixWorkspace_sptr work_in1) { + void setError(const MatrixWorkspace_sptr &work_in1) { for (size_t i = 0; i < work_in1->size(); i++) { double sig1 = diff --git a/Framework/Algorithms/test/ExportTimeSeriesLogTest.h b/Framework/Algorithms/test/ExportTimeSeriesLogTest.h index b3b30a70d7ed5725fc0f174801aab6941bd73113..dd17da85cda13c14fb7afbdcdcc9b31b5fea48c8 100644 --- a/Framework/Algorithms/test/ExportTimeSeriesLogTest.h +++ b/Framework/Algorithms/test/ExportTimeSeriesLogTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/ExtractFFTSpectrumTest.h b/Framework/Algorithms/test/ExtractFFTSpectrumTest.h index 476a56022674384917fa4e8ffd8776f207236fbd..e30b8566899aae3bd747f1d27f8026dd34b64796 100644 --- a/Framework/Algorithms/test/ExtractFFTSpectrumTest.h +++ b/Framework/Algorithms/test/ExtractFFTSpectrumTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/ExtractMaskTest.h b/Framework/Algorithms/test/ExtractMaskTest.h index bded3c90e1dd4c7ad6631619aad1be31d45afa26..33bf6460081c9f3b2e38e6fa144954add847f140 100644 --- a/Framework/Algorithms/test/ExtractMaskTest.h +++ b/Framework/Algorithms/test/ExtractMaskTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -163,8 +163,8 @@ private: return detectorList; } - void doTest(MatrixWorkspace_const_sptr inputWS, - MaskWorkspace_const_sptr outputWS) { + void doTest(const MatrixWorkspace_const_sptr &inputWS, + const MaskWorkspace_const_sptr &outputWS) { TS_ASSERT_EQUALS(outputWS->blocksize(), 1); size_t nOutputHists(outputWS->getNumberHistograms()); TS_ASSERT_EQUALS(nOutputHists, inputWS->getNumberHistograms()); diff --git a/Framework/Algorithms/test/ExtractMaskToTableTest.h b/Framework/Algorithms/test/ExtractMaskToTableTest.h index 5943abcd1b9006900dfb6e4338ed5162c0e0d6da..849542c6cc178e41b3d1722ce337d200819c0a35 100644 --- a/Framework/Algorithms/test/ExtractMaskToTableTest.h +++ b/Framework/Algorithms/test/ExtractMaskToTableTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/ExtractSingleSpectrumTest.h b/Framework/Algorithms/test/ExtractSingleSpectrumTest.h index 1bae564b0416ad3cefb674e81fc644542629b849..467ff4a4f5952ec7afc7dfbd460ce60be7217241 100644 --- a/Framework/Algorithms/test/ExtractSingleSpectrumTest.h +++ b/Framework/Algorithms/test/ExtractSingleSpectrumTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -88,7 +88,7 @@ public: } private: - MatrixWorkspace_sptr runAlgorithm(MatrixWorkspace_sptr inputWS, + MatrixWorkspace_sptr runAlgorithm(const MatrixWorkspace_sptr &inputWS, const int index) { ExtractSingleSpectrum extractor; extractor.initialize(); @@ -106,8 +106,8 @@ private: return extractor.getProperty("OutputWorkspace"); } - void do_Spectrum_Tests(MatrixWorkspace_sptr outputWS, const specnum_t specID, - const detid_t detID) { + void do_Spectrum_Tests(const MatrixWorkspace_sptr &outputWS, + const specnum_t specID, const detid_t detID) { TS_ASSERT_EQUALS(outputWS->getNumberHistograms(), 1); TS_ASSERT_THROWS_NOTHING(outputWS->getSpectrum(0)); const auto &spectrum = outputWS->getSpectrum(0); diff --git a/Framework/Algorithms/test/ExtractSpectra2Test.h b/Framework/Algorithms/test/ExtractSpectra2Test.h index 1bfec7e2c6ea2a63f102187eb09380d331f877d1..0db13fbd567275a4b54a3f8c3512569352f08474 100644 --- a/Framework/Algorithms/test/ExtractSpectra2Test.h +++ b/Framework/Algorithms/test/ExtractSpectra2Test.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/ExtractSpectraTest.h b/Framework/Algorithms/test/ExtractSpectraTest.h index 54a8ea8c7059ab23d42991d40585b8b82a55011c..25c661dcaea660bd067781f9f0dfbbe62e892cb0 100644 --- a/Framework/Algorithms/test/ExtractSpectraTest.h +++ b/Framework/Algorithms/test/ExtractSpectraTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -544,7 +544,7 @@ private: } MatrixWorkspace_sptr - createInputWithDetectors(std::string workspaceType) const { + createInputWithDetectors(const std::string &workspaceType) const { MatrixWorkspace_sptr ws; // Set the type of underlying workspace diff --git a/Framework/Algorithms/test/ExtractUnmaskedSpectraTest.h b/Framework/Algorithms/test/ExtractUnmaskedSpectraTest.h index dda033d2688b64a80e6de757d3816a389c258832..769c8d1fef74d18c71e0a4720a9e3ff48f49ff0a 100644 --- a/Framework/Algorithms/test/ExtractUnmaskedSpectraTest.h +++ b/Framework/Algorithms/test/ExtractUnmaskedSpectraTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -133,7 +133,7 @@ private: } Mantid::API::MatrixWorkspace_sptr - createMask(Mantid::API::MatrixWorkspace_sptr inputWS) { + createMask(const Mantid::API::MatrixWorkspace_sptr &inputWS) { auto maskWS = Mantid::DataObjects::MaskWorkspace_sptr( new Mantid::DataObjects::MaskWorkspace(inputWS)); size_t n = inputWS->getNumberHistograms(); @@ -146,8 +146,8 @@ private: } Mantid::API::MatrixWorkspace_sptr - runAlgorithm(Mantid::API::MatrixWorkspace_sptr inputWS, - Mantid::API::MatrixWorkspace_sptr maskedWS = + runAlgorithm(const Mantid::API::MatrixWorkspace_sptr &inputWS, + const Mantid::API::MatrixWorkspace_sptr &maskedWS = Mantid::API::MatrixWorkspace_sptr()) { ExtractUnmaskedSpectra alg; alg.setChild(true); diff --git a/Framework/Algorithms/test/FFTDerivativeTest.h b/Framework/Algorithms/test/FFTDerivativeTest.h index fc73f809498d962501372235bf1518ec2081b70c..721f5f5bb2bbdc8b0e87fbc29b79d193965a709b 100644 --- a/Framework/Algorithms/test/FFTDerivativeTest.h +++ b/Framework/Algorithms/test/FFTDerivativeTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/FFTSmooth2Test.h b/Framework/Algorithms/test/FFTSmooth2Test.h index 4087ca7b22fc9186547c440fe01f73a212c66a04..ffae4ce2e45f2d8b32393fe359b2adb78fffa89e 100644 --- a/Framework/Algorithms/test/FFTSmooth2Test.h +++ b/Framework/Algorithms/test/FFTSmooth2Test.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -169,8 +169,9 @@ public: } //------------------------------------------------------------------------------------------------- - void performTest(bool event, std::string filter, std::string params, - bool AllSpectra, int WorkspaceIndex, bool inPlace = false) { + void performTest(bool event, const std::string &filter, + const std::string ¶ms, bool AllSpectra, + int WorkspaceIndex, bool inPlace = false) { MatrixWorkspace_sptr ws1, out; int numPixels = 10; int numBins = 20; @@ -276,9 +277,11 @@ public: } if (!AllSpectra) { + bool allSpectraGtZero = false; + for (int WorkspaceIndex = 0; WorkspaceIndex < 10; WorkspaceIndex++) { - performTest((event > 0), filter, params, (AllSpectra > 0), + performTest((event > 0), filter, params, allSpectraGtZero, WorkspaceIndex, (inPlace > 0)); } } else { diff --git a/Framework/Algorithms/test/FFTTest.h b/Framework/Algorithms/test/FFTTest.h index 0f37c590ea057a4b5810e9520936dd60d1a0d294..904716b6be11c5c0dbe7fe5c09f5e9b75ca2a8f6 100644 --- a/Framework/Algorithms/test/FFTTest.h +++ b/Framework/Algorithms/test/FFTTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -717,7 +717,7 @@ public: } private: - MatrixWorkspace_sptr doRebin(MatrixWorkspace_sptr inputWS, + MatrixWorkspace_sptr doRebin(const MatrixWorkspace_sptr &inputWS, const std::string ¶ms) { auto rebin = FrameworkManager::Instance().createAlgorithm("Rebin"); rebin->initialize(); @@ -729,8 +729,8 @@ private: return rebin->getProperty("OutputWorkspace"); } - MatrixWorkspace_sptr doFFT(MatrixWorkspace_sptr inputWS, const bool complex, - const bool phaseShift) { + MatrixWorkspace_sptr doFFT(const MatrixWorkspace_sptr &inputWS, + const bool complex, const bool phaseShift) { auto fft = FrameworkManager::Instance().createAlgorithm("FFT"); fft->initialize(); fft->setChild(true); @@ -747,7 +747,7 @@ private: return fft->getProperty("OutputWorkspace"); } - void doPhaseTest(MatrixWorkspace_sptr inputWS, bool complex) { + void doPhaseTest(const MatrixWorkspace_sptr &inputWS, bool complex) { // Offset the input workspace const auto offsetWS = offsetWorkspace(inputWS); @@ -803,7 +803,7 @@ private: return ws; } - MatrixWorkspace_sptr offsetWorkspace(MatrixWorkspace_sptr workspace) { + MatrixWorkspace_sptr offsetWorkspace(const MatrixWorkspace_sptr &workspace) { auto scaleX = FrameworkManager::Instance().createAlgorithm("ScaleX"); scaleX->initialize(); scaleX->setChild(true); @@ -936,7 +936,7 @@ private: return create->getProperty("OutputWorkspace"); } - MatrixWorkspace_sptr doCrop(MatrixWorkspace_sptr inputWS, double lower, + MatrixWorkspace_sptr doCrop(const MatrixWorkspace_sptr &inputWS, double lower, double higher) { auto crop = FrameworkManager::Instance().createAlgorithm("CropWorkspace"); crop->initialize(); diff --git a/Framework/Algorithms/test/FilterBadPulsesTest.h b/Framework/Algorithms/test/FilterBadPulsesTest.h index fa8fba2ae852ea34c058d22df16f6b5b0f489c20..469828fa8610591bdacd998c30b59e6e1eb799a3 100644 --- a/Framework/Algorithms/test/FilterBadPulsesTest.h +++ b/Framework/Algorithms/test/FilterBadPulsesTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/FilterByLogValueTest.h b/Framework/Algorithms/test/FilterByLogValueTest.h index 03d6b7e72e19c42a8e0ca3d8cedc51e32c9bb4a5..25b241d1021ec87d7bdea75383c9eb30de7dbafd 100644 --- a/Framework/Algorithms/test/FilterByLogValueTest.h +++ b/Framework/Algorithms/test/FilterByLogValueTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -174,7 +174,7 @@ public: * @param do_in_place * @param PulseFilter :: PulseFilter parameter */ - void do_test_fake(std::string log_name, double min, double max, + void do_test_fake(const std::string &log_name, double min, double max, int seconds_kept, bool add_proton_charge = true, bool do_in_place = false, bool PulseFilter = false) { EventWorkspace_sptr ew = createInputWS(add_proton_charge); diff --git a/Framework/Algorithms/test/FilterByTime2Test.h b/Framework/Algorithms/test/FilterByTime2Test.h index 5aa8f2e888ebce4e2f4a7fabe141b046eaa2f71d..1d141e029e29fe0a8829471b97e0baccb46181a6 100644 --- a/Framework/Algorithms/test/FilterByTime2Test.h +++ b/Framework/Algorithms/test/FilterByTime2Test.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/FilterByTimeTest.h b/Framework/Algorithms/test/FilterByTimeTest.h index 57dbbe67911c65bc7f49e93b249d38126426cf6c..556ae083d6a829b448697f7ddf8cffa7618c8219 100644 --- a/Framework/Algorithms/test/FilterByTimeTest.h +++ b/Framework/Algorithms/test/FilterByTimeTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /* * FilterByTimeTest.h diff --git a/Framework/Algorithms/test/FilterByXValueTest.h b/Framework/Algorithms/test/FilterByXValueTest.h index e370568a5a31d13e610499b79dfb91574ed10cc4..4e3874fe870fa455491b992fa553bbd11d37ff1c 100644 --- a/Framework/Algorithms/test/FilterByXValueTest.h +++ b/Framework/Algorithms/test/FilterByXValueTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/FilterEventsTest.h b/Framework/Algorithms/test/FilterEventsTest.h index 49f52f6a810978d50b211f3747f43901a4ed7456..b657f88b3d53ff936be937a54499a7fd232a71d4 100644 --- a/Framework/Algorithms/test/FilterEventsTest.h +++ b/Framework/Algorithms/test/FilterEventsTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -1753,7 +1753,8 @@ public: //---------------------------------------------------------------------------------------------- /** Create the time correction table */ - TableWorkspace_sptr createTimeCorrectionTable(MatrixWorkspace_sptr inpws) { + TableWorkspace_sptr + createTimeCorrectionTable(const MatrixWorkspace_sptr &inpws) { // 1. Generate an empty table auto corrtable = boost::make_shared<TableWorkspace>(); corrtable->addColumn("int", "DetectorID"); diff --git a/Framework/Algorithms/test/FindCenterOfMassPosition2Test.h b/Framework/Algorithms/test/FindCenterOfMassPosition2Test.h index 6e37ecf57ede8f7ab369fb2a1944e48e74a4a6bb..b914e7e6c0ff804c0fd79d320df11ec938498118 100644 --- a/Framework/Algorithms/test/FindCenterOfMassPosition2Test.h +++ b/Framework/Algorithms/test/FindCenterOfMassPosition2Test.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -58,7 +58,7 @@ public: // Set tube extrema to special values if (iy == 0 || iy == SANSInstrumentCreationHelper::nBins - 1) Y[0] = - iy % 2 ? std::nan("") : std::numeric_limits<double>::infinity(); + (iy % 2) ? std::nan("") : std::numeric_limits<double>::infinity(); E[0] = 1; } } diff --git a/Framework/Algorithms/test/FindCenterOfMassPositionTest.h b/Framework/Algorithms/test/FindCenterOfMassPositionTest.h index af03f01bfff31fd98640e43ab564a758c071bb41..5643624633b92e03784472025df7aa7eaa59b42a 100644 --- a/Framework/Algorithms/test/FindCenterOfMassPositionTest.h +++ b/Framework/Algorithms/test/FindCenterOfMassPositionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/FindDeadDetectorsTest.h b/Framework/Algorithms/test/FindDeadDetectorsTest.h index 94fcf05b92d947ad18314eccec445e4b4c7992c1..4a4f72c70c85c0255e7880b56bc2e321bdcdc553 100644 --- a/Framework/Algorithms/test/FindDeadDetectorsTest.h +++ b/Framework/Algorithms/test/FindDeadDetectorsTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/FindDetectorsOutsideLimitsTest.h b/Framework/Algorithms/test/FindDetectorsOutsideLimitsTest.h index 19b37f0a5e0360c460f0632792db4cf79aa09e9f..af035407a1c966eeb7fba3d56da8c7ea24da2f26 100644 --- a/Framework/Algorithms/test/FindDetectorsOutsideLimitsTest.h +++ b/Framework/Algorithms/test/FindDetectorsOutsideLimitsTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/FindEPPTest.h b/Framework/Algorithms/test/FindEPPTest.h index e93c5706f213fc18a9f86ce568aa7768e8dbf79e..a84315c99f436a8c8650e61e64b3ee1b58265c3f 100644 --- a/Framework/Algorithms/test/FindEPPTest.h +++ b/Framework/Algorithms/test/FindEPPTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -223,7 +223,7 @@ public: } private: - void _check_table(ITableWorkspace_sptr ws, size_t nSpectra) { + void _check_table(const ITableWorkspace_sptr &ws, size_t nSpectra) { TS_ASSERT_EQUALS(ws->rowCount(), nSpectra); TS_ASSERT_EQUALS(ws->columnCount(), 9); TS_ASSERT_EQUALS(ws->getColumnNames(), m_columnNames); diff --git a/Framework/Algorithms/test/FindPeakBackgroundTest.h b/Framework/Algorithms/test/FindPeakBackgroundTest.h index 6b0d23ad3c758287f4ae3390a458df9dc936ef1b..23723d314614b365bbe0651da1e9b4844a6885c5 100644 --- a/Framework/Algorithms/test/FindPeakBackgroundTest.h +++ b/Framework/Algorithms/test/FindPeakBackgroundTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/FindPeaksTest.h b/Framework/Algorithms/test/FindPeaksTest.h index 7d1c41954f2aef08f49e4c2bca6309e7d1f46163..eef5f327f104d5963b1e018ecfaf27eaf46aca58 100644 --- a/Framework/Algorithms/test/FindPeaksTest.h +++ b/Framework/Algorithms/test/FindPeaksTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -190,7 +190,7 @@ public: /** Parse a row in output parameter tableworkspace to a string/double * parameter name/value map */ - void getParameterMap(TableWorkspace_sptr tablews, size_t rowindex, + void getParameterMap(const TableWorkspace_sptr &tablews, size_t rowindex, map<string, double> ¶mmap) { parammap.clear(); diff --git a/Framework/Algorithms/test/FindReflectometryLines2Test.h b/Framework/Algorithms/test/FindReflectometryLines2Test.h index eb32555d1767c19d39957b09ba2a39d3bd38cf98..1872bd27cd491d4e4290c45e2cbe5560156e9662 100644 --- a/Framework/Algorithms/test/FindReflectometryLines2Test.h +++ b/Framework/Algorithms/test/FindReflectometryLines2Test.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/FitPeakTest.h b/Framework/Algorithms/test/FitPeakTest.h index bb54eddfa22f1fd3828a55f9d76f4f5e02b0a85c..836e206fadd5cbd3fe826b594b598366076e08d3 100644 --- a/Framework/Algorithms/test/FitPeakTest.h +++ b/Framework/Algorithms/test/FitPeakTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -358,8 +358,6 @@ public: /** Generate a workspace contains PG3_4866 5-th peak */ MatrixWorkspace_sptr gen_PG3DiamondData() { - vector<double> vecx, vecy, vece; - size_t NVectors = 1; size_t size = 53; MatrixWorkspace_sptr ws = boost::dynamic_pointer_cast<MatrixWorkspace>( diff --git a/Framework/Algorithms/test/FitPeaksTest.h b/Framework/Algorithms/test/FitPeaksTest.h index a4a5ba8b5bbe872102a5179122bff4518313cdcd..f4849daa7e74041dc0f17b229c559538138714aa 100644 --- a/Framework/Algorithms/test/FitPeaksTest.h +++ b/Framework/Algorithms/test/FitPeaksTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -411,7 +411,6 @@ public: // std::string input_ws_name = loadVulcanHighAngleData(); // Generate peak and background parameters - std::vector<string> peakparnames{"Mixing"}; std::vector<double> peakparvalues{0.5}; // Initialize FitPeak diff --git a/Framework/Algorithms/test/FixGSASInstrumentFileTest.h b/Framework/Algorithms/test/FixGSASInstrumentFileTest.h index f5a6b9d3dc7446d3b30c1f5d10f3ee3dd9d5b2d0..7d5a650d5d2f4e34eb5b4b195c538fba408f2685 100644 --- a/Framework/Algorithms/test/FixGSASInstrumentFileTest.h +++ b/Framework/Algorithms/test/FixGSASInstrumentFileTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -67,7 +67,7 @@ public: file.remove(); } - void createFaultFile(std::string prmfilename) { + void createFaultFile(const std::string &prmfilename) { ofstream ofile; ofile.open(prmfilename.c_str(), ios::out); ofile << " " diff --git a/Framework/Algorithms/test/FlatPlateAbsorptionTest.h b/Framework/Algorithms/test/FlatPlateAbsorptionTest.h index 699d3bdb25b85579cf6a391605a807b937dbf76b..8e5b2b86fe8db5d456bc49fca450e7ed81268a27 100644 --- a/Framework/Algorithms/test/FlatPlateAbsorptionTest.h +++ b/Framework/Algorithms/test/FlatPlateAbsorptionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/GeneralisedSecondDifferenceTest.h b/Framework/Algorithms/test/GeneralisedSecondDifferenceTest.h index 367531f6e99402f3031c9b0a72e92b20dc913910..b28789a4f96ff2c27af28936d2908b5c91a6ce38 100644 --- a/Framework/Algorithms/test/GeneralisedSecondDifferenceTest.h +++ b/Framework/Algorithms/test/GeneralisedSecondDifferenceTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/GenerateEventsFilterTest.h b/Framework/Algorithms/test/GenerateEventsFilterTest.h index 13a8a7116f6d8e7ce02f6d93ff112739caa9eb96..8c6cdc750d876bed66921e027a01c3dd8e2e1e50 100644 --- a/Framework/Algorithms/test/GenerateEventsFilterTest.h +++ b/Framework/Algorithms/test/GenerateEventsFilterTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -1145,7 +1145,7 @@ public: * SplittingInterval objects */ size_t convertMatrixSplitterToSplitters( - API::MatrixWorkspace_const_sptr matrixws, + const API::MatrixWorkspace_const_sptr &matrixws, std::vector<Kernel::SplittingInterval> &splitters) { splitters.clear(); size_t numsplitters = 0; diff --git a/Framework/Algorithms/test/GenerateIPythonNotebookTest.h b/Framework/Algorithms/test/GenerateIPythonNotebookTest.h index d8c7a656e87e1d27aab4c492118d3eca49ba85ef..a0b680cf115f91ea659217a8452a068221df836b 100644 --- a/Framework/Algorithms/test/GenerateIPythonNotebookTest.h +++ b/Framework/Algorithms/test/GenerateIPythonNotebookTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/GeneratePeaksTest.h b/Framework/Algorithms/test/GeneratePeaksTest.h index 90638ed6dc00677b174a645b5b8a0d88db4e4a33..d245ab71be2cc819275a480fbfe6cf60f925cfc2 100644 --- a/Framework/Algorithms/test/GeneratePeaksTest.h +++ b/Framework/Algorithms/test/GeneratePeaksTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/GeneratePythonScriptTest.h b/Framework/Algorithms/test/GeneratePythonScriptTest.h index 7ce29dc2ebf1ddec60647c2335e866062d81bb2b..ca76181b7877c56337e48e562604360a235d534c 100644 --- a/Framework/Algorithms/test/GeneratePythonScriptTest.h +++ b/Framework/Algorithms/test/GeneratePythonScriptTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/GetAllEiTest.h b/Framework/Algorithms/test/GetAllEiTest.h index 93a2ada192cc1c8c968c4746853e721e84742683..108f38febb734e6a6d62a0c567d79f0f7c1b6506 100644 --- a/Framework/Algorithms/test/GetAllEiTest.h +++ b/Framework/Algorithms/test/GetAllEiTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -503,7 +503,7 @@ public: TS_ASSERT_DELTA(zeros[2], 7.85, 1.e-3); } void test_binRanges() { - std::vector<size_t> bin_min, bin_max, zeros; + std::vector<size_t> bin_min, bin_max; // Index 0 1 2 3 4 5 6 7 8 9 10 11 12 13 double debin[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15}; std::vector<double> ebin(debin, debin + sizeof(debin) / sizeof(double)); diff --git a/Framework/Algorithms/test/GetDetOffsetsMultiPeaksTest.h b/Framework/Algorithms/test/GetDetOffsetsMultiPeaksTest.h index 8bb86ed5c27e3a9c8e3dfd689fa7c548a0d695fa..97c55f0ee4135394c0f9808dc7689e8c789d5dfc 100644 --- a/Framework/Algorithms/test/GetDetOffsetsMultiPeaksTest.h +++ b/Framework/Algorithms/test/GetDetOffsetsMultiPeaksTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -430,7 +430,7 @@ public: //---------------------------------------------------------------------------------------------- /** Generate noisy data in a workspace */ - void generateNoisyData(MatrixWorkspace_sptr WS) { + void generateNoisyData(const MatrixWorkspace_sptr &WS) { auto &Y = WS->mutableY(0); Y.assign(Y.size(), static_cast<double>(rand() % 5)); diff --git a/Framework/Algorithms/test/GetDetectorOffsetsTest.h b/Framework/Algorithms/test/GetDetectorOffsetsTest.h index 153b9341466b3d5532b62e152bc553e0267ba97b..57cd673fbae9f4d577ece66807e33c2a19e15b35 100644 --- a/Framework/Algorithms/test/GetDetectorOffsetsTest.h +++ b/Framework/Algorithms/test/GetDetectorOffsetsTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/GetEiMonDet3Test.h b/Framework/Algorithms/test/GetEiMonDet3Test.h index d90600ac8785b0061d7df595dccf913edfe2c171..111ea70a6a4ae3f542210aca8e1260339f611469 100644 --- a/Framework/Algorithms/test/GetEiMonDet3Test.h +++ b/Framework/Algorithms/test/GetEiMonDet3Test.h @@ -1,13 +1,15 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include <cxxtest/TestSuite.h> +#include <utility> + #include "MantidAPI/Axis.h" #include "MantidAPI/FrameworkManager.h" #include "MantidAlgorithms/ExtractSpectra2.h" @@ -157,7 +159,7 @@ public: } private: - static void attachInstrument(MatrixWorkspace_sptr targetWs) { + static void attachInstrument(const MatrixWorkspace_sptr &targetWs) { // The reference frame used by createInstrumentForWorkspaceWithDistances // is left handed with y pointing up, x along beam. @@ -170,8 +172,8 @@ private: detectorRs.emplace_back(-MONITOR_DISTANCE, 0., 0.); // Add more detectors --- these should be treated as the real ones. detectorRs.emplace_back(0., 0., DETECTOR_DISTANCE); - createInstrumentForWorkspaceWithDistances(targetWs, sampleR, sourceR, - detectorRs); + createInstrumentForWorkspaceWithDistances(std::move(targetWs), sampleR, + sourceR, detectorRs); } static MatrixWorkspace_sptr @@ -215,7 +217,8 @@ private: } // Mininum setup for GetEiMonDet3. - static void setupSimple(MatrixWorkspace_sptr ws, GetEiMonDet3 &algorithm) { + static void setupSimple(const MatrixWorkspace_sptr &ws, + GetEiMonDet3 &algorithm) { algorithm.setRethrows(true); TS_ASSERT_THROWS_NOTHING(algorithm.initialize()) TS_ASSERT(algorithm.isInitialized()) diff --git a/Framework/Algorithms/test/GetEiTest.h b/Framework/Algorithms/test/GetEiTest.h index 1c5d0e6ef69b4581909ff3bc9a81cabd39ec031f..94a72b5f01f6642b0d1ddeb1864dac1e93a45f89 100644 --- a/Framework/Algorithms/test/GetEiTest.h +++ b/Framework/Algorithms/test/GetEiTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/GetEiV1Test.h b/Framework/Algorithms/test/GetEiV1Test.h index d2c47a3f3d41b59d72e02391d24f54a9b550b570..a4fc09624bb6678da1ceecbe9ddc831f9c5218e7 100644 --- a/Framework/Algorithms/test/GetEiV1Test.h +++ b/Framework/Algorithms/test/GetEiV1Test.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/GetQsInQENSDataTest.h b/Framework/Algorithms/test/GetQsInQENSDataTest.h index 3e6cb6904f3a194e660d3c380dc48557f61d5e1f..4cb4a0559fc51b88c668060e489fd654df93924f 100644 --- a/Framework/Algorithms/test/GetQsInQENSDataTest.h +++ b/Framework/Algorithms/test/GetQsInQENSDataTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/GetTimeSeriesLogInformationTest.h b/Framework/Algorithms/test/GetTimeSeriesLogInformationTest.h index 9253887d0465cb6a0287c8d2591984afb5ddaa53..ae341ce45a2748e2f4828e37b026fc7b44e2f9d6 100644 --- a/Framework/Algorithms/test/GetTimeSeriesLogInformationTest.h +++ b/Framework/Algorithms/test/GetTimeSeriesLogInformationTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/GroupToXResolutionTest.h b/Framework/Algorithms/test/GroupToXResolutionTest.h index e769657656fbcecbd6fb338007adec11002a9783..916e74e8cc39952b7e082237b6f97aad9f5a60fb 100644 --- a/Framework/Algorithms/test/GroupToXResolutionTest.h +++ b/Framework/Algorithms/test/GroupToXResolutionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/GroupWorkspacesTest.h b/Framework/Algorithms/test/GroupWorkspacesTest.h index 35853f74916062f9f2c222134c6520f9da53560c..6e75389351d5f7e48bc88de4c9acc6d356ca9c9e 100644 --- a/Framework/Algorithms/test/GroupWorkspacesTest.h +++ b/Framework/Algorithms/test/GroupWorkspacesTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/HRPDSlabCanAbsorptionTest.h b/Framework/Algorithms/test/HRPDSlabCanAbsorptionTest.h index 0cbcebe58bedcf5ee20e13bfcf3bc7c25e3d34a7..00941037e75cbb1bea691154a486100e87d4ba9a 100644 --- a/Framework/Algorithms/test/HRPDSlabCanAbsorptionTest.h +++ b/Framework/Algorithms/test/HRPDSlabCanAbsorptionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/He3TubeEfficiencyTest.h b/Framework/Algorithms/test/He3TubeEfficiencyTest.h index 4d7263d25eaec316f8ef1063325d538227db8c3e..6db24d8af3fc433346fc81a4095b1ec9cd903c1a 100644 --- a/Framework/Algorithms/test/He3TubeEfficiencyTest.h +++ b/Framework/Algorithms/test/He3TubeEfficiencyTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -30,7 +30,7 @@ using Mantid::HistogramData::Counts; using Mantid::HistogramData::CountStandardDeviations; namespace He3TubeEffeciencyHelper { -void createWorkspace2DInADS(const std::string inputWS) { +void createWorkspace2DInADS(const std::string &inputWS) { const int nspecs(4); const int nbins(5); @@ -58,7 +58,7 @@ void createWorkspace2DInADS(const std::string inputWS) { loader.execute(); } -void createEventWorkspaceInADS(const std::string inputEvWS) { +void createEventWorkspaceInADS(const std::string &inputEvWS) { EventWorkspace_sptr event = WorkspaceCreationHelper::createEventWorkspace(4, 5, 5, 0, 0.9, 3, 0); event->getAxis(0)->unit() = UnitFactory::Instance().create("Wavelength"); diff --git a/Framework/Algorithms/test/HyspecScharpfCorrectionTest.h b/Framework/Algorithms/test/HyspecScharpfCorrectionTest.h index 540340e0e8365c3f737a1e50ccbad6e281afc2d7..ac00d09f5758bc0f925127f0403d58190bd52c09 100644 --- a/Framework/Algorithms/test/HyspecScharpfCorrectionTest.h +++ b/Framework/Algorithms/test/HyspecScharpfCorrectionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/IQTransformTest.h b/Framework/Algorithms/test/IQTransformTest.h index a4cbf64abbc2fc4453818a69770c3202c1d47001..52492abaebee5ea11a74291322d1ae3663577b2b 100644 --- a/Framework/Algorithms/test/IQTransformTest.h +++ b/Framework/Algorithms/test/IQTransformTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/IdentifyNoisyDetectorsTest.h b/Framework/Algorithms/test/IdentifyNoisyDetectorsTest.h index 5a5910d911b767f4f263fe8ccda0e434451b2c55..72ad59f50915bf01930169291db9b3a2e6b6e059 100644 --- a/Framework/Algorithms/test/IdentifyNoisyDetectorsTest.h +++ b/Framework/Algorithms/test/IdentifyNoisyDetectorsTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/IndirectFitDataCreationHelperTest.h b/Framework/Algorithms/test/IndirectFitDataCreationHelperTest.h index e833e10757c8b079ed738371fb1aa41148412e51..d4fc9f315599719e67e44dbdb1c9c3f21eb6eb22 100644 --- a/Framework/Algorithms/test/IndirectFitDataCreationHelperTest.h +++ b/Framework/Algorithms/test/IndirectFitDataCreationHelperTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -24,7 +24,7 @@ std::vector<std::string> getTextAxisLabels() { std::vector<double> getNumericAxisLabels() { return {2.2, 3.3, 4.4}; } void storeWorkspaceInADS(std::string const &workspaceName, - MatrixWorkspace_sptr workspace) { + const MatrixWorkspace_sptr &workspace) { SetUpADSWithWorkspace ads(workspaceName, workspace); } diff --git a/Framework/Algorithms/test/IntegrateByComponentTest.h b/Framework/Algorithms/test/IntegrateByComponentTest.h index 7bd415d75f7ea3da33a61513c951f5164a77064c..efb8aa33fce4686639b6525cee86823dcecce109 100644 --- a/Framework/Algorithms/test/IntegrateByComponentTest.h +++ b/Framework/Algorithms/test/IntegrateByComponentTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -240,7 +240,7 @@ public: } private: - void ABCtestWorkspace(std::string inputWSname, bool mask) { + void ABCtestWorkspace(const std::string &inputWSname, bool mask) { int nSpectra(12); Workspace2D_sptr ws2D = WorkspaceCreationHelper::create2DWorkspaceWhereYIsWorkspaceIndex( diff --git a/Framework/Algorithms/test/IntegrateEPPTest.h b/Framework/Algorithms/test/IntegrateEPPTest.h index 2ddbb9e95a830cf45a0d5dcf5eb7b5bbb8f11f3e..3b5acf673a4fd4faed414b4ee896590631dd077a 100644 --- a/Framework/Algorithms/test/IntegrateEPPTest.h +++ b/Framework/Algorithms/test/IntegrateEPPTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/IntegrationTest.h b/Framework/Algorithms/test/IntegrationTest.h index f6db7b52c18128b9d588b3dd75f727055950a062..e99316d0e09a15906a1f0558b9652a4745136661 100644 --- a/Framework/Algorithms/test/IntegrationTest.h +++ b/Framework/Algorithms/test/IntegrationTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -166,7 +166,7 @@ public: assertRangeWithPartialBins(input); } - void doTestEvent(std::string inName, std::string outName, + void doTestEvent(const std::string &inName, const std::string &outName, int StartWorkspaceIndex, int EndWorkspaceIndex) { int numPixels = 100; int numBins = 50; @@ -229,8 +229,8 @@ public: doTestEvent("inWS", "inWS", 10, 29); } - void doTestRebinned(const std::string RangeLower, - const std::string RangeUpper, + void doTestRebinned(const std::string &RangeLower, + const std::string &RangeUpper, const int StartWorkspaceIndex, const int EndWorkspaceIndex, const bool IncludePartialBins, const int expectedNumHists, @@ -290,7 +290,7 @@ public: doTestRebinned("-1.5", "1.75", 0, 3, true, 4, truth); } - void makeRealBinBoundariesWorkspace(const std::string inWsName) { + void makeRealBinBoundariesWorkspace(const std::string &inWsName) { const unsigned int lenX = 11, lenY = 10, lenE = lenY; Workspace_sptr wsAsWs = @@ -326,9 +326,9 @@ public: AnalysisDataService::Instance().add(inWsName, ws); } - void doTestRealBinBoundaries(const std::string inWsName, - const std::string rangeLower, - const std::string rangeUpper, + void doTestRealBinBoundaries(const std::string &inWsName, + const std::string &rangeLower, + const std::string &rangeUpper, const double expectedVal, const bool checkRanges = false, const bool IncPartialBins = false) { @@ -707,7 +707,7 @@ public: } template <typename F> - void wsBoundsTest(std::string workspace, int startIndex, int endIndex, + void wsBoundsTest(const std::string &workspace, int startIndex, int endIndex, F boundsAssert) { MatrixWorkspace_sptr input; TS_ASSERT_THROWS_NOTHING( @@ -732,8 +732,9 @@ public: } void testStartWsIndexOutOfBounds() { - auto boundsAssert = [](MatrixWorkspace_sptr, MatrixWorkspace_sptr output, - int, int endIndex) { + auto boundsAssert = [](const MatrixWorkspace_sptr &, + const MatrixWorkspace_sptr &output, int, + int endIndex) { TS_ASSERT_EQUALS(output->getNumberHistograms(), endIndex + 1); }; @@ -741,8 +742,9 @@ public: } void testStartWSIndexGreaterThanEnd() { - auto boundsAssert = [](MatrixWorkspace_sptr input, - MatrixWorkspace_sptr output, int startIndex, int) { + auto boundsAssert = [](const MatrixWorkspace_sptr &input, + const MatrixWorkspace_sptr &output, int startIndex, + int) { TS_ASSERT_EQUALS(output->getNumberHistograms(), input->getNumberHistograms() - startIndex); }; @@ -751,8 +753,8 @@ public: } void testStartWSIndexEqualsEnd() { - auto boundsAssert = [](MatrixWorkspace_sptr, MatrixWorkspace_sptr output, - int, int) { + auto boundsAssert = [](const MatrixWorkspace_sptr &, + const MatrixWorkspace_sptr &output, int, int) { TS_ASSERT_EQUALS(output->getNumberHistograms(), 1); }; @@ -780,7 +782,7 @@ public: } private: - void assertRangeWithPartialBins(Workspace_sptr input) { + void assertRangeWithPartialBins(const Workspace_sptr &input) { Integration alg; alg.setRethrows(false); TS_ASSERT_THROWS_NOTHING(alg.initialize()); diff --git a/Framework/Algorithms/test/InterpolatingRebinTest.h b/Framework/Algorithms/test/InterpolatingRebinTest.h index 31c434b62c11f9e0271928076c2cf3ef1149c871..788240d137a3a288b64bcd04860c613c571a5fe9 100644 --- a/Framework/Algorithms/test/InterpolatingRebinTest.h +++ b/Framework/Algorithms/test/InterpolatingRebinTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/InterpolationOptionTest.h b/Framework/Algorithms/test/InterpolationOptionTest.h index 606d09ce86f2cc167264289a069dec1841cb0bf5..9201eda9291e53c5a3537543fbdd6e9ea4372a05 100644 --- a/Framework/Algorithms/test/InterpolationOptionTest.h +++ b/Framework/Algorithms/test/InterpolationOptionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/InvertMaskTest.h b/Framework/Algorithms/test/InvertMaskTest.h index 8f09d08a9aeb6a62c74f6b30342abd58bab9df44..13a86f52ab8ed7d027fe2780983ca20906b34ca8 100644 --- a/Framework/Algorithms/test/InvertMaskTest.h +++ b/Framework/Algorithms/test/InvertMaskTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/LineProfileTest.h b/Framework/Algorithms/test/LineProfileTest.h index 314c6d2c87bb0dc7d39eba08205daa25f3c73304..61fda4391b0f455b5a6a7c34919b96f61510610f 100644 --- a/Framework/Algorithms/test/LineProfileTest.h +++ b/Framework/Algorithms/test/LineProfileTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -568,9 +568,9 @@ public: TS_ASSERT_EQUALS(axis->getMax(), edges.back()) const auto binHeight = axis->getMax() - axis->getMin(); TS_ASSERT_EQUALS(outputWS->getNumberHistograms(), 1) - const auto &Xs = outputWS->x(0); + // cppcheck-suppress unreadVariable const std::vector<double> profilePoints{{1., 2., 3., 4.}}; - TS_ASSERT_EQUALS(Xs.rawData(), profilePoints) + TS_ASSERT_EQUALS(outputWS->x(0).rawData(), profilePoints) const auto &Ys = outputWS->y(0); const auto horizontalIntegral = (3. * 0.1 + 2. * 1. + 1. * 10.) / binHeight; for (const auto y : Ys) { @@ -584,9 +584,9 @@ public: } private: - MatrixWorkspace_sptr profileOverTwoSpectra(MatrixWorkspace_sptr inputWS, - const int start, const int end, - const std::string &mode) { + MatrixWorkspace_sptr + profileOverTwoSpectra(const MatrixWorkspace_sptr &inputWS, const int start, + const int end, const std::string &mode) { LineProfile alg; // Don't put output in ADS by default alg.setChild(true); diff --git a/Framework/Algorithms/test/LogarithmTest.h b/Framework/Algorithms/test/LogarithmTest.h index cd8271c444054dd050c35a2a87e5894ed2b08f7d..9bdedd65ea793ed0c99bc97cb30d469e9fe96382 100644 --- a/Framework/Algorithms/test/LogarithmTest.h +++ b/Framework/Algorithms/test/LogarithmTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/LorentzCorrectionTest.h b/Framework/Algorithms/test/LorentzCorrectionTest.h index 11760cca5055128c3ba2f3a2c034a70c6ac2b339..2b35b0fba4176de89e7c681956e448a33798ce55 100644 --- a/Framework/Algorithms/test/LorentzCorrectionTest.h +++ b/Framework/Algorithms/test/LorentzCorrectionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/MCAbsorptionStrategyTest.h b/Framework/Algorithms/test/MCAbsorptionStrategyTest.h index b613f0bf8f4853e5a28cb7e1624c16b76fb603a4..0742ae22442d83f025123f0b055f4dc0ac4c98a4 100644 --- a/Framework/Algorithms/test/MCAbsorptionStrategyTest.h +++ b/Framework/Algorithms/test/MCAbsorptionStrategyTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/MCInteractionVolumeTest.h b/Framework/Algorithms/test/MCInteractionVolumeTest.h index a467938b25119b5301bb8ca4742b9e708e9ca2a1..199fa0f9c2716b3dae098704a14c84b6a8569e32 100644 --- a/Framework/Algorithms/test/MCInteractionVolumeTest.h +++ b/Framework/Algorithms/test/MCInteractionVolumeTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -358,7 +358,8 @@ private: Mantid::Kernel::Logger g_log{"MCInteractionVolumeTest"}; void TestGeneratedTracks(const V3D startPos, const V3D endPos, - const Track beforeScatter, const Track afterScatter, + const Track &beforeScatter, + const Track &afterScatter, const Mantid::Geometry::IObject &shape) { // check the generated tracks share the same start point (the scatter point) TS_ASSERT_EQUALS(beforeScatter.startPoint(), afterScatter.startPoint()); diff --git a/Framework/Algorithms/test/MagFormFactorCorrectionTest.h b/Framework/Algorithms/test/MagFormFactorCorrectionTest.h index 851b68a9df05f9e7fb66c07a0fbbd460e6a4b2ed..2ec64fbbb6c507956aa771f2d5ee42746d238fc1 100644 --- a/Framework/Algorithms/test/MagFormFactorCorrectionTest.h +++ b/Framework/Algorithms/test/MagFormFactorCorrectionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -91,7 +91,7 @@ private: std::string formFactorWSname; // Creates a fake workspace - void createWorkspaceMag(bool isHistogram, std::string wsname) { + void createWorkspaceMag(bool isHistogram, const std::string &wsname) { const int nspecs(10); const int nbins(50); const double invfourPiSqr = 1. / (16. * M_PI * M_PI); @@ -116,8 +116,9 @@ private: } // Checks that all the workspaces are consistent (in = out*ff) - double checkWorkspaces(MatrixWorkspace_sptr in, MatrixWorkspace_sptr out, - MatrixWorkspace_sptr ff) { + double checkWorkspaces(const MatrixWorkspace_sptr &in, + const MatrixWorkspace_sptr &out, + const MatrixWorkspace_sptr &ff) { const int64_t nbins = in->blocksize(); const int64_t nspecs = in->getNumberHistograms(); double df2 = 0., df; diff --git a/Framework/Algorithms/test/MaskBinsFromTableTest.h b/Framework/Algorithms/test/MaskBinsFromTableTest.h index 886c89283b231e462e43ceb3585162207fed2143..2a4cdb722d9264be3411bf624d96378ecd52f785 100644 --- a/Framework/Algorithms/test/MaskBinsFromTableTest.h +++ b/Framework/Algorithms/test/MaskBinsFromTableTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/MaskBinsFromWorkspaceTest.h b/Framework/Algorithms/test/MaskBinsFromWorkspaceTest.h index 25a87e6a6211f50296e7a65337d851ecf5db1fe9..2f25e3b51e464011433a1e586e4a6e832932f8b2 100644 --- a/Framework/Algorithms/test/MaskBinsFromWorkspaceTest.h +++ b/Framework/Algorithms/test/MaskBinsFromWorkspaceTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/MaskBinsIfTest.h b/Framework/Algorithms/test/MaskBinsIfTest.h index ecf95ea56e25d40f76067eb74971268d4e8c7072..1c520bd678c785004dcd7026eb3a7ca1347af76f 100644 --- a/Framework/Algorithms/test/MaskBinsIfTest.h +++ b/Framework/Algorithms/test/MaskBinsIfTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/MaskBinsTest.h b/Framework/Algorithms/test/MaskBinsTest.h index 451429bf5c09b65e2d3102ad189e3ae24849be92..62422bc0cbdd8bdca0ad3b8966a22babe6a1fad8 100644 --- a/Framework/Algorithms/test/MaskBinsTest.h +++ b/Framework/Algorithms/test/MaskBinsTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/MaskDetectorsIfTest.h b/Framework/Algorithms/test/MaskDetectorsIfTest.h index ebfbf00d2c3f7e4ec18111ca95d5a87ccc21d96e..5a3c12e447baf3b235b08acd0c1fecb52fa06f7c 100644 --- a/Framework/Algorithms/test/MaskDetectorsIfTest.h +++ b/Framework/Algorithms/test/MaskDetectorsIfTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/MaskInstrumentTest.h b/Framework/Algorithms/test/MaskInstrumentTest.h index a6c13d4ed1d00bfccdf9ba9a2c03a62112458f37..c1735c1b45c8cbf0ecc369073c7ca562b4792c2b 100644 --- a/Framework/Algorithms/test/MaskInstrumentTest.h +++ b/Framework/Algorithms/test/MaskInstrumentTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/MaskNonOverlappingBinsTest.h b/Framework/Algorithms/test/MaskNonOverlappingBinsTest.h index 7ec3a8f5db923931b08a484dfad02c85d9151400..6e1eaad1145d32000d0c8b8e68ff3edac6bbb82c 100644 --- a/Framework/Algorithms/test/MaskNonOverlappingBinsTest.h +++ b/Framework/Algorithms/test/MaskNonOverlappingBinsTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/MaxEnt/MaxentCalculatorTest.h b/Framework/Algorithms/test/MaxEnt/MaxentCalculatorTest.h index eef896c78b42c7bd5551597d4e9996783f2ed6ea..f8f757c926c04c7528fc239b6f5d4cbb2f4c03f1 100644 --- a/Framework/Algorithms/test/MaxEnt/MaxentCalculatorTest.h +++ b/Framework/Algorithms/test/MaxEnt/MaxentCalculatorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/MaxEnt/MaxentEntropyNegativeValuesTest.h b/Framework/Algorithms/test/MaxEnt/MaxentEntropyNegativeValuesTest.h index 9df1456e28d4054651b7f7ca6b56adb2c74f674f..5cb81445559f2b5ceaedd6f5c6330bc01f8234f6 100644 --- a/Framework/Algorithms/test/MaxEnt/MaxentEntropyNegativeValuesTest.h +++ b/Framework/Algorithms/test/MaxEnt/MaxentEntropyNegativeValuesTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/MaxEnt/MaxentEntropyPositiveValuesTest.h b/Framework/Algorithms/test/MaxEnt/MaxentEntropyPositiveValuesTest.h index d032a460700f1357fb2b18fb258c5d84b0fe7635..18ae0b54c004d2849f2a947bd7f19a5e655421f4 100644 --- a/Framework/Algorithms/test/MaxEnt/MaxentEntropyPositiveValuesTest.h +++ b/Framework/Algorithms/test/MaxEnt/MaxentEntropyPositiveValuesTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/MaxEnt/MaxentSpaceComplexTest.h b/Framework/Algorithms/test/MaxEnt/MaxentSpaceComplexTest.h index 0e6b6f35deeb209c0b232ee65ee8fcec668a82e4..4d592411fbb6ab30b131812c0d6380b82c903d3d 100644 --- a/Framework/Algorithms/test/MaxEnt/MaxentSpaceComplexTest.h +++ b/Framework/Algorithms/test/MaxEnt/MaxentSpaceComplexTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/MaxEnt/MaxentSpaceRealTest.h b/Framework/Algorithms/test/MaxEnt/MaxentSpaceRealTest.h index b65e3c5ddaea433f468cd27518e5dc334dcd2f72..4e4fb42b4f18104e71d82931b10ba5faafdcf0a0 100644 --- a/Framework/Algorithms/test/MaxEnt/MaxentSpaceRealTest.h +++ b/Framework/Algorithms/test/MaxEnt/MaxentSpaceRealTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/MaxEnt/MaxentTransformFourierTest.h b/Framework/Algorithms/test/MaxEnt/MaxentTransformFourierTest.h index a45dada1312acaf50a08ce6d80cb75af3c2c9017..72fd8ce029c300d4926483606127280bac327035 100644 --- a/Framework/Algorithms/test/MaxEnt/MaxentTransformFourierTest.h +++ b/Framework/Algorithms/test/MaxEnt/MaxentTransformFourierTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/MaxEnt/MaxentTransformMultiFourierTest.h b/Framework/Algorithms/test/MaxEnt/MaxentTransformMultiFourierTest.h index 946d0c6fbacd3531936abcf5057f2c847c5ee878..c3abdbc46ac3001627a06a1e32bd140f193cd8e2 100644 --- a/Framework/Algorithms/test/MaxEnt/MaxentTransformMultiFourierTest.h +++ b/Framework/Algorithms/test/MaxEnt/MaxentTransformMultiFourierTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/MaxEntTest.h b/Framework/Algorithms/test/MaxEntTest.h index 53cb218120b30bd874545af861980825ac0a7524..b7c02d70564ae9954284eaf7267e919351805f69 100644 --- a/Framework/Algorithms/test/MaxEntTest.h +++ b/Framework/Algorithms/test/MaxEntTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/MaxMinTest.h b/Framework/Algorithms/test/MaxMinTest.h index f2ca9b05d7bc36871b7669ed72374f61bb41c371..66184d552ca3ab85b5afb0b0fd78ae2a721d3bff 100644 --- a/Framework/Algorithms/test/MaxMinTest.h +++ b/Framework/Algorithms/test/MaxMinTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/MayersSampleCorrectionStrategyTest.h b/Framework/Algorithms/test/MayersSampleCorrectionStrategyTest.h index 535a7a0a84a7e31c79ef6c8f76ee9441f559e4a1..3baf9210e2d319793be3db7da5e15bc470a34215 100644 --- a/Framework/Algorithms/test/MayersSampleCorrectionStrategyTest.h +++ b/Framework/Algorithms/test/MayersSampleCorrectionStrategyTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/MayersSampleCorrectionTest.h b/Framework/Algorithms/test/MayersSampleCorrectionTest.h index 6228e7d1a36315f2723f645af252f76a7db6d1b4..ecdfaf557b942dbf655fd34b30afd20fd0c38927 100644 --- a/Framework/Algorithms/test/MayersSampleCorrectionTest.h +++ b/Framework/Algorithms/test/MayersSampleCorrectionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/MedianDetectorTestTest.h b/Framework/Algorithms/test/MedianDetectorTestTest.h index e7f67ac9ea81834c0852fb1c2ea699a32818b6af..4e057e1673c4447f004231c8db3ddb77d9792175 100644 --- a/Framework/Algorithms/test/MedianDetectorTestTest.h +++ b/Framework/Algorithms/test/MedianDetectorTestTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/MergeLogsTest.h b/Framework/Algorithms/test/MergeLogsTest.h index 22d21379935f304125207976213182c4ca14add9..624b44238ef28a8358c067a6405b66ed5853a5f1 100644 --- a/Framework/Algorithms/test/MergeLogsTest.h +++ b/Framework/Algorithms/test/MergeLogsTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -116,7 +116,7 @@ public: return log; } - void testLogValues(MatrixWorkspace_sptr ws, const std::string &name, + void testLogValues(const MatrixWorkspace_sptr &ws, const std::string &name, const int msize, double value) { TimeSeriesProperty<double> *log = ws->run().getTimeSeriesProperty<double>(name); @@ -131,7 +131,7 @@ public: } // msize1 < msize2! - void testLogValues(MatrixWorkspace_sptr ws, const std::string &name, + void testLogValues(const MatrixWorkspace_sptr &ws, const std::string &name, const int msize1, const int msize2, const double v1, const double v2) { TimeSeriesProperty<double> *log = diff --git a/Framework/Algorithms/test/MergeRunsTest.h b/Framework/Algorithms/test/MergeRunsTest.h index 8947e5703f9b8a584dbde76f60babfa1c838f158..8bead92a85e57b3350a4ca4aed4cb394c45ab109 100644 --- a/Framework/Algorithms/test/MergeRunsTest.h +++ b/Framework/Algorithms/test/MergeRunsTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -40,8 +40,8 @@ private: MergeRuns merge; /// Helper method to add an 'nperiods' log value to each workspace in a group. - void add_periods_logs(WorkspaceGroup_sptr ws, bool calculateNPeriods = true, - int nperiods = -1) { + void add_periods_logs(const WorkspaceGroup_sptr &ws, + bool calculateNPeriods = true, int nperiods = -1) { if (calculateNPeriods) { nperiods = static_cast<int>(ws->size()); } @@ -268,7 +268,7 @@ private: return c; } - void do_test_treat_as_non_period_groups(WorkspaceGroup_sptr input) { + void do_test_treat_as_non_period_groups(const WorkspaceGroup_sptr &input) { MatrixWorkspace_sptr sampleInputWorkspace = boost::dynamic_pointer_cast<MatrixWorkspace>(input->getItem(0)); const double uniformSignal = sampleInputWorkspace->y(0)[0]; @@ -320,7 +320,7 @@ public: "in6", WorkspaceCreationHelper::create2DWorkspaceBinned(3, 3, 2., 2.)); } - void checkOutput(std::string wsname) { + void checkOutput(const std::string &wsname) { EventWorkspace_sptr output; TimeSeriesProperty<double> *log; int log1, log2, logTot; @@ -373,6 +373,7 @@ public: va_start(vl, num); for (int i = 0; i < num; i++) retVal.emplace_back(va_arg(vl, int)); + va_end(vl); return retVal; } @@ -874,7 +875,8 @@ public: AnalysisDataService::Instance().remove("outer"); } - void do_test_validation_throws(WorkspaceGroup_sptr a, WorkspaceGroup_sptr b) { + void do_test_validation_throws(const WorkspaceGroup_sptr &a, + const WorkspaceGroup_sptr &b) { MergeRuns alg; alg.setRethrows(true); alg.initialize(); @@ -911,7 +913,7 @@ public: do_test_validation_throws(aCorrupted, a); } - void do_test_with_multiperiod_data(WorkspaceGroup_sptr input) { + void do_test_with_multiperiod_data(const WorkspaceGroup_sptr &input) { // Extract some internal information from the nested workspaces in order to // run test asserts later. const size_t expectedNumHistograms = @@ -1356,8 +1358,8 @@ public: 3); } - void do_test_merge_two_workspaces_then_third(std::string mergeType, - std::string result) { + void do_test_merge_two_workspaces_then_third(const std::string &mergeType, + const std::string &result) { auto ws = create_group_workspace_with_sample_logs<double>( mergeType, "prop1", 1.0, 2.0, 3.0, 4.0); @@ -1391,8 +1393,8 @@ public: "1, 2, 5"); } - void do_test_merging_two_workspaces_both_already_merged(std::string mergeType, - std::string result) { + void do_test_merging_two_workspaces_both_already_merged( + const std::string &mergeType, const std::string &result) { auto ws = create_group_workspace_with_sample_logs<double>( mergeType, "prop1", 1.0, 2.0, 3.0, 4.0); diff --git a/Framework/Algorithms/test/ModeratorTzeroLinearTest.h b/Framework/Algorithms/test/ModeratorTzeroLinearTest.h index d42405115a5e4b1d612a6387937b04949491649a..5c07a2aba506181fe25d027cb156f6386d5f147b 100644 --- a/Framework/Algorithms/test/ModeratorTzeroLinearTest.h +++ b/Framework/Algorithms/test/ModeratorTzeroLinearTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -26,7 +26,7 @@ using Mantid::HistogramData::LinearGenerator; using Mantid::Types::Event::TofEvent; namespace { -void addToInstrument(MatrixWorkspace_sptr testWS, +void addToInstrument(const MatrixWorkspace_sptr &testWS, const bool &add_deltaE_mode = false, const bool &add_t0_formula = false) { const double evalue(2.082); // energy corresponding to the first order Bragg diff --git a/Framework/Algorithms/test/ModeratorTzeroTest.h b/Framework/Algorithms/test/ModeratorTzeroTest.h index f2b306c1640a625d2f2ffaecae02d376fbf7c2ef..c0a61cc97409ac8b99ccbc83f9bc2e04011440d4 100644 --- a/Framework/Algorithms/test/ModeratorTzeroTest.h +++ b/Framework/Algorithms/test/ModeratorTzeroTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/MonitorEfficiencyCorUserTest.h b/Framework/Algorithms/test/MonitorEfficiencyCorUserTest.h index d0b2f8907093ca94ca91ecd2a23f60f47665193b..30091db5cbdc86a0b81cc5e0149bb0454d0dcb0f 100644 --- a/Framework/Algorithms/test/MonitorEfficiencyCorUserTest.h +++ b/Framework/Algorithms/test/MonitorEfficiencyCorUserTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/MonteCarloAbsorptionTest.h b/Framework/Algorithms/test/MonteCarloAbsorptionTest.h index f5107f614236511a662d41a1e6342d6f49e180d7..bff3d16341a5d6ef07ad65287aefc93667f8fa21 100644 --- a/Framework/Algorithms/test/MonteCarloAbsorptionTest.h +++ b/Framework/Algorithms/test/MonteCarloAbsorptionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -40,7 +40,7 @@ struct TestWorkspaceDescriptor { double beamHeight; }; -void addSample(Mantid::API::MatrixWorkspace_sptr ws, +void addSample(const Mantid::API::MatrixWorkspace_sptr &ws, const Environment environment, double beamWidth = 0., double beamHeight = 0.) { using namespace Mantid::API; @@ -87,7 +87,6 @@ void addSample(Mantid::API::MatrixWorkspace_sptr ws, ws->mutableSample().setShape(sampleShape); if (environment == Environment::SamplePlusContainer) { - const std::string id("container"); constexpr double containerWallThickness{0.002}; constexpr double containerInnerRadius{1.2 * sampleHeight}; constexpr double containerOuterRadius{containerInnerRadius + @@ -403,7 +402,7 @@ private: } Mantid::API::MatrixWorkspace_const_sptr - getOutputWorkspace(Mantid::API::IAlgorithm_sptr alg) { + getOutputWorkspace(const Mantid::API::IAlgorithm_sptr &alg) { using Mantid::API::MatrixWorkspace_sptr; MatrixWorkspace_sptr output = alg->getProperty("OutputWorkspace"); TS_ASSERT(output); @@ -412,8 +411,9 @@ private: return output; } - void verifyDimensions(TestWorkspaceDescriptor wsProps, - Mantid::API::MatrixWorkspace_const_sptr outputWS) { + void + verifyDimensions(TestWorkspaceDescriptor wsProps, + const Mantid::API::MatrixWorkspace_const_sptr &outputWS) { TS_ASSERT_EQUALS(wsProps.nspectra, outputWS->getNumberHistograms()); TS_ASSERT_EQUALS(wsProps.nbins, outputWS->blocksize()); } diff --git a/Framework/Algorithms/test/MonteCarloTesting.h b/Framework/Algorithms/test/MonteCarloTesting.h index 3cce27402d785ee24651d140c3a45d5a0812c9ba..7834a1691f3c98e5099aad7d104b3b70c8f076a3 100644 --- a/Framework/Algorithms/test/MonteCarloTesting.h +++ b/Framework/Algorithms/test/MonteCarloTesting.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/MostLikelyMeanTest.h b/Framework/Algorithms/test/MostLikelyMeanTest.h index dd1ef3facd2930f58c6bf8586676a5d905443cbd..2bb94c43a60706c80d5bc22f72d7213121bfcba0 100644 --- a/Framework/Algorithms/test/MostLikelyMeanTest.h +++ b/Framework/Algorithms/test/MostLikelyMeanTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/MultiplyDivideTest.in.h b/Framework/Algorithms/test/MultiplyDivideTest.in.h index 3846570d64133b04d9dc6139d48ba6a77713ff53..2a2c6270760499f02ed155b95fe6fd9c004edd1e 100644 --- a/Framework/Algorithms/test/MultiplyDivideTest.in.h +++ b/Framework/Algorithms/test/MultiplyDivideTest.in.h @@ -1,14 +1,15 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + // clang-format off #pragma once #include <cxxtest/TestSuite.h> #include <cmath> +#include <stdexcept> #include "MantidTestHelpers/WorkspaceCreationHelper.h" #include "MantidAlgorithms/Divide.h" @@ -26,10 +27,10 @@ using namespace Mantid::Algorithms; using namespace Mantid::DataObjects; using Mantid::Geometry::IDetector_const_sptr; -/*****************************************************************************************/ + /********** PLEASE NOTE! THIS FILE WAS AUTO-GENERATED FROM CMAKE. ***********************/ /********** Source = MultiplyDivideTest.in.h *********************************************/ -/*****************************************************************************************/ + class @MULTIPLYDIVIDETEST_CLASS@ : public CxxTest::TestSuite { @@ -602,6 +603,10 @@ public: mess << "; RHS: grouping=" << rhs_grouping << ", 2D=" << rhs2D; message = mess.str(); + if (lhs_grouping == 0 || rhs_grouping == 0){ + throw std::runtime_error("Attempted div by zero in test"); + } + int numpix = 12; std::vector< std::vector<int> > lhs(numpix/lhs_grouping), rhs(numpix/rhs_grouping); for (int i=0; i<numpix; i++) diff --git a/Framework/Algorithms/test/MultiplyRangeTest.h b/Framework/Algorithms/test/MultiplyRangeTest.h index d98689edc4a6c66b42f88351c2a5f32d8caa9732..71f8f5cd07ba3b70f13031e75bfb29c64ea2baa0 100644 --- a/Framework/Algorithms/test/MultiplyRangeTest.h +++ b/Framework/Algorithms/test/MultiplyRangeTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/MuonWorkspaceCreationHelperTest.h b/Framework/Algorithms/test/MuonWorkspaceCreationHelperTest.h index b92285bd7e67f00931f418f97f494efa559afd0c..c4561c5d8a9a295a097769c53d85f2f13abda482 100644 --- a/Framework/Algorithms/test/MuonWorkspaceCreationHelperTest.h +++ b/Framework/Algorithms/test/MuonWorkspaceCreationHelperTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/NRCalculateSlitResolutionTest.h b/Framework/Algorithms/test/NRCalculateSlitResolutionTest.h index 492046afc33c70691a44bae22b925c81c9c1e6db..cc598cd7610546748dc7e4b875c751e83dddacaa 100644 --- a/Framework/Algorithms/test/NRCalculateSlitResolutionTest.h +++ b/Framework/Algorithms/test/NRCalculateSlitResolutionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/NormaliseByCurrentTest.h b/Framework/Algorithms/test/NormaliseByCurrentTest.h index f1d0601554419c849b99bcea48d773105865d2a0..6b3ca7a62904d41fa37a06cb7efc23367d82791f 100644 --- a/Framework/Algorithms/test/NormaliseByCurrentTest.h +++ b/Framework/Algorithms/test/NormaliseByCurrentTest.h @@ -1,14 +1,16 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidTestHelpers/WorkspaceCreationHelper.h" #include <cxxtest/TestSuite.h> +#include <utility> + #include "MantidAPI/AnalysisDataService.h" #include "MantidAPI/Axis.h" #include "MantidAPI/WorkspaceGroup.h" @@ -25,9 +27,10 @@ using namespace Mantid::Algorithms; using namespace Mantid::DataObjects; namespace { -MatrixWorkspace_const_sptr doTest(MatrixWorkspace_sptr inWS, - std::string wsNameOut, double expectedY, - double expectedE, bool calcPcharge = false, +MatrixWorkspace_const_sptr doTest(const MatrixWorkspace_sptr &inWS, + const std::string &wsNameOut, + double expectedY, double expectedE, + bool calcPcharge = false, bool performance = false) { NormaliseByCurrent norm1; if (!norm1.isInitialized()) @@ -87,7 +90,8 @@ MatrixWorkspace_const_sptr doTest(MatrixWorkspace_sptr inWS, return output; } -MatrixWorkspace_const_sptr doTest(std::string wsNameIn, std::string wsNameOut, +MatrixWorkspace_const_sptr doTest(const std::string &wsNameIn, + const std::string &wsNameOut, const double pCharge, double expectedY, double expectedE, bool performance = false) { MatrixWorkspace_sptr inWS = @@ -99,13 +103,14 @@ MatrixWorkspace_const_sptr doTest(std::string wsNameIn, std::string wsNameOut, Mantid::Kernel::UnitFactory::Instance().create("TOF"); inWS->setYUnit("Counts"); - return doTest(inWS, wsNameOut, expectedY, expectedE, true, performance); + return doTest(inWS, std::move(wsNameOut), expectedY, expectedE, true, + performance); } /// Helper method to add necessary log values to simulate multi-period data. /// The algorithm uses these logs to determien how to normalise by the /// current. -void addMultiPeriodLogsTo(MatrixWorkspace_sptr ws, int period, +void addMultiPeriodLogsTo(const MatrixWorkspace_sptr &ws, int period, const std::string &protonCharges) { ArrayProperty<double> *chargeProp = new ArrayProperty<double>("proton_charge_by_period", protonCharges); @@ -119,7 +124,8 @@ void addMultiPeriodLogsTo(MatrixWorkspace_sptr ws, int period, ws->mutableRun().addLogData(currentPeriodProp); } -void addPChargeLogTo(MatrixWorkspace_sptr ws, const double pChargeAccum) { +void addPChargeLogTo(const MatrixWorkspace_sptr &ws, + const double pChargeAccum) { auto pchargeLog = std::make_unique<Kernel::TimeSeriesProperty<double>>("proton_charge"); diff --git a/Framework/Algorithms/test/NormaliseByDetectorTest.h b/Framework/Algorithms/test/NormaliseByDetectorTest.h index 7c41a4ccef9282ca09473ab2f28b141cec02cbc3..be35738086039d1563ae01164aed81b963a18421 100644 --- a/Framework/Algorithms/test/NormaliseByDetectorTest.h +++ b/Framework/Algorithms/test/NormaliseByDetectorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -28,8 +28,8 @@ using ScopedFileHelper::ScopedFile; Helper function. Runs LoadParameterAlg, to get an instrument parameter definition from a file onto a workspace. */ -void apply_instrument_parameter_file_to_workspace(MatrixWorkspace_sptr ws, - const ScopedFile &file) { +void apply_instrument_parameter_file_to_workspace( + const MatrixWorkspace_sptr &ws, const ScopedFile &file) { // Load the Instrument Parameter file over the existing test workspace + // instrument. using DataHandling::LoadParameterFile; @@ -46,7 +46,7 @@ Helper method for running the algorithm and simply verifying that it runs without exception producing an output workspace.. */ MatrixWorkspace_sptr -do_test_doesnt_throw_on_execution(MatrixWorkspace_sptr inputWS, +do_test_doesnt_throw_on_execution(const MatrixWorkspace_sptr &inputWS, bool parallel = true) { NormaliseByDetector alg(parallel); alg.setRethrows(true); @@ -102,7 +102,7 @@ private: The fit function is set at the instrument level. */ MatrixWorkspace_sptr create_workspace_with_fitting_functions( - const std::string result_unit = "Wavelength") { + const std::string &result_unit = "Wavelength") { // Create a default workspace with no-fitting functions. MatrixWorkspace_sptr ws = create_workspace_with_no_fitting_functions(); const std::string instrumentName = ws->getInstrument()->getName(); @@ -228,7 +228,8 @@ private: */ MatrixWorkspace_sptr create_workspace_with_incomplete_detector_level_only_fit_functions( - MatrixWorkspace_sptr original = boost::shared_ptr<MatrixWorkspace>()) { + const MatrixWorkspace_sptr &original = + boost::shared_ptr<MatrixWorkspace>()) { MatrixWorkspace_sptr ws = original; if (original == nullptr) { // Create a default workspace with no-fitting functions. @@ -274,9 +275,8 @@ private: Helper method for running the algorithm and testing for invalid argument on execution. */ - void - do_test_throws_invalid_argument_on_execution(MatrixWorkspace_sptr inputWS, - bool parallel = false) { + void do_test_throws_invalid_argument_on_execution( + const MatrixWorkspace_sptr &inputWS, bool parallel = false) { NormaliseByDetector alg(parallel); alg.setRethrows(true); alg.initialize(); @@ -400,10 +400,11 @@ public: MatrixWorkspace_sptr inputWS = create_workspace_with_fitting_functions(); // Extract the output workspace so that we can verify the normalisation. const bool parallel = true; + const bool sequential = false; MatrixWorkspace_sptr outWS_parallel = do_test_doesnt_throw_on_execution( inputWS, parallel); // EXECUTES THE ALG IN PARALLEL. MatrixWorkspace_sptr outWS_sequential = do_test_doesnt_throw_on_execution( - inputWS, !parallel); // EXECUTES THE ALG SEQUENTIALLY. + inputWS, sequential); // EXECUTES THE ALG SEQUENTIALLY. // Output workspaces should have same number of histograms. TS_ASSERT_EQUALS(2, outWS_parallel->getNumberHistograms()); @@ -651,7 +652,7 @@ public: private: /// Helper method to run common sanity checks. - void do_basic_checks(MatrixWorkspace_sptr normalisedWS) { + void do_basic_checks(const MatrixWorkspace_sptr &normalisedWS) { TS_ASSERT(normalisedWS != nullptr); TS_ASSERT(ws->getNumberHistograms() == normalisedWS->getNumberHistograms()); TS_ASSERT(ws->x(0).size() == normalisedWS->x(0).size()); diff --git a/Framework/Algorithms/test/NormaliseToMonitorTest.h b/Framework/Algorithms/test/NormaliseToMonitorTest.h index f53da9256dda59d5f473e463a9a2d5277c57dd57..1642311c5f7f475c8fed8ecf1a88e6aaf571a0c8 100644 --- a/Framework/Algorithms/test/NormaliseToMonitorTest.h +++ b/Framework/Algorithms/test/NormaliseToMonitorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -468,10 +468,11 @@ public: for (size_t i = 0; i < specOutInfo.size(); ++i) { const auto &yValues = outWS->histogram(i).y(); for (size_t j = 0; j < yValues.size(); ++j) { - if (specOutInfo.isMonitor(i)) + if (specOutInfo.isMonitor(i)) { TS_ASSERT_DELTA(yValues[j], 3.0, 1e-12) - else + } else { TS_ASSERT_DELTA(yValues[j], 6.0 / double(j + 1), 1e-12) + } } } } @@ -497,6 +498,7 @@ public: const auto &yValues = outWS->histogram(i).y(); for (size_t j = 0; j < yValues.size(); ++j) { if (specOutInfo.isMonitor(i)) + // cppcheck-suppress syntaxError TS_ASSERT_DELTA(yValues[j], double(j + 1) / 15.0, 1e-12) else TS_ASSERT_DELTA(yValues[j], 2.0 / 15.0, 1e-12) diff --git a/Framework/Algorithms/test/NormaliseToUnityTest.py b/Framework/Algorithms/test/NormaliseToUnityTest.py index 71e8e9cd9681b5cc4b45c8d840f899672aa089a7..b4afb2ab5a17006b599e4b01e209544a390b9c18 100644 --- a/Framework/Algorithms/test/NormaliseToUnityTest.py +++ b/Framework/Algorithms/test/NormaliseToUnityTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + import unittest from mantid.simpleapi import * diff --git a/Framework/Algorithms/test/OneMinusExponentialCorTest.h b/Framework/Algorithms/test/OneMinusExponentialCorTest.h index 200601e206bbc99dbb042e1194fd27fe8f11f6ec..9606f7a22da9d6fd8cddfe548a15c612f066e29a 100644 --- a/Framework/Algorithms/test/OneMinusExponentialCorTest.h +++ b/Framework/Algorithms/test/OneMinusExponentialCorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/PDCalibrationTest.h b/Framework/Algorithms/test/PDCalibrationTest.h index 55f9058bfcda2091356844715561377d2382cbca..f1f1dfdc37f4e64fd3d6c14dfc258327b0766ad9 100644 --- a/Framework/Algorithms/test/PDCalibrationTest.h +++ b/Framework/Algorithms/test/PDCalibrationTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/PDDetermineCharacterizationsTest.h b/Framework/Algorithms/test/PDDetermineCharacterizationsTest.h index 939df213f78ee189b8406d68719604ae7da289d5..f79748f75c1c2c86c4d1805a37c5486881ffd000 100644 --- a/Framework/Algorithms/test/PDDetermineCharacterizationsTest.h +++ b/Framework/Algorithms/test/PDDetermineCharacterizationsTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -82,8 +82,8 @@ public: } } - void addRow(ITableWorkspace_sptr wksp, const double freq, const double wl, - const int bank, const std::string &van, + void addRow(const ITableWorkspace_sptr &wksp, const double freq, + const double wl, const int bank, const std::string &van, const std::string &van_back, const std::string &can, const std::string &empty_env, const std::string &empty_inst, const std::string &dmin, const std::string &dmax, @@ -209,8 +209,8 @@ public: return expectedInfo; } - void compareResult(PropertyManager_sptr expected, - PropertyManager_sptr observed) { + void compareResult(const PropertyManager_sptr &expected, + const PropertyManager_sptr &observed) { TS_ASSERT_EQUALS(expected->propertyCount(), observed->propertyCount()); const std::vector<Property *> &expectedProps = expected->getProperties(); diff --git a/Framework/Algorithms/test/PDFFourierTransformTest.h b/Framework/Algorithms/test/PDFFourierTransformTest.h index 24d0d6d675ffbea8050558f69b1876b3c663c08b..8b39d78f74853f5ff1bdf57d557305490824ba06 100644 --- a/Framework/Algorithms/test/PDFFourierTransformTest.h +++ b/Framework/Algorithms/test/PDFFourierTransformTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -32,7 +32,7 @@ namespace { */ Mantid::API::MatrixWorkspace_sptr createWS(size_t n, double dx, const std::string &name, - const std::string unitlabel, + const std::string &unitlabel, const bool withBadValues = false) { Mantid::API::FrameworkManager::Instance(); diff --git a/Framework/Algorithms/test/PaddingAndApodizationTest.h b/Framework/Algorithms/test/PaddingAndApodizationTest.h index cde39be2f3621210badbaf46e699321512e935eb..4f840c27f992266947fd0d372813a62676bced0f 100644 --- a/Framework/Algorithms/test/PaddingAndApodizationTest.h +++ b/Framework/Algorithms/test/PaddingAndApodizationTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/ParallaxCorrectionTest.h b/Framework/Algorithms/test/ParallaxCorrectionTest.h index 899608b17dd54baf2062fab430e2e7bc132825be..36b63cf846c3c0e61a2ce17f3353c72927beb801 100644 --- a/Framework/Algorithms/test/ParallaxCorrectionTest.h +++ b/Framework/Algorithms/test/ParallaxCorrectionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -27,7 +27,7 @@ using Mantid::Geometry::DetectorInfo; using Mantid::Kernel::V3D; namespace { -bool compare(MatrixWorkspace_sptr w1, MatrixWorkspace_sptr w2) { +bool compare(const MatrixWorkspace_sptr &w1, const MatrixWorkspace_sptr &w2) { CompareWorkspaces comparator; comparator.initialize(); comparator.setChild(true); diff --git a/Framework/Algorithms/test/PauseTest.h b/Framework/Algorithms/test/PauseTest.h index 839de58c39a09aa3903dd5d84b57770b944dc2fd..c89ee5a27eeed81847ab6bfdbdd943dc94ff4837 100644 --- a/Framework/Algorithms/test/PauseTest.h +++ b/Framework/Algorithms/test/PauseTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/PerformIndexOperationsTest.h b/Framework/Algorithms/test/PerformIndexOperationsTest.h index a9b973a6493fbd594f1e26f75618e3b54a71363d..0a0a02992723e10d9f71b4b2a3170a44fa09a214 100644 --- a/Framework/Algorithms/test/PerformIndexOperationsTest.h +++ b/Framework/Algorithms/test/PerformIndexOperationsTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -16,7 +16,7 @@ using Mantid::Algorithms::PerformIndexOperations; using namespace Mantid::API; MatrixWorkspace_const_sptr -doExecute(MatrixWorkspace_sptr inWS, +doExecute(const MatrixWorkspace_sptr &inWS, const std::string &processingInstructions) { // Name of the output workspace. std::string outWSName("PerformIndexOperationsTest_OutputWS"); diff --git a/Framework/Algorithms/test/PlusMinusTest.in.h b/Framework/Algorithms/test/PlusMinusTest.in.h index 07c82b7c13aa7b6808de0f39ea33c96ccba54606..68a6515f889fa24b782667cd68ef98bec308a93e 100644 --- a/Framework/Algorithms/test/PlusMinusTest.in.h +++ b/Framework/Algorithms/test/PlusMinusTest.in.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + // clang-format off #pragma once @@ -25,10 +25,10 @@ using namespace Mantid::Algorithms; using namespace Mantid::DataObjects; -/*****************************************************************************************/ + /********** PLEASE NOTE! THIS FILE WAS AUTO-GENERATED FROM CMAKE. ***********************/ /********** Source = PlusMinusTest.in.h **************************************************/ -/*****************************************************************************************/ + class @PLUSMINUSTEST_CLASS@ : public CxxTest::TestSuite { @@ -392,7 +392,7 @@ public: MatrixWorkspace_sptr work_in2 = eventWS_5x10_50; // You have to specify the expected output value because in1 gets changed. performTest(work_in1,work_in2, true, false /*not event out*/, - DO_PLUS ? 4.0 : 0.0, DO_PLUS ? 2.0 : 2.0); + DO_PLUS ? 4.0 : 0.0, 2.0); } void test_Event_2D() @@ -468,7 +468,7 @@ public: MatrixWorkspace_sptr work_in1 = eventWS_5x10_50; MatrixWorkspace_sptr work_in2 = eventWS_5x10_50; MatrixWorkspace_sptr work_out = performTest(work_in1,work_in2, false /*inPlace*/, true /*outputIsEvent*/, - DO_PLUS ? 4.0 : 0.0, DO_PLUS ? 2.0 : 2.0); + DO_PLUS ? 4.0 : 0.0, 2.0); } void test_Event_Event_inPlace() @@ -477,7 +477,7 @@ public: MatrixWorkspace_sptr work_in1 = WorkspaceCreationHelper::createEventWorkspace(nHist,nBins,50,0.0,1.0,2); MatrixWorkspace_sptr work_in2 = eventWS_5x10_50; MatrixWorkspace_sptr work_out = performTest(work_in1,work_in2, true, true /*outputIsEvent*/, - DO_PLUS ? 4.0 : 0.0, DO_PLUS ? 2.0 : 2.0); + DO_PLUS ? 4.0 : 0.0, 2.0); } void test_Event_EventSingleSpectrum_fails() @@ -502,7 +502,7 @@ public: MatrixWorkspace_sptr work_in1 = WorkspaceCreationHelper::createEventWorkspace(nHist,nBins,50,0.0,1.0,2); MatrixWorkspace_sptr work_in2 = WorkspaceCreationHelper::createEventWorkspace(nHist,nBins,50,0.0,1.0,2); MatrixWorkspace_sptr work_out = performTest(work_in1,work_in2, inplace!=0, true /*outputIsEvent*/, - DO_PLUS ? 4.0 : 0.0, DO_PLUS ? 2.0 : 2.0); + DO_PLUS ? 4.0 : 0.0, 2.0); } } @@ -514,7 +514,7 @@ public: MatrixWorkspace_sptr work_in1 = WorkspaceCreationHelper::createEventWorkspace(nHist,nBins,50,0.0,1.0,2); MatrixWorkspace_sptr work_in2 = WorkspaceCreationHelper::createEventWorkspace(nHist,1,50,0.0,1.0,2); MatrixWorkspace_sptr work_out = performTest(work_in1,work_in2, inplace!=0, true /*outputIsEvent*/, - DO_PLUS ? 4.0 : 0.0, DO_PLUS ? 2.0 : 2.0); + DO_PLUS ? 4.0 : 0.0, 2.0); } } @@ -525,7 +525,7 @@ public: MatrixWorkspace_sptr work_in1 = WorkspaceCreationHelper::createEventWorkspace(5,1,50,0.0,1.0,2); MatrixWorkspace_sptr work_in2 = eventWS_5x10_50; MatrixWorkspace_sptr work_out = performTest(work_in1,work_in2, inplace!=0, true /*outputIsEvent*/, - DO_PLUS ? 4.0 : 0.0, DO_PLUS ? 2.0 : 2.0); + DO_PLUS ? 4.0 : 0.0, 2.0); } } @@ -537,7 +537,7 @@ public: MatrixWorkspace_sptr work_in1 = WorkspaceCreationHelper::createEventWorkspace(nHist,nBins,50,0.0,1.0,2); MatrixWorkspace_sptr work_in2 = WorkspaceCreationHelper::createEventWorkspace(nHist,nBins,50,0.0,1.0,2); MatrixWorkspace_sptr work_out = performTest(work_in1,work_in2, inplace!=0, true /*outputIsEvent*/, - DO_PLUS ? 4.0 : 0.0, DO_PLUS ? 2.0 : 2.0); + DO_PLUS ? 4.0 : 0.0, 2.0); } } @@ -567,7 +567,7 @@ public: TS_ASSERT( work_in2->getSpectrum(0).hasDetectorID(100) ); MatrixWorkspace_sptr work_out = performTest(work_in1,work_in2, inplace!=0, true /*outputIsEvent*/, - DO_PLUS ? 3.0 : -1.0, DO_PLUS ? 1.7320 : 1.7320); + DO_PLUS ? 3.0 : -1.0, 1.7320); //Ya, its an event workspace TS_ASSERT(work_out); diff --git a/Framework/Algorithms/test/PointByPointVCorrectionTest.h b/Framework/Algorithms/test/PointByPointVCorrectionTest.h index 6b586deaa489e70ec904b94626428c7ea9c64a97..2c1009245c5e166c7347a1a16d83aafde5676ce3 100644 --- a/Framework/Algorithms/test/PointByPointVCorrectionTest.h +++ b/Framework/Algorithms/test/PointByPointVCorrectionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/PoissonErrorsTest.h b/Framework/Algorithms/test/PoissonErrorsTest.h index 10388f290e49f8a2e6e42bd20f99402f39ab2bfc..1651bc0bdefa202e1839498487218acfb80a3b73 100644 --- a/Framework/Algorithms/test/PoissonErrorsTest.h +++ b/Framework/Algorithms/test/PoissonErrorsTest.h @@ -1,12 +1,14 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include <cmath> +#include <utility> + #include <cxxtest/TestSuite.h> #include "MantidAPI/AnalysisDataService.h" @@ -238,15 +240,18 @@ public: } private: - void checkData(MatrixWorkspace_sptr work_in1, MatrixWorkspace_sptr work_in2, - MatrixWorkspace_sptr work_out1) { + void checkData(const MatrixWorkspace_sptr &work_in1, + const MatrixWorkspace_sptr &work_in2, + const MatrixWorkspace_sptr &work_out1) { // default to a horizontal loop orientation - checkData(work_in1, work_in2, work_out1, 0); + checkData(std::move(work_in1), std::move(work_in2), std::move(work_out1), + 0); } // loopOrientation 0=Horizontal, 1=Vertical - void checkData(MatrixWorkspace_sptr work_in1, MatrixWorkspace_sptr work_in2, - MatrixWorkspace_sptr work_out1, int loopOrientation) { + void checkData(const MatrixWorkspace_sptr &work_in1, + const MatrixWorkspace_sptr &work_in2, + const MatrixWorkspace_sptr &work_out1, int loopOrientation) { size_t ws2LoopCount = 0; if (work_in2->size() > 0) { ws2LoopCount = work_in1->size() / work_in2->size(); @@ -267,9 +272,9 @@ private: } } - void checkDataItem(MatrixWorkspace_sptr work_in1, - MatrixWorkspace_sptr work_in2, - MatrixWorkspace_sptr work_out1, size_t i, + void checkDataItem(const MatrixWorkspace_sptr &work_in1, + const MatrixWorkspace_sptr &work_in2, + const MatrixWorkspace_sptr &work_out1, size_t i, size_t ws2Index) { // printf("I=%d\tws2Index=%d\n",i,ws2Index); double sig1 = diff --git a/Framework/Algorithms/test/PolarizationCorrectionFredrikzeTest.h b/Framework/Algorithms/test/PolarizationCorrectionFredrikzeTest.h index b00f61d2fe9bb6cf78580d04d5f20efafb330dfa..b558ac16662702b1aa0773d8f2bd80026b7b2376 100644 --- a/Framework/Algorithms/test/PolarizationCorrectionFredrikzeTest.h +++ b/Framework/Algorithms/test/PolarizationCorrectionFredrikzeTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -79,7 +79,7 @@ public: return group; } - MatrixWorkspace_sptr makeEfficiencies(Workspace_sptr inWS, + MatrixWorkspace_sptr makeEfficiencies(const Workspace_sptr &inWS, const std::string &rho, const std::string &pp, const std::string &alpha = "", @@ -214,7 +214,8 @@ public: } } - void setInstrument(Workspace_sptr ws, const std::string &instrument_name) { + void setInstrument(const Workspace_sptr &ws, + const std::string &instrument_name) { auto alg = AlgorithmManager::Instance().createUnmanaged("LoadInstrument"); AnalysisDataService::Instance().addOrReplace("dummy", ws); alg->initialize(); diff --git a/Framework/Algorithms/test/PolarizationCorrectionWildesTest.h b/Framework/Algorithms/test/PolarizationCorrectionWildesTest.h index ac8120b5cbdd933728fe03a0dba52d69d4e0841e..d65bd7a8523aa947454e55aadfefe80481722a0d 100644 --- a/Framework/Algorithms/test/PolarizationCorrectionWildesTest.h +++ b/Framework/Algorithms/test/PolarizationCorrectionWildesTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/PolarizationEfficiencyCorTest.h b/Framework/Algorithms/test/PolarizationEfficiencyCorTest.h index 31f6b2a5065c882e2262963ee29d2e48e10fe598..7fd752aaddac65ab6a4b4a220c15a6d2f1227664 100644 --- a/Framework/Algorithms/test/PolarizationEfficiencyCorTest.h +++ b/Framework/Algorithms/test/PolarizationEfficiencyCorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/PolynomialCorrectionTest.h b/Framework/Algorithms/test/PolynomialCorrectionTest.h index 4ddf4cece50622d22c7cf1dd53a14bf6029f820e..0e24fb8acdd311f3f0ffbda8c5d7f83d18894303 100644 --- a/Framework/Algorithms/test/PolynomialCorrectionTest.h +++ b/Framework/Algorithms/test/PolynomialCorrectionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/PowerLawCorrectionTest.h b/Framework/Algorithms/test/PowerLawCorrectionTest.h index 4ebc2f54fddc386eda310a8568aa0b06b7078570..24194f16dde3af42ba2086dacea1855ea2c5aa02 100644 --- a/Framework/Algorithms/test/PowerLawCorrectionTest.h +++ b/Framework/Algorithms/test/PowerLawCorrectionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/PowerTest.h b/Framework/Algorithms/test/PowerTest.h index bc295d950a8693bab69ce6aeda0ee6996e83e90f..41592f6c0f6df5cda938f66bf4e3e640add061ae 100644 --- a/Framework/Algorithms/test/PowerTest.h +++ b/Framework/Algorithms/test/PowerTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/PrecompiledHeader.h b/Framework/Algorithms/test/PrecompiledHeader.h index 01b5355190b97c2069344b3e7617d0d0e6693d5a..e14daaa4f1d5053efece08402bc690a263b877a6 100644 --- a/Framework/Algorithms/test/PrecompiledHeader.h +++ b/Framework/Algorithms/test/PrecompiledHeader.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/Q1D2Test.h b/Framework/Algorithms/test/Q1D2Test.h index 5238135031024e07b2f06a455bb64afe288e0de4..1193d7de0cc35a2619801de637c993df6b083df0 100644 --- a/Framework/Algorithms/test/Q1D2Test.h +++ b/Framework/Algorithms/test/Q1D2Test.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/Q1DWeightedTest.h b/Framework/Algorithms/test/Q1DWeightedTest.h index 80e60c2964824d397657ad55a41e790e9fb987a9..ffbdfe47dc905156ac978cd20fa3474fe58ab485 100644 --- a/Framework/Algorithms/test/Q1DWeightedTest.h +++ b/Framework/Algorithms/test/Q1DWeightedTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/QxyTest.h b/Framework/Algorithms/test/QxyTest.h index 247d44272e1e904ff155c7ecaff8c3818fee7aca..8cc897a110ddcdc45c86b85d784a05216d575d5a 100644 --- a/Framework/Algorithms/test/QxyTest.h +++ b/Framework/Algorithms/test/QxyTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/RadiusSumTest.h b/Framework/Algorithms/test/RadiusSumTest.h index a657559a313bab21b64646b6e23154bb6daa8cea..b96e8aaaffadab8b8d4b3360d2bcbaf74b2fef4e 100644 --- a/Framework/Algorithms/test/RadiusSumTest.h +++ b/Framework/Algorithms/test/RadiusSumTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/RayTracerTesterTest.h b/Framework/Algorithms/test/RayTracerTesterTest.h index 89031a644f0e1a53ecc313cf59eb309c345d5bcd..625f3972627f62cdeef7a0e153f81f21d428a9ee 100644 --- a/Framework/Algorithms/test/RayTracerTesterTest.h +++ b/Framework/Algorithms/test/RayTracerTesterTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/ReadGroupsFromFileTest.h b/Framework/Algorithms/test/ReadGroupsFromFileTest.h index f0dad7171b66b97bd75e4461d23a6b369f3f77ba..d306c7650edaa3b3c7b2aba6546fa4b95f5a8593 100644 --- a/Framework/Algorithms/test/ReadGroupsFromFileTest.h +++ b/Framework/Algorithms/test/ReadGroupsFromFileTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/RealFFTTest.h b/Framework/Algorithms/test/RealFFTTest.h index 290e4ff7976cd05a12aa09eb6eced4620530cc24..1c91c06a9b3c4e44d4ab6d021197f1ec32f91b7b 100644 --- a/Framework/Algorithms/test/RealFFTTest.h +++ b/Framework/Algorithms/test/RealFFTTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/Rebin2DTest.h b/Framework/Algorithms/test/Rebin2DTest.h index 1c82882f1ddf3771121cb8b9a1d8294ed941442b..3326dbccec4812e03c241097a00ba6701fd0b064 100644 --- a/Framework/Algorithms/test/Rebin2DTest.h +++ b/Framework/Algorithms/test/Rebin2DTest.h @@ -1,18 +1,19 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidAPI/BinEdgeAxis.h" #include "MantidAlgorithms/Rebin2D.h" #include "MantidDataObjects/RebinnedOutput.h" +#include "MantidHistogramData/Histogram.h" +#include "MantidKernel/Timer.h" #include "MantidTestHelpers/WorkspaceCreationHelper.h" #include <cxxtest/TestSuite.h> - -#include "MantidKernel/Timer.h" +//#include "../../TestHelpers/src/WorkspaceCreationHelper.cpp" using Mantid::Algorithms::Rebin2D; using namespace Mantid::API; @@ -26,7 +27,8 @@ namespace { /// Return the input workspace. All Y values are 2 and E values sqrt(2) MatrixWorkspace_sptr makeInputWS(const bool distribution, const bool perf_test = false, - const bool small_bins = false) { + const bool small_bins = false, + const bool isHisto = true) { size_t nhist(0), nbins(0); double x0(0.0), deltax(0.0); @@ -46,24 +48,35 @@ MatrixWorkspace_sptr makeInputWS(const bool distribution, } } - MatrixWorkspace_sptr ws = WorkspaceCreationHelper::create2DWorkspaceBinned( - int(nhist), int(nbins), x0, deltax); - - // We need something other than a spectrum axis, call this one theta - auto thetaAxis = std::make_unique<BinEdgeAxis>(nhist + 1); - for (size_t i = 0; i < nhist + 1; ++i) { - thetaAxis->setValue(i, -0.5 + static_cast<double>(i)); - } - ws->replaceAxis(1, std::move(thetaAxis)); + MatrixWorkspace_sptr ws; - if (distribution) { - Mantid::API::WorkspaceHelpers::makeDistribution(ws); + if (isHisto) { + ws = WorkspaceCreationHelper::create2DWorkspaceBinned( + int(nhist), int(nbins), x0, deltax); + // We need something other than a spectrum axis, call this one theta + auto thetaAxis = std::make_unique<BinEdgeAxis>(nhist + 1); + for (size_t i = 0; i < nhist + 1; ++i) { + thetaAxis->setValue(i, -0.5 + static_cast<double>(i)); + } + ws->replaceAxis(1, std::move(thetaAxis)); + if (distribution) { + Mantid::API::WorkspaceHelpers::makeDistribution(ws); + } + } else { + // create histograms with points (which cannot be a distirbution) + ws = WorkspaceCreationHelper::create2DWorkspacePoints( + int(nhist), int(nbins), x0 + 0.5, deltax); + // convert axis from spectrum to theta + auto thetaAxis = std::make_unique<NumericAxis>(nhist); + for (size_t i = 0; i < nhist; ++i) { + thetaAxis->setValue(i, static_cast<double>(i)); + } + ws->replaceAxis(1, std::move(thetaAxis)); } - return ws; } -MatrixWorkspace_sptr runAlgorithm(MatrixWorkspace_sptr inputWS, +MatrixWorkspace_sptr runAlgorithm(const MatrixWorkspace_sptr &inputWS, const std::string &axis1Params, const std::string &axis2Params, const bool UseFractionalArea = false) { @@ -185,6 +198,32 @@ public: } } + void test_BothAxes_PointData() { + MatrixWorkspace_sptr inputWS = + makeInputWS(false, false, false, false); // 10 spectra, 10 points + MatrixWorkspace_sptr outputWS = + runAlgorithm(inputWS, "5.,1.8,15", "-0.5,2.5,9.5"); + TS_ASSERT_EQUALS(outputWS->getNumberHistograms(), 4); + TS_ASSERT_EQUALS(outputWS->blocksize(), 6); + + double errors[6] = {3., 3., 3., 3., 3., 2.236067977}; + const double epsilon(1e-08); + for (size_t i = 0; i < outputWS->getNumberHistograms(); ++i) { + const auto &y = outputWS->y(i); + const auto &e = outputWS->e(i); + const size_t numBins = y.size(); + for (size_t j = 0; j < numBins; ++j) { + if (j < 5) { + TS_ASSERT_DELTA(y[j], 9, epsilon); + } else { + // Last bin + TS_ASSERT_DELTA(y[j], 5, epsilon); + } + TS_ASSERT_DELTA(e[j], errors[j], epsilon); + } + } + } + void test_Zero_Area_Bins_NoFractionalBinning() { MatrixWorkspace_sptr inputWS = makeInputWS(false); const auto nhist = inputWS->getNumberHistograms(); @@ -234,9 +273,9 @@ public: } private: - void checkData(MatrixWorkspace_const_sptr outputWS, const size_t nxvalues, - const size_t nhist, const bool dist, const bool onAxis1, - const bool small_bins = false) { + void checkData(const MatrixWorkspace_const_sptr &outputWS, + const size_t nxvalues, const size_t nhist, const bool dist, + const bool onAxis1, const bool small_bins = false) { TS_ASSERT_EQUALS(outputWS->getNumberHistograms(), nhist); TS_ASSERT_EQUALS(outputWS->isDistribution(), dist); // Axis sizes diff --git a/Framework/Algorithms/test/RebinByPulseTimesTest.h b/Framework/Algorithms/test/RebinByPulseTimesTest.h index 3c92918c4fe148137e05f397fe95db95bad86bbf..34bca3d356084ed0b38bf91c9103ffaf34b5c415 100644 --- a/Framework/Algorithms/test/RebinByPulseTimesTest.h +++ b/Framework/Algorithms/test/RebinByPulseTimesTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/RebinByTimeAtSampleTest.h b/Framework/Algorithms/test/RebinByTimeAtSampleTest.h index b1c1e50488cd7ea69ea2d083051a40b4934eb01c..327f112ef01931d129ad1d7fc0ef183002de9a41 100644 --- a/Framework/Algorithms/test/RebinByTimeAtSampleTest.h +++ b/Framework/Algorithms/test/RebinByTimeAtSampleTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/RebinByTimeBaseTest.h b/Framework/Algorithms/test/RebinByTimeBaseTest.h index a507f97db52f192128bff782019505e9314eea65..808888b8326c782c2c5d55888e73ace69f6c470b 100644 --- a/Framework/Algorithms/test/RebinByTimeBaseTest.h +++ b/Framework/Algorithms/test/RebinByTimeBaseTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /* Base class for common rebinning testing performed by test clases such as diff --git a/Framework/Algorithms/test/RebinTest.h b/Framework/Algorithms/test/RebinTest.h index b4e9f404813fc88e0861ec4215d4a63e690c6a22..f5bdb1ce430e6c429191b1c96a9d92cc1a43175c 100644 --- a/Framework/Algorithms/test/RebinTest.h +++ b/Framework/Algorithms/test/RebinTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/RebinToWorkspaceTest.h b/Framework/Algorithms/test/RebinToWorkspaceTest.h index 19251baa42453ff84f183f99acd356ccb3398613..bead3972c751204c58cc624e8a3a2ef504b17a6a 100644 --- a/Framework/Algorithms/test/RebinToWorkspaceTest.h +++ b/Framework/Algorithms/test/RebinToWorkspaceTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/RebunchTest.h b/Framework/Algorithms/test/RebunchTest.h index 09df8a3273c30d6aacf7be7c306c23caa2a82395..ed53c13fb05c123a636f42df749aeffc5d2e2c36 100644 --- a/Framework/Algorithms/test/RebunchTest.h +++ b/Framework/Algorithms/test/RebunchTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/RectangularBeamProfileTest.h b/Framework/Algorithms/test/RectangularBeamProfileTest.h index 9dea39e4ef24d2105afe5a256a02fe936071a32f..d81ca5c3957681658b015b16a6ea629c65c89ece 100644 --- a/Framework/Algorithms/test/RectangularBeamProfileTest.h +++ b/Framework/Algorithms/test/RectangularBeamProfileTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/ReflectometryBackgroundSubtractionTest.py b/Framework/Algorithms/test/ReflectometryBackgroundSubtractionTest.py index 86949eb6e33ab2287581cb2b1fe2292c64b6ec0d..267406fd68076e284a163cbe9e8e4108bac6af14 100644 --- a/Framework/Algorithms/test/ReflectometryBackgroundSubtractionTest.py +++ b/Framework/Algorithms/test/ReflectometryBackgroundSubtractionTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + import unittest from mantid.simpleapi import * diff --git a/Framework/Algorithms/test/ReflectometryBeamStatisticsTest.h b/Framework/Algorithms/test/ReflectometryBeamStatisticsTest.h index 7739309c7c3552540a0898486d727d286ce129f1..96667f11224abdbe259055e251d9eaf1f0d24e7c 100644 --- a/Framework/Algorithms/test/ReflectometryBeamStatisticsTest.h +++ b/Framework/Algorithms/test/ReflectometryBeamStatisticsTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/ReflectometryMomentumTransferTest.h b/Framework/Algorithms/test/ReflectometryMomentumTransferTest.h index d99c0e375b95f4a34dc7c06c548b9d04c1fa503a..1c79b75e5dd4d31d3fc878343669733291f93799 100644 --- a/Framework/Algorithms/test/ReflectometryMomentumTransferTest.h +++ b/Framework/Algorithms/test/ReflectometryMomentumTransferTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -119,8 +119,7 @@ public: TS_ASSERT_EQUALS(outXs.size(), inXs.size()) TS_ASSERT(outputWS->hasDx(0)) const auto &inYs = inputWS->y(0); - const auto &outYs = outputWS->y(0); - TS_ASSERT_EQUALS(outYs.rawData(), inYs.rawData()) + TS_ASSERT_EQUALS(outputWS->y(0).rawData(), inYs.rawData()) const auto &inEs = inputWS->e(0); const auto &outEs = outputWS->e(0); TS_ASSERT_EQUALS(outEs.rawData(), inEs.rawData()) @@ -283,7 +282,7 @@ private: TS_ASSERT(!alg->isExecuted()) } - static API::Algorithm_sptr make_alg(API::MatrixWorkspace_sptr inputWS, + static API::Algorithm_sptr make_alg(const API::MatrixWorkspace_sptr &inputWS, const std::string &sumType, const std::vector<int> &foreground) { auto alg = boost::make_shared<Algorithms::ReflectometryMomentumTransfer>(); diff --git a/Framework/Algorithms/test/ReflectometryReductionOne2Test.h b/Framework/Algorithms/test/ReflectometryReductionOne2Test.h index b9e0e826055197049266ee13e9079971e90ff7b1..e0d381d65367af75e6305dc47df6a211c8580508 100644 --- a/Framework/Algorithms/test/ReflectometryReductionOne2Test.h +++ b/Framework/Algorithms/test/ReflectometryReductionOne2Test.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -964,7 +964,7 @@ private: const double wavelengthMin, const double wavelengthMax, const std::string &procInstr, - MatrixWorkspace_sptr transWS, + const MatrixWorkspace_sptr &transWS, const bool multiple_runs) { setupAlgorithm(alg, wavelengthMin, wavelengthMax, procInstr); alg.setProperty("FirstTransmissionRun", transWS); @@ -981,7 +981,7 @@ private: const double wavelengthMin, const double wavelengthMax, const std::string &procInstr, - MatrixWorkspace_sptr inputWS, + const MatrixWorkspace_sptr &inputWS, const bool integrate) { setupAlgorithm(alg, wavelengthMin, wavelengthMax, procInstr); alg.setProperty("InputWorkspace", inputWS); @@ -997,8 +997,9 @@ private: } } - void setupAlgorithmForBackgroundSubtraction(ReflectometryReductionOne2 &alg, - MatrixWorkspace_sptr inputWS) { + void + setupAlgorithmForBackgroundSubtraction(ReflectometryReductionOne2 &alg, + const MatrixWorkspace_sptr &inputWS) { setupAlgorithm(alg, 0, 5, "3"); alg.setChild(false); // required to get history alg.setProperty("InputWorkspace", inputWS); @@ -1105,7 +1106,7 @@ private: return ws; } - void checkWorkspaceHistory(MatrixWorkspace_sptr ws, + void checkWorkspaceHistory(const MatrixWorkspace_sptr &ws, std::vector<std::string> const &expected, bool const unroll = true) { auto wsHistory = ws->getHistory(); @@ -1116,19 +1117,20 @@ private: auto childHistories = lastAlgHistory->getChildHistories(); std::transform(childHistories.cbegin(), childHistories.cend(), std::back_inserter(algNames), - [](AlgorithmHistory_const_sptr childAlg) { + [](const AlgorithmHistory_const_sptr &childAlg) { return childAlg->name(); }); } else if (!unroll) { - std::transform(algHistories.cbegin(), algHistories.cend(), - std::back_inserter(algNames), - [](AlgorithmHistory_sptr alg) { return alg->name(); }); + std::transform( + algHistories.cbegin(), algHistories.cend(), + std::back_inserter(algNames), + [](const AlgorithmHistory_sptr &alg) { return alg->name(); }); } TS_ASSERT_EQUALS(algNames, expected); } void checkHistoryAlgorithmProperties( - MatrixWorkspace_sptr ws, size_t toplevelIdx, size_t childIdx, + const MatrixWorkspace_sptr &ws, size_t toplevelIdx, size_t childIdx, std::map<std::string, std::string> const &expected) { auto parentHist = ws->getHistory().getAlgorithmHistory(toplevelIdx); auto childHistories = parentHist->getChildHistories(); diff --git a/Framework/Algorithms/test/ReflectometryReductionOne2Test.py b/Framework/Algorithms/test/ReflectometryReductionOne2Test.py index c829965c76da4d96ed4da5bde474ff9bfcc60ad9..ff0db810f60d3767fe4b66f61bf9a3cfee87d530 100644 --- a/Framework/Algorithms/test/ReflectometryReductionOne2Test.py +++ b/Framework/Algorithms/test/ReflectometryReductionOne2Test.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + import unittest from mantid.simpleapi import * diff --git a/Framework/Algorithms/test/ReflectometryReductionOneAuto2Test.h b/Framework/Algorithms/test/ReflectometryReductionOneAuto2Test.h index 6ed92f36271088ab8bc540637629df4d82bb987c..38595e0e82eb20039485c8cbfea9e3543f023e0f 100644 --- a/Framework/Algorithms/test/ReflectometryReductionOneAuto2Test.h +++ b/Framework/Algorithms/test/ReflectometryReductionOneAuto2Test.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -1680,9 +1680,8 @@ public: } private: - MatrixWorkspace_sptr - createFloodWorkspace(Mantid::Geometry::Instrument_const_sptr instrument, - size_t n = 4) { + MatrixWorkspace_sptr createFloodWorkspace( + const Mantid::Geometry::Instrument_const_sptr &instrument, size_t n = 4) { size_t detid = 1; auto flood = create2DWorkspace(int(n), 1); if (n == 4) { diff --git a/Framework/Algorithms/test/ReflectometryReductionOneAuto3Test.h b/Framework/Algorithms/test/ReflectometryReductionOneAuto3Test.h index 48c71dc79d7330fb2e302020d8d049909e9b8b75..2041bcb2bf2b65226eecb16d0747376d0f861f87 100644 --- a/Framework/Algorithms/test/ReflectometryReductionOneAuto3Test.h +++ b/Framework/Algorithms/test/ReflectometryReductionOneAuto3Test.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -1594,9 +1594,8 @@ public: } private: - MatrixWorkspace_sptr - createFloodWorkspace(Mantid::Geometry::Instrument_const_sptr instrument, - size_t n = 4) { + MatrixWorkspace_sptr createFloodWorkspace( + const Mantid::Geometry::Instrument_const_sptr &instrument, size_t n = 4) { size_t detid = 1; auto flood = create2DWorkspace(int(n), 1); if (n == 4) { diff --git a/Framework/Algorithms/test/ReflectometrySumInQTest.h b/Framework/Algorithms/test/ReflectometrySumInQTest.h index 5bd889efc48cb9c464ed04b44342af15c1aa2124..08f40af60478f3ca42e6dd8387a404ba060a8bff 100644 --- a/Framework/Algorithms/test/ReflectometrySumInQTest.h +++ b/Framework/Algorithms/test/ReflectometrySumInQTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -29,7 +29,7 @@ public: static void destroySuite(ReflectometrySumInQTest *suite) { delete suite; } static Mantid::API::MatrixWorkspace_sptr - convertToWavelength(Mantid::API::MatrixWorkspace_sptr ws) { + convertToWavelength(const Mantid::API::MatrixWorkspace_sptr &ws) { using namespace Mantid; auto toWavelength = API::AlgorithmManager::Instance().createUnmanaged("ConvertUnits"); @@ -44,7 +44,7 @@ public: } static Mantid::API::MatrixWorkspace_sptr - detectorsOnly(Mantid::API::MatrixWorkspace_sptr ws) { + detectorsOnly(const Mantid::API::MatrixWorkspace_sptr &ws) { using namespace Mantid; auto &specturmInfo = ws->spectrumInfo(); std::vector<size_t> detectorIndices; diff --git a/Framework/Algorithms/test/RegroupTest.h b/Framework/Algorithms/test/RegroupTest.h index a1145c6d898a51f7ac26bc32028bba4ac468b074..c23ac8cb779ed4fe6ddf40305fc4e4d4c7a18701 100644 --- a/Framework/Algorithms/test/RegroupTest.h +++ b/Framework/Algorithms/test/RegroupTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/RemoveBackgroundTest.h b/Framework/Algorithms/test/RemoveBackgroundTest.h index 8274e7f1352a1e8942b5611a214e1238ffff1d04..ecf58b6c8f4bc998b51915b8bc6c98ce8c793ed0 100644 --- a/Framework/Algorithms/test/RemoveBackgroundTest.h +++ b/Framework/Algorithms/test/RemoveBackgroundTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/RemoveBinsTest.h b/Framework/Algorithms/test/RemoveBinsTest.h index ec4ad2f6d436298b4b34784d57f7c021aedf6d58..982f1c2e9c70170020c314e49086a990a5214a87 100644 --- a/Framework/Algorithms/test/RemoveBinsTest.h +++ b/Framework/Algorithms/test/RemoveBinsTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/RemoveLowResTOFTest.h b/Framework/Algorithms/test/RemoveLowResTOFTest.h index dc06d4bee6d504d12141885f82874bd33536b33a..d332578bed373a603676f13a03bbd1c1946f3f69 100644 --- a/Framework/Algorithms/test/RemoveLowResTOFTest.h +++ b/Framework/Algorithms/test/RemoveLowResTOFTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -31,7 +31,7 @@ private: int NUMPIXELS; int NUMBINS; - void makeFakeEventWorkspace(std::string wsName) { + void makeFakeEventWorkspace(const std::string &wsName) { // Make an event workspace with 2 events in each bin. EventWorkspace_sptr test_in = WorkspaceCreationHelper::createEventWorkspace( NUMPIXELS, NUMBINS, NUMBINS, 0.0, BIN_DELTA, 2); diff --git a/Framework/Algorithms/test/RemoveMaskedSpectraTest.h b/Framework/Algorithms/test/RemoveMaskedSpectraTest.h index 08fb0681112cc9f27c8a6efc4b32e1b875cc9971..8d182e7a87aca95db1efb99421d37029b032bbf1 100644 --- a/Framework/Algorithms/test/RemoveMaskedSpectraTest.h +++ b/Framework/Algorithms/test/RemoveMaskedSpectraTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -106,7 +106,7 @@ private: return space; } - void maskWorkspace(MatrixWorkspace_sptr ws) { + void maskWorkspace(const MatrixWorkspace_sptr &ws) { std::vector<int> spectra(3); spectra[0] = 1; spectra[1] = 3; @@ -119,8 +119,8 @@ private: } MatrixWorkspace_sptr - runAlgorithm(MatrixWorkspace_sptr inputWS, - MatrixWorkspace_sptr maskedWS = MatrixWorkspace_sptr()) { + runAlgorithm(const MatrixWorkspace_sptr &inputWS, + const MatrixWorkspace_sptr &maskedWS = MatrixWorkspace_sptr()) { // Name of the output workspace. std::string outWSName("RemoveMaskedSpectraTest_OutputWS"); diff --git a/Framework/Algorithms/test/RemovePromptPulseTest.h b/Framework/Algorithms/test/RemovePromptPulseTest.h index 99330cdce0978ff6519aa8d15341b7309b9915bc..e21a5651c8c481332d79589bc8c4b8b70a93e06b 100644 --- a/Framework/Algorithms/test/RemovePromptPulseTest.h +++ b/Framework/Algorithms/test/RemovePromptPulseTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -32,7 +32,7 @@ private: std::string inWSName; std::string outWSName; - void makeFakeEventWorkspace(std::string wsName) { + void makeFakeEventWorkspace(const std::string &wsName) { // Make an event workspace with 2 events in each bin. EventWorkspace_sptr test_in = WorkspaceCreationHelper::createEventWorkspace( NUMPIXELS, NUMBINS, NUMEVENTS, 1000., BIN_DELTA, 2); diff --git a/Framework/Algorithms/test/RemoveSpectraTest.h b/Framework/Algorithms/test/RemoveSpectraTest.h index 7a7653aa5c7adbfdb451a2a3ebdab39a4fa5478b..dd158032d81b0124329189a56e102e775e786756 100644 --- a/Framework/Algorithms/test/RemoveSpectraTest.h +++ b/Framework/Algorithms/test/RemoveSpectraTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/RemoveWorkspaceHistoryTest.h b/Framework/Algorithms/test/RemoveWorkspaceHistoryTest.h index e8935ac4a0940e5ebe2f63704dcfd90ba9c9b760..81ff558e5e32928516f89fbb1e7f8ac6df267579 100644 --- a/Framework/Algorithms/test/RemoveWorkspaceHistoryTest.h +++ b/Framework/Algorithms/test/RemoveWorkspaceHistoryTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -64,7 +64,7 @@ private: } }; - void createWorkspace(std::string wsName) { + void createWorkspace(const std::string &wsName) { // create a fake workspace for testing boost::shared_ptr<WorkspaceTester> input = boost::make_shared<WorkspaceTester>(); diff --git a/Framework/Algorithms/test/RenameWorkspaceTest.h b/Framework/Algorithms/test/RenameWorkspaceTest.h index aba09fd97e2467881a05c0c0869228a7787e3b36..1e376f799d26fe8b9fae2261f05392dd26b4b664 100644 --- a/Framework/Algorithms/test/RenameWorkspaceTest.h +++ b/Framework/Algorithms/test/RenameWorkspaceTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/RenameWorkspacesTest.h b/Framework/Algorithms/test/RenameWorkspacesTest.h index 65ae02085bf6f600942c58b5491a69a2b753ec96..d6fc888b869293a703f48ac1bfb9c24f8c076022 100644 --- a/Framework/Algorithms/test/RenameWorkspacesTest.h +++ b/Framework/Algorithms/test/RenameWorkspacesTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/ReplaceSpecialValuesTest.h b/Framework/Algorithms/test/ReplaceSpecialValuesTest.h index 674d5fb4437ab33b97bef05eda491153f517ee9d..ff1ef4fe38df6dde1db5ca7edd60c9a1fda377fd 100644 --- a/Framework/Algorithms/test/ReplaceSpecialValuesTest.h +++ b/Framework/Algorithms/test/ReplaceSpecialValuesTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -247,8 +247,9 @@ public: AnalysisDataService::Instance().remove("InputWS"); } - void checkValues(MatrixWorkspace_sptr inputWS, MatrixWorkspace_sptr result, - bool naNCheck, bool infCheck) { + void checkValues(const MatrixWorkspace_sptr &inputWS, + const MatrixWorkspace_sptr &result, bool naNCheck, + bool infCheck) { for (size_t i = 0; i < result->getNumberHistograms(); ++i) { for (int j = 1; j < 5; ++j) { diff --git a/Framework/Algorithms/test/ResampleXTest.h b/Framework/Algorithms/test/ResampleXTest.h index 6c82616832ed70d4828fcc54b52af95e6a6aa469..bb64a2500391e63add5f7ab23d0c17b0ca0125db 100644 --- a/Framework/Algorithms/test/ResampleXTest.h +++ b/Framework/Algorithms/test/ResampleXTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -221,7 +221,6 @@ public: vector<double> xmins = alg.getProperty("XMin"); vector<double> xmaxs = alg.getProperty("XMax"); int nBins = alg.getProperty("NumberBins"); - double deltaBin; // Define tolerance for ASSERT_DELTA double tolerance = 1.0e-10; @@ -230,7 +229,8 @@ public: for (int yIndex = 0; yIndex < ylen; ++yIndex) { // The bin width for the current spectrum - deltaBin = (xmaxs[yIndex] - xmins[yIndex]) / static_cast<double>(nBins); + double deltaBin = + (xmaxs[yIndex] - xmins[yIndex]) / static_cast<double>(nBins); // Check the axes lengths TS_ASSERT_EQUALS(outWS->x(yIndex).size(), nBins + 1); @@ -344,7 +344,6 @@ public: vector<double> xmins = alg.getProperty("XMin"); vector<double> xmaxs = alg.getProperty("XMax"); int nBins = alg.getProperty("NumberBins"); - double deltaBin; // Define tolerance for ASSERT_DELTA double tolerance = 1.0e-10; @@ -354,7 +353,8 @@ public: for (int yIndex = 0; yIndex < ylen; ++yIndex) { // The bin width for the current spectrum - deltaBin = (xmaxs[yIndex] - xmins[yIndex]) / static_cast<double>(nBins); + double deltaBin = + (xmaxs[yIndex] - xmins[yIndex]) / static_cast<double>(nBins); // Check the axes lengths TS_ASSERT_EQUALS(outWS->x(yIndex).size(), nBins + 1); diff --git a/Framework/Algorithms/test/ResetNegativesTest.h b/Framework/Algorithms/test/ResetNegativesTest.h index b88eb49ae27821d5d189188b22fe3acb53cb7a86..53d9a20f67877919d277fbb139aff2c31d76443f 100644 --- a/Framework/Algorithms/test/ResetNegativesTest.h +++ b/Framework/Algorithms/test/ResetNegativesTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/ResizeRectangularDetectorTest.h b/Framework/Algorithms/test/ResizeRectangularDetectorTest.h index eb7d9ea9e07ae35be21b53ae65b552eed80d6fb2..f1859863e7d41ac1c83167d0a1ea0ac63bba3597 100644 --- a/Framework/Algorithms/test/ResizeRectangularDetectorTest.h +++ b/Framework/Algorithms/test/ResizeRectangularDetectorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/RingProfileTest.h b/Framework/Algorithms/test/RingProfileTest.h index bfc348bf17d27698385c9c2a00897a798cce43b3..3580725c7c232e49a8c2d9a46b817019a8aa22ef 100644 --- a/Framework/Algorithms/test/RingProfileTest.h +++ b/Framework/Algorithms/test/RingProfileTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -41,12 +41,12 @@ public: // centre must be 2 or 3 values (x,y) or (x,y,z) std::vector<double> justOne(1); justOne[0] = -0.35; - // TS_ASSERT_THROWS(alg.setProperty("Centre",justOne), - // const std::invalid_argument &); + TS_ASSERT_THROWS(alg.setProperty("Centre", justOne), + const std::invalid_argument &); std::vector<double> fourInputs(4, -0.45); - // TS_ASSERT_THROWS(alg.setProperty("Centre", fourInputs), - // const std::invalid_argument &); + TS_ASSERT_THROWS(alg.setProperty("Centre", fourInputs), + const std::invalid_argument &); TS_ASSERT_THROWS_NOTHING( alg.setPropertyValue("OutputWorkspace", outWSName)); diff --git a/Framework/Algorithms/test/RunCombinationHelperTest.h b/Framework/Algorithms/test/RunCombinationHelperTest.h index deda22de601efbdd1b5d4924889fc622eac1357b..e2319d0eefe4615a7ed86f452a11d99cc47e104f 100644 --- a/Framework/Algorithms/test/RunCombinationHelperTest.h +++ b/Framework/Algorithms/test/RunCombinationHelperTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -187,7 +187,7 @@ public: } private: - void setUnits(MatrixWorkspace_sptr ws) { + void setUnits(const MatrixWorkspace_sptr &ws) { ws->getAxis(0)->unit() = UnitFactory::Instance().create("TOF"); ws->getAxis(1)->unit() = UnitFactory::Instance().create("Momentum"); ws->setYUnit("Counts"); diff --git a/Framework/Algorithms/test/SANSCollimationLengthEstimatorTest.h b/Framework/Algorithms/test/SANSCollimationLengthEstimatorTest.h index ff8014b1cfb38d6df47f0289b8f30e3fb19e7e6a..8ee9edd6fa851d536185c2a73151e19067b511e8 100644 --- a/Framework/Algorithms/test/SANSCollimationLengthEstimatorTest.h +++ b/Framework/Algorithms/test/SANSCollimationLengthEstimatorTest.h @@ -1,14 +1,16 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidAlgorithms/AddSampleLog.h" #include "MantidAlgorithms/SANSCollimationLengthEstimator.h" #include <cxxtest/TestSuite.h> +#include <utility> + #include "MantidGeometry/Instrument.h" #include "MantidGeometry/Instrument/Detector.h" #include "MantidGeometry/Objects/CSGObject.h" @@ -71,8 +73,8 @@ createTestInstrument(const Mantid::detid_t id, * Set the instrument parameters */ void setInstrumentParametersForTOFSANS( - const Mantid::API::MatrixWorkspace_sptr ws, std::string methodType = "", - double collimationLengthCorrection = 20, + const Mantid::API::MatrixWorkspace_sptr &ws, + const std::string &methodType = "", double collimationLengthCorrection = 20, double collimationLengthIncrement = 2, double guideCutoff = 130, double numberOfGuides = 5) { auto &pmap = ws->instrumentParameters(); @@ -106,8 +108,8 @@ void setInstrumentParametersForTOFSANS( /* * Add a timer series sample log */ -void addSampleLog(Mantid::API::MatrixWorkspace_sptr workspace, - std::string sampleLogName, double value, +void addSampleLog(const Mantid::API::MatrixWorkspace_sptr &workspace, + const std::string &sampleLogName, double value, unsigned int length) { auto timeSeries = new Mantid::Kernel::TimeSeriesProperty<double>(sampleLogName); @@ -124,7 +126,7 @@ void addSampleLog(Mantid::API::MatrixWorkspace_sptr workspace, */ Mantid::API::MatrixWorkspace_sptr createTestWorkspace( const size_t nhist, const double x0, const double x1, const double dx, - std::string methodType = "", double collimationLengthCorrection = 20, + const std::string &methodType = "", double collimationLengthCorrection = 20, double collimationLengthIncrement = 2, double guideCutoff = 130, double numberOfGuides = 5, V3D sourcePosition = V3D(0.0, 0.0, -25.0), V3D samplePosition = V3D(0.0, 0.0, 0.0), @@ -142,8 +144,8 @@ Mantid::API::MatrixWorkspace_sptr createTestWorkspace( // Set the instrument parameters setInstrumentParametersForTOFSANS( - ws2d, methodType, collimationLengthCorrection, collimationLengthIncrement, - guideCutoff, numberOfGuides); + ws2d, std::move(methodType), collimationLengthCorrection, + collimationLengthIncrement, guideCutoff, numberOfGuides); // Add sample log details if (!guideLogDetails.empty()) { diff --git a/Framework/Algorithms/test/SampleLogsBehaviourTest.h b/Framework/Algorithms/test/SampleLogsBehaviourTest.h index a5766678635d127cf90575eb37ff551a0acd6912..3cc82415ad85894cd16e19cfb99b924ee337d026 100644 --- a/Framework/Algorithms/test/SampleLogsBehaviourTest.h +++ b/Framework/Algorithms/test/SampleLogsBehaviourTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -221,7 +221,7 @@ public: return ws; } - void testLogUnits(MatrixWorkspace_sptr ws) { + void testLogUnits(const MatrixWorkspace_sptr &ws) { // All units must not have changed: TS_ASSERT_EQUALS(ws->getLog("A")->units(), "A_unit") TS_ASSERT_EQUALS(ws->getLog("B")->units(), "B_unit") diff --git a/Framework/Algorithms/test/SassenaFFTTest.h b/Framework/Algorithms/test/SassenaFFTTest.h index 663dc5df74203d36ee7869cfb430cf399aecc21d..575614655df6803eaef1c98dc986764b04012675 100644 --- a/Framework/Algorithms/test/SassenaFFTTest.h +++ b/Framework/Algorithms/test/SassenaFFTTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -176,7 +176,6 @@ private: const double frErr = 1E-03; // allowed fractional error const size_t nspectra = ws->getNumberHistograms(); MantidVec yv, xv; - double factor; // remove the detailed balance condition for (size_t i = 0; i < nspectra; i++) { double goldStandard = ps2meV * (1 + static_cast<double>(i)) * @@ -186,7 +185,7 @@ private: size_t index = nbins / 2; // This position should yield ws->readX(i).at(index)==0.0 double x = ws->readX(i).at(index); - factor = exp(exponentFactor * x); + double factor = exp(exponentFactor * x); double h = yv.at(index) * exp(x); xv = ws->readX(i); MantidVec::iterator itx = xv.begin(); @@ -212,9 +211,8 @@ private: */ void Gaussian(MantidVec &xv, MantidVec &yv, const double &Heigth, const double &sigma) { - double z; for (size_t i = 0; i < xv.size(); i++) { - z = xv[i] / sigma; + double z = xv[i] / sigma; yv[i] = Heigth * exp(-z * z / 2.0); } } // void Gaussian @@ -250,12 +248,11 @@ private: xv.emplace_back(dt * static_cast<double>(j)); } - double sigma; MantidVec yv(nbins); // each spectra is a gaussian of same Height but different stdev for (size_t i = 0; i < nspectra; i++) { ws->mutableX(i) = xv; - sigma = sigma0 / (1 + static_cast<double>(i)); + double sigma = sigma0 / (1 + static_cast<double>(i)); this->Gaussian(xv, yv, Heigth, sigma); ws->mutableY(i) = yv; } diff --git a/Framework/Algorithms/test/ScaleTest.h b/Framework/Algorithms/test/ScaleTest.h index ab0d8c607b054ea65fcdccd975b687479678c972..973f48ebc645eca819f5c1a5bb9843aa42906f0e 100644 --- a/Framework/Algorithms/test/ScaleTest.h +++ b/Framework/Algorithms/test/ScaleTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -127,7 +127,7 @@ private: } } - void doTestScaleWithDx(std::string type, bool outIsIn = false) { + void doTestScaleWithDx(const std::string &type, bool outIsIn = false) { // Arrange const double xValue = 1.222; const double value = 5; diff --git a/Framework/Algorithms/test/ScaleXTest.h b/Framework/Algorithms/test/ScaleXTest.h index 9b984233e51633b966fe8beda52c5b806a0c6bd8..3d80da5640e88f5b4ef5e0aeee4e397fb0d239ef 100644 --- a/Framework/Algorithms/test/ScaleXTest.h +++ b/Framework/Algorithms/test/ScaleXTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/SetInstrumentParameterTest.h b/Framework/Algorithms/test/SetInstrumentParameterTest.h index d5d49a3b33eda8987f31d3e2db4de6c747e1526e..7da3ec3c0c43653401003b55f3346ae955e678ca 100644 --- a/Framework/Algorithms/test/SetInstrumentParameterTest.h +++ b/Framework/Algorithms/test/SetInstrumentParameterTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -173,10 +173,10 @@ public: } MatrixWorkspace_sptr - ExecuteAlgorithm(MatrixWorkspace_sptr testWS, std::string cmptName, - std::string detList, std::string paramName, - std::string paramValue, std::string paramType = "", - bool fails = false) { + ExecuteAlgorithm(MatrixWorkspace_sptr testWS, const std::string &cmptName, + const std::string &detList, const std::string ¶mName, + const std::string ¶mValue, + const std::string ¶mType = "", bool fails = false) { // add the workspace to the ADS AnalysisDataService::Instance().addOrReplace( "SetInstrumentParameter_Temporary", testWS); diff --git a/Framework/Algorithms/test/SetUncertaintiesTest.h b/Framework/Algorithms/test/SetUncertaintiesTest.h index 14f805401e150a12fc9e7b69ece012f6c680cd48..02ac7f9fbac25d88d2d3f24a0727cb857d9c0b99 100644 --- a/Framework/Algorithms/test/SetUncertaintiesTest.h +++ b/Framework/Algorithms/test/SetUncertaintiesTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -55,6 +55,38 @@ public: return outWS; } + /** + * Create and execute the algorithm in the specified mode. + * @param mode The name of the SetError property SetUncertainties + * @return The name that the output workspace will be registered as. + */ + API::MatrixWorkspace_sptr runAlgInPlace(const std::string &mode) { + // random data mostly works + auto inWksp = WorkspaceCreationHelper::create1DWorkspaceRand(30, true); + // Ensure first elements of random workspace are zero so test don't + // pass randomly + auto &E = inWksp->mutableE(0); + E[0] = 0.; + auto &Y = inWksp->mutableY(0); + Y[1] = 0.; // stress sqrtOrOne + + std::string outWSname = "SetUncertainties_" + mode; + WorkspaceCreationHelper::storeWS(outWSname, inWksp); + SetUncertainties alg; + TS_ASSERT_THROWS_NOTHING(alg.initialize()); + alg.setProperty("InputWorkspace", inWksp); + alg.setProperty("SetError", mode); + alg.setProperty("OutputWorkspace", outWSname); + TS_ASSERT_THROWS_NOTHING(alg.execute()); + TS_ASSERT(alg.isExecuted()); + + const auto outWS = + API::AnalysisDataService::Instance().retrieveWS<API::MatrixWorkspace>( + outWSname); + TS_ASSERT(bool(outWS)); // non-null pointer + return outWS; + } + API::MatrixWorkspace_sptr runAlgCustom(const double toSet, const double toReplace, const double errorVal, const int precision, const int position) { @@ -97,6 +129,17 @@ public: API::AnalysisDataService::Instance().remove(outWS->getName()); } + void test_zero_in_place() { + const auto outWS = runAlgInPlace("zero"); + + const auto &E = outWS->e(0); + for (const auto item : E) { + TS_ASSERT_EQUALS(item, 0.); + } + + API::AnalysisDataService::Instance().remove(outWS->getName()); + } + void test_sqrt() { const auto outWS = runAlg("sqrt"); @@ -109,6 +152,18 @@ public: API::AnalysisDataService::Instance().remove(outWS->getName()); } + void test_sqrt_in_place() { + const auto outWS = runAlgInPlace("sqrt"); + + const auto &E = outWS->e(0); + const auto &Y = outWS->y(0); + for (size_t i = 0; i < E.size(); ++i) { + TS_ASSERT_DELTA(Y[i], E[i] * E[i], .001); + } + + API::AnalysisDataService::Instance().remove(outWS->getName()); + } + void test_oneIfZero() { const auto outWS = runAlg("oneIfZero"); @@ -119,6 +174,16 @@ public: API::AnalysisDataService::Instance().remove(outWS->getName()); } + void test_oneIfZero_in_place() { + const auto outWS = runAlgInPlace("oneIfZero"); + + const auto &E = outWS->e(0); + for (const auto item : E) { + TS_ASSERT(item > 0.); + } + API::AnalysisDataService::Instance().remove(outWS->getName()); + } + void test_sqrtOrOne() { const auto outWS = runAlg("sqrtOrOne"); @@ -131,7 +196,21 @@ public: TS_ASSERT_DELTA(Y[i], E[i] * E[i], .001); } } + API::AnalysisDataService::Instance().remove(outWS->getName()); + } + + void test_sqrtOrOne_in_place() { + const auto outWS = runAlgInPlace("sqrtOrOne"); + const auto &E = outWS->e(0); + const auto &Y = outWS->y(0); + for (size_t i = 0; i < E.size(); ++i) { + if (Y[i] == 0.) { + TS_ASSERT_EQUALS(E[i], 1.); + } else { + TS_ASSERT_DELTA(Y[i], E[i] * E[i], .001); + } + } API::AnalysisDataService::Instance().remove(outWS->getName()); } @@ -201,6 +280,42 @@ public: } API::AnalysisDataService::Instance().remove(outWS->getName()); } + + /** + * Create and execute the algorithm in the specified mode. + * @param mode The name of the SetError property SetUncertainties + * @return The name that the output workspace will be registered as. + */ + void test_EventWorkspacePlace() { + // random data mostly works + auto inWksp = + WorkspaceCreationHelper::createEventWorkspaceWithFullInstrument2(10, + 10); + std::string outWSname = "SetUncertainties_oneIfZero"; + WorkspaceCreationHelper::storeWS(outWSname, inWksp); + SetUncertainties alg; + TS_ASSERT_THROWS_NOTHING(alg.initialize()); + alg.setProperty("InputWorkspace", inWksp); + alg.setProperty("SetError", "oneIfZero"); + alg.setProperty("OutputWorkspace", outWSname); + TS_ASSERT_THROWS_NOTHING(alg.execute()); + TS_ASSERT(alg.isExecuted()); + + const auto outWS = + API::AnalysisDataService::Instance().retrieveWS<API::MatrixWorkspace>( + outWSname); + TS_ASSERT(bool(outWS)); // non-null pointer + + const auto &E = outWS->e(0); + const auto &Y = outWS->y(0); + for (size_t i = 0; i < E.size(); ++i) { + if (Y[i] == 0.) { + TS_ASSERT_EQUALS(E[i], 1.); + } else { + TS_ASSERT_DELTA(Y[i], E[i] * E[i], .001); + } + } + } }; class SetUncertaintiesTestPerformance : public CxxTest::TestSuite { diff --git a/Framework/Algorithms/test/ShiftLogTimeTest.h b/Framework/Algorithms/test/ShiftLogTimeTest.h index fd6dfdc2c92fc1756aab38587dfd87f309fa5e5e..64a2111fe9bc2436c6c01a0e780e7fbea9b3640c 100644 --- a/Framework/Algorithms/test/ShiftLogTimeTest.h +++ b/Framework/Algorithms/test/ShiftLogTimeTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -61,7 +61,7 @@ private: * @param in_name Name of the input workspace. * @param out_name Name of the output workspace. */ - void verify(const std::string in_name, const std::string out_name, + void verify(const std::string &in_name, const std::string &out_name, const int shift) { DateAndTime start(start_str); diff --git a/Framework/Algorithms/test/SignalOverErrorTest.h b/Framework/Algorithms/test/SignalOverErrorTest.h index 43050829f4ad29912ab8a3cf3b0f6b9e6dab3642..a7bb2f94cb62d84261cbd2610d3f985ac7cd976e 100644 --- a/Framework/Algorithms/test/SignalOverErrorTest.h +++ b/Framework/Algorithms/test/SignalOverErrorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/SmoothDataTest.h b/Framework/Algorithms/test/SmoothDataTest.h index 2a79a31d5fac1ceb647036fe6326cf94cd511395..191d43839e4dfc04a74665bfd296b27116636773 100644 --- a/Framework/Algorithms/test/SmoothDataTest.h +++ b/Framework/Algorithms/test/SmoothDataTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/SmoothNeighboursTest.h b/Framework/Algorithms/test/SmoothNeighboursTest.h index c80d9ba1abf1dfbf66a5cab25f29fa5e23b2354f..39ede25745d951215e9a66babd91ad89e57189ea 100644 --- a/Framework/Algorithms/test/SmoothNeighboursTest.h +++ b/Framework/Algorithms/test/SmoothNeighboursTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -21,7 +21,7 @@ using namespace Mantid::Algorithms; class SmoothNeighboursTest : public CxxTest::TestSuite { public: - void doTestWithNumberOfNeighbours(std::string WeightedSum = "Flat") { + void doTestWithNumberOfNeighbours(const std::string &WeightedSum = "Flat") { MatrixWorkspace_sptr inWS = WorkspaceCreationHelper::create2DWorkspaceWithFullInstrument(100, 10); @@ -75,7 +75,7 @@ public: } void do_test_non_uniform(EventType type, double *expectedY, - std::string WeightedSum = "Parabolic", + const std::string &WeightedSum = "Parabolic", bool PreserveEvents = true, double Radius = 0.001, bool ConvertTo2D = false, int numberOfNeighbours = 8) { @@ -158,7 +158,7 @@ public: } void do_test_rectangular(EventType type, double *expectedY, - std::string WeightedSum = "Parabolic", + const std::string &WeightedSum = "Parabolic", bool PreserveEvents = true, bool ConvertTo2D = false) { // Pixels will be spaced 0.008 apart. diff --git a/Framework/Algorithms/test/SofQCommonTest.h b/Framework/Algorithms/test/SofQCommonTest.h index de4f33c2bd1df8f975d922f03e65a74183ab290a..d2aae6161915092f9bd60b6a3703590489e4ae7a 100644 --- a/Framework/Algorithms/test/SofQCommonTest.h +++ b/Framework/Algorithms/test/SofQCommonTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -257,7 +257,7 @@ private: return std::sqrt(ki * ki + kf * kf - 2. * ki * kf * std::cos(twoTheta)); } - static void setEFixed(Mantid::API::MatrixWorkspace_sptr ws, + static void setEFixed(const Mantid::API::MatrixWorkspace_sptr &ws, const std::string &component, const double eFixed) { using namespace Mantid; auto alg = API::AlgorithmManager::Instance().createUnmanaged( diff --git a/Framework/Algorithms/test/SofQWCentreTest.h b/Framework/Algorithms/test/SofQWCentreTest.h index 2958844c1cef6889bc4ac182d310ff89d0dcfa98..430d81c612c1e53adb108f839bb77dbdecb7b737 100644 --- a/Framework/Algorithms/test/SofQWCentreTest.h +++ b/Framework/Algorithms/test/SofQWCentreTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/SofQWCutTest.h b/Framework/Algorithms/test/SofQWCutTest.h index e9c4bbef3b675b06f444f8a02f0e597d96cce632..7ceff9d068e735f627d44c313227cd0fa311c5c6 100644 --- a/Framework/Algorithms/test/SofQWCutTest.h +++ b/Framework/Algorithms/test/SofQWCutTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/SofQWNormalisedPolygonTest.h b/Framework/Algorithms/test/SofQWNormalisedPolygonTest.h index efe58551b9ded14ed0ecde381be90a8d992d6d5b..88c965eb97bc846e232c37df3b48f81cd5eba9c1 100644 --- a/Framework/Algorithms/test/SofQWNormalisedPolygonTest.h +++ b/Framework/Algorithms/test/SofQWNormalisedPolygonTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -236,6 +236,7 @@ public: TS_ASSERT_THROWS_NOTHING(alg.setProperty("EMode", "Indirect")) TS_ASSERT_THROWS_NOTHING(alg.setProperty("EFixed", 1.84)) const double dE{0.3}; + // cppcheck-suppress unreadVariable const std::vector<double> eBinParams{dE}; std::vector<double> expectedEBinEdges; const auto firstEdge = inWS->x(0).front(); @@ -364,9 +365,10 @@ public: * @param twoThetaRanges input table workspace * @return the algorithm object */ - IAlgorithm_sptr setUpAlg( - Mantid::API::MatrixWorkspace_sptr const inputWS, - boost::shared_ptr<Mantid::DataObjects::TableWorkspace> twoThetaRanges) { + IAlgorithm_sptr + setUpAlg(Mantid::API::MatrixWorkspace_sptr const &inputWS, + const boost::shared_ptr<Mantid::DataObjects::TableWorkspace> + &twoThetaRanges) { const std::vector<double> qBinParams{0.023}; IAlgorithm_sptr alg = AlgorithmManager::Instance().create("SofQWNormalisedPolygon"); @@ -384,7 +386,7 @@ public: * @return A pointer to the table workspace */ boost::shared_ptr<Mantid::DataObjects::TableWorkspace> - createTableWorkspace(const std::vector<std::string> dataTypes, + createTableWorkspace(const std::vector<std::string> &dataTypes, const int rowCount) { auto twoThetaRanges = boost::make_shared<TableWorkspace>(); std::vector<std::string> names = {"Detector ID", "Max two theta", diff --git a/Framework/Algorithms/test/SofQWPolygonTest.h b/Framework/Algorithms/test/SofQWPolygonTest.h index 612e1d310f054e59686e874c73c2398d55a046e5..94ecd05568ec6a16129da872adffdf5bac3988e3 100644 --- a/Framework/Algorithms/test/SofQWPolygonTest.h +++ b/Framework/Algorithms/test/SofQWPolygonTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/SofQWTest.h b/Framework/Algorithms/test/SofQWTest.h index cad78b7a6f1115dc12ebe1e2855df0d15cd5a33d..6cae2bef8eafc3ba3ce1fd70232f5dba04f023de 100644 --- a/Framework/Algorithms/test/SofQWTest.h +++ b/Framework/Algorithms/test/SofQWTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/SolidAngleTest.h b/Framework/Algorithms/test/SolidAngleTest.h index 05078159b24252e6cc6d67777afdcc3459d0201a..dc64b47dd9d8f3e508f2be42440b17c5824b4f40 100644 --- a/Framework/Algorithms/test/SolidAngleTest.h +++ b/Framework/Algorithms/test/SolidAngleTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -213,7 +213,7 @@ public: auto spectrumInfo2 = output2D_2->spectrumInfo(); for (size_t i = 0; i < numberOfSpectra1; i++) { // all values after the start point of the second workspace should match - if (!(spectrumInfo2.isMasked(i) || spectrumInfo2.isMasked(i))) { + if (!(spectrumInfo1.isMasked(i) || spectrumInfo2.isMasked(i))) { TS_ASSERT_EQUALS(output2D_1->y(i)[0], output2D_2->y(i)[0]); } } diff --git a/Framework/Algorithms/test/SortEventsTest.h b/Framework/Algorithms/test/SortEventsTest.h index c202fcfff89491277b7a1380a2c355fcefc5adb1..a02ebf53888436c4401b0c2b33be0ca34b5b7b8f 100644 --- a/Framework/Algorithms/test/SortEventsTest.h +++ b/Framework/Algorithms/test/SortEventsTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/SortXAxisTest.h b/Framework/Algorithms/test/SortXAxisTest.h index 556c324cfe90acab66a16bc23be03bce7757aa30..e434edcda3a65e3a5be51873a6cb083fd6072b89 100644 --- a/Framework/Algorithms/test/SortXAxisTest.h +++ b/Framework/Algorithms/test/SortXAxisTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/SparseInstrumentTest.h b/Framework/Algorithms/test/SparseInstrumentTest.h index 6a150e6ea718c510eab274782e634d7c1798a584..8758616d4e91985fe4f5b4133dfc0f3d0fc855ad 100644 --- a/Framework/Algorithms/test/SparseInstrumentTest.h +++ b/Framework/Algorithms/test/SparseInstrumentTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/SpatialGroupingTest.h b/Framework/Algorithms/test/SpatialGroupingTest.h index 42e0059ed2141ec393718b4a5adf828bf67507f4..de9125cefa7e9bbbfa93df0cff6f3475f1f516fc 100644 --- a/Framework/Algorithms/test/SpatialGroupingTest.h +++ b/Framework/Algorithms/test/SpatialGroupingTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/SpecularReflectionAlgorithmTest.h b/Framework/Algorithms/test/SpecularReflectionAlgorithmTest.h index 4f4e416211e172ff8c0c7ec10950cc3d79cb9b40..45e7009a10f72edace3376620e0d9c15e88fc0a8 100644 --- a/Framework/Algorithms/test/SpecularReflectionAlgorithmTest.h +++ b/Framework/Algorithms/test/SpecularReflectionAlgorithmTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /* * SpecularReflectionAlgorithmTest.h @@ -68,7 +68,8 @@ protected: } VerticalHorizontalOffsetType determine_vertical_and_horizontal_offsets( - MatrixWorkspace_sptr ws, std::string detectorName = "point-detector") { + const MatrixWorkspace_sptr &ws, + const std::string &detectorName = "point-detector") { auto instrument = ws->getInstrument(); const V3D pointDetector = instrument->getComponentByName(detectorName)->getPos(); diff --git a/Framework/Algorithms/test/SpecularReflectionCalculateTheta2Test.h b/Framework/Algorithms/test/SpecularReflectionCalculateTheta2Test.h index fcd3a3b3538e3b7537c517563c774ccbd9b20c64..d09b66e2dce5ebfba41ed592b80cfab4dfccf81f 100644 --- a/Framework/Algorithms/test/SpecularReflectionCalculateTheta2Test.h +++ b/Framework/Algorithms/test/SpecularReflectionCalculateTheta2Test.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/SpecularReflectionCalculateThetaTest.h b/Framework/Algorithms/test/SpecularReflectionCalculateThetaTest.h index c1e70bc07e1bf9b6adc7338bf26ef4aa844f21d6..c3d6f11c71ee3eea5325f13848308dde67886ce0 100644 --- a/Framework/Algorithms/test/SpecularReflectionCalculateThetaTest.h +++ b/Framework/Algorithms/test/SpecularReflectionCalculateThetaTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/SpecularReflectionPositionCorrect2Test.h b/Framework/Algorithms/test/SpecularReflectionPositionCorrect2Test.h index 3ce55fa7187658fc33140896ac10ddf747b0dba7..a128d69e746be79653155f57b5b323503029e312 100644 --- a/Framework/Algorithms/test/SpecularReflectionPositionCorrect2Test.h +++ b/Framework/Algorithms/test/SpecularReflectionPositionCorrect2Test.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/SpecularReflectionPositionCorrectTest.h b/Framework/Algorithms/test/SpecularReflectionPositionCorrectTest.h index f659df0559507b2ebd59ca1654fd28cdfddc3c64..3f91a26dd6d820dc23b0d9a1250ef29b080285d3 100644 --- a/Framework/Algorithms/test/SpecularReflectionPositionCorrectTest.h +++ b/Framework/Algorithms/test/SpecularReflectionPositionCorrectTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -15,6 +15,7 @@ #include "MantidKernel/V3D.h" #include "MantidTestHelpers/WorkspaceCreationHelper.h" #include <cmath> +#include <utility> using Mantid::Algorithms::SpecularReflectionPositionCorrect; using namespace Mantid::API; @@ -181,9 +182,9 @@ public: sampleToDetectorBeamOffset, 1e-6); } - void - do_test_correct_point_detector_position(std::string detectorFindProperty = "", - std::string stringValue = "") { + void do_test_correct_point_detector_position( + const std::string &detectorFindProperty = "", + const std::string &stringValue = "") { MatrixWorkspace_sptr toConvert = pointDetectorWS; const double thetaInDegrees = 10.0; // Desired theta in degrees. @@ -240,8 +241,8 @@ public: } double do_test_correct_line_detector_position( - std::vector<int> specNumbers, double thetaInDegrees, - std::string detectorName = "lineardetector", + const std::vector<int> &specNumbers, double thetaInDegrees, + const std::string &detectorName = "lineardetector", bool strictSpectrumCheck = true) { auto toConvert = this->linearDetectorWS; @@ -258,7 +259,7 @@ public: VerticalHorizontalOffsetType offsetTupleCorrected = determine_vertical_and_horizontal_offsets( - corrected, detectorName); // Positions after correction + corrected, std::move(detectorName)); // Positions after correction const double sampleToDetectorVerticalOffsetCorrected = offsetTupleCorrected.get<0>(); diff --git a/Framework/Algorithms/test/SphericalAbsorptionTest.h b/Framework/Algorithms/test/SphericalAbsorptionTest.h index e68ae76899ee5445e1201bf3779198f6f08466ab..add3c2d2e82bb175d5fc2572d28e71e278f42b6d 100644 --- a/Framework/Algorithms/test/SphericalAbsorptionTest.h +++ b/Framework/Algorithms/test/SphericalAbsorptionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/Stitch1DManyTest.h b/Framework/Algorithms/test/Stitch1DManyTest.h index abbe9f2c94872e1d2ff4bde52dd5ead9630c1a42..bacff25f1164adbcd032ea793de476dd7b8626e7 100644 --- a/Framework/Algorithms/test/Stitch1DManyTest.h +++ b/Framework/Algorithms/test/Stitch1DManyTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -45,7 +45,7 @@ private: * @param outWSName :: output workspace name used if running CreateWorkspace */ void createUniformWorkspace(double xstart, double deltax, double value1, - double value2, std::string outWSName, + double value2, const std::string &outWSName, bool runAlg = false) { const int nbins = 10; @@ -108,7 +108,8 @@ private: * @param inputWSNames :: input workspaces names * @param outputWSName :: output workspace name */ - void doGroupWorkspaces(std::string inputWSNames, std::string outWSName) { + void doGroupWorkspaces(const std::string &inputWSNames, + const std::string &outWSName) { GroupWorkspaces gw; gw.initialize(); gw.setProperty("InputWorkspaces", inputWSNames); @@ -123,7 +124,7 @@ private: * @param inputWS :: the input workspace * @return vector of names of algorithm histories */ - std::vector<std::string> getHistory(MatrixWorkspace_sptr inputWS) { + std::vector<std::string> getHistory(const MatrixWorkspace_sptr &inputWS) { std::vector<std::string> histNames; auto histories = inputWS->history().getAlgorithmHistories(); for (auto &hist : histories) { diff --git a/Framework/Algorithms/test/Stitch1DTest.h b/Framework/Algorithms/test/Stitch1DTest.h index c1c92ce1645383641f24a24840ae178f9143c767..16f9bb649bf1d0b8a15f4e6298b8ad98b1f0381f 100644 --- a/Framework/Algorithms/test/Stitch1DTest.h +++ b/Framework/Algorithms/test/Stitch1DTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/StripPeaksTest.h b/Framework/Algorithms/test/StripPeaksTest.h index acba998cdd9e79d3af7b9a1190738eb57eca0a7c..37442a1c42f22f7e3c7e941c784b2dcf857e6466 100644 --- a/Framework/Algorithms/test/StripPeaksTest.h +++ b/Framework/Algorithms/test/StripPeaksTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/StripVanadiumPeaks2Test.h b/Framework/Algorithms/test/StripVanadiumPeaks2Test.h index ec97911c6fb999ef5435f3742661534f3d1bf05b..b5bc4e699a34dd1280a1160cf4af75608f28ce70 100644 --- a/Framework/Algorithms/test/StripVanadiumPeaks2Test.h +++ b/Framework/Algorithms/test/StripVanadiumPeaks2Test.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/StripVanadiumPeaksTest.h b/Framework/Algorithms/test/StripVanadiumPeaksTest.h index 3ff482acc903caaa67d8007d1dd4cf737d9cb6f7..c8fe9cb02e70048c42c0463657f790accb330296 100644 --- a/Framework/Algorithms/test/StripVanadiumPeaksTest.h +++ b/Framework/Algorithms/test/StripVanadiumPeaksTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/SumEventsByLogValueTest.h b/Framework/Algorithms/test/SumEventsByLogValueTest.h index 52de4a7c6d3a0e24b3e39e3a10aa0a47517482c1..a9e70c20a661f82da72d32a21d65816a2d45597d 100644 --- a/Framework/Algorithms/test/SumEventsByLogValueTest.h +++ b/Framework/Algorithms/test/SumEventsByLogValueTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/SumNeighboursTest.h b/Framework/Algorithms/test/SumNeighboursTest.h index c941045fcccaed686d2c60c6da7355119e36b693..44ee94516e22e0853963a302f263d7f5edb867fb 100644 --- a/Framework/Algorithms/test/SumNeighboursTest.h +++ b/Framework/Algorithms/test/SumNeighboursTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/SumOverlappingTubesTest.h b/Framework/Algorithms/test/SumOverlappingTubesTest.h index f6e108f655b24fe86e239bb5259ea819decf6a22..af23cd66dd389bfadb652d3b4a486ed105a7e09c 100644 --- a/Framework/Algorithms/test/SumOverlappingTubesTest.h +++ b/Framework/Algorithms/test/SumOverlappingTubesTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -34,8 +34,8 @@ using namespace Mantid::Types::Core; namespace { MatrixWorkspace_sptr createTestScanningWS(size_t nTubes, size_t nPixelsPerTube, - std::vector<double> rotations, - std::string name = "testWS") { + const std::vector<double> &rotations, + const std::string &name = "testWS") { const auto instrument = ComponentCreationHelper::createInstrumentWithPSDTubes( nTubes, nPixelsPerTube, true); size_t nTimeIndexes = rotations.size(); @@ -131,7 +131,7 @@ public: TS_ASSERT_DELTA(yAxis->getValue(i), 0.003 * double(i), 1e-6) } - void verifySpectraHaveSameCounts(MatrixWorkspace_sptr outWS, + void verifySpectraHaveSameCounts(const MatrixWorkspace_sptr &outWS, double expectedCounts = 2.0, double expectedErrors = sqrt(2.0), bool checkErrors = true) { @@ -143,7 +143,7 @@ public: } } - void verifySpectraCountsForScan(MatrixWorkspace_sptr outWS) { + void verifySpectraCountsForScan(const MatrixWorkspace_sptr &outWS) { size_t bin = 0; for (size_t j = 0; j < N_PIXELS_PER_TUBE; ++j) { TS_ASSERT_DELTA(outWS->getSpectrum(j).y()[bin], 2.0, 1e-6) @@ -697,9 +697,8 @@ public: auto outWS = boost::dynamic_pointer_cast<Mantid::API::MatrixWorkspace>( AnalysisDataService::Instance().retrieve("outWS")); - const auto &xAxis = outWS->getAxis(0); - TS_ASSERT_EQUALS(xAxis->length(), 296) - const auto &yAxis = outWS->getAxis(1); + auto yAxis = outWS->getAxis(1); + TS_ASSERT_EQUALS(outWS->getAxis(0)->length(), 296) TS_ASSERT_EQUALS(yAxis->length(), 256) for (size_t i = 0; i < 256; i++) { @@ -735,9 +734,8 @@ public: auto outWS = boost::dynamic_pointer_cast<Mantid::API::MatrixWorkspace>( AnalysisDataService::Instance().retrieve("outWS")); - const auto &xAxis = outWS->getAxis(0); - TS_ASSERT_EQUALS(xAxis->length(), 296) - const auto &yAxis = outWS->getAxis(1); + auto yAxis = outWS->getAxis(1); + TS_ASSERT_EQUALS(outWS->getAxis(0)->length(), 296) TS_ASSERT_EQUALS(yAxis->length(), 256) for (size_t i = 0; i < 256; i++) { diff --git a/Framework/Algorithms/test/SumRowColumnTest.h b/Framework/Algorithms/test/SumRowColumnTest.h index ee38bb09ae972367cfdca46ed4b61aea72e3e797..13001ca51829fbb3e3d648b4c3ccf5e911bbf42f 100644 --- a/Framework/Algorithms/test/SumRowColumnTest.h +++ b/Framework/Algorithms/test/SumRowColumnTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/SumSpectraTest.h b/Framework/Algorithms/test/SumSpectraTest.h index df9b783ffc5280e431eaee16b22fe6adbb9a0535..664c39b90ea42fbdb745a723d4a78c058fc439cc 100644 --- a/Framework/Algorithms/test/SumSpectraTest.h +++ b/Framework/Algorithms/test/SumSpectraTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -277,8 +277,8 @@ public: const std::runtime_error &); } - void dotestExecEvent(std::string inName, std::string outName, - std::string indices_list) { + void dotestExecEvent(const std::string &inName, const std::string &outName, + const std::string &indices_list) { int numPixels = 100; int numBins = 20; int numEvents = 20; @@ -568,7 +568,6 @@ public: testSig = std::sqrt(testSig); // Set the properties alg2.setProperty("InputWorkspace", tws); - const std::string outputSpace2 = "SumSpectraOut2"; alg2.setPropertyValue("OutputWorkspace", outName); alg2.setProperty("IncludeMonitors", false); alg2.setProperty("WeightedSum", true); diff --git a/Framework/Algorithms/test/TOFSANSResolutionByPixelCalculatorTest.h b/Framework/Algorithms/test/TOFSANSResolutionByPixelCalculatorTest.h index f11f16b8ef41ee1cbe25ca784837d693519e4c6d..0cf9e03c524a8f52e18b14eeb7f17f617a9cb929 100644 --- a/Framework/Algorithms/test/TOFSANSResolutionByPixelCalculatorTest.h +++ b/Framework/Algorithms/test/TOFSANSResolutionByPixelCalculatorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/TOFSANSResolutionByPixelTest.h b/Framework/Algorithms/test/TOFSANSResolutionByPixelTest.h index aabc739f6f26031f174d1bf756dab7b2f9e823f1..38dee4681567ffd99cd9f40ca7186b98cd16e888 100644 --- a/Framework/Algorithms/test/TOFSANSResolutionByPixelTest.h +++ b/Framework/Algorithms/test/TOFSANSResolutionByPixelTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -22,6 +22,7 @@ #include "boost/shared_ptr.hpp" #include <stdexcept> +#include <utility> using namespace Mantid::Algorithms; using Mantid::Kernel::V3D; @@ -82,8 +83,8 @@ createTestInstrument(const Mantid::detid_t id, * Set the instrument parameters */ void setInstrumentParametersForTOFSANS( - const Mantid::API::MatrixWorkspace_sptr ws, std::string methodType = "", - double collimationLengthCorrection = 20, + const Mantid::API::MatrixWorkspace_sptr &ws, + const std::string &methodType = "", double collimationLengthCorrection = 20, double collimationLengthIncrement = 2, double guideCutoff = 130, double numberOfGuides = 5) { auto &pmap = ws->instrumentParameters(); @@ -117,8 +118,8 @@ void setInstrumentParametersForTOFSANS( /* * Add a timer series sample log */ -void addSampleLog(Mantid::API::MatrixWorkspace_sptr workspace, - std::string sampleLogName, double value, +void addSampleLog(const Mantid::API::MatrixWorkspace_sptr &workspace, + const std::string &sampleLogName, double value, unsigned int length) { auto timeSeries = new Mantid::Kernel::TimeSeriesProperty<double>(sampleLogName); @@ -135,7 +136,7 @@ void addSampleLog(Mantid::API::MatrixWorkspace_sptr workspace, */ Mantid::API::MatrixWorkspace_sptr createTestWorkspace( const size_t nhist, const double x0, const double x1, const double dx, - std::string methodType = "", bool isModerator = false, + const std::string &methodType = "", bool isModerator = false, double collimationLengthCorrection = 20, double collimationLengthIncrement = 2, double guideCutoff = 130, double numberOfGuides = 5, V3D sourcePosition = V3D(0.0, 0.0, -25.0), @@ -163,8 +164,8 @@ Mantid::API::MatrixWorkspace_sptr createTestWorkspace( // Set the instrument parameters setInstrumentParametersForTOFSANS( - ws2d, methodType, collimationLengthCorrection, collimationLengthIncrement, - guideCutoff, numberOfGuides); + ws2d, std::move(methodType), collimationLengthCorrection, + collimationLengthIncrement, guideCutoff, numberOfGuides); // Add sample log details if (!guideLogDetails.empty()) { diff --git a/Framework/Algorithms/test/TimeAtSampleStrategyDirectTest.h b/Framework/Algorithms/test/TimeAtSampleStrategyDirectTest.h index 932ddcf48fec00b6f6496a94d3d4a7f7c404673f..08f33e4748b84613950b01276c5804d0f19f69ed 100644 --- a/Framework/Algorithms/test/TimeAtSampleStrategyDirectTest.h +++ b/Framework/Algorithms/test/TimeAtSampleStrategyDirectTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/TimeAtSampleStrategyElasticTest.h b/Framework/Algorithms/test/TimeAtSampleStrategyElasticTest.h index bc7fc711585ee18959a39de58e2464d15f8c5179..fc3a2b832d5ec82b70c5eb518803ce70ae4a370a 100644 --- a/Framework/Algorithms/test/TimeAtSampleStrategyElasticTest.h +++ b/Framework/Algorithms/test/TimeAtSampleStrategyElasticTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/TimeAtSampleStrategyIndirectTest.h b/Framework/Algorithms/test/TimeAtSampleStrategyIndirectTest.h index c288239d834c21769340ec515c193a7c73691c52..6dd3bbe6e92fdd8a4d4e488ebf8a7ebd1e09abbf 100644 --- a/Framework/Algorithms/test/TimeAtSampleStrategyIndirectTest.h +++ b/Framework/Algorithms/test/TimeAtSampleStrategyIndirectTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/TransposeTest.h b/Framework/Algorithms/test/TransposeTest.h index 3db677a8f24366b751736f0bc0adb191beb27ab5..a6f52e8dd30aa2d20d45066c47f3fe1a31e86ddb 100644 --- a/Framework/Algorithms/test/TransposeTest.h +++ b/Framework/Algorithms/test/TransposeTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/UnGroupWorkspaceTest.h b/Framework/Algorithms/test/UnGroupWorkspaceTest.h index c326d11f2aeb0886c8a99356395d6c3c4a394c5a..f4da145b9deade0639d13fa1e01d7ca306970dd2 100644 --- a/Framework/Algorithms/test/UnGroupWorkspaceTest.h +++ b/Framework/Algorithms/test/UnGroupWorkspaceTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/UnaryOperationTest.h b/Framework/Algorithms/test/UnaryOperationTest.h index f522242c8c17750a8cb5c867729a50a6c9de9537..c7eafc829542b6efe377a5da8399645b1ffa15ad 100644 --- a/Framework/Algorithms/test/UnaryOperationTest.h +++ b/Framework/Algorithms/test/UnaryOperationTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/UnwrapMonitorTest.h b/Framework/Algorithms/test/UnwrapMonitorTest.h index 0b1dac4c796662fbb738c48b48a67636975f3532..dd1193aae0da8bc5e38e149f241df72fae125dbb 100644 --- a/Framework/Algorithms/test/UnwrapMonitorTest.h +++ b/Framework/Algorithms/test/UnwrapMonitorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -175,7 +175,7 @@ private: // Run the algorithm and do some basic checks. Returns the output workspace. MatrixWorkspace_const_sptr - runAlgorithm(UnwrapMonitor &algo, const MatrixWorkspace_const_sptr inWS) { + runAlgorithm(UnwrapMonitor &algo, const MatrixWorkspace_const_sptr &inWS) { // run the algorithm TS_ASSERT(algo.execute()); TS_ASSERT(algo.isExecuted()); diff --git a/Framework/Algorithms/test/UnwrapMonitorsInTOFTest.h b/Framework/Algorithms/test/UnwrapMonitorsInTOFTest.h index ee913d66d9e76673c24c7c67899a9e31312939dc..93796ba9cbfd2896ef0f086a582dfc3e6ff39d37 100644 --- a/Framework/Algorithms/test/UnwrapMonitorsInTOFTest.h +++ b/Framework/Algorithms/test/UnwrapMonitorsInTOFTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/UnwrapSNSTest.h b/Framework/Algorithms/test/UnwrapSNSTest.h index 93146a70533468aa72e3c556dd230b19a9b9204d..15838fe963cf43899a1deaf80e9bc02ee88e5912 100644 --- a/Framework/Algorithms/test/UnwrapSNSTest.h +++ b/Framework/Algorithms/test/UnwrapSNSTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -29,7 +29,7 @@ private: int NUMPIXELS; int NUMBINS; - void makeFakeEventWorkspace(std::string wsName) { + void makeFakeEventWorkspace(const std::string &wsName) { // Make an event workspace with 2 events in each bin. EventWorkspace_sptr test_in = WorkspaceCreationHelper::createEventWorkspace( NUMPIXELS, NUMBINS, NUMBINS, 0.0, BIN_DELTA, 2); diff --git a/Framework/Algorithms/test/VesuvioL1ThetaResolutionTest.h b/Framework/Algorithms/test/VesuvioL1ThetaResolutionTest.h index e5cce3926879658fe2edfb9a40681adb688aedec..df7d1c9d9030d020c1cb70d4eacf8a0a0dc6fef6 100644 --- a/Framework/Algorithms/test/VesuvioL1ThetaResolutionTest.h +++ b/Framework/Algorithms/test/VesuvioL1ThetaResolutionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -159,7 +159,7 @@ public: } private: - void validateFullResolutionWorkspace(MatrixWorkspace_sptr ws) { + void validateFullResolutionWorkspace(const MatrixWorkspace_sptr &ws) { NumericAxis *xAxis = dynamic_cast<NumericAxis *>(ws->getAxis(0)); TS_ASSERT(xAxis); if (xAxis) { @@ -177,7 +177,7 @@ private: } } - void validateFullDistributionWorkspace(MatrixWorkspace_sptr ws, + void validateFullDistributionWorkspace(const MatrixWorkspace_sptr &ws, const std::string &label) { NumericAxis *xAxis = dynamic_cast<NumericAxis *>(ws->getAxis(0)); TS_ASSERT(xAxis); diff --git a/Framework/Algorithms/test/WeightedMeanOfWorkspaceTest.h b/Framework/Algorithms/test/WeightedMeanOfWorkspaceTest.h index b1ab09c6917c8a1883792f36dd5939b91b8ed333..4094f3531d997ebfc018ce8ed99fe4b13fa38dce 100644 --- a/Framework/Algorithms/test/WeightedMeanOfWorkspaceTest.h +++ b/Framework/Algorithms/test/WeightedMeanOfWorkspaceTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/WeightedMeanTest.h b/Framework/Algorithms/test/WeightedMeanTest.h index 81354a1d7094acaf32931332cee14858b0cc226f..17b597ca21a037eaf7fd41ecb87548b12f24a6e5 100644 --- a/Framework/Algorithms/test/WeightedMeanTest.h +++ b/Framework/Algorithms/test/WeightedMeanTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/WeightingStrategyTest.h b/Framework/Algorithms/test/WeightingStrategyTest.h index 1ff2ac6138e89cf624cffd929b510b1048d8632e..9e884336cf260c177ceb4761faef842b703347d7 100644 --- a/Framework/Algorithms/test/WeightingStrategyTest.h +++ b/Framework/Algorithms/test/WeightingStrategyTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/WienerSmoothTest.h b/Framework/Algorithms/test/WienerSmoothTest.h index c828056a0b5ce384e8fdec9ab4786d36387c55e2..621d07e59b06ab0b71d6efe333887ba9a080a2cd 100644 --- a/Framework/Algorithms/test/WienerSmoothTest.h +++ b/Framework/Algorithms/test/WienerSmoothTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -580,7 +580,7 @@ private: } } - MatrixWorkspace_sptr runWienerSmooth(MatrixWorkspace_sptr inputWS, + MatrixWorkspace_sptr runWienerSmooth(const MatrixWorkspace_sptr &inputWS, const std::vector<int> &wsIndexList) { // Name of the output workspace. std::string outWSName("WienerSmoothTest_OutputWS"); diff --git a/Framework/Algorithms/test/WorkflowAlgorithmRunnerTest.h b/Framework/Algorithms/test/WorkflowAlgorithmRunnerTest.h index 49085833b60acfac3ef2d5bf0dbd0d83c73fb605..08544c0b3e18c9e4f27d14fb2b1d3a66e88b1be9 100644 --- a/Framework/Algorithms/test/WorkflowAlgorithmRunnerTest.h +++ b/Framework/Algorithms/test/WorkflowAlgorithmRunnerTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/WorkspaceCreationHelperTest.h b/Framework/Algorithms/test/WorkspaceCreationHelperTest.h index 532a6048e24833a5a25779f15cdc6cd2e1ad43e4..2bc73920235d96afa3f4045e24e6085c64f578c0 100644 --- a/Framework/Algorithms/test/WorkspaceCreationHelperTest.h +++ b/Framework/Algorithms/test/WorkspaceCreationHelperTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Algorithms/test/WorkspaceGroupTest.h b/Framework/Algorithms/test/WorkspaceGroupTest.h index 56d49b37e137b0695ae52ef12465c9c885dad6a8..f37adda4f3efba15d618576c4b4d94d0e6352597 100644 --- a/Framework/Algorithms/test/WorkspaceGroupTest.h +++ b/Framework/Algorithms/test/WorkspaceGroupTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -19,6 +19,7 @@ #include <Poco/File.h> #include <fstream> +#include <utility> using namespace Mantid::API; using namespace Mantid::Kernel; @@ -30,15 +31,18 @@ using Mantid::HistogramData::CountStandardDeviations; class WorkspaceGroupTest : public CxxTest::TestSuite { private: - void checkData(MatrixWorkspace_sptr work_in1, MatrixWorkspace_sptr work_in2, - MatrixWorkspace_sptr work_out1) { + void checkData(const MatrixWorkspace_sptr &work_in1, + const MatrixWorkspace_sptr &work_in2, + const MatrixWorkspace_sptr &work_out1) { // default to a horizontal loop orientation - checkData(work_in1, work_in2, work_out1, 0); + checkData(std::move(work_in1), std::move(work_in2), std::move(work_out1), + 0); } // loopOrientation 0=Horizontal, 1=Vertical - void checkData(MatrixWorkspace_sptr work_in1, MatrixWorkspace_sptr work_in2, - MatrixWorkspace_sptr work_out1, int loopOrientation) { + void checkData(const MatrixWorkspace_sptr &work_in1, + const MatrixWorkspace_sptr &work_in2, + const MatrixWorkspace_sptr &work_out1, int loopOrientation) { if (!work_in1 || !work_in2 || !work_out1) { TSM_ASSERT("One or more empty workspace pointers.", 0); return; @@ -63,9 +67,9 @@ private: } } - void checkDataItem(MatrixWorkspace_sptr work_in1, - MatrixWorkspace_sptr work_in2, - MatrixWorkspace_sptr work_out1, size_t i, + void checkDataItem(const MatrixWorkspace_sptr &work_in1, + const MatrixWorkspace_sptr &work_in2, + const MatrixWorkspace_sptr &work_out1, size_t i, size_t ws2Index) { double sig1 = work_in1->dataY(i / work_in1->blocksize())[i % work_in1->blocksize()]; diff --git a/Framework/Beamline/inc/MantidBeamline/ComponentInfo.h b/Framework/Beamline/inc/MantidBeamline/ComponentInfo.h index e53113d20e086ea294f64c997ad8956d14d930d3..c782ef84b8a51a791ad7cc4305e67cd93387d2e7 100644 --- a/Framework/Beamline/inc/MantidBeamline/ComponentInfo.h +++ b/Framework/Beamline/inc/MantidBeamline/ComponentInfo.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Beamline/inc/MantidBeamline/ComponentType.h b/Framework/Beamline/inc/MantidBeamline/ComponentType.h index 6efd623de62f0d7efdb865a24b14003df0fb0b82..238e0c1346120565de2d885a90d4dd66691c1042 100644 --- a/Framework/Beamline/inc/MantidBeamline/ComponentType.h +++ b/Framework/Beamline/inc/MantidBeamline/ComponentType.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Beamline/inc/MantidBeamline/DetectorInfo.h b/Framework/Beamline/inc/MantidBeamline/DetectorInfo.h index 8d382e15b10965f8507820ba287aae002044197b..1953966d386f57095c11f5dc3bb8ff5ce75f55f9 100644 --- a/Framework/Beamline/inc/MantidBeamline/DetectorInfo.h +++ b/Framework/Beamline/inc/MantidBeamline/DetectorInfo.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Beamline/inc/MantidBeamline/SpectrumInfo.h b/Framework/Beamline/inc/MantidBeamline/SpectrumInfo.h index f9cceec8bd9ffdc1cc7b8777bc8539521b71221f..5b6c22de7ee0066fbf7c64d318a91362b2d77ab9 100644 --- a/Framework/Beamline/inc/MantidBeamline/SpectrumInfo.h +++ b/Framework/Beamline/inc/MantidBeamline/SpectrumInfo.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -46,6 +46,7 @@ public: Kernel::cow_ptr<std::vector<SpectrumDefinition>> spectrumDefinition); size_t size() const; + size_t detectorCount() const; const SpectrumDefinition &spectrumDefinition(const size_t index) const; void setSpectrumDefinition(const size_t index, SpectrumDefinition def); diff --git a/Framework/Beamline/src/ComponentInfo.cpp b/Framework/Beamline/src/ComponentInfo.cpp index 43b52ab42773796092d858bc75eb98384bd51762..1195555a3714f88664fc58097088fb4120bd3558 100644 --- a/Framework/Beamline/src/ComponentInfo.cpp +++ b/Framework/Beamline/src/ComponentInfo.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidBeamline/ComponentInfo.h" #include "MantidBeamline/DetectorInfo.h" diff --git a/Framework/Beamline/src/DetectorInfo.cpp b/Framework/Beamline/src/DetectorInfo.cpp index 5c7e1ac94cad9d16a76df5b14afdca1e0d926934..4a85225473fbea2208b713179112375d7e152367 100644 --- a/Framework/Beamline/src/DetectorInfo.cpp +++ b/Framework/Beamline/src/DetectorInfo.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidBeamline/DetectorInfo.h" #include "MantidBeamline/ComponentInfo.h" diff --git a/Framework/Beamline/src/SpectrumInfo.cpp b/Framework/Beamline/src/SpectrumInfo.cpp index 9097d60b3c718a121e7c918db08586676081f5bd..5906a4f48e9a92d04376ea9acf2dccf15621ffbc 100644 --- a/Framework/Beamline/src/SpectrumInfo.cpp +++ b/Framework/Beamline/src/SpectrumInfo.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidBeamline/SpectrumInfo.h" #include "MantidKernel/make_cow.h" @@ -26,6 +26,15 @@ size_t SpectrumInfo::size() const { return m_spectrumDefinition->size(); } +/// Return count of all detectors used within spectrum +size_t SpectrumInfo::detectorCount() const { + size_t count = 0; + for (const auto &spec : *m_spectrumDefinition) { + count += spec.size(); + } + return count; +} + /// Returns a const reference to the SpectrumDefinition of the spectrum. const SpectrumDefinition & SpectrumInfo::spectrumDefinition(const size_t index) const { diff --git a/Framework/Beamline/test/CMakeLists.txt b/Framework/Beamline/test/CMakeLists.txt index 46943b28dbc4d505aff25f5798fb31d19dd0f4de..88effd3fb0179ef19a536ceca5c6a9e6f9632778 100644 --- a/Framework/Beamline/test/CMakeLists.txt +++ b/Framework/Beamline/test/CMakeLists.txt @@ -1,8 +1,6 @@ if(CXXTEST_FOUND) include_directories(SYSTEM ${CXXTEST_INCLUDE_DIR} - ${GMOCK_INCLUDE_DIR} - ${GTEST_INCLUDE_DIR} ../../TestHelpers/inc) cxxtest_add_test(BeamlineTest ${TEST_FILES} ${GMOCK_TEST_FILES}) @@ -12,8 +10,8 @@ if(CXXTEST_FOUND) ${TCMALLOC_LIBRARIES_LINKTIME} Beamline ${Boost_LIBRARIES} - ${GMOCK_LIBRARIES} - ${GTEST_LIBRARIES}) + gmock +) add_dependencies(FrameworkTests BeamlineTest) # Add to the 'FrameworkTests' group in VS diff --git a/Framework/Beamline/test/ComponentInfoTest.h b/Framework/Beamline/test/ComponentInfoTest.h index edd4c377eeb803fc47f96f430c0fbc904dee09ad..d86a60f45a44ecbd4a10deab302988c4eb8c4924 100644 --- a/Framework/Beamline/test/ComponentInfoTest.h +++ b/Framework/Beamline/test/ComponentInfoTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Beamline/test/DetectorInfoTest.h b/Framework/Beamline/test/DetectorInfoTest.h index c7d04a32b1dde9de3e5ca024ccf3f41a657548d7..57651424cc4d5d205c208ea40f714b4ea8952104 100644 --- a/Framework/Beamline/test/DetectorInfoTest.h +++ b/Framework/Beamline/test/DetectorInfoTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Beamline/test/SpectrumInfoTest.h b/Framework/Beamline/test/SpectrumInfoTest.h index 5bc006715f82de485cb58c86beb089eb74c0c640..e4bb67fefa47e9fc79a65083f903d58e3af85452 100644 --- a/Framework/Beamline/test/SpectrumInfoTest.h +++ b/Framework/Beamline/test/SpectrumInfoTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -107,4 +107,17 @@ public: (std::pair<size_t, size_t>(i, 0))); } } + + void test_detectorCount() { + SpectrumDefinition def1; + def1.add(1); + def1.add(2); + SpectrumDefinition def2; + def2.add(1); + SpectrumInfo info{2}; + info.setSpectrumDefinition(0, def1); + info.setSpectrumDefinition(1, def2); + TS_ASSERT_EQUALS(info.size(), 2); + TS_ASSERT_EQUALS(info.detectorCount(), 3); + } }; diff --git a/Framework/Catalog/inc/MantidCatalog/Exception.h b/Framework/Catalog/inc/MantidCatalog/Exception.h index 845301b2fcff519e53e8b6b6907307374990aeb8..b0cff37351853eb073460b5f2d50080690084c1c 100644 --- a/Framework/Catalog/inc/MantidCatalog/Exception.h +++ b/Framework/Catalog/inc/MantidCatalog/Exception.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Catalog/inc/MantidCatalog/OAuth.h b/Framework/Catalog/inc/MantidCatalog/OAuth.h index 8f9da95aebc9bb5faecf9cb244f44a2b67e5ec3a..5bbfcd92151b7f6b01aa7bd1bad47d59f177506d 100644 --- a/Framework/Catalog/inc/MantidCatalog/OAuth.h +++ b/Framework/Catalog/inc/MantidCatalog/OAuth.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Catalog/inc/MantidCatalog/ONCat.h b/Framework/Catalog/inc/MantidCatalog/ONCat.h index f2c80a8a4a9352ba16f485643ee0b0633c2475d7..b2a3dcb01e541cff127a21e44ebec447dfd2184d 100644 --- a/Framework/Catalog/inc/MantidCatalog/ONCat.h +++ b/Framework/Catalog/inc/MantidCatalog/ONCat.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Catalog/inc/MantidCatalog/ONCatEntity.h b/Framework/Catalog/inc/MantidCatalog/ONCatEntity.h index 8084eafc302a9cf9154f6ae9346e4c0d506c5c66..23ab7dceba63c9daf6d83ae7e0a4d116d2e7094c 100644 --- a/Framework/Catalog/inc/MantidCatalog/ONCatEntity.h +++ b/Framework/Catalog/inc/MantidCatalog/ONCatEntity.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Catalog/src/OAuth.cpp b/Framework/Catalog/src/OAuth.cpp index a2eeaedd1d6e4ab9f7ac87eebddabeb6fac4407e..745f129855861b60afd9e5778d800a1987c89acf 100644 --- a/Framework/Catalog/src/OAuth.cpp +++ b/Framework/Catalog/src/OAuth.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCatalog/OAuth.h" #include "MantidCatalog/Exception.h" diff --git a/Framework/Catalog/src/ONCat.cpp b/Framework/Catalog/src/ONCat.cpp index bd4abf2b6fce0200728a0d22f91853719a336a76..7fdd4bf5aacba7098df66911cc3dde6e0da78e2f 100644 --- a/Framework/Catalog/src/ONCat.cpp +++ b/Framework/Catalog/src/ONCat.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCatalog/ONCat.h" #include "MantidCatalog/Exception.h" diff --git a/Framework/Catalog/src/ONCatEntity.cpp b/Framework/Catalog/src/ONCatEntity.cpp index 5faa832bc696b95e36b35cb3b27337cfeea523ad..4b7882acc97fae9d997c549bdf5ed918c34dba13 100644 --- a/Framework/Catalog/src/ONCatEntity.cpp +++ b/Framework/Catalog/src/ONCatEntity.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCatalog/ONCatEntity.h" #include "MantidCatalog/Exception.h" diff --git a/Framework/Catalog/test/OAuthTest.h b/Framework/Catalog/test/OAuthTest.h index 3945a28b6afdb989c8a8cdc62bdc84283e72787a..a82787b15fc4ff681627148d449719290d0143a3 100644 --- a/Framework/Catalog/test/OAuthTest.h +++ b/Framework/Catalog/test/OAuthTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Catalog/test/ONCatEntityTest.h b/Framework/Catalog/test/ONCatEntityTest.h index bde922b1a06f5fe65c6328a9c4418d20f35bb206..67d4c0424ee7370e6bdfce473426f07470688bdb 100644 --- a/Framework/Catalog/test/ONCatEntityTest.h +++ b/Framework/Catalog/test/ONCatEntityTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Catalog/test/ONCatTest.h b/Framework/Catalog/test/ONCatTest.h index fbfd0ab14b31c4bb73aff570cc17b557dc7b4b47..e5dd6b14945e08ad9a0f264174b3b024e198c092 100644 --- a/Framework/Catalog/test/ONCatTest.h +++ b/Framework/Catalog/test/ONCatTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/inc/MantidCrystal/AddPeakHKL.h b/Framework/Crystal/inc/MantidCrystal/AddPeakHKL.h index dc68c10e4c12725aefbccc210d0ebe915f0b2ed0..e039a17f94e3562d9c81bbc9c2ad13319c69d026 100644 --- a/Framework/Crystal/inc/MantidCrystal/AddPeakHKL.h +++ b/Framework/Crystal/inc/MantidCrystal/AddPeakHKL.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/inc/MantidCrystal/AnvredCorrection.h b/Framework/Crystal/inc/MantidCrystal/AnvredCorrection.h index d0650c26c0a3a56268f9103408cd8f73f62ae21b..a2bf815d0ddf5a5bedbe2d2e1052190f971f1dc7 100644 --- a/Framework/Crystal/inc/MantidCrystal/AnvredCorrection.h +++ b/Framework/Crystal/inc/MantidCrystal/AnvredCorrection.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -112,11 +112,11 @@ private: void BuildLamdaWeights(); double absor_sphere(double &twoth, double &wl); void scale_init(const Geometry::IDetector &det, - Geometry::Instrument_const_sptr inst, double &L2, + const Geometry::Instrument_const_sptr &inst, double &L2, double &depth, double &pathlength, std::string &bankName); void scale_exec(std::string &bankName, double &lambda, double &depth, - Geometry::Instrument_const_sptr inst, double &pathlength, - double &value); + const Geometry::Instrument_const_sptr &inst, + double &pathlength, double &value); double m_smu; ///< linear scattering coefficient in 1/cm double m_amu; ///< linear absoprtion coefficient in 1/cm diff --git a/Framework/Crystal/inc/MantidCrystal/BackgroundStrategy.h b/Framework/Crystal/inc/MantidCrystal/BackgroundStrategy.h index 4d46a1d80a7218c1d13c2e9b5fe8e5bd872ec774..5e570ec8a88dd66bf93501376a61e497bbf9cf36 100644 --- a/Framework/Crystal/inc/MantidCrystal/BackgroundStrategy.h +++ b/Framework/Crystal/inc/MantidCrystal/BackgroundStrategy.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/inc/MantidCrystal/CalculatePeaksHKL.h b/Framework/Crystal/inc/MantidCrystal/CalculatePeaksHKL.h index 023969faa9db8ffee996d704ca8883bc3f4339cd..e712e460cc9da4d9eef6d43d78a022331af53b21 100644 --- a/Framework/Crystal/inc/MantidCrystal/CalculatePeaksHKL.h +++ b/Framework/Crystal/inc/MantidCrystal/CalculatePeaksHKL.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/inc/MantidCrystal/CalculateUMatrix.h b/Framework/Crystal/inc/MantidCrystal/CalculateUMatrix.h index f375b68df9d2b0be6d5ffa5134abf2f0cd7e36bd..19e9065e65e41bdbfdd693be26e66972a18d76c6 100644 --- a/Framework/Crystal/inc/MantidCrystal/CalculateUMatrix.h +++ b/Framework/Crystal/inc/MantidCrystal/CalculateUMatrix.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/inc/MantidCrystal/CalibrationHelpers.h b/Framework/Crystal/inc/MantidCrystal/CalibrationHelpers.h index 7166405769d8837d1741ef122ae548134a046bd0..f58eba9515a6246224c6c5b576b3857367e956cc 100644 --- a/Framework/Crystal/inc/MantidCrystal/CalibrationHelpers.h +++ b/Framework/Crystal/inc/MantidCrystal/CalibrationHelpers.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/inc/MantidCrystal/CentroidPeaks.h b/Framework/Crystal/inc/MantidCrystal/CentroidPeaks.h index 02ffbd8b28c59bf6ba6a97ca72d1c2bf40834a40..8743887900901e9cab780c0c3e319661a67dcab5 100644 --- a/Framework/Crystal/inc/MantidCrystal/CentroidPeaks.h +++ b/Framework/Crystal/inc/MantidCrystal/CentroidPeaks.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -45,7 +45,7 @@ private: void exec() override; void integrate(); void integrateEvent(); - int findPixelID(std::string bankName, int col, int row); + int findPixelID(const std::string &bankName, int col, int row); void removeEdgePeaks(Mantid::DataObjects::PeaksWorkspace &peakWS); void sizeBanks(const std::string &bankName, int &nCols, int &nRows); Geometry::Instrument_const_sptr inst; diff --git a/Framework/Crystal/inc/MantidCrystal/ClearUB.h b/Framework/Crystal/inc/MantidCrystal/ClearUB.h index ab028bc0cfb98805980d17d5b5a3c0e3ad23b525..4e5d522c1d7d419d8b065a634bffe916ff936166 100644 --- a/Framework/Crystal/inc/MantidCrystal/ClearUB.h +++ b/Framework/Crystal/inc/MantidCrystal/ClearUB.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/inc/MantidCrystal/Cluster.h b/Framework/Crystal/inc/MantidCrystal/Cluster.h index 25807ae5f195b8d22ee7676b866e0034c9899f45..d2b5dd4b3622986f2ac6e3914ee0ca4a935325b3 100644 --- a/Framework/Crystal/inc/MantidCrystal/Cluster.h +++ b/Framework/Crystal/inc/MantidCrystal/Cluster.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/inc/MantidCrystal/ClusterRegister.h b/Framework/Crystal/inc/MantidCrystal/ClusterRegister.h index ab0ccd82cc19bc032464cd65a1c7eac9fc84cb18..421ff443dc2a6c192feda9dd3be661671287c4b6 100644 --- a/Framework/Crystal/inc/MantidCrystal/ClusterRegister.h +++ b/Framework/Crystal/inc/MantidCrystal/ClusterRegister.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/inc/MantidCrystal/CombinePeaksWorkspaces.h b/Framework/Crystal/inc/MantidCrystal/CombinePeaksWorkspaces.h index d9d766dced3005d19ca77912e9511e033e25e602..efddab9aafc1ccd54343c9bdfc3f877867e77943 100644 --- a/Framework/Crystal/inc/MantidCrystal/CombinePeaksWorkspaces.h +++ b/Framework/Crystal/inc/MantidCrystal/CombinePeaksWorkspaces.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/inc/MantidCrystal/CompositeCluster.h b/Framework/Crystal/inc/MantidCrystal/CompositeCluster.h index f56c8baeee0057d4790935e939fa1c940ae44d28..4eae6f7ebea7b411dbe27f140a648e150938f61a 100644 --- a/Framework/Crystal/inc/MantidCrystal/CompositeCluster.h +++ b/Framework/Crystal/inc/MantidCrystal/CompositeCluster.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/inc/MantidCrystal/ConnectedComponentLabeling.h b/Framework/Crystal/inc/MantidCrystal/ConnectedComponentLabeling.h index 7bb4c2325704b16e0114f1a5a653b42ebae3c1c3..f1eca3a25e337651c35edb51d7fb312974dcb2ac 100644 --- a/Framework/Crystal/inc/MantidCrystal/ConnectedComponentLabeling.h +++ b/Framework/Crystal/inc/MantidCrystal/ConnectedComponentLabeling.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -49,8 +49,9 @@ class MANTID_CRYSTAL_DLL ConnectedComponentLabeling { public: /// Constructor - ConnectedComponentLabeling(const size_t &startId = 1, - const boost::optional<int> nThreads = boost::none); + ConnectedComponentLabeling( + const size_t &startId = 1, + const boost::optional<int> &nThreads = boost::none); /// Getter for the start label id size_t getStartLabelId() const; @@ -79,7 +80,7 @@ private: /// Calculate the disjoint element tree across the image. ConnectedComponentMappingTypes::ClusterMap - calculateDisjointTree(Mantid::API::IMDHistoWorkspace_sptr ws, + calculateDisjointTree(const Mantid::API::IMDHistoWorkspace_sptr &ws, BackgroundStrategy *const baseStrategy, Mantid::API::Progress &progress) const; diff --git a/Framework/Crystal/inc/MantidCrystal/CountReflections.h b/Framework/Crystal/inc/MantidCrystal/CountReflections.h index 4edc680c9c4fcf002dfd5faed09402bf801061d9..c8d92a523c43901ba72a199340112fb6303c5092 100644 --- a/Framework/Crystal/inc/MantidCrystal/CountReflections.h +++ b/Framework/Crystal/inc/MantidCrystal/CountReflections.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/inc/MantidCrystal/DiffPeaksWorkspaces.h b/Framework/Crystal/inc/MantidCrystal/DiffPeaksWorkspaces.h index 78327fed033dc8d654b9961862e3e156a93d3622..829295d8b430c841b65308499d77133f34310306 100644 --- a/Framework/Crystal/inc/MantidCrystal/DiffPeaksWorkspaces.h +++ b/Framework/Crystal/inc/MantidCrystal/DiffPeaksWorkspaces.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/inc/MantidCrystal/DisjointElement.h b/Framework/Crystal/inc/MantidCrystal/DisjointElement.h index a6183f3f36a7e5a4cfd27091603a31b76156960f..c9f96305f652c2eb3d0bd1062cae490307e648af 100644 --- a/Framework/Crystal/inc/MantidCrystal/DisjointElement.h +++ b/Framework/Crystal/inc/MantidCrystal/DisjointElement.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/inc/MantidCrystal/FilterPeaks.h b/Framework/Crystal/inc/MantidCrystal/FilterPeaks.h index 2475f04ed5bb33ec9876ffe38b7823b0845168ec..b3e5df41a615e48c9b59ce4cdfc5c6c6dbb8bcae 100644 --- a/Framework/Crystal/inc/MantidCrystal/FilterPeaks.h +++ b/Framework/Crystal/inc/MantidCrystal/FilterPeaks.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/inc/MantidCrystal/FindClusterFaces.h b/Framework/Crystal/inc/MantidCrystal/FindClusterFaces.h index 1a6a2fc9bcbbe7287ffc2ce5da98e2f8c68130b0..232e67f76aa96b3622af2a92f781e3d314ece99f 100644 --- a/Framework/Crystal/inc/MantidCrystal/FindClusterFaces.h +++ b/Framework/Crystal/inc/MantidCrystal/FindClusterFaces.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/inc/MantidCrystal/FindSXPeaks.h b/Framework/Crystal/inc/MantidCrystal/FindSXPeaks.h index 9795f0a887e30dd9e64060987cf48cfeb3df284c..9fe6c3a4ba0c7ec81a274ef36d4b15c751843f33 100644 --- a/Framework/Crystal/inc/MantidCrystal/FindSXPeaks.h +++ b/Framework/Crystal/inc/MantidCrystal/FindSXPeaks.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -96,7 +96,7 @@ private: /// Check what x units this workspace has FindSXPeaksHelper::XAxisUnit getWorkspaceXAxisUnit( - Mantid::API::MatrixWorkspace_const_sptr workspace) const; + const Mantid::API::MatrixWorkspace_const_sptr &workspace) const; /// The value in X to start the search from double m_MinRange; diff --git a/Framework/Crystal/inc/MantidCrystal/FindSXPeaksHelper.h b/Framework/Crystal/inc/MantidCrystal/FindSXPeaksHelper.h index 0b0ba1ad7f28b7036357eeabfb9081aec73fd129..716c7a1c2e69ce5f07b230b6fb6deeb54cf57edc 100644 --- a/Framework/Crystal/inc/MantidCrystal/FindSXPeaksHelper.h +++ b/Framework/Crystal/inc/MantidCrystal/FindSXPeaksHelper.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/inc/MantidCrystal/FindUBUsingFFT.h b/Framework/Crystal/inc/MantidCrystal/FindUBUsingFFT.h index f45c05e90519fad5fbfb04403378180d5d008d4f..e7fd3bf1be8df7d78dd06f4f973022e5447ddf02 100644 --- a/Framework/Crystal/inc/MantidCrystal/FindUBUsingFFT.h +++ b/Framework/Crystal/inc/MantidCrystal/FindUBUsingFFT.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/inc/MantidCrystal/FindUBUsingIndexedPeaks.h b/Framework/Crystal/inc/MantidCrystal/FindUBUsingIndexedPeaks.h index 36e6e8ba9afe93fcb0091c1778cae6d4cc8ce0f4..305c0adccc857fe7edbe0bf466f69ecd812f0667 100644 --- a/Framework/Crystal/inc/MantidCrystal/FindUBUsingIndexedPeaks.h +++ b/Framework/Crystal/inc/MantidCrystal/FindUBUsingIndexedPeaks.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/inc/MantidCrystal/FindUBUsingLatticeParameters.h b/Framework/Crystal/inc/MantidCrystal/FindUBUsingLatticeParameters.h index cf826ffadacfa82e96c70a65f1b6c65bc3be6ddf..87ca66e08465c0e2c5effc7fb2a39af9595eb5a8 100644 --- a/Framework/Crystal/inc/MantidCrystal/FindUBUsingLatticeParameters.h +++ b/Framework/Crystal/inc/MantidCrystal/FindUBUsingLatticeParameters.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/inc/MantidCrystal/FindUBUsingMinMaxD.h b/Framework/Crystal/inc/MantidCrystal/FindUBUsingMinMaxD.h index 015713979f5dfa25f000e4a676eef3db5eff409f..18e0830de48a6c096074380ed079b2ad4d9f786c 100644 --- a/Framework/Crystal/inc/MantidCrystal/FindUBUsingMinMaxD.h +++ b/Framework/Crystal/inc/MantidCrystal/FindUBUsingMinMaxD.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/inc/MantidCrystal/GSLFunctions.h b/Framework/Crystal/inc/MantidCrystal/GSLFunctions.h index feac893ebeff545907aebddb37b4756d695868fa..4675bb3e66cebf39411ae291e69701f155955528 100644 --- a/Framework/Crystal/inc/MantidCrystal/GSLFunctions.h +++ b/Framework/Crystal/inc/MantidCrystal/GSLFunctions.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/inc/MantidCrystal/GoniometerAnglesFromPhiRotation.h b/Framework/Crystal/inc/MantidCrystal/GoniometerAnglesFromPhiRotation.h index ee7a1bfe60011f3587a146665eb3b53d6ce1a2f0..546318641f284cb407eae5cc1a055ff7c5c90c6a 100644 --- a/Framework/Crystal/inc/MantidCrystal/GoniometerAnglesFromPhiRotation.h +++ b/Framework/Crystal/inc/MantidCrystal/GoniometerAnglesFromPhiRotation.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /* * GoniometerAnglesFromPhiRotation.h diff --git a/Framework/Crystal/inc/MantidCrystal/HardThresholdBackground.h b/Framework/Crystal/inc/MantidCrystal/HardThresholdBackground.h index 8a47dd8b7376d8cfad88a196d1f19d92ace39724..010009867e6ba234c3a8d330949628320c74d245 100644 --- a/Framework/Crystal/inc/MantidCrystal/HardThresholdBackground.h +++ b/Framework/Crystal/inc/MantidCrystal/HardThresholdBackground.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/inc/MantidCrystal/HasUB.h b/Framework/Crystal/inc/MantidCrystal/HasUB.h index 8c7845c735a4f93645f946836aac2cf5f94820a0..4aba889bca751f7b6b072c2cb826dc46b90336b5 100644 --- a/Framework/Crystal/inc/MantidCrystal/HasUB.h +++ b/Framework/Crystal/inc/MantidCrystal/HasUB.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/inc/MantidCrystal/ICluster.h b/Framework/Crystal/inc/MantidCrystal/ICluster.h index 9e7ec19e8f39c9972701ef3afffb93ab9cc22c8a..911264dec29be8ae41fc222bd6fdb75ae7f67f1f 100644 --- a/Framework/Crystal/inc/MantidCrystal/ICluster.h +++ b/Framework/Crystal/inc/MantidCrystal/ICluster.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/inc/MantidCrystal/IndexPeaks.h b/Framework/Crystal/inc/MantidCrystal/IndexPeaks.h index 1fbc12b92ce197b0bd6e72eedb990927e86ca7f3..19eb28901042229264f2f12a3de70da970d943a9 100644 --- a/Framework/Crystal/inc/MantidCrystal/IndexPeaks.h +++ b/Framework/Crystal/inc/MantidCrystal/IndexPeaks.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidAPI/Algorithm.h" diff --git a/Framework/Crystal/inc/MantidCrystal/IndexSXPeaks.h b/Framework/Crystal/inc/MantidCrystal/IndexSXPeaks.h index afa749832ebf97e77abb979acb7b31d491661c81..1698015e4c99d208f0af9536a9e0c1d0e81a0a5b 100644 --- a/Framework/Crystal/inc/MantidCrystal/IndexSXPeaks.h +++ b/Framework/Crystal/inc/MantidCrystal/IndexSXPeaks.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -99,10 +99,10 @@ public: std::set<index> s1; std::set<index> s2; for (it1 = _hkls.begin(); it1 != _hkls.end(); - it1++) // All possible vectors for hkl on current instance + ++it1) // All possible vectors for hkl on current instance { for (it2 = rhs._hkls.begin(); it2 != rhs._hkls.end(); - it2++) // All possible vectors for hkl on other + ++it2) // All possible vectors for hkl on other { const index &index1 = *it1; const index &index2 = *it2; diff --git a/Framework/Crystal/inc/MantidCrystal/IntegratePeakTimeSlices.h b/Framework/Crystal/inc/MantidCrystal/IntegratePeakTimeSlices.h index 035692a3a0834b0b829ab6b975107bec81f645b3..4d12afaf42927217f7f374608967d6ff83d2d576 100644 --- a/Framework/Crystal/inc/MantidCrystal/IntegratePeakTimeSlices.h +++ b/Framework/Crystal/inc/MantidCrystal/IntegratePeakTimeSlices.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /* * IntegratePeakTimeSlices.h @@ -271,14 +271,14 @@ private: void SetUpData(API::MatrixWorkspace_sptr &Data, API::MatrixWorkspace_const_sptr const &inpWkSpace, - boost::shared_ptr<Geometry::IComponent> comp, + const boost::shared_ptr<Geometry::IComponent> &comp, const int chanMin, const int chanMax, double CentX, double CentY, Kernel::V3D &CentNghbr, double &neighborRadius, // from CentDet double Radius, std::string &spec_idList); - bool getNeighborPixIDs(boost::shared_ptr<Geometry::IComponent> comp, + bool getNeighborPixIDs(const boost::shared_ptr<Geometry::IComponent> &comp, Kernel::V3D &Center, double &Radius, int *&ArryofID); int CalculateTimeChannelSpan(Geometry::IPeak const &peak, const double dQ, diff --git a/Framework/Crystal/inc/MantidCrystal/IntegratePeaksHybrid.h b/Framework/Crystal/inc/MantidCrystal/IntegratePeaksHybrid.h index d58308e9ba259ec90d5fda46fd5615dd8f76d370..03b16170d09f685aef9538eda1142733d7227939 100644 --- a/Framework/Crystal/inc/MantidCrystal/IntegratePeaksHybrid.h +++ b/Framework/Crystal/inc/MantidCrystal/IntegratePeaksHybrid.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/inc/MantidCrystal/IntegratePeaksUsingClusters.h b/Framework/Crystal/inc/MantidCrystal/IntegratePeaksUsingClusters.h index 69759a3e56bba8944a0b97736d7abc690d97f461..f2a45c7bfdf180a4501d5f818a908b48aab479ec 100644 --- a/Framework/Crystal/inc/MantidCrystal/IntegratePeaksUsingClusters.h +++ b/Framework/Crystal/inc/MantidCrystal/IntegratePeaksUsingClusters.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/inc/MantidCrystal/LoadHKL.h b/Framework/Crystal/inc/MantidCrystal/LoadHKL.h index 2e43ff5f6ab01e7558ba19fb8eb0145c0946b2b9..86cee2978877cb2ec096a0cd7c91d2ee8df8860e 100644 --- a/Framework/Crystal/inc/MantidCrystal/LoadHKL.h +++ b/Framework/Crystal/inc/MantidCrystal/LoadHKL.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/inc/MantidCrystal/LoadIsawPeaks.h b/Framework/Crystal/inc/MantidCrystal/LoadIsawPeaks.h index 1a252c4b6bd407801b0594095a3bd978359c76fe..a98c1ce1e658346f6694d23c61016c9396d3fb76 100644 --- a/Framework/Crystal/inc/MantidCrystal/LoadIsawPeaks.h +++ b/Framework/Crystal/inc/MantidCrystal/LoadIsawPeaks.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -10,6 +10,7 @@ #include "MantidCrystal/DllConfig.h" #include "MantidDataObjects/PeaksWorkspace.h" #include "MantidGeometry/Instrument/DetectorInfo.h" +#include "MantidKernel/FileDescriptor.h" namespace Mantid { namespace Crystal { @@ -60,16 +61,16 @@ private: void exec() override; /// Reads first line of peaks file and returns first word of next line - std::string readHeader(Mantid::DataObjects::PeaksWorkspace_sptr outWS, + std::string readHeader(const Mantid::DataObjects::PeaksWorkspace_sptr &outWS, std::ifstream &in, double &T0); /// Read a single peak from peaks file - DataObjects::Peak readPeak(DataObjects::PeaksWorkspace_sptr outWS, + DataObjects::Peak readPeak(const DataObjects::PeaksWorkspace_sptr &outWS, std::string &lastStr, std::ifstream &in, int &seqNum, std::string bankName, double qSign); - int findPixelID(Geometry::Instrument_const_sptr inst, std::string bankName, - int col, int row); + int findPixelID(const Geometry::Instrument_const_sptr &inst, + const std::string &bankName, int col, int row); /// Read the header of a peak block section, returns first word of next line std::string readPeakBlockHeader(std::string lastStr, std::ifstream &in, @@ -77,20 +78,20 @@ private: double &phi, double &omega, double &monCount); /// Append peaks from given file to given workspace - void appendFile(Mantid::DataObjects::PeaksWorkspace_sptr outWS, - std::string filename); + void appendFile(const Mantid::DataObjects::PeaksWorkspace_sptr &outWS, + const std::string &filename); /// Compare number of peaks in given file to given workspace /// Throws std::length_error on mismatch - void checkNumberPeaks(Mantid::DataObjects::PeaksWorkspace_sptr outWS, - std::string filename); + void checkNumberPeaks(const Mantid::DataObjects::PeaksWorkspace_sptr &outWS, + const std::string &filename); /// Local cache of bank IComponents used in file std::map<std::string, boost::shared_ptr<const Geometry::IComponent>> m_banks; /// Retrieve cached bank (or load and cache for next time) boost::shared_ptr<const Geometry::IComponent> getCachedBankByName( - std::string bankname, + const std::string &bankname, const boost::shared_ptr<const Geometry::Instrument> &inst); }; diff --git a/Framework/Crystal/inc/MantidCrystal/LoadIsawSpectrum.h b/Framework/Crystal/inc/MantidCrystal/LoadIsawSpectrum.h index da50c81f73c8438a25f172bf0ec8699cacdfcb57..22f79b0d398fc3f55b132e879350673f99ebe492 100644 --- a/Framework/Crystal/inc/MantidCrystal/LoadIsawSpectrum.h +++ b/Framework/Crystal/inc/MantidCrystal/LoadIsawSpectrum.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/inc/MantidCrystal/LoadIsawUB.h b/Framework/Crystal/inc/MantidCrystal/LoadIsawUB.h index 7bb7c6542606cebeee8bba1a3de97f9365971c63..f68f1ce7d49a5a4deeb86637a98e8eef462a77f1 100644 --- a/Framework/Crystal/inc/MantidCrystal/LoadIsawUB.h +++ b/Framework/Crystal/inc/MantidCrystal/LoadIsawUB.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/inc/MantidCrystal/MaskPeaksWorkspace.h b/Framework/Crystal/inc/MantidCrystal/MaskPeaksWorkspace.h index 98c44c21b017f19b9332d914dab27e7edfb841a9..74a48aa5d575dadbae4cf83dc061f683c0d20698 100644 --- a/Framework/Crystal/inc/MantidCrystal/MaskPeaksWorkspace.h +++ b/Framework/Crystal/inc/MantidCrystal/MaskPeaksWorkspace.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -48,11 +48,11 @@ private: void init() override; void exec() override; std::size_t getWkspIndex(const detid2index_map &pixel_to_wi, - Geometry::IComponent_const_sptr comp, const int x, - const int y); + const Geometry::IComponent_const_sptr &comp, + const int x, const int y); void getTofRange(double &tofMin, double &tofMax, const double tofPeak, const HistogramData::HistogramX &tof); - int findPixelID(std::string bankName, int col, int row); + int findPixelID(const std::string &bankName, int col, int row); /// Read in all the input parameters void retrieveProperties(); diff --git a/Framework/Crystal/inc/MantidCrystal/NormaliseVanadium.h b/Framework/Crystal/inc/MantidCrystal/NormaliseVanadium.h index c206c3e51c2e72a931f739c6cdf9bc90c0faad5b..0fc9d9762cc1635f4ea1fdd8142781f0bf0b8689 100644 --- a/Framework/Crystal/inc/MantidCrystal/NormaliseVanadium.h +++ b/Framework/Crystal/inc/MantidCrystal/NormaliseVanadium.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/inc/MantidCrystal/OptimizeCrystalPlacement.h b/Framework/Crystal/inc/MantidCrystal/OptimizeCrystalPlacement.h index 44339a171046d4dd3dc9a0fd70e5d2067374e426..25583d7eba987caeba8e06f94dcb6e3b97acead3 100644 --- a/Framework/Crystal/inc/MantidCrystal/OptimizeCrystalPlacement.h +++ b/Framework/Crystal/inc/MantidCrystal/OptimizeCrystalPlacement.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /* * OptimizeCrystalPlacement.h diff --git a/Framework/Crystal/inc/MantidCrystal/OptimizeLatticeForCellType.h b/Framework/Crystal/inc/MantidCrystal/OptimizeLatticeForCellType.h index 7e62f32a6e8ef989789ba8f26c8774921ce14989..49c175728390615f51c7968b6dc2a23a73fca1bf 100644 --- a/Framework/Crystal/inc/MantidCrystal/OptimizeLatticeForCellType.h +++ b/Framework/Crystal/inc/MantidCrystal/OptimizeLatticeForCellType.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/inc/MantidCrystal/PeakAlgorithmHelpers.h b/Framework/Crystal/inc/MantidCrystal/PeakAlgorithmHelpers.h index 52a6798643cd5f87c74ef0ddc88076084783e877..fbb0c7ce74892bca040d3434eb8ddb7793190d39 100644 --- a/Framework/Crystal/inc/MantidCrystal/PeakAlgorithmHelpers.h +++ b/Framework/Crystal/inc/MantidCrystal/PeakAlgorithmHelpers.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidAPI/IAlgorithm.h" diff --git a/Framework/Crystal/inc/MantidCrystal/PeakBackground.h b/Framework/Crystal/inc/MantidCrystal/PeakBackground.h index b0f607da19440a48ddc3cc0032c5593a13e8966d..844c79f957b905a0f3f186e046b739fbd6fe62e1 100644 --- a/Framework/Crystal/inc/MantidCrystal/PeakBackground.h +++ b/Framework/Crystal/inc/MantidCrystal/PeakBackground.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/inc/MantidCrystal/PeakClusterProjection.h b/Framework/Crystal/inc/MantidCrystal/PeakClusterProjection.h index f31b6964f48b179e4fbad610bf94f48a64144437..787c0f71ba43d73c7e43ac968ebe5ae2bfc3eb7f 100644 --- a/Framework/Crystal/inc/MantidCrystal/PeakClusterProjection.h +++ b/Framework/Crystal/inc/MantidCrystal/PeakClusterProjection.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/inc/MantidCrystal/PeakHKLErrors.h b/Framework/Crystal/inc/MantidCrystal/PeakHKLErrors.h index a9794b7fa2464c2a2643554ce224457454460d06..2bdf5f3d66249a07a264b36b13fde81b7671a79a 100644 --- a/Framework/Crystal/inc/MantidCrystal/PeakHKLErrors.h +++ b/Framework/Crystal/inc/MantidCrystal/PeakHKLErrors.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /* * PeakHKLErrors.h @@ -67,13 +67,15 @@ public: * @return The new peak with the new instrument( adjusted with the *parameters) and time adjusted. */ - static DataObjects::Peak createNewPeak(const Geometry::IPeak &peak_old, - Geometry::Instrument_sptr instrNew, - double T0, double L0); + static DataObjects::Peak + createNewPeak(const Geometry::IPeak &peak_old, + const Geometry::Instrument_sptr &instrNew, double T0, + double L0); - static void cLone(boost::shared_ptr<Geometry::ParameterMap> &pmap, - boost::shared_ptr<const Geometry::IComponent> component, - boost::shared_ptr<const Geometry::ParameterMap> &pmapSv); + static void + cLone(boost::shared_ptr<Geometry::ParameterMap> &pmap, + const boost::shared_ptr<const Geometry::IComponent> &component, + boost::shared_ptr<const Geometry::ParameterMap> &pmapSv); void getRun2MatMap(DataObjects::PeaksWorkspace_sptr &Peaks, const std::string &OptRuns, @@ -87,7 +89,7 @@ public: char axis); boost::shared_ptr<Geometry::Instrument> - getNewInstrument(DataObjects::PeaksWorkspace_sptr Peaks) const; + getNewInstrument(const DataObjects::PeaksWorkspace_sptr &Peaks) const; std::vector<std::string> getAttributeNames() const override { return {"OptRuns", "PeakWorkspaceName"}; diff --git a/Framework/Crystal/inc/MantidCrystal/PeakIntegration.h b/Framework/Crystal/inc/MantidCrystal/PeakIntegration.h index 330c6a30a900b88fd37c0812cec6d2734ab31746..23df95e6d247e3563d872693e27c4d3f93de56d3 100644 --- a/Framework/Crystal/inc/MantidCrystal/PeakIntegration.h +++ b/Framework/Crystal/inc/MantidCrystal/PeakIntegration.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -48,8 +48,9 @@ private: void fitSpectra(const int s, double TOFPeakd, double &I, double &sigI); /// Read in all the input parameters void retrieveProperties(); - int fitneighbours(int ipeak, std::string det_name, int x0, int y0, int idet, - double qspan, DataObjects::PeaksWorkspace_sptr &Peaks, + int fitneighbours(int ipeak, const std::string &det_name, int x0, int y0, + int idet, double qspan, + DataObjects::PeaksWorkspace_sptr &Peaks, const detid2index_map &pixel_to_wi); bool m_IC = false; ///< Ikeida Carpenter fit of TOF diff --git a/Framework/Crystal/inc/MantidCrystal/PeakIntensityVsRadius.h b/Framework/Crystal/inc/MantidCrystal/PeakIntensityVsRadius.h index 6468daf52b329405fd1ce7e752b4d0514dd7ddcd..88f7a20af6189b061b59e1914d5658ed65a9f612 100644 --- a/Framework/Crystal/inc/MantidCrystal/PeakIntensityVsRadius.h +++ b/Framework/Crystal/inc/MantidCrystal/PeakIntensityVsRadius.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/inc/MantidCrystal/PeakStatisticsTools.h b/Framework/Crystal/inc/MantidCrystal/PeakStatisticsTools.h index 599839363b046c0b75e9459706dd47847e6e424e..c51bc5784904150ae6847f5549055717a1cd8e46 100644 --- a/Framework/Crystal/inc/MantidCrystal/PeakStatisticsTools.h +++ b/Framework/Crystal/inc/MantidCrystal/PeakStatisticsTools.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/inc/MantidCrystal/PeaksInRegion.h b/Framework/Crystal/inc/MantidCrystal/PeaksInRegion.h index 3e353500034e6ad69e7ff722cc7b9fc661297423..59e93bfeb96059ebe968e4517ad97bcc74124fae 100644 --- a/Framework/Crystal/inc/MantidCrystal/PeaksInRegion.h +++ b/Framework/Crystal/inc/MantidCrystal/PeaksInRegion.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/inc/MantidCrystal/PeaksIntersection.h b/Framework/Crystal/inc/MantidCrystal/PeaksIntersection.h index 2e2a86d5fa5dac6d82640fd8b69f2d67af8d5ee3..a260fd1a6c978c93461aebfd09c7f49b4a1bcd76 100644 --- a/Framework/Crystal/inc/MantidCrystal/PeaksIntersection.h +++ b/Framework/Crystal/inc/MantidCrystal/PeaksIntersection.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/inc/MantidCrystal/PeaksOnSurface.h b/Framework/Crystal/inc/MantidCrystal/PeaksOnSurface.h index 1b723443d984002787694eeb8d615f8df68a48ca..a225b34787481cbd05a23e56f60fab232543c39e 100644 --- a/Framework/Crystal/inc/MantidCrystal/PeaksOnSurface.h +++ b/Framework/Crystal/inc/MantidCrystal/PeaksOnSurface.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/inc/MantidCrystal/PredictFractionalPeaks.h b/Framework/Crystal/inc/MantidCrystal/PredictFractionalPeaks.h index 4a979f61ee8c5d88b6fcef55fcd745f4ac6c8156..de1ca5fc7f2bb48e5ab6abfbe2a5dc6c226ce3ef 100644 --- a/Framework/Crystal/inc/MantidCrystal/PredictFractionalPeaks.h +++ b/Framework/Crystal/inc/MantidCrystal/PredictFractionalPeaks.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidAPI/Algorithm.h" diff --git a/Framework/Crystal/inc/MantidCrystal/PredictPeaks.h b/Framework/Crystal/inc/MantidCrystal/PredictPeaks.h index 89afff5dfd8ec2d70713a167b53629283b572b75..d665e0f2e27e9e7e27a0f5699c21bd532527dbe3 100644 --- a/Framework/Crystal/inc/MantidCrystal/PredictPeaks.h +++ b/Framework/Crystal/inc/MantidCrystal/PredictPeaks.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/inc/MantidCrystal/PredictSatellitePeaks.h b/Framework/Crystal/inc/MantidCrystal/PredictSatellitePeaks.h index 6f5d606850929f0bfbaf56627804f37397bf3d1a..6e1c943d156d2e659308a7297c93988e1bdb5551 100644 --- a/Framework/Crystal/inc/MantidCrystal/PredictSatellitePeaks.h +++ b/Framework/Crystal/inc/MantidCrystal/PredictSatellitePeaks.h @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #pragma once #include "MantidAPI/Algorithm.h" diff --git a/Framework/Crystal/inc/MantidCrystal/SCDCalibratePanels.h b/Framework/Crystal/inc/MantidCrystal/SCDCalibratePanels.h index 9df545ba35b57b0ebf5ba6f5c9c787432f9cc233..b02fd282c7118ba1b044e6b2e4d310cf95ff88cf 100644 --- a/Framework/Crystal/inc/MantidCrystal/SCDCalibratePanels.h +++ b/Framework/Crystal/inc/MantidCrystal/SCDCalibratePanels.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -48,19 +48,20 @@ public: private: void saveIsawDetCal(boost::shared_ptr<Geometry::Instrument> &instrument, boost::container::flat_set<std::string> &AllBankName, - double T0, std::string filename); + double T0, const std::string &filename); /// Function to calculate U - void findU(DataObjects::PeaksWorkspace_sptr peaksWs); + void findU(const DataObjects::PeaksWorkspace_sptr &peaksWs); /// save workspaces - void saveNexus(std::string outputFile, API::MatrixWorkspace_sptr outputWS); + void saveNexus(const std::string &outputFile, + const API::MatrixWorkspace_sptr &outputWS); /// Function to optimize L1 - void findL1(int nPeaks, DataObjects::PeaksWorkspace_sptr peaksWs); + void findL1(int nPeaks, const DataObjects::PeaksWorkspace_sptr &peaksWs); /// Function to optimize L2 void findL2(boost::container::flat_set<std::string> MyBankNames, - DataObjects::PeaksWorkspace_sptr peaksWs); + const DataObjects::PeaksWorkspace_sptr &peaksWs); /// Function to optimize T0 - void findT0(int nPeaks, DataObjects::PeaksWorkspace_sptr peaksWs); + void findT0(int nPeaks, const DataObjects::PeaksWorkspace_sptr &peaksWs); void exec() override; diff --git a/Framework/Crystal/inc/MantidCrystal/SCDPanelErrors.h b/Framework/Crystal/inc/MantidCrystal/SCDPanelErrors.h index 965511670585dc131b28637c149d25afa3037b6f..2419d33d087c92f0a57c832cfa3948da34aa9444 100644 --- a/Framework/Crystal/inc/MantidCrystal/SCDPanelErrors.h +++ b/Framework/Crystal/inc/MantidCrystal/SCDPanelErrors.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -44,7 +44,8 @@ public: /// Move detectors with parameters void moveDetector(double x, double y, double z, double rotx, double roty, double rotz, double scalex, double scaley, - std::string detname, API::Workspace_sptr inputW) const; + std::string detname, + const API::Workspace_sptr &inputW) const; private: /// Call the appropriate load function diff --git a/Framework/Crystal/inc/MantidCrystal/SaveHKL.h b/Framework/Crystal/inc/MantidCrystal/SaveHKL.h index a050f90b7ed31e768f0197e2af8aaddef2834b4a..cd708f0c4e04e29fd017aafec80d0871fe98ccf7 100644 --- a/Framework/Crystal/inc/MantidCrystal/SaveHKL.h +++ b/Framework/Crystal/inc/MantidCrystal/SaveHKL.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -49,7 +49,7 @@ private: double spectrumCalc(double TOF, int iSpec, std::vector<std::vector<double>> time, std::vector<std::vector<double>> spectra, size_t id); - void sizeBanks(std::string bankName, int &nCols, int &nRows); + void sizeBanks(const std::string &bankName, int &nCols, int &nRows); DataObjects::PeaksWorkspace_sptr m_ws; double m_smu = 0.0; // in 1/cm diff --git a/Framework/Crystal/inc/MantidCrystal/SaveIsawPeaks.h b/Framework/Crystal/inc/MantidCrystal/SaveIsawPeaks.h index 7a3eb36131521c7f3b3225fa9f2ef45002141047..9e0bad59d5d7d9a636a5b750ed4849b8acd379e9 100644 --- a/Framework/Crystal/inc/MantidCrystal/SaveIsawPeaks.h +++ b/Framework/Crystal/inc/MantidCrystal/SaveIsawPeaks.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -48,10 +48,10 @@ private: /// Run the algorithm void exec() override; /// find position for rectangular and non-rectangular - Kernel::V3D findPixelPos(std::string bankName, int col, int row); - void sizeBanks(std::string bankName, int &NCOLS, int &NROWS, double &xsize, - double &ysize); - bool bankMasked(Geometry::IComponent_const_sptr parent, + Kernel::V3D findPixelPos(const std::string &bankName, int col, int row); + void sizeBanks(const std::string &bankName, int &NCOLS, int &NROWS, + double &xsize, double &ysize); + bool bankMasked(const Geometry::IComponent_const_sptr &parent, const Geometry::DetectorInfo &detectorInfo); void writeOffsets(std::ofstream &out, double qSign, std::vector<double> offset); diff --git a/Framework/Crystal/inc/MantidCrystal/SaveIsawUB.h b/Framework/Crystal/inc/MantidCrystal/SaveIsawUB.h index 46e01ddcad8b4e66403e61820807763b6363ce16..ee98eaa90eec59c2ee70aa8d49f444c93952f9fb 100644 --- a/Framework/Crystal/inc/MantidCrystal/SaveIsawUB.h +++ b/Framework/Crystal/inc/MantidCrystal/SaveIsawUB.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/inc/MantidCrystal/SaveLauenorm.h b/Framework/Crystal/inc/MantidCrystal/SaveLauenorm.h index c8e9259242da65ef37206b03ccdeff12edb37cb3..b84323bcaa1fe1a9be295fd31d22b251781d7584 100644 --- a/Framework/Crystal/inc/MantidCrystal/SaveLauenorm.h +++ b/Framework/Crystal/inc/MantidCrystal/SaveLauenorm.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -44,7 +44,7 @@ private: void exec() override; DataObjects::PeaksWorkspace_sptr ws; - void sizeBanks(std::string bankName, int &nCols, int &nRows); + void sizeBanks(const std::string &bankName, int &nCols, int &nRows); const std::vector<std::string> m_typeList{ "TRICLINIC", "MONOCLINIC", "ORTHORHOMBIC", "TETRAGONAL", diff --git a/Framework/Crystal/inc/MantidCrystal/SelectCellOfType.h b/Framework/Crystal/inc/MantidCrystal/SelectCellOfType.h index 5f7acd07b988c6ce300fe51e11d461ffdc34b15a..5572430097c7803bce8f69dfad01a1864849b418 100644 --- a/Framework/Crystal/inc/MantidCrystal/SelectCellOfType.h +++ b/Framework/Crystal/inc/MantidCrystal/SelectCellOfType.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/inc/MantidCrystal/SelectCellWithForm.h b/Framework/Crystal/inc/MantidCrystal/SelectCellWithForm.h index 935e05e6072cf9324f568fd35cd24c258c461e75..0a9c9fb47a74d87ff9c27b7f72c02919500ed8dd 100644 --- a/Framework/Crystal/inc/MantidCrystal/SelectCellWithForm.h +++ b/Framework/Crystal/inc/MantidCrystal/SelectCellWithForm.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/inc/MantidCrystal/SetCrystalLocation.h b/Framework/Crystal/inc/MantidCrystal/SetCrystalLocation.h index c618e0c027be3211f4db2b759e0168752edcac6b..2bf12c6fb9f287a991565004eaea0e4a1e13d63d 100644 --- a/Framework/Crystal/inc/MantidCrystal/SetCrystalLocation.h +++ b/Framework/Crystal/inc/MantidCrystal/SetCrystalLocation.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /* * SetCrystalLocation.h diff --git a/Framework/Crystal/inc/MantidCrystal/SetGoniometer.h b/Framework/Crystal/inc/MantidCrystal/SetGoniometer.h index 7629a4b0ab95326d2097a2816572442f9adec681..b45d94296fcc2df68132375240728e8e3ac555c5 100644 --- a/Framework/Crystal/inc/MantidCrystal/SetGoniometer.h +++ b/Framework/Crystal/inc/MantidCrystal/SetGoniometer.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/inc/MantidCrystal/SetSpecialCoordinates.h b/Framework/Crystal/inc/MantidCrystal/SetSpecialCoordinates.h index 1ecda0d80d599b3660fa73e538075f6eb4c694a2..274a92a1757f93be9912c3a00fe57fd43730893b 100644 --- a/Framework/Crystal/inc/MantidCrystal/SetSpecialCoordinates.h +++ b/Framework/Crystal/inc/MantidCrystal/SetSpecialCoordinates.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -48,13 +48,13 @@ private: static const std::string QSampleOption(); static const std::string HKLOption(); bool writeCoordinatesToMDEventWorkspace( - Mantid::API::Workspace_sptr inWS, + const Mantid::API::Workspace_sptr &inWS, Mantid::Kernel::SpecialCoordinateSystem coordinateSystem); bool writeCoordinatesToMDHistoWorkspace( - Mantid::API::Workspace_sptr inWS, + const Mantid::API::Workspace_sptr &inWS, Mantid::Kernel::SpecialCoordinateSystem coordinateSystem); bool writeCoordinatesToPeaksWorkspace( - Mantid::API::Workspace_sptr inWS, + const Mantid::API::Workspace_sptr &inWS, Mantid::Kernel::SpecialCoordinateSystem coordinateSystem); }; diff --git a/Framework/Crystal/inc/MantidCrystal/SetUB.h b/Framework/Crystal/inc/MantidCrystal/SetUB.h index 1e133c9e4c7d05617381b072d073c629d446c0a2..eba1f4b0d9a75dd95b33c3eb5ca025d309e03f92 100644 --- a/Framework/Crystal/inc/MantidCrystal/SetUB.h +++ b/Framework/Crystal/inc/MantidCrystal/SetUB.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/inc/MantidCrystal/ShowPeakHKLOffsets.h b/Framework/Crystal/inc/MantidCrystal/ShowPeakHKLOffsets.h index 08bb9886dd8559bd844202bcfbbe762ca4d84c74..229497a98f6084345359d5f91830f14f8609f8e3 100644 --- a/Framework/Crystal/inc/MantidCrystal/ShowPeakHKLOffsets.h +++ b/Framework/Crystal/inc/MantidCrystal/ShowPeakHKLOffsets.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /* diff --git a/Framework/Crystal/inc/MantidCrystal/ShowPossibleCells.h b/Framework/Crystal/inc/MantidCrystal/ShowPossibleCells.h index 4abcc64a00c6b7c49b066373e93bda06e3b24219..6a3bf9ece3559c32e92f07cda76de0e9abb36252 100644 --- a/Framework/Crystal/inc/MantidCrystal/ShowPossibleCells.h +++ b/Framework/Crystal/inc/MantidCrystal/ShowPossibleCells.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/inc/MantidCrystal/SortHKL.h b/Framework/Crystal/inc/MantidCrystal/SortHKL.h index 5c38661eb9d52b0cea3d10fcdcf000463afa9e04..afd51cc4fb28ff2dbf337855f8177ababf84e3c0 100644 --- a/Framework/Crystal/inc/MantidCrystal/SortHKL.h +++ b/Framework/Crystal/inc/MantidCrystal/SortHKL.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -78,7 +78,8 @@ private: DataObjects::PeaksWorkspace_sptr getOutputPeaksWorkspace( const DataObjects::PeaksWorkspace_sptr &inputPeaksWorkspace) const; - void sortOutputPeaksByHKL(API::IPeaksWorkspace_sptr outputPeaksWorkspace); + void + sortOutputPeaksByHKL(const API::IPeaksWorkspace_sptr &outputPeaksWorkspace); /// Point Groups possible std::vector<Mantid::Geometry::PointGroup_sptr> m_pointGroups; diff --git a/Framework/Crystal/inc/MantidCrystal/SortPeaksWorkspace.h b/Framework/Crystal/inc/MantidCrystal/SortPeaksWorkspace.h index a3da187896ed1ec47fa8b5636896723b833ec136..ebd3a1bfa14e35a913f83cfbda0b1f1ca85d0dc6 100644 --- a/Framework/Crystal/inc/MantidCrystal/SortPeaksWorkspace.h +++ b/Framework/Crystal/inc/MantidCrystal/SortPeaksWorkspace.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/inc/MantidCrystal/StatisticsOfPeaksWorkspace.h b/Framework/Crystal/inc/MantidCrystal/StatisticsOfPeaksWorkspace.h index 00c961f5bf6bed0bb6fff4c35bb0c89f11d1786c..061d0bd973eb111d739c254c34c01dc7d95e327b 100644 --- a/Framework/Crystal/inc/MantidCrystal/StatisticsOfPeaksWorkspace.h +++ b/Framework/Crystal/inc/MantidCrystal/StatisticsOfPeaksWorkspace.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -49,7 +49,8 @@ private: /// Run the algorithm void exec() override; /// Runs SortHKL on workspace - void doSortHKL(Mantid::API::Workspace_sptr ws, std::string runName); + void doSortHKL(const Mantid::API::Workspace_sptr &ws, + const std::string &runName); DataObjects::PeaksWorkspace_sptr ws; }; diff --git a/Framework/Crystal/inc/MantidCrystal/TransformHKL.h b/Framework/Crystal/inc/MantidCrystal/TransformHKL.h index dff2da546d5cace89926c4bf742a37ed84405ea1..cc48044ada321e3ec31df0f950f146743e113062 100644 --- a/Framework/Crystal/inc/MantidCrystal/TransformHKL.h +++ b/Framework/Crystal/inc/MantidCrystal/TransformHKL.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/src/AddPeakHKL.cpp b/Framework/Crystal/src/AddPeakHKL.cpp index c563204dee5b0d287a10a31e3f30a710b3f975e4..222ec0e06f56a4badf2864a9ce37e6a88560229d 100644 --- a/Framework/Crystal/src/AddPeakHKL.cpp +++ b/Framework/Crystal/src/AddPeakHKL.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCrystal/AddPeakHKL.h" diff --git a/Framework/Crystal/src/AnvredCorrection.cpp b/Framework/Crystal/src/AnvredCorrection.cpp index 95a350d1e81a2f8680ddcee4aa4d323440a27490..56bfbe9f06367294df4b53777dc108359239c04b 100644 --- a/Framework/Crystal/src/AnvredCorrection.cpp +++ b/Framework/Crystal/src/AnvredCorrection.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCrystal/AnvredCorrection.h" #include "MantidAPI/Axis.h" @@ -522,7 +522,7 @@ void AnvredCorrection::BuildLamdaWeights() { } void AnvredCorrection::scale_init(const IDetector &det, - Instrument_const_sptr inst, double &L2, + const Instrument_const_sptr &inst, double &L2, double &depth, double &pathlength, std::string &bankName) { bankName = det.getParent()->getParent()->getName(); @@ -542,7 +542,8 @@ void AnvredCorrection::scale_init(const IDetector &det, } void AnvredCorrection::scale_exec(std::string &bankName, double &lambda, - double &depth, Instrument_const_sptr inst, + double &depth, + const Instrument_const_sptr &inst, double &pathlength, double &value) { // correct for the slant path throught the scintillator glass double mu = (9.614 * lambda) + 0.266; // mu for GS20 glass diff --git a/Framework/Crystal/src/CalculatePeaksHKL.cpp b/Framework/Crystal/src/CalculatePeaksHKL.cpp index 0f6f0cb9450bb37cdcd504bd9183952bd94227c7..11ddb8ee87ae9e4eb554e325ee3d3d6087749912 100644 --- a/Framework/Crystal/src/CalculatePeaksHKL.cpp +++ b/Framework/Crystal/src/CalculatePeaksHKL.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCrystal/CalculatePeaksHKL.h" #include "MantidAPI/Sample.h" diff --git a/Framework/Crystal/src/CalculateUMatrix.cpp b/Framework/Crystal/src/CalculateUMatrix.cpp index 2608453ac2b17ad23affafedcc86a624c51abc93..8e4328da87cb196c1780c335242b05e05713c4bc 100644 --- a/Framework/Crystal/src/CalculateUMatrix.cpp +++ b/Framework/Crystal/src/CalculateUMatrix.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCrystal/CalculateUMatrix.h" #include "MantidAPI/Sample.h" diff --git a/Framework/Crystal/src/CalibrationHelpers.cpp b/Framework/Crystal/src/CalibrationHelpers.cpp index 94f801a056ed99323c8ae98ba69cd45dd4a7bc56..103f07f37a3a1ac1ebc9f76becbbb1540ed7874e 100644 --- a/Framework/Crystal/src/CalibrationHelpers.cpp +++ b/Framework/Crystal/src/CalibrationHelpers.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCrystal/CalibrationHelpers.h" #include "MantidAPI/ResizeRectangularDetectorHelper.h" diff --git a/Framework/Crystal/src/CentroidPeaks.cpp b/Framework/Crystal/src/CentroidPeaks.cpp index e2b20787e0a5221721f8816131647f188b8de0d4..a6dad7263f33b1ff870d6fb618b62a2756a51159 100644 --- a/Framework/Crystal/src/CentroidPeaks.cpp +++ b/Framework/Crystal/src/CentroidPeaks.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCrystal/CentroidPeaks.h" #include "MantidDataObjects/PeaksWorkspace.h" @@ -323,7 +323,7 @@ void CentroidPeaks::exec() { } } -int CentroidPeaks::findPixelID(std::string bankName, int col, int row) { +int CentroidPeaks::findPixelID(const std::string &bankName, int col, int row) { boost::shared_ptr<const IComponent> parent = inst->getComponentByName(bankName); if (parent->type() == "RectangularDetector") { diff --git a/Framework/Crystal/src/ClearUB.cpp b/Framework/Crystal/src/ClearUB.cpp index a3540a8d0e36689a9484362dd687f8ddd5ffbb2a..65884b9790633657cb7da0f76da9de677d81ebf0 100644 --- a/Framework/Crystal/src/ClearUB.cpp +++ b/Framework/Crystal/src/ClearUB.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCrystal/ClearUB.h" #include "MantidAPI/ExperimentInfo.h" diff --git a/Framework/Crystal/src/Cluster.cpp b/Framework/Crystal/src/Cluster.cpp index 85a2adbe5684456514e2dd8a5fa1f4804a6060ec..f4714016ef77567a96ed7ce5a0be538690c8bae9 100644 --- a/Framework/Crystal/src/Cluster.cpp +++ b/Framework/Crystal/src/Cluster.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCrystal/Cluster.h" #include "MantidAPI/IMDHistoWorkspace.h" diff --git a/Framework/Crystal/src/ClusterRegister.cpp b/Framework/Crystal/src/ClusterRegister.cpp index 51e3542d5cd81fed5e49c293d55cdac933e1c85c..87b7c9c740364c1bee198bc9a52f2114fed80a84 100644 --- a/Framework/Crystal/src/ClusterRegister.cpp +++ b/Framework/Crystal/src/ClusterRegister.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCrystal/ClusterRegister.h" #include "MantidCrystal/Cluster.h" diff --git a/Framework/Crystal/src/CombinePeaksWorkspaces.cpp b/Framework/Crystal/src/CombinePeaksWorkspaces.cpp index 6d881b1287089e9fce7772f46833a3d618d613aa..9d72ab7c54f1e2b2ac85ce4d53be09376f4aa57b 100644 --- a/Framework/Crystal/src/CombinePeaksWorkspaces.cpp +++ b/Framework/Crystal/src/CombinePeaksWorkspaces.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCrystal/CombinePeaksWorkspaces.h" #include "MantidAPI/Sample.h" diff --git a/Framework/Crystal/src/CompositeCluster.cpp b/Framework/Crystal/src/CompositeCluster.cpp index f843ba0a45c73b6913355ee5f354928dad82795b..fe390726210cf890042b52b2c25054f410015a1f 100644 --- a/Framework/Crystal/src/CompositeCluster.cpp +++ b/Framework/Crystal/src/CompositeCluster.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCrystal/CompositeCluster.h" diff --git a/Framework/Crystal/src/ConnectedComponentLabeling.cpp b/Framework/Crystal/src/ConnectedComponentLabeling.cpp index f9d7d39bc887103ba61ff412b23a6ad65c939d4a..04ed2e230a755c6770df6477b5f7a48b77d1d678 100644 --- a/Framework/Crystal/src/ConnectedComponentLabeling.cpp +++ b/Framework/Crystal/src/ConnectedComponentLabeling.cpp @@ -1,9 +1,11 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + +#include <utility> + #include "MantidCrystal/ConnectedComponentLabeling.h" #include "MantidAPI/FrameworkManager.h" @@ -226,7 +228,7 @@ void memoryCheck(size_t nPoints) { * @param nThreads : Optional argument of number of threads to use. */ ConnectedComponentLabeling::ConnectedComponentLabeling( - const size_t &startId, const boost::optional<int> nThreads) + const size_t &startId, const boost::optional<int> &nThreads) : m_startId(startId), m_nThreads(nThreads) { if (m_nThreads.is_initialized() && m_nThreads.get() < 0) { throw std::invalid_argument( @@ -278,7 +280,7 @@ int ConnectedComponentLabeling::getNThreads() const { * @return : Map of label ids to clusters. */ ClusterMap ConnectedComponentLabeling::calculateDisjointTree( - IMDHistoWorkspace_sptr ws, BackgroundStrategy *const baseStrategy, + const IMDHistoWorkspace_sptr &ws, BackgroundStrategy *const baseStrategy, Progress &progress) const { std::map<size_t, boost::shared_ptr<ICluster>> clusterMap; VecElements neighbourElements(ws->getNPoints()); @@ -407,7 +409,8 @@ boost::shared_ptr<Mantid::API::IMDHistoWorkspace> ConnectedComponentLabeling::execute(IMDHistoWorkspace_sptr ws, BackgroundStrategy *const strategy, Progress &progress) const { - ClusterTuple result = executeAndFetchClusters(ws, strategy, progress); + ClusterTuple result = + executeAndFetchClusters(std::move(ws), strategy, progress); IMDHistoWorkspace_sptr outWS = result.get<0>(); // Get the workspace, but discard cluster objects. return outWS; diff --git a/Framework/Crystal/src/CountReflections.cpp b/Framework/Crystal/src/CountReflections.cpp index 69878c9d4e0d5c08efccf066bdeca63708a129b9..078c9fdaa50ceab0be64e139ec31c436922770d4 100644 --- a/Framework/Crystal/src/CountReflections.cpp +++ b/Framework/Crystal/src/CountReflections.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCrystal/CountReflections.h" #include "MantidCrystal/PeakStatisticsTools.h" diff --git a/Framework/Crystal/src/DiffPeaksWorkspaces.cpp b/Framework/Crystal/src/DiffPeaksWorkspaces.cpp index 8a0cb3f98d79eb2b2cfad3ba28b018b09061e975..b80dede5df86d48dd2846c4403d2a7f61b1f97bc 100644 --- a/Framework/Crystal/src/DiffPeaksWorkspaces.cpp +++ b/Framework/Crystal/src/DiffPeaksWorkspaces.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCrystal/DiffPeaksWorkspaces.h" #include "MantidAPI/Sample.h" diff --git a/Framework/Crystal/src/DisjointElement.cpp b/Framework/Crystal/src/DisjointElement.cpp index 3951cbf72a8da2f3167c4fb1594eea00d607b452..29ed4ba37b3026b7f448f57189a56b82bcbec6ff 100644 --- a/Framework/Crystal/src/DisjointElement.cpp +++ b/Framework/Crystal/src/DisjointElement.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCrystal/DisjointElement.h" diff --git a/Framework/Crystal/src/FilterPeaks.cpp b/Framework/Crystal/src/FilterPeaks.cpp index 08550f066a62653d6e25c4eee2f81999bce78fde..c66cdc2e0ba1ae29c2d1e0e5c0ab3cb85d1c5e72 100644 --- a/Framework/Crystal/src/FilterPeaks.cpp +++ b/Framework/Crystal/src/FilterPeaks.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCrystal/FilterPeaks.h" #include "MantidAPI/WorkspaceFactory.h" diff --git a/Framework/Crystal/src/FindClusterFaces.cpp b/Framework/Crystal/src/FindClusterFaces.cpp index 8aeb6b572e660335e9f0bcdee5ac61dd66a2ecfb..97fddf346f6e3c4f6699cdb3758a26235960f6e4 100644 --- a/Framework/Crystal/src/FindClusterFaces.cpp +++ b/Framework/Crystal/src/FindClusterFaces.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCrystal/FindClusterFaces.h" @@ -43,7 +43,7 @@ using OptionalLabelPeakIndexMap = boost::optional<LabelMap>; */ OptionalLabelPeakIndexMap createOptionalLabelFilter(size_t dimensionality, int emptyLabelId, - IPeaksWorkspace_sptr filterWorkspace, + const IPeaksWorkspace_sptr &filterWorkspace, IMDHistoWorkspace_sptr &clusterImage) { OptionalLabelPeakIndexMap optionalAllowedLabels; diff --git a/Framework/Crystal/src/FindSXPeaks.cpp b/Framework/Crystal/src/FindSXPeaks.cpp index 1b4652d9cef8d824c58d15bc3ec4f7c600befdd3..c478ebbd9d5678f78e08a848d2a8ea2d192c4743 100644 --- a/Framework/Crystal/src/FindSXPeaks.cpp +++ b/Framework/Crystal/src/FindSXPeaks.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCrystal/FindSXPeaks.h" #include "MantidAPI/Axis.h" @@ -369,8 +369,8 @@ void FindSXPeaks::reducePeakList(const peakvector &pcv, Progress &progress) { * @param workspace :: the workspace to check x-axis units on * @return enum of type XAxisUnit with the value of TOF or DSPACING */ -XAxisUnit -FindSXPeaks::getWorkspaceXAxisUnit(MatrixWorkspace_const_sptr workspace) const { +XAxisUnit FindSXPeaks::getWorkspaceXAxisUnit( + const MatrixWorkspace_const_sptr &workspace) const { const auto xAxis = workspace->getAxis(0); const auto unitID = xAxis->unit()->unitID(); diff --git a/Framework/Crystal/src/FindSXPeaksHelper.cpp b/Framework/Crystal/src/FindSXPeaksHelper.cpp index ce7a443c34b0bf55e9a068b80df8b7135ee2f25c..c36783614c4aea3d79324b8f9ae16dce75733388 100644 --- a/Framework/Crystal/src/FindSXPeaksHelper.cpp +++ b/Framework/Crystal/src/FindSXPeaksHelper.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCrystal/FindSXPeaksHelper.h" #include "MantidAPI/Progress.h" diff --git a/Framework/Crystal/src/FindUBUsingFFT.cpp b/Framework/Crystal/src/FindUBUsingFFT.cpp index 960b5591ea841c145f24507467c3012d24182ef5..b76193ef96b165c5a072859dc6a048fd42d71859 100644 --- a/Framework/Crystal/src/FindUBUsingFFT.cpp +++ b/Framework/Crystal/src/FindUBUsingFFT.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCrystal/FindUBUsingFFT.h" #include "MantidAPI/Sample.h" diff --git a/Framework/Crystal/src/FindUBUsingIndexedPeaks.cpp b/Framework/Crystal/src/FindUBUsingIndexedPeaks.cpp index 94e156ea140f5d094aeacf7c1c45ae2bcab8933a..4d9444bffeaf18dcaab73dcf945e89051a590007 100644 --- a/Framework/Crystal/src/FindUBUsingIndexedPeaks.cpp +++ b/Framework/Crystal/src/FindUBUsingIndexedPeaks.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCrystal/FindUBUsingIndexedPeaks.h" #include "MantidAPI/Sample.h" @@ -108,9 +108,9 @@ void FindUBUsingIndexedPeaks::exec() { { // from the full list of peaks, and q_vectors.clear(); // save the UB in the sample q_vectors.reserve(n_peaks); - for (const auto &peak : peaks) { - q_vectors.emplace_back(peak.getQSampleFrame()); - } + + std::transform(peaks.begin(), peaks.end(), std::back_inserter(q_vectors), + [](const auto &peak) { return peak.getQSampleFrame(); }); int num_indexed = IndexingUtils::NumberIndexed(UB, q_vectors, tolerance); int sate_indexed = 0; diff --git a/Framework/Crystal/src/FindUBUsingLatticeParameters.cpp b/Framework/Crystal/src/FindUBUsingLatticeParameters.cpp index 90d7c77fb7edc53349403f678115abd17b664a59..ec8429b5094f335242007507672476d7bbc597bc 100644 --- a/Framework/Crystal/src/FindUBUsingLatticeParameters.cpp +++ b/Framework/Crystal/src/FindUBUsingLatticeParameters.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCrystal/FindUBUsingLatticeParameters.h" #include "MantidAPI/Sample.h" diff --git a/Framework/Crystal/src/FindUBUsingMinMaxD.cpp b/Framework/Crystal/src/FindUBUsingMinMaxD.cpp index 31fbde2970e2a1dce7db0a9ffea805097e414c46..4e9b7f180765955f7f087392fe3d550cc115a87b 100644 --- a/Framework/Crystal/src/FindUBUsingMinMaxD.cpp +++ b/Framework/Crystal/src/FindUBUsingMinMaxD.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCrystal/FindUBUsingMinMaxD.h" #include "MantidAPI/Sample.h" diff --git a/Framework/Crystal/src/GoniometerAnglesFromPhiRotation.cpp b/Framework/Crystal/src/GoniometerAnglesFromPhiRotation.cpp index be21a867c7a9e64c6110c001935686f9fa6e1468..8b5d7b5269a3ba604bc689d84f4b060d92ae4139 100644 --- a/Framework/Crystal/src/GoniometerAnglesFromPhiRotation.cpp +++ b/Framework/Crystal/src/GoniometerAnglesFromPhiRotation.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCrystal/GoniometerAnglesFromPhiRotation.h" #include "MantidAPI/Algorithm.h" diff --git a/Framework/Crystal/src/HardThresholdBackground.cpp b/Framework/Crystal/src/HardThresholdBackground.cpp index 0fb6dfa36ca6d84fb94b286d219d719909f6e186..33828745c2db816eed6414a0da49ee2e16f50df9 100644 --- a/Framework/Crystal/src/HardThresholdBackground.cpp +++ b/Framework/Crystal/src/HardThresholdBackground.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCrystal/HardThresholdBackground.h" #include "MantidAPI/IMDIterator.h" diff --git a/Framework/Crystal/src/HasUB.cpp b/Framework/Crystal/src/HasUB.cpp index ec877ce8e2c058094686f9d66f54e45b83d09bb7..66318fcbbffff2957cb79e1529bd360e1b226737 100644 --- a/Framework/Crystal/src/HasUB.cpp +++ b/Framework/Crystal/src/HasUB.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCrystal/HasUB.h" diff --git a/Framework/Crystal/src/IndexPeaks.cpp b/Framework/Crystal/src/IndexPeaks.cpp index ed20b30a09a403b06887fcbc1e912b041999b0b4..91ff4f5a34c5b26b76dac4eeac2dd4ae681e3313 100644 --- a/Framework/Crystal/src/IndexPeaks.cpp +++ b/Framework/Crystal/src/IndexPeaks.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCrystal/IndexPeaks.h" #include "MantidAPI/Sample.h" diff --git a/Framework/Crystal/src/IndexSXPeaks.cpp b/Framework/Crystal/src/IndexSXPeaks.cpp index c61c77383fc4ea8f3383f51badf041d39ce2f05f..d08a381a8947c054656271de2d0a8d972bbb99ce 100644 --- a/Framework/Crystal/src/IndexSXPeaks.cpp +++ b/Framework/Crystal/src/IndexSXPeaks.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/Crystal/src/IntegratePeakTimeSlices.cpp b/Framework/Crystal/src/IntegratePeakTimeSlices.cpp index 8be8e420412b88f1dc162d63e89401e60d64eec4..e9d2bb3c35c511c4e69a89e76b02c3e0ef174c1f 100644 --- a/Framework/Crystal/src/IntegratePeakTimeSlices.cpp +++ b/Framework/Crystal/src/IntegratePeakTimeSlices.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /* * IntegratePeakTimeSlices.cpp @@ -26,6 +26,7 @@ #include "MantidHistogramData/BinEdges.h" #include <boost/math/special_functions/round.hpp> +#include <utility> using namespace Mantid::Kernel; using namespace Mantid::API; @@ -657,7 +658,7 @@ void IntegratePeakTimeSlices::exec() { * the center may be included. */ bool IntegratePeakTimeSlices::getNeighborPixIDs( - boost::shared_ptr<Geometry::IComponent> comp, Kernel::V3D &Center, + const boost::shared_ptr<Geometry::IComponent> &comp, Kernel::V3D &Center, double &Radius, int *&ArryofID) { int N = ArryofID[1]; @@ -1417,7 +1418,7 @@ void DataModeHandler::setHeightHalfWidthInfo( */ void IntegratePeakTimeSlices::SetUpData( MatrixWorkspace_sptr &Data, MatrixWorkspace_const_sptr const &inpWkSpace, - boost::shared_ptr<Geometry::IComponent> comp, const int chanMin, + const boost::shared_ptr<Geometry::IComponent> &comp, const int chanMin, const int chanMax, double CentX, double CentY, Kernel::V3D &CentNghbr, double &neighborRadius, // from CentDetspec double Radius, string &spec_idList) { @@ -1468,7 +1469,7 @@ void IntegratePeakTimeSlices::SetUpData( m_NeighborIDs[1] = 2; neighborRadius = NeighborhoodRadiusDivPeakRadius * NewRadius; CentNghbr = CentPos; - getNeighborPixIDs(comp, CentPos, neighborRadius, m_NeighborIDs); + getNeighborPixIDs(std::move(comp), CentPos, neighborRadius, m_NeighborIDs); } else // big enough neighborhood so neighborRadius -= DD; @@ -2526,7 +2527,8 @@ int IntegratePeakTimeSlices::UpdateOutputWS( m_AttributeValues->StatBaseVals(INCol) - 1; TabWS->getRef<double>(std::string("TotIntensityError"), TableRow) = SQRT(m_AttributeValues->StatBaseVals(IVariance)); - TabWS->getRef<string>(std::string("SpecIDs"), TableRow) = spec_idList; + TabWS->getRef<string>(std::string("SpecIDs"), TableRow) = + std::move(spec_idList); return newRowIndex; } diff --git a/Framework/Crystal/src/IntegratePeaksHybrid.cpp b/Framework/Crystal/src/IntegratePeaksHybrid.cpp index 731b7611bb7fb3ef2a1545b9e4dec187f2182009..ff080d0bc293796c5bd291e88dfff1886d9dd7d5 100644 --- a/Framework/Crystal/src/IntegratePeaksHybrid.cpp +++ b/Framework/Crystal/src/IntegratePeaksHybrid.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /*WIKI* diff --git a/Framework/Crystal/src/IntegratePeaksUsingClusters.cpp b/Framework/Crystal/src/IntegratePeaksUsingClusters.cpp index 1ef06b9f81c9233c9b8e18f353b67b5ecfe43c27..b00d18a6e90f7e50a4de6343f6b0edf00347db15 100644 --- a/Framework/Crystal/src/IntegratePeaksUsingClusters.cpp +++ b/Framework/Crystal/src/IntegratePeaksUsingClusters.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCrystal/IntegratePeaksUsingClusters.h" #include "MantidAPI/AlgorithmManager.h" diff --git a/Framework/Crystal/src/LoadHKL.cpp b/Framework/Crystal/src/LoadHKL.cpp index 428cbab42424d0e586b931ef1c395c935762f8a6..7b84615d2d11c8c54f70c272c81acb57eb76c8f6 100644 --- a/Framework/Crystal/src/LoadHKL.cpp +++ b/Framework/Crystal/src/LoadHKL.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCrystal/LoadHKL.h" #include "MantidAPI/FileProperty.h" diff --git a/Framework/Crystal/src/LoadIsawPeaks.cpp b/Framework/Crystal/src/LoadIsawPeaks.cpp index 605e1367c3deb185ed2013c4a3788492ff1547a5..dce2c0b5ff8dfe9e0a6cbe3422c34d0f6d8094cf 100644 --- a/Framework/Crystal/src/LoadIsawPeaks.cpp +++ b/Framework/Crystal/src/LoadIsawPeaks.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCrystal/LoadIsawPeaks.h" #include "MantidAPI/AnalysisDataService.h" @@ -21,6 +21,7 @@ #include "MantidKernel/Strings.h" #include "MantidKernel/Unit.h" #include <boost/algorithm/string/trim.hpp> +#include <utility> using Mantid::Kernel::Strings::getWord; using Mantid::Kernel::Strings::readToEndOfLine; @@ -67,8 +68,7 @@ int LoadIsawPeaks::confidence(Kernel::FileDescriptor &descriptor) const { throw std::logic_error(std::string("No Version for Peaks file")); getWord(in, false); // tag - // cppcheck-suppress unreadVariable - std::string C_Facility = getWord(in, false); + getWord(in, false); // C_Facility getWord(in, false); // tag std::string C_Instrument = getWord(in, false); @@ -125,7 +125,7 @@ void LoadIsawPeaks::exec() { * @param T0 :: Time offset * @return the first word on the next line */ -std::string LoadIsawPeaks::readHeader(PeaksWorkspace_sptr outWS, +std::string LoadIsawPeaks::readHeader(const PeaksWorkspace_sptr &outWS, std::ifstream &in, double &T0) { std::string tag; std::string r = getWord(in, false); @@ -142,8 +142,7 @@ std::string LoadIsawPeaks::readHeader(PeaksWorkspace_sptr outWS, throw std::logic_error(std::string("No Version for Peaks file")); getWord(in, false); // tag - // cppcheck-suppress unreadVariable - std::string C_Facility = getWord(in, false); + getWord(in, false); // C_Facility getWord(in, false); // tag std::string C_Instrument = getWord(in, false); @@ -262,7 +261,7 @@ std::string LoadIsawPeaks::readHeader(PeaksWorkspace_sptr outWS, * @param qSign :: For inelastic this is 1; for crystallography this is -1 * @return the Peak the Peak object created */ -DataObjects::Peak LoadIsawPeaks::readPeak(PeaksWorkspace_sptr outWS, +DataObjects::Peak LoadIsawPeaks::readPeak(const PeaksWorkspace_sptr &outWS, std::string &lastStr, std::ifstream &in, int &seqNum, std::string bankName, double qSign) { @@ -341,8 +340,8 @@ DataObjects::Peak LoadIsawPeaks::readPeak(PeaksWorkspace_sptr outWS, if (!inst) throw std::runtime_error("No instrument in PeaksWorkspace!"); - int pixelID = - findPixelID(inst, bankName, static_cast<int>(col), static_cast<int>(row)); + int pixelID = findPixelID(inst, std::move(bankName), static_cast<int>(col), + static_cast<int>(row)); // Create the peak object Peak peak(outWS->getInstrument(), pixelID, wl); @@ -358,10 +357,10 @@ DataObjects::Peak LoadIsawPeaks::readPeak(PeaksWorkspace_sptr outWS, } //---------------------------------------------------------------------------------------------- -int LoadIsawPeaks::findPixelID(Instrument_const_sptr inst, std::string bankName, - int col, int row) { +int LoadIsawPeaks::findPixelID(const Instrument_const_sptr &inst, + const std::string &bankName, int col, int row) { boost::shared_ptr<const IComponent> parent = - getCachedBankByName(bankName, inst); + getCachedBankByName(std::move(bankName), inst); if (!parent) return -1; // peak not in any detector. @@ -406,7 +405,7 @@ std::string LoadIsawPeaks::readPeakBlockHeader(std::string lastStr, int &detName, double &chi, double &phi, double &omega, double &monCount) { - std::string s = lastStr; + std::string s = std::move(lastStr); if (s.length() < 1 && in.good()) // blank line { @@ -447,8 +446,8 @@ std::string LoadIsawPeaks::readPeakBlockHeader(std::string lastStr, * @param outWS :: the workspace in which to place the information * @param filename :: path to the .peaks file */ -void LoadIsawPeaks::appendFile(PeaksWorkspace_sptr outWS, - std::string filename) { +void LoadIsawPeaks::appendFile(const PeaksWorkspace_sptr &outWS, + const std::string &filename) { // HKL's are flipped by -1 because of the internal Q convention // unless Crystallography convention double qSign = -1.0; @@ -566,8 +565,8 @@ void LoadIsawPeaks::appendFile(PeaksWorkspace_sptr outWS, * @param outWS :: the workspace in which to place the information * @param filename :: path to the .peaks file */ -void LoadIsawPeaks::checkNumberPeaks(PeaksWorkspace_sptr outWS, - std::string filename) { +void LoadIsawPeaks::checkNumberPeaks(const PeaksWorkspace_sptr &outWS, + const std::string &filename) { // Open the file std::ifstream in(filename.c_str()); @@ -603,7 +602,7 @@ void LoadIsawPeaks::checkNumberPeaks(PeaksWorkspace_sptr outWS, *found) */ boost::shared_ptr<const IComponent> LoadIsawPeaks::getCachedBankByName( - std::string bankname, + const std::string &bankname, const boost::shared_ptr<const Geometry::Instrument> &inst) { if (m_banks.count(bankname) == 0) m_banks[bankname] = inst->getComponentByName(bankname); diff --git a/Framework/Crystal/src/LoadIsawSpectrum.cpp b/Framework/Crystal/src/LoadIsawSpectrum.cpp index a2df6423eee430a62019ce3a9a014e1213c3b196..9263a6de4d3bcf7f6c75369dfc5a3839b2f6fad1 100644 --- a/Framework/Crystal/src/LoadIsawSpectrum.cpp +++ b/Framework/Crystal/src/LoadIsawSpectrum.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCrystal/LoadIsawSpectrum.h" #include "MantidAPI/Axis.h" @@ -56,7 +56,6 @@ void LoadIsawSpectrum::exec() { const V3D pos = inst->getSource()->getPos() - samplePos; double l1 = pos.norm(); - std::vector<double> spec(11); std::string STRING; std::ifstream infile; std::string spectraFile = getPropertyValue("SpectraFile"); diff --git a/Framework/Crystal/src/LoadIsawUB.cpp b/Framework/Crystal/src/LoadIsawUB.cpp index dc9158dd6a3ab643f06501d5740ec6961408925f..16f1908535ebe12ae67d2c8b3a0dcf6fa2db07a2 100644 --- a/Framework/Crystal/src/LoadIsawUB.cpp +++ b/Framework/Crystal/src/LoadIsawUB.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCrystal/LoadIsawUB.h" #include "MantidAPI/FileProperty.h" diff --git a/Framework/Crystal/src/MaskPeaksWorkspace.cpp b/Framework/Crystal/src/MaskPeaksWorkspace.cpp index e842a5d059dacb43ba5908cbd132a880f2b93512..676c6abeb362528fd005d3ef84ce4008831d7855 100644 --- a/Framework/Crystal/src/MaskPeaksWorkspace.cpp +++ b/Framework/Crystal/src/MaskPeaksWorkspace.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCrystal/MaskPeaksWorkspace.h" #include "MantidAPI/FileProperty.h" @@ -200,9 +200,10 @@ void MaskPeaksWorkspace::retrieveProperties() { } } -size_t MaskPeaksWorkspace::getWkspIndex(const detid2index_map &pixel_to_wi, - Geometry::IComponent_const_sptr comp, - const int x, const int y) { +size_t +MaskPeaksWorkspace::getWkspIndex(const detid2index_map &pixel_to_wi, + const Geometry::IComponent_const_sptr &comp, + const int x, const int y) { Geometry::RectangularDetector_const_sptr det = boost::dynamic_pointer_cast<const Geometry::RectangularDetector>(comp); if (det) { @@ -270,7 +271,8 @@ void MaskPeaksWorkspace::getTofRange(double &tofMin, double &tofMax, tofMax = tofPeak + m_tofMax; } } -int MaskPeaksWorkspace::findPixelID(std::string bankName, int col, int row) { +int MaskPeaksWorkspace::findPixelID(const std::string &bankName, int col, + int row) { Geometry::Instrument_const_sptr Iptr = m_inputW->getInstrument(); boost::shared_ptr<const IComponent> parent = Iptr->getComponentByName(bankName); diff --git a/Framework/Crystal/src/NormaliseVanadium.cpp b/Framework/Crystal/src/NormaliseVanadium.cpp index 6077948847f8e3c341c58dbb1f0941ed2d46d7ca..297950e704a94e15436c65a1237c3896dc7f60d5 100644 --- a/Framework/Crystal/src/NormaliseVanadium.cpp +++ b/Framework/Crystal/src/NormaliseVanadium.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCrystal/NormaliseVanadium.h" #include "MantidAPI/Axis.h" diff --git a/Framework/Crystal/src/OptimizeCrystalPlacement.cpp b/Framework/Crystal/src/OptimizeCrystalPlacement.cpp index 289ef54c9aa0ca68d618a02504070df441ba6f88..8985c9d6a0888794d3cfb7b260ec487967b79871 100644 --- a/Framework/Crystal/src/OptimizeCrystalPlacement.cpp +++ b/Framework/Crystal/src/OptimizeCrystalPlacement.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /* * diff --git a/Framework/Crystal/src/OptimizeLatticeForCellType.cpp b/Framework/Crystal/src/OptimizeLatticeForCellType.cpp index 3aaf58670eec1826e2262b4d3c3a363e2dafd9cd..d819af1b37b79608d65306899e059cf6b7b3b3bd 100644 --- a/Framework/Crystal/src/OptimizeLatticeForCellType.cpp +++ b/Framework/Crystal/src/OptimizeLatticeForCellType.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCrystal/OptimizeLatticeForCellType.h" #include "MantidAPI/AnalysisDataService.h" diff --git a/Framework/Crystal/src/PeakAlgorithmHelpers.cpp b/Framework/Crystal/src/PeakAlgorithmHelpers.cpp index 88cd01b92302da27e44c3de5a3b3855af93d2dbc..684e7601304f58702079624c55c1ecc7c4ca30a7 100644 --- a/Framework/Crystal/src/PeakAlgorithmHelpers.cpp +++ b/Framework/Crystal/src/PeakAlgorithmHelpers.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCrystal/PeakAlgorithmHelpers.h" #include "MantidKernel/ArrayLengthValidator.h" @@ -200,12 +200,13 @@ generateOffsetVectors(const std::vector<double> &hOffsets, std::vector<MNPOffset> offsets; for (double hOffset : hOffsets) { for (double kOffset : kOffsets) { - for (double lOffset : lOffsets) { - // mnp = 0, 0, 0 as - // it's not quite clear how to interpret them as mnp indices - offsets.emplace_back( - std::make_tuple(0, 0, 0, V3D(hOffset, kOffset, lOffset))); - } + std::transform( + lOffsets.begin(), lOffsets.end(), std::back_inserter(offsets), + [&hOffset, &kOffset](double lOffset) { + // it's not quite clear how to interpret them as mnp + // indices so set to 0, 0, 0 + return std::make_tuple(0, 0, 0, V3D(hOffset, kOffset, lOffset)); + }); } } return offsets; diff --git a/Framework/Crystal/src/PeakBackground.cpp b/Framework/Crystal/src/PeakBackground.cpp index ab27b81e97370ff10131e521b2dbac9046c63ef6..e1415c17a77e74badd4ce38bc8875f0a2c1cfd79 100644 --- a/Framework/Crystal/src/PeakBackground.cpp +++ b/Framework/Crystal/src/PeakBackground.cpp @@ -1,11 +1,13 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + -#include "MantidCrystal/PeakBackground.h" +#include <utility> + #include "MantidAPI/IPeaksWorkspace.h" +#include "MantidCrystal/PeakBackground.h" #include "MantidGeometry/Crystal/IPeak.h" using namespace Mantid::API; @@ -24,7 +26,7 @@ PeakBackground::PeakBackground(IPeaksWorkspace_const_sptr peaksWS, const Mantid::API::MDNormalization normalisation, const SpecialCoordinateSystem coordinates) : HardThresholdBackground(thresholdSignal, normalisation), - m_peaksWS(peaksWS), m_radiusEstimate(radiusEstimate), + m_peaksWS(std::move(peaksWS)), m_radiusEstimate(radiusEstimate), m_mdCoordinates(coordinates) { if (m_mdCoordinates == QLab) { diff --git a/Framework/Crystal/src/PeakClusterProjection.cpp b/Framework/Crystal/src/PeakClusterProjection.cpp index ebe805dec43a12572ed70cd7186bfaf7362ce39d..90c48a460d88f264ab00d1bbd1d29fb2c50a2066 100644 --- a/Framework/Crystal/src/PeakClusterProjection.cpp +++ b/Framework/Crystal/src/PeakClusterProjection.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCrystal/PeakClusterProjection.h" diff --git a/Framework/Crystal/src/PeakHKLErrors.cpp b/Framework/Crystal/src/PeakHKLErrors.cpp index 7d4778e0c85506408647e2b73f075b4b1a70c8f5..8d4e7eebca125e46dca243481a149e6048c35cc0 100644 --- a/Framework/Crystal/src/PeakHKLErrors.cpp +++ b/Framework/Crystal/src/PeakHKLErrors.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /* * PeakHKLErrors.cpp @@ -117,7 +117,7 @@ void PeakHKLErrors::setUpOptRuns() { */ void PeakHKLErrors::cLone( boost::shared_ptr<Geometry::ParameterMap> &pmap, - boost::shared_ptr<const Geometry::IComponent> component, + const boost::shared_ptr<const Geometry::IComponent> &component, boost::shared_ptr<const Geometry::ParameterMap> &pmapSv) { if (!component) return; @@ -187,7 +187,7 @@ void PeakHKLErrors::cLone( * NOTE: All the peaks in the PeaksWorkspace must use the same instrument. */ boost::shared_ptr<Geometry::Instrument> -PeakHKLErrors::getNewInstrument(PeaksWorkspace_sptr Peaks) const { +PeakHKLErrors::getNewInstrument(const PeaksWorkspace_sptr &Peaks) const { Geometry::Instrument_const_sptr instSave = Peaks->getPeak(0).getInstrument(); auto pmap = boost::make_shared<Geometry::ParameterMap>(); @@ -643,8 +643,8 @@ void PeakHKLErrors::functionDeriv1D(Jacobian *out, const double *xValues, } Peak PeakHKLErrors::createNewPeak(const Geometry::IPeak &peak_old, - Geometry::Instrument_sptr instrNew, double T0, - double L0) { + const Geometry::Instrument_sptr &instrNew, + double T0, double L0) { Geometry::Instrument_const_sptr inst = peak_old.getInstrument(); if (inst->getComponentID() != instrNew->getComponentID()) { g_log.error("All peaks must have the same instrument"); diff --git a/Framework/Crystal/src/PeakIntegration.cpp b/Framework/Crystal/src/PeakIntegration.cpp index e1d9747520cda185d319e6a9e89c1a5b41a93e11..da992cb6dbfe2183cab67edff372121513647510 100644 --- a/Framework/Crystal/src/PeakIntegration.cpp +++ b/Framework/Crystal/src/PeakIntegration.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCrystal/PeakIntegration.h" #include "MantidAPI/FileProperty.h" @@ -301,8 +301,8 @@ void PeakIntegration::retrieveProperties() { } } -int PeakIntegration::fitneighbours(int ipeak, std::string det_name, int x0, - int y0, int idet, double qspan, +int PeakIntegration::fitneighbours(int ipeak, const std::string &det_name, + int x0, int y0, int idet, double qspan, PeaksWorkspace_sptr &Peaks, const detid2index_map &pixel_to_wi) { UNUSED_ARG(ipeak); diff --git a/Framework/Crystal/src/PeakIntensityVsRadius.cpp b/Framework/Crystal/src/PeakIntensityVsRadius.cpp index 9ca04a1188d18d1a69716ce55b8725fcc34901d6..96cf168536c08b07e9c45cd7866e5fb69989adc4 100644 --- a/Framework/Crystal/src/PeakIntensityVsRadius.cpp +++ b/Framework/Crystal/src/PeakIntensityVsRadius.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCrystal/PeakIntensityVsRadius.h" #include "MantidAPI/Axis.h" diff --git a/Framework/Crystal/src/PeakStatisticsTools.cpp b/Framework/Crystal/src/PeakStatisticsTools.cpp index ca56d1dcb775b1285bc3c35187bf3c2a06d3548c..1828a4c5ae8830db9667a3d8e9cd4a37406c9746 100644 --- a/Framework/Crystal/src/PeakStatisticsTools.cpp +++ b/Framework/Crystal/src/PeakStatisticsTools.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCrystal/PeakStatisticsTools.h" diff --git a/Framework/Crystal/src/PeaksInRegion.cpp b/Framework/Crystal/src/PeaksInRegion.cpp index cc35029bd1ebb8262af398bdc48e27eb998c3cdd..d78ba3d482ee06d7ae9829550dd98deacf498ad4 100644 --- a/Framework/Crystal/src/PeaksInRegion.cpp +++ b/Framework/Crystal/src/PeaksInRegion.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCrystal/PeaksInRegion.h" #include "MantidKernel/ArrayProperty.h" diff --git a/Framework/Crystal/src/PeaksIntersection.cpp b/Framework/Crystal/src/PeaksIntersection.cpp index 3b2c7fc483769016882d3287a0556f01a9411776..f816862d58e9e940b18afce3d0d181e0a242d3d7 100644 --- a/Framework/Crystal/src/PeaksIntersection.cpp +++ b/Framework/Crystal/src/PeaksIntersection.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCrystal/PeaksIntersection.h" #include "MantidAPI/TableRow.h" diff --git a/Framework/Crystal/src/PeaksOnSurface.cpp b/Framework/Crystal/src/PeaksOnSurface.cpp index 8979efdd2686b62a6d21e2f2ab5262df01e7246b..ce6a235b6242b47b2c794c5a3c6e0341c7c4e3e4 100644 --- a/Framework/Crystal/src/PeaksOnSurface.cpp +++ b/Framework/Crystal/src/PeaksOnSurface.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCrystal/PeaksOnSurface.h" #include "MantidKernel/ArrayProperty.h" diff --git a/Framework/Crystal/src/PredictFractionalPeaks.cpp b/Framework/Crystal/src/PredictFractionalPeaks.cpp index 3d3827fe7457242e6f99b6a758d0ad72606f7f0d..9ffa8812486e5abd7689d2cc9a5b61dfc19e051f 100644 --- a/Framework/Crystal/src/PredictFractionalPeaks.cpp +++ b/Framework/Crystal/src/PredictFractionalPeaks.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCrystal/PredictFractionalPeaks.h" #include "MantidAPI/Run.h" diff --git a/Framework/Crystal/src/PredictPeaks.cpp b/Framework/Crystal/src/PredictPeaks.cpp index 1b721283210b2536072dca806fd0cdfb14916b95..206781439c0c91f849a31188458caa7e42de4c70 100644 --- a/Framework/Crystal/src/PredictPeaks.cpp +++ b/Framework/Crystal/src/PredictPeaks.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCrystal/PredictPeaks.h" #include "MantidAPI/IMDEventWorkspace.h" diff --git a/Framework/Crystal/src/PredictSatellitePeaks.cpp b/Framework/Crystal/src/PredictSatellitePeaks.cpp index f6718acbef0755525e2cf067304fe7f99197f0b7..3f2232ca77fd8067d80cfbc801cfedfc4115aa5c 100644 --- a/Framework/Crystal/src/PredictSatellitePeaks.cpp +++ b/Framework/Crystal/src/PredictSatellitePeaks.cpp @@ -1,3 +1,9 @@ +// Mantid Repository : https://github.com/mantidproject/mantid +// +// Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS +// SPDX - License - Identifier: GPL - 3.0 + /* * PredictSatellitePeaks.cpp * diff --git a/Framework/Crystal/src/SCDCalibratePanels.cpp b/Framework/Crystal/src/SCDCalibratePanels.cpp index 2bd68545267b75138a71c10783a4c15689e8eecc..72bdeb27f5b57cfdd9746e477579ee47aa2b7126 100644 --- a/Framework/Crystal/src/SCDCalibratePanels.cpp +++ b/Framework/Crystal/src/SCDCalibratePanels.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCrystal/SCDCalibratePanels.h" #include "MantidAPI/AlgorithmManager.h" @@ -280,16 +280,16 @@ void SCDCalibratePanels::exec() { saveNexus(tofFilename, TofWksp); } -void SCDCalibratePanels::saveNexus(std::string outputFile, - MatrixWorkspace_sptr outputWS) { +void SCDCalibratePanels::saveNexus(const std::string &outputFile, + const MatrixWorkspace_sptr &outputWS) { IAlgorithm_sptr save = this->createChildAlgorithm("SaveNexus"); save->setProperty("InputWorkspace", outputWS); save->setProperty("FileName", outputFile); save->execute(); } -void SCDCalibratePanels::findL1(int nPeaks, - DataObjects::PeaksWorkspace_sptr peaksWs) { +void SCDCalibratePanels::findL1( + int nPeaks, const DataObjects::PeaksWorkspace_sptr &peaksWs) { MatrixWorkspace_sptr L1WS = boost::dynamic_pointer_cast<MatrixWorkspace>( API::WorkspaceFactory::Instance().create("Workspace2D", 1, 3 * nPeaks, 3 * nPeaks)); @@ -329,8 +329,8 @@ void SCDCalibratePanels::findL1(int nPeaks, << fitL1Status << " Chi2overDoF " << chisqL1 << "\n"; } -void SCDCalibratePanels::findT0(int nPeaks, - DataObjects::PeaksWorkspace_sptr peaksWs) { +void SCDCalibratePanels::findT0( + int nPeaks, const DataObjects::PeaksWorkspace_sptr &peaksWs) { MatrixWorkspace_sptr T0WS = boost::dynamic_pointer_cast<MatrixWorkspace>( API::WorkspaceFactory::Instance().create("Workspace2D", 1, 3 * nPeaks, 3 * nPeaks)); @@ -385,7 +385,8 @@ void SCDCalibratePanels::findT0(int nPeaks, } } -void SCDCalibratePanels::findU(DataObjects::PeaksWorkspace_sptr peaksWs) { +void SCDCalibratePanels::findU( + const DataObjects::PeaksWorkspace_sptr &peaksWs) { IAlgorithm_sptr ub_alg; try { ub_alg = createChildAlgorithm("CalculateUMatrix", -1, -1, false); @@ -442,7 +443,7 @@ void SCDCalibratePanels::findU(DataObjects::PeaksWorkspace_sptr peaksWs) { void SCDCalibratePanels::saveIsawDetCal( boost::shared_ptr<Instrument> &instrument, boost::container::flat_set<string> &AllBankName, double T0, - string filename) { + const string &filename) { // having a filename triggers doing the work if (filename.empty()) return; @@ -633,8 +634,9 @@ void SCDCalibratePanels::saveXmlFile( oss3.flush(); oss3.close(); } -void SCDCalibratePanels::findL2(boost::container::flat_set<string> MyBankNames, - DataObjects::PeaksWorkspace_sptr peaksWs) { +void SCDCalibratePanels::findL2( + boost::container::flat_set<string> MyBankNames, + const DataObjects::PeaksWorkspace_sptr &peaksWs) { bool changeSize = getProperty("ChangePanelSize"); Geometry::Instrument_const_sptr inst = peaksWs->getInstrument(); diff --git a/Framework/Crystal/src/SCDPanelErrors.cpp b/Framework/Crystal/src/SCDPanelErrors.cpp index e5899472ff9785901aa0af0b204fea831c6e20a1..e22beeaeede971ed058ac9319d09721b621b5ce0 100644 --- a/Framework/Crystal/src/SCDPanelErrors.cpp +++ b/Framework/Crystal/src/SCDPanelErrors.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCrystal/SCDPanelErrors.h" #include "MantidAPI/Algorithm.h" @@ -23,6 +23,7 @@ #include <cmath> #include <fstream> #include <sstream> +#include <utility> namespace Mantid { namespace Crystal { @@ -74,7 +75,7 @@ SCDPanelErrors::SCDPanelErrors() : m_setupFinished(false) { void SCDPanelErrors::moveDetector(double x, double y, double z, double rotx, double roty, double rotz, double scalex, double scaley, std::string detname, - Workspace_sptr inputW) const { + const Workspace_sptr &inputW) const { if (detname.compare("none") == 0.0) return; // CORELLI has sixteenpack under bank @@ -340,7 +341,7 @@ void SCDPanelErrors::loadWorkspace(const std::string &wsName) const { * @param ws :: The workspace to load from */ void SCDPanelErrors::loadWorkspace(boost::shared_ptr<API::Workspace> ws) const { - m_workspace = ws; + m_workspace = std::move(ws); m_setupFinished = false; } diff --git a/Framework/Crystal/src/SaveHKL.cpp b/Framework/Crystal/src/SaveHKL.cpp index bf742d79a92decaa892a9ccb9d9c433c78ca7c8a..c031b73732ebf8e9830976910f4f37bf6be11875 100644 --- a/Framework/Crystal/src/SaveHKL.cpp +++ b/Framework/Crystal/src/SaveHKL.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCrystal/SaveHKL.h" #include "MantidAPI/FileProperty.h" @@ -747,7 +747,7 @@ double SaveHKL::spectrumCalc(double TOF, int iSpec, return spect; } -void SaveHKL::sizeBanks(std::string bankName, int &nCols, int &nRows) { +void SaveHKL::sizeBanks(const std::string &bankName, int &nCols, int &nRows) { if (bankName == "None") return; boost::shared_ptr<const IComponent> parent = diff --git a/Framework/Crystal/src/SaveIsawPeaks.cpp b/Framework/Crystal/src/SaveIsawPeaks.cpp index e47f2253c054de10b134514872e5f70f04d50715..82685646a586135a12c208e0ba9868c20083c7ff 100644 --- a/Framework/Crystal/src/SaveIsawPeaks.cpp +++ b/Framework/Crystal/src/SaveIsawPeaks.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCrystal/SaveIsawPeaks.h" #include "MantidAPI/FileProperty.h" @@ -318,7 +318,6 @@ void SaveIsawPeaks::exec() { const int run = runBankMap.first; const auto &bankMap = runBankMap.second; - bankMap_t::iterator bankMap_it; for (const auto &bankIDs : bankMap) { // Start of a new bank. const int bank = bankIDs.first; @@ -461,7 +460,7 @@ void SaveIsawPeaks::exec() { out.close(); } -bool SaveIsawPeaks::bankMasked(IComponent_const_sptr parent, +bool SaveIsawPeaks::bankMasked(const IComponent_const_sptr &parent, const Geometry::DetectorInfo &detectorInfo) { std::vector<Geometry::IComponent_const_sptr> children; auto asmb = @@ -494,7 +493,7 @@ bool SaveIsawPeaks::bankMasked(IComponent_const_sptr parent, return true; } -V3D SaveIsawPeaks::findPixelPos(std::string bankName, int col, int row) { +V3D SaveIsawPeaks::findPixelPos(const std::string &bankName, int col, int row) { auto parent = inst->getComponentByName(bankName); if (parent->type() == "RectangularDetector") { const auto RDet = @@ -524,8 +523,8 @@ V3D SaveIsawPeaks::findPixelPos(std::string bankName, int col, int row) { return first->getPos(); } } -void SaveIsawPeaks::sizeBanks(std::string bankName, int &NCOLS, int &NROWS, - double &xsize, double &ysize) { +void SaveIsawPeaks::sizeBanks(const std::string &bankName, int &NCOLS, + int &NROWS, double &xsize, double &ysize) { if (bankName == "None") return; const auto parent = inst->getComponentByName(bankName); diff --git a/Framework/Crystal/src/SaveIsawUB.cpp b/Framework/Crystal/src/SaveIsawUB.cpp index 34e22b5af1265a4493b4af9b3a9d6ccb04a95765..bf7ace5649c4c72571685cd2f71f98b6f4380021 100644 --- a/Framework/Crystal/src/SaveIsawUB.cpp +++ b/Framework/Crystal/src/SaveIsawUB.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCrystal/SaveIsawUB.h" #include "MantidAPI/FileProperty.h" diff --git a/Framework/Crystal/src/SaveLauenorm.cpp b/Framework/Crystal/src/SaveLauenorm.cpp index 9b017031a4dddbca9335d9d13fe79e13d15e3b73..1c930b37b47e82bbb130bba2d193b2c50a359d57 100644 --- a/Framework/Crystal/src/SaveLauenorm.cpp +++ b/Framework/Crystal/src/SaveLauenorm.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCrystal/SaveLauenorm.h" #include "MantidAPI/FileProperty.h" @@ -499,7 +499,8 @@ void SaveLauenorm::exec() { out.flush(); out.close(); } -void SaveLauenorm::sizeBanks(std::string bankName, int &nCols, int &nRows) { +void SaveLauenorm::sizeBanks(const std::string &bankName, int &nCols, + int &nRows) { if (bankName == "None") return; boost::shared_ptr<const IComponent> parent = diff --git a/Framework/Crystal/src/SelectCellOfType.cpp b/Framework/Crystal/src/SelectCellOfType.cpp index 69df078fcb7fd069e0e0537639a49b4384c8db4e..0d82a4334c7118d251911cfe58f6381a6ffd7b73 100644 --- a/Framework/Crystal/src/SelectCellOfType.cpp +++ b/Framework/Crystal/src/SelectCellOfType.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCrystal/SelectCellOfType.h" #include "MantidAPI/Sample.h" diff --git a/Framework/Crystal/src/SelectCellWithForm.cpp b/Framework/Crystal/src/SelectCellWithForm.cpp index c848df75d12a3fa5ef053e3c17f93dc05f8f7926..7d084a1c04d4a5c144ae79b7b7598f2067a6f191 100644 --- a/Framework/Crystal/src/SelectCellWithForm.cpp +++ b/Framework/Crystal/src/SelectCellWithForm.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCrystal/SelectCellWithForm.h" #include "MantidAPI/Sample.h" diff --git a/Framework/Crystal/src/SetCrystalLocation.cpp b/Framework/Crystal/src/SetCrystalLocation.cpp index c6744181168d75dd52386f8cf42df6c9ea7cc41c..a99a679b3fd40ebcc1d0fac0fbdf9d09999e709f 100644 --- a/Framework/Crystal/src/SetCrystalLocation.cpp +++ b/Framework/Crystal/src/SetCrystalLocation.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /* * diff --git a/Framework/Crystal/src/SetGoniometer.cpp b/Framework/Crystal/src/SetGoniometer.cpp index a7a62df53b17161c6a89e834fbc12b6efc7433cd..2c57cbcee7ab39953456945528a72c3c0de5e463 100644 --- a/Framework/Crystal/src/SetGoniometer.cpp +++ b/Framework/Crystal/src/SetGoniometer.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCrystal/SetGoniometer.h" #include "MantidAPI/MatrixWorkspace.h" diff --git a/Framework/Crystal/src/SetSpecialCoordinates.cpp b/Framework/Crystal/src/SetSpecialCoordinates.cpp index f985d3b90a9895ed1201f2c23bd1d10daa2728db..8d661d43fecf6f6fd01882395c8902fe8d012462 100644 --- a/Framework/Crystal/src/SetSpecialCoordinates.cpp +++ b/Framework/Crystal/src/SetSpecialCoordinates.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCrystal/SetSpecialCoordinates.h" #include "MantidAPI/IMDEventWorkspace.h" @@ -93,9 +93,9 @@ void SetSpecialCoordinates::init() { } bool SetSpecialCoordinates::writeCoordinatesToMDEventWorkspace( - Workspace_sptr inWS, SpecialCoordinateSystem /*unused*/) { + const Workspace_sptr &inWS, SpecialCoordinateSystem /*unused*/) { bool written = false; - if (auto mdEventWS = boost::dynamic_pointer_cast<IMDEventWorkspace>(inWS)) { + if (boost::dynamic_pointer_cast<IMDEventWorkspace>(inWS)) { g_log.warning("SetSpecialCoordinates: This algorithm cannot set the " "special coordinate system for an MDEvent workspace any " "longer."); @@ -105,9 +105,9 @@ bool SetSpecialCoordinates::writeCoordinatesToMDEventWorkspace( } bool SetSpecialCoordinates::writeCoordinatesToMDHistoWorkspace( - Workspace_sptr inWS, SpecialCoordinateSystem /*unused*/) { + const Workspace_sptr &inWS, SpecialCoordinateSystem /*unused*/) { bool written = false; - if (auto mdHistoWS = boost::dynamic_pointer_cast<IMDHistoWorkspace>(inWS)) { + if (boost::dynamic_pointer_cast<IMDHistoWorkspace>(inWS)) { g_log.warning("SetSpecialCoordinates: This algorithm cannot set the " "special coordinate system for an MDHisto workspace any " "longer."); @@ -117,7 +117,7 @@ bool SetSpecialCoordinates::writeCoordinatesToMDHistoWorkspace( } bool SetSpecialCoordinates::writeCoordinatesToPeaksWorkspace( - Workspace_sptr inWS, SpecialCoordinateSystem coordinateSystem) { + const Workspace_sptr &inWS, SpecialCoordinateSystem coordinateSystem) { bool written = false; if (auto peaksWS = boost::dynamic_pointer_cast<IPeaksWorkspace>(inWS)) { peaksWS->setCoordinateSystem(coordinateSystem); diff --git a/Framework/Crystal/src/SetUB.cpp b/Framework/Crystal/src/SetUB.cpp index 92522470405a48846560698d04ea803731b2f0dc..d99839f52668a0d88969f9930ccb49589adb5649 100644 --- a/Framework/Crystal/src/SetUB.cpp +++ b/Framework/Crystal/src/SetUB.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCrystal/SetUB.h" #include "MantidAPI/IMDEventWorkspace.h" diff --git a/Framework/Crystal/src/ShowPeakHKLOffsets.cpp b/Framework/Crystal/src/ShowPeakHKLOffsets.cpp index 57c66e4c61da2c76fcafe9dfe9eeaa1772ca2c10..1de16699f36830b92341e01bbfeafcef1e1822e6 100644 --- a/Framework/Crystal/src/ShowPeakHKLOffsets.cpp +++ b/Framework/Crystal/src/ShowPeakHKLOffsets.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCrystal/ShowPeakHKLOffsets.h" #include "MantidAPI/Sample.h" diff --git a/Framework/Crystal/src/ShowPossibleCells.cpp b/Framework/Crystal/src/ShowPossibleCells.cpp index bf2c3bd801d8348cf02584e03fc57e73d9dd3ed0..4089b33986c59c092690c5b04c55f0aa298c9617 100644 --- a/Framework/Crystal/src/ShowPossibleCells.cpp +++ b/Framework/Crystal/src/ShowPossibleCells.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCrystal/ShowPossibleCells.h" #include "MantidAPI/Sample.h" diff --git a/Framework/Crystal/src/SortHKL.cpp b/Framework/Crystal/src/SortHKL.cpp index 0b18e987eae2f2c72376819f58a328a0e7a0f1b3..c5d7122c42bcf36284ec6847ae2f79db09ca01de 100644 --- a/Framework/Crystal/src/SortHKL.cpp +++ b/Framework/Crystal/src/SortHKL.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCrystal/SortHKL.h" #include "MantidAPI/AnalysisDataService.h" @@ -412,7 +412,8 @@ PeaksWorkspace_sptr SortHKL::getOutputPeaksWorkspace( } /// Sorts the peaks in the workspace by H, K and L. -void SortHKL::sortOutputPeaksByHKL(IPeaksWorkspace_sptr outputPeaksWorkspace) { +void SortHKL::sortOutputPeaksByHKL( + const IPeaksWorkspace_sptr &outputPeaksWorkspace) { // Sort by HKL std::vector<std::pair<std::string, bool>> criteria{ {"H", true}, {"K", true}, {"L", true}}; diff --git a/Framework/Crystal/src/SortPeaksWorkspace.cpp b/Framework/Crystal/src/SortPeaksWorkspace.cpp index f27d344bff8917c2236627da7791ead86a874b23..60372f6c5d43868b3928b134710182184325c97b 100644 --- a/Framework/Crystal/src/SortPeaksWorkspace.cpp +++ b/Framework/Crystal/src/SortPeaksWorkspace.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCrystal/SortPeaksWorkspace.h" #include "MantidKernel/MandatoryValidator.h" diff --git a/Framework/Crystal/src/StatisticsOfPeaksWorkspace.cpp b/Framework/Crystal/src/StatisticsOfPeaksWorkspace.cpp index 38601918d1cb8d1f1fafe72d315be2331c93a538..a93bf28a13e12ce7cd7a02ccbee524feda20e719 100644 --- a/Framework/Crystal/src/StatisticsOfPeaksWorkspace.cpp +++ b/Framework/Crystal/src/StatisticsOfPeaksWorkspace.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCrystal/StatisticsOfPeaksWorkspace.h" #include "MantidAPI/FileProperty.h" @@ -198,8 +198,8 @@ void StatisticsOfPeaksWorkspace::exec() { * @param ws :: any PeaksWorkspace * @param runName :: string to put in statistics table */ -void StatisticsOfPeaksWorkspace::doSortHKL(Mantid::API::Workspace_sptr ws, - std::string runName) { +void StatisticsOfPeaksWorkspace::doSortHKL( + const Mantid::API::Workspace_sptr &ws, const std::string &runName) { std::string pointGroup = getPropertyValue("PointGroup"); std::string latticeCentering = getPropertyValue("LatticeCentering"); std::string wkspName = getPropertyValue("OutputWorkspace"); diff --git a/Framework/Crystal/src/TransformHKL.cpp b/Framework/Crystal/src/TransformHKL.cpp index 9167d87f5d6734ae6958f16b98869ca739d8d9c0..8e3da5e91efa8c562f7ebc66e22881ad762b475a 100644 --- a/Framework/Crystal/src/TransformHKL.cpp +++ b/Framework/Crystal/src/TransformHKL.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCrystal/TransformHKL.h" #include "MantidAPI/Sample.h" diff --git a/Framework/Crystal/test/AddPeakHKLTest.h b/Framework/Crystal/test/AddPeakHKLTest.h index 588d3932c1c2121567dca328e198c28be6211932..d0785dd6fc078e34b33bf48955a0699ce657953e 100644 --- a/Framework/Crystal/test/AddPeakHKLTest.h +++ b/Framework/Crystal/test/AddPeakHKLTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/test/AnvredCorrectionTest.h b/Framework/Crystal/test/AnvredCorrectionTest.h index 4fd4d7161ed35c219017d91fecb1017c840d2b02..ea03f23516a20d2f64c62d45b65584a9f17f8893 100644 --- a/Framework/Crystal/test/AnvredCorrectionTest.h +++ b/Framework/Crystal/test/AnvredCorrectionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -69,7 +69,7 @@ EventWorkspace_sptr createDiffractionEventWorkspace(int numBanks = 1, return retVal; } -void do_test_events(MatrixWorkspace_sptr workspace, bool ev, +void do_test_events(const MatrixWorkspace_sptr &workspace, bool ev, bool performance = false) { workspace->getAxis(0)->setUnit("Wavelength"); diff --git a/Framework/Crystal/test/CMakeLists.txt b/Framework/Crystal/test/CMakeLists.txt index b0f4b4a61d473900a8115af36030a0d854a0aa3d..2957d43e2ec2494f569b2e948ca1777e99f8f855 100644 --- a/Framework/Crystal/test/CMakeLists.txt +++ b/Framework/Crystal/test/CMakeLists.txt @@ -1,8 +1,7 @@ if(CXXTEST_FOUND) include_directories(SYSTEM ${CXXTEST_INCLUDE_DIR} - ${GMOCK_INCLUDE_DIR} - ${GTEST_INCLUDE_DIR}) +) include_directories(../../DataHandling/inc ../../TestHelpers/inc) # This variable is used within the cxxtest_add_test macro to build these @@ -23,8 +22,8 @@ if(CXXTEST_FOUND) DataHandling MDAlgorithms Nexus - ${GMOCK_LIBRARIES} - ${GTEST_LIBRARIES}) + gmock +) add_dependencies(CrystalTest Algorithms CurveFitting) add_dependencies(FrameworkTests CrystalTest) # Test data diff --git a/Framework/Crystal/test/CalculatePeaksHKLTest.h b/Framework/Crystal/test/CalculatePeaksHKLTest.h index 65ce9cc1f3dc7d6df3de16facf1eeab6a95f0b09..e02a9aaee67431d67212bda9556f0b1ed42bb140 100644 --- a/Framework/Crystal/test/CalculatePeaksHKLTest.h +++ b/Framework/Crystal/test/CalculatePeaksHKLTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/test/CalculateUMatrixTest.h b/Framework/Crystal/test/CalculateUMatrixTest.h index 63a9e4ed076878eb04916cac07d1fbb7e753175f..49ac4859da994b80e4106e548bd12bb066a09ce8 100644 --- a/Framework/Crystal/test/CalculateUMatrixTest.h +++ b/Framework/Crystal/test/CalculateUMatrixTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -181,7 +181,7 @@ private: return atan2(-QYUB(H, K, L), -QXUB(H, K, L)); } - void generatePeaks(std::string WSName) { + void generatePeaks(const std::string &WSName) { setupUB(); double Hpeaks[9] = {0, 1, 1, 0, -1, -1, 1, -3, -2}; diff --git a/Framework/Crystal/test/CalibrationHelpersTest.h b/Framework/Crystal/test/CalibrationHelpersTest.h index 176ad38b4a29c20e42f526dd206a5e8c4de8c1f1..9133e4d56657dab14aee3bc5c59d3a565ebb085b 100644 --- a/Framework/Crystal/test/CalibrationHelpersTest.h +++ b/Framework/Crystal/test/CalibrationHelpersTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/test/CentroidPeaksTest.h b/Framework/Crystal/test/CentroidPeaksTest.h index 98923b293805705021669f27977345a6f3e8dcf6..0c3b66d12573d6ffd0244d317043e592f684bc19 100644 --- a/Framework/Crystal/test/CentroidPeaksTest.h +++ b/Framework/Crystal/test/CentroidPeaksTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/test/ClearUBTest.h b/Framework/Crystal/test/ClearUBTest.h index f426f2fc6ecbc264b6a1868b90187d193497e201..1775949b2824a602272908660f5d15761c5a8b44 100644 --- a/Framework/Crystal/test/ClearUBTest.h +++ b/Framework/Crystal/test/ClearUBTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/test/ClusterIntegrationBaseTest.h b/Framework/Crystal/test/ClusterIntegrationBaseTest.h index 9c4448af5f02acce8f9475944eea4b0b7874583d..51331a53e63c47bb8c2b61b481312c5b30a1b4a5 100644 --- a/Framework/Crystal/test/ClusterIntegrationBaseTest.h +++ b/Framework/Crystal/test/ClusterIntegrationBaseTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /* * ClusterIntegrationBaseTest.h @@ -50,9 +50,9 @@ protected: } // Add a fake peak to an MDEventWorkspace - void add_fake_md_peak(IMDEventWorkspace_sptr mdws, const size_t &nEvents, - const double &h, const double &k, const double &l, - const double &radius) { + void add_fake_md_peak(const IMDEventWorkspace_sptr &mdws, + const size_t &nEvents, const double &h, const double &k, + const double &l, const double &radius) { auto fakeMDEventDataAlg = AlgorithmManager::Instance().createUnmanaged("FakeMDEventData"); fakeMDEventDataAlg->setChild(true); diff --git a/Framework/Crystal/test/ClusterRegisterTest.h b/Framework/Crystal/test/ClusterRegisterTest.h index 7d2ddbbc55a04fe2b01b3ef492512373f6d67a3a..2b6db28a37e623782257270f4154c764eacb16d8 100644 --- a/Framework/Crystal/test/ClusterRegisterTest.h +++ b/Framework/Crystal/test/ClusterRegisterTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/test/ClusterTest.h b/Framework/Crystal/test/ClusterTest.h index b072582ba2726475d891a4e94e07ad48a90db4e0..8aa00e7f25811bd1aaa9cc50fac6a0a2842ecbca 100644 --- a/Framework/Crystal/test/ClusterTest.h +++ b/Framework/Crystal/test/ClusterTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/test/CombinePeaksWorkspacesTest.h b/Framework/Crystal/test/CombinePeaksWorkspacesTest.h index fa635a73266f55fcc9756472b42e2f58ecdc32f7..43ae41936b7f1395db8de4dca5a9f24d2b9cb9ed 100644 --- a/Framework/Crystal/test/CombinePeaksWorkspacesTest.h +++ b/Framework/Crystal/test/CombinePeaksWorkspacesTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/test/CompositeClusterTest.h b/Framework/Crystal/test/CompositeClusterTest.h index 8612b54986fd40d73a0a6dee430a0b1131fd3569..189eab6e4a123bc59333adaac772ba277c3d5c49 100644 --- a/Framework/Crystal/test/CompositeClusterTest.h +++ b/Framework/Crystal/test/CompositeClusterTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/test/ConnectedComponentLabelingTest.h b/Framework/Crystal/test/ConnectedComponentLabelingTest.h index b31102a345cdf7595a0c7bd6ca9673caa95e9a57..89dd36055abbd511ae42c40ad281b8bfff3ef66c 100644 --- a/Framework/Crystal/test/ConnectedComponentLabelingTest.h +++ b/Framework/Crystal/test/ConnectedComponentLabelingTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/test/DiffPeaksWorkspacesTest.h b/Framework/Crystal/test/DiffPeaksWorkspacesTest.h index 468685ae2617878e244cc08495f7d838b5e3c4ee..2438ab4daa97971dead6f984919994c109e34e39 100644 --- a/Framework/Crystal/test/DiffPeaksWorkspacesTest.h +++ b/Framework/Crystal/test/DiffPeaksWorkspacesTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/test/DisjointElementTest.h b/Framework/Crystal/test/DisjointElementTest.h index 2389f310f187903f42c0ab1a78961c8eddf013f8..9fe857ab89d2bdd0e30aa7e4c8e2b69ec7e44506 100644 --- a/Framework/Crystal/test/DisjointElementTest.h +++ b/Framework/Crystal/test/DisjointElementTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/test/FilterPeaksTest.h b/Framework/Crystal/test/FilterPeaksTest.h index 45c47ebfa2c643d241db9096cf9d3f564473cf60..40bcf59a5d2a3a9dc9f141319f852f56fc4aee3e 100644 --- a/Framework/Crystal/test/FilterPeaksTest.h +++ b/Framework/Crystal/test/FilterPeaksTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -39,7 +39,7 @@ private: /* * Helper method to run the algorithm and return the output workspace. */ - IPeaksWorkspace_sptr runAlgorithm(PeaksWorkspace_sptr inWS, + IPeaksWorkspace_sptr runAlgorithm(const PeaksWorkspace_sptr &inWS, const std::string &filterVariable, const double filterValue, const std::string &filterOperator) { diff --git a/Framework/Crystal/test/FindClusterFacesTest.h b/Framework/Crystal/test/FindClusterFacesTest.h index ebfa86660a85114a4907ace56f43499c38523721..86ca859c71298efbe72a3f36daad117e41965104 100644 --- a/Framework/Crystal/test/FindClusterFacesTest.h +++ b/Framework/Crystal/test/FindClusterFacesTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -26,7 +26,7 @@ using Mantid::Crystal::FindClusterFaces; namespace { // Helper function to create a peaks workspace. -IPeaksWorkspace_sptr create_peaks_WS(Instrument_sptr inst) { +IPeaksWorkspace_sptr create_peaks_WS(const Instrument_sptr &inst) { PeaksWorkspace *pPeaksWS = new PeaksWorkspace(); pPeaksWS->setCoordinateSystem(Mantid::Kernel::HKL); IPeaksWorkspace_sptr peakWS(pPeaksWS); diff --git a/Framework/Crystal/test/FindSXPeaksHelperTest.h b/Framework/Crystal/test/FindSXPeaksHelperTest.h index 29c1e88bdd073f30d0654a8e6234594fc7f2d54f..95070d6b9284ae8b18840842f66abdaca4590972 100644 --- a/Framework/Crystal/test/FindSXPeaksHelperTest.h +++ b/Framework/Crystal/test/FindSXPeaksHelperTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/test/FindSXPeaksTest.h b/Framework/Crystal/test/FindSXPeaksTest.h index 2beb8e11119abcf3f2908bb2ebca3ec5253d29d4..727ecad6df1ecae24f8a6542ddb878ffc62ddc9f 100644 --- a/Framework/Crystal/test/FindSXPeaksTest.h +++ b/Framework/Crystal/test/FindSXPeaksTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -24,7 +24,7 @@ using namespace Mantid::Crystal; using namespace Mantid::DataObjects; // Helper method to overwrite spectra. -void overWriteSpectraY(size_t histo, Workspace2D_sptr workspace, +void overWriteSpectraY(size_t histo, const Workspace2D_sptr &workspace, const std::vector<double> &Yvalues) { workspace->dataY(histo) = Yvalues; @@ -32,7 +32,7 @@ void overWriteSpectraY(size_t histo, Workspace2D_sptr workspace, // Helper method to make what will be recognised as a single peak. void makeOnePeak(size_t histo, double peak_intensity, size_t at_bin, - Workspace2D_sptr workspace) { + const Workspace2D_sptr &workspace) { size_t nBins = workspace->y(0).size(); std::vector<double> peaksInY(nBins); @@ -53,7 +53,8 @@ void makeOnePeak(size_t histo, double peak_intensity, size_t at_bin, * @param startIndex :: the workspace index to start searching from * @param endIndex :: the workspace index to stop searching from */ -std::unique_ptr<FindSXPeaks> createFindSXPeaks(Workspace2D_sptr workspace) { +std::unique_ptr<FindSXPeaks> +createFindSXPeaks(const Workspace2D_sptr &workspace) { auto alg = std::make_unique<FindSXPeaks>(); alg->setRethrows(true); alg->initialize(); diff --git a/Framework/Crystal/test/FindUBUsingFFTTest.h b/Framework/Crystal/test/FindUBUsingFFTTest.h index 331ffb848cbf382fa4ac8dbff2d7cf4f3232a311..9af0cd64b463b2b25fa7d9875dadc517f1315eb0 100644 --- a/Framework/Crystal/test/FindUBUsingFFTTest.h +++ b/Framework/Crystal/test/FindUBUsingFFTTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/test/FindUBUsingIndexedPeaksTest.h b/Framework/Crystal/test/FindUBUsingIndexedPeaksTest.h index 8b0f001b2ba393d5aea29609fe728711aae45234..97b52ce05f02ed43596d827356d7852b2b56bb8a 100644 --- a/Framework/Crystal/test/FindUBUsingIndexedPeaksTest.h +++ b/Framework/Crystal/test/FindUBUsingIndexedPeaksTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/test/FindUBUsingLatticeParametersTest.h b/Framework/Crystal/test/FindUBUsingLatticeParametersTest.h index 187ed663ba4048f3652f11dc577f7f2e9c14941a..f3ca407c9059a06b07e27aeb4b9588d163b87615 100644 --- a/Framework/Crystal/test/FindUBUsingLatticeParametersTest.h +++ b/Framework/Crystal/test/FindUBUsingLatticeParametersTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/test/FindUBUsingMinMaxDTest.h b/Framework/Crystal/test/FindUBUsingMinMaxDTest.h index 625d52f77175d88ed2c20d46d940b55fa8924613..d027c2d24aaa9aad6b5370eb1457dda8bf96b241 100644 --- a/Framework/Crystal/test/FindUBUsingMinMaxDTest.h +++ b/Framework/Crystal/test/FindUBUsingMinMaxDTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/test/GoniometerAnglesFromPhiRotationTest.h b/Framework/Crystal/test/GoniometerAnglesFromPhiRotationTest.h index 864dbaca9f98fe292c662cdd503b60cfc39e7fad..e1a8f1de2b03e239ed555682b8c59c6cdb1c8921 100644 --- a/Framework/Crystal/test/GoniometerAnglesFromPhiRotationTest.h +++ b/Framework/Crystal/test/GoniometerAnglesFromPhiRotationTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /* * GoniometerAnglesFromPhiRotation.h diff --git a/Framework/Crystal/test/HardThresholdBackgroundTest.h b/Framework/Crystal/test/HardThresholdBackgroundTest.h index dda638c13cb6bb1e9db9058e3c3fb531e512f006..c683de6071ff7310c0f1986c2b0df055c12b4040 100644 --- a/Framework/Crystal/test/HardThresholdBackgroundTest.h +++ b/Framework/Crystal/test/HardThresholdBackgroundTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/test/HasUBTest.h b/Framework/Crystal/test/HasUBTest.h index ba7dc2d9485f1cb234852eec7980af4ab51fd53f..73d83955a0b2665bb3418b13a5959162ec3ef40c 100644 --- a/Framework/Crystal/test/HasUBTest.h +++ b/Framework/Crystal/test/HasUBTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/test/IndexPeaksTest.h b/Framework/Crystal/test/IndexPeaksTest.h index 5429d8a2e36a49931962cb0bf428914f52133b8c..296e2194246cbba945b89584fed84d3ecc0c2eea 100644 --- a/Framework/Crystal/test/IndexPeaksTest.h +++ b/Framework/Crystal/test/IndexPeaksTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -112,7 +112,7 @@ PeaksWorkspace_sptr createTestPeaksWorkspaceWithSatellites( } std::unique_ptr<IndexPeaks> -indexPeaks(PeaksWorkspace_sptr peaksWS, +indexPeaks(const PeaksWorkspace_sptr &peaksWS, const std::unordered_map<std::string, std::string> &arguments) { auto alg = std::make_unique<IndexPeaks>(); alg->setChild(true); diff --git a/Framework/Crystal/test/IndexSXPeaksTest.h b/Framework/Crystal/test/IndexSXPeaksTest.h index 571ab894bee10454a561a14a24830d2510510ccf..4adba996f3523d9cba6ba15435775a90d9625718 100644 --- a/Framework/Crystal/test/IndexSXPeaksTest.h +++ b/Framework/Crystal/test/IndexSXPeaksTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -56,9 +56,9 @@ public: AnalysisDataService::Instance().remove("master_peaks"); } - void doTest(int nPixels, std::string peakIndexes, double a, double b, + void doTest(int nPixels, const std::string &peakIndexes, double a, double b, double c, double alpha, double beta, double gamma, - std::string searchExtents = "-20,20,-20,20,-20,20", + const std::string &searchExtents = "-20,20,-20,20,-20,20", double dTolerance = 0.01) { // Take a copy of the original peaks workspace. diff --git a/Framework/Crystal/test/IntegratePeakTimeSlicesTest.h b/Framework/Crystal/test/IntegratePeakTimeSlicesTest.h index 8ec6f212ec1a33838c0b8e709faac59500e58ffd..9cb2a3db13146b64d6255509d328d5a70f15c667 100644 --- a/Framework/Crystal/test/IntegratePeakTimeSlicesTest.h +++ b/Framework/Crystal/test/IntegratePeakTimeSlicesTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /* * IntegratePeakTimeSlicesTest.h @@ -238,7 +238,7 @@ private: /** * Calculates Q */ - double calcQ(RectangularDetector_const_sptr bankP, + double calcQ(const RectangularDetector_const_sptr &bankP, const DetectorInfo &detectorInfo, int row, int col, double time) { boost::shared_ptr<Detector> detP = bankP->getAtXY(col, row); diff --git a/Framework/Crystal/test/IntegratePeaksHybridTest.h b/Framework/Crystal/test/IntegratePeaksHybridTest.h index 1d31fa284792db1b398dd20c51975ad3c1b5f774..dab234d1534df4dbb37d63fbcd6135ec38524e2a 100644 --- a/Framework/Crystal/test/IntegratePeaksHybridTest.h +++ b/Framework/Crystal/test/IntegratePeaksHybridTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/test/IntegratePeaksUsingClustersTest.h b/Framework/Crystal/test/IntegratePeaksUsingClustersTest.h index bdd5f2cfbd2ef0c1f16e4947b657147c84b81403..886ecef51b84cf6aa3ed3ec467fb7cfcf1208ed6 100644 --- a/Framework/Crystal/test/IntegratePeaksUsingClustersTest.h +++ b/Framework/Crystal/test/IntegratePeaksUsingClustersTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/test/LoadHKLTest.h b/Framework/Crystal/test/LoadHKLTest.h index 766e11aba9c10f2b1df8c63294c899749e77a2c7..9e84c6b3992a730146e838b78de4c74dfc4c5922 100644 --- a/Framework/Crystal/test/LoadHKLTest.h +++ b/Framework/Crystal/test/LoadHKLTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/test/LoadIsawPeaksTest.h b/Framework/Crystal/test/LoadIsawPeaksTest.h index c2b8985f9516eb4e2a81b1a29eb02c1aeb68ee2c..d7f0a0f854ec462c9ef669d364f6d74895efeb68 100644 --- a/Framework/Crystal/test/LoadIsawPeaksTest.h +++ b/Framework/Crystal/test/LoadIsawPeaksTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/test/LoadIsawSpectrumTest.h b/Framework/Crystal/test/LoadIsawSpectrumTest.h index 187334b5ffe742035621be96128caac7b3d0784c..fd6ecb791552569c4a08787a0cbfe7dd54b81c1d 100644 --- a/Framework/Crystal/test/LoadIsawSpectrumTest.h +++ b/Framework/Crystal/test/LoadIsawSpectrumTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/test/LoadIsawUBTest.h b/Framework/Crystal/test/LoadIsawUBTest.h index 3e3835113d4e7a508d086b6455c181885fa92495..f3d202dfb682cb36584a1783ff134e7b879ffb61 100644 --- a/Framework/Crystal/test/LoadIsawUBTest.h +++ b/Framework/Crystal/test/LoadIsawUBTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/test/MaskPeaksWorkspaceTest.h b/Framework/Crystal/test/MaskPeaksWorkspaceTest.h index f6cded75f85a90fcf639b6dfb0506dcc221cf881..1f030588434f9a1c6a716af473f703a2a7f42618 100644 --- a/Framework/Crystal/test/MaskPeaksWorkspaceTest.h +++ b/Framework/Crystal/test/MaskPeaksWorkspaceTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/test/MockObjects.h b/Framework/Crystal/test/MockObjects.h index 1794f456ac379cd4d3fd6bf60538ee5997472882..fd7c0a29a8894437f40363f9924e71f456169683 100644 --- a/Framework/Crystal/test/MockObjects.h +++ b/Framework/Crystal/test/MockObjects.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /* * MockObjects.h diff --git a/Framework/Crystal/test/NormaliseVanadiumTest.h b/Framework/Crystal/test/NormaliseVanadiumTest.h index ba6682c780d70ce589ca3886c54ddc97c84184e1..3f0ad078e4a724dd6635149998603480dab2746c 100644 --- a/Framework/Crystal/test/NormaliseVanadiumTest.h +++ b/Framework/Crystal/test/NormaliseVanadiumTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/test/OptimizeCrystalPlacementTest.h b/Framework/Crystal/test/OptimizeCrystalPlacementTest.h index ab8eb9058278aafac155e495c56bb8bb36c29c2f..c30cb9b485ffd4fb53f8afb6a5faa5eb3eb3aafa 100644 --- a/Framework/Crystal/test/OptimizeCrystalPlacementTest.h +++ b/Framework/Crystal/test/OptimizeCrystalPlacementTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/test/OptimizeLatticeForCellTypeTest.h b/Framework/Crystal/test/OptimizeLatticeForCellTypeTest.h index f0caac449374541928fb730f6bf11af18ea4017b..129efc8ff169d28ec0e7094c3110b17e8e017e94 100644 --- a/Framework/Crystal/test/OptimizeLatticeForCellTypeTest.h +++ b/Framework/Crystal/test/OptimizeLatticeForCellTypeTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/test/PeakBackgroundTest.h b/Framework/Crystal/test/PeakBackgroundTest.h index f8e79fb8fb3848216c1dac76bd962fe2bf05188a..98d2c2d14acd0c2becf06158e78a6b790c571050 100644 --- a/Framework/Crystal/test/PeakBackgroundTest.h +++ b/Framework/Crystal/test/PeakBackgroundTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/test/PeakClusterProjectionTest.h b/Framework/Crystal/test/PeakClusterProjectionTest.h index d8ee23b3b71baf3118f903aefd04502619e0a34c..ee5af061ef4e153b039823e36ab81451df398706 100644 --- a/Framework/Crystal/test/PeakClusterProjectionTest.h +++ b/Framework/Crystal/test/PeakClusterProjectionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -32,7 +32,7 @@ class PeakClusterProjectionTest : public CxxTest::TestSuite { private: // Helper function to create a peaks workspace. - IPeaksWorkspace_sptr create_peaks_WS(Instrument_sptr inst) const { + IPeaksWorkspace_sptr create_peaks_WS(const Instrument_sptr &inst) const { PeaksWorkspace *pPeaksWS = new PeaksWorkspace(); pPeaksWS->setCoordinateSystem(Mantid::Kernel::HKL); IPeaksWorkspace_sptr peakWS(pPeaksWS); diff --git a/Framework/Crystal/test/PeakHKLErrorsTest.h b/Framework/Crystal/test/PeakHKLErrorsTest.h index 6df82e6ac8abd66452b0035692a7bf0c032b3c66..dcd895ee0f1c40e71d3a6278efe7b26cf6e0c825 100644 --- a/Framework/Crystal/test/PeakHKLErrorsTest.h +++ b/Framework/Crystal/test/PeakHKLErrorsTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /* * PeakHKLErrorsTest.h diff --git a/Framework/Crystal/test/PeakIntegrationTest.h b/Framework/Crystal/test/PeakIntegrationTest.h index b84776543145909b55e2dc66c2041c4ac5433622..8758fab3dcb67123608f3c3cabbf77e9a6e6c422 100644 --- a/Framework/Crystal/test/PeakIntegrationTest.h +++ b/Framework/Crystal/test/PeakIntegrationTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/test/PeakIntensityVsRadiusTest.h b/Framework/Crystal/test/PeakIntensityVsRadiusTest.h index 4a6c18a200035ca03f0ed00e5f125bcd8b22b555..493af63e3238695960c93aa7f3eb4816517845c4 100644 --- a/Framework/Crystal/test/PeakIntensityVsRadiusTest.h +++ b/Framework/Crystal/test/PeakIntensityVsRadiusTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -210,12 +210,12 @@ public: assertFlatAfter1(ws); } - void assertFlatAfter1(MatrixWorkspace_sptr ws) { + void assertFlatAfter1(const MatrixWorkspace_sptr &ws) { TSM_ASSERT_DELTA("After 1.0, the signal is flat", ws->y(0)[12], 1000, 1e-6); TSM_ASSERT_DELTA("After 1.0, the signal is flat", ws->y(0)[15], 1000, 1e-6) } - void assertFirstFourYValuesCloseToZero(MatrixWorkspace_sptr ws) { + void assertFirstFourYValuesCloseToZero(const MatrixWorkspace_sptr &ws) { TS_ASSERT_DELTA(ws->y(0)[0], 0, 10); TS_ASSERT_DELTA(ws->y(0)[1], 0, 10); TS_ASSERT_DELTA(ws->y(0)[2], 0, 10); diff --git a/Framework/Crystal/test/PeakStatisticsToolsTest.h b/Framework/Crystal/test/PeakStatisticsToolsTest.h index 626177002b4c5267b7f6bca779122388a8c5a46e..0b3b426b1696766809d559a3c357df8298e0aee1 100644 --- a/Framework/Crystal/test/PeakStatisticsToolsTest.h +++ b/Framework/Crystal/test/PeakStatisticsToolsTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/test/PeaksInRegionTest.h b/Framework/Crystal/test/PeaksInRegionTest.h index 249879d9005eac159ce25cbee8831b4006f6539f..e3bca14a6c9f2e8d90f69b80bbcf639c9c9650cb 100644 --- a/Framework/Crystal/test/PeaksInRegionTest.h +++ b/Framework/Crystal/test/PeaksInRegionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -31,7 +31,7 @@ private: Helper function. Creates a peaksworkspace with a single peak */ PeakWorkspaceWithExtents - createPeaksWorkspace(const std::string coordFrame, double xMinFromPeak, + createPeaksWorkspace(const std::string &coordFrame, double xMinFromPeak, double xMaxFromPeak, double yMinFromPeak, double yMaxFromPeak, double zMinFromPeak, double zMaxFromPeak) { @@ -267,7 +267,7 @@ public: -0.5); // outside zmax } - void do_test_bounds_check_extents(const std::string coordFrame, + void do_test_bounds_check_extents(const std::string &coordFrame, double xMinFromPeak, double xMaxFromPeak, double yMinFromPeak, double yMaxFromPeak, double zMinFromPeak, double zMaxFromPeak, @@ -304,14 +304,12 @@ public: double peakRadius = 0.49; // not enough for the sphere to penetrate the // bounding box. Expect failure do_test_bounds_check_extents(coordinateFrame, -wallDistanceFromPeakCenter, - 1, 1, 1, 1, 1, peakRadius, - peakRadius > wallDistanceFromPeakCenter); + 1, 1, 1, 1, 1, peakRadius, false); peakRadius = 0.51; // just enough for the sphere to penetrate the bounding // box. Expect pass. do_test_bounds_check_extents(coordinateFrame, -wallDistanceFromPeakCenter, - 1, 1, 1, 1, 1, peakRadius, - peakRadius > wallDistanceFromPeakCenter); + 1, 1, 1, 1, 1, peakRadius, true); } void test_peak_intersects_xmax_boundary_when_radius_large_enough() { @@ -320,15 +318,15 @@ public: double peakRadius = 0.49; // not enough for the sphere to penetrate the // bounding box. Expect failure - do_test_bounds_check_extents( - coordinateFrame, 1, -wallDistanceFromPeakCenter, 1, 1, 1, 1, peakRadius, - peakRadius > wallDistanceFromPeakCenter); + do_test_bounds_check_extents(coordinateFrame, 1, + -wallDistanceFromPeakCenter, 1, 1, 1, 1, + peakRadius, false); peakRadius = 0.51; // just enough for the sphere to penetrate the bounding // box. Expect pass. - do_test_bounds_check_extents( - coordinateFrame, 1, -wallDistanceFromPeakCenter, 1, 1, 1, 1, peakRadius, - peakRadius > wallDistanceFromPeakCenter); + do_test_bounds_check_extents(coordinateFrame, 1, + -wallDistanceFromPeakCenter, 1, 1, 1, 1, + peakRadius, true); } void test_peak_intersects_ymin_boundary_when_radius_large_enough() { @@ -337,15 +335,15 @@ public: double peakRadius = 0.49; // not enough for the sphere to penetrate the // bounding box. Expect failure - do_test_bounds_check_extents( - coordinateFrame, 1, 1, -wallDistanceFromPeakCenter, 1, 1, 1, peakRadius, - peakRadius > wallDistanceFromPeakCenter); + do_test_bounds_check_extents(coordinateFrame, 1, 1, + -wallDistanceFromPeakCenter, 1, 1, 1, + peakRadius, false); peakRadius = 0.51; // just enough for the sphere to penetrate the bounding // box. Expect pass. - do_test_bounds_check_extents( - coordinateFrame, 1, 1, -wallDistanceFromPeakCenter, 1, 1, 1, peakRadius, - peakRadius > wallDistanceFromPeakCenter); + do_test_bounds_check_extents(coordinateFrame, 1, 1, + -wallDistanceFromPeakCenter, 1, 1, 1, + peakRadius, true); } void test_peak_intersects_ymax_boundary_when_radius_large_enough() { @@ -356,13 +354,13 @@ public: // bounding box. Expect failure do_test_bounds_check_extents(coordinateFrame, 1, 1, 1, -wallDistanceFromPeakCenter, 1, 1, peakRadius, - peakRadius > wallDistanceFromPeakCenter); + false); peakRadius = 0.51; // just enough for the sphere to penetrate the bounding // box. Expect pass. do_test_bounds_check_extents(coordinateFrame, 1, 1, 1, -wallDistanceFromPeakCenter, 1, 1, peakRadius, - peakRadius > wallDistanceFromPeakCenter); + true); } void test_peak_intersects_zmin_boundary_when_radius_large_enough() { @@ -373,13 +371,13 @@ public: // bounding box. Expect failure do_test_bounds_check_extents(coordinateFrame, 1, 1, 1, 1, -wallDistanceFromPeakCenter, 1, peakRadius, - peakRadius > wallDistanceFromPeakCenter); + false); peakRadius = 0.51; // just enough for the sphere to penetrate the bounding // box. Expect pass. do_test_bounds_check_extents(coordinateFrame, 1, 1, 1, 1, -wallDistanceFromPeakCenter, 1, peakRadius, - peakRadius > wallDistanceFromPeakCenter); + true); } void test_peak_intersects_zmax_boundary_when_radius_large_enough() { @@ -390,13 +388,12 @@ public: // bounding box. Expect failure do_test_bounds_check_extents(coordinateFrame, 1, 1, 1, 1, 1, -wallDistanceFromPeakCenter, peakRadius, - peakRadius > wallDistanceFromPeakCenter); + false); peakRadius = 0.51; // just enough for the sphere to penetrate the bounding // box. Expect pass. do_test_bounds_check_extents(coordinateFrame, 1, 1, 1, 1, 1, - -wallDistanceFromPeakCenter, peakRadius, - peakRadius > wallDistanceFromPeakCenter); + -wallDistanceFromPeakCenter, peakRadius, true); } void test_false_intersection_when_check_peak_extents() { diff --git a/Framework/Crystal/test/PeaksOnSurfaceTest.h b/Framework/Crystal/test/PeaksOnSurfaceTest.h index 64af5fe676d9947b7db9d4852cdbb8a70c8d7899..884e15f42c32e87a389bee198517b668a953fd15 100644 --- a/Framework/Crystal/test/PeaksOnSurfaceTest.h +++ b/Framework/Crystal/test/PeaksOnSurfaceTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -27,7 +27,7 @@ private: Helper function. Creates a peaksworkspace with a single peak */ PeaksWorkspace_sptr - createPeaksWorkspace(const std::string coordFrame, + createPeaksWorkspace(const std::string &coordFrame, const Mantid::Kernel::V3D &peakPosition) { PeaksWorkspace_sptr ws = WorkspaceCreationHelper::createPeaksWorkspace(1); auto detectorIds = ws->getInstrument()->getDetectorIDs(); diff --git a/Framework/Crystal/test/PredictFractionalPeaksTest.h b/Framework/Crystal/test/PredictFractionalPeaksTest.h index b7925ef6e657b47255df16c6da0e733cef609db9..cc8f579bf4845ac55b86c027a53e4a54df1869ee 100644 --- a/Framework/Crystal/test/PredictFractionalPeaksTest.h +++ b/Framework/Crystal/test/PredictFractionalPeaksTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/test/PredictPeaksTest.h b/Framework/Crystal/test/PredictPeaksTest.h index f783c1e0ccc0312c1a5e6d5f4f3cb298f206d84f..9935199443f85d6dc90a1adc0b725c6733c659ac 100644 --- a/Framework/Crystal/test/PredictPeaksTest.h +++ b/Framework/Crystal/test/PredictPeaksTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -20,6 +20,8 @@ #include "MantidTestHelpers/WorkspaceCreationHelper.h" #include <cxxtest/TestSuite.h> +#include <utility> + using namespace Mantid; using namespace Mantid::Crystal; using namespace Mantid::API; @@ -37,8 +39,8 @@ public: } /** Make a HKL peaks workspace */ - PeaksWorkspace_sptr getHKLpw(Instrument_sptr inst, std::vector<V3D> hkls, - detid_t detid) { + PeaksWorkspace_sptr getHKLpw(const Instrument_sptr &inst, + const std::vector<V3D> &hkls, detid_t detid) { PeaksWorkspace_sptr hklPW; if (hkls.size() > 0) { hklPW = PeaksWorkspace_sptr(new PeaksWorkspace()); @@ -51,9 +53,9 @@ public: return hklPW; } - void do_test_exec(std::string reflectionCondition, size_t expectedNumber, - std::vector<V3D> hkls, int convention = 1, - bool useExtendedDetectorSpace = false, + void do_test_exec(const std::string &reflectionCondition, + size_t expectedNumber, const std::vector<V3D> &hkls, + int convention = 1, bool useExtendedDetectorSpace = false, bool addExtendedDetectorDefinition = false, int edge = 0) { // Name of the output workspace. std::string outWSName("PredictPeaksTest_OutputWS"); @@ -78,7 +80,7 @@ public: WorkspaceCreationHelper::setOrientedLattice(inWS, 12.0, 12.0, 12.0); WorkspaceCreationHelper::setGoniometer(inWS, 0., 0., 0.); - PeaksWorkspace_sptr hklPW = getHKLpw(inst, hkls, 10000); + PeaksWorkspace_sptr hklPW = getHKLpw(inst, std::move(hkls), 10000); PredictPeaks alg; TS_ASSERT_THROWS_NOTHING(alg.initialize()) diff --git a/Framework/Crystal/test/PredictSatellitePeaksTest.h b/Framework/Crystal/test/PredictSatellitePeaksTest.h index 688646465b8801cf31b250415fafc854a13ab7a4..eea1d7f3b2cfe621f0780f67b5dd3c308d96e65e 100644 --- a/Framework/Crystal/test/PredictSatellitePeaksTest.h +++ b/Framework/Crystal/test/PredictSatellitePeaksTest.h @@ -1,3 +1,9 @@ +// Mantid Repository : https://github.com/mantidproject/mantid +// +// Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS +// SPDX - License - Identifier: GPL - 3.0 + /* * PredictSatellitePeaksTest.h * diff --git a/Framework/Crystal/test/SCDCalibratePanelsTest.h b/Framework/Crystal/test/SCDCalibratePanelsTest.h index 5ecdc85db25e7756c5560e2ac2b1a11277a57fe4..df244d58c4697623cbe9e5cba37b967ab8fb1e85 100644 --- a/Framework/Crystal/test/SCDCalibratePanelsTest.h +++ b/Framework/Crystal/test/SCDCalibratePanelsTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /* * SCDCalibratePanelsTest.h diff --git a/Framework/Crystal/test/SaveHKLTest.h b/Framework/Crystal/test/SaveHKLTest.h index b19c7b4be0474020970c4cdfe1cc85754a515297..10dae8f4ed5584b489a06fd84b8b458f90b9a5e4 100644 --- a/Framework/Crystal/test/SaveHKLTest.h +++ b/Framework/Crystal/test/SaveHKLTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/test/SaveIsawPeaksTest.h b/Framework/Crystal/test/SaveIsawPeaksTest.h index db07aa238b4955101aaa00b6ef68fc663d6d64db..c40da922033ef9a815086b76552369e6a02a0dc2 100644 --- a/Framework/Crystal/test/SaveIsawPeaksTest.h +++ b/Framework/Crystal/test/SaveIsawPeaksTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/test/SaveIsawUBTest.h b/Framework/Crystal/test/SaveIsawUBTest.h index 84d523484a568cd22720b99a1b7de7cef6ff9576..e7cbf2bd73192d9a9382bfa6808208b3441283d0 100644 --- a/Framework/Crystal/test/SaveIsawUBTest.h +++ b/Framework/Crystal/test/SaveIsawUBTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /* SaveIsawUBTest.h * @@ -90,15 +90,13 @@ public: F1.open(File1.c_str()); F2.open(File2.c_str()); - int line = 1; std::string s; - double val1, val2; - double tolerance; - if (F1.good() && F2.good()) + if (F1.good() && F2.good()) { + int line = 1; for (int row = 0; row < 5; row++) { int NNums = 3; - tolerance = .0000003; + double tolerance = .0000003; if (line > 3) { NNums = 7; tolerance = .0003; @@ -107,6 +105,7 @@ public: for (int N = 0; N < NNums; N++) { s = Mantid::Kernel::Strings::getWord(F1, false); + double val1, val2; if (!Mantid::Kernel::Strings::convert<double>(s, val1)) { stringstream message; message << "Characters on line " << line << " word " << N; @@ -128,7 +127,7 @@ public: Mantid::Kernel::Strings::readToEndOfLine(F2, true); line++; } - else { + } else { TS_ASSERT(F1.good()); TS_ASSERT(F2.good()); remove(File2.c_str()); diff --git a/Framework/Crystal/test/SaveLauenormTest.h b/Framework/Crystal/test/SaveLauenormTest.h index ea673b0872781cd4450f94e5f2201199ba11899f..0af7bd634ac701cfa7348e324996f2b6353a00d7 100644 --- a/Framework/Crystal/test/SaveLauenormTest.h +++ b/Framework/Crystal/test/SaveLauenormTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/test/SelectCellOfTypeTest.h b/Framework/Crystal/test/SelectCellOfTypeTest.h index 1021fadd3183d3c95c1c7e20c074c377a9d14b42..1c4f9f200798daac12a540264ada650345e10f22 100644 --- a/Framework/Crystal/test/SelectCellOfTypeTest.h +++ b/Framework/Crystal/test/SelectCellOfTypeTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/test/SelectCellWithFormTest.h b/Framework/Crystal/test/SelectCellWithFormTest.h index 460a13ad0aa7c3cb122ba40b333663245fea25cc..5e9248e47976f05726359e56048780fbf09a0abf 100644 --- a/Framework/Crystal/test/SelectCellWithFormTest.h +++ b/Framework/Crystal/test/SelectCellWithFormTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/test/SetCrystalLocationTest.h b/Framework/Crystal/test/SetCrystalLocationTest.h index 8e90fd93df399862ca9f14126f603dd7c53da8ac..412333830ce3e23d0d902d8abcfbb275a50480ca 100644 --- a/Framework/Crystal/test/SetCrystalLocationTest.h +++ b/Framework/Crystal/test/SetCrystalLocationTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidAPI/AnalysisDataService.h" diff --git a/Framework/Crystal/test/SetGoniometerTest.h b/Framework/Crystal/test/SetGoniometerTest.h index da7ad13afba927fc6bc8e4a0090efd01e6fd8373..1fd24eeefb748ed9d69fa6d20b6df33423a793b7 100644 --- a/Framework/Crystal/test/SetGoniometerTest.h +++ b/Framework/Crystal/test/SetGoniometerTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -193,7 +193,7 @@ public: * @param axis0 :: string to pass * @param numExpected :: how many axes should be created (0 or 1) */ - void do_test_param(std::string axis0, size_t numExpected = 0) { + void do_test_param(const std::string &axis0, size_t numExpected = 0) { Workspace2D_sptr ws = WorkspaceCreationHelper::create2DWorkspace(10, 10); AnalysisDataService::Instance().addOrReplace("SetGoniometerTest_ws", ws); FrameworkManager::Instance().exec( diff --git a/Framework/Crystal/test/SetSpecialCoordinatesTest.h b/Framework/Crystal/test/SetSpecialCoordinatesTest.h index 71b239e6f60efcbc55ce7b1bed0d3e99dc789d33..b1aedfedfdfa4f6a70411f75d13886ddab0d4641 100644 --- a/Framework/Crystal/test/SetSpecialCoordinatesTest.h +++ b/Framework/Crystal/test/SetSpecialCoordinatesTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/test/SetUBTest.h b/Framework/Crystal/test/SetUBTest.h index cc0f73f8d5c6a2acad8abc1d87770fefc50d48bd..4c946fe15fb4418c9b3c6c90cc65080a819d878d 100644 --- a/Framework/Crystal/test/SetUBTest.h +++ b/Framework/Crystal/test/SetUBTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/test/ShowPeakHKLOffsetsTest.h b/Framework/Crystal/test/ShowPeakHKLOffsetsTest.h index 907d8d752a36207de7a21ea4a96ee7c0038cf6c4..7c0c88acbb6f061baddbd1ce2d9a0dc1c0690c48 100644 --- a/Framework/Crystal/test/ShowPeakHKLOffsetsTest.h +++ b/Framework/Crystal/test/ShowPeakHKLOffsetsTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /* * ShowPeakHKLOffsetsTest.h diff --git a/Framework/Crystal/test/ShowPossibleCellsTest.h b/Framework/Crystal/test/ShowPossibleCellsTest.h index f4629999059929c25c07ee78bcf58562f9a36c15..483042868a416757dcdc0ebb1f1ee1c1c120db5f 100644 --- a/Framework/Crystal/test/ShowPossibleCellsTest.h +++ b/Framework/Crystal/test/ShowPossibleCellsTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/test/SortHKLTest.h b/Framework/Crystal/test/SortHKLTest.h index bb7b100e0d669872697ce3a33a0109fb84236af3..3cc0e79d60bf595415b943e2cf1241c3100e535e 100644 --- a/Framework/Crystal/test/SortHKLTest.h +++ b/Framework/Crystal/test/SortHKLTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/test/SortPeaksWorkspaceTest.h b/Framework/Crystal/test/SortPeaksWorkspaceTest.h index c37214b3088918b899af764a77aeca585118cd2d..3dac4e70097fa8cf84ac11f679276c0e0ce074ca 100644 --- a/Framework/Crystal/test/SortPeaksWorkspaceTest.h +++ b/Framework/Crystal/test/SortPeaksWorkspaceTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -25,7 +25,8 @@ private: * @param inWS : Input workspace to sort * @param columnName : Column name to sort by */ - void doExecute(IPeaksWorkspace_sptr inWS, const std::string &columnName, + void doExecute(const IPeaksWorkspace_sptr &inWS, + const std::string &columnName, const bool sortAscending = true) { std::string outWSName("SortPeaksWorkspaceTest_OutputWS"); diff --git a/Framework/Crystal/test/StatisticsOfPeaksWorkspaceTest.h b/Framework/Crystal/test/StatisticsOfPeaksWorkspaceTest.h index 1dd34ada359962261eae9e68f57d88f21ccfd932..c9ef3632275469148bb1e92a7f3c5f583f77d3be 100644 --- a/Framework/Crystal/test/StatisticsOfPeaksWorkspaceTest.h +++ b/Framework/Crystal/test/StatisticsOfPeaksWorkspaceTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Crystal/test/TransformHKLTest.h b/Framework/Crystal/test/TransformHKLTest.h index 44a0e6bb7def7e610b7182558625eddca62314ab..ec362bc39948cb070b60fd794247288e225e3a99 100644 --- a/Framework/Crystal/test/TransformHKLTest.h +++ b/Framework/Crystal/test/TransformHKLTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/CalculateChiSquared.h b/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/CalculateChiSquared.h index 5ff1b43fedddbb0e6452d61422bf265f24e16167..bdf47c12734e9a43646f7db517acf3e9986c0b5e 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/CalculateChiSquared.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/CalculateChiSquared.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/CalculateCostFunction.h b/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/CalculateCostFunction.h index 050931006e60eac6f81c26c83b3392e65f688afd..10499cd831e19bdd7ca741a4e3c8ef523fea61d0 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/CalculateCostFunction.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/CalculateCostFunction.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/ConvertToYSpace.h b/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/ConvertToYSpace.h index 8522072f1705fbd139ab9970e10725ae3487d005..0553a46f49ae8f19193e87a365a843e472aec81b 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/ConvertToYSpace.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/ConvertToYSpace.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/ConvolutionFit.h b/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/ConvolutionFit.h index e25b43b90052a34eab95c4c4462bbc8a886aa8d1..8164522b417987e1c33d3431a5027fee55055618 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/ConvolutionFit.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/ConvolutionFit.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/ConvolveWorkspaces.h b/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/ConvolveWorkspaces.h index f51bd5fc8ba71d7f9a8c3a0ca69c3e4151e6b10c..bdcab2efa08f6b3be9ecdc86659c2c48c7fe17d8 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/ConvolveWorkspaces.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/ConvolveWorkspaces.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/CrystalFieldEnergies.h b/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/CrystalFieldEnergies.h index 4b06470da991eef6397d7bcb4f758be4c6ae8796..842f45f376860dd22e403389a9a33824e59b6095 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/CrystalFieldEnergies.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/CrystalFieldEnergies.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/EstimateFitParameters.h b/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/EstimateFitParameters.h index c74c7cfaf00ac0b2f7cfa2c02840cfefd92023b4..cf0db7ecc5244f78c9499a93fe1a373c81841df2 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/EstimateFitParameters.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/EstimateFitParameters.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/EstimatePeakErrors.h b/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/EstimatePeakErrors.h index 78b3a280ef29452d99c3ee8fa86442edbf7fb8d3..364fad1125abb075f9176f8b08d4893da39e3365 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/EstimatePeakErrors.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/EstimatePeakErrors.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/EvaluateFunction.h b/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/EvaluateFunction.h index 5c4b70e71abc86351fa25e8b590b89d71f5a0fba..1437b5a9ab8c3a64c73307c9aa83a7e092c275e6 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/EvaluateFunction.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/EvaluateFunction.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/Fit.h b/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/Fit.h index 338446a002ccbf1035a258ebbd43020f886aad9c..15beb067c37137e93514f3250f208bd5291bb09b 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/Fit.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/Fit.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/Fit1D.h b/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/Fit1D.h index b3e3e2e85d68752b529cb349ee5cfaa74fd70eeb..f6978230795bd56b6646b5dc14eb65ebbb27b40d 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/Fit1D.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/Fit1D.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/FitPowderDiffPeaks.h b/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/FitPowderDiffPeaks.h index a84faa62ec00062b668bf3315f794614b2645edf..d20969b16a4aa626ab03e055f14807804487cc4a 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/FitPowderDiffPeaks.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/FitPowderDiffPeaks.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -72,7 +72,7 @@ private: void processInputProperties(); /// Generate peaks from input table workspace - void genPeaksFromTable(DataObjects::TableWorkspace_sptr peakparamws); + void genPeaksFromTable(const DataObjects::TableWorkspace_sptr &peakparamws); /// Generate a peak Functions::BackToBackExponential_sptr @@ -86,11 +86,11 @@ private: /// Import instrument parameters from (input) table workspace void importInstrumentParameterFromTable( - DataObjects::TableWorkspace_sptr parameterWS); + const DataObjects::TableWorkspace_sptr ¶meterWS); /// Import Bragg peak table workspace void - parseBraggPeakTable(DataObjects::TableWorkspace_sptr peakws, + parseBraggPeakTable(const DataObjects::TableWorkspace_sptr &peakws, std::vector<std::map<std::string, double>> ¶mmaps, std::vector<std::map<std::string, int>> &hklmaps); @@ -108,27 +108,26 @@ private: //--------------------------------------------------------------------------- /// Fit single peak in robust mode (no hint) - bool - fitSinglePeakRobust(Functions::BackToBackExponential_sptr peak, - Functions::BackgroundFunction_sptr backgroundfunction, - double peakleftbound, double peakrightbound, - std::map<std::string, double> rightpeakparammap, - double &finalchi2); + bool fitSinglePeakRobust( + const Functions::BackToBackExponential_sptr &peak, + const Functions::BackgroundFunction_sptr &backgroundfunction, + double peakleftbound, double peakrightbound, + const std::map<std::string, double> &rightpeakparammap, + double &finalchi2); /// Fit signle peak by Monte Carlo/simulated annealing - bool - fitSinglePeakSimulatedAnnealing(Functions::BackToBackExponential_sptr peak, - std::vector<std::string> paramtodomc); + bool fitSinglePeakSimulatedAnnealing( + const Functions::BackToBackExponential_sptr &peak, + const std::vector<std::string> ¶mtodomc); /// Fit peak with confidence of the centre bool fitSinglePeakConfidentX(Functions::BackToBackExponential_sptr peak); /// Fit peak with trustful peak parameters - bool - fitSinglePeakConfident(Functions::BackToBackExponential_sptr peak, - Functions::BackgroundFunction_sptr backgroundfunction, - double leftbound, double rightbound, double &chi2, - bool &annhilatedpeak); + bool fitSinglePeakConfident( + const Functions::BackToBackExponential_sptr &peak, + const Functions::BackgroundFunction_sptr &backgroundfunction, + double leftbound, double rightbound, double &chi2, bool &annhilatedpeak); /// Fit peak with confident parameters bool fitSinglePeakConfidentY(DataObjects::Workspace2D_sptr dataws, @@ -136,33 +135,32 @@ private: double dampingfactor); /// Fit peaks with confidence in fwhm and etc. - bool - fitOverlappedPeaks(std::vector<Functions::BackToBackExponential_sptr> peaks, - Functions::BackgroundFunction_sptr backgroundfunction, - double gfwhm); + bool fitOverlappedPeaks( + std::vector<Functions::BackToBackExponential_sptr> peaks, + const Functions::BackgroundFunction_sptr &backgroundfunction, + double gfwhm); /// Fit multiple (overlapped) peaks bool doFitMultiplePeaks( - DataObjects::Workspace2D_sptr dataws, size_t wsindex, - API::CompositeFunction_sptr peaksfunc, + const DataObjects::Workspace2D_sptr &dataws, size_t wsindex, + const API::CompositeFunction_sptr &peaksfunc, std::vector<Functions::BackToBackExponential_sptr> peakfuncs, std::vector<bool> &vecfitgood, std::vector<double> &vecchi2s); /// Use Le Bail method to estimate and set the peak heights void estimatePeakHeightsLeBail( - DataObjects::Workspace2D_sptr dataws, size_t wsindex, + const DataObjects::Workspace2D_sptr &dataws, size_t wsindex, std::vector<Functions::BackToBackExponential_sptr> peaks); /// Set constraints on a group of overlapped peaks for fitting void setOverlappedPeaksConstraints( - std::vector<Functions::BackToBackExponential_sptr> peaks); + const std::vector<Functions::BackToBackExponential_sptr> &peaks); /// Fit 1 peak by 1 minimizer of 1 call of minimzer (simple version) - bool doFit1PeakSimple(DataObjects::Workspace2D_sptr dataws, - size_t workspaceindex, - Functions::BackToBackExponential_sptr peakfunction, - std::string minimzername, size_t maxiteration, - double &chi2); + bool doFit1PeakSimple( + const DataObjects::Workspace2D_sptr &dataws, size_t workspaceindex, + const Functions::BackToBackExponential_sptr &peakfunction, + const std::string &minimzername, size_t maxiteration, double &chi2); /// Fit 1 peak and background // bool doFit1PeakBackgroundSimple(DataObjects::Workspace2D_sptr dataws, @@ -172,33 +170,32 @@ private: // string minimzername, size_t maxiteration, double &chi2); /// Fit single peak with background to raw data - bool - doFit1PeakBackground(DataObjects::Workspace2D_sptr dataws, size_t wsindex, - Functions::BackToBackExponential_sptr peak, - Functions::BackgroundFunction_sptr backgroundfunction, - double &chi2); + bool doFit1PeakBackground( + const DataObjects::Workspace2D_sptr &dataws, size_t wsindex, + const Functions::BackToBackExponential_sptr &peak, + const Functions::BackgroundFunction_sptr &backgroundfunction, + double &chi2); /// Fit 1 peak by using a sequential of minimizer - bool doFit1PeakSequential(DataObjects::Workspace2D_sptr dataws, - size_t workspaceindex, - Functions::BackToBackExponential_sptr peakfunction, - std::vector<std::string> minimzernames, - std::vector<size_t> maxiterations, - std::vector<double> dampfactors, double &chi2); + bool doFit1PeakSequential( + const DataObjects::Workspace2D_sptr &dataws, size_t workspaceindex, + const Functions::BackToBackExponential_sptr &peakfunction, + std::vector<std::string> minimzernames, std::vector<size_t> maxiterations, + const std::vector<double> &dampfactors, double &chi2); /// Fit N overlapped peaks in a simple manner bool doFitNPeaksSimple( - DataObjects::Workspace2D_sptr dataws, size_t wsindex, - API::CompositeFunction_sptr peaksfunc, - std::vector<Functions::BackToBackExponential_sptr> peakfuncs, - std::string minimizername, size_t maxiteration, double &chi2); + const DataObjects::Workspace2D_sptr &dataws, size_t wsindex, + const API::CompositeFunction_sptr &peaksfunc, + const std::vector<Functions::BackToBackExponential_sptr> &peakfuncs, + const std::string &minimizername, size_t maxiteration, double &chi2); /// Store the function's parameter values to a map - void storeFunctionParameters(API::IFunction_sptr function, + void storeFunctionParameters(const API::IFunction_sptr &function, std::map<std::string, double> ¶mmaps); /// Restore the function's parameter values from a map - void restoreFunctionParameters(API::IFunction_sptr function, + void restoreFunctionParameters(const API::IFunction_sptr &function, std::map<std::string, double> parammap); /// Calculate the range to fit peak/peaks group @@ -225,7 +222,8 @@ private: void cropWorkspace(double tofmin, double tofmax); /// Parse Fit() output parameter workspace - std::string parseFitParameterWorkspace(API::ITableWorkspace_sptr paramws); + std::string + parseFitParameterWorkspace(const API::ITableWorkspace_sptr ¶mws); /// Build a partial workspace from source // DataObjects::Workspace2D_sptr @@ -240,8 +238,8 @@ private: double &chi2); /// Observe peak range with hint from right peak's properties - void observePeakRange(Functions::BackToBackExponential_sptr thispeak, - Functions::BackToBackExponential_sptr rightpeak, + void observePeakRange(const Functions::BackToBackExponential_sptr &thispeak, + const Functions::BackToBackExponential_sptr &rightpeak, double refpeakshift, double &peakleftbound, double &peakrightbound); @@ -268,12 +266,12 @@ private: bool calchi2); std::pair<bool, double> - doFitPeak(DataObjects::Workspace2D_sptr dataws, - Functions::BackToBackExponential_sptr peakfunction, + doFitPeak(const DataObjects::Workspace2D_sptr &dataws, + const Functions::BackToBackExponential_sptr &peakfunction, double guessedfwhm); /// Fit background-removed peak by Gaussian - bool doFitGaussianPeak(DataObjects::Workspace2D_sptr dataws, + bool doFitGaussianPeak(const DataObjects::Workspace2D_sptr &dataws, size_t workspaceindex, double in_center, double leftfwhm, double rightfwhm, double ¢er, double &sigma, double &height); @@ -288,28 +286,28 @@ private: Functions::BackgroundFunction_sptr background); /// Parse the fitting result - std::string parseFitResult(API::IAlgorithm_sptr fitalg, double &chi2, + std::string parseFitResult(const API::IAlgorithm_sptr &fitalg, double &chi2, bool &fitsuccess); /// Calculate a Bragg peak's centre in TOF from its Miller indices double calculatePeakCentreTOF(int h, int k, int l); /// Get parameter value from m_instrumentParameters - double getParameter(std::string parname); + double getParameter(const std::string &parname); /// Fit peaks in the same group (i.e., single peak or overlapped peaks) void fitPeaksGroup(std::vector<size_t> peakindexes); /// Build partial workspace for fitting DataObjects::Workspace2D_sptr - buildPartialWorkspace(API::MatrixWorkspace_sptr sourcews, + buildPartialWorkspace(const API::MatrixWorkspace_sptr &sourcews, size_t workspaceindex, double leftbound, double rightbound); /// Plot a single peak to output vector - void plotFunction(API::IFunction_sptr peakfunction, - Functions::BackgroundFunction_sptr background, - API::FunctionDomain1DVector domain); + void plotFunction(const API::IFunction_sptr &peakfunction, + const Functions::BackgroundFunction_sptr &background, + const API::FunctionDomain1DVector &domain); //----------------------------------------------------------------------------------------------- @@ -411,25 +409,25 @@ inline double linearInterpolateY(double x0, double xf, double y0, double yf, } /// Estimate background for a pattern in a coarse mode -void estimateBackgroundCoarse(DataObjects::Workspace2D_sptr dataws, - Functions::BackgroundFunction_sptr background, - size_t wsindexraw, size_t wsindexbkgd, - size_t wsindexpeak); +void estimateBackgroundCoarse( + const DataObjects::Workspace2D_sptr &dataws, + const Functions::BackgroundFunction_sptr &background, size_t wsindexraw, + size_t wsindexbkgd, size_t wsindexpeak); /// Estimate peak parameters; -bool observePeakParameters(DataObjects::Workspace2D_sptr dataws, size_t wsindex, - double ¢re, double &height, double &fwhm, - std::string &errmsg); +bool observePeakParameters(const DataObjects::Workspace2D_sptr &dataws, + size_t wsindex, double ¢re, double &height, + double &fwhm, std::string &errmsg); /// Find maximum value size_t findMaxValue(const std::vector<double> &Y); /// Find maximum value -size_t findMaxValue(API::MatrixWorkspace_sptr dataws, size_t wsindex, +size_t findMaxValue(const API::MatrixWorkspace_sptr &dataws, size_t wsindex, double leftbound, double rightbound); /// Get function parameter name, value and etc information in string -std::string getFunctionInfo(API::IFunction_sptr function); +std::string getFunctionInfo(const API::IFunction_sptr &function); } // namespace Algorithms } // namespace CurveFitting diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/IqtFit.h b/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/IqtFit.h index c381d1836bcf572ef6850a9a2a94925570f25367..2933f2e89c0cfce792bdbc88031f355fc18e5f00 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/IqtFit.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/IqtFit.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/LeBailFit.h b/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/LeBailFit.h index a881f9b70bc802a1c65c7ccfe9ad244ff721d545..0d881f945b04203bf9be092a08c0bb5d18836f70 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/LeBailFit.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/LeBailFit.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -37,26 +37,26 @@ namespace Algorithms { struct Parameter { // Regular std::string name; - double curvalue; - double prevalue; - double minvalue; - double maxvalue; - bool fit; - double stepsize; - double fiterror; + double curvalue = 0; + double prevalue = 0; + double minvalue = 0; + double maxvalue = 0; + bool fit = false; + double stepsize = 0; + double fiterror = 0; // Monte Carlo - bool nonnegative; - double mcA0; - double mcA1; + bool nonnegative = false; + double mcA0 = 0; + double mcA1 = 0; // Monte Carlo record - double sumstepsize; - double maxabsstepsize; - double maxrecordvalue; - double minrecordvalue; - size_t numpositivemove; - size_t numnegativemove; - size_t numnomove; - int movedirection; + double sumstepsize = 0; + double maxabsstepsize = 0; + double maxrecordvalue = 0; + double minrecordvalue = 0; + size_t numpositivemove = 0; + size_t numnegativemove = 0; + size_t numnomove = 0; + int movedirection = 0; }; class MANTID_CURVEFITTING_DLL LeBailFit : public API::Algorithm { @@ -103,8 +103,8 @@ private: void createLeBailFunction(); /// Crop the workspace for better usage - API::MatrixWorkspace_sptr cropWorkspace(API::MatrixWorkspace_sptr inpws, - size_t wsindex); + API::MatrixWorkspace_sptr + cropWorkspace(const API::MatrixWorkspace_sptr &inpws, size_t wsindex); /// Process and calculate input background void processInputBackground(); @@ -123,10 +123,10 @@ private: void parseBraggPeaksParametersTable(); /// Parse content in a table workspace to vector for background parameters - void - parseBackgroundTableWorkspace(DataObjects::TableWorkspace_sptr bkgdparamws, - std::vector<std::string> &bkgdparnames, - std::vector<double> &bkgdorderparams); + void parseBackgroundTableWorkspace( + const DataObjects::TableWorkspace_sptr &bkgdparamws, + std::vector<std::string> &bkgdparnames, + std::vector<double> &bkgdorderparams); /// Create and set up output table workspace for peaks void exportBraggPeakParameterToTable(); @@ -153,12 +153,12 @@ private: /// Set up Monte Carlo random walk strategy void setupBuiltInRandomWalkStrategy(); - void - setupRandomWalkStrategyFromTable(DataObjects::TableWorkspace_sptr tablews); + void setupRandomWalkStrategyFromTable( + const DataObjects::TableWorkspace_sptr &tablews); /// Add parameter (to a vector of string/name) for MC random walk void addParameterToMCMinimize(std::vector<std::string> &parnamesforMC, - std::string parname); + const std::string &parname); /// Calculate diffraction pattern in Le Bail algorithm for MC Random walk bool calculateDiffractionPattern( @@ -171,7 +171,8 @@ private: bool acceptOrDeny(Kernel::Rfactor currR, Kernel::Rfactor newR); /// Propose new parameters - bool proposeNewValues(std::vector<std::string> mcgroup, Kernel::Rfactor r, + bool proposeNewValues(const std::vector<std::string> &mcgroup, + Kernel::Rfactor r, std::map<std::string, Parameter> &curparammap, std::map<std::string, Parameter> &newparammap, bool prevBetterRwp); @@ -308,7 +309,7 @@ private: /// Write a set of (XY) data to a column file void writeRfactorsToFile(std::vector<double> vecX, std::vector<Kernel::Rfactor> vecR, - std::string filename); + const std::string &filename); } // namespace Algorithms } // namespace CurveFitting diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/LeBailFunction.h b/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/LeBailFunction.h index 2b7635f41daa19af499fd1ded90fdc0d72deb355..754025d1c0d588d147f649f92b34db3df7f8c50a 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/LeBailFunction.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/LeBailFunction.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -34,7 +34,7 @@ it is rewritten. class MANTID_CURVEFITTING_DLL LeBailFunction { public: /// Constructor - LeBailFunction(std::string peaktype); + LeBailFunction(const std::string &peaktype); /// Destructor virtual ~LeBailFunction(); @@ -43,14 +43,14 @@ public: void setProfileParameterValues(std::map<std::string, double> parammap); /// Set up a parameter to fit but tied among all peaks - void setFitProfileParameter(std::string paramname, double minvalue, + void setFitProfileParameter(const std::string ¶mname, double minvalue, double maxvalue); /// Function - void setPeakHeights(std::vector<double> inheights); + void setPeakHeights(const std::vector<double> &inheights); /// Check whether a parameter is a profile parameter - bool hasProfileParameter(std::string paramname); + bool hasProfileParameter(const std::string ¶mname); /// Check whether the newly set parameters are correct, i.e., all peaks are /// physical @@ -63,7 +63,7 @@ public: void addPeaks(std::vector<std::vector<int>> peakhkls); /// Add background function - void addBackgroundFunction(std::string backgroundtype, + void addBackgroundFunction(const std::string &backgroundtype, const unsigned int &order, const std::vector<std::string> &vecparnames, const std::vector<double> &vecparvalues, @@ -91,13 +91,14 @@ public: void calPeaksParameters(); /// Get peak parameters (calculated) - double getPeakParameter(size_t index, std::string parname) const; + double getPeakParameter(size_t index, const std::string &parname) const; /// Get peak parameters (calculated) - double getPeakParameter(std::vector<int> hkl, std::string parname) const; + double getPeakParameter(std::vector<int> hkl, + const std::string &parname) const; /// Set up a parameter to be fixed - void fixPeakParameter(std::string paramname, double paramvalue); + void fixPeakParameter(const std::string ¶mname, double paramvalue); /// Fix all background parameters void fixBackgroundParameters(); @@ -116,13 +117,13 @@ public: private: /// Set peak parameters - void setPeakParameters(API::IPowderDiffPeakFunction_sptr peak, - std::map<std::string, double> parammap, + void setPeakParameters(const API::IPowderDiffPeakFunction_sptr &peak, + const std::map<std::string, double> ¶mmap, double peakheight, bool setpeakheight); /// Retrieve peak's parameter. may be native or calculated - double getPeakParameterValue(API::IPowderDiffPeakFunction_sptr peak, - std::string parname) const; + double getPeakParameterValue(const API::IPowderDiffPeakFunction_sptr &peak, + const std::string &parname) const; /// Calculate all peaks' parameter value void calculatePeakParameterValues() const; diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/NormaliseByPeakArea.h b/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/NormaliseByPeakArea.h index c8b5ac9b64f7968c024cd3eacc5f8e78a6a15f5d..d7812fc3cb8822b6cb48890d9a624e937fe12592 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/NormaliseByPeakArea.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/NormaliseByPeakArea.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/PawleyFit.h b/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/PawleyFit.h index ecaae1c309e56938bd3cd7d138e5ebcf476998aa..22c7f41955da5a909a10fe3efa5ce6f2ad94fc57 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/PawleyFit.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/PawleyFit.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/PlotPeakByLogValue.h b/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/PlotPeakByLogValue.h index c11405a30219601fccc43c51721a4b95f9644e16..6e6e97f2d6b2739b5d9f640f618eb5c459f9beb9 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/PlotPeakByLogValue.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/PlotPeakByLogValue.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -64,7 +64,8 @@ private: void exec() override; /// Set any WorkspaceIndex attributes in the fitting function - void setWorkspaceIndexAttribute(API::IFunction_sptr fun, int wsIndex) const; + void setWorkspaceIndexAttribute(const API::IFunction_sptr &fun, + int wsIndex) const; boost::shared_ptr<Algorithm> runSingleFit(bool createFitOutput, bool outputCompositeMembers, @@ -72,7 +73,8 @@ private: const API::IFunction_sptr &ifun, const InputSpectraToFit &data); - double calculateLogValue(std::string logName, const InputSpectraToFit &data); + double calculateLogValue(const std::string &logName, + const InputSpectraToFit &data); API::ITableWorkspace_sptr createResultsTable(const std::string &logName, diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/PlotPeakByLogValueHelper.h b/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/PlotPeakByLogValueHelper.h index 2d30c1d8440db9402981e4c5f3d0087bb1ae9301..f83cabaeb310fa25d0154a6b7de8e7c80762ffc8 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/PlotPeakByLogValueHelper.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/PlotPeakByLogValueHelper.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidAPI/DllConfig.h" @@ -42,7 +42,7 @@ getWorkspace(const std::string &name, int period); /// Create a list of input workspace names MANTID_CURVEFITTING_DLL std::vector<InputSpectraToFit> -makeNames(std::string inputList, int default_wi, int default_spec); +makeNames(const std::string &inputList, int default_wi, int default_spec); enum SpecialIndex { NOT_SET = -1, diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/QENSFitSequential.h b/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/QENSFitSequential.h index 1a3a2da0b8d5d55464f7115b95c66d9836255d7e..32f8dfa3c1c9c47b1d73b68236d989947df35f62 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/QENSFitSequential.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/QENSFitSequential.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -46,8 +46,8 @@ private: API::ITableWorkspace_sptr performFit(const std::string &input, const std::string &output); void deleteTemporaryWorkspaces(const std::string &outputBaseName); - void addAdditionalLogs(API::WorkspaceGroup_sptr resultWorkspace); - void addAdditionalLogs(API::Workspace_sptr result); + void addAdditionalLogs(const API::WorkspaceGroup_sptr &resultWorkspace); + void addAdditionalLogs(const API::Workspace_sptr &result); virtual bool throwIfElasticQConversionFails() const; virtual bool isFitParameter(const std::string ¶meterName) const; @@ -57,9 +57,9 @@ private: const std::vector<API::MatrixWorkspace_sptr> &workspaces) const; std::vector<std::size_t> getDatasetGrouping( const std::vector<API::MatrixWorkspace_sptr> &workspaces) const; - API::WorkspaceGroup_sptr - processIndirectFitParameters(API::ITableWorkspace_sptr parameterWorkspace, - const std::vector<std::size_t> &grouping); + API::WorkspaceGroup_sptr processIndirectFitParameters( + const API::ITableWorkspace_sptr ¶meterWorkspace, + const std::vector<std::size_t> &grouping); std::vector<API::MatrixWorkspace_sptr> convertInputToElasticQ( const std::vector<API::MatrixWorkspace_sptr> &workspaces) const; @@ -77,20 +77,20 @@ private: std::vector<std::string> const &spectra, std::string const &outputBaseName, std::string const &endOfSuffix); - void copyLogs(API::WorkspaceGroup_sptr resultWorkspaces, + void copyLogs(const API::WorkspaceGroup_sptr &resultWorkspaces, std::vector<API::MatrixWorkspace_sptr> const &workspaces); - void copyLogs(API::Workspace_sptr resultWorkspace, + void copyLogs(const API::Workspace_sptr &resultWorkspace, std::vector<API::MatrixWorkspace_sptr> const &workspaces); - void copyLogs(API::MatrixWorkspace_sptr resultWorkspace, - API::WorkspaceGroup_sptr resultGroup); - void copyLogs(API::MatrixWorkspace_sptr resultWorkspace, - API::Workspace_sptr resultGroup); - void extractMembers(API::WorkspaceGroup_sptr resultGroupWs, + void copyLogs(const API::MatrixWorkspace_sptr &resultWorkspace, + const API::WorkspaceGroup_sptr &resultGroup); + void copyLogs(const API::MatrixWorkspace_sptr &resultWorkspace, + const API::Workspace_sptr &resultGroup); + void extractMembers(const API::WorkspaceGroup_sptr &resultGroupWs, const std::vector<API::MatrixWorkspace_sptr> &workspaces, const std::string &outputWsName); API::IAlgorithm_sptr - extractMembersAlgorithm(API::WorkspaceGroup_sptr resultGroupWs, + extractMembersAlgorithm(const API::WorkspaceGroup_sptr &resultGroupWs, const std::string &outputWsName) const; std::string getTemporaryName() const; diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/QENSFitSimultaneous.h b/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/QENSFitSimultaneous.h index 7f9de2d75b6b5089bc58d0e721b227ed4d17788b..d6af7bbfa52c4bc7d43e5c901a58f537aab3bd4b 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/QENSFitSimultaneous.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/QENSFitSimultaneous.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -47,27 +47,27 @@ private: std::pair<API::ITableWorkspace_sptr, API::Workspace_sptr> performFit(const std::vector<API::MatrixWorkspace_sptr> &workspaces, const std::string &output); - API::WorkspaceGroup_sptr - processIndirectFitParameters(API::ITableWorkspace_sptr parameterWorkspace, - const std::vector<std::size_t> &grouping); - void copyLogs(API::WorkspaceGroup_sptr resultWorkspace, + API::WorkspaceGroup_sptr processIndirectFitParameters( + const API::ITableWorkspace_sptr ¶meterWorkspace, + const std::vector<std::size_t> &grouping); + void copyLogs(const API::WorkspaceGroup_sptr &resultWorkspace, const std::vector<API::MatrixWorkspace_sptr> &workspaces); - void copyLogs(API::MatrixWorkspace_sptr resultWorkspace, - API::WorkspaceGroup_sptr resultGroup); - void extractMembers(API::WorkspaceGroup_sptr resultGroupWs, + void copyLogs(const API::MatrixWorkspace_sptr &resultWorkspace, + const API::WorkspaceGroup_sptr &resultGroup); + void extractMembers(const API::WorkspaceGroup_sptr &resultGroupWs, const std::vector<API::MatrixWorkspace_sptr> &workspaces, const std::string &outputWsName); - void addAdditionalLogs(API::WorkspaceGroup_sptr group); - void addAdditionalLogs(API::Workspace_sptr result); + void addAdditionalLogs(const API::WorkspaceGroup_sptr &group); + void addAdditionalLogs(const API::Workspace_sptr &result); API::IAlgorithm_sptr - extractMembersAlgorithm(API::WorkspaceGroup_sptr resultGroupWs, + extractMembersAlgorithm(const API::WorkspaceGroup_sptr &resultGroupWs, const std::string &outputWsName) const; std::string getOutputBaseName() const; std::vector<std::string> getWorkspaceNames() const; std::vector<std::string> getWorkspaceIndices() const; - void renameWorkspaces(API::WorkspaceGroup_sptr outputGroup, + void renameWorkspaces(const API::WorkspaceGroup_sptr &outputGroup, std::vector<std::string> const &spectra, std::string const &outputBaseName, std::string const &endOfSuffix, diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/QENSFitUtilities.h b/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/QENSFitUtilities.h index fba541dbe5325728166717863152e216afebcbd1..4972f7be065693fe668557f9c998f53ec9e32ba5 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/QENSFitUtilities.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/QENSFitUtilities.h @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #pragma once #include "MantidAPI/Algorithm.h" @@ -17,7 +16,7 @@ namespace API { void renameWorkspacesInQENSFit( Algorithm *qensFit, IAlgorithm_sptr renameAlgorithm, - WorkspaceGroup_sptr outputGroup, std::string const &outputBaseName, + const WorkspaceGroup_sptr &outputGroup, std::string const &outputBaseName, std::string const &groupSuffix, std::function<std::string(std::size_t)> const &getNameSuffix); diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/RefinePowderInstrumentParameters.h b/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/RefinePowderInstrumentParameters.h index 5f7444fb343059fb40ee317069ffe54950ad65dc..7afd36cdd810a0b6f916552b6106acbebc453177 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/RefinePowderInstrumentParameters.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/RefinePowderInstrumentParameters.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -67,20 +67,22 @@ private: //---------------- Processing Input --------------------- /// Import instrument parameter from table (workspace) - void importParametersFromTable(DataObjects::TableWorkspace_sptr parameterWS, - std::map<std::string, double> ¶meters); + void + importParametersFromTable(const DataObjects::TableWorkspace_sptr ¶meterWS, + std::map<std::string, double> ¶meters); /// Import the Monte Carlo related parameters from table void importMonteCarloParametersFromTable( - DataObjects::TableWorkspace_sptr tablews, - std::vector<std::string> parameternames, std::vector<double> &stepsizes, - std::vector<double> &lowerbounds, std::vector<double> &upperbounds); + const DataObjects::TableWorkspace_sptr &tablews, + const std::vector<std::string> ¶meternames, + std::vector<double> &stepsizes, std::vector<double> &lowerbounds, + std::vector<double> &upperbounds); /// Generate (output) workspace of peak centers void genPeakCentersWorkspace(bool montecarlo, size_t numbestfit); /// Generate peaks from table (workspace) - void genPeaksFromTable(DataObjects::TableWorkspace_sptr peakparamws); + void genPeaksFromTable(const DataObjects::TableWorkspace_sptr &peakparamws); //--------------- Processing Output ------------------ /// Generate (output) table worksspace for instrument parameters @@ -94,12 +96,12 @@ private: void fitInstrumentParameters(); /// Calculate function's statistic - double calculateFunctionStatistic(API::IFunction_sptr func, - API::MatrixWorkspace_sptr dataws, + double calculateFunctionStatistic(const API::IFunction_sptr &func, + const API::MatrixWorkspace_sptr &dataws, size_t workspaceindex); /// Fit function to data - bool fitFunction(API::IFunction_sptr func, double &gslchi2); + bool fitFunction(const API::IFunction_sptr &func, double &gslchi2); /// Parse Fit() output parameter workspace std::string parseFitParameterWorkspace(API::ITableWorkspace_sptr paramws); @@ -108,9 +110,8 @@ private: std::string parseFitResult(API::IAlgorithm_sptr fitalg, double &chi2); /// Set up and run a monte carlo simulation to refine the peak parameters - void - refineInstrumentParametersMC(DataObjects::TableWorkspace_sptr parameterWS, - bool fit2 = false); + void refineInstrumentParametersMC( + const DataObjects::TableWorkspace_sptr ¶meterWS, bool fit2 = false); /// Core Monte Carlo random walk on parameter-space void doParameterSpaceRandomWalk(std::vector<std::string> parnames, @@ -124,8 +125,8 @@ private: void getD2TOFFuncParamNames(std::vector<std::string> &parnames); /// Calculate the value and chi2 - double calculateD2TOFFunction(API::IFunction_sptr func, - API::FunctionDomain1DVector domain, + double calculateD2TOFFunction(const API::IFunction_sptr &func, + const API::FunctionDomain1DVector &domain, API::FunctionValues &values, const Mantid::HistogramData::HistogramY &rawY, const Mantid::HistogramData::HistogramE &rawE); @@ -135,7 +136,7 @@ private: /// Calculate value n for thermal neutron peak profile void - calculateThermalNeutronSpecial(API::IFunction_sptr m_Function, + calculateThermalNeutronSpecial(const API::IFunction_sptr &m_Function, const Mantid::HistogramData::HistogramX &xVals, std::vector<double> &vec_n); diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/RefinePowderInstrumentParameters3.h b/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/RefinePowderInstrumentParameters3.h index f1634c8d89c90c22f6e1bd51e882c23eb9a114c4..bab383a92adf26d2cc43bea5bb075e9f2c99e6d2 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/RefinePowderInstrumentParameters3.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/RefinePowderInstrumentParameters3.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -68,11 +68,11 @@ private: /// Add parameter (to a vector of string/name) for MC random walk void addParameterToMCMinimize(std::vector<std::string> &parnamesforMC, - std::string parname, + const std::string &parname, std::map<std::string, Parameter> parammap); /// Propose new parameters - void proposeNewValues(std::vector<std::string> mcgroup, + void proposeNewValues(const std::vector<std::string> &mcgroup, std::map<std::string, Parameter> &curparammap, std::map<std::string, Parameter> &newparammap, double currchisq); @@ -88,23 +88,23 @@ private: // maxnumresults); /// Implement parameter values, calculate function and its chi square. - double calculateFunction(std::map<std::string, Parameter> parammap, + double calculateFunction(const std::map<std::string, Parameter> ¶mmap, std::vector<double> &vecY); /// Calculate Chi^2 of the a function with all parameters are fixed - double calculateFunctionError(API::IFunction_sptr function, - DataObjects::Workspace2D_sptr dataws, + double calculateFunctionError(const API::IFunction_sptr &function, + const DataObjects::Workspace2D_sptr &dataws, int wsindex); /// Fit function by non MC minimzer(s) - double fitFunction(API::IFunction_sptr function, - DataObjects::Workspace2D_sptr dataws, int wsindex, + double fitFunction(const API::IFunction_sptr &function, + const DataObjects::Workspace2D_sptr &dataws, int wsindex, bool powerfit); /// Fit function (single step) - bool doFitFunction(API::IFunction_sptr function, - DataObjects::Workspace2D_sptr dataws, int wsindex, - std::string minimizer, int numiters, double &chi2, + bool doFitFunction(const API::IFunction_sptr &function, + const DataObjects::Workspace2D_sptr &dataws, int wsindex, + const std::string &minimizer, int numiters, double &chi2, std::string &fitstatus); /// Process input properties @@ -114,11 +114,11 @@ private: void parseTableWorkspaces(); /// Parse table workspace to a map of Parameters - void parseTableWorkspace(DataObjects::TableWorkspace_sptr tablews, + void parseTableWorkspace(const DataObjects::TableWorkspace_sptr &tablews, std::map<std::string, Parameter> ¶mmap); /// Set parameter values to function from Parameter map - void setFunctionParameterValues(API::IFunction_sptr function, + void setFunctionParameterValues(const API::IFunction_sptr &function, std::map<std::string, Parameter> params); /// Update parameter values to Parameter map from fuction map @@ -127,13 +127,13 @@ private: /// Set parameter fitting setup (boundary, fix or unfix) to function from /// Parameter map - void setFunctionParameterFitSetups(API::IFunction_sptr function, + void setFunctionParameterFitSetups(const API::IFunction_sptr &function, std::map<std::string, Parameter> params); /// Construct output DataObjects::Workspace2D_sptr - genOutputWorkspace(API::FunctionDomain1DVector domain, - API::FunctionValues rawvalues); + genOutputWorkspace(const API::FunctionDomain1DVector &domain, + const API::FunctionValues &rawvalues); /// Construct an output TableWorkspace for refined peak profile parameters DataObjects::TableWorkspace_sptr @@ -143,7 +143,7 @@ private: /// Add a parameter to parameter map. If this parametere does exist, then /// replace the value of it void addOrReplace(std::map<std::string, Parameter> ¶meters, - std::string parname, double parvalue); + const std::string &parname, double parvalue); //-------- Variables ------------------------------------------------------ /// Data workspace containg peak positions @@ -189,17 +189,19 @@ void convertToDict(std::vector<std::string> strvec, std::map<std::string, size_t> &lookupdict); /// Get the index from lookup dictionary (map) -int getStringIndex(std::map<std::string, size_t> lookupdict, std::string key); +int getStringIndex(std::map<std::string, size_t> lookupdict, + const std::string &key); /// Store function parameter values to a map void storeFunctionParameterValue( - API::IFunction_sptr function, + const API::IFunction_sptr &function, std::map<std::string, std::pair<double, double>> &parvaluemap); /// Restore function parameter values to a map void restoreFunctionParameterValue( std::map<std::string, std::pair<double, double>> parvaluemap, - API::IFunction_sptr function, std::map<std::string, Parameter> ¶mmap); + const API::IFunction_sptr &function, + std::map<std::string, Parameter> ¶mmap); /// Copy parameters from source to target void duplicateParameters(std::map<std::string, Parameter> source, diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/SplineBackground.h b/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/SplineBackground.h index 78c62a09089936555861d67f02e19f5eca5333b9..f88a7ee49f1d1008e7c5858cd59035c4ae9042ac 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/SplineBackground.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/SplineBackground.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -67,8 +67,8 @@ private: /// Gets the values from the fitted GSL, and creates a clone of input /// workspace with new values - API::MatrixWorkspace_sptr saveSplineOutput(const API::MatrixWorkspace_sptr ws, - const size_t spec); + API::MatrixWorkspace_sptr + saveSplineOutput(const API::MatrixWorkspace_sptr &ws, const size_t spec); /// Sets up the splines for later fitting void setupSpline(double xMin, double xMax, int numBins, int ncoeff); diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/SplineInterpolation.h b/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/SplineInterpolation.h index 96c64753503c9759b4788d96cf6b35dce9129cf8..74f9b50009991ff95a5688e5b02db5d884df66bf 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/SplineInterpolation.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/SplineInterpolation.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -50,8 +50,8 @@ private: /// setup an output workspace using meta data from inws and taking a number of /// spectra API::MatrixWorkspace_sptr - setupOutputWorkspace(API::MatrixWorkspace_sptr mws, - API::MatrixWorkspace_sptr iws) const; + setupOutputWorkspace(const API::MatrixWorkspace_sptr &mws, + const API::MatrixWorkspace_sptr &iws) const; /// convert a binned workspace to point data using ConvertToPointData API::MatrixWorkspace_sptr @@ -59,28 +59,32 @@ private: /// set the points that define the spline used for interpolation of a /// workspace - void setInterpolationPoints(API::MatrixWorkspace_const_sptr inputWorkspace, - const size_t row) const; + void + setInterpolationPoints(const API::MatrixWorkspace_const_sptr &inputWorkspace, + const size_t row) const; /// Calculate the interpolation of the input workspace against the spline and /// store it in outputWorkspace - void calculateSpline(API::MatrixWorkspace_const_sptr inputWorkspace, - API::MatrixWorkspace_sptr outputWorkspace, + void calculateSpline(const API::MatrixWorkspace_const_sptr &inputWorkspace, + const API::MatrixWorkspace_sptr &outputWorkspace, const size_t row) const; /// Calculate the derivatives of the input workspace from the spline. - void calculateDerivatives(API::MatrixWorkspace_const_sptr inputWorkspace, - API::MatrixWorkspace_sptr outputWorkspace, - const size_t order) const; + void + calculateDerivatives(const API::MatrixWorkspace_const_sptr &inputWorkspace, + const API::MatrixWorkspace_sptr &outputWorkspace, + const size_t order) const; /// Find the the interpolation range std::pair<size_t, size_t> - findInterpolationRange(API::MatrixWorkspace_const_sptr iwspt, - API::MatrixWorkspace_sptr mwspt, const size_t row); + findInterpolationRange(const API::MatrixWorkspace_const_sptr &iwspt, + const API::MatrixWorkspace_sptr &mwspt, + const size_t row); /// Extrapolates flat for the points outside the x-range - void extrapolateFlat(API::MatrixWorkspace_sptr ows, - API::MatrixWorkspace_const_sptr iwspt, const size_t row, + void extrapolateFlat(const API::MatrixWorkspace_sptr &ows, + const API::MatrixWorkspace_const_sptr &iwspt, + const size_t row, const std::pair<size_t, size_t> &indices, const bool doDerivs, std::vector<API::MatrixWorkspace_sptr> &derivs) const; diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/SplineSmoothing.h b/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/SplineSmoothing.h index 6500f87a3ce0d073da64f63d23bb0918ae3b02a0..122244214cc8484c970af6a281c85d20607fc472 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/SplineSmoothing.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/SplineSmoothing.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -87,7 +87,8 @@ private: const double *ysmooth) const; /// Use an existing fit function to tidy smoothing - void performAdditionalFitting(API::MatrixWorkspace_sptr ws, const int row); + void performAdditionalFitting(const API::MatrixWorkspace_sptr &ws, + const int row); /// Converts histogram data to point data later processing /// convert a binned workspace to point data. Uses mean of the bins as point diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/VesuvioCalculateGammaBackground.h b/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/VesuvioCalculateGammaBackground.h index e70fac918687a49a36a3299a6fc18cc00a00c330..d89d9a3851d758b42870a8e3ee903be53004bc0a 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/VesuvioCalculateGammaBackground.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/VesuvioCalculateGammaBackground.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/VesuvioCalculateMS.h b/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/VesuvioCalculateMS.h index b729b81fce7d48a815fb6b86ff7d8f96727a269a..e9d6bd634a2c7242a31476130b381b5123b9e221 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/VesuvioCalculateMS.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Algorithms/VesuvioCalculateMS.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once //----------------------------------------------------------------------------- diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/AugmentedLagrangianOptimizer.h b/Framework/CurveFitting/inc/MantidCurveFitting/AugmentedLagrangianOptimizer.h index 77b240a5d32d7fb904ea679856bb538d68892730..3810b1f68039a7dd70412a8164dbe70fbf41080a 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/AugmentedLagrangianOptimizer.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/AugmentedLagrangianOptimizer.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/ComplexMatrix.h b/Framework/CurveFitting/inc/MantidCurveFitting/ComplexMatrix.h index 20eb2d4694c7850c9624248fc9af8f1b7a160f12..a0d02d314dfff293088211ef98f65cf66d87013a 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/ComplexMatrix.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/ComplexMatrix.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/ComplexVector.h b/Framework/CurveFitting/inc/MantidCurveFitting/ComplexVector.h index 1fda9f3283d26f051303a77539b9d65beeca2541..c6dffda0ec800bc4cc586ef4dbdcd2e279694e54 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/ComplexVector.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/ComplexVector.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Constraints/BoundaryConstraint.h b/Framework/CurveFitting/inc/MantidCurveFitting/Constraints/BoundaryConstraint.h index e820a4b2f37cf5aa14a2f7ccd014bd2026eda371..5a83c4b628ed43a92d79188b51484cda40db48e3 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Constraints/BoundaryConstraint.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Constraints/BoundaryConstraint.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -35,12 +35,12 @@ public: BoundaryConstraint(const std::string ¶mName); /// Constructor with boundary arguments - BoundaryConstraint(API::IFunction *fun, const std::string paramName, + BoundaryConstraint(API::IFunction *fun, const std::string ¶mName, const double lowerBound, const double upperBound, bool isDefault = false); /// Constructor with lower boundary argument - BoundaryConstraint(API::IFunction *fun, const std::string paramName, + BoundaryConstraint(API::IFunction *fun, const std::string ¶mName, const double lowerBound, bool isDefault = false); /// Initialize the constraint from an expression diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/CostFunctions/CostFuncFitting.h b/Framework/CurveFitting/inc/MantidCurveFitting/CostFunctions/CostFuncFitting.h index 8c6a0e82ee772dadd9308697b6a7707d404e933c..d5c3c8a0523fbc3a09af07dadb000c794313231b 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/CostFunctions/CostFuncFitting.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/CostFunctions/CostFuncFitting.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/CostFunctions/CostFuncLeastSquares.h b/Framework/CurveFitting/inc/MantidCurveFitting/CostFunctions/CostFuncLeastSquares.h index 089bffdbe761ba3b203178cb0c2693194c8ef7a7..16dc46aa2b5013d1822b7ac8e06097e8836cc918 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/CostFunctions/CostFuncLeastSquares.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/CostFunctions/CostFuncLeastSquares.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/CostFunctions/CostFuncPoisson.h b/Framework/CurveFitting/inc/MantidCurveFitting/CostFunctions/CostFuncPoisson.h index 9b8caccf8c90350f4eea3c9533b516ca76378f76..813f5bc6f8820bef8149c6ee9e464472c698f3ca 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/CostFunctions/CostFuncPoisson.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/CostFunctions/CostFuncPoisson.h @@ -1,3 +1,9 @@ +// Mantid Repository : https://github.com/mantidproject/mantid +// +// Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS +// SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidAPI/FunctionDomain.h" @@ -10,27 +16,6 @@ namespace CostFunctions { /** CostFuncPoisson : Implements a cost function for fitting applications using a Poisson measure - - Copyright © 2019 ISIS Rutherford Appleton Laboratory, NScD Oak Ridge - National Laboratory & European Spallation Source - - 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 MANTID_CURVEFITTING_DLL CostFuncPoisson : public CostFuncFitting { public: diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/CostFunctions/CostFuncRwp.h b/Framework/CurveFitting/inc/MantidCurveFitting/CostFunctions/CostFuncRwp.h index 12e3ef2653aa2401a53fa9ba9fffe70cb256b387..044d739a2ee15774a6c3c64037b46a7c2aab8e7b 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/CostFunctions/CostFuncRwp.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/CostFunctions/CostFuncRwp.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -65,12 +65,12 @@ private: getFitWeights(API::FunctionValues_sptr values) const override; /// Get weight (1/sigma) - double getWeight(API::FunctionValues_sptr values, size_t i, + double getWeight(const API::FunctionValues_sptr &values, size_t i, double sqrtW = 1.0) const; /// Calcualte sqrt(W). Final cost function = sum_i [ (obs_i - cal_i) / (sigma /// * sqrt(W))]**2 - double calSqrtW(API::FunctionValues_sptr values) const; + double calSqrtW(const API::FunctionValues_sptr &values) const; friend class CurveFitting::SeqDomain; friend class CurveFitting::ParDomain; diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/CostFunctions/CostFuncUnweightedLeastSquares.h b/Framework/CurveFitting/inc/MantidCurveFitting/CostFunctions/CostFuncUnweightedLeastSquares.h index 2f44d66d51c3c05732a0ff28224518dacf6b376f..63e75f27d85ace8b029c8aae50aeb38175c540ad 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/CostFunctions/CostFuncUnweightedLeastSquares.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/CostFunctions/CostFuncUnweightedLeastSquares.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/ExcludeRangeFinder.h b/Framework/CurveFitting/inc/MantidCurveFitting/ExcludeRangeFinder.h index ce375974784d5ce40631d526ccdc6e000fcc9293..f839ef9b025c770779926cfb789369fab3b130a4 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/ExcludeRangeFinder.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/ExcludeRangeFinder.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/FitMW.h b/Framework/CurveFitting/inc/MantidCurveFitting/FitMW.h index e603c2d1dec52f2b73a77731f423e1c238c9e410..d85e79901c20f739095b354a3e5aab12665e8247 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/FitMW.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/FitMW.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/FortranDefs.h b/Framework/CurveFitting/inc/MantidCurveFitting/FortranDefs.h index 4e098648622648358fb3bf06160280924f18f5ca..795570acfd30207781daa1224116b012f46445db 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/FortranDefs.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/FortranDefs.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/FortranMatrix.h b/Framework/CurveFitting/inc/MantidCurveFitting/FortranMatrix.h index ccd3d47e30e075e24c51bab050bf22a3a614b3de..848449cdefe4272d4b30a49dd2102184ff11b648 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/FortranMatrix.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/FortranMatrix.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/FortranVector.h b/Framework/CurveFitting/inc/MantidCurveFitting/FortranVector.h index 9e320428fc42424a6f4bc63b2a51dd0164fac71b..4460ea6bfe8b742589ff57229386f846b6e83d57 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/FortranVector.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/FortranVector.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/FuncMinimizers/BFGS_Minimizer.h b/Framework/CurveFitting/inc/MantidCurveFitting/FuncMinimizers/BFGS_Minimizer.h index c9a3993e9593119160f489f74af971d3bbe32672..afc9243a0f8126e4f7913862a7ab9aaae54080e5 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/FuncMinimizers/BFGS_Minimizer.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/FuncMinimizers/BFGS_Minimizer.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/FuncMinimizers/DampedGaussNewtonMinimizer.h b/Framework/CurveFitting/inc/MantidCurveFitting/FuncMinimizers/DampedGaussNewtonMinimizer.h index 4d4e71074fc6fbb04944302b2282a09d6fffb4dc..170380dc39f5704d0ee7a9f821d2db69026837a5 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/FuncMinimizers/DampedGaussNewtonMinimizer.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/FuncMinimizers/DampedGaussNewtonMinimizer.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/FuncMinimizers/DerivMinimizer.h b/Framework/CurveFitting/inc/MantidCurveFitting/FuncMinimizers/DerivMinimizer.h index ed7260acab4b7ccad9070071826e1e208dfd4ab3..ab0c1d6ff9261fc641d305a92b176fb8392141ba 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/FuncMinimizers/DerivMinimizer.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/FuncMinimizers/DerivMinimizer.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/FuncMinimizers/FABADAMinimizer.h b/Framework/CurveFitting/inc/MantidCurveFitting/FuncMinimizers/FABADAMinimizer.h index a38c749a993a95471372f7ab02e9827bd8868f05..45ea194cb81041dd916693498fe0089eda00a96f 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/FuncMinimizers/FABADAMinimizer.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/FuncMinimizers/FABADAMinimizer.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/FuncMinimizers/FRConjugateGradientMinimizer.h b/Framework/CurveFitting/inc/MantidCurveFitting/FuncMinimizers/FRConjugateGradientMinimizer.h index aff0be9184d68c5ac6ab8648903abf3146331948..340dd25f0f27bee5434b1ad0e35b100b9bb3ce20 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/FuncMinimizers/FRConjugateGradientMinimizer.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/FuncMinimizers/FRConjugateGradientMinimizer.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/FuncMinimizers/LevenbergMarquardtMDMinimizer.h b/Framework/CurveFitting/inc/MantidCurveFitting/FuncMinimizers/LevenbergMarquardtMDMinimizer.h index 3907d586c9b8722ca008d20f729b727f1f68593c..38a5231433236370d5ebb0828a96a3905a500b16 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/FuncMinimizers/LevenbergMarquardtMDMinimizer.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/FuncMinimizers/LevenbergMarquardtMDMinimizer.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/FuncMinimizers/LevenbergMarquardtMinimizer.h b/Framework/CurveFitting/inc/MantidCurveFitting/FuncMinimizers/LevenbergMarquardtMinimizer.h index 654f89dcb250d21b6bdaa8f6aacc8bdc3d5d8fe8..2bfc4c786a91635be0a5d35c2c0721b6718ef398 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/FuncMinimizers/LevenbergMarquardtMinimizer.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/FuncMinimizers/LevenbergMarquardtMinimizer.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/FuncMinimizers/PRConjugateGradientMinimizer.h b/Framework/CurveFitting/inc/MantidCurveFitting/FuncMinimizers/PRConjugateGradientMinimizer.h index 8564838bf7a62189651b2d9ff28126109ac4f084..b7b8a4661097de6c622c5651d2562f17d0aed47c 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/FuncMinimizers/PRConjugateGradientMinimizer.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/FuncMinimizers/PRConjugateGradientMinimizer.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/FuncMinimizers/SimplexMinimizer.h b/Framework/CurveFitting/inc/MantidCurveFitting/FuncMinimizers/SimplexMinimizer.h index 627e48e43dfefc20f09ca72116d74c4909b465e6..c4d85bdf38524c08fe346ced75cce3ed40e11e46 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/FuncMinimizers/SimplexMinimizer.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/FuncMinimizers/SimplexMinimizer.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/FuncMinimizers/SteepestDescentMinimizer.h b/Framework/CurveFitting/inc/MantidCurveFitting/FuncMinimizers/SteepestDescentMinimizer.h index 74fb4976397d75ca5b435cb1f4e3a3e2c5ad4062..c6b773c73abb9fdf44935df8615bd7b7cec7a706 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/FuncMinimizers/SteepestDescentMinimizer.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/FuncMinimizers/SteepestDescentMinimizer.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/FuncMinimizers/TrustRegionMinimizer.h b/Framework/CurveFitting/inc/MantidCurveFitting/FuncMinimizers/TrustRegionMinimizer.h index 27969e927605d2df83dc2dd3bd734d4dba274f0e..73168876b135a12bd04fd10e2a6952d8f8d6e3a4 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/FuncMinimizers/TrustRegionMinimizer.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/FuncMinimizers/TrustRegionMinimizer.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/FunctionDomain1DSpectrumCreator.h b/Framework/CurveFitting/inc/MantidCurveFitting/FunctionDomain1DSpectrumCreator.h index 3b37d3f78bba0bcbc209db3b301631be91b7ae5d..14a4fa8c9e0542853863890ea74b3aa08f925dc5 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/FunctionDomain1DSpectrumCreator.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/FunctionDomain1DSpectrumCreator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/Abragam.h b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/Abragam.h index f47b85feaea8a6532165e4cf9d5fc827b846e052..998cd94bba4ebae726d461f4aaa85a545e9bdaf8 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/Abragam.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/Abragam.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/BSpline.h b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/BSpline.h index 25dc273628a15e8a483fab5051f2642fdb2d56e6..f6d09fcf68042d617f4fd57fd5509f945519625b 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/BSpline.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/BSpline.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/BackToBackExponential.h b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/BackToBackExponential.h index b9c22b55537c96a5e6f4a1dd026949df22e56401..770f39fd23e20da8ad4a7de50736671a68eaf852 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/BackToBackExponential.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/BackToBackExponential.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/BackgroundFunction.h b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/BackgroundFunction.h index 61ec3d178fad4fb827778f13e57c33b3ac02959e..945f283e2bdf0721d27f776068bf5ab87adf2a9e 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/BackgroundFunction.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/BackgroundFunction.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/BivariateNormal.h b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/BivariateNormal.h index e160d07aa7bceb1b2c2497f7420a5695e491719e..c57665ce1f4082c837317e34dfbfeed211da9a19 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/BivariateNormal.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/BivariateNormal.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/Bk2BkExpConvPV.h b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/Bk2BkExpConvPV.h index 7555cc7d40472873fa31e9e99d9ab8db1a099746..3b371f9a8421ffcff86ec59891d773d454b4e406 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/Bk2BkExpConvPV.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/Bk2BkExpConvPV.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/ChebfunBase.h b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/ChebfunBase.h index 2ea1ea2c92ac807e68c9b89555157ce03aa4c22c..29f6560aeef34db60eb850c3f7a7ea2507d1724f 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/ChebfunBase.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/ChebfunBase.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -149,7 +149,7 @@ private: void calcIntegrationWeights() const; /// Calculate function values at odd-valued indices of the base x-points - std::vector<double> fitOdd(ChebfunFunctionType f, + std::vector<double> fitOdd(const ChebfunFunctionType &f, std::vector<double> &p) const; /// Calculate function values at odd-valued indices of the base x-points std::vector<double> fitOdd(const API::IFunction &f, diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/Chebyshev.h b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/Chebyshev.h index 8e942e1df19f574c05c82706340b308624b83aa4..bf00483523c346af7dc9fa136dd9e6da4c55875e 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/Chebyshev.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/Chebyshev.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/ComptonPeakProfile.h b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/ComptonPeakProfile.h index 5da60801194a7b58e001ed2d1ca2591195f5fdc2..c6405b8ffbb4cbbbcaadf0139fb2436be6fcc145 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/ComptonPeakProfile.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/ComptonPeakProfile.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/ComptonProfile.h b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/ComptonProfile.h index 2d8f63b1b22ecb1e102153be23ad349d98c148d8..002fbf2c8c372b9714e92db0d553613ac2bc2725 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/ComptonProfile.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/ComptonProfile.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/ComptonScatteringCountRate.h b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/ComptonScatteringCountRate.h index f471c1c68f5bc17e5f6e774c818a60f21b4ab394..6361649b1dbab5c358c639de34802fe536168f49 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/ComptonScatteringCountRate.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/ComptonScatteringCountRate.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/Convolution.h b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/Convolution.h index a3ff030aa0101c9627edb6fab8f94427ef123b08..8b63d268b020a0b355e0ab81424de203fb0b86ff 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/Convolution.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/Convolution.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/CrystalElectricField.h b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/CrystalElectricField.h index 7802b6354301c5c17831b7a72346e37ceb8d267e..27d8dc8ead69f5ee1e2014992b3c4b0bda8e9ce4 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/CrystalElectricField.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/CrystalElectricField.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/CrystalFieldControl.h b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/CrystalFieldControl.h index 65c5d14542e5ea4eb78a21d99d8a70ca0f0a8b4d..90f51a28ab07c74759b77f5687788e40ec3d0586 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/CrystalFieldControl.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/CrystalFieldControl.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/CrystalFieldFunction.h b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/CrystalFieldFunction.h index bd20fcaccf1489bc10586ccf024a19b32f2194bb..6ab6b310dbf219304923eb76aa166ab2cfe596d9 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/CrystalFieldFunction.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/CrystalFieldFunction.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/CrystalFieldHeatCapacity.h b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/CrystalFieldHeatCapacity.h index 729b921cd4b7b8a234d5e55226248fc7f1c44790..550e9816189febafa39c289a42b8f86367683a23 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/CrystalFieldHeatCapacity.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/CrystalFieldHeatCapacity.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/CrystalFieldMagnetisation.h b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/CrystalFieldMagnetisation.h index 442166dd66be392b329ad90673a46cc2024724d1..792e2b835880ff889186c4fbc1fc3054eb6ef392 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/CrystalFieldMagnetisation.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/CrystalFieldMagnetisation.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/CrystalFieldMoment.h b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/CrystalFieldMoment.h index 74cb2b98a290b1f24f5915a3909a2b101e7ed071..86ab7bd8cc0bd6c14b83da249c464e8ba5ee607b 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/CrystalFieldMoment.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/CrystalFieldMoment.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/CrystalFieldMultiSpectrum.h b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/CrystalFieldMultiSpectrum.h index f8d78ec1bb6052eb5cef13ecbd60b06194fb8210..4cfb83ff24a834864c745bf48b1c482d6f93e95d 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/CrystalFieldMultiSpectrum.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/CrystalFieldMultiSpectrum.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/CrystalFieldPeakUtils.h b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/CrystalFieldPeakUtils.h index 7de49062f2d53ea6c6cc6ce0285932de452f6540..06f4bd485e0dbe1e8b5a4fae9c22c0f77100dcfd 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/CrystalFieldPeakUtils.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/CrystalFieldPeakUtils.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include <string> diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/CrystalFieldPeaks.h b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/CrystalFieldPeaks.h index 96dc0b7aaa6f6a123b3038a7c74943acbdc0408e..9f380fcba98b36ac87ef3307041fdf87c3383d2d 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/CrystalFieldPeaks.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/CrystalFieldPeaks.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/CrystalFieldPeaksBase.h b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/CrystalFieldPeaksBase.h index 17bf49d38459a326d7c7e52aacf179ae478a65af..5aaa8aea93a14616ae4d0cba5cef3706108bcdf5 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/CrystalFieldPeaksBase.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/CrystalFieldPeaksBase.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/CrystalFieldSpectrum.h b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/CrystalFieldSpectrum.h index 2c2aa2700758349eacfc16a03203b4b93c60d910..633df77e8ca0db1a9e7b6adb794a05bde978ce85 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/CrystalFieldSpectrum.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/CrystalFieldSpectrum.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/CrystalFieldSusceptibility.h b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/CrystalFieldSusceptibility.h index 3addcad7d45ca543e145831e409e6efda7a1c2b8..a2ab32d778938ea951d66356c2a1231c5df08dc9 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/CrystalFieldSusceptibility.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/CrystalFieldSusceptibility.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/CubicSpline.h b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/CubicSpline.h index f5e13bb4c17ace9a0271744e9eacca253ec12c62..67ca6a4d40a5355bbe8c97800d13e257ee4b99fa 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/CubicSpline.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/CubicSpline.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/DeltaFunction.h b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/DeltaFunction.h index 89bc7c4d902d2f40f971b04a6786938ce3824fb3..5019dee7b21667a403ee6e49bacd03256c9c099d 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/DeltaFunction.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/DeltaFunction.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/DiffRotDiscreteCircle.h b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/DiffRotDiscreteCircle.h index d629154670464e347a27bb63a030c47610d08266..3f84f978a94900bfde960d134de14679149e6b30 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/DiffRotDiscreteCircle.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/DiffRotDiscreteCircle.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/DiffSphere.h b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/DiffSphere.h index 9606a14eed552dff55fef1919887128f66382235..799d310f8607366406fac5460e907f697bd0e110 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/DiffSphere.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/DiffSphere.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/DynamicKuboToyabe.h b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/DynamicKuboToyabe.h index 5d4432a1d151eda390c492119d3c8ee42c7262df..709c65ac95006309466b35a399d948a790145970 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/DynamicKuboToyabe.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/DynamicKuboToyabe.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/ElasticDiffRotDiscreteCircle.h b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/ElasticDiffRotDiscreteCircle.h index 4e79a8001157db58eb695e9cb8757e80a2ed878b..34ad7e8fbb9a204dcce02e892638dcd4b117ec10 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/ElasticDiffRotDiscreteCircle.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/ElasticDiffRotDiscreteCircle.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/ElasticDiffSphere.h b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/ElasticDiffSphere.h index a4ee03f35f9e3734f678a11f0db30458a2a44b3d..5dbcee819b3eed1c14135822d2197f554fea5fce 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/ElasticDiffSphere.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/ElasticDiffSphere.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/ElasticIsoRotDiff.h b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/ElasticIsoRotDiff.h index 2903601f20703078f04753fd76044703ac9c4717..9150356c4aba02fad3bf5e968febd1c48aebc91c 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/ElasticIsoRotDiff.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/ElasticIsoRotDiff.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/EndErfc.h b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/EndErfc.h index 1fa30d5d658dfee7ada2ecb6edb49db2452282a7..295f77a1a12a136f0554954a8a6d13edb11f971c 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/EndErfc.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/EndErfc.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/ExpDecay.h b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/ExpDecay.h index aa2318b84becdfc4fc86c15e5009bffa8ed24f01..3ee54e1f115db3cc7b9828eee4cbc0a06a4a1bc2 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/ExpDecay.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/ExpDecay.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/ExpDecayMuon.h b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/ExpDecayMuon.h index 01b308c5f90fc54f85eeb30e4e9f7bd5f9b2db0e..66403fa4eb40628582bebe6fb64faa04415cc4fd 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/ExpDecayMuon.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/ExpDecayMuon.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/ExpDecayOsc.h b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/ExpDecayOsc.h index e6dcd06426fed4ce670a5ae100838c79a6be0ea3..0dfb437a7836536d58acc41226545fedcc06cc73 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/ExpDecayOsc.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/ExpDecayOsc.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/FlatBackground.h b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/FlatBackground.h index 70496a2ab827b86046bcc3cbc9074b98c6834d24..2ff31a7641441433a195bb032fc093a59b817d91 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/FlatBackground.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/FlatBackground.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/FullprofPolynomial.h b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/FullprofPolynomial.h index e3734b908f1a995c5e1dcc54dc0c743576e406da..bb8cacc4d6989f463f2bea9871b1bf4a5435137b 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/FullprofPolynomial.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/FullprofPolynomial.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/FunctionQDepends.h b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/FunctionQDepends.h index 0e5959f27922e59e14c8ed1fd831d235629860c3..a7cf2c8e2c95245958da7bf1e81a71f1b14809f2 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/FunctionQDepends.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/FunctionQDepends.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/GausDecay.h b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/GausDecay.h index 9b2008eb9ef6bf30ded587a3b2822f64c33ddf07..ad1f2a9693fb2e2d8e6eddeddefd39c649334480 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/GausDecay.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/GausDecay.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/GausOsc.h b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/GausOsc.h index a5fbd1bc14687f17ace83608909cbeeca49dd832..c7a64e45806d4d86a23fb95f250ad0e14d5129da 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/GausOsc.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/GausOsc.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/Gaussian.h b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/Gaussian.h index 70692996b8b042b4b2c97a65a88a0e4d405a0c32..54cd2639dc99d1a1268d81cf559748222e2ae142 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/Gaussian.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/Gaussian.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/GaussianComptonProfile.h b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/GaussianComptonProfile.h index 167a364c791ab836f50a1d6032bcc86e6bf0ab63..4cb140e68eac121a4de4f883bd88e8bf3ab1e900 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/GaussianComptonProfile.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/GaussianComptonProfile.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/GramCharlier.h b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/GramCharlier.h index e80223adad3543c07f89f892ce98f5859025b754..702db5a800577f5f57de69e7ac0641ddfc66faaf 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/GramCharlier.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/GramCharlier.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/GramCharlierComptonProfile.h b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/GramCharlierComptonProfile.h index ee9bef97a7c888af542caf5177da15300e1dd910..f8ad2f29aa8e4c75a275793404523526fb9b894e 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/GramCharlierComptonProfile.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/GramCharlierComptonProfile.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/IkedaCarpenterPV.h b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/IkedaCarpenterPV.h index 32e712991e243b6242bf412950f3dec440e10e9b..4074de02293556ab543ad486556838515f7eaa04 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/IkedaCarpenterPV.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/IkedaCarpenterPV.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -72,7 +72,7 @@ private: double &eta) const; /// constrain all parameters to be non-negative - void lowerConstraint0(std::string paramName); + void lowerConstraint0(const std::string ¶mName); }; } // namespace Functions diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/InelasticDiffRotDiscreteCircle.h b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/InelasticDiffRotDiscreteCircle.h index 79359eef6117b551ba0d263b31208de47770e38f..3f781d45538eee808f754a02364966370b47d032 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/InelasticDiffRotDiscreteCircle.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/InelasticDiffRotDiscreteCircle.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/InelasticDiffSphere.h b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/InelasticDiffSphere.h index 2c0d89125db61a0be7393c15834bff50efad87e5..9f9d84779eabcf96c0c8f68a7917247c65ebcfb7 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/InelasticDiffSphere.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/InelasticDiffSphere.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/InelasticIsoRotDiff.h b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/InelasticIsoRotDiff.h index 524111efdee3bbc75033342cab411c710ef2756a..8a0569cf86993dc1e2743b42bf70938e2bd47d4e 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/InelasticIsoRotDiff.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/InelasticIsoRotDiff.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/IsoRotDiff.h b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/IsoRotDiff.h index fc4e15a59fa4706385aad27b71ebb920848f8c59..ff18f5faf4ae5112f3f41e1d07fb192e4cee5f73 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/IsoRotDiff.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/IsoRotDiff.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once // Mantid Coding standars <http://www.mantidproject.org/Coding_Standards> diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/Keren.h b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/Keren.h index 8842ba4449197d049118d1675ccd5cbfb0605dc8..9ef9eef7797cb4ae87197b2e8e17c491ccfae799 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/Keren.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/Keren.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/LinearBackground.h b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/LinearBackground.h index 51115ef4278d479add969b8772f52a87b8513b96..97f54385c85467a1f69f9589870959b9d3008bc1 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/LinearBackground.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/LinearBackground.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/LogNormal.h b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/LogNormal.h index be9d159f1869487a99434d428f34b55c055bf353..cf49811bb70d6ff10116e5688c301bad4c59f06c 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/LogNormal.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/LogNormal.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/Lorentzian.h b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/Lorentzian.h index 45bc5afa342f9f151a8261bdf56f26998e8fe1b4..fa08f6a1da231a62ca33b183d1c90d469c6db2e1 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/Lorentzian.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/Lorentzian.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/MultivariateGaussianComptonProfile.h b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/MultivariateGaussianComptonProfile.h index ca46742faf5c2c81bb57c4ca02cb49b82ae7223a..9469900d405a1bae0b4f1054b13cac5c58d96f98 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/MultivariateGaussianComptonProfile.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/MultivariateGaussianComptonProfile.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/MuonFInteraction.h b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/MuonFInteraction.h index a9bcba8e50ab16cee181146e899765c2e932033a..f926e36f50c67bde35ff33217cda4fb5ad9037e6 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/MuonFInteraction.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/MuonFInteraction.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/NeutronBk2BkExpConvPVoigt.h b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/NeutronBk2BkExpConvPVoigt.h index a720996a6030f6c0b349567bc1b52cf2a527a4f0..b6dcbdb82ec062b226e08bbec61879e4c6d2700e 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/NeutronBk2BkExpConvPVoigt.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/NeutronBk2BkExpConvPVoigt.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/PawleyFunction.h b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/PawleyFunction.h index 59fda7ae4a0933694ea0b84c87c347b851c0edfe..04a22d80889ba4de376403386dcff7ee3edb1e88 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/PawleyFunction.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/PawleyFunction.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -134,7 +134,7 @@ public: PawleyParameterFunction_sptr getPawleyParameterFunction() const; protected: - void setPeakPositions(std::string centreName, double zeroShift, + void setPeakPositions(const std::string ¢reName, double zeroShift, const Geometry::UnitCell &cell) const; size_t calculateFunctionValues(const API::IPeakFunction_sptr &peak, diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/PeakParameterFunction.h b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/PeakParameterFunction.h index a0a10f22b10fe4f4f21bf2b60c38ea981a84c2d4..47a1700aa8e6d362da90b98c98b247f0cb419e3c 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/PeakParameterFunction.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/PeakParameterFunction.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/Polynomial.h b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/Polynomial.h index 12536d718ea918c743a3dd216b2d8d1f8aac16e7..b408aa0d762927006d1bf9fc98e7fa4d3d49d2f8 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/Polynomial.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/Polynomial.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/ProcessBackground.h b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/ProcessBackground.h index 289b74adaa5ec8a2b12b3ec8af705ccc0ba41a79..e6c9144c2403f4d540f23714ee10220f24479a65 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/ProcessBackground.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/ProcessBackground.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -22,17 +22,18 @@ namespace Functions { class RemovePeaks { public: - void setup(DataObjects::TableWorkspace_sptr peaktablews); + void setup(const DataObjects::TableWorkspace_sptr &peaktablews); DataObjects::Workspace2D_sptr - removePeaks(API::MatrixWorkspace_const_sptr dataws, int wsindex, + removePeaks(const API::MatrixWorkspace_const_sptr &dataws, int wsindex, double numfwhm); private: /// Parse peak centre and FWHM from a table workspace - void parsePeakTableWorkspace(DataObjects::TableWorkspace_sptr peaktablews, - std::vector<double> &vec_peakcentre, - std::vector<double> &vec_peakfwhm); + void + parsePeakTableWorkspace(const DataObjects::TableWorkspace_sptr &peaktablews, + std::vector<double> &vec_peakcentre, + std::vector<double> &vec_peakfwhm); /// Exclude peak regions size_t excludePeaks(std::vector<double> v_inX, std::vector<bool> &v_useX, @@ -83,15 +84,15 @@ private: /// Select background points automatically DataObjects::Workspace2D_sptr - autoBackgroundSelection(DataObjects::Workspace2D_sptr bkgdWS); + autoBackgroundSelection(const DataObjects::Workspace2D_sptr &bkgdWS); /// Create a background function from input properties BackgroundFunction_sptr - createBackgroundFunction(const std::string backgroundtype); + createBackgroundFunction(const std::string &backgroundtype); /// Filter non-background data points out and create a background workspace DataObjects::Workspace2D_sptr - filterForBackground(BackgroundFunction_sptr bkgdfunction); + filterForBackground(const BackgroundFunction_sptr &bkgdfunction); DataObjects::Workspace2D_const_sptr m_dataWS; DataObjects::Workspace2D_sptr m_outputWS; @@ -119,7 +120,7 @@ private: /// Add a certain region from a reference workspace void addRegion(); - void fitBackgroundFunction(std::string bkgdfunctiontype); + void fitBackgroundFunction(const std::string &bkgdfunctiontype); }; } // namespace Functions diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/ProductFunction.h b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/ProductFunction.h index e14d3e7daeb62365c6a757d8184c5877d1965c03..d0608102675f65444e645730135f39dfb7b58f03 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/ProductFunction.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/ProductFunction.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/ProductLinearExp.h b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/ProductLinearExp.h index 116aa05c39980d254193bc77f4339a1b7cd10aab..35f9a0b78e5890351ef7f1035ea87a8f7435a872 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/ProductLinearExp.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/ProductLinearExp.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/ProductQuadraticExp.h b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/ProductQuadraticExp.h index 549886cc444a76cf3c91cba9d401258c1f6d4416..010c0c7fd26a46b1eef7b935b0bc30f7d21c1190 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/ProductQuadraticExp.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/ProductQuadraticExp.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/PseudoVoigt.h b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/PseudoVoigt.h index a249e2ed3f48ef081fb634a4aa11ef146cface62..d084355dd17121aac2cf5f33a61528f721368105 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/PseudoVoigt.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/PseudoVoigt.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/Quadratic.h b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/Quadratic.h index 65257da5d3cc0cbeabb23208f7e96cc313045723..301e4324468112ebe792117d746a04bbd3d86d11 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/Quadratic.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/Quadratic.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/ReflectivityMulf.h b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/ReflectivityMulf.h index c7192204062e8241a3616260b34f866d86610d5a..a4723c360e18018e1ea7be2968ad8ae96b08daa0 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/ReflectivityMulf.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/ReflectivityMulf.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/Resolution.h b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/Resolution.h index 0b9b3cdef4dce03099b156fa0e2123c4e9554b14..e987f7dd52b62ebe144ac0c382504566708e5c7b 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/Resolution.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/Resolution.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/SimpleChebfun.h b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/SimpleChebfun.h index f0d26c35c4a38af41f4722094c00a8204d084a46..b8888d9eac2e6bde875b5f70448c70b4b1e6ba9f 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/SimpleChebfun.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/SimpleChebfun.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -25,7 +25,7 @@ public: /// Constructor. SimpleChebfun(size_t n, const API::IFunction &fun, double start, double end); /// Constructor. - SimpleChebfun(ChebfunFunctionType fun, double start, double end, + SimpleChebfun(const ChebfunFunctionType &fun, double start, double end, double accuracy = 0.0, size_t badSize = 10); /// Constructor. SimpleChebfun(const API::IFunction &fun, double start, double end, @@ -67,11 +67,11 @@ public: /// Integrate the function on its interval double integrate() const; /// Add a C++ function to the function - SimpleChebfun &operator+=(ChebfunFunctionType fun); + SimpleChebfun &operator+=(const ChebfunFunctionType &fun); private: /// Constructor - SimpleChebfun(ChebfunBase_sptr base); + SimpleChebfun(const ChebfunBase_sptr &base); /// Underlying base that does actual job. ChebfunBase_sptr m_base; /// Function values at the chebfun x-points. diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/StaticKuboToyabe.h b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/StaticKuboToyabe.h index 4d0916570536e964e56032290a8d0194bc5ff8ca..5c22ed85e972bbd6099c4b32c80ba93370f8abce 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/StaticKuboToyabe.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/StaticKuboToyabe.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/StaticKuboToyabeTimesExpDecay.h b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/StaticKuboToyabeTimesExpDecay.h index 6eab9aec82a7d73118768ae1f8c3156399ce587f..a5bd87fc64573ac4f2023f14a8b2d540c27ac53e 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/StaticKuboToyabeTimesExpDecay.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/StaticKuboToyabeTimesExpDecay.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/StaticKuboToyabeTimesGausDecay.h b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/StaticKuboToyabeTimesGausDecay.h index 7dcb4638f0938db0e5d0821b7f6fb526b0c4ea31..6c7531153fb100c5c31e29d528923cb7fb845b4b 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/StaticKuboToyabeTimesGausDecay.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/StaticKuboToyabeTimesGausDecay.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/StaticKuboToyabeTimesStretchExp.h b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/StaticKuboToyabeTimesStretchExp.h index 5f60043ac8e7638616768e31be678446044a576f..110a5da02d0677da278bddda4b00cc2475f3f631 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/StaticKuboToyabeTimesStretchExp.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/StaticKuboToyabeTimesStretchExp.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/StretchExp.h b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/StretchExp.h index 4bccdd21a42f8b1e00f89a2793b3322d5b89f709..604580a91b61ee080b6fb37339cd17bc9607beb0 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/StretchExp.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/StretchExp.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/StretchExpMuon.h b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/StretchExpMuon.h index ca749d439f47c020e88eeef41ee74979874e48f1..7997cbda343522444acde593bea3e55af79033c7 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/StretchExpMuon.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/StretchExpMuon.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/TabulatedFunction.h b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/TabulatedFunction.h index dee45086add3a5b53ff7b44ec187b4d4c6db1d46..a6959c457d5320bed208a83186c572c8fcf02a6b 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/TabulatedFunction.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/TabulatedFunction.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/TeixeiraWaterSQE.h b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/TeixeiraWaterSQE.h index e4b2c1a1b75a620b0c576841d84d9b0e99362433..b8734dd619452dcb27a405cd289201b4808ab9d1 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/TeixeiraWaterSQE.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/TeixeiraWaterSQE.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/ThermalNeutronBk2BkExpAlpha.h b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/ThermalNeutronBk2BkExpAlpha.h index 07df3ee5ae09780cf5f7dc44f3e9065179b85a2c..2d3e6bcb675154b0ddb85bfa9afdc13e3c0d94b4 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/ThermalNeutronBk2BkExpAlpha.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/ThermalNeutronBk2BkExpAlpha.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/ThermalNeutronBk2BkExpBeta.h b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/ThermalNeutronBk2BkExpBeta.h index a38247a7a8ffbf4216b0969d355d9613ee60d8d6..190adbd86acec38834bb9c7b4dc5470fc2487f30 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/ThermalNeutronBk2BkExpBeta.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/ThermalNeutronBk2BkExpBeta.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/ThermalNeutronBk2BkExpConvPVoigt.h b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/ThermalNeutronBk2BkExpConvPVoigt.h index a82351ddb4b984ef82689e963d3056bc06b3b987..f96b63f2d8df729b575ad2f2796d1abc811f4174 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/ThermalNeutronBk2BkExpConvPVoigt.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/ThermalNeutronBk2BkExpConvPVoigt.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/ThermalNeutronBk2BkExpSigma.h b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/ThermalNeutronBk2BkExpSigma.h index a0ca3ab4ded993acac89ac5b5ed7b9e6462900b1..c73a74b3bcd185dade267e719c0517373a711058 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/ThermalNeutronBk2BkExpSigma.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/ThermalNeutronBk2BkExpSigma.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/ThermalNeutronDtoTOFFunction.h b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/ThermalNeutronDtoTOFFunction.h index 029ce40151e1dea21838d3e7d6e520731e2cd36f..f9a3e219759782efce5c8be4a7cdb1bc7d6abd15 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/ThermalNeutronDtoTOFFunction.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/ThermalNeutronDtoTOFFunction.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -40,7 +40,7 @@ public: /// Calculate function values void function1D(std::vector<double> &out, - const std::vector<double> xValues) const; + const std::vector<double> &xValues) const; protected: /// overwrite IFunction base class method, which declare function parameters diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/UserFunction.h b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/UserFunction.h index 6cb7b29c4b6c358a88f6126cc0aeb9e652d26819..6e16c678cedaeaf2575328e762fb47ae8ead89d9 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/UserFunction.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/UserFunction.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/UserFunction1D.h b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/UserFunction1D.h index d44adddabe993701c60fc24e3ace28d922c491e6..75d2df8f3e603a41fc98e318a0a1115aeaae65f8 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/UserFunction1D.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/UserFunction1D.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/VesuvioResolution.h b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/VesuvioResolution.h index 4b037a4eda17ebbe8a39c3dd777914a9e39244cd..5d8a58c2396d472a61bac74b9a3456d8af47b540 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/VesuvioResolution.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/VesuvioResolution.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/Voigt.h b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/Voigt.h index c9fc5fd1a59d9730932ef7087672345597553155..5b39eb1ec144a50e28cdb38ba7c6c12d8355c050 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Functions/Voigt.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Functions/Voigt.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/GSLFunctions.h b/Framework/CurveFitting/inc/MantidCurveFitting/GSLFunctions.h index 26438a308853b49a1b633fddb170de15946c8437..25c64ab84184e7732b532fda0be7505110a59dd3 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/GSLFunctions.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/GSLFunctions.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -27,7 +27,7 @@ Various GSL specific functions used GSL specific minimizers /// Structure to contain least squares data and used by GSL struct GSL_FitData { /// Constructor - GSL_FitData(boost::shared_ptr<CostFunctions::CostFuncLeastSquares> cf); + GSL_FitData(const boost::shared_ptr<CostFunctions::CostFuncLeastSquares> &cf); /// Destructor ~GSL_FitData(); /// number of points to be fitted (size of X, Y and sqrtWeightData arrays) diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/GSLJacobian.h b/Framework/CurveFitting/inc/MantidCurveFitting/GSLJacobian.h index 80241c1ad5de348b10a459bcbe29b109a91f1814..fb656cdca14fc331bb4ffe3c0e90f3382848907e 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/GSLJacobian.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/GSLJacobian.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/GSLMatrix.h b/Framework/CurveFitting/inc/MantidCurveFitting/GSLMatrix.h index 8b4195b031a39b51a95da931be3631901803f35e..c61343166d43c6c3e70deab116b13ea5f7ecd86d 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/GSLMatrix.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/GSLMatrix.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/GSLVector.h b/Framework/CurveFitting/inc/MantidCurveFitting/GSLVector.h index d134f6e40cabc095321b5aa46f4dffa57feddcdb..0902bf1c41e31fa7bc75e9777d2c90327cab34ac 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/GSLVector.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/GSLVector.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/GeneralDomainCreator.h b/Framework/CurveFitting/inc/MantidCurveFitting/GeneralDomainCreator.h index 90d78e922c3055c639f0f8236e9ff9dc2696fd0e..0c99c81da8c197b786aba070cbb9b9d70c93d7a1 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/GeneralDomainCreator.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/GeneralDomainCreator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/HalfComplex.h b/Framework/CurveFitting/inc/MantidCurveFitting/HalfComplex.h index e4fb162a588e472bc26c389b7eb6189e29ca88bf..ae06493d5c6d29c8d54df8f07fc6ffb806824b18 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/HalfComplex.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/HalfComplex.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/HistogramDomainCreator.h b/Framework/CurveFitting/inc/MantidCurveFitting/HistogramDomainCreator.h index 9c12d7db631105ad826d8a9eed90407f38baa39a..a201cf598306aa50112195934a459314cb1932c2 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/HistogramDomainCreator.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/HistogramDomainCreator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/IFittingAlgorithm.h b/Framework/CurveFitting/inc/MantidCurveFitting/IFittingAlgorithm.h index 73ba6536d55ac813b51783d960e3309b8ff4466d..73ec2c73e15851c452abbaa4593838694b4e94cc 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/IFittingAlgorithm.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/IFittingAlgorithm.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/IMWDomainCreator.h b/Framework/CurveFitting/inc/MantidCurveFitting/IMWDomainCreator.h index 12346ba46639c2a3507f1c88220fa131be351794..fb1fca9f1d183e0f57e720a0291601d5dbaa865e 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/IMWDomainCreator.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/IMWDomainCreator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -15,6 +15,7 @@ #include <boost/weak_ptr.hpp> #include <list> +#include <utility> namespace Mantid { namespace API { @@ -53,7 +54,7 @@ public: /// Set the workspace /// @param ws :: workspace to set. void setWorkspace(boost::shared_ptr<API::MatrixWorkspace> ws) { - m_matrixWorkspace = ws; + m_matrixWorkspace = std::move(ws); } /// Set the workspace index /// @param wi :: workspace index to set. @@ -92,7 +93,7 @@ protected: const API::IFunction_sptr &function, boost::shared_ptr<API::MatrixWorkspace> &ws, const size_t wsIndex, const boost::shared_ptr<API::FunctionDomain> &domain, - boost::shared_ptr<API::FunctionValues> resultValues) const; + const boost::shared_ptr<API::FunctionValues> &resultValues) const; /// Store workspace property name std::string m_workspacePropertyName; diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/Jacobian.h b/Framework/CurveFitting/inc/MantidCurveFitting/Jacobian.h index b3aaaacd3a0c899b156162f6d40b06147aa3a66d..c1c617a261d60b6bbcaec9364f0e68a361920b8b 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/Jacobian.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/Jacobian.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/LatticeDomainCreator.h b/Framework/CurveFitting/inc/MantidCurveFitting/LatticeDomainCreator.h index d82507e953f71682458ac305d4f2db5df6b26677..4a36172d764a1337523d5e75c8ac23dd9a41b463 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/LatticeDomainCreator.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/LatticeDomainCreator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/LatticeFunction.h b/Framework/CurveFitting/inc/MantidCurveFitting/LatticeFunction.h index 7bd7e57e35494d679969245d3e3bf019139db526..f2f9a96160c9769e45e56d000de339732f7ad40d 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/LatticeFunction.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/LatticeFunction.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/MSVesuvioHelpers.h b/Framework/CurveFitting/inc/MantidCurveFitting/MSVesuvioHelpers.h index 7588bfd7ecdc777da8ea3a5225790c46fb8bdaf6..021ef28b7f72be9fb214f728f63e86d96cd68079 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/MSVesuvioHelpers.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/MSVesuvioHelpers.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/MultiDomainCreator.h b/Framework/CurveFitting/inc/MantidCurveFitting/MultiDomainCreator.h index 1a65f6c7bc21cff3883262488b766fdba598ba89..49b7db5b00cb607e391640eb4670e34864b17660 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/MultiDomainCreator.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/MultiDomainCreator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/ParDomain.h b/Framework/CurveFitting/inc/MantidCurveFitting/ParDomain.h index 24cfc59fbd0c2226c7a3abe988f201eef8ba4e98..7405f71b3a88b7a8c11f5f78dfd532e8c4e001d9 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/ParDomain.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/ParDomain.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/ParameterEstimator.h b/Framework/CurveFitting/inc/MantidCurveFitting/ParameterEstimator.h index e52624220e7b8cb9f411975384d79ae7bbb19047..178d12b4bc28e4133c119e7aaf68b1ed0233d946 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/ParameterEstimator.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/ParameterEstimator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/PrecompiledHeader.h b/Framework/CurveFitting/inc/MantidCurveFitting/PrecompiledHeader.h index 57c968f621907ec09bae7cfe80cfbf408fe3a81b..bb1dde3eae6c55db3dc5a71019a001135abe2476 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/PrecompiledHeader.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/PrecompiledHeader.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/RalNlls/TrustRegion.h b/Framework/CurveFitting/inc/MantidCurveFitting/RalNlls/TrustRegion.h index 9e9e50ed5824181b227ce60d953ea0d5d631ead3..d87b705c76b3fc4b75604eda268785120e136552 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/RalNlls/TrustRegion.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/RalNlls/TrustRegion.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/RalNlls/Workspaces.h b/Framework/CurveFitting/inc/MantidCurveFitting/RalNlls/Workspaces.h index f5ac80abfe2f65f6945e2e724bdc41adb0bc794c..6a480b4626216f5daf47480757d399951dcfd40d 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/RalNlls/Workspaces.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/RalNlls/Workspaces.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/SeqDomain.h b/Framework/CurveFitting/inc/MantidCurveFitting/SeqDomain.h index 0dd3ea4c38f751959a547b5820246c8080dd2f1b..7fcffd154851a3d6e092f584083e744f6a84c5cf 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/SeqDomain.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/SeqDomain.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -38,7 +38,7 @@ public: virtual void getDomainAndValues(size_t i, API::FunctionDomain_sptr &domain, API::FunctionValues_sptr &values) const; /// Add new domain creator - void addCreator(API::IDomainCreator_sptr creator); + void addCreator(const API::IDomainCreator_sptr &creator); /// Calculate the value of an additive cost function virtual void additiveCostFunctionVal(const CostFunctions::CostFuncFitting &costFunction); diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/SeqDomainSpectrumCreator.h b/Framework/CurveFitting/inc/MantidCurveFitting/SeqDomainSpectrumCreator.h index 2c474fe7aa70e1cb811c2741eaded4c9bea87799..4a2d4bcc73c4391f0513474fbeb7388f1990b78b 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/SeqDomainSpectrumCreator.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/SeqDomainSpectrumCreator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -49,7 +49,7 @@ public: protected: void setParametersFromPropertyManager(); - void setMatrixWorkspace(API::MatrixWorkspace_sptr matrixWorkspace); + void setMatrixWorkspace(const API::MatrixWorkspace_sptr &matrixWorkspace); bool histogramIsUsable(size_t i) const; diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/SpecialFunctionSupport.h b/Framework/CurveFitting/inc/MantidCurveFitting/SpecialFunctionSupport.h index 7a67cff3820a25cd7f2a6c0bb3edbbf1ba8e0d5d..51569b2fc282afb1ca574e7f3c029f0d8bd2fddd 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/SpecialFunctionSupport.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/SpecialFunctionSupport.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/TableWorkspaceDomainCreator.h b/Framework/CurveFitting/inc/MantidCurveFitting/TableWorkspaceDomainCreator.h index d5e888cea4361899e7ec6e2084a68f508a8182e9..3cb41d153268d38c2c2ade83187a4a1a2a4081f4 100644 --- a/Framework/CurveFitting/inc/MantidCurveFitting/TableWorkspaceDomainCreator.h +++ b/Framework/CurveFitting/inc/MantidCurveFitting/TableWorkspaceDomainCreator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -16,6 +16,7 @@ #include <boost/weak_ptr.hpp> #include <list> +#include <utility> namespace Mantid { namespace API { @@ -55,7 +56,9 @@ public: /// Set the workspace /// @param ws :: workspace to set. - void setWorkspace(API::ITableWorkspace_sptr ws) { m_tableWorkspace = ws; } + void setWorkspace(API::ITableWorkspace_sptr ws) { + m_tableWorkspace = std::move(ws); + } /// Set the startX and endX /// @param startX :: Start of the domain /// @param endX :: End of the domain @@ -88,7 +91,7 @@ private: /// Set all parameters void setParameters() const; /// Set the names of the X, Y and Error columns - void setXYEColumnNames(API::ITableWorkspace_sptr ws) const; + void setXYEColumnNames(const API::ITableWorkspace_sptr &ws) const; /// Creates the blank output workspace of the correct size boost::shared_ptr<API::MatrixWorkspace> createEmptyResultWS(const size_t nhistograms, const size_t nyvalues); @@ -109,9 +112,9 @@ private: const API::IFunction_sptr &function, boost::shared_ptr<API::MatrixWorkspace> &ws, const size_t wsIndex, const boost::shared_ptr<API::FunctionDomain> &domain, - boost::shared_ptr<API::FunctionValues> resultValues) const; + const boost::shared_ptr<API::FunctionValues> &resultValues) const; /// Check workspace is in the correct form - void setAndValidateWorkspace(API::Workspace_sptr ws) const; + void setAndValidateWorkspace(const API::Workspace_sptr &ws) const; /// Store workspace property name std::string m_workspacePropertyName; diff --git a/Framework/CurveFitting/src/Algorithms/CalculateChiSquared.cpp b/Framework/CurveFitting/src/Algorithms/CalculateChiSquared.cpp index ba855332462c0086e57d6d8548f911c0fefb0cc4..8ae2116ddf0fd541a6e139358727ffb5528a08fc 100644 --- a/Framework/CurveFitting/src/Algorithms/CalculateChiSquared.cpp +++ b/Framework/CurveFitting/src/Algorithms/CalculateChiSquared.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCurveFitting/Algorithms/CalculateChiSquared.h" #include "MantidAPI/Column.h" diff --git a/Framework/CurveFitting/src/Algorithms/CalculateCostFunction.cpp b/Framework/CurveFitting/src/Algorithms/CalculateCostFunction.cpp index 3fd24c1ae4d4967ac3ea22ea43b7fb3596094c1b..6c48e0194c27c5391631c29f9536e689a1da4c93 100644 --- a/Framework/CurveFitting/src/Algorithms/CalculateCostFunction.cpp +++ b/Framework/CurveFitting/src/Algorithms/CalculateCostFunction.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCurveFitting/Algorithms/CalculateCostFunction.h" diff --git a/Framework/CurveFitting/src/Algorithms/ConvertToYSpace.cpp b/Framework/CurveFitting/src/Algorithms/ConvertToYSpace.cpp index 934b8a19e195537c865b0d4127ab8ad8e90d39ae..000abab3054225c78a2c9251891ac0b2745c003d 100644 --- a/Framework/CurveFitting/src/Algorithms/ConvertToYSpace.cpp +++ b/Framework/CurveFitting/src/Algorithms/ConvertToYSpace.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCurveFitting/Algorithms/ConvertToYSpace.h" @@ -304,8 +304,6 @@ void ConvertToYSpace::createOutputWorkspace() { } } -/** - */ void ConvertToYSpace::cacheInstrumentGeometry() { auto inst = m_inputWS->getInstrument(); auto source = inst->getSource(); diff --git a/Framework/CurveFitting/src/Algorithms/ConvolutionFit.cpp b/Framework/CurveFitting/src/Algorithms/ConvolutionFit.cpp index 1a46fb44680bd1e9efbe4fbd8631e8195e319d78..0467eb66c2534f18e08e4f99a6b00cd2efaf9df9 100644 --- a/Framework/CurveFitting/src/Algorithms/ConvolutionFit.cpp +++ b/Framework/CurveFitting/src/Algorithms/ConvolutionFit.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/AlgorithmManager.h" #include "MantidAPI/CompositeFunction.h" @@ -27,16 +27,17 @@ #include <algorithm> #include <cmath> +#include <utility> namespace { using namespace Mantid::API; using namespace Mantid::Kernel; using Mantid::MantidVec; -std::size_t numberOfFunctions(IFunction_sptr function, +std::size_t numberOfFunctions(const IFunction_sptr &function, const std::string &functionName); -std::size_t numberOfFunctions(CompositeFunction_sptr composite, +std::size_t numberOfFunctions(const CompositeFunction_sptr &composite, const std::string &functionName) { std::size_t count = 0; for (auto i = 0u; i < composite->nFunctions(); ++i) @@ -44,7 +45,7 @@ std::size_t numberOfFunctions(CompositeFunction_sptr composite, return count; } -std::size_t numberOfFunctions(IFunction_sptr function, +std::size_t numberOfFunctions(const IFunction_sptr &function, const std::string &functionName) { const auto composite = boost::dynamic_pointer_cast<CompositeFunction>(function); @@ -53,9 +54,10 @@ std::size_t numberOfFunctions(IFunction_sptr function, return function->name() == functionName ? 1 : 0; } -bool containsFunction(IFunction_sptr function, const std::string &functionName); +bool containsFunction(const IFunction_sptr &function, + const std::string &functionName); -bool containsFunction(CompositeFunction_sptr composite, +bool containsFunction(const CompositeFunction_sptr &composite, const std::string &functionName) { for (auto i = 0u; i < composite->nFunctions(); ++i) { if (containsFunction(composite->getFunction(i), functionName)) @@ -64,7 +66,7 @@ bool containsFunction(CompositeFunction_sptr composite, return false; } -bool containsFunction(IFunction_sptr function, +bool containsFunction(const IFunction_sptr &function, const std::string &functionName) { const auto composite = boost::dynamic_pointer_cast<CompositeFunction>(function); @@ -125,7 +127,7 @@ std::vector<T, Ts...> squareRootVector(const std::vector<T, Ts...> &vec) { IFunction_sptr extractFirstBackground(IFunction_sptr function); -IFunction_sptr extractFirstBackground(CompositeFunction_sptr composite) { +IFunction_sptr extractFirstBackground(const CompositeFunction_sptr &composite) { for (auto i = 0u; i < composite->nFunctions(); ++i) { auto background = extractFirstBackground(composite->getFunction(i)); if (background) @@ -145,7 +147,7 @@ IFunction_sptr extractFirstBackground(IFunction_sptr function) { } std::string extractBackgroundType(IFunction_sptr function) { - auto background = extractFirstBackground(function); + auto background = extractFirstBackground(std::move(function)); if (!background) return "None"; @@ -164,7 +166,7 @@ std::string extractBackgroundType(IFunction_sptr function) { std::vector<std::size_t> searchForFitParameters(const std::string &suffix, - ITableWorkspace_sptr tableWorkspace) { + const ITableWorkspace_sptr &tableWorkspace) { auto indices = std::vector<std::size_t>(); for (auto i = 0u; i < tableWorkspace->columnCount(); ++i) { diff --git a/Framework/CurveFitting/src/Algorithms/ConvolveWorkspaces.cpp b/Framework/CurveFitting/src/Algorithms/ConvolveWorkspaces.cpp index d505d3f2c7f45c9bc4144bc4efe60124764c4d42..7e3d94f0330f1eb3ffab60d58c2053907f0210ca 100644 --- a/Framework/CurveFitting/src/Algorithms/ConvolveWorkspaces.cpp +++ b/Framework/CurveFitting/src/Algorithms/ConvolveWorkspaces.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/CurveFitting/src/Algorithms/CrystalFieldEnergies.cpp b/Framework/CurveFitting/src/Algorithms/CrystalFieldEnergies.cpp index bb6662681269493acb27f349d4b852ca79e471ed..df7ea734420870a00a85523d5fb3e7a0bffdaca7 100644 --- a/Framework/CurveFitting/src/Algorithms/CrystalFieldEnergies.cpp +++ b/Framework/CurveFitting/src/Algorithms/CrystalFieldEnergies.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCurveFitting/Algorithms/CrystalFieldEnergies.h" //#include "MantidKernel/ArrayLengthValidator.h" diff --git a/Framework/CurveFitting/src/Algorithms/EstimateFitParameters.cpp b/Framework/CurveFitting/src/Algorithms/EstimateFitParameters.cpp index b320a5dc615f750fa37f41ee68fe72576704e11f..1c9273de67940701987a74ddcff37af9814db1a5 100644 --- a/Framework/CurveFitting/src/Algorithms/EstimateFitParameters.cpp +++ b/Framework/CurveFitting/src/Algorithms/EstimateFitParameters.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCurveFitting/Algorithms/EstimateFitParameters.h" @@ -138,9 +138,8 @@ public: std::vector<GSLVector> getParams() const { std::vector<GSLVector> res; res.reserve(m_params.size()); - for (auto &it : m_params) { - res.emplace_back(it.second); - } + std::transform(m_params.begin(), m_params.end(), std::back_inserter(res), + [](const auto &it) { return it.second; }); return res; } }; @@ -383,12 +382,12 @@ void EstimateFitParameters::execConcrete() { continue; } auto constraint = func->getConstraint(i); - if (constraint == nullptr) { + if (!constraint) { func->fix(i); continue; } auto boundary = dynamic_cast<Constraints::BoundaryConstraint *>(constraint); - if (boundary == nullptr) { + if (!boundary) { throw std::runtime_error("Parameter " + func->parameterName(i) + " must have a boundary constraint. "); } diff --git a/Framework/CurveFitting/src/Algorithms/EstimatePeakErrors.cpp b/Framework/CurveFitting/src/Algorithms/EstimatePeakErrors.cpp index d41a26277948a2a6ec27df5989ac69cafe895180..6a877355610cd870d92d49b448a515f9b6231c15 100644 --- a/Framework/CurveFitting/src/Algorithms/EstimatePeakErrors.cpp +++ b/Framework/CurveFitting/src/Algorithms/EstimatePeakErrors.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCurveFitting/Algorithms/EstimatePeakErrors.h" #include "MantidCurveFitting/Functions/PeakParameterFunction.h" @@ -91,7 +91,7 @@ GSLMatrix makeJacobian(IPeakFunction &peak, double ¢re, double &height, /// @param covariance :: The covariance matrix for the parameters of the peak. /// @param prefix :: A prefix for the parameter names. void calculatePeakValues(IPeakFunction &peak, ITableWorkspace &results, - const GSLMatrix covariance, + const GSLMatrix &covariance, const std::string &prefix) { double centre, height, fwhm, intensity; GSLMatrix J = makeJacobian(peak, centre, height, fwhm, intensity); diff --git a/Framework/CurveFitting/src/Algorithms/EvaluateFunction.cpp b/Framework/CurveFitting/src/Algorithms/EvaluateFunction.cpp index 5c93fef0c16e6ea61203fb20c5b11b1693f09d49..d452167ae4525ad8c54114ac6f45a7a63fd38f45 100644 --- a/Framework/CurveFitting/src/Algorithms/EvaluateFunction.cpp +++ b/Framework/CurveFitting/src/Algorithms/EvaluateFunction.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCurveFitting/Algorithms/EvaluateFunction.h" #include "MantidAPI/MatrixWorkspace.h" diff --git a/Framework/CurveFitting/src/Algorithms/Fit.cpp b/Framework/CurveFitting/src/Algorithms/Fit.cpp index ae794a48cf3d89d7011baa63225b7b0ec3a2d405..e97b8e98ae6bd95b6f2338e7df9b6878ac29946d 100644 --- a/Framework/CurveFitting/src/Algorithms/Fit.cpp +++ b/Framework/CurveFitting/src/Algorithms/Fit.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/CurveFitting/src/Algorithms/Fit1D.cpp b/Framework/CurveFitting/src/Algorithms/Fit1D.cpp index 1c2613579d45bdd75f0003e4a23b6d0e3ac272a3..c694a3deec499ec3fc1b3dbc06e176ba8cab3b16 100644 --- a/Framework/CurveFitting/src/Algorithms/Fit1D.cpp +++ b/Framework/CurveFitting/src/Algorithms/Fit1D.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/CurveFitting/src/Algorithms/FitPowderDiffPeaks.cpp b/Framework/CurveFitting/src/Algorithms/FitPowderDiffPeaks.cpp index 62cafb6331bdeb001193e9d5db7bb81515cdd056..06bd9665443a40cf43cff10463e9ddb680d4d365 100644 --- a/Framework/CurveFitting/src/Algorithms/FitPowderDiffPeaks.cpp +++ b/Framework/CurveFitting/src/Algorithms/FitPowderDiffPeaks.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCurveFitting/Algorithms/FitPowderDiffPeaks.h" @@ -36,6 +36,8 @@ #include <fstream> #include <cmath> +#include <utility> + #include <gsl/gsl_sf_erf.h> /// Factor on FWHM for fitting a peak @@ -520,11 +522,10 @@ void FitPowderDiffPeaks::fitPeaksRobust() { /** Observe peak range with hint from right peak's properties * Assumption: the background is reasonably flat within peak range */ -void FitPowderDiffPeaks::observePeakRange(BackToBackExponential_sptr thispeak, - BackToBackExponential_sptr rightpeak, - double refpeakshift, - double &peakleftbound, - double &peakrightbound) { +void FitPowderDiffPeaks::observePeakRange( + const BackToBackExponential_sptr &thispeak, + const BackToBackExponential_sptr &rightpeak, double refpeakshift, + double &peakleftbound, double &peakrightbound) { double predictcentre = thispeak->centre(); double rightfwhm = rightpeak->fwhm(); @@ -607,9 +608,10 @@ void FitPowderDiffPeaks::observePeakRange(BackToBackExponential_sptr thispeak, * Return: chi2 ... all the other parameter should be just in peak */ bool FitPowderDiffPeaks::fitSinglePeakRobust( - BackToBackExponential_sptr peak, BackgroundFunction_sptr backgroundfunction, - double peakleftbound, double peakrightbound, - map<string, double> rightpeakparammap, double &finalchi2) { + const BackToBackExponential_sptr &peak, + const BackgroundFunction_sptr &backgroundfunction, double peakleftbound, + double peakrightbound, const map<string, double> &rightpeakparammap, + double &finalchi2) { // 1. Build partial workspace Workspace2D_sptr peakws = buildPartialWorkspace(m_dataWS, m_wsIndex, peakleftbound, peakrightbound); @@ -836,8 +838,9 @@ bool FitPowderDiffPeaks::fitSinglePeakRobust( * Note 1: in a limited range (4*FWHM) */ bool FitPowderDiffPeaks::doFit1PeakBackground( - Workspace2D_sptr dataws, size_t wsindex, BackToBackExponential_sptr peak, - BackgroundFunction_sptr backgroundfunction, double &chi2) { + const Workspace2D_sptr &dataws, size_t wsindex, + const BackToBackExponential_sptr &peak, + const BackgroundFunction_sptr &backgroundfunction, double &chi2) { // 0. Set fit parameters string minimzername("Levenberg-MarquardtMD"); double startx = peak->centre() - 3.0 * peak->fwhm(); @@ -904,7 +907,7 @@ bool FitPowderDiffPeaks::doFit1PeakBackground( /** Fit signle peak by Monte Carlo/simulated annealing */ bool FitPowderDiffPeaks::fitSinglePeakSimulatedAnnealing( - BackToBackExponential_sptr peak, vector<string> paramtodomc) { + const BackToBackExponential_sptr &peak, const vector<string> ¶mtodomc) { UNUSED_ARG(peak); UNUSED_ARG(paramtodomc); throw runtime_error("To Be Implemented Soon!"); @@ -1218,8 +1221,9 @@ void FitPowderDiffPeaks::fitPeaksWithGoodStartingValues() { * @param annhilatedpeak :: (output) annhilatedpeak */ bool FitPowderDiffPeaks::fitSinglePeakConfident( - BackToBackExponential_sptr peak, BackgroundFunction_sptr backgroundfunction, - double leftbound, double rightbound, double &chi2, bool &annhilatedpeak) { + const BackToBackExponential_sptr &peak, + const BackgroundFunction_sptr &backgroundfunction, double leftbound, + double rightbound, double &chi2, bool &annhilatedpeak) { // 1. Build the partial workspace // a) Determine boundary if necessary if (leftbound < 0 || leftbound >= peak->centre()) @@ -1518,8 +1522,8 @@ void FitPowderDiffPeaks::calculatePeakFitBoundary(size_t ileftpeak, *negative, then no constraint */ std::pair<bool, double> -FitPowderDiffPeaks::doFitPeak(Workspace2D_sptr dataws, - BackToBackExponential_sptr peakfunction, +FitPowderDiffPeaks::doFitPeak(const Workspace2D_sptr &dataws, + const BackToBackExponential_sptr &peakfunction, double guessedfwhm) { // 1. Set up boundary if (guessedfwhm > 0) { @@ -1624,7 +1628,7 @@ FitPowderDiffPeaks::doFitPeak(Workspace2D_sptr dataws, /** Store the function's parameter values to a map */ void FitPowderDiffPeaks::storeFunctionParameters( - IFunction_sptr function, std::map<string, double> ¶mmaps) { + const IFunction_sptr &function, std::map<string, double> ¶mmaps) { vector<string> paramnames = function->getParameterNames(); parammaps.clear(); for (auto ¶mname : paramnames) @@ -1635,7 +1639,7 @@ void FitPowderDiffPeaks::storeFunctionParameters( /** Restore the function's parameter values from a map */ void FitPowderDiffPeaks::restoreFunctionParameters( - IFunction_sptr function, map<string, double> parammap) { + const IFunction_sptr &function, map<string, double> parammap) { vector<string> paramnames = function->getParameterNames(); for (auto &parname : paramnames) { auto miter = parammap.find(parname); @@ -1658,8 +1662,8 @@ void FitPowderDiffPeaks::restoreFunctionParameters( * 2. chi2 */ bool FitPowderDiffPeaks::doFit1PeakSimple( - Workspace2D_sptr dataws, size_t workspaceindex, - BackToBackExponential_sptr peakfunction, string minimzername, + const Workspace2D_sptr &dataws, size_t workspaceindex, + const BackToBackExponential_sptr &peakfunction, const string &minimzername, size_t maxiteration, double &chi2) { stringstream dbss; dbss << peakfunction->asString() << '\n'; @@ -1728,9 +1732,10 @@ bool FitPowderDiffPeaks::doFit1PeakSimple( * @param chi2 :: The chi squared value (output) */ bool FitPowderDiffPeaks::doFit1PeakSequential( - Workspace2D_sptr dataws, size_t workspaceindex, - BackToBackExponential_sptr peakfunction, vector<string> minimzernames, - vector<size_t> maxiterations, vector<double> dampfactors, double &chi2) { + const Workspace2D_sptr &dataws, size_t workspaceindex, + const BackToBackExponential_sptr &peakfunction, + vector<string> minimzernames, vector<size_t> maxiterations, + const vector<double> &dampfactors, double &chi2) { // 1. Check if (minimzernames.size() != maxiterations.size() && minimzernames.size() != dampfactors.size()) { @@ -1789,11 +1794,10 @@ bool FitPowderDiffPeaks::doFit1PeakSequential( //---------------------------------------------------------------------------- /** Fit background-removed peak by Gaussian */ -bool FitPowderDiffPeaks::doFitGaussianPeak(DataObjects::Workspace2D_sptr dataws, - size_t workspaceindex, - double in_center, double leftfwhm, - double rightfwhm, double ¢er, - double &sigma, double &height) { +bool FitPowderDiffPeaks::doFitGaussianPeak( + const DataObjects::Workspace2D_sptr &dataws, size_t workspaceindex, + double in_center, double leftfwhm, double rightfwhm, double ¢er, + double &sigma, double &height) { // 1. Estimate const auto &X = dataws->x(workspaceindex); const auto &Y = dataws->y(workspaceindex); @@ -1873,7 +1877,7 @@ bool FitPowderDiffPeaks::doFitGaussianPeak(DataObjects::Workspace2D_sptr dataws, */ bool FitPowderDiffPeaks::fitOverlappedPeaks( vector<BackToBackExponential_sptr> peaks, - BackgroundFunction_sptr backgroundfunction, double gfwhm) { + const BackgroundFunction_sptr &backgroundfunction, double gfwhm) { // 1. Sort peak if necessary vector<pair<double, BackToBackExponential_sptr>> tofpeakpairs(peaks.size()); for (size_t i = 0; i < peaks.size(); ++i) @@ -1951,7 +1955,8 @@ bool FitPowderDiffPeaks::fitOverlappedPeaks( /** Fit multiple (overlapped) peaks */ bool FitPowderDiffPeaks::doFitMultiplePeaks( - Workspace2D_sptr dataws, size_t wsindex, CompositeFunction_sptr peaksfunc, + const Workspace2D_sptr &dataws, size_t wsindex, + const CompositeFunction_sptr &peaksfunc, vector<BackToBackExponential_sptr> peakfuncs, vector<bool> &vecfitgood, vector<double> &vecchi2s) { // 0. Pre-debug output @@ -2062,7 +2067,7 @@ bool FitPowderDiffPeaks::doFitMultiplePeaks( * @param peaks :: A vector of instances of BackToBackExponential function */ void FitPowderDiffPeaks::estimatePeakHeightsLeBail( - Workspace2D_sptr dataws, size_t wsindex, + const Workspace2D_sptr &dataws, size_t wsindex, vector<BackToBackExponential_sptr> peaks) { // 1. Build data structures FunctionDomain1DVector domain(dataws->x(wsindex).rawData()); @@ -2110,7 +2115,7 @@ void FitPowderDiffPeaks::estimatePeakHeightsLeBail( /** Set constraints on a group of overlapped peaks for fitting */ void FitPowderDiffPeaks::setOverlappedPeaksConstraints( - vector<BackToBackExponential_sptr> peaks) { + const vector<BackToBackExponential_sptr> &peaks) { for (const auto &thispeak : peaks) { // 1. Set constraint on X. double fwhm = thispeak->fwhm(); @@ -2128,9 +2133,10 @@ void FitPowderDiffPeaks::setOverlappedPeaksConstraints( /** Fit N overlapped peaks in a simple manner */ bool FitPowderDiffPeaks::doFitNPeaksSimple( - Workspace2D_sptr dataws, size_t wsindex, CompositeFunction_sptr peaksfunc, - vector<BackToBackExponential_sptr> peakfuncs, string minimizername, - size_t maxiteration, double &chi2) { + const Workspace2D_sptr &dataws, size_t wsindex, + const CompositeFunction_sptr &peaksfunc, + const vector<BackToBackExponential_sptr> &peakfuncs, + const string &minimizername, size_t maxiteration, double &chi2) { // 1. Debug output stringstream dbss0; dbss0 << "Starting Value: "; @@ -2190,8 +2196,9 @@ bool FitPowderDiffPeaks::doFitNPeaksSimple( //---------------------------------------------------------------------------------------------- /** Parse fit result */ -std::string FitPowderDiffPeaks::parseFitResult(API::IAlgorithm_sptr fitalg, - double &chi2, bool &fitsuccess) { +std::string +FitPowderDiffPeaks::parseFitResult(const API::IAlgorithm_sptr &fitalg, + double &chi2, bool &fitsuccess) { stringstream rss; chi2 = fitalg->getProperty("OutputChi2overDoF"); @@ -2209,7 +2216,7 @@ std::string FitPowderDiffPeaks::parseFitResult(API::IAlgorithm_sptr fitalg, /** Parse parameter workspace returned from Fit() */ std::string FitPowderDiffPeaks::parseFitParameterWorkspace( - API::ITableWorkspace_sptr paramws) { + const API::ITableWorkspace_sptr ¶mws) { // 1. Check if (!paramws) { g_log.warning() << "Input table workspace is NULL. \n"; @@ -2239,7 +2246,7 @@ std::string FitPowderDiffPeaks::parseFitParameterWorkspace( * the diffrotometer geometry parameters */ void FitPowderDiffPeaks::importInstrumentParameterFromTable( - DataObjects::TableWorkspace_sptr parameterWS) { + const DataObjects::TableWorkspace_sptr ¶meterWS) { // 1. Check column orders std::vector<std::string> colnames = parameterWS->getColumnNames(); if (colnames.size() < 2) { @@ -2284,7 +2291,7 @@ void FitPowderDiffPeaks::importInstrumentParameterFromTable( /** Import Bragg peak table workspace */ void FitPowderDiffPeaks::parseBraggPeakTable( - TableWorkspace_sptr peakws, vector<map<string, double>> ¶mmaps, + const TableWorkspace_sptr &peakws, vector<map<string, double>> ¶mmaps, vector<map<string, int>> &hklmaps) { // 1. Get columns' types and names vector<string> paramnames = peakws->getColumnNames(); @@ -2584,7 +2591,8 @@ FitPowderDiffPeaks::genPeakParametersWorkspace() { * Each peak within requirement will put into both (1) m_peaks and (2) * m_peaksmap */ -void FitPowderDiffPeaks::genPeaksFromTable(TableWorkspace_sptr peakparamws) { +void FitPowderDiffPeaks::genPeaksFromTable( + const TableWorkspace_sptr &peakparamws) { // Check and clear input and output if (!peakparamws) { stringstream errss; @@ -2729,7 +2737,7 @@ FitPowderDiffPeaks::genPeak(map<string, int> hklmap, newpeakptr->initialize(); // Check miller index (HKL) is a valid value in a miller indexes pool (hklmap) - good = getHKLFromMap(hklmap, hkl); + good = getHKLFromMap(std::move(hklmap), hkl); if (!good) { // Ignore and return return newpeakptr; @@ -2909,9 +2917,9 @@ FitPowderDiffPeaks::genPeak(map<string, int> hklmap, * @param peakfunction: function to plot * @param background: background of the peak */ -void FitPowderDiffPeaks::plotFunction(IFunction_sptr peakfunction, - BackgroundFunction_sptr background, - FunctionDomain1DVector domain) { +void FitPowderDiffPeaks::plotFunction(const IFunction_sptr &peakfunction, + const BackgroundFunction_sptr &background, + const FunctionDomain1DVector &domain) { // 1. Determine range const auto &vecX = m_dataWS->x(m_wsIndex); double x0 = domain[0]; @@ -3010,7 +3018,7 @@ void FitPowderDiffPeaks::cropWorkspace(double tofmin, double tofmax) { * Exception: throw runtime error if there is no such parameter * @param parname: parameter name to get from m_instrumentParameters */ -double FitPowderDiffPeaks::getParameter(string parname) { +double FitPowderDiffPeaks::getParameter(const string &parname) { map<string, double>::iterator mapiter; mapiter = m_instrumentParmaeters.find(parname); @@ -3033,10 +3041,9 @@ double FitPowderDiffPeaks::getParameter(string parname) { * @param leftbound: lower boundary of the source data * @param rightbound: upper boundary of the source data */ -Workspace2D_sptr -FitPowderDiffPeaks::buildPartialWorkspace(API::MatrixWorkspace_sptr sourcews, - size_t workspaceindex, - double leftbound, double rightbound) { +Workspace2D_sptr FitPowderDiffPeaks::buildPartialWorkspace( + const API::MatrixWorkspace_sptr &sourcews, size_t workspaceindex, + double leftbound, double rightbound) { // 1. Check const auto &X = sourcews->x(workspaceindex); const auto &Y = sourcews->y(workspaceindex); @@ -3093,7 +3100,7 @@ FitPowderDiffPeaks::buildPartialWorkspace(API::MatrixWorkspace_sptr sourcews, /** Get function parameter values information and returned as a string * @param function: function to have information written out */ -string getFunctionInfo(IFunction_sptr function) { +string getFunctionInfo(const IFunction_sptr &function) { stringstream outss; vector<string> parnames = function->getParameterNames(); size_t numpars = parnames.size(); @@ -3117,8 +3124,8 @@ string getFunctionInfo(IFunction_sptr function) { * @param wsindexpeak: workspace index of spectrum holding pure peak data (with * background removed) */ -void estimateBackgroundCoarse(DataObjects::Workspace2D_sptr dataws, - BackgroundFunction_sptr background, +void estimateBackgroundCoarse(const DataObjects::Workspace2D_sptr &dataws, + const BackgroundFunction_sptr &background, size_t wsindexraw, size_t wsindexbkgd, size_t wsindexpeak) { // 1. Get prepared @@ -3192,7 +3199,7 @@ void estimateBackgroundCoarse(DataObjects::Workspace2D_sptr dataws, * @param fwhm :: (output) peak FWHM * @param errmsg :: (output) error message */ -bool observePeakParameters(Workspace2D_sptr dataws, size_t wsindex, +bool observePeakParameters(const Workspace2D_sptr &dataws, size_t wsindex, double ¢re, double &height, double &fwhm, string &errmsg) { // 1. Get the value of the Max Height @@ -3306,7 +3313,7 @@ size_t findMaxValue(const std::vector<double> &Y) { * @param rightbound :: upper constraint for check * @return the index of the maximum value */ -size_t findMaxValue(MatrixWorkspace_sptr dataws, size_t wsindex, +size_t findMaxValue(const MatrixWorkspace_sptr &dataws, size_t wsindex, double leftbound, double rightbound) { const auto &X = dataws->x(wsindex); const auto &Y = dataws->y(wsindex); diff --git a/Framework/CurveFitting/src/Algorithms/IqtFit.cpp b/Framework/CurveFitting/src/Algorithms/IqtFit.cpp index c1f04ea7493be7e9ca683802b0d9c7db2b272b4a..698f4868b3f1f330b45f6a417e6cf8bba1fff3d3 100644 --- a/Framework/CurveFitting/src/Algorithms/IqtFit.cpp +++ b/Framework/CurveFitting/src/Algorithms/IqtFit.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/AlgorithmManager.h" @@ -17,7 +17,7 @@ using namespace Mantid::API; namespace { Mantid::Kernel::Logger g_log("IqtFit"); -MatrixWorkspace_sptr cropWorkspace(MatrixWorkspace_sptr workspace, +MatrixWorkspace_sptr cropWorkspace(const MatrixWorkspace_sptr &workspace, double startX, double endX) { auto cropper = AlgorithmManager::Instance().create("CropWorkspace"); cropper->setLogging(false); @@ -30,7 +30,7 @@ MatrixWorkspace_sptr cropWorkspace(MatrixWorkspace_sptr workspace, return cropper->getProperty("OutputWorkspace"); } -MatrixWorkspace_sptr convertToHistogram(MatrixWorkspace_sptr workspace) { +MatrixWorkspace_sptr convertToHistogram(const MatrixWorkspace_sptr &workspace) { auto converter = AlgorithmManager::Instance().create("ConvertToHistogram"); converter->setLogging(false); converter->setAlwaysStoreInADS(false); @@ -43,8 +43,8 @@ MatrixWorkspace_sptr convertToHistogram(MatrixWorkspace_sptr workspace) { struct HistogramConverter { explicit HistogramConverter() : m_converted() {} - MatrixWorkspace_sptr operator()(MatrixWorkspace_sptr workspace, double startX, - double endX) const { + MatrixWorkspace_sptr operator()(const MatrixWorkspace_sptr &workspace, + double startX, double endX) const { auto it = m_converted.find(workspace.get()); if (it != m_converted.end()) return it->second; diff --git a/Framework/CurveFitting/src/Algorithms/LeBailFit.cpp b/Framework/CurveFitting/src/Algorithms/LeBailFit.cpp index 272f1584d948bb7eb85f68998957c478cbd15151..38b2f5b3f91c4788d2956868534211255cff763c 100644 --- a/Framework/CurveFitting/src/Algorithms/LeBailFit.cpp +++ b/Framework/CurveFitting/src/Algorithms/LeBailFit.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCurveFitting/Algorithms/LeBailFit.h" #include "MantidAPI/FuncMinimizerFactory.h" @@ -763,7 +763,8 @@ void LeBailFit::createLeBailFunction() { * @param wsindex: workspace index of the data to fit against */ API::MatrixWorkspace_sptr -LeBailFit::cropWorkspace(API::MatrixWorkspace_sptr inpws, size_t wsindex) { +LeBailFit::cropWorkspace(const API::MatrixWorkspace_sptr &inpws, + size_t wsindex) { // Process input property 'FitRegion' for range of data to fit/calculate std::vector<double> fitrange = this->getProperty("FitRegion"); @@ -1143,9 +1144,9 @@ void LeBailFit::parseBraggPeaksParametersTable() { /** Parse table workspace (from Fit()) containing background parameters to a * vector */ -void LeBailFit::parseBackgroundTableWorkspace(TableWorkspace_sptr bkgdparamws, - vector<string> &bkgdparnames, - vector<double> &bkgdorderparams) { +void LeBailFit::parseBackgroundTableWorkspace( + const TableWorkspace_sptr &bkgdparamws, vector<string> &bkgdparnames, + vector<double> &bkgdorderparams) { g_log.debug() << "DB1105A Parsing background TableWorkspace.\n"; // Clear (output) map @@ -1746,7 +1747,7 @@ void LeBailFit::doMarkovChain( * @param tablews :: TableWorkspace containing the Monte Carlo setup */ void LeBailFit::setupRandomWalkStrategyFromTable( - DataObjects::TableWorkspace_sptr tablews) { + const DataObjects::TableWorkspace_sptr &tablews) { g_log.information("Set up random walk strategy from table."); // Scan the table @@ -1941,7 +1942,7 @@ void LeBailFit::setupBuiltInRandomWalkStrategy() { *list */ void LeBailFit::addParameterToMCMinimize(vector<string> &parnamesforMC, - string parname) { + const string &parname) { map<string, Parameter>::iterator pariter; pariter = m_funcParameters.find(parname); if (pariter == m_funcParameters.end()) { @@ -2094,7 +2095,7 @@ bool LeBailFit::calculateDiffractionPattern(const HistogramX &vecX, *proposed new values in * this group */ -bool LeBailFit::proposeNewValues(vector<string> mcgroup, Rfactor r, +bool LeBailFit::proposeNewValues(const vector<string> &mcgroup, Rfactor r, map<string, Parameter> &curparammap, map<string, Parameter> &newparammap, bool prevBetterRwp) { @@ -2414,7 +2415,7 @@ LeBailFit::convertToDoubleMap(std::map<std::string, Parameter> &inmap) { /** Write a set of (XY) data to a column file */ void writeRfactorsToFile(vector<double> vecX, vector<Rfactor> vecR, - string filename) { + const string &filename) { ofstream ofile; ofile.open(filename.c_str()); diff --git a/Framework/CurveFitting/src/Algorithms/LeBailFunction.cpp b/Framework/CurveFitting/src/Algorithms/LeBailFunction.cpp index 4be1667ddefc580ed771927b674fc74e7d406bdf..8488fa549072ed1db630d781f2cc06a21f717be7 100644 --- a/Framework/CurveFitting/src/Algorithms/LeBailFunction.cpp +++ b/Framework/CurveFitting/src/Algorithms/LeBailFunction.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCurveFitting/Algorithms/LeBailFunction.h" #include "MantidAPI/Algorithm.h" @@ -14,6 +14,7 @@ #include "MantidKernel/System.h" #include <sstream> +#include <utility> #include <gsl/gsl_sf_erf.h> @@ -42,7 +43,7 @@ Kernel::Logger g_log("LeBailFunction"); //---------------------------------------------------------------------------------------------- /** Constructor */ -LeBailFunction::LeBailFunction(std::string peaktype) { +LeBailFunction::LeBailFunction(const std::string &peaktype) { // Set initial values to some class variables CompositeFunction_sptr m_function(new CompositeFunction()); m_compsiteFunction = m_function; @@ -169,7 +170,7 @@ HistogramY LeBailFunction::calPeak(size_t ipk, /** Check whether a parameter is a profile parameter * @param paramname :: parameter name to check with */ -bool LeBailFunction::hasProfileParameter(std::string paramname) { +bool LeBailFunction::hasProfileParameter(const std::string ¶mname) { auto fiter = lower_bound(m_orderedProfileParameterNames.cbegin(), m_orderedProfileParameterNames.cend(), paramname); @@ -619,8 +620,8 @@ bool LeBailFunction::calculateGroupPeakIntensities( * @param peakheight: height of the peak * @param setpeakheight: boolean as the option to set peak height or not. */ -void LeBailFunction::setPeakParameters(IPowderDiffPeakFunction_sptr peak, - map<string, double> parammap, +void LeBailFunction::setPeakParameters(const IPowderDiffPeakFunction_sptr &peak, + const map<string, double> ¶mmap, double peakheight, bool setpeakheight) { UNUSED_ARG(peak); UNUSED_ARG(parammap); @@ -855,7 +856,7 @@ void LeBailFunction::groupPeaks( * @param endx :: background's EndX. Used by Chebyshev */ void LeBailFunction::addBackgroundFunction( - string backgroundtype, const unsigned int &order, + const string &backgroundtype, const unsigned int &order, const std::vector<std::string> &vecparnames, const std::vector<double> &vecparvalues, double startx, double endx) { // Check @@ -911,8 +912,8 @@ void LeBailFunction::addBackgroundFunction( * @param minvalue :: lower boundary * @param maxvalue :: upper boundary */ -void LeBailFunction::setFitProfileParameter(string paramname, double minvalue, - double maxvalue) { +void LeBailFunction::setFitProfileParameter(const string ¶mname, + double minvalue, double maxvalue) { // Make ties in composition function for (size_t ipk = 1; ipk < m_numPeaks; ++ipk) { stringstream ss1, ss2; @@ -939,7 +940,8 @@ void LeBailFunction::setFitProfileParameter(string paramname, double minvalue, * @param paramname :: name of parameter * @param paramvalue :: value of parameter to be fixed to */ -void LeBailFunction::fixPeakParameter(string paramname, double paramvalue) { +void LeBailFunction::fixPeakParameter(const string ¶mname, + double paramvalue) { for (size_t ipk = 0; ipk < m_numPeaks; ++ipk) { stringstream ss1, ss2; ss1 << "f" << ipk << "." << paramname; @@ -987,7 +989,7 @@ void LeBailFunction::setFixPeakHeights() { /** Reset all peaks' height * @param inheights :: list of peak heights corresponding to each peak */ -void LeBailFunction::setPeakHeights(std::vector<double> inheights) { +void LeBailFunction::setPeakHeights(const std::vector<double> &inheights) { UNUSED_ARG(inheights); throw runtime_error("It is not implemented properly."); /* @@ -1026,7 +1028,7 @@ IPowderDiffPeakFunction_sptr LeBailFunction::getPeak(size_t peakindex) { /** Get value of one specific peak's parameter */ double LeBailFunction::getPeakParameter(std::vector<int> hkl, - std::string parname) const { + const std::string &parname) const { // Search peak in map map<vector<int>, IPowderDiffPeakFunction_sptr>::const_iterator fiter; fiter = m_mapHKLPeak.find(hkl); @@ -1040,7 +1042,7 @@ double LeBailFunction::getPeakParameter(std::vector<int> hkl, IPowderDiffPeakFunction_sptr peak = fiter->second; - double parvalue = getPeakParameterValue(peak, parname); + double parvalue = getPeakParameterValue(peak, std::move(parname)); return parvalue; } @@ -1049,7 +1051,7 @@ double LeBailFunction::getPeakParameter(std::vector<int> hkl, /** Get value of one specific peak's parameter */ double LeBailFunction::getPeakParameter(size_t index, - std::string parname) const { + const std::string &parname) const { if (index >= m_numPeaks) { stringstream errss; errss << "getPeakParameter() tries to reach a peak with index " << index @@ -1060,7 +1062,7 @@ double LeBailFunction::getPeakParameter(size_t index, } IPowderDiffPeakFunction_sptr peak = m_vecPeaks[index]; - double value = getPeakParameterValue(peak, parname); + double value = getPeakParameterValue(peak, std::move(parname)); return value; } @@ -1070,9 +1072,9 @@ double LeBailFunction::getPeakParameter(size_t index, * @param peak :: shared pointer to peak function * @param parname :: name of the peak parameter */ -double -LeBailFunction::getPeakParameterValue(API::IPowderDiffPeakFunction_sptr peak, - std::string parname) const { +double LeBailFunction::getPeakParameterValue( + const API::IPowderDiffPeakFunction_sptr &peak, + const std::string &parname) const { // Locate the category of the parameter name auto vsiter = lower_bound(m_orderedProfileParameterNames.cbegin(), m_orderedProfileParameterNames.cend(), parname); diff --git a/Framework/CurveFitting/src/Algorithms/NormaliseByPeakArea.cpp b/Framework/CurveFitting/src/Algorithms/NormaliseByPeakArea.cpp index e4a5b40745879f5cb4d2ce37a73bbfc69c8d3861..9b2f8eeeb6aefa99bdc1b036d2ca04acf7d158c9 100644 --- a/Framework/CurveFitting/src/Algorithms/NormaliseByPeakArea.cpp +++ b/Framework/CurveFitting/src/Algorithms/NormaliseByPeakArea.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCurveFitting/Algorithms/NormaliseByPeakArea.h" diff --git a/Framework/CurveFitting/src/Algorithms/PawleyFit.cpp b/Framework/CurveFitting/src/Algorithms/PawleyFit.cpp index d141bc8432839733174c7f1708758432dd9b5017..a8f58722e5f6b6ef570d7cb5b9d6eb3bb00e0990 100644 --- a/Framework/CurveFitting/src/Algorithms/PawleyFit.cpp +++ b/Framework/CurveFitting/src/Algorithms/PawleyFit.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCurveFitting/Algorithms/PawleyFit.h" diff --git a/Framework/CurveFitting/src/Algorithms/PlotPeakByLogValue.cpp b/Framework/CurveFitting/src/Algorithms/PlotPeakByLogValue.cpp index 053dd2a0e2d297d21a9da92c415080cfa2b82d27..d051738dae1ea455805dea2a0b51e4fddb5c937e 100644 --- a/Framework/CurveFitting/src/Algorithms/PlotPeakByLogValue.cpp +++ b/Framework/CurveFitting/src/Algorithms/PlotPeakByLogValue.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/StringTokenizer.h" #include <algorithm> @@ -431,7 +431,7 @@ boost::shared_ptr<Algorithm> PlotPeakByLogValue::runSingleFit( return fit; } -double PlotPeakByLogValue::calculateLogValue(std::string logName, +double PlotPeakByLogValue::calculateLogValue(const std::string &logName, const InputSpectraToFit &data) { double logValue = 0; if (logName.empty() || logName == "axis-1") { @@ -457,7 +457,7 @@ double PlotPeakByLogValue::calculateLogValue(std::string logName, return logValue; } -void PlotPeakByLogValue::setWorkspaceIndexAttribute(IFunction_sptr fun, +void PlotPeakByLogValue::setWorkspaceIndexAttribute(const IFunction_sptr &fun, int wsIndex) const { const std::string attName = "WorkspaceIndex"; if (fun->hasAttribute(attName)) { diff --git a/Framework/CurveFitting/src/Algorithms/PlotPeakByLogValueHelper.cpp b/Framework/CurveFitting/src/Algorithms/PlotPeakByLogValueHelper.cpp index af3c6e10144c7bba86321f5b4b21da8dd75f398c..3e92ea95565d37ae9b5bbf56f36b51fda612e20e 100644 --- a/Framework/CurveFitting/src/Algorithms/PlotPeakByLogValueHelper.cpp +++ b/Framework/CurveFitting/src/Algorithms/PlotPeakByLogValueHelper.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCurveFitting/Algorithms/PlotPeakByLogValueHelper.h" #include "MantidAPI/AnalysisDataService.h" @@ -85,8 +85,8 @@ void addMatrixworkspace( const boost::optional<API::Workspace_sptr> &workspaceOptional, const boost::shared_ptr<API::MatrixWorkspace> &wsMatrix); /// Create a list of input workspace names -std::vector<InputSpectraToFit> makeNames(std::string inputList, int default_wi, - int default_spec) { +std::vector<InputSpectraToFit> makeNames(const std::string &inputList, + int default_wi, int default_spec) { std::vector<InputSpectraToFit> nameList; double start = 0; @@ -212,7 +212,6 @@ std::vector<int> getWorkspaceIndicesFromAxes(API::MatrixWorkspace &ws, } } } else { // numeric axis - spectrumNumber = SpecialIndex::NOT_SET; if (workspaceIndex >= 0) { out.clear(); } else { diff --git a/Framework/CurveFitting/src/Algorithms/QENSFitSequential.cpp b/Framework/CurveFitting/src/Algorithms/QENSFitSequential.cpp index 1c624eee9c5c1bdc32cac4b310fe9a716a1d28a0..2e901f05f84296d1921ab532c09759670abc5759 100644 --- a/Framework/CurveFitting/src/Algorithms/QENSFitSequential.cpp +++ b/Framework/CurveFitting/src/Algorithms/QENSFitSequential.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCurveFitting/Algorithms/QENSFitSequential.h" @@ -24,6 +24,7 @@ #include <sstream> #include <stdexcept> #include <unordered_map> +#include <utility> namespace { using namespace Mantid::API; @@ -39,8 +40,9 @@ MatrixWorkspace_sptr getADSMatrixWorkspace(const std::string &workspaceName) { workspaceName); } -MatrixWorkspace_sptr convertSpectrumAxis(MatrixWorkspace_sptr inputWorkspace, - const std::string &outputName) { +MatrixWorkspace_sptr +convertSpectrumAxis(const MatrixWorkspace_sptr &inputWorkspace, + const std::string &outputName) { auto convSpec = AlgorithmManager::Instance().create("ConvertSpectrumAxis"); convSpec->setLogging(false); convSpec->setProperty("InputWorkspace", inputWorkspace); @@ -53,16 +55,16 @@ MatrixWorkspace_sptr convertSpectrumAxis(MatrixWorkspace_sptr inputWorkspace, return getADSMatrixWorkspace(outputName); } -MatrixWorkspace_sptr cloneWorkspace(MatrixWorkspace_sptr inputWorkspace, +MatrixWorkspace_sptr cloneWorkspace(const MatrixWorkspace_sptr &inputWorkspace, const std::string &outputName) { Workspace_sptr workspace = inputWorkspace->clone(); AnalysisDataService::Instance().addOrReplace(outputName, workspace); return boost::dynamic_pointer_cast<MatrixWorkspace>(workspace); } -MatrixWorkspace_sptr convertToElasticQ(MatrixWorkspace_sptr inputWorkspace, - const std::string &outputName, - bool doThrow) { +MatrixWorkspace_sptr +convertToElasticQ(const MatrixWorkspace_sptr &inputWorkspace, + const std::string &outputName, bool doThrow) { auto axis = inputWorkspace->getAxis(1); if (axis->isSpectra()) return convertSpectrumAxis(inputWorkspace, outputName); @@ -80,8 +82,8 @@ struct ElasticQAppender { explicit ElasticQAppender(std::vector<MatrixWorkspace_sptr> &elasticInput) : m_elasticInput(elasticInput), m_converted() {} - void operator()(MatrixWorkspace_sptr workspace, const std::string &outputBase, - bool doThrow) { + void operator()(const MatrixWorkspace_sptr &workspace, + const std::string &outputBase, bool doThrow) { auto it = m_converted.find(workspace.get()); if (it != m_converted.end()) m_elasticInput.emplace_back(it->second); @@ -111,13 +113,13 @@ convertToElasticQ(const std::vector<MatrixWorkspace_sptr> &workspaces, return elasticInput; } -void extractFunctionNames(CompositeFunction_sptr composite, +void extractFunctionNames(const CompositeFunction_sptr &composite, std::vector<std::string> &names) { for (auto i = 0u; i < composite->nFunctions(); ++i) names.emplace_back(composite->getFunction(i)->name()); } -void extractFunctionNames(IFunction_sptr function, +void extractFunctionNames(const IFunction_sptr &function, std::vector<std::string> &names) { auto composite = boost::dynamic_pointer_cast<CompositeFunction>(function); if (composite) @@ -126,16 +128,16 @@ void extractFunctionNames(IFunction_sptr function, names.emplace_back(function->name()); } -void extractConvolvedNames(IFunction_sptr function, +void extractConvolvedNames(const IFunction_sptr &function, std::vector<std::string> &names); -void extractConvolvedNames(CompositeFunction_sptr composite, +void extractConvolvedNames(const CompositeFunction_sptr &composite, std::vector<std::string> &names) { for (auto i = 0u; i < composite->nFunctions(); ++i) extractConvolvedNames(composite->getFunction(i), names); } -void extractConvolvedNames(IFunction_sptr function, +void extractConvolvedNames(const IFunction_sptr &function, std::vector<std::string> &names) { auto composite = boost::dynamic_pointer_cast<CompositeFunction>(function); if (composite) { @@ -147,8 +149,8 @@ void extractConvolvedNames(IFunction_sptr function, } } -std::string constructInputString(MatrixWorkspace_sptr workspace, int specMin, - int specMax) { +std::string constructInputString(const MatrixWorkspace_sptr &workspace, + int specMin, int specMax) { std::ostringstream input; for (auto i = specMin; i < specMax + 1; ++i) input << workspace->getName() << ",i" << std::to_string(i) << ";"; @@ -170,9 +172,10 @@ std::vector<MatrixWorkspace_sptr> extractWorkspaces(const std::string &input) { std::vector<MatrixWorkspace_sptr> workspaces; - for (const auto &wsName : workspaceNames) { - workspaces.emplace_back(getADSMatrixWorkspace(wsName)); - } + std::transform(workspaceNames.begin(), workspaceNames.end(), + std::back_inserter(workspaces), [](const auto &wsName) { + return getADSMatrixWorkspace(wsName); + }); return workspaces; } @@ -203,14 +206,16 @@ replaceWorkspaces(const std::string &input, return newInput.str(); } -void renameWorkspace(IAlgorithm_sptr renamer, Workspace_sptr workspace, +void renameWorkspace(const IAlgorithm_sptr &renamer, + const Workspace_sptr &workspace, const std::string &newName) { renamer->setProperty("InputWorkspace", workspace); renamer->setProperty("OutputWorkspace", newName); renamer->executeAsChildAlg(); } -void deleteTemporaries(IAlgorithm_sptr deleter, const std::string &base) { +void deleteTemporaries(const IAlgorithm_sptr &deleter, + const std::string &base) { auto name = base + std::to_string(1); std::size_t i = 2; @@ -233,8 +238,8 @@ bool containsMultipleData(const std::vector<MatrixWorkspace_sptr> &workspaces) { } template <typename F, typename Renamer> -void renameWorkspacesWith(WorkspaceGroup_sptr groupWorkspace, F const &getName, - Renamer const &renamer) { +void renameWorkspacesWith(const WorkspaceGroup_sptr &groupWorkspace, + F const &getName, Renamer const &renamer) { std::unordered_map<std::string, std::size_t> nameCount; for (auto i = 0u; i < groupWorkspace->size(); ++i) { const auto name = getName(i); @@ -251,7 +256,7 @@ void renameWorkspacesWith(WorkspaceGroup_sptr groupWorkspace, F const &getName, template <typename F> void renameWorkspacesInQENSFit(Algorithm *qensFit, - IAlgorithm_sptr renameAlgorithm, + const IAlgorithm_sptr &renameAlgorithm, WorkspaceGroup_sptr outputGroup, std::string const &outputBaseName, std::string const &groupSuffix, @@ -263,8 +268,8 @@ void renameWorkspacesInQENSFit(Algorithm *qensFit, return outputBaseName + "_" + getNameSuffix(i); }; - auto renamer = [&](Workspace_sptr workspace, const std::string &name) { - renameWorkspace(renameAlgorithm, workspace, name); + auto renamer = [&](const Workspace_sptr &workspace, const std::string &name) { + renameWorkspace(renameAlgorithm, std::move(workspace), name); renamerProg.report("Renamed workspace in group."); }; renameWorkspacesWith(outputGroup, getName, renamer); @@ -541,9 +546,9 @@ void QENSFitSequential::exec() { getPropertyValue("OutputWorkspace"), resultWs); if (containsMultipleData(workspaces)) { - const auto inputString = getPropertyValue("Input"); + const auto inputStringProp = getPropertyValue("Input"); renameWorkspaces(groupWs, spectra, outputBaseName, "_Workspace", - extractWorkspaceNames(inputString)); + extractWorkspaceNames(inputStringProp)); } else { renameWorkspaces(groupWs, spectra, outputBaseName, "_Workspace"); } @@ -594,12 +599,14 @@ QENSFitSequential::getAdditionalLogNumbers() const { return logs; } -void QENSFitSequential::addAdditionalLogs(WorkspaceGroup_sptr resultWorkspace) { +void QENSFitSequential::addAdditionalLogs( + const WorkspaceGroup_sptr &resultWorkspace) { for (const auto &workspace : *resultWorkspace) addAdditionalLogs(workspace); } -void QENSFitSequential::addAdditionalLogs(Workspace_sptr resultWorkspace) { +void QENSFitSequential::addAdditionalLogs( + const Workspace_sptr &resultWorkspace) { auto logAdder = createChildAlgorithm("AddSampleLog", -1.0, -1.0, false); logAdder->setProperty("Workspace", resultWorkspace); @@ -678,7 +685,7 @@ std::vector<std::size_t> QENSFitSequential::getDatasetGrouping( } WorkspaceGroup_sptr QENSFitSequential::processIndirectFitParameters( - ITableWorkspace_sptr parameterWorkspace, + const ITableWorkspace_sptr ¶meterWorkspace, const std::vector<std::size_t> &grouping) { std::string const columnX = getProperty("LogName"); std::string const xAxisUnit = getProperty("ResultXAxisUnit"); @@ -708,8 +715,9 @@ void QENSFitSequential::renameWorkspaces( inputWorkspaceNames[i] + "_" + spectra[i] + endOfSuffix; return workspaceName; }; - return renameWorkspacesInQENSFit(this, rename, outputGroup, outputBaseName, - endOfSuffix + "s", getNameSuffix); + return renameWorkspacesInQENSFit(this, rename, std::move(outputGroup), + outputBaseName, endOfSuffix + "s", + getNameSuffix); } void QENSFitSequential::renameWorkspaces( @@ -717,8 +725,9 @@ void QENSFitSequential::renameWorkspaces( std::string const &outputBaseName, std::string const &endOfSuffix) { auto rename = createChildAlgorithm("RenameWorkspace", -1.0, -1.0, false); auto getNameSuffix = [&](std::size_t i) { return spectra[i] + endOfSuffix; }; - return renameWorkspacesInQENSFit(this, rename, outputGroup, outputBaseName, - endOfSuffix + "s", getNameSuffix); + return renameWorkspacesInQENSFit(this, rename, std::move(outputGroup), + outputBaseName, endOfSuffix + "s", + getNameSuffix); } void QENSFitSequential::renameGroupWorkspace( @@ -793,28 +802,31 @@ std::vector<MatrixWorkspace_sptr> QENSFitSequential::convertInputToElasticQ( } void QENSFitSequential::extractMembers( - WorkspaceGroup_sptr resultGroupWs, + const WorkspaceGroup_sptr &resultGroupWs, const std::vector<API::MatrixWorkspace_sptr> &workspaces, const std::string &outputWsName) { std::vector<std::string> workspaceNames; - std::transform( - workspaces.begin(), workspaces.end(), std::back_inserter(workspaceNames), - [](API::MatrixWorkspace_sptr workspace) { return workspace->getName(); }); - - auto extractAlgorithm = extractMembersAlgorithm(resultGroupWs, outputWsName); + std::transform(workspaces.begin(), workspaces.end(), + std::back_inserter(workspaceNames), + [](const API::MatrixWorkspace_sptr &workspace) { + return workspace->getName(); + }); + + auto extractAlgorithm = + extractMembersAlgorithm(std::move(resultGroupWs), outputWsName); extractAlgorithm->setProperty("InputWorkspaces", workspaceNames); extractAlgorithm->execute(); } void QENSFitSequential::copyLogs( - WorkspaceGroup_sptr resultWorkspaces, + const WorkspaceGroup_sptr &resultWorkspaces, std::vector<MatrixWorkspace_sptr> const &workspaces) { for (auto const &resultWorkspace : *resultWorkspaces) copyLogs(resultWorkspace, workspaces); } void QENSFitSequential::copyLogs( - Workspace_sptr resultWorkspace, + const Workspace_sptr &resultWorkspace, std::vector<MatrixWorkspace_sptr> const &workspaces) { auto logCopier = createChildAlgorithm("CopyLogs", -1.0, -1.0, false); logCopier->setProperty("OutputWorkspace", resultWorkspace->getName()); @@ -825,14 +837,14 @@ void QENSFitSequential::copyLogs( } } -void QENSFitSequential::copyLogs(MatrixWorkspace_sptr resultWorkspace, - WorkspaceGroup_sptr resultGroup) { +void QENSFitSequential::copyLogs(const MatrixWorkspace_sptr &resultWorkspace, + const WorkspaceGroup_sptr &resultGroup) { for (auto const &workspace : *resultGroup) copyLogs(resultWorkspace, workspace); } -void QENSFitSequential::copyLogs(MatrixWorkspace_sptr resultWorkspace, - Workspace_sptr resultGroup) { +void QENSFitSequential::copyLogs(const MatrixWorkspace_sptr &resultWorkspace, + const Workspace_sptr &resultGroup) { auto logCopier = createChildAlgorithm("CopyLogs", -1.0, -1.0, false); logCopier->setProperty("InputWorkspace", resultWorkspace); logCopier->setProperty("OutputWorkspace", resultGroup->getName()); @@ -840,7 +852,8 @@ void QENSFitSequential::copyLogs(MatrixWorkspace_sptr resultWorkspace, } IAlgorithm_sptr QENSFitSequential::extractMembersAlgorithm( - WorkspaceGroup_sptr resultGroupWs, const std::string &outputWsName) const { + const WorkspaceGroup_sptr &resultGroupWs, + const std::string &outputWsName) const { const bool convolved = getProperty("ConvolveMembers"); std::vector<std::string> convolvedMembers; IFunction_sptr function = getProperty("Function"); diff --git a/Framework/CurveFitting/src/Algorithms/QENSFitSimultaneous.cpp b/Framework/CurveFitting/src/Algorithms/QENSFitSimultaneous.cpp index dc3383093193689705a5b9c55c37f9b4f44b5655..fd6aed132d21060a2a8f6a7db2f3a98bdb02ceba 100644 --- a/Framework/CurveFitting/src/Algorithms/QENSFitSimultaneous.cpp +++ b/Framework/CurveFitting/src/Algorithms/QENSFitSimultaneous.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCurveFitting/Algorithms/QENSFitSimultaneous.h" #include "MantidCurveFitting/Algorithms/QENSFitUtilities.h" @@ -24,19 +24,20 @@ #include "MantidKernel/UnitFactory.h" #include <boost/algorithm/string/join.hpp> +#include <utility> namespace { Mantid::Kernel::Logger g_log("QENSFit"); using namespace Mantid::API; -void extractFunctionNames(CompositeFunction_sptr composite, +void extractFunctionNames(const CompositeFunction_sptr &composite, std::vector<std::string> &names) { for (auto i = 0u; i < composite->nFunctions(); ++i) names.emplace_back(composite->getFunction(i)->name()); } -void extractFunctionNames(IFunction_sptr function, +void extractFunctionNames(const IFunction_sptr &function, std::vector<std::string> &names) { auto composite = boost::dynamic_pointer_cast<CompositeFunction>(function); if (composite) @@ -45,16 +46,16 @@ void extractFunctionNames(IFunction_sptr function, names.emplace_back(function->name()); } -void extractConvolvedNames(IFunction_sptr function, +void extractConvolvedNames(const IFunction_sptr &function, std::vector<std::string> &names); -void extractConvolvedNames(CompositeFunction_sptr composite, +void extractConvolvedNames(const CompositeFunction_sptr &composite, std::vector<std::string> &names) { for (auto i = 0u; i < composite->nFunctions(); ++i) extractConvolvedNames(composite->getFunction(i), names); } -void extractConvolvedNames(IFunction_sptr function, +void extractConvolvedNames(const IFunction_sptr &function, std::vector<std::string> &names) { auto composite = boost::dynamic_pointer_cast<CompositeFunction>(function); if (composite) { @@ -66,7 +67,8 @@ void extractConvolvedNames(IFunction_sptr function, } } -MatrixWorkspace_sptr convertSpectrumAxis(MatrixWorkspace_sptr inputWorkspace) { +MatrixWorkspace_sptr +convertSpectrumAxis(const MatrixWorkspace_sptr &inputWorkspace) { auto convSpec = AlgorithmManager::Instance().create("ConvertSpectrumAxis"); convSpec->setLogging(false); convSpec->setChild(true); @@ -78,8 +80,8 @@ MatrixWorkspace_sptr convertSpectrumAxis(MatrixWorkspace_sptr inputWorkspace) { return convSpec->getProperty("OutputWorkspace"); } -MatrixWorkspace_sptr convertToElasticQ(MatrixWorkspace_sptr inputWorkspace, - bool doThrow) { +MatrixWorkspace_sptr +convertToElasticQ(const MatrixWorkspace_sptr &inputWorkspace, bool doThrow) { auto axis = inputWorkspace->getAxis(1); if (axis->isSpectra()) return convertSpectrumAxis(inputWorkspace); @@ -97,7 +99,7 @@ struct ElasticQAppender { explicit ElasticQAppender(std::vector<MatrixWorkspace_sptr> &elasticInput) : m_elasticInput(elasticInput), m_converted() {} - void operator()(MatrixWorkspace_sptr workspace, bool doThrow) { + void operator()(const MatrixWorkspace_sptr &workspace, bool doThrow) { auto it = m_converted.find(workspace.get()); if (it != m_converted.end()) m_elasticInput.emplace_back(it->second); @@ -130,7 +132,7 @@ std::string shortParameterName(const std::string &longName) { } void setMultiDataProperties(const IAlgorithm &qensFit, IAlgorithm &fit, - MatrixWorkspace_sptr workspace, + const MatrixWorkspace_sptr &workspace, const std::string &suffix) { fit.setProperty("InputWorkspace" + suffix, workspace); @@ -163,7 +165,7 @@ IFunction_sptr convertToSingleDomain(IFunction_sptr function) { return function; } -WorkspaceGroup_sptr makeGroup(Workspace_sptr workspace) { +WorkspaceGroup_sptr makeGroup(const Workspace_sptr &workspace) { auto group = boost::dynamic_pointer_cast<WorkspaceGroup>(workspace); if (group) return group; @@ -172,7 +174,7 @@ WorkspaceGroup_sptr makeGroup(Workspace_sptr workspace) { return group; } -ITableWorkspace_sptr transposeFitTable(ITableWorkspace_sptr table, +ITableWorkspace_sptr transposeFitTable(const ITableWorkspace_sptr &table, const IFunction &function, const std::string &yAxisType) { auto transposed = WorkspaceFactory::Instance().createTable(); @@ -496,7 +498,7 @@ QENSFitSimultaneous::performFit( } WorkspaceGroup_sptr QENSFitSimultaneous::processIndirectFitParameters( - ITableWorkspace_sptr parameterWorkspace, + const ITableWorkspace_sptr ¶meterWorkspace, const std::vector<std::size_t> &grouping) { std::string const xAxisUnit = getProperty("ResultXAxisUnit"); auto pifp = @@ -511,7 +513,7 @@ WorkspaceGroup_sptr QENSFitSimultaneous::processIndirectFitParameters( } void QENSFitSimultaneous::copyLogs( - WorkspaceGroup_sptr resultWorkspace, + const WorkspaceGroup_sptr &resultWorkspace, const std::vector<MatrixWorkspace_sptr> &workspaces) { auto logCopier = createChildAlgorithm("CopyLogs", -1.0, -1.0, false); for (auto &&result : *resultWorkspace) { @@ -525,8 +527,8 @@ void QENSFitSimultaneous::copyLogs( } } -void QENSFitSimultaneous::copyLogs(MatrixWorkspace_sptr resultWorkspace, - WorkspaceGroup_sptr resultGroup) { +void QENSFitSimultaneous::copyLogs(const MatrixWorkspace_sptr &resultWorkspace, + const WorkspaceGroup_sptr &resultGroup) { auto logCopier = createChildAlgorithm("CopyLogs", -1.0, -1.0, false); logCopier->setProperty("InputWorkspace", resultWorkspace); @@ -539,7 +541,7 @@ void QENSFitSimultaneous::copyLogs(MatrixWorkspace_sptr resultWorkspace, } void QENSFitSimultaneous::extractMembers( - WorkspaceGroup_sptr resultGroupWs, + const WorkspaceGroup_sptr &resultGroupWs, const std::vector<MatrixWorkspace_sptr> &workspaces, const std::string &outputWsName) { std::vector<std::string> workspaceNames; @@ -549,7 +551,8 @@ void QENSFitSimultaneous::extractMembers( workspaceNames.emplace_back(name); } - auto extractAlgorithm = extractMembersAlgorithm(resultGroupWs, outputWsName); + auto extractAlgorithm = + extractMembersAlgorithm(std::move(resultGroupWs), outputWsName); extractAlgorithm->setProperty("InputWorkspaces", workspaceNames); extractAlgorithm->execute(); @@ -557,12 +560,14 @@ void QENSFitSimultaneous::extractMembers( AnalysisDataService::Instance().remove(workspaceName); } -void QENSFitSimultaneous::addAdditionalLogs(API::WorkspaceGroup_sptr group) { +void QENSFitSimultaneous::addAdditionalLogs( + const API::WorkspaceGroup_sptr &group) { for (auto &&workspace : *group) addAdditionalLogs(workspace); } -void QENSFitSimultaneous::addAdditionalLogs(Workspace_sptr resultWorkspace) { +void QENSFitSimultaneous::addAdditionalLogs( + const Workspace_sptr &resultWorkspace) { auto logAdder = createChildAlgorithm("AddSampleLog", -1.0, -1.0, false); logAdder->setProperty("Workspace", resultWorkspace); @@ -585,7 +590,8 @@ void QENSFitSimultaneous::addAdditionalLogs(Workspace_sptr resultWorkspace) { } IAlgorithm_sptr QENSFitSimultaneous::extractMembersAlgorithm( - WorkspaceGroup_sptr resultGroupWs, const std::string &outputWsName) const { + const WorkspaceGroup_sptr &resultGroupWs, + const std::string &outputWsName) const { const bool convolved = getProperty("ConvolveMembers"); std::vector<std::string> convolvedMembers; IFunction_sptr function = getProperty("Function"); @@ -697,7 +703,7 @@ ITableWorkspace_sptr QENSFitSimultaneous::processParameterTable( } void QENSFitSimultaneous::renameWorkspaces( - API::WorkspaceGroup_sptr outputGroup, + const API::WorkspaceGroup_sptr &outputGroup, std::vector<std::string> const &spectra, std::string const &outputBaseName, std::string const &endOfSuffix, std::vector<std::string> const &inputWorkspaceNames) { @@ -707,8 +713,9 @@ void QENSFitSimultaneous::renameWorkspaces( inputWorkspaceNames[i] + "_" + spectra[i] + endOfSuffix; return workspaceName; }; - return renameWorkspacesInQENSFit(this, rename, outputGroup, outputBaseName, - endOfSuffix + "s", getNameSuffix); + return renameWorkspacesInQENSFit(this, rename, std::move(outputGroup), + outputBaseName, endOfSuffix + "s", + getNameSuffix); } } // namespace Algorithms diff --git a/Framework/CurveFitting/src/Algorithms/QENSFitUtilities.cpp b/Framework/CurveFitting/src/Algorithms/QENSFitUtilities.cpp index c2917c2a1877837647c99376867b84ccaf9fb50f..cee9bf1ef7245029624ce5c8956e9d801e8bd3b2 100644 --- a/Framework/CurveFitting/src/Algorithms/QENSFitUtilities.cpp +++ b/Framework/CurveFitting/src/Algorithms/QENSFitUtilities.cpp @@ -1,10 +1,18 @@ +// Mantid Repository : https://github.com/mantidproject/mantid +// +// Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS +// SPDX - License - Identifier: GPL - 3.0 + #include "MantidCurveFitting/Algorithms/QENSFitUtilities.h" #include <unordered_map> +#include <utility> + namespace Mantid { namespace API { void renameWorkspacesWith( - WorkspaceGroup_sptr groupWorkspace, + const WorkspaceGroup_sptr &groupWorkspace, std::function<std::string(std::size_t)> const &getName, std::function<void(Workspace_sptr, const std::string &)> const &renamer) { std::unordered_map<std::string, std::size_t> nameCount; @@ -21,7 +29,8 @@ void renameWorkspacesWith( } } -void renameWorkspace(IAlgorithm_sptr renamer, Workspace_sptr workspace, +void renameWorkspace(const IAlgorithm_sptr &renamer, + const Workspace_sptr &workspace, const std::string &newName) { renamer->setProperty("InputWorkspace", workspace); renamer->setProperty("OutputWorkspace", newName); @@ -37,7 +46,7 @@ bool containsMultipleData(const std::vector<MatrixWorkspace_sptr> &workspaces) { void renameWorkspacesInQENSFit( Algorithm *qensFit, IAlgorithm_sptr renameAlgorithm, - WorkspaceGroup_sptr outputGroup, std::string const &outputBaseName, + const WorkspaceGroup_sptr &outputGroup, std::string const &outputBaseName, std::string const &, std::function<std::string(std::size_t)> const &getNameSuffix) { Progress renamerProg(qensFit, 0.98, 1.0, outputGroup->size() + 1); @@ -48,8 +57,8 @@ void renameWorkspacesInQENSFit( return name; }; - auto renamer = [&](Workspace_sptr workspace, const std::string &name) { - renameWorkspace(renameAlgorithm, workspace, name); + auto renamer = [&](const Workspace_sptr &workspace, const std::string &name) { + renameWorkspace(renameAlgorithm, std::move(workspace), name); renamerProg.report("Renamed workspace in group."); }; renameWorkspacesWith(outputGroup, getName, renamer); diff --git a/Framework/CurveFitting/src/Algorithms/RefinePowderInstrumentParameters.cpp b/Framework/CurveFitting/src/Algorithms/RefinePowderInstrumentParameters.cpp index d9f43c4a76288799c33ff172eaf046971aaa002f..4672c0352d7b97db014456fd2da21fb784b735ff 100644 --- a/Framework/CurveFitting/src/Algorithms/RefinePowderInstrumentParameters.cpp +++ b/Framework/CurveFitting/src/Algorithms/RefinePowderInstrumentParameters.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCurveFitting/Algorithms/RefinePowderInstrumentParameters.h" @@ -34,6 +34,7 @@ #include <fstream> #include <iomanip> +#include <utility> #include <gsl/gsl_sf_erf.h> @@ -383,7 +384,7 @@ void RefinePowderInstrumentParameters::fitInstrumentParameters() { /** Fit function to data */ -bool RefinePowderInstrumentParameters::fitFunction(IFunction_sptr func, +bool RefinePowderInstrumentParameters::fitFunction(const IFunction_sptr &func, double &gslchi2) { API::IAlgorithm_sptr fitalg = createChildAlgorithm("Fit", 0.0, 0.2, true); fitalg->initialize(); @@ -417,7 +418,8 @@ bool RefinePowderInstrumentParameters::fitFunction(IFunction_sptr func, /** Calculate function's statistic */ double RefinePowderInstrumentParameters::calculateFunctionStatistic( - IFunction_sptr func, MatrixWorkspace_sptr dataws, size_t workspaceindex) { + const IFunction_sptr &func, const MatrixWorkspace_sptr &dataws, + size_t workspaceindex) { // 1. Fix all parameters of the function vector<string> funcparameters = func->getParameterNames(); size_t numparams = funcparameters.size(); @@ -456,14 +458,15 @@ double RefinePowderInstrumentParameters::calculateFunctionStatistic( /** Refine instrument parameters by Monte Carlo method */ void RefinePowderInstrumentParameters::refineInstrumentParametersMC( - TableWorkspace_sptr parameterWS, bool fit2) { + const TableWorkspace_sptr ¶meterWS, bool fit2) { // 1. Get function's parameter names getD2TOFFuncParamNames(m_PeakFunctionParameterNames); // 2. Parse parameter (table) workspace vector<double> stepsizes, lowerbounds, upperbounds; - importMonteCarloParametersFromTable(parameterWS, m_PeakFunctionParameterNames, - stepsizes, lowerbounds, upperbounds); + importMonteCarloParametersFromTable(std::move(parameterWS), + m_PeakFunctionParameterNames, stepsizes, + lowerbounds, upperbounds); stringstream dbss; for (size_t i = 0; i < m_PeakFunctionParameterNames.size(); ++i) { @@ -779,7 +782,7 @@ void RefinePowderInstrumentParameters::getD2TOFFuncParamNames( /** Calculate the function */ double RefinePowderInstrumentParameters::calculateD2TOFFunction( - API::IFunction_sptr func, API::FunctionDomain1DVector domain, + const API::IFunction_sptr &func, const API::FunctionDomain1DVector &domain, API::FunctionValues &values, const Mantid::HistogramData::HistogramY &rawY, const Mantid::HistogramData::HistogramE &rawE) { // 1. Check validity @@ -814,7 +817,7 @@ double RefinePowderInstrumentParameters::calculateD2TOFFunction( * m_Peaks are stored in a map. (HKL) is the key */ void RefinePowderInstrumentParameters::genPeaksFromTable( - DataObjects::TableWorkspace_sptr peakparamws) { + const DataObjects::TableWorkspace_sptr &peakparamws) { // 1. Check and clear input and output if (!peakparamws) { g_log.error() << "Input tableworkspace for peak parameters is invalid!\n"; @@ -902,7 +905,7 @@ void RefinePowderInstrumentParameters::genPeaksFromTable( * the diffrotometer geometry parameters */ void RefinePowderInstrumentParameters::importParametersFromTable( - DataObjects::TableWorkspace_sptr parameterWS, + const DataObjects::TableWorkspace_sptr ¶meterWS, std::map<std::string, double> ¶meters) { // 1. Check column orders std::vector<std::string> colnames = parameterWS->getColumnNames(); @@ -945,7 +948,7 @@ void RefinePowderInstrumentParameters::importParametersFromTable( * Arguments */ void RefinePowderInstrumentParameters::importMonteCarloParametersFromTable( - TableWorkspace_sptr tablews, vector<string> parameternames, + const TableWorkspace_sptr &tablews, const vector<string> ¶meternames, vector<double> &stepsizes, vector<double> &lowerbounds, vector<double> &upperbounds) { // 1. Get column information @@ -1054,7 +1057,8 @@ hkl, double lattice) /** Calculate value n for thermal neutron peak profile */ void RefinePowderInstrumentParameters::calculateThermalNeutronSpecial( - IFunction_sptr m_Function, const HistogramX &xVals, vector<double> &vec_n) { + const IFunction_sptr &m_Function, const HistogramX &xVals, + vector<double> &vec_n) { if (m_Function->name() != "ThermalNeutronDtoTOFFunction") { g_log.warning() << "Function (" << m_Function->name() << " is not ThermalNeutronDtoTOFFunction. And it is not " diff --git a/Framework/CurveFitting/src/Algorithms/RefinePowderInstrumentParameters3.cpp b/Framework/CurveFitting/src/Algorithms/RefinePowderInstrumentParameters3.cpp index 998218c8c57b589446af285dfe2ec6d9545b50de..06e64a0c28016ec224b8e37ee6d89cb1d5cc430f 100644 --- a/Framework/CurveFitting/src/Algorithms/RefinePowderInstrumentParameters3.cpp +++ b/Framework/CurveFitting/src/Algorithms/RefinePowderInstrumentParameters3.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCurveFitting/Algorithms/RefinePowderInstrumentParameters3.h" @@ -13,6 +13,7 @@ #include "MantidKernel/ListValidator.h" #include <iomanip> +#include <utility> using namespace Mantid::API; using namespace Mantid::CurveFitting; @@ -231,7 +232,7 @@ void RefinePowderInstrumentParameters3::parseTableWorkspaces() { /** Parse table workspace to a map of Parameters */ void RefinePowderInstrumentParameters3::parseTableWorkspace( - TableWorkspace_sptr tablews, map<string, Parameter> ¶mmap) { + const TableWorkspace_sptr &tablews, map<string, Parameter> ¶mmap) { // 1. Process Table column names std::vector<std::string> colnames = tablews->getColumnNames(); map<string, size_t> colnamedict; @@ -505,7 +506,7 @@ double RefinePowderInstrumentParameters3::doSimulatedAnnealing( * @param newparammap: parameters map containing new/proposed value */ void RefinePowderInstrumentParameters3::proposeNewValues( - vector<string> mcgroup, map<string, Parameter> &curparammap, + const vector<string> &mcgroup, map<string, Parameter> &curparammap, map<string, Parameter> &newparammap, double currchisq) { for (const auto ¶mname : mcgroup) { // random number between -1 and 1 @@ -652,7 +653,7 @@ void RefinePowderInstrumentParameters3::bookKeepMCResult( // 2. Record for the best parameters if (bestparammap.empty()) { // No record yet - duplicateParameters(parammap, bestparammap); + duplicateParameters(std::move(parammap), bestparammap); } else if (recordparameter) { // Replace the record } @@ -752,7 +753,7 @@ void RefinePowderInstrumentParameters3::setupRandomWalkStrategy( * @param parammap :: parammap */ void RefinePowderInstrumentParameters3::addParameterToMCMinimize( - vector<string> &parnamesforMC, string parname, + vector<string> &parnamesforMC, const string &parname, map<string, Parameter> parammap) { map<string, Parameter>::iterator pariter; pariter = parammap.find(parname); @@ -776,7 +777,7 @@ void RefinePowderInstrumentParameters3::addParameterToMCMinimize( * Return: chi^2 */ double RefinePowderInstrumentParameters3::calculateFunction( - map<string, Parameter> parammap, vector<double> &vecY) { + const map<string, Parameter> ¶mmap, vector<double> &vecY) { // 1. Implement parameter values to m_positionFunc if (!parammap.empty()) setFunctionParameterValues(m_positionFunc, parammap); @@ -823,7 +824,8 @@ double calculateFunctionChiSquare(const vector<double> &modelY, /** Calculate Chi^2 of the a function with all parameters are fixed */ double RefinePowderInstrumentParameters3::calculateFunctionError( - IFunction_sptr function, Workspace2D_sptr dataws, int wsindex) { + const IFunction_sptr &function, const Workspace2D_sptr &dataws, + int wsindex) { // 1. Record the fitting information vector<string> parnames = function->getParameterNames(); vector<bool> vecFix(parnames.size(), false); @@ -839,8 +841,8 @@ double RefinePowderInstrumentParameters3::calculateFunctionError( double chi2; string fitstatus; const std::string minimizer = "Levenberg-MarquardtMD"; - bool fitOK = - doFitFunction(function, dataws, wsindex, minimizer, 0, chi2, fitstatus); + bool fitOK = doFitFunction(function, std::move(dataws), wsindex, minimizer, 0, + chi2, fitstatus); if (!fitOK) { g_log.warning() << "Fit by " << minimizer @@ -868,10 +870,10 @@ double RefinePowderInstrumentParameters3::calculateFunctionError( * Return: double chi2 of the final (best) solution. If fitting fails, chi2 *wil be maximum double */ -double RefinePowderInstrumentParameters3::fitFunction(IFunction_sptr function, - Workspace2D_sptr dataws, - int wsindex, - bool powerfit) { +double +RefinePowderInstrumentParameters3::fitFunction(const IFunction_sptr &function, + const Workspace2D_sptr &dataws, + int wsindex, bool powerfit) { // 1. Store original map<string, pair<double, double>> start_paramvaluemap, paramvaluemap1, paramvaluemap2, paramvaluemap3; @@ -972,8 +974,8 @@ double RefinePowderInstrumentParameters3::fitFunction(IFunction_sptr function, * Minimizer: "Levenberg-MarquardtMD"/"Simplex" */ bool RefinePowderInstrumentParameters3::doFitFunction( - IFunction_sptr function, Workspace2D_sptr dataws, int wsindex, - string minimizer, int numiters, double &chi2, string &fitstatus) { + const IFunction_sptr &function, const Workspace2D_sptr &dataws, int wsindex, + const string &minimizer, int numiters, double &chi2, string &fitstatus) { // 0. Debug output stringstream outss; outss << "Fit function: " << m_positionFunc->asString() @@ -1074,7 +1076,8 @@ TableWorkspace_sptr RefinePowderInstrumentParameters3::genOutputProfileTable( * @param parvalue: double, parameter value */ void RefinePowderInstrumentParameters3::addOrReplace( - map<string, Parameter> ¶meters, string parname, double parvalue) { + map<string, Parameter> ¶meters, const string &parname, + double parvalue) { auto pariter = parameters.find(parname); if (pariter != parameters.end()) { parameters[parname].curvalue = parvalue; @@ -1090,7 +1093,7 @@ void RefinePowderInstrumentParameters3::addOrReplace( /** Construct output */ Workspace2D_sptr RefinePowderInstrumentParameters3::genOutputWorkspace( - FunctionDomain1DVector domain, FunctionValues rawvalues) { + const FunctionDomain1DVector &domain, const FunctionValues &rawvalues) { // 1. Create and set up output workspace size_t lenx = m_dataWS->x(m_wsIndex).size(); size_t leny = m_dataWS->y(m_wsIndex).size(); @@ -1138,7 +1141,7 @@ Workspace2D_sptr RefinePowderInstrumentParameters3::genOutputWorkspace( /** Set parameter values to function from Parameter map */ void RefinePowderInstrumentParameters3::setFunctionParameterValues( - IFunction_sptr function, map<string, Parameter> params) { + const IFunction_sptr &function, map<string, Parameter> params) { // 1. Prepare vector<string> funparamnames = function->getParameterNames(); @@ -1210,7 +1213,7 @@ Parameter>& params) * Parameter map */ void RefinePowderInstrumentParameters3::setFunctionParameterFitSetups( - IFunction_sptr function, map<string, Parameter> params) { + const IFunction_sptr &function, map<string, Parameter> params) { // 1. Prepare vector<string> funparamnames = m_positionFunc->getParameterNames(); @@ -1315,7 +1318,7 @@ void convertToDict(vector<string> strvec, map<string, size_t> &lookupdict) { //---------------------------------------------------------------------------------------------- /** Get the index from lookup dictionary (map) */ -int getStringIndex(map<string, size_t> lookupdict, string key) { +int getStringIndex(map<string, size_t> lookupdict, const string &key) { map<string, size_t>::iterator fiter; fiter = lookupdict.find(key); @@ -1336,7 +1339,8 @@ int getStringIndex(map<string, size_t> lookupdict, string key) { /** Store function parameter values to a map */ void storeFunctionParameterValue( - IFunction_sptr function, map<string, pair<double, double>> &parvaluemap) { + const IFunction_sptr &function, + map<string, pair<double, double>> &parvaluemap) { parvaluemap.clear(); vector<string> parnames = function->getParameterNames(); @@ -1354,8 +1358,8 @@ void storeFunctionParameterValue( * and a (string, Parameter) map */ void restoreFunctionParameterValue( - map<string, pair<double, double>> parvaluemap, IFunction_sptr function, - map<string, Parameter> ¶mmap) { + map<string, pair<double, double>> parvaluemap, + const IFunction_sptr &function, map<string, Parameter> ¶mmap) { vector<string> parnames = function->getParameterNames(); for (auto &parname : parnames) { diff --git a/Framework/CurveFitting/src/Algorithms/SplineBackground.cpp b/Framework/CurveFitting/src/Algorithms/SplineBackground.cpp index 99893be9a5323ddaa714ca0b12498f3f180191fd..df09ed43a17ae3cd29846741aeb43239e0c1ef58 100644 --- a/Framework/CurveFitting/src/Algorithms/SplineBackground.cpp +++ b/Framework/CurveFitting/src/Algorithms/SplineBackground.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes @@ -247,7 +247,7 @@ void SplineBackground::freeBSplinePointers() { * @return:: A shared pointer to the output workspace */ MatrixWorkspace_sptr -SplineBackground::saveSplineOutput(const API::MatrixWorkspace_sptr ws, +SplineBackground::saveSplineOutput(const API::MatrixWorkspace_sptr &ws, const size_t spec) { const auto &xInputVals = ws->x(spec); const auto &yInputVals = ws->y(spec); diff --git a/Framework/CurveFitting/src/Algorithms/SplineInterpolation.cpp b/Framework/CurveFitting/src/Algorithms/SplineInterpolation.cpp index 8982cec3635adef4e7429ce223d1a7f635abd2ed..99c4f26e976fc4a3a9b1aa8ae04562f477f3ef8b 100644 --- a/Framework/CurveFitting/src/Algorithms/SplineInterpolation.cpp +++ b/Framework/CurveFitting/src/Algorithms/SplineInterpolation.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCurveFitting/Algorithms/SplineInterpolation.h" @@ -258,9 +258,9 @@ void SplineInterpolation::exec() { * @param iws :: The input workspace to interpolate * @return The pointer to the newly created workspace */ -API::MatrixWorkspace_sptr -SplineInterpolation::setupOutputWorkspace(API::MatrixWorkspace_sptr mws, - API::MatrixWorkspace_sptr iws) const { +API::MatrixWorkspace_sptr SplineInterpolation::setupOutputWorkspace( + const API::MatrixWorkspace_sptr &mws, + const API::MatrixWorkspace_sptr &iws) const { const size_t numSpec = iws->getNumberHistograms(); MatrixWorkspace_sptr outputWorkspace = WorkspaceFactory::Instance().create(mws, numSpec); @@ -300,7 +300,7 @@ SplineInterpolation::convertBinnedData(MatrixWorkspace_sptr workspace) { * @param row :: The row of spectra to use */ void SplineInterpolation::setInterpolationPoints( - MatrixWorkspace_const_sptr inputWorkspace, const size_t row) const { + const MatrixWorkspace_const_sptr &inputWorkspace, const size_t row) const { const auto &xIn = inputWorkspace->x(row); const auto &yIn = inputWorkspace->y(row); const size_t size = xIn.size(); @@ -321,8 +321,9 @@ void SplineInterpolation::setInterpolationPoints( * @param order :: The order of derivatives to calculate */ void SplineInterpolation::calculateDerivatives( - API::MatrixWorkspace_const_sptr inputWorkspace, - API::MatrixWorkspace_sptr outputWorkspace, const size_t order) const { + const API::MatrixWorkspace_const_sptr &inputWorkspace, + const API::MatrixWorkspace_sptr &outputWorkspace, + const size_t order) const { // get x and y parameters from workspaces const size_t nData = inputWorkspace->y(0).size(); const double *xValues = &(inputWorkspace->x(0)[0]); @@ -339,8 +340,8 @@ void SplineInterpolation::calculateDerivatives( * @param row :: The row of spectra to use */ void SplineInterpolation::calculateSpline( - MatrixWorkspace_const_sptr inputWorkspace, - MatrixWorkspace_sptr outputWorkspace, const size_t row) const { + const MatrixWorkspace_const_sptr &inputWorkspace, + const MatrixWorkspace_sptr &outputWorkspace, const size_t row) const { // setup input parameters const size_t nData = inputWorkspace->y(0).size(); const double *xValues = &(inputWorkspace->x(0)[0]); @@ -360,7 +361,7 @@ void SplineInterpolation::calculateSpline( * @param derivs : the vector of derivative workspaces */ void SplineInterpolation::extrapolateFlat( - MatrixWorkspace_sptr ows, MatrixWorkspace_const_sptr iwspt, + const MatrixWorkspace_sptr &ows, const MatrixWorkspace_const_sptr &iwspt, const size_t row, const std::pair<size_t, size_t> &indices, const bool doDerivs, std::vector<MatrixWorkspace_sptr> &derivs) const { @@ -393,10 +394,9 @@ void SplineInterpolation::extrapolateFlat( * @param row : the workspace index * @return : pair of indices for representing the interpolation range */ -std::pair<size_t, size_t> -SplineInterpolation::findInterpolationRange(MatrixWorkspace_const_sptr iwspt, - MatrixWorkspace_sptr mwspt, - const size_t row) { +std::pair<size_t, size_t> SplineInterpolation::findInterpolationRange( + const MatrixWorkspace_const_sptr &iwspt, const MatrixWorkspace_sptr &mwspt, + const size_t row) { auto xAxisIn = iwspt->x(row).rawData(); std::sort(xAxisIn.begin(), xAxisIn.end()); diff --git a/Framework/CurveFitting/src/Algorithms/SplineSmoothing.cpp b/Framework/CurveFitting/src/Algorithms/SplineSmoothing.cpp index a08c1e4cd6dee5de1907884a4c0b727d8cb1673e..d906ded7b5e398337bae71f9e96a37e54c1b431b 100644 --- a/Framework/CurveFitting/src/Algorithms/SplineSmoothing.cpp +++ b/Framework/CurveFitting/src/Algorithms/SplineSmoothing.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCurveFitting/Algorithms/SplineSmoothing.h" #include "MantidAPI/FunctionFactory.h" @@ -158,7 +158,7 @@ void SplineSmoothing::calculateSpectrumDerivatives(const int index, * @param ws :: The input workspace * @param row :: The row of spectra to use */ -void SplineSmoothing::performAdditionalFitting(MatrixWorkspace_sptr ws, +void SplineSmoothing::performAdditionalFitting(const MatrixWorkspace_sptr &ws, const int row) { // perform additional fitting of the points auto fit = createChildAlgorithm("Fit"); @@ -306,9 +306,10 @@ void SplineSmoothing::addSmoothingPoints(const std::set<int> &points, std::vector<double> breakPoints; breakPoints.reserve(num_points); // set each of the x and y points to redefine the spline - for (auto const &point : points) { - breakPoints.emplace_back(xs[point]); - } + + std::transform(points.begin(), points.end(), std::back_inserter(breakPoints), + [&xs](const auto &point) { return xs[point]; }); + m_cspline->setAttribute("BreakPoints", API::IFunction::Attribute(breakPoints)); @@ -367,7 +368,7 @@ void SplineSmoothing::selectSmoothingPoints( break; } - } else if (!incBreaks) { + } else { if (smoothPts.size() >= xs.size() - 1) { break; } diff --git a/Framework/CurveFitting/src/Algorithms/VesuvioCalculateGammaBackground.cpp b/Framework/CurveFitting/src/Algorithms/VesuvioCalculateGammaBackground.cpp index 20f0bc4a238446cd0cedb6017579199242d99d4a..94d4a4821a6a028720ec09b011e7940008f3cc44 100644 --- a/Framework/CurveFitting/src/Algorithms/VesuvioCalculateGammaBackground.cpp +++ b/Framework/CurveFitting/src/Algorithms/VesuvioCalculateGammaBackground.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCurveFitting/Algorithms/VesuvioCalculateGammaBackground.h" #include "MantidCurveFitting/Algorithms/ConvertToYSpace.h" @@ -500,8 +500,6 @@ void VesuvioCalculateGammaBackground::createOutputWorkspaces() { m_correctedWS = WorkspaceFactory::Instance().create(m_inputWS, nhist); } -/** - */ void VesuvioCalculateGammaBackground::cacheInstrumentGeometry() { auto inst = m_inputWS->getInstrument(); auto refFrame = inst->getReferenceFrame(); diff --git a/Framework/CurveFitting/src/Algorithms/VesuvioCalculateMS.cpp b/Framework/CurveFitting/src/Algorithms/VesuvioCalculateMS.cpp index b6706811a65f3a758967aba28c54aa1931b56c31..f83de41e63fc26aa9c7a3e21c6d3b33f8e1c31ed 100644 --- a/Framework/CurveFitting/src/Algorithms/VesuvioCalculateMS.cpp +++ b/Framework/CurveFitting/src/Algorithms/VesuvioCalculateMS.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCurveFitting/Algorithms/VesuvioCalculateMS.h" // Use helpers for storing detector/resolution parameters diff --git a/Framework/CurveFitting/src/AugmentedLagrangianOptimizer.cpp b/Framework/CurveFitting/src/AugmentedLagrangianOptimizer.cpp index bc47d38e13b2e143c4f5413bca2fd8446c54a051..2b325168c3c2d276f47fc55d6b54d42425e3d8d8 100644 --- a/Framework/CurveFitting/src/AugmentedLagrangianOptimizer.cpp +++ b/Framework/CurveFitting/src/AugmentedLagrangianOptimizer.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCurveFitting/AugmentedLagrangianOptimizer.h" #include "MantidKernel/Exception.h" @@ -137,7 +137,7 @@ void AugmentedLagrangianOptimizer::minimize(std::vector<double> &xv) const { assert(numParameters() == xv.size()); double ICM(HUGE_VAL), minf_penalty(HUGE_VAL), rho(0.0); - double fcur(0.0), minf(HUGE_VAL), penalty(0.0); + double minf(HUGE_VAL), penalty(0.0); std::vector<double> xcur(xv), lambda(numEqualityConstraints(), 0), mu(numInequalityConstraints()); int minfIsFeasible = 0; @@ -149,7 +149,7 @@ void AugmentedLagrangianOptimizer::minimize(std::vector<double> &xv) const { if (numEqualityConstraints() > 0 || numInequalityConstraints() > 0) { double con2 = 0; - fcur = m_userfunc(numParameters(), xcur.data()); + double fcur = m_userfunc(numParameters(), xcur.data()); int feasible = 1; for (size_t i = 0; i < numEqualityConstraints(); ++i) { double hi = evaluateConstraint(m_eq, i, numParameters(), xcur.data()); @@ -177,7 +177,7 @@ void AugmentedLagrangianOptimizer::minimize(std::vector<double> &xv) const { unconstrainedOptimization(lambda, mu, rho, xcur); - fcur = m_userfunc(numParameters(), xcur.data()); + double fcur = m_userfunc(numParameters(), xcur.data()); ICM = 0.0; penalty = 0.0; int feasible = 1; diff --git a/Framework/CurveFitting/src/ComplexMatrix.cpp b/Framework/CurveFitting/src/ComplexMatrix.cpp index d800d541b79ec276dad3bc871ea0b80413c4977e..f27c893a3d383a445cee6acee0b95aabeddfe2bb 100644 --- a/Framework/CurveFitting/src/ComplexMatrix.cpp +++ b/Framework/CurveFitting/src/ComplexMatrix.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/CurveFitting/src/ComplexVector.cpp b/Framework/CurveFitting/src/ComplexVector.cpp index 5bc2b8ce705c6680804a9634d40928386f1dc1fc..1b68c2ea42e90c51afe4ba0863d486cb1a777884 100644 --- a/Framework/CurveFitting/src/ComplexVector.cpp +++ b/Framework/CurveFitting/src/ComplexVector.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/CurveFitting/src/Constraints/BoundaryConstraint.cpp b/Framework/CurveFitting/src/Constraints/BoundaryConstraint.cpp index 2977337e04fe8a60f94de3327412905f8e640ce0..12b3c9ac613905c0114ad1d27d68cbe1fb2535b1 100644 --- a/Framework/CurveFitting/src/Constraints/BoundaryConstraint.cpp +++ b/Framework/CurveFitting/src/Constraints/BoundaryConstraint.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes @@ -51,7 +51,7 @@ BoundaryConstraint::BoundaryConstraint(const std::string ¶mName) * a tie or a constraint. */ BoundaryConstraint::BoundaryConstraint(API::IFunction *fun, - const std::string paramName, + const std::string ¶mName, const double lowerBound, const double upperBound, bool isDefault) : m_penaltyFactor(getDefaultPenaltyFactor()), m_hasLowerBound(true), @@ -61,7 +61,7 @@ BoundaryConstraint::BoundaryConstraint(API::IFunction *fun, } BoundaryConstraint::BoundaryConstraint(API::IFunction *fun, - const std::string paramName, + const std::string ¶mName, const double lowerBound, bool isDefault) : m_penaltyFactor(getDefaultPenaltyFactor()), m_hasLowerBound(true), m_hasUpperBound(false), m_lowerBound(lowerBound), m_upperBound(-DBL_MAX) { diff --git a/Framework/CurveFitting/src/CostFunctions/CostFuncFitting.cpp b/Framework/CurveFitting/src/CostFunctions/CostFuncFitting.cpp index 88ef35a072f43dbbe1f900116f02323914703b93..9e8effe85843fa83c130c278c0f6ebdb2306fd01 100644 --- a/Framework/CurveFitting/src/CostFunctions/CostFuncFitting.cpp +++ b/Framework/CurveFitting/src/CostFunctions/CostFuncFitting.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes @@ -15,6 +15,7 @@ #include <gsl/gsl_multifit_nlin.h> #include <limits> +#include <utility> namespace Mantid { namespace CurveFitting { @@ -81,9 +82,9 @@ size_t CostFuncFitting::nParams() const { void CostFuncFitting::setFittingFunction(API::IFunction_sptr function, API::FunctionDomain_sptr domain, API::FunctionValues_sptr values) { - m_function = function; - m_domain = domain; - m_values = values; + m_function = std::move(function); + m_domain = std::move(domain); + m_values = std::move(values); reset(); } @@ -127,14 +128,15 @@ void CostFuncFitting::calActiveCovarianceMatrix(GSLMatrix &covar, // construct the jacobian GSLJacobian J(*m_function, m_values->size()); size_t na = this->nParams(); // number of active parameters - assert(J.getJ()->size2 == na); + auto j = J.getJ(); + assert(j->size2 == na); covar.resize(na, na); // calculate the derivatives m_function->functionDeriv(*m_domain, J); // let the GSL to compute the covariance matrix - gsl_multifit_covar(J.getJ(), epsrel, covar.gsl()); + gsl_multifit_covar(j, epsrel, covar.gsl()); } /** Calculates covariance matrix @@ -418,9 +420,7 @@ double CostFuncFitting::valDerivHessian(bool evalDeriv, } } m_dirtyDeriv = false; - } - if (evalDeriv) { if (m_includePenalty) { size_t i = 0; for (size_t ip = 0; ip < np; ++ip) { diff --git a/Framework/CurveFitting/src/CostFunctions/CostFuncLeastSquares.cpp b/Framework/CurveFitting/src/CostFunctions/CostFuncLeastSquares.cpp index d6e9a9cef08dd123a086d46ed194354876ea40ab..9f367303ac7e832a6df1645a0eff0797fa6d03ba 100644 --- a/Framework/CurveFitting/src/CostFunctions/CostFuncLeastSquares.cpp +++ b/Framework/CurveFitting/src/CostFunctions/CostFuncLeastSquares.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/CurveFitting/src/CostFunctions/CostFuncPoisson.cpp b/Framework/CurveFitting/src/CostFunctions/CostFuncPoisson.cpp index 4e0df57d219f323d335bb6fc7c6625d14a0550e4..66b564c96666c4e501acf5dc9704dd69cf82f504 100644 --- a/Framework/CurveFitting/src/CostFunctions/CostFuncPoisson.cpp +++ b/Framework/CurveFitting/src/CostFunctions/CostFuncPoisson.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/CurveFitting/src/CostFunctions/CostFuncRwp.cpp b/Framework/CurveFitting/src/CostFunctions/CostFuncRwp.cpp index 1283a1a22073b9e23be1cca9f4c6863ba0cb5fe0..ab616ca25b9dfe05af338ad39471bcf640cee5e2 100644 --- a/Framework/CurveFitting/src/CostFunctions/CostFuncRwp.cpp +++ b/Framework/CurveFitting/src/CostFunctions/CostFuncRwp.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes @@ -47,7 +47,7 @@ CostFuncRwp::getFitWeights(API::FunctionValues_sptr values) const { //---------------------------------------------------------------------------------------------- /** Get weight of data point i(1/sigma) */ -double CostFuncRwp::getWeight(API::FunctionValues_sptr values, size_t i, +double CostFuncRwp::getWeight(const API::FunctionValues_sptr &values, size_t i, double sqrtW) const { return (values->getFitWeight(i) / sqrtW); } @@ -55,7 +55,7 @@ double CostFuncRwp::getWeight(API::FunctionValues_sptr values, size_t i, //---------------------------------------------------------------------------------------------- /** Get square root of normalization weight (W) */ -double CostFuncRwp::calSqrtW(API::FunctionValues_sptr values) const { +double CostFuncRwp::calSqrtW(const API::FunctionValues_sptr &values) const { double weight = 0.0; // FIXME : This might give a wrong answer in case of multiple-domain diff --git a/Framework/CurveFitting/src/CostFunctions/CostFuncUnweightedLeastSquares.cpp b/Framework/CurveFitting/src/CostFunctions/CostFuncUnweightedLeastSquares.cpp index 1a7a967b0da536de7dc69645b9e179cea920127b..7ab0ffc507f29cdc0b7ed67791d48fa2ef7c7930 100644 --- a/Framework/CurveFitting/src/CostFunctions/CostFuncUnweightedLeastSquares.cpp +++ b/Framework/CurveFitting/src/CostFunctions/CostFuncUnweightedLeastSquares.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCurveFitting/CostFunctions/CostFuncUnweightedLeastSquares.h" diff --git a/Framework/CurveFitting/src/ExcludeRangeFinder.cpp b/Framework/CurveFitting/src/ExcludeRangeFinder.cpp index a0d55892325dc80500e7566915886f2498b59336..c79f903c88a2758646d3c46c5f566530ef5a918a 100644 --- a/Framework/CurveFitting/src/ExcludeRangeFinder.cpp +++ b/Framework/CurveFitting/src/ExcludeRangeFinder.cpp @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #include "MantidCurveFitting/ExcludeRangeFinder.h" #include <algorithm> diff --git a/Framework/CurveFitting/src/FitMW.cpp b/Framework/CurveFitting/src/FitMW.cpp index 84cd2b07b8aa81cf90268206b34b5da5b9764959..77e4204efe23a3149626e70e7d303392871b82a4 100644 --- a/Framework/CurveFitting/src/FitMW.cpp +++ b/Framework/CurveFitting/src/FitMW.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + // Includes //---------------------------------------------------------------------- diff --git a/Framework/CurveFitting/src/FuncMinimizers/BFGS_Minimizer.cpp b/Framework/CurveFitting/src/FuncMinimizers/BFGS_Minimizer.cpp index 6bb2e0c114f1f8bf3393e7fcf1363bc642925efc..7d2b7bd030fe3dee40be9b4185199d4f401e9d86 100644 --- a/Framework/CurveFitting/src/FuncMinimizers/BFGS_Minimizer.cpp +++ b/Framework/CurveFitting/src/FuncMinimizers/BFGS_Minimizer.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/CurveFitting/src/FuncMinimizers/DampedGaussNewtonMinimizer.cpp b/Framework/CurveFitting/src/FuncMinimizers/DampedGaussNewtonMinimizer.cpp index 8e483b2b187a158f2a5ab6e9b4c110fd41cba9bb..cf1a977f044cc2e9c9e82fb678f19b4e1010b398 100644 --- a/Framework/CurveFitting/src/FuncMinimizers/DampedGaussNewtonMinimizer.cpp +++ b/Framework/CurveFitting/src/FuncMinimizers/DampedGaussNewtonMinimizer.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/CurveFitting/src/FuncMinimizers/DerivMinimizer.cpp b/Framework/CurveFitting/src/FuncMinimizers/DerivMinimizer.cpp index 744c9f0371e7b563873f03fb66cc06d19c4d90fb..fc2fdd5ac75558cb20e999c3326511eaeaa7caf4 100644 --- a/Framework/CurveFitting/src/FuncMinimizers/DerivMinimizer.cpp +++ b/Framework/CurveFitting/src/FuncMinimizers/DerivMinimizer.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/CurveFitting/src/FuncMinimizers/FABADAMinimizer.cpp b/Framework/CurveFitting/src/FuncMinimizers/FABADAMinimizer.cpp index 52407cf3cee0f1eca841d313e9fd5ed34454794f..34fc8f41e5187971ee68687a08b17bc90b4544b6 100644 --- a/Framework/CurveFitting/src/FuncMinimizers/FABADAMinimizer.cpp +++ b/Framework/CurveFitting/src/FuncMinimizers/FABADAMinimizer.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/AlgorithmManager.h" #include "MantidAPI/AnalysisDataService.h" diff --git a/Framework/CurveFitting/src/FuncMinimizers/FRConjugateGradientMinimizer.cpp b/Framework/CurveFitting/src/FuncMinimizers/FRConjugateGradientMinimizer.cpp index 50985c2db54c8778f198a85485c46f72a0edce48..9baecdfb0f240f0697ace37e3736290a6c6161f1 100644 --- a/Framework/CurveFitting/src/FuncMinimizers/FRConjugateGradientMinimizer.cpp +++ b/Framework/CurveFitting/src/FuncMinimizers/FRConjugateGradientMinimizer.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/CurveFitting/src/FuncMinimizers/LevenbergMarquardtMDMinimizer.cpp b/Framework/CurveFitting/src/FuncMinimizers/LevenbergMarquardtMDMinimizer.cpp index be85800fb6219d917720ef4bed84ce7eef0c5f9f..798bdf675c8aaa17c8034e412b844fdd29d80aef 100644 --- a/Framework/CurveFitting/src/FuncMinimizers/LevenbergMarquardtMDMinimizer.cpp +++ b/Framework/CurveFitting/src/FuncMinimizers/LevenbergMarquardtMDMinimizer.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/CurveFitting/src/FuncMinimizers/LevenbergMarquardtMinimizer.cpp b/Framework/CurveFitting/src/FuncMinimizers/LevenbergMarquardtMinimizer.cpp index d9f387d0bc84f46a1eb5efe2ebadd749cb3b9e4a..6c7561335bc748272c9f66be0be869218b170bd4 100644 --- a/Framework/CurveFitting/src/FuncMinimizers/LevenbergMarquardtMinimizer.cpp +++ b/Framework/CurveFitting/src/FuncMinimizers/LevenbergMarquardtMinimizer.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/CurveFitting/src/FuncMinimizers/PRConjugateGradientMinimizer.cpp b/Framework/CurveFitting/src/FuncMinimizers/PRConjugateGradientMinimizer.cpp index 05c17246948aea0f8ecd65c06fb9f3e1115423d1..378c9484b980652e9a40f541768fcdc1fd7783c8 100644 --- a/Framework/CurveFitting/src/FuncMinimizers/PRConjugateGradientMinimizer.cpp +++ b/Framework/CurveFitting/src/FuncMinimizers/PRConjugateGradientMinimizer.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/CurveFitting/src/FuncMinimizers/SimplexMinimizer.cpp b/Framework/CurveFitting/src/FuncMinimizers/SimplexMinimizer.cpp index eb8eaaa41f68d2dee8403d808c38d04b6f17b5d6..09fcb0334e5c0f16bdf3c47b45e1a18548f3098e 100644 --- a/Framework/CurveFitting/src/FuncMinimizers/SimplexMinimizer.cpp +++ b/Framework/CurveFitting/src/FuncMinimizers/SimplexMinimizer.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/CurveFitting/src/FuncMinimizers/SteepestDescentMinimizer.cpp b/Framework/CurveFitting/src/FuncMinimizers/SteepestDescentMinimizer.cpp index acdf72758a61913edef9d541dc87b2bbd6fa9ef5..0beb66f2f5c63df4bfb1928656bd0714b6a48be4 100644 --- a/Framework/CurveFitting/src/FuncMinimizers/SteepestDescentMinimizer.cpp +++ b/Framework/CurveFitting/src/FuncMinimizers/SteepestDescentMinimizer.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/CurveFitting/src/FuncMinimizers/TrustRegionMinimizer.cpp b/Framework/CurveFitting/src/FuncMinimizers/TrustRegionMinimizer.cpp index fe01820271590c0169cf34e1e2c33b0656baa0b4..2a2d2fcacd4ef0ffe54b609f40914dddb4895380 100644 --- a/Framework/CurveFitting/src/FuncMinimizers/TrustRegionMinimizer.cpp +++ b/Framework/CurveFitting/src/FuncMinimizers/TrustRegionMinimizer.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + // This code was originally translated from Fortran code on // https://ccpforge.cse.rl.ac.uk/gf/project/ral_nlls June 2016 diff --git a/Framework/CurveFitting/src/FunctionDomain1DSpectrumCreator.cpp b/Framework/CurveFitting/src/FunctionDomain1DSpectrumCreator.cpp index 97e019b672d3b1516694fef2f4fd8dee3ad789a6..8be493174ac62ec966d410d82f2873a440cbae60 100644 --- a/Framework/CurveFitting/src/FunctionDomain1DSpectrumCreator.cpp +++ b/Framework/CurveFitting/src/FunctionDomain1DSpectrumCreator.cpp @@ -1,9 +1,11 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + +#include <utility> + #include "MantidCurveFitting/FunctionDomain1DSpectrumCreator.h" #include "MantidHistogramData/BinEdges.h" #include "MantidHistogramData/Points.h" @@ -29,7 +31,7 @@ FunctionDomain1DSpectrumCreator::FunctionDomain1DSpectrumCreator() */ void FunctionDomain1DSpectrumCreator::setMatrixWorkspace( MatrixWorkspace_sptr matrixWorkspace) { - m_matrixWorkspace = matrixWorkspace; + m_matrixWorkspace = std::move(matrixWorkspace); } /** diff --git a/Framework/CurveFitting/src/Functions/Abragam.cpp b/Framework/CurveFitting/src/Functions/Abragam.cpp index 9f76dfa7067b24305262a91be5f26f1f46b04850..b2e33489cfcb33703e0d90f10d1989711b274498 100644 --- a/Framework/CurveFitting/src/Functions/Abragam.cpp +++ b/Framework/CurveFitting/src/Functions/Abragam.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/CurveFitting/src/Functions/BSpline.cpp b/Framework/CurveFitting/src/Functions/BSpline.cpp index c2dcf7633676441cce31a04af48cb5a3264cf686..e91b78800075e7be679c540b94a51bbe09231e98 100644 --- a/Framework/CurveFitting/src/Functions/BSpline.cpp +++ b/Framework/CurveFitting/src/Functions/BSpline.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/CurveFitting/src/Functions/BackToBackExponential.cpp b/Framework/CurveFitting/src/Functions/BackToBackExponential.cpp index 0591d715970dcbe95175d8a5e4cf86b495e55574..b0c1dde0c3b0230b1cd56f8acda15d59d5554253 100644 --- a/Framework/CurveFitting/src/Functions/BackToBackExponential.cpp +++ b/Framework/CurveFitting/src/Functions/BackToBackExponential.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/CurveFitting/src/Functions/BackgroundFunction.cpp b/Framework/CurveFitting/src/Functions/BackgroundFunction.cpp index cfbe03aa366abda1c94cb29546698744093ce6bd..5cee425bb27ecdb19389504c396e714213293b84 100644 --- a/Framework/CurveFitting/src/Functions/BackgroundFunction.cpp +++ b/Framework/CurveFitting/src/Functions/BackgroundFunction.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/CurveFitting/src/Functions/BivariateNormal.cpp b/Framework/CurveFitting/src/Functions/BivariateNormal.cpp index c8c4f16630cd09127962ca703fb55499489d1a6f..cc9de83e9f4f42ef7cd1d469ca0ed5bf785c1c7d 100644 --- a/Framework/CurveFitting/src/Functions/BivariateNormal.cpp +++ b/Framework/CurveFitting/src/Functions/BivariateNormal.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/FunctionFactory.h" #include "MantidAPI/MatrixWorkspace.h" diff --git a/Framework/CurveFitting/src/Functions/Bk2BkExpConvPV.cpp b/Framework/CurveFitting/src/Functions/Bk2BkExpConvPV.cpp index cd97ac340d42e852e8f6194a7c78039a603617ba..ee31a1f8fd62680bd4ece6a620afac5c9c9b3df0 100644 --- a/Framework/CurveFitting/src/Functions/Bk2BkExpConvPV.cpp +++ b/Framework/CurveFitting/src/Functions/Bk2BkExpConvPV.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include <cmath> diff --git a/Framework/CurveFitting/src/Functions/ChebfunBase.cpp b/Framework/CurveFitting/src/Functions/ChebfunBase.cpp index ee537114d65412c2628e787374787c41914feab3..989655b8989f01f1437a59a125d697d1e8a4d1e5 100644 --- a/Framework/CurveFitting/src/Functions/ChebfunBase.cpp +++ b/Framework/CurveFitting/src/Functions/ChebfunBase.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCurveFitting/Functions/ChebfunBase.h" #include "MantidAPI/FunctionDomain1D.h" @@ -22,6 +22,7 @@ #include <limits> #include <numeric> #include <sstream> +#include <utility> namespace Mantid { namespace CurveFitting { @@ -465,7 +466,7 @@ ChebfunBase_sptr ChebfunBase::bestFit(double start, double end, std::vector<double> &p, std::vector<double> &a, double maxA, double tolerance, size_t maxSize) { - return bestFitTempl(start, end, f, p, a, maxA, tolerance, maxSize); + return bestFitTempl(start, end, std::move(f), p, a, maxA, tolerance, maxSize); } /// Template specialization for IFunction @@ -603,7 +604,7 @@ std::vector<double> ChebfunBase::calcP(const std::vector<double> &a) const { */ std::vector<double> ChebfunBase::fit(ChebfunFunctionType f) const { std::vector<double> res(size()); - std::transform(m_x.begin(), m_x.end(), res.begin(), f); + std::transform(m_x.begin(), m_x.end(), res.begin(), std::move(f)); return res; } @@ -626,7 +627,7 @@ std::vector<double> ChebfunBase::fit(const API::IFunction &f) const { * @param f :: Function to calculate. * @param p :: Values of function f at the even-valued indices of m_x. */ -std::vector<double> ChebfunBase::fitOdd(ChebfunFunctionType f, +std::vector<double> ChebfunBase::fitOdd(const ChebfunFunctionType &f, std::vector<double> &p) const { assert(size() == p.size() * 2 - 1); assert(size() % 2 == 1); diff --git a/Framework/CurveFitting/src/Functions/Chebyshev.cpp b/Framework/CurveFitting/src/Functions/Chebyshev.cpp index 09cb7be54082413e64c05d4ec29c721924a522a6..f4e883cb35a7d2e34e827384f34d7ca1bac6e731 100644 --- a/Framework/CurveFitting/src/Functions/Chebyshev.cpp +++ b/Framework/CurveFitting/src/Functions/Chebyshev.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/CurveFitting/src/Functions/ComptonPeakProfile.cpp b/Framework/CurveFitting/src/Functions/ComptonPeakProfile.cpp index c1b3c66c1631e18f6a4f5849a1e42f0e89370887..bc28811ecb7c73e74045fedce8268704b2434faf 100644 --- a/Framework/CurveFitting/src/Functions/ComptonPeakProfile.cpp +++ b/Framework/CurveFitting/src/Functions/ComptonPeakProfile.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCurveFitting/Functions/ComptonPeakProfile.h" #include "MantidAPI/FunctionFactory.h" @@ -37,8 +37,6 @@ const double STDDEV_TO_FWHM = 0.5 * std::sqrt(std::log(4.0)); ///@endcond } // namespace -/** - */ ComptonPeakProfile::ComptonPeakProfile() : API::ParamFunction(), API::IFunction1D(), m_wsIndex(0), m_mass(0.0), m_voigtCutOff(5000.), m_gauss(), m_voigt(), m_efixed(0.0), @@ -141,16 +139,12 @@ void ComptonPeakProfile::setWorkspace( m_hwhmLorentz = 0.5 * (yplus - yminus); } -/** - */ void ComptonPeakProfile::declareParameters() { declareParameter(AMP_PARAM, 1.0, "Intensity parameter"); declareParameter(POS_PARAM, 1.0, "Peak position parameter"); declareParameter(WIDTH_PARAM, 1.0, "Width parameter"); } -/** - */ void ComptonPeakProfile::declareAttributes() { declareAttribute(WSINDEX_NAME, IFunction::Attribute(static_cast<int>(m_wsIndex))); diff --git a/Framework/CurveFitting/src/Functions/ComptonProfile.cpp b/Framework/CurveFitting/src/Functions/ComptonProfile.cpp index 5f64c9685f9f896a2946e5f05cea16b9ab59b8c8..7b8c1d38304e033ac847cfb31ee6c03fb9e693e9 100644 --- a/Framework/CurveFitting/src/Functions/ComptonProfile.cpp +++ b/Framework/CurveFitting/src/Functions/ComptonProfile.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCurveFitting/Functions/ComptonProfile.h" #include "MantidAPI/FunctionFactory.h" @@ -28,8 +28,6 @@ const char *MASS_NAME = "Mass"; ///@endcond } // namespace -/** - */ ComptonProfile::ComptonProfile() : API::ParamFunction(), API::IFunction1D(), m_log("ComptonProfile"), m_wsIndex(0), m_startX(0.0), m_endX(0.0), m_voigt(), @@ -150,8 +148,6 @@ void ComptonProfile::cacheYSpaceValues( } } -/** - */ void ComptonProfile::declareParameters() { declareParameter(MASS_NAME, 0.0, "Atomic mass (amu)"); } diff --git a/Framework/CurveFitting/src/Functions/ComptonScatteringCountRate.cpp b/Framework/CurveFitting/src/Functions/ComptonScatteringCountRate.cpp index b0e6ce7ceac7568a3e2fb2d13a8233a40083f8d4..afca21b2a2f7d09fd0c5699664f1a456c4f75806 100644 --- a/Framework/CurveFitting/src/Functions/ComptonScatteringCountRate.cpp +++ b/Framework/CurveFitting/src/Functions/ComptonScatteringCountRate.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCurveFitting/Functions/ComptonScatteringCountRate.h" #include "MantidAPI/FunctionFactory.h" diff --git a/Framework/CurveFitting/src/Functions/Convolution.cpp b/Framework/CurveFitting/src/Functions/Convolution.cpp index e2065e8a5d0490adc0dfa28d80af74f3724c7011..8e667439b3a43c0142e06a3b98af8fa83fb70694 100644 --- a/Framework/CurveFitting/src/Functions/Convolution.cpp +++ b/Framework/CurveFitting/src/Functions/Convolution.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/CurveFitting/src/Functions/CrystalElectricField.cpp b/Framework/CurveFitting/src/Functions/CrystalElectricField.cpp index 2f8bec9cd40a27899533844941542c466c965592..93457e5a20afe03d485ce31727adeeec0a22183b 100644 --- a/Framework/CurveFitting/src/Functions/CrystalElectricField.cpp +++ b/Framework/CurveFitting/src/Functions/CrystalElectricField.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/CurveFitting/src/Functions/CrystalFieldControl.cpp b/Framework/CurveFitting/src/Functions/CrystalFieldControl.cpp index 243140dbf45130b9c501ffccd68a8b1a2f07dd7b..09f2df8e78ba1ca67a00b813eb002cdca36a2c4f 100644 --- a/Framework/CurveFitting/src/Functions/CrystalFieldControl.cpp +++ b/Framework/CurveFitting/src/Functions/CrystalFieldControl.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCurveFitting/Functions/CrystalFieldControl.h" #include "MantidCurveFitting/Functions/CrystalFieldPeaks.h" diff --git a/Framework/CurveFitting/src/Functions/CrystalFieldFunction.cpp b/Framework/CurveFitting/src/Functions/CrystalFieldFunction.cpp index ac336ed106287991ce1c817ce0b0959d3606a201..f1177591bae3e842f477ab5ec1ef924061cdf94a 100644 --- a/Framework/CurveFitting/src/Functions/CrystalFieldFunction.cpp +++ b/Framework/CurveFitting/src/Functions/CrystalFieldFunction.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCurveFitting/Functions/CrystalFieldFunction.h" #include "MantidCurveFitting/Functions/CrystalElectricField.h" @@ -26,6 +26,7 @@ #include <boost/optional.hpp> #include <boost/regex.hpp> #include <limits> +#include <utility> namespace Mantid { namespace CurveFitting { @@ -122,7 +123,7 @@ void CrystalFieldFunction::function(const FunctionDomain &domain, /// Set the source function /// @param source :: New source function. void CrystalFieldFunction::setSource(IFunction_sptr source) const { - m_source = source; + m_source = std::move(source); } size_t CrystalFieldFunction::getNumberDomains() const { diff --git a/Framework/CurveFitting/src/Functions/CrystalFieldHeatCapacity.cpp b/Framework/CurveFitting/src/Functions/CrystalFieldHeatCapacity.cpp index 5fdc14e05abb8e63424f5c2d42159d5e1684305b..f9536212e269d0f0dddd811fe751f948a1b88b92 100644 --- a/Framework/CurveFitting/src/Functions/CrystalFieldHeatCapacity.cpp +++ b/Framework/CurveFitting/src/Functions/CrystalFieldHeatCapacity.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCurveFitting/Functions/CrystalFieldHeatCapacity.h" #include "MantidAPI/FunctionDomain.h" diff --git a/Framework/CurveFitting/src/Functions/CrystalFieldMagnetisation.cpp b/Framework/CurveFitting/src/Functions/CrystalFieldMagnetisation.cpp index 87af9e6a1c477c7f802f690829c1be3f6753821d..6989124844d42feeea7bcbabe93646837cb2b5a4 100644 --- a/Framework/CurveFitting/src/Functions/CrystalFieldMagnetisation.cpp +++ b/Framework/CurveFitting/src/Functions/CrystalFieldMagnetisation.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCurveFitting/Functions/CrystalFieldMagnetisation.h" #include "MantidAPI/FunctionDomain.h" @@ -28,7 +28,7 @@ namespace { // Does the actual calculation of the magnetisation void calculate(double *out, const double *xValues, const size_t nData, const ComplexFortranMatrix &ham, const int nre, - const DoubleFortranVector Hmag, const double T, + const DoubleFortranVector &Hmag, const double T, const double convfact, const bool iscgs) { const double beta = 1 / (PhysicalConstants::BoltzmannConstant * T); // x-data is the applied field magnitude. We need to recalculate diff --git a/Framework/CurveFitting/src/Functions/CrystalFieldMoment.cpp b/Framework/CurveFitting/src/Functions/CrystalFieldMoment.cpp index f1490865c9dad3c561a4de79b682c74702ddcce7..808f0725dc645df75a979f51e9d229ce683f20ad 100644 --- a/Framework/CurveFitting/src/Functions/CrystalFieldMoment.cpp +++ b/Framework/CurveFitting/src/Functions/CrystalFieldMoment.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCurveFitting/Functions/CrystalFieldMoment.h" #include "MantidAPI/FunctionDomain.h" @@ -28,7 +28,7 @@ namespace { // Does the actual calculation of the magnetic moment void calculate(double *out, const double *xValues, const size_t nData, const ComplexFortranMatrix &ham, const int nre, - const DoubleFortranVector Hdir, const double Hmag, + const DoubleFortranVector &Hdir, const double Hmag, const double convfact) { const double k_B = PhysicalConstants::BoltzmannConstant; DoubleFortranVector en; diff --git a/Framework/CurveFitting/src/Functions/CrystalFieldMultiSpectrum.cpp b/Framework/CurveFitting/src/Functions/CrystalFieldMultiSpectrum.cpp index c0c0730f33b6ca174675049780f3e333bb75262b..2134f11c7727fd4e4624199baa65cf7eee1ab698 100644 --- a/Framework/CurveFitting/src/Functions/CrystalFieldMultiSpectrum.cpp +++ b/Framework/CurveFitting/src/Functions/CrystalFieldMultiSpectrum.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCurveFitting/Functions/CrystalFieldMultiSpectrum.h" #include "MantidCurveFitting/Functions/CrystalElectricField.h" @@ -125,10 +125,12 @@ CrystalFieldMultiSpectrum::CrystalFieldMultiSpectrum() size_t CrystalFieldMultiSpectrum::getNumberDomains() const { if (!m_target) { buildTargetFunction(); + + if (!m_target) { + throw std::runtime_error("Failed to build target function."); + } } - if (!m_target) { - throw std::runtime_error("Failed to build target function."); - } + return m_target->getNumberDomains(); } diff --git a/Framework/CurveFitting/src/Functions/CrystalFieldPeakUtils.cpp b/Framework/CurveFitting/src/Functions/CrystalFieldPeakUtils.cpp index b0d74b9ed3469cba7f716d7d52694f86d9302f21..2fa8c64a2ac5d7a5ef454a3029cf03bbf398c902 100644 --- a/Framework/CurveFitting/src/Functions/CrystalFieldPeakUtils.cpp +++ b/Framework/CurveFitting/src/Functions/CrystalFieldPeakUtils.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCurveFitting/Functions/CrystalFieldPeakUtils.h" diff --git a/Framework/CurveFitting/src/Functions/CrystalFieldPeaks.cpp b/Framework/CurveFitting/src/Functions/CrystalFieldPeaks.cpp index 7a0241ab5fda07645a2de5a108e9ab27a52f9a2d..3c4cffadb7d3f98b5f8646d8f05f8f4bcab7bd87 100644 --- a/Framework/CurveFitting/src/Functions/CrystalFieldPeaks.cpp +++ b/Framework/CurveFitting/src/Functions/CrystalFieldPeaks.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCurveFitting/Functions/CrystalFieldPeaks.h" #include "MantidAPI/FunctionFactory.h" diff --git a/Framework/CurveFitting/src/Functions/CrystalFieldPeaksBase.cpp b/Framework/CurveFitting/src/Functions/CrystalFieldPeaksBase.cpp index 5e1a85459f32aa92ef965b1416af06864bde3a64..d19fb244de2b76596d4ecf3c0dbac8312be397f1 100644 --- a/Framework/CurveFitting/src/Functions/CrystalFieldPeaksBase.cpp +++ b/Framework/CurveFitting/src/Functions/CrystalFieldPeaksBase.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCurveFitting/Functions/CrystalFieldPeaksBase.h" #include "MantidCurveFitting/Functions/CrystalElectricField.h" diff --git a/Framework/CurveFitting/src/Functions/CrystalFieldSpectrum.cpp b/Framework/CurveFitting/src/Functions/CrystalFieldSpectrum.cpp index 231f70dbc4d11e1f4081d0aee03849ebb12a5f2d..0592b35fb4fe95cf602a8aa54967d3dc1322f133 100644 --- a/Framework/CurveFitting/src/Functions/CrystalFieldSpectrum.cpp +++ b/Framework/CurveFitting/src/Functions/CrystalFieldSpectrum.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCurveFitting/Functions/CrystalFieldSpectrum.h" #include "MantidCurveFitting/Functions/CrystalFieldPeakUtils.h" diff --git a/Framework/CurveFitting/src/Functions/CrystalFieldSusceptibility.cpp b/Framework/CurveFitting/src/Functions/CrystalFieldSusceptibility.cpp index 757a6704c0c4098415baeca61905d30a48abd13f..a8eb90d535b04550579ef9217a12d9abbd85f286 100644 --- a/Framework/CurveFitting/src/Functions/CrystalFieldSusceptibility.cpp +++ b/Framework/CurveFitting/src/Functions/CrystalFieldSusceptibility.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCurveFitting/Functions/CrystalFieldSusceptibility.h" #include "MantidAPI/FunctionDomain.h" diff --git a/Framework/CurveFitting/src/Functions/CubicSpline.cpp b/Framework/CurveFitting/src/Functions/CubicSpline.cpp index ec69de11f13977748665b2d7581ba934bfe2c031..61f59611f069b3246d5ada9a99adb6d5b656971c 100644 --- a/Framework/CurveFitting/src/Functions/CubicSpline.cpp +++ b/Framework/CurveFitting/src/Functions/CubicSpline.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/CurveFitting/src/Functions/DeltaFunction.cpp b/Framework/CurveFitting/src/Functions/DeltaFunction.cpp index 511abc4ef9d96bb59e9dacdca3fc7a2b72d1c333..deaa4d478e937ade0dcc2139031fa5454699ff50 100644 --- a/Framework/CurveFitting/src/Functions/DeltaFunction.cpp +++ b/Framework/CurveFitting/src/Functions/DeltaFunction.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/CurveFitting/src/Functions/DiffRotDiscreteCircle.cpp b/Framework/CurveFitting/src/Functions/DiffRotDiscreteCircle.cpp index fac2b8d0de21effbed6805ba41a0225591607574..166794237f1d4cf9244827e7a3ec9f55b727b087 100644 --- a/Framework/CurveFitting/src/Functions/DiffRotDiscreteCircle.cpp +++ b/Framework/CurveFitting/src/Functions/DiffRotDiscreteCircle.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + // Mantid Coding standards <http://www.mantidproject.org/Coding_Standards> // Main Module Header diff --git a/Framework/CurveFitting/src/Functions/DiffSphere.cpp b/Framework/CurveFitting/src/Functions/DiffSphere.cpp index 3f00d3947e114f3ff739bc105f43f076f4be896e..2153ea9d4ba5af90a8fa17574e0ffd1cb93f0028 100644 --- a/Framework/CurveFitting/src/Functions/DiffSphere.cpp +++ b/Framework/CurveFitting/src/Functions/DiffSphere.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + // Mantid Coding standars <http://www.mantidproject.org/Coding_Standards> // Main Module Header diff --git a/Framework/CurveFitting/src/Functions/DynamicKuboToyabe.cpp b/Framework/CurveFitting/src/Functions/DynamicKuboToyabe.cpp index b96fe7c783f37550a8b59baa52ccd0cf43addb0a..53bef9698355b28da863677132456d158a76a76e 100644 --- a/Framework/CurveFitting/src/Functions/DynamicKuboToyabe.cpp +++ b/Framework/CurveFitting/src/Functions/DynamicKuboToyabe.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCurveFitting/Functions/DynamicKuboToyabe.h" #include "MantidAPI/FunctionFactory.h" diff --git a/Framework/CurveFitting/src/Functions/ElasticDiffRotDiscreteCircle.cpp b/Framework/CurveFitting/src/Functions/ElasticDiffRotDiscreteCircle.cpp index 273057947a1645c69e6cb861082ff994ff757305..f1e941ddc778fb891b2c41c647bfc8afe3654b2c 100644 --- a/Framework/CurveFitting/src/Functions/ElasticDiffRotDiscreteCircle.cpp +++ b/Framework/CurveFitting/src/Functions/ElasticDiffRotDiscreteCircle.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + // Mantid Coding standards <http://www.mantidproject.org/Coding_Standards> // Main Module Header diff --git a/Framework/CurveFitting/src/Functions/ElasticDiffSphere.cpp b/Framework/CurveFitting/src/Functions/ElasticDiffSphere.cpp index 1353e94bb68869ec3cf214df85eb05f24ac7480a..1a4bd1b3937def61995eed6b93bf2f5b88bbd8d0 100644 --- a/Framework/CurveFitting/src/Functions/ElasticDiffSphere.cpp +++ b/Framework/CurveFitting/src/Functions/ElasticDiffSphere.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + // Mantid Coding standars <http://www.mantidproject.org/Coding_Standards> // Main Module Header diff --git a/Framework/CurveFitting/src/Functions/ElasticIsoRotDiff.cpp b/Framework/CurveFitting/src/Functions/ElasticIsoRotDiff.cpp index 1b1df82a54b5582fe4e1f397d3d5137716d75b25..8651a6422809e93c41ec061b5c68bf38b05b8d54 100644 --- a/Framework/CurveFitting/src/Functions/ElasticIsoRotDiff.cpp +++ b/Framework/CurveFitting/src/Functions/ElasticIsoRotDiff.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + // Mantid Coding standars <http://www.mantidproject.org/Coding_Standards> // Main Module Header diff --git a/Framework/CurveFitting/src/Functions/EndErfc.cpp b/Framework/CurveFitting/src/Functions/EndErfc.cpp index f1b92b0216834694e37ed3494d0fc47614e3ef17..25e72c7939a49d2ceada9af7573f53eece02a835 100644 --- a/Framework/CurveFitting/src/Functions/EndErfc.cpp +++ b/Framework/CurveFitting/src/Functions/EndErfc.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/CurveFitting/src/Functions/ExpDecay.cpp b/Framework/CurveFitting/src/Functions/ExpDecay.cpp index 88e6694cfa5d9c4b4894437df52ba381db94274b..8aecf8fef6ef2453b0a880085e619763ade11b51 100644 --- a/Framework/CurveFitting/src/Functions/ExpDecay.cpp +++ b/Framework/CurveFitting/src/Functions/ExpDecay.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/CurveFitting/src/Functions/ExpDecayMuon.cpp b/Framework/CurveFitting/src/Functions/ExpDecayMuon.cpp index cd88f4ec804f97e05f8f7784a2a7bce1e8572849..c0dc7776305443000f45ab300b2f90f4561ce65d 100644 --- a/Framework/CurveFitting/src/Functions/ExpDecayMuon.cpp +++ b/Framework/CurveFitting/src/Functions/ExpDecayMuon.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/CurveFitting/src/Functions/ExpDecayOsc.cpp b/Framework/CurveFitting/src/Functions/ExpDecayOsc.cpp index 7d6823412db6b9da68eaf747f027315f1fa58043..25c06d450a3ca1a07023e6f3d05a8a5fbdbeea1e 100644 --- a/Framework/CurveFitting/src/Functions/ExpDecayOsc.cpp +++ b/Framework/CurveFitting/src/Functions/ExpDecayOsc.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/CurveFitting/src/Functions/FlatBackground.cpp b/Framework/CurveFitting/src/Functions/FlatBackground.cpp index 6f7b933bfb5b4f758c1b92a7774e5e3549761d2f..93087ab7593a6b7870d049fa7a9b05190417ac71 100644 --- a/Framework/CurveFitting/src/Functions/FlatBackground.cpp +++ b/Framework/CurveFitting/src/Functions/FlatBackground.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCurveFitting/Functions/FlatBackground.h" #include "MantidAPI/FunctionFactory.h" diff --git a/Framework/CurveFitting/src/Functions/FullprofPolynomial.cpp b/Framework/CurveFitting/src/Functions/FullprofPolynomial.cpp index 785fbe001727fa2f26cca414ffbce4c2daedf2da..b823243fcb28314b687ff50aa37da665961333ce 100644 --- a/Framework/CurveFitting/src/Functions/FullprofPolynomial.cpp +++ b/Framework/CurveFitting/src/Functions/FullprofPolynomial.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCurveFitting/Functions/FullprofPolynomial.h" #include "MantidAPI/FunctionFactory.h" diff --git a/Framework/CurveFitting/src/Functions/FunctionQDepends.cpp b/Framework/CurveFitting/src/Functions/FunctionQDepends.cpp index 19b0231170eaf5cbe9e012d9e5788031496e9c6f..eaa2acc65b68ff9a5347e6137d1c86b7cdee04b3 100644 --- a/Framework/CurveFitting/src/Functions/FunctionQDepends.cpp +++ b/Framework/CurveFitting/src/Functions/FunctionQDepends.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + // Mantid Coding standars <http://www.mantidproject.org/Coding_Standards> diff --git a/Framework/CurveFitting/src/Functions/GausDecay.cpp b/Framework/CurveFitting/src/Functions/GausDecay.cpp index 4cf8387e34f15af9d258f76e495fb59f04e905a5..ac6e6d0d74c7c99b2da1000856f1249f71f40e87 100644 --- a/Framework/CurveFitting/src/Functions/GausDecay.cpp +++ b/Framework/CurveFitting/src/Functions/GausDecay.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/CurveFitting/src/Functions/GausOsc.cpp b/Framework/CurveFitting/src/Functions/GausOsc.cpp index 6a7da559af8c92734371854cdc462793e7af0ac2..3bd24d4d3129be81cc816b5119e7df0a4cf4a49b 100644 --- a/Framework/CurveFitting/src/Functions/GausOsc.cpp +++ b/Framework/CurveFitting/src/Functions/GausOsc.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/CurveFitting/src/Functions/Gaussian.cpp b/Framework/CurveFitting/src/Functions/Gaussian.cpp index 1417d48fe3f8335baf1a10d94f6a35807bd34507..a30a4eb4016dfea885a693ae4f8606062188a959 100644 --- a/Framework/CurveFitting/src/Functions/Gaussian.cpp +++ b/Framework/CurveFitting/src/Functions/Gaussian.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/CurveFitting/src/Functions/GaussianComptonProfile.cpp b/Framework/CurveFitting/src/Functions/GaussianComptonProfile.cpp index 1efc6a1d176d65a099ac75a0b025faafb06c0516..3f8dbe2901766979d37cae5295f51695740c747f 100644 --- a/Framework/CurveFitting/src/Functions/GaussianComptonProfile.cpp +++ b/Framework/CurveFitting/src/Functions/GaussianComptonProfile.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //------------------------------------------------------------------------------------------------ // Includes @@ -24,8 +24,6 @@ const char *AMP_PARAM = "Intensity"; const double STDDEV_TO_HWHM = std::sqrt(std::log(4.0)); -/** - */ GaussianComptonProfile::GaussianComptonProfile() : ComptonProfile() {} /** @@ -35,16 +33,12 @@ std::string GaussianComptonProfile::name() const { return "GaussianComptonProfile"; } -/** - */ void GaussianComptonProfile::declareParameters() { ComptonProfile::declareParameters(); declareParameter(WIDTH_PARAM, 1.0, "Gaussian width parameter"); declareParameter(AMP_PARAM, 1.0, "Gaussian intensity parameter"); } -/* - */ std::vector<size_t> GaussianComptonProfile::intensityParameterIndices() const { return std::vector<size_t>(1, this->parameterIndex(AMP_PARAM)); } diff --git a/Framework/CurveFitting/src/Functions/GramCharlier.cpp b/Framework/CurveFitting/src/Functions/GramCharlier.cpp index 5bf791bda3586f034c0ab247625a69d4c372d6a7..ffba868048f6bc6f6de82e1fac3b054e87d561af 100644 --- a/Framework/CurveFitting/src/Functions/GramCharlier.cpp +++ b/Framework/CurveFitting/src/Functions/GramCharlier.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCurveFitting/Functions/GramCharlier.h" diff --git a/Framework/CurveFitting/src/Functions/GramCharlierComptonProfile.cpp b/Framework/CurveFitting/src/Functions/GramCharlierComptonProfile.cpp index 0d5fa62f5bd59072a14b11fce5280917c24f1a32..7c912d80bfecbafaf0a94ccd900ad5189fb64421 100644 --- a/Framework/CurveFitting/src/Functions/GramCharlierComptonProfile.cpp +++ b/Framework/CurveFitting/src/Functions/GramCharlierComptonProfile.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //------------------------------------------------------------------------------------------------ // Includes @@ -73,8 +73,6 @@ struct InY { ///@endcond } // namespace -/** - */ GramCharlierComptonProfile::GramCharlierComptonProfile() : ComptonProfile(), m_hermite(), m_yfine(), m_qfine(), m_voigt(), m_voigtProfile(), m_userFixedFSE(false) {} @@ -86,8 +84,6 @@ std::string GramCharlierComptonProfile::name() const { return "GramCharlierComptonProfile"; } -/** - */ void GramCharlierComptonProfile::declareParameters() { // Base class ones ComptonProfile::declareParameters(); @@ -96,8 +92,6 @@ void GramCharlierComptonProfile::declareParameters() { // Other parameters depend on the Hermite attribute... } -/** - */ void GramCharlierComptonProfile::declareAttributes() { // Base class ones ComptonProfile::declareAttributes(); @@ -164,8 +158,6 @@ void GramCharlierComptonProfile::declareGramCharlierParameters() { } } -/* - */ std::vector<size_t> GramCharlierComptonProfile::intensityParameterIndices() const { assert(!m_hermite.empty()); diff --git a/Framework/CurveFitting/src/Functions/IkedaCarpenterPV.cpp b/Framework/CurveFitting/src/Functions/IkedaCarpenterPV.cpp index ebc148b29544079ad1c4918594ea4cc00e8fa308..21e693426a71998d0951bd2ab9364de071c30374 100644 --- a/Framework/CurveFitting/src/Functions/IkedaCarpenterPV.cpp +++ b/Framework/CurveFitting/src/Functions/IkedaCarpenterPV.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes @@ -128,7 +128,7 @@ void IkedaCarpenterPV::init() { this->lowerConstraint0("X0"); } -void IkedaCarpenterPV::lowerConstraint0(std::string paramName) { +void IkedaCarpenterPV::lowerConstraint0(const std::string ¶mName) { auto mixingConstraint = std::make_unique<BoundaryConstraint>(this, paramName, 0.0, true); mixingConstraint->setPenaltyFactor(1e9); diff --git a/Framework/CurveFitting/src/Functions/InelasticDiffRotDiscreteCircle.cpp b/Framework/CurveFitting/src/Functions/InelasticDiffRotDiscreteCircle.cpp index bc757e2224fc251411444d23ff08d9b887a4b3ae..edccc395b8fdb0bc185092b2bdd84df1edf913f8 100644 --- a/Framework/CurveFitting/src/Functions/InelasticDiffRotDiscreteCircle.cpp +++ b/Framework/CurveFitting/src/Functions/InelasticDiffRotDiscreteCircle.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCurveFitting/Functions/InelasticDiffRotDiscreteCircle.h" #include "MantidCurveFitting/Constraints/BoundaryConstraint.h" diff --git a/Framework/CurveFitting/src/Functions/InelasticDiffSphere.cpp b/Framework/CurveFitting/src/Functions/InelasticDiffSphere.cpp index c2a0d7e2ee2a0ba72ae3a1cadbb682527f56d730..9cc7be3cb6e78c08985a1e55ed809351ca2eda74 100644 --- a/Framework/CurveFitting/src/Functions/InelasticDiffSphere.cpp +++ b/Framework/CurveFitting/src/Functions/InelasticDiffSphere.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCurveFitting/Functions/InelasticDiffSphere.h" diff --git a/Framework/CurveFitting/src/Functions/InelasticIsoRotDiff.cpp b/Framework/CurveFitting/src/Functions/InelasticIsoRotDiff.cpp index 0b80b7451afdf40b558b6b43b73c016ececf401b..ccad2ec2473e040f9cfa7db2a132da54ed05d0db 100644 --- a/Framework/CurveFitting/src/Functions/InelasticIsoRotDiff.cpp +++ b/Framework/CurveFitting/src/Functions/InelasticIsoRotDiff.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + // Mantid Coding standars <http://www.mantidproject.org/Coding_Standards> // Main Module Header diff --git a/Framework/CurveFitting/src/Functions/IsoRotDiff.cpp b/Framework/CurveFitting/src/Functions/IsoRotDiff.cpp index 9891142de39a6bc7d11f848a1edd3ffceef50ca1..76b779cbbe6c4b5064b91b712bb3a66fa363812e 100644 --- a/Framework/CurveFitting/src/Functions/IsoRotDiff.cpp +++ b/Framework/CurveFitting/src/Functions/IsoRotDiff.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + // Mantid Coding standars <http://www.mantidproject.org/Coding_Standards> // Main Module Header diff --git a/Framework/CurveFitting/src/Functions/Keren.cpp b/Framework/CurveFitting/src/Functions/Keren.cpp index 8b6224456035737bf91d0d4abdbcc3a157d99380..485e1cbfab3c52328b6f27bc2851d1a29cd59cd6 100644 --- a/Framework/CurveFitting/src/Functions/Keren.cpp +++ b/Framework/CurveFitting/src/Functions/Keren.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCurveFitting/Functions/Keren.h" #include "MantidAPI/FunctionFactory.h" diff --git a/Framework/CurveFitting/src/Functions/LinearBackground.cpp b/Framework/CurveFitting/src/Functions/LinearBackground.cpp index 66a49063e22c98fc3ce70a13ec4e50e783740b97..58d62f1150bbce37bebedf041706552d55e2dafb 100644 --- a/Framework/CurveFitting/src/Functions/LinearBackground.cpp +++ b/Framework/CurveFitting/src/Functions/LinearBackground.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/CurveFitting/src/Functions/LogNormal.cpp b/Framework/CurveFitting/src/Functions/LogNormal.cpp index c247712fbf3a986819bb1dd6c482a49418644f07..68e7b0cdf605e811c2dae9daa03e6138a4e72012 100644 --- a/Framework/CurveFitting/src/Functions/LogNormal.cpp +++ b/Framework/CurveFitting/src/Functions/LogNormal.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/CurveFitting/src/Functions/Lorentzian.cpp b/Framework/CurveFitting/src/Functions/Lorentzian.cpp index b53925521d36b92b8bd43e7da0f22a56fed55290..2d905b549ea1326dd9c7f08148cf24ab3a017e5a 100644 --- a/Framework/CurveFitting/src/Functions/Lorentzian.cpp +++ b/Framework/CurveFitting/src/Functions/Lorentzian.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/CurveFitting/src/Functions/MultivariateGaussianComptonProfile.cpp b/Framework/CurveFitting/src/Functions/MultivariateGaussianComptonProfile.cpp index ced657a895f15dd80a0722e903f3205032f29377..b27f0991d75e538ae1267fb2ddd8cd19caaa1952 100644 --- a/Framework/CurveFitting/src/Functions/MultivariateGaussianComptonProfile.cpp +++ b/Framework/CurveFitting/src/Functions/MultivariateGaussianComptonProfile.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //------------------------------------------------------------------------------------------------ // Includes @@ -25,8 +25,6 @@ const char *MultivariateGaussianComptonProfile::SIGMA_Y_PARAM = "SigmaY"; const char *MultivariateGaussianComptonProfile::SIGMA_Z_PARAM = "SigmaZ"; const char *MultivariateGaussianComptonProfile::STEPS_ATTR = "IntegrationSteps"; -/** - */ MultivariateGaussianComptonProfile::MultivariateGaussianComptonProfile() : ComptonProfile(), m_integrationSteps(256), m_thetaStep(0.0), m_phiStep(0.0) {} @@ -38,8 +36,6 @@ std::string MultivariateGaussianComptonProfile::name() const { return "MultivariateGaussianComptonProfile"; } -/** - */ void MultivariateGaussianComptonProfile::declareParameters() { ComptonProfile::declareParameters(); declareParameter(AMP_PARAM, 1.0, "Gaussian intensity parameter"); @@ -48,8 +44,6 @@ void MultivariateGaussianComptonProfile::declareParameters() { declareParameter(SIGMA_Z_PARAM, 1.0, "Sigma Z parameter"); } -/** - */ void MultivariateGaussianComptonProfile::declareAttributes() { ComptonProfile::declareAttributes(); declareAttribute(STEPS_ATTR, IFunction::Attribute(m_integrationSteps)); @@ -79,8 +73,6 @@ void MultivariateGaussianComptonProfile::setAttribute(const std::string &name, } } -/* - */ std::vector<size_t> MultivariateGaussianComptonProfile::intensityParameterIndices() const { return std::vector<size_t>(1, this->parameterIndex(AMP_PARAM)); diff --git a/Framework/CurveFitting/src/Functions/MuonFInteraction.cpp b/Framework/CurveFitting/src/Functions/MuonFInteraction.cpp index 82e6558e865adce0008b04cf8eccbe112db6dd41..3f30a1850461da6c6610fbeed96bf506fc5c1838 100644 --- a/Framework/CurveFitting/src/Functions/MuonFInteraction.cpp +++ b/Framework/CurveFitting/src/Functions/MuonFInteraction.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/CurveFitting/src/Functions/NeutronBk2BkExpConvPVoigt.cpp b/Framework/CurveFitting/src/Functions/NeutronBk2BkExpConvPVoigt.cpp index 6e0aa4f4470152e8055d5082b90abefaacb59e3a..9f1e7665cc9f73523ba457feb91bdbd2250cdc77 100644 --- a/Framework/CurveFitting/src/Functions/NeutronBk2BkExpConvPVoigt.cpp +++ b/Framework/CurveFitting/src/Functions/NeutronBk2BkExpConvPVoigt.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCurveFitting/Functions/NeutronBk2BkExpConvPVoigt.h" #include "MantidAPI/FunctionFactory.h" diff --git a/Framework/CurveFitting/src/Functions/PawleyFunction.cpp b/Framework/CurveFitting/src/Functions/PawleyFunction.cpp index 918d3c4cf3204180778331c4eeddd122433fbba2..1e86a37b92dcf1fd2f0c283a9990d214e46ee70d 100644 --- a/Framework/CurveFitting/src/Functions/PawleyFunction.cpp +++ b/Framework/CurveFitting/src/Functions/PawleyFunction.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCurveFitting/Functions/PawleyFunction.h" @@ -405,7 +405,8 @@ double PawleyFunction::getTransformedCenter(double d) const { return d; } -void PawleyFunction::setPeakPositions(std::string centreName, double zeroShift, +void PawleyFunction::setPeakPositions(const std::string ¢reName, + double zeroShift, const UnitCell &cell) const { for (size_t i = 0; i < m_hkls.size(); ++i) { double centre = getTransformedCenter(cell.d(m_hkls[i])); diff --git a/Framework/CurveFitting/src/Functions/PeakParameterFunction.cpp b/Framework/CurveFitting/src/Functions/PeakParameterFunction.cpp index 83fb0b9ca05a35cd668f0e6b47238a25fc1fc936..0af80fa7111943e8f7a83c7b753a964a562a2e2e 100644 --- a/Framework/CurveFitting/src/Functions/PeakParameterFunction.cpp +++ b/Framework/CurveFitting/src/Functions/PeakParameterFunction.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCurveFitting/Functions/PeakParameterFunction.h" #include "MantidAPI/FunctionFactory.h" diff --git a/Framework/CurveFitting/src/Functions/Polynomial.cpp b/Framework/CurveFitting/src/Functions/Polynomial.cpp index 2985c9b0b70fa574a4920da942a297b0c798a96f..3b0ca8082d956f7047be33e967d0b0934dc43c72 100644 --- a/Framework/CurveFitting/src/Functions/Polynomial.cpp +++ b/Framework/CurveFitting/src/Functions/Polynomial.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCurveFitting/Functions/Polynomial.h" #include "MantidAPI/FunctionFactory.h" diff --git a/Framework/CurveFitting/src/Functions/ProcessBackground.cpp b/Framework/CurveFitting/src/Functions/ProcessBackground.cpp index 0271d5fc754ae4f361bd944d6fbb33f6cc4a3da4..cf4d6c442941cd0e8ffef66436252b251b88d4de 100644 --- a/Framework/CurveFitting/src/Functions/ProcessBackground.cpp +++ b/Framework/CurveFitting/src/Functions/ProcessBackground.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCurveFitting/Functions/ProcessBackground.h" #include "MantidAPI/Axis.h" @@ -22,6 +22,7 @@ #include <boost/algorithm/string.hpp> #include <boost/algorithm/string/predicate.hpp> #include <boost/algorithm/string/split.hpp> +#include <utility> using namespace Mantid; @@ -583,7 +584,7 @@ void ProcessBackground::selectFromGivenFunction() { /** Select background automatically */ DataObjects::Workspace2D_sptr -ProcessBackground::autoBackgroundSelection(Workspace2D_sptr bkgdWS) { +ProcessBackground::autoBackgroundSelection(const Workspace2D_sptr &bkgdWS) { // Get background type and create bakground function BackgroundFunction_sptr bkgdfunction = createBackgroundFunction(m_bkgdType); @@ -649,7 +650,7 @@ ProcessBackground::autoBackgroundSelection(Workspace2D_sptr bkgdWS) { /** Create a background function from input properties */ BackgroundFunction_sptr -ProcessBackground::createBackgroundFunction(const string backgroundtype) { +ProcessBackground::createBackgroundFunction(const string &backgroundtype) { Functions::BackgroundFunction_sptr bkgdfunction; if (backgroundtype == "Polynomial") { @@ -679,8 +680,8 @@ ProcessBackground::createBackgroundFunction(const string backgroundtype) { //---------------------------------------------------------------------------------------------- /** Filter non-background data points out and create a background workspace */ -Workspace2D_sptr -ProcessBackground::filterForBackground(BackgroundFunction_sptr bkgdfunction) { +Workspace2D_sptr ProcessBackground::filterForBackground( + const BackgroundFunction_sptr &bkgdfunction) { double posnoisetolerance = getProperty("NoiseTolerance"); double negnoisetolerance = getProperty("NegativeNoiseTolerance"); if (isEmpty(negnoisetolerance)) @@ -751,7 +752,8 @@ ProcessBackground::filterForBackground(BackgroundFunction_sptr bkgdfunction) { //---------------------------------------------------------------------------------------------- /** Fit background function */ -void ProcessBackground::fitBackgroundFunction(std::string bkgdfunctiontype) { +void ProcessBackground::fitBackgroundFunction( + const std::string &bkgdfunctiontype) { // Get background type and create bakground function BackgroundFunction_sptr bkgdfunction = createBackgroundFunction(bkgdfunctiontype); @@ -884,9 +886,10 @@ void ProcessBackground::removePeaks() { //---------------------------------------------------------------------------------------------- /** Set up: parse peak workspace to vectors */ -void RemovePeaks::setup(TableWorkspace_sptr peaktablews) { +void RemovePeaks::setup(const TableWorkspace_sptr &peaktablews) { // Parse table workspace - parsePeakTableWorkspace(peaktablews, m_vecPeakCentre, m_vecPeakFWHM); + parsePeakTableWorkspace(std::move(peaktablews), m_vecPeakCentre, + m_vecPeakFWHM); // Check if (m_vecPeakCentre.size() != m_vecPeakFWHM.size()) @@ -900,8 +903,8 @@ void RemovePeaks::setup(TableWorkspace_sptr peaktablews) { /** Remove peaks from a input workspace */ Workspace2D_sptr -RemovePeaks::removePeaks(API::MatrixWorkspace_const_sptr dataws, int wsindex, - double numfwhm) { +RemovePeaks::removePeaks(const API::MatrixWorkspace_const_sptr &dataws, + int wsindex, double numfwhm) { // Check if (m_vecPeakCentre.empty()) throw runtime_error("RemovePeaks has not been setup yet. "); @@ -956,9 +959,9 @@ RemovePeaks::removePeaks(API::MatrixWorkspace_const_sptr dataws, int wsindex, //---------------------------------------------------------------------------------------------- /** Parse table workspace */ -void RemovePeaks::parsePeakTableWorkspace(TableWorkspace_sptr peaktablews, - vector<double> &vec_peakcentre, - vector<double> &vec_peakfwhm) { +void RemovePeaks::parsePeakTableWorkspace( + const TableWorkspace_sptr &peaktablews, vector<double> &vec_peakcentre, + vector<double> &vec_peakfwhm) { // Get peak table workspace information vector<string> colnames = peaktablews->getColumnNames(); int index_centre = -1; diff --git a/Framework/CurveFitting/src/Functions/ProductFunction.cpp b/Framework/CurveFitting/src/Functions/ProductFunction.cpp index 8680937d711b0cee1991b627002c75fe86592844..1d2696b8587bac9365293b73a4691be334a44ef8 100644 --- a/Framework/CurveFitting/src/Functions/ProductFunction.cpp +++ b/Framework/CurveFitting/src/Functions/ProductFunction.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/CurveFitting/src/Functions/ProductLinearExp.cpp b/Framework/CurveFitting/src/Functions/ProductLinearExp.cpp index 9c5569e7ccaf6b3caa74a943c6442ee4791bdf69..9d77e388c6845e65b69166d040ac88877b7bd20b 100644 --- a/Framework/CurveFitting/src/Functions/ProductLinearExp.cpp +++ b/Framework/CurveFitting/src/Functions/ProductLinearExp.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCurveFitting/Functions/ProductLinearExp.h" #include "MantidAPI/FunctionFactory.h" diff --git a/Framework/CurveFitting/src/Functions/ProductQuadraticExp.cpp b/Framework/CurveFitting/src/Functions/ProductQuadraticExp.cpp index 0c9922850d7c66507fba0a082da5792c42e6a905..354be8c414e7699d300a3cc52e372f933e9584ab 100644 --- a/Framework/CurveFitting/src/Functions/ProductQuadraticExp.cpp +++ b/Framework/CurveFitting/src/Functions/ProductQuadraticExp.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCurveFitting/Functions/ProductQuadraticExp.h" #include "MantidAPI/FunctionFactory.h" diff --git a/Framework/CurveFitting/src/Functions/PseudoVoigt.cpp b/Framework/CurveFitting/src/Functions/PseudoVoigt.cpp index e4c174e8c19b52f4f37f4961fe713fb733164deb..b36f31d865168ea31939e50a7b80bb91f63a7a38 100644 --- a/Framework/CurveFitting/src/Functions/PseudoVoigt.cpp +++ b/Framework/CurveFitting/src/Functions/PseudoVoigt.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCurveFitting/Functions/PseudoVoigt.h" #include "MantidAPI/FunctionFactory.h" diff --git a/Framework/CurveFitting/src/Functions/Quadratic.cpp b/Framework/CurveFitting/src/Functions/Quadratic.cpp index 2f85ed2d94563f147eb352870bd1a84cddf330b0..743e40146b3db4da1bd347cfa9241ef4308c7c1f 100644 --- a/Framework/CurveFitting/src/Functions/Quadratic.cpp +++ b/Framework/CurveFitting/src/Functions/Quadratic.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/CurveFitting/src/Functions/ReflectivityMulf.cpp b/Framework/CurveFitting/src/Functions/ReflectivityMulf.cpp index dbc78438876622e270f0ae538523eed2eb628040..aeb13d53747640f783e32e21eab9aaad862da5db 100644 --- a/Framework/CurveFitting/src/Functions/ReflectivityMulf.cpp +++ b/Framework/CurveFitting/src/Functions/ReflectivityMulf.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCurveFitting/Functions/ReflectivityMulf.h" #include "MantidAPI/FunctionFactory.h" diff --git a/Framework/CurveFitting/src/Functions/Resolution.cpp b/Framework/CurveFitting/src/Functions/Resolution.cpp index bea2c71d1caf88b59986ba9b88d57345096b844c..6e14e561f016ab07eb96c712ed82366c2f68bc49 100644 --- a/Framework/CurveFitting/src/Functions/Resolution.cpp +++ b/Framework/CurveFitting/src/Functions/Resolution.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/CurveFitting/src/Functions/SimpleChebfun.cpp b/Framework/CurveFitting/src/Functions/SimpleChebfun.cpp index 468f1fbe306d17c4c602a5af1c11f110746fc129..bb5562a1a1263a8ce610c82f041df4b06eeef7a3 100644 --- a/Framework/CurveFitting/src/Functions/SimpleChebfun.cpp +++ b/Framework/CurveFitting/src/Functions/SimpleChebfun.cpp @@ -1,13 +1,14 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCurveFitting/Functions/SimpleChebfun.h" #include "MantidAPI/IFunction.h" #include <boost/make_shared.hpp> +#include <utility> namespace Mantid { namespace CurveFitting { @@ -27,7 +28,7 @@ SimpleChebfun::SimpleChebfun(size_t n, ChebfunFunctionType fun, double start, double end) : m_badFit(false) { m_base = boost::make_shared<ChebfunBase>(n, start, end); - m_P = m_base->fit(fun); + m_P = m_base->fit(std::move(fun)); } SimpleChebfun::SimpleChebfun(size_t n, const API::IFunction &fun, double start, @@ -49,8 +50,8 @@ SimpleChebfun::SimpleChebfun(size_t n, const API::IFunction &fun, double start, /// @param accuracy :: The accuracy of the approximation. /// @param badSize :: If automatic approxiamtion fails the base will have this /// size. -SimpleChebfun::SimpleChebfun(ChebfunFunctionType fun, double start, double end, - double accuracy, size_t badSize) +SimpleChebfun::SimpleChebfun(const ChebfunFunctionType &fun, double start, + double end, double accuracy, size_t badSize) : m_badFit(false) { m_base = ChebfunBase::bestFitAnyTolerance<ChebfunFunctionType>( start, end, fun, m_P, m_A, accuracy); @@ -84,7 +85,7 @@ SimpleChebfun::SimpleChebfun(const std::vector<double> &x, } /// Construct an empty SimpleChebfun with shared base. -SimpleChebfun::SimpleChebfun(ChebfunBase_sptr base) : m_badFit(false) { +SimpleChebfun::SimpleChebfun(const ChebfunBase_sptr &base) : m_badFit(false) { assert(base); m_base = base; m_P.resize(base->size()); @@ -169,7 +170,7 @@ double SimpleChebfun::integrate() const { return m_base->integrate(m_P); } /// Add a C++ function to the function /// @param fun :: A function to add. -SimpleChebfun &SimpleChebfun::operator+=(ChebfunFunctionType fun) { +SimpleChebfun &SimpleChebfun::operator+=(const ChebfunFunctionType &fun) { auto &x = xPoints(); for (size_t i = 0; i < x.size(); ++i) { m_P[i] += fun(x[i]); diff --git a/Framework/CurveFitting/src/Functions/StaticKuboToyabe.cpp b/Framework/CurveFitting/src/Functions/StaticKuboToyabe.cpp index 443e9cfc3e16c93ee8e0f17446d57c9be0751147..2e7a730f252e61c2d831b11239ac63ace680609a 100644 --- a/Framework/CurveFitting/src/Functions/StaticKuboToyabe.cpp +++ b/Framework/CurveFitting/src/Functions/StaticKuboToyabe.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/CurveFitting/src/Functions/StaticKuboToyabeTimesExpDecay.cpp b/Framework/CurveFitting/src/Functions/StaticKuboToyabeTimesExpDecay.cpp index c348ec6842880addf7518c766bbdb8010a272858..79b0e76d8fe0454544fc0fdd59eb509a2b39e604 100644 --- a/Framework/CurveFitting/src/Functions/StaticKuboToyabeTimesExpDecay.cpp +++ b/Framework/CurveFitting/src/Functions/StaticKuboToyabeTimesExpDecay.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCurveFitting/Functions/StaticKuboToyabeTimesExpDecay.h" #include "MantidAPI/FunctionFactory.h" diff --git a/Framework/CurveFitting/src/Functions/StaticKuboToyabeTimesGausDecay.cpp b/Framework/CurveFitting/src/Functions/StaticKuboToyabeTimesGausDecay.cpp index 6e0dd8bad8fa23c4a097b9e09df1c62e9cbb0039..f7102b43009fd607694c39d3e3c3e996a791a837 100644 --- a/Framework/CurveFitting/src/Functions/StaticKuboToyabeTimesGausDecay.cpp +++ b/Framework/CurveFitting/src/Functions/StaticKuboToyabeTimesGausDecay.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCurveFitting/Functions/StaticKuboToyabeTimesGausDecay.h" #include "MantidAPI/FunctionFactory.h" diff --git a/Framework/CurveFitting/src/Functions/StaticKuboToyabeTimesStretchExp.cpp b/Framework/CurveFitting/src/Functions/StaticKuboToyabeTimesStretchExp.cpp index 0242014529075d3dd73434a35c6a93343daccaec..87221b8f04d955ea95c1d7f6821077f5b78a1c6c 100644 --- a/Framework/CurveFitting/src/Functions/StaticKuboToyabeTimesStretchExp.cpp +++ b/Framework/CurveFitting/src/Functions/StaticKuboToyabeTimesStretchExp.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCurveFitting/Functions/StaticKuboToyabeTimesStretchExp.h" #include "MantidAPI/FunctionFactory.h" diff --git a/Framework/CurveFitting/src/Functions/StretchExp.cpp b/Framework/CurveFitting/src/Functions/StretchExp.cpp index e6c3f433c49dc0b573c0d6ed3f9e95ab33d656c2..e6dd2bce091bf92f22ce49e824f7b267e7146c09 100644 --- a/Framework/CurveFitting/src/Functions/StretchExp.cpp +++ b/Framework/CurveFitting/src/Functions/StretchExp.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/CurveFitting/src/Functions/StretchExpMuon.cpp b/Framework/CurveFitting/src/Functions/StretchExpMuon.cpp index 19e3705b78dac3ee44dbb4a58d8b8e439c883da1..6c2a887d84b5114d0c028bd784fe274979c40fce 100644 --- a/Framework/CurveFitting/src/Functions/StretchExpMuon.cpp +++ b/Framework/CurveFitting/src/Functions/StretchExpMuon.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/CurveFitting/src/Functions/TabulatedFunction.cpp b/Framework/CurveFitting/src/Functions/TabulatedFunction.cpp index 8ef0e9d2d9f5ebce6929b750b44ad5a9e334936a..f4f3d938c5ce63719fd00620d6da9993349511f0 100644 --- a/Framework/CurveFitting/src/Functions/TabulatedFunction.cpp +++ b/Framework/CurveFitting/src/Functions/TabulatedFunction.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes @@ -18,6 +18,7 @@ #include <cmath> #include <fstream> #include <sstream> +#include <utility> namespace Mantid { namespace CurveFitting { @@ -315,7 +316,7 @@ void TabulatedFunction::loadWorkspace(const std::string &wsName) const { */ void TabulatedFunction::loadWorkspace( boost::shared_ptr<API::MatrixWorkspace> ws) const { - m_workspace = ws; + m_workspace = std::move(ws); m_setupFinished = false; } diff --git a/Framework/CurveFitting/src/Functions/TeixeiraWaterSQE.cpp b/Framework/CurveFitting/src/Functions/TeixeiraWaterSQE.cpp index 6b92ddd1a91eaba372ff2ac53a2bc05d145b185d..06e3d227a98da94f2f2718cfff5badc26ddd2c1c 100644 --- a/Framework/CurveFitting/src/Functions/TeixeiraWaterSQE.cpp +++ b/Framework/CurveFitting/src/Functions/TeixeiraWaterSQE.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + // Mantid Coding standars <http://www.mantidproject.org/Coding_Standards> // Main Module Header diff --git a/Framework/CurveFitting/src/Functions/ThermalNeutronBk2BkExpAlpha.cpp b/Framework/CurveFitting/src/Functions/ThermalNeutronBk2BkExpAlpha.cpp index bdc11c0e19bb26777930d2c74d4b0448ef02370a..745e7a923cd6b68a7dbc2864f3ca39d877a1716f 100644 --- a/Framework/CurveFitting/src/Functions/ThermalNeutronBk2BkExpAlpha.cpp +++ b/Framework/CurveFitting/src/Functions/ThermalNeutronBk2BkExpAlpha.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCurveFitting/Functions/ThermalNeutronBk2BkExpAlpha.h" #include "MantidAPI/FunctionFactory.h" diff --git a/Framework/CurveFitting/src/Functions/ThermalNeutronBk2BkExpBeta.cpp b/Framework/CurveFitting/src/Functions/ThermalNeutronBk2BkExpBeta.cpp index 9ed1c77085aa9671c6f8bd1746a359b82b83d35c..628ec9daa8b38ad6f0b84c13a9eb287d8284bff3 100644 --- a/Framework/CurveFitting/src/Functions/ThermalNeutronBk2BkExpBeta.cpp +++ b/Framework/CurveFitting/src/Functions/ThermalNeutronBk2BkExpBeta.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCurveFitting/Functions/ThermalNeutronBk2BkExpBeta.h" #include "MantidAPI/FunctionFactory.h" diff --git a/Framework/CurveFitting/src/Functions/ThermalNeutronBk2BkExpConvPVoigt.cpp b/Framework/CurveFitting/src/Functions/ThermalNeutronBk2BkExpConvPVoigt.cpp index 3734cb142eea0e5941061aea60bbc533e77df9d8..e10a7f27a61a8cf01b4970d280cc1e3a92fe03b5 100644 --- a/Framework/CurveFitting/src/Functions/ThermalNeutronBk2BkExpConvPVoigt.cpp +++ b/Framework/CurveFitting/src/Functions/ThermalNeutronBk2BkExpConvPVoigt.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCurveFitting/Functions/ThermalNeutronBk2BkExpConvPVoigt.h" #include "MantidAPI/FunctionFactory.h" diff --git a/Framework/CurveFitting/src/Functions/ThermalNeutronBk2BkExpSigma.cpp b/Framework/CurveFitting/src/Functions/ThermalNeutronBk2BkExpSigma.cpp index 722a12873145e61584eed68db20d1dff018c1bc9..91d9114dff172acb92615e5e2d5580c90f1f3bf5 100644 --- a/Framework/CurveFitting/src/Functions/ThermalNeutronBk2BkExpSigma.cpp +++ b/Framework/CurveFitting/src/Functions/ThermalNeutronBk2BkExpSigma.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCurveFitting/Functions/ThermalNeutronBk2BkExpSigma.h" #include "MantidAPI/FunctionFactory.h" diff --git a/Framework/CurveFitting/src/Functions/ThermalNeutronDtoTOFFunction.cpp b/Framework/CurveFitting/src/Functions/ThermalNeutronDtoTOFFunction.cpp index 0347e6919489ac81cddccba28da1281377aedd5b..89be09148de6cd15feb694229a3094b68ed377e1 100644 --- a/Framework/CurveFitting/src/Functions/ThermalNeutronDtoTOFFunction.cpp +++ b/Framework/CurveFitting/src/Functions/ThermalNeutronDtoTOFFunction.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCurveFitting/Functions/ThermalNeutronDtoTOFFunction.h" #include "MantidAPI/FunctionDomain1D.h" @@ -67,7 +67,7 @@ void ThermalNeutronDtoTOFFunction::function1D(double *out, * xValues containing the d-space value of peaks centres */ void ThermalNeutronDtoTOFFunction::function1D( - vector<double> &out, const vector<double> xValues) const { + vector<double> &out, const vector<double> &xValues) const { double dtt1 = getParameter(0); double dtt1t = getParameter(1); double dtt2t = getParameter(2); diff --git a/Framework/CurveFitting/src/Functions/UserFunction.cpp b/Framework/CurveFitting/src/Functions/UserFunction.cpp index a44540a0cdb254fbbe5016b8c0d8daf3fa355710..3138d72a5a2880f83258a8156f0cc7c9c61a7cc7 100644 --- a/Framework/CurveFitting/src/Functions/UserFunction.cpp +++ b/Framework/CurveFitting/src/Functions/UserFunction.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/CurveFitting/src/Functions/UserFunction1D.cpp b/Framework/CurveFitting/src/Functions/UserFunction1D.cpp index f4f3737b167e5d24d12753b1aaa8baeec60631c9..e969be81cd62b258f0e6006c2005fa017b21c356 100644 --- a/Framework/CurveFitting/src/Functions/UserFunction1D.cpp +++ b/Framework/CurveFitting/src/Functions/UserFunction1D.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/CurveFitting/src/Functions/VesuvioResolution.cpp b/Framework/CurveFitting/src/Functions/VesuvioResolution.cpp index e58687711f6cf3a2ed4173f66abd9d8ca39e26fc..a54eb0da79c601f6b0cf1a53f8c779373b5b7961 100644 --- a/Framework/CurveFitting/src/Functions/VesuvioResolution.cpp +++ b/Framework/CurveFitting/src/Functions/VesuvioResolution.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCurveFitting/Functions/VesuvioResolution.h" #include "MantidAPI/FunctionFactory.h" @@ -187,8 +187,6 @@ void VesuvioResolution::function1D(double *out, const double *xValues, std::copy(outVec.begin(), outVec.end(), out); } -/** - */ void VesuvioResolution::declareAttributes() { declareAttribute(MASS_NAME, IFunction::Attribute(m_mass)); } diff --git a/Framework/CurveFitting/src/Functions/Voigt.cpp b/Framework/CurveFitting/src/Functions/Voigt.cpp index 172beaa06054cea4efd070e8379eb6d06a057e9f..82e7d1ae2af9cfb20110feec4a282345f937127b 100644 --- a/Framework/CurveFitting/src/Functions/Voigt.cpp +++ b/Framework/CurveFitting/src/Functions/Voigt.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------------------------------- // Includes diff --git a/Framework/CurveFitting/src/GSLFunctions.cpp b/Framework/CurveFitting/src/GSLFunctions.cpp index 0c574a027a528c5ef4a2be50cd2ac34559112bc3..cfa30cce795b97ddccb4c621e6e038c5fa7a2cc9 100644 --- a/Framework/CurveFitting/src/GSLFunctions.cpp +++ b/Framework/CurveFitting/src/GSLFunctions.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes @@ -163,7 +163,7 @@ int gsl_fdf(const gsl_vector *x, void *params, gsl_vector *f, gsl_matrix *J) { * @param cf :: ICostFunction */ GSL_FitData::GSL_FitData( - boost::shared_ptr<CostFunctions::CostFuncLeastSquares> cf) + const boost::shared_ptr<CostFunctions::CostFuncLeastSquares> &cf) : function(cf->getFittingFunction()), costFunction(cf) { gsl_set_error_handler_off(); // number of active parameters diff --git a/Framework/CurveFitting/src/GSLMatrix.cpp b/Framework/CurveFitting/src/GSLMatrix.cpp index 165c525b29fc8ed40d13b4ca4a9debaebebb2728..2c37480bccc15907a580c35551845434c3dd5732 100644 --- a/Framework/CurveFitting/src/GSLMatrix.cpp +++ b/Framework/CurveFitting/src/GSLMatrix.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/CurveFitting/src/GSLVector.cpp b/Framework/CurveFitting/src/GSLVector.cpp index feece38e4ec2c6dbadecc39bb444cab986823246..87bdc8c1f11562ebacae17784617b581078fdef7 100644 --- a/Framework/CurveFitting/src/GSLVector.cpp +++ b/Framework/CurveFitting/src/GSLVector.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes @@ -168,18 +168,16 @@ GSLVector &GSLVector::operator*=(const GSLVector &v) { /// Multiply by a number /// @param d :: The number GSLVector &GSLVector::operator*=(const double d) { - for (auto &x : m_data) { - x *= d; - } + std::transform(m_data.begin(), m_data.end(), m_data.begin(), + [d](double x) { return x * d; }); return *this; } /// Add a number /// @param d :: The number GSLVector &GSLVector::operator+=(const double d) { - for (auto &x : m_data) { - x += d; - } + std::transform(m_data.begin(), m_data.end(), m_data.begin(), + [d](double x) { return x + d; }); return *this; } diff --git a/Framework/CurveFitting/src/GeneralDomainCreator.cpp b/Framework/CurveFitting/src/GeneralDomainCreator.cpp index 09059991a19e54dc5ca844cc6e22c7e723bc1f52..613aadede50b788505af2cd3962141bbcc102b94 100644 --- a/Framework/CurveFitting/src/GeneralDomainCreator.cpp +++ b/Framework/CurveFitting/src/GeneralDomainCreator.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCurveFitting/GeneralDomainCreator.h" #include "MantidAPI/FunctionDomainGeneral.h" diff --git a/Framework/CurveFitting/src/HistogramDomainCreator.cpp b/Framework/CurveFitting/src/HistogramDomainCreator.cpp index 6a5a408e9a36e73e2afd077cfbdea9a88a8e2913..5feb2e32c97a09ff2126caf32d449451a2acb43c 100644 --- a/Framework/CurveFitting/src/HistogramDomainCreator.cpp +++ b/Framework/CurveFitting/src/HistogramDomainCreator.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCurveFitting/HistogramDomainCreator.h" #include "MantidAPI/FunctionDomain1D.h" diff --git a/Framework/CurveFitting/src/IFittingAlgorithm.cpp b/Framework/CurveFitting/src/IFittingAlgorithm.cpp index 56904cc972ea214fa4db08912210e1c6afeb62c3..40d38142044ef380514c3a499dedcdeddbcc031d 100644 --- a/Framework/CurveFitting/src/IFittingAlgorithm.cpp +++ b/Framework/CurveFitting/src/IFittingAlgorithm.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCurveFitting/IFittingAlgorithm.h" diff --git a/Framework/CurveFitting/src/IMWDomainCreator.cpp b/Framework/CurveFitting/src/IMWDomainCreator.cpp index 5af7ac1f54c4290ff0730cd2f55214dd338c833c..6cbb4304fe0b8dea4e541582c411c60f0576aa04 100644 --- a/Framework/CurveFitting/src/IMWDomainCreator.cpp +++ b/Framework/CurveFitting/src/IMWDomainCreator.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + // Includes //---------------------------------------------------------------------- @@ -409,7 +409,7 @@ void IMWDomainCreator::addFunctionValuesToWS( const API::IFunction_sptr &function, boost::shared_ptr<API::MatrixWorkspace> &ws, const size_t wsIndex, const boost::shared_ptr<API::FunctionDomain> &domain, - boost::shared_ptr<API::FunctionValues> resultValues) const { + const boost::shared_ptr<API::FunctionValues> &resultValues) const { const size_t nData = resultValues->size(); resultValues->zeroCalculated(); diff --git a/Framework/CurveFitting/src/LatticeDomainCreator.cpp b/Framework/CurveFitting/src/LatticeDomainCreator.cpp index 18f85592d470bf83ab0bcd679524235df5ca4a7f..e8b1eeec1e0e6b0ad041028e6130ff6e2082881b 100644 --- a/Framework/CurveFitting/src/LatticeDomainCreator.cpp +++ b/Framework/CurveFitting/src/LatticeDomainCreator.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCurveFitting/LatticeDomainCreator.h" diff --git a/Framework/CurveFitting/src/LatticeFunction.cpp b/Framework/CurveFitting/src/LatticeFunction.cpp index 2ae9ae93497d479f696f3e349cbcb0dd4fa356b5..fa7cd87de462fd5a6d5de7f845a2f59e23c6bfd3 100644 --- a/Framework/CurveFitting/src/LatticeFunction.cpp +++ b/Framework/CurveFitting/src/LatticeFunction.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCurveFitting/LatticeFunction.h" #include "MantidAPI/FunctionFactory.h" diff --git a/Framework/CurveFitting/src/MSVesuvioHelpers.cpp b/Framework/CurveFitting/src/MSVesuvioHelpers.cpp index c8d3a7e22b526b8587692730f19a5aa212083e5b..dee5d43d3c1723bf8d5ca03f354c02e59d4a52d4 100644 --- a/Framework/CurveFitting/src/MSVesuvioHelpers.cpp +++ b/Framework/CurveFitting/src/MSVesuvioHelpers.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //----------------------------------------------------------------------------- // Includes diff --git a/Framework/CurveFitting/src/MultiDomainCreator.cpp b/Framework/CurveFitting/src/MultiDomainCreator.cpp index 37ab598b75c98293d7c098892b5f7e185a6d176f..6e3f69ff2d8d7de395867537350733211e81b77f 100644 --- a/Framework/CurveFitting/src/MultiDomainCreator.cpp +++ b/Framework/CurveFitting/src/MultiDomainCreator.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes @@ -15,6 +15,7 @@ #include "MantidAPI/WorkspaceProperty.h" #include "MantidKernel/Logger.h" +#include <memory> #include <sstream> #include <stdexcept> @@ -46,11 +47,12 @@ void MultiDomainCreator::createDomain( "Cannot create JointDomain: number of workspaces does not match " "the number of creators"); } - auto jointDomain = new API::JointDomain; + auto jointDomain = std::make_unique<API::JointDomain>(); API::FunctionValues_sptr values; i0 = 0; for (auto &creator : m_creators) { if (!creator) { + throw std::runtime_error("Missing domain creator"); } API::FunctionDomain_sptr domain; @@ -58,7 +60,7 @@ void MultiDomainCreator::createDomain( jointDomain->addDomain(domain); i0 += domain->size(); } - domain.reset(jointDomain); + domain.reset(jointDomain.release()); ivalues = values; } diff --git a/Framework/CurveFitting/src/ParDomain.cpp b/Framework/CurveFitting/src/ParDomain.cpp index 0aaba011b5395a64033df07e34037bef5c07366e..69e0958155890bcf33435aebb1d82a8fd862ddb7 100644 --- a/Framework/CurveFitting/src/ParDomain.cpp +++ b/Framework/CurveFitting/src/ParDomain.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/CurveFitting/src/ParameterEstimator.cpp b/Framework/CurveFitting/src/ParameterEstimator.cpp index 57172e7a7312b4a74a66c0e582344a97b97a596c..34a7e79561457265a16ce7911aca827c7f43972d 100644 --- a/Framework/CurveFitting/src/ParameterEstimator.cpp +++ b/Framework/CurveFitting/src/ParameterEstimator.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCurveFitting/ParameterEstimator.h" #include "MantidCurveFitting/Functions/SimpleChebfun.h" diff --git a/Framework/CurveFitting/src/RalNlls/TrustRegion.cpp b/Framework/CurveFitting/src/RalNlls/TrustRegion.cpp index 64f17bd5f262bda26257b18cd5fe1cb261a6c091..3b061c6baba1ab3803038530f3a76560b69de081 100644 --- a/Framework/CurveFitting/src/RalNlls/TrustRegion.cpp +++ b/Framework/CurveFitting/src/RalNlls/TrustRegion.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + // This code was originally translated from Fortran code on // https://ccpforge.cse.rl.ac.uk/gf/project/ral_nlls June 2016 diff --git a/Framework/CurveFitting/src/RalNlls/Workspaces.cpp b/Framework/CurveFitting/src/RalNlls/Workspaces.cpp index ef1a3058df0524cddc36d6e8c31de2d81176fad4..f6819ea85fdddfd93d7ad50609d965b6432da8cc 100644 --- a/Framework/CurveFitting/src/RalNlls/Workspaces.cpp +++ b/Framework/CurveFitting/src/RalNlls/Workspaces.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + // This code was originally translated from Fortran code on // https://ccpforge.cse.rl.ac.uk/gf/project/ral_nlls June 2016 diff --git a/Framework/CurveFitting/src/SeqDomain.cpp b/Framework/CurveFitting/src/SeqDomain.cpp index afa0be20ae25f597301f839858c9addd427b8244..e5539de7cb20c20bc668e3a84ebf2ce5eba40c35 100644 --- a/Framework/CurveFitting/src/SeqDomain.cpp +++ b/Framework/CurveFitting/src/SeqDomain.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes @@ -50,7 +50,7 @@ void SeqDomain::getDomainAndValues(size_t i, API::FunctionDomain_sptr &domain, * Add new domain creator * @param creator :: A shared pointer to a new creator. */ -void SeqDomain::addCreator(API::IDomainCreator_sptr creator) { +void SeqDomain::addCreator(const API::IDomainCreator_sptr &creator) { m_creators.emplace_back(creator); m_domain.emplace_back(API::FunctionDomain_sptr()); m_values.emplace_back(API::FunctionValues_sptr()); diff --git a/Framework/CurveFitting/src/SeqDomainSpectrumCreator.cpp b/Framework/CurveFitting/src/SeqDomainSpectrumCreator.cpp index 1732cc32a6eeace5a2026d83e4a2187c1955ce16..e93e0e1bd1a92aa83838a408356b50abe15ecced 100644 --- a/Framework/CurveFitting/src/SeqDomainSpectrumCreator.cpp +++ b/Framework/CurveFitting/src/SeqDomainSpectrumCreator.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCurveFitting/SeqDomainSpectrumCreator.h" #include "MantidAPI/IEventWorkspace.h" @@ -208,7 +208,7 @@ void SeqDomainSpectrumCreator::setParametersFromPropertyManager() { /// Sets the MatrixWorkspace the created domain is based on. void SeqDomainSpectrumCreator::setMatrixWorkspace( - MatrixWorkspace_sptr matrixWorkspace) { + const MatrixWorkspace_sptr &matrixWorkspace) { if (!matrixWorkspace) { throw std::invalid_argument( "InputWorkspace must be a valid MatrixWorkspace."); diff --git a/Framework/CurveFitting/src/SpecialFunctionHelper.cpp b/Framework/CurveFitting/src/SpecialFunctionHelper.cpp index 88ddac608f6eacba78eee616aa99d36590a7e432..e2e99184d055ac6e1cbd72873cfbac910f96f7fa 100644 --- a/Framework/CurveFitting/src/SpecialFunctionHelper.cpp +++ b/Framework/CurveFitting/src/SpecialFunctionHelper.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCurveFitting/SpecialFunctionSupport.h" #include <gsl/gsl_math.h> diff --git a/Framework/CurveFitting/src/TableWorkspaceDomainCreator.cpp b/Framework/CurveFitting/src/TableWorkspaceDomainCreator.cpp index 4f0df135f975558b30b982001f7dd05414f394c1..d419d2f76fb3f202187b11daea4bc157e71dd84a 100644 --- a/Framework/CurveFitting/src/TableWorkspaceDomainCreator.cpp +++ b/Framework/CurveFitting/src/TableWorkspaceDomainCreator.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + // Includes //---------------------------------------------------------------------- @@ -174,8 +174,6 @@ void TableWorkspaceDomainCreator::declareDatasetProperties( "(default the highest value of x)"); if (m_domainType != Simple && !m_manager->existsProperty(m_maxSizePropertyName)) { - auto mustBePositive = boost::make_shared<BoundedValidator<int>>(); - mustBePositive->setLower(0); declareProperty( new PropertyWithValue<int>(m_maxSizePropertyName, 1, mustBePositive), "The maximum number of values per a simple domain."); @@ -463,7 +461,7 @@ void TableWorkspaceDomainCreator::addFunctionValuesToWS( const API::IFunction_sptr &function, boost::shared_ptr<API::MatrixWorkspace> &ws, const size_t wsIndex, const boost::shared_ptr<API::FunctionDomain> &domain, - boost::shared_ptr<API::FunctionValues> resultValues) const { + const boost::shared_ptr<API::FunctionValues> &resultValues) const { const size_t nData = resultValues->size(); resultValues->zeroCalculated(); @@ -728,7 +726,7 @@ void TableWorkspaceDomainCreator::setParameters() const { */ void TableWorkspaceDomainCreator::setXYEColumnNames( - API::ITableWorkspace_sptr ws) const { + const API::ITableWorkspace_sptr &ws) const { auto columnNames = ws->getColumnNames(); @@ -784,7 +782,7 @@ void TableWorkspaceDomainCreator::setXYEColumnNames( * entries. */ void TableWorkspaceDomainCreator::setAndValidateWorkspace( - API::Workspace_sptr ws) const { + const API::Workspace_sptr &ws) const { auto tableWorkspace = boost::dynamic_pointer_cast<API::ITableWorkspace>(ws); if (!tableWorkspace) { throw std::invalid_argument("InputWorkspace must be a TableWorkspace."); diff --git a/Framework/CurveFitting/test/Algorithms/CalculateChiSquaredTest.h b/Framework/CurveFitting/test/Algorithms/CalculateChiSquaredTest.h index beb27a7b54ef10d957ab447a4c03ac7a5c8d5197..054970a044aa217d1e59c51ba7dbf4229bfe9a49 100644 --- a/Framework/CurveFitting/test/Algorithms/CalculateChiSquaredTest.h +++ b/Framework/CurveFitting/test/Algorithms/CalculateChiSquaredTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/Algorithms/CalculateCostFunctionTest.h b/Framework/CurveFitting/test/Algorithms/CalculateCostFunctionTest.h index 9e7857ba5f1c9c0e0c6088e4820ad9dbb1f2500e..469ce86948972dffd07c8557415a2cadec55f759 100644 --- a/Framework/CurveFitting/test/Algorithms/CalculateCostFunctionTest.h +++ b/Framework/CurveFitting/test/Algorithms/CalculateCostFunctionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/Algorithms/ConvertToYSpaceTest.h b/Framework/CurveFitting/test/Algorithms/ConvertToYSpaceTest.h index 238d5e488be5ee5524126add8887c03ae11468c8..1b4a80dc536dd31212ba5bc4b1207b60861c1958 100644 --- a/Framework/CurveFitting/test/Algorithms/ConvertToYSpaceTest.h +++ b/Framework/CurveFitting/test/Algorithms/ConvertToYSpaceTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/Algorithms/ConvolutionFitSequentialTest.h b/Framework/CurveFitting/test/Algorithms/ConvolutionFitSequentialTest.h index cafb216e6b8dab2b80df5db07eb7f020281719f9..eab6d230eaa657691c85d7d2dc2a1deacfe13448 100644 --- a/Framework/CurveFitting/test/Algorithms/ConvolutionFitSequentialTest.h +++ b/Framework/CurveFitting/test/Algorithms/ConvolutionFitSequentialTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -328,8 +328,9 @@ public: return AnalysisDataService::Instance().retrieveWS<T>(name); } - MatrixWorkspace_sptr getMatrixWorkspace(WorkspaceGroup_const_sptr group, - std::size_t index) { + MatrixWorkspace_sptr + getMatrixWorkspace(const WorkspaceGroup_const_sptr &group, + std::size_t index) { return boost::dynamic_pointer_cast<MatrixWorkspace>(group->getItem(index)); } diff --git a/Framework/CurveFitting/test/Algorithms/ConvolveWorkspacesTest.h b/Framework/CurveFitting/test/Algorithms/ConvolveWorkspacesTest.h index a8a19a96a3ca6cca961b9a845c97716e47abd879..ce62611fd18755096b2ed028be45deba8c47d432 100644 --- a/Framework/CurveFitting/test/Algorithms/ConvolveWorkspacesTest.h +++ b/Framework/CurveFitting/test/Algorithms/ConvolveWorkspacesTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/Algorithms/EstimateFitParametersTest.h b/Framework/CurveFitting/test/Algorithms/EstimateFitParametersTest.h index 0c6d79c3fa7904f30eb4476d4ab9b5e218f00282..05685926cd9446bc337a9e20302eee84ef845245 100644 --- a/Framework/CurveFitting/test/Algorithms/EstimateFitParametersTest.h +++ b/Framework/CurveFitting/test/Algorithms/EstimateFitParametersTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/Algorithms/EstimatePeakErrorsTest.h b/Framework/CurveFitting/test/Algorithms/EstimatePeakErrorsTest.h index a0f61ff9ecc2b1423e3e75bc3a7a2bade7a74eee..b1f142ce66c598150b6390f0143307c6f1799b41 100644 --- a/Framework/CurveFitting/test/Algorithms/EstimatePeakErrorsTest.h +++ b/Framework/CurveFitting/test/Algorithms/EstimatePeakErrorsTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/Algorithms/EvaluateFunctionTest.h b/Framework/CurveFitting/test/Algorithms/EvaluateFunctionTest.h index c9a09b61ec897ec3673e6decfb6636d4d6ef48bb..0e9434dd2fc27a784628d4169f6b69c37b4ec0fb 100644 --- a/Framework/CurveFitting/test/Algorithms/EvaluateFunctionTest.h +++ b/Framework/CurveFitting/test/Algorithms/EvaluateFunctionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/Algorithms/FitPowderDiffPeaksTest.h b/Framework/CurveFitting/test/Algorithms/FitPowderDiffPeaksTest.h index 523c8554539241623aa4fbc92dc8349e27c925c5..5272a2ec933730c50354e7efaa8adfee00e4d381 100644 --- a/Framework/CurveFitting/test/Algorithms/FitPowderDiffPeaksTest.h +++ b/Framework/CurveFitting/test/Algorithms/FitPowderDiffPeaksTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -32,7 +32,8 @@ namespace { //---------------------------------------------------------------------------------------------- /** Import data from a column data file by calling LoadAscii */ -void importDataFromColumnFile(string filename, string datawsname) { +void importDataFromColumnFile(const string &filename, + const string &datawsname) { // 1. Call LoadAscii DataHandling::LoadAscii2 loader; loader.initialize(); @@ -96,7 +97,7 @@ API::MatrixWorkspace_sptr createInputDataWorkspace(int option) { //---------------------------------------------------------------------------------------------- /** Create the Bragg peak parameters table for LaB6, PG3, Bank1 */ -void createLaB6PG3Bank1BraggPeaksTable(TableWorkspace_sptr tablews) { +void createLaB6PG3Bank1BraggPeaksTable(const TableWorkspace_sptr &tablews) { TableRow newrow0 = tablews->appendRow(); newrow0 << 6 << 3 << 1 << .6129000 << 13962.47 << 0.20687 << 0.10063 << 62.64174 << 0.00000; @@ -266,7 +267,7 @@ DataObjects::TableWorkspace_sptr createReflectionWorkspace(int option) { //---------------------------------------------------------------------------------------------- /** Add rows for input table workspace for PG3 bank1 */ -void createPG3Bank1ParameterTable(TableWorkspace_sptr tablews) { +void createPG3Bank1ParameterTable(const TableWorkspace_sptr &tablews) { TableRow newrow0 = tablews->appendRow(); newrow0 << "Alph0" << 2.708; TableRow newrow1 = tablews->appendRow(); diff --git a/Framework/CurveFitting/test/Algorithms/FitTest.h b/Framework/CurveFitting/test/Algorithms/FitTest.h index d356720ec4a2911c3d07e3fef5d9a7b7f83fae7c..48a3e74d71ce679d4ce7e2cc324b71070baebfcb 100644 --- a/Framework/CurveFitting/test/Algorithms/FitTest.h +++ b/Framework/CurveFitting/test/Algorithms/FitTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -1029,7 +1029,6 @@ public: TS_ASSERT(alg2.isInitialized()); // create mock data to test against - const std::string wsName = "ExpDecayMockData"; const int histogramNumber = 1; const int timechannels = 20; Workspace_sptr ws = WorkspaceFactory::Instance().create( diff --git a/Framework/CurveFitting/test/Algorithms/FitTestHelpers.h b/Framework/CurveFitting/test/Algorithms/FitTestHelpers.h index 589493e3485027d48af74e1e03bbe720bceed1b0..e1c8c657f7ee5d3054914a1d6c7c16224bcc4bf1 100644 --- a/Framework/CurveFitting/test/Algorithms/FitTestHelpers.h +++ b/Framework/CurveFitting/test/Algorithms/FitTestHelpers.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -26,8 +26,8 @@ static API::MatrixWorkspace_sptr generateSmoothCurveWorkspace(); /// Run fit on a (single spectrum) matrix workspace, using the given type /// of function and minimizer option static Mantid::API::IAlgorithm_sptr -runFitAlgorithm(MatrixWorkspace_sptr dataToFit, CurveBenchmarks ctype, - const std::string minimizer = "Levenberg-MarquardtMD") { +runFitAlgorithm(const MatrixWorkspace_sptr &dataToFit, CurveBenchmarks ctype, + const std::string &minimizer = "Levenberg-MarquardtMD") { auto fit = AlgorithmManager::Instance().create("Fit"); fit->initialize(); diff --git a/Framework/CurveFitting/test/Algorithms/LeBailFitTest.h b/Framework/CurveFitting/test/Algorithms/LeBailFitTest.h index 6748019c51861c01c6026185d1e035543dbf66fa..b43f134bd99af16ab150437afcc38ca9e24d8cd2 100644 --- a/Framework/CurveFitting/test/Algorithms/LeBailFitTest.h +++ b/Framework/CurveFitting/test/Algorithms/LeBailFitTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -424,46 +424,6 @@ API::MatrixWorkspace_sptr generateArgSiPeak220() { return dataws; } -//---------------------------------------------------------------------------------------------- -/** Import data from a column data file - */ -void importDataFromColumnFile(std::string filename, std::string wsname) { - DataHandling::LoadAscii2 load; - load.initialize(); - - load.setProperty("FileName", filename); - load.setProperty("OutputWorkspace", wsname); - load.setProperty("Separator", "Automatic"); - load.setProperty("Unit", "TOF"); - - load.execute(); - if (!load.isExecuted()) { - stringstream errss; - errss << "Data file " << filename << " cannot be opened. "; - std::cout << errss.str() << '\n'; - throw std::runtime_error(errss.str()); - } - - MatrixWorkspace_sptr ws = boost::dynamic_pointer_cast<MatrixWorkspace>( - AnalysisDataService::Instance().retrieve(wsname)); - if (!ws) { - stringstream errss; - errss << "LoadAscii failed to generate workspace"; - std::cout << errss.str() << '\n'; - throw std::runtime_error(errss.str()); - } - - // Set error - const MantidVec &vecY = ws->readY(0); - MantidVec &vecE = ws->dataE(0); - size_t numpts = vecY.size(); - for (size_t i = 0; i < numpts; ++i) { - vecE[i] = std::max(1.0, sqrt(vecY[i])); - } - - return; -} - //---------------------------------------------------------------------------------------------- /** Create data workspace without background */ @@ -499,17 +459,9 @@ API::MatrixWorkspace_sptr createInputDataWorkspace(int option) { break; } - } else if (option == 4) { + } else { // Load from column file throw runtime_error("Using .dat file is not allowed for committing. "); - string datafilename("PG3_4862_Bank7.dat"); - string wsname("Data"); - importDataFromColumnFile(datafilename, wsname); - dataws = boost::dynamic_pointer_cast<MatrixWorkspace>( - AnalysisDataService::Instance().retrieve(wsname)); - } else { - // not supported - throw std::invalid_argument("Logic error. "); } return dataws; @@ -1295,7 +1247,7 @@ public: * Parse parameter table workspace to 2 map */ void - parseParameterTableWorkspace(DataObjects::TableWorkspace_sptr paramws, + parseParameterTableWorkspace(const DataObjects::TableWorkspace_sptr ¶mws, std::map<std::string, double> ¶mvalues, std::map<std::string, char> ¶mfitstatus) { diff --git a/Framework/CurveFitting/test/Algorithms/LeBailFunctionTest.h b/Framework/CurveFitting/test/Algorithms/LeBailFunctionTest.h index 41746bc1a78d7d844a3609365da71519555e125b..b8b8ab8d8a392ef556ec797d1e665d4de0a639d8 100644 --- a/Framework/CurveFitting/test/Algorithms/LeBailFunctionTest.h +++ b/Framework/CurveFitting/test/Algorithms/LeBailFunctionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -216,7 +216,7 @@ public: << imax111 << "-th points.\n"; // Calculate diffraction patters - auto out = lebailfunction.function(vecX, true, false); + lebailfunction.function(vecX, true, false); TS_ASSERT_THROWS_ANYTHING(lebailfunction.function(vecX, true, true)); vector<string> vecbkgdparnames(2); @@ -228,7 +228,7 @@ public: lebailfunction.addBackgroundFunction("Polynomial", 2, vecbkgdparnames, bkgdvec, vecX.front(), vecX.back()); - out = lebailfunction.function(vecX, true, true); + auto out = lebailfunction.function(vecX, true, true); double v1 = out[imax111]; double v2 = out[imax110]; @@ -428,7 +428,8 @@ public: return ws; } - void importDataFromColumnFile(std::string filename, std::vector<double> &vecX, + void importDataFromColumnFile(const std::string &filename, + std::vector<double> &vecX, std::vector<double> &vecY, std::vector<double> &vecE) { std::ifstream ins; @@ -440,7 +441,6 @@ public: if (line[0] != '#') { double x, y; std::stringstream ss; - std::string dataline(line); ss.str(line); ss >> x >> y; vecX.emplace_back(x); diff --git a/Framework/CurveFitting/test/Algorithms/NormaliseByPeakAreaTest.h b/Framework/CurveFitting/test/Algorithms/NormaliseByPeakAreaTest.h index 0e3a3c53bd75ff434e0975ecb7184cf731b1fc5f..59d7f8086e4ed83c765531ac6de4a40c7e97772f 100644 --- a/Framework/CurveFitting/test/Algorithms/NormaliseByPeakAreaTest.h +++ b/Framework/CurveFitting/test/Algorithms/NormaliseByPeakAreaTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/Algorithms/PawleyFitTest.h b/Framework/CurveFitting/test/Algorithms/PawleyFitTest.h index 052210f2372845aa12d8cb7b1b4aff3e384ea7bf..da889568d1838c6aa7ec873b59f78c50d616c496 100644 --- a/Framework/CurveFitting/test/Algorithms/PawleyFitTest.h +++ b/Framework/CurveFitting/test/Algorithms/PawleyFitTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/Algorithms/PlotPeakByLogValueHelperTest.h b/Framework/CurveFitting/test/Algorithms/PlotPeakByLogValueHelperTest.h index 3c1da88908061dec0a0c2c22657ea1eab9911358..81c8b1d638584304975ef74721fff6d71f0ba99b 100644 --- a/Framework/CurveFitting/test/Algorithms/PlotPeakByLogValueHelperTest.h +++ b/Framework/CurveFitting/test/Algorithms/PlotPeakByLogValueHelperTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/Algorithms/PlotPeakByLogValueTest.h b/Framework/CurveFitting/test/Algorithms/PlotPeakByLogValueTest.h index 05c3e37f4d3ace1e3d82dd729c62230d19e584b1..5376a94005d77960d582dfee9c40685925a068fa 100644 --- a/Framework/CurveFitting/test/Algorithms/PlotPeakByLogValueTest.h +++ b/Framework/CurveFitting/test/Algorithms/PlotPeakByLogValueTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -29,6 +29,7 @@ #include "MantidTestHelpers/WorkspaceCreationHelper.h" #include <algorithm> #include <sstream> +#include <utility> using namespace Mantid; using namespace Mantid::API; @@ -67,9 +68,9 @@ DECLARE_FUNCTION(PLOTPEAKBYLOGVALUETEST_Fun) class PropertyNameIs { public: - PropertyNameIs(std::string name) : m_name(name){}; + PropertyNameIs(std::string name) : m_name(std::move(name)){}; - bool operator()(Mantid::Kernel::PropertyHistory_sptr p) { + bool operator()(const Mantid::Kernel::PropertyHistory_sptr &p) { return p->name() == m_name; } @@ -624,8 +625,6 @@ private: ws->setSharedX(1, ws->sharedX(0)); ws->setSharedX(2, ws->sharedX(0)); - std::vector<double> amps{20.0, 30.0, 25.0}; - std::vector<double> cents{0.0, 0.1, -1.0}; std::vector<double> fwhms{1.0, 1.1, 0.6}; for (size_t i = 0; i < 3; ++i) { std::string fun = "name=FlatBackground,A0=" + std::to_string(fwhms[i]); diff --git a/Framework/CurveFitting/test/Algorithms/QENSFitSequentialTest.h b/Framework/CurveFitting/test/Algorithms/QENSFitSequentialTest.h index ad113bb917a74a27485cf7955c5e0af7badc154c..b2361e2145b0842a902cde68bd98b59a85394d5b 100644 --- a/Framework/CurveFitting/test/Algorithms/QENSFitSequentialTest.h +++ b/Framework/CurveFitting/test/Algorithms/QENSFitSequentialTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -79,8 +79,8 @@ public: } private: - std::string runConvolutionFit(MatrixWorkspace_sptr inputWorkspace, - MatrixWorkspace_sptr resolution) { + std::string runConvolutionFit(const MatrixWorkspace_sptr &inputWorkspace, + const MatrixWorkspace_sptr &resolution) { QENSFitSequential alg; TS_ASSERT_THROWS_NOTHING(alg.initialize()); @@ -207,7 +207,7 @@ private: return resolution; } - void addBinsAndCountsToWorkspace(Workspace2D_sptr workspace, + void addBinsAndCountsToWorkspace(const Workspace2D_sptr &workspace, std::size_t totalBinEdges, std::size_t totalCounts, double binValue, double countValue) const { diff --git a/Framework/CurveFitting/test/Algorithms/QENSFitSimultaneousTest.h b/Framework/CurveFitting/test/Algorithms/QENSFitSimultaneousTest.h index 0715c6c3d021131012d26beb14994e0e11933aab..bb53acfbbe53e89e0575d388cf89d72e1e9f1583 100644 --- a/Framework/CurveFitting/test/Algorithms/QENSFitSimultaneousTest.h +++ b/Framework/CurveFitting/test/Algorithms/QENSFitSimultaneousTest.h @@ -1,13 +1,15 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include <cxxtest/TestSuite.h> +#include <utility> + #include "MantidAPI/Axis.h" #include "MantidAPI/FrameworkManager.h" #include "MantidAPI/FunctionFactory.h" @@ -84,8 +86,8 @@ public: } private: - std::string runConvolutionFit(MatrixWorkspace_sptr inputWorkspace, - MatrixWorkspace_sptr resolution) { + std::string runConvolutionFit(const MatrixWorkspace_sptr &inputWorkspace, + const MatrixWorkspace_sptr &resolution) { QENSFitSimultaneous alg; TS_ASSERT_THROWS_NOTHING(alg.initialize()); @@ -107,12 +109,12 @@ private: std::string runMultiDatasetFit( const std::vector<Mantid::API::MatrixWorkspace_sptr> &workspaces, - IFunction_sptr function) { + const IFunction_sptr &function) { QENSFitSimultaneous alg; TS_ASSERT_THROWS_NOTHING(alg.initialize()); - alg.setProperty("Function", - createMultiDomainFunction(function, workspaces.size())); + alg.setProperty("Function", createMultiDomainFunction(std::move(function), + workspaces.size())); setMultipleInput(alg, workspaces, 0.0, 10.0); alg.setProperty("ConvolveMembers", true); alg.setProperty("Minimizer", "Levenberg-Marquardt"); @@ -197,7 +199,7 @@ private: return resolution; } - void addBinsAndCountsToWorkspace(Workspace2D_sptr workspace, + void addBinsAndCountsToWorkspace(const Workspace2D_sptr &workspace, std::size_t totalBinEdges, std::size_t totalCounts, double binValue, double countValue) const { @@ -232,7 +234,7 @@ private: } } - IFunction_sptr createMultiDomainFunction(IFunction_sptr function, + IFunction_sptr createMultiDomainFunction(const IFunction_sptr &function, std::size_t numberOfDomains) { auto multiDomainFunction = boost::make_shared<MultiDomainFunction>(); diff --git a/Framework/CurveFitting/test/Algorithms/RefinePowderInstrumentParameters3Test.h b/Framework/CurveFitting/test/Algorithms/RefinePowderInstrumentParameters3Test.h index 69f687a63e94555703a74bb93c44f643c451e1b8..c7f8debc5a0f9b21f80fa5ba2848479d8e18e7a2 100644 --- a/Framework/CurveFitting/test/Algorithms/RefinePowderInstrumentParameters3Test.h +++ b/Framework/CurveFitting/test/Algorithms/RefinePowderInstrumentParameters3Test.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -117,7 +117,7 @@ TableWorkspace_sptr generateInstrumentProfileTableBank1() { //---------------------------------------------------------------------------------------------- /** Parse Table Workspace to a map of string, double pair */ -void parseParameterTableWorkspace(TableWorkspace_sptr paramws, +void parseParameterTableWorkspace(const TableWorkspace_sptr ¶mws, map<string, double> ¶mvalues) { for (size_t irow = 0; irow < paramws->rowCount(); ++irow) { Mantid::API::TableRow row = paramws->getRow(irow); diff --git a/Framework/CurveFitting/test/Algorithms/RefinePowderInstrumentParametersTest.h b/Framework/CurveFitting/test/Algorithms/RefinePowderInstrumentParametersTest.h index 4ad73f3b254e85d493272fff83389f45547cc792..487a1b787c4d1637629e03648415c6916b6081b4 100644 --- a/Framework/CurveFitting/test/Algorithms/RefinePowderInstrumentParametersTest.h +++ b/Framework/CurveFitting/test/Algorithms/RefinePowderInstrumentParametersTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -327,7 +327,7 @@ public: * BETA, ... */ void - importPeakParametersFile(std::string filename, + importPeakParametersFile(const std::string &filename, std::vector<std::vector<int>> &hkls, std::vector<std::vector<double>> &peakparameters) { // 1. Open file @@ -441,7 +441,7 @@ public: * Input: a text based file * Output: a map for (parameter name, parameter value) */ - void importInstrumentTxtFile(std::string filename, + void importInstrumentTxtFile(const std::string &filename, std::map<std::string, double> ¶meters, std::map<string, vector<double>> ¶metermcs) { // 1. Open file @@ -462,14 +462,14 @@ public: while (ins.getline(line, 256)) { if (line[0] != '#') { std::string parname; - double parvalue, parmin, parmax, parstepsize; - + double parvalue; std::stringstream ss; ss.str(line); ss >> parname >> parvalue; parameters.emplace(parname, parvalue); try { + double parmin, parmax, parstepsize; ss >> parmin >> parmax >> parstepsize; vector<double> mcpars; mcpars.emplace_back(parmin); @@ -488,9 +488,9 @@ public: } /// ================= Check Output ================ /// - void - parseParameterTableWorkspace(Mantid::DataObjects::TableWorkspace_sptr paramws, - std::map<std::string, double> ¶mvalues) { + void parseParameterTableWorkspace( + const Mantid::DataObjects::TableWorkspace_sptr ¶mws, + std::map<std::string, double> ¶mvalues) { for (size_t irow = 0; irow < paramws->rowCount(); ++irow) { Mantid::API::TableRow row = paramws->getRow(irow); diff --git a/Framework/CurveFitting/test/Algorithms/SeqDomainSpectrumCreatorTest.h b/Framework/CurveFitting/test/Algorithms/SeqDomainSpectrumCreatorTest.h index a3232065073bc7579be43d1bafce83fc09f83d41..e2b2f22c23961b8a02daf2b29f0806d41ec815ca 100644 --- a/Framework/CurveFitting/test/Algorithms/SeqDomainSpectrumCreatorTest.h +++ b/Framework/CurveFitting/test/Algorithms/SeqDomainSpectrumCreatorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/Algorithms/SplineBackgroundTest.h b/Framework/CurveFitting/test/Algorithms/SplineBackgroundTest.h index fca5e50fa6e47a1576835c9b778547751df44c62..38dcd6b546db218a923fa336b1ee4b715b0017f3 100644 --- a/Framework/CurveFitting/test/Algorithms/SplineBackgroundTest.h +++ b/Framework/CurveFitting/test/Algorithms/SplineBackgroundTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/Algorithms/SplineInterpolationTest.h b/Framework/CurveFitting/test/Algorithms/SplineInterpolationTest.h index d46fdb32f662411aef4d38994e60933d11f873e9..08869b85d9f96ed6e5b8a0a3853f8ce397f0bd67 100644 --- a/Framework/CurveFitting/test/Algorithms/SplineInterpolationTest.h +++ b/Framework/CurveFitting/test/Algorithms/SplineInterpolationTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/Algorithms/SplineSmoothingTest.h b/Framework/CurveFitting/test/Algorithms/SplineSmoothingTest.h index 1ca49e0aaba476d1d5f19d5cce57054b8dbf93ff..b0ca0f986a435f710e07b65ed296450c921919d1 100644 --- a/Framework/CurveFitting/test/Algorithms/SplineSmoothingTest.h +++ b/Framework/CurveFitting/test/Algorithms/SplineSmoothingTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/Algorithms/VesuvioCalculateGammaBackgroundTest.h b/Framework/CurveFitting/test/Algorithms/VesuvioCalculateGammaBackgroundTest.h index e1e2644ce56df572f91b02f5b63a09398912a532..b77d5954ccf8eb839accf05167c7876d969d4228 100644 --- a/Framework/CurveFitting/test/Algorithms/VesuvioCalculateGammaBackgroundTest.h +++ b/Framework/CurveFitting/test/Algorithms/VesuvioCalculateGammaBackgroundTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/Algorithms/VesuvioCalculateMSTest.h b/Framework/CurveFitting/test/Algorithms/VesuvioCalculateMSTest.h index 4302b741a7cdb1fa1bb2cb5b906fab169eb01063..1cd87e4413ca945a2a531ad8da3fe7e0f9ef6bf8 100644 --- a/Framework/CurveFitting/test/Algorithms/VesuvioCalculateMSTest.h +++ b/Framework/CurveFitting/test/Algorithms/VesuvioCalculateMSTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/AugmentedLagrangianOptimizerTest.h b/Framework/CurveFitting/test/AugmentedLagrangianOptimizerTest.h index a23bcf607b415cb6ab27aae0191354f52ff0c224..da2b7b43de55c4f1bbca6c7d686b091d99b7e188 100644 --- a/Framework/CurveFitting/test/AugmentedLagrangianOptimizerTest.h +++ b/Framework/CurveFitting/test/AugmentedLagrangianOptimizerTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/CMakeLists.txt b/Framework/CurveFitting/test/CMakeLists.txt index d4e74d286b179d7002e71b387186697650d1426f..7a8562a2c2e996b216d4643649f68c567f66a7c2 100644 --- a/Framework/CurveFitting/test/CMakeLists.txt +++ b/Framework/CurveFitting/test/CMakeLists.txt @@ -1,8 +1,7 @@ if(CXXTEST_FOUND) include_directories(SYSTEM ${CXXTEST_INCLUDE_DIR} - ${GMOCK_INCLUDE_DIR} - ${GTEST_INCLUDE_DIR}) +) include_directories(../../DataHandling/inc ../../TestHelpers/inc) # This variable is used within the cxxtest_add_test macro to build these @@ -24,8 +23,8 @@ if(CXXTEST_FOUND) CurveFitting DataHandling ${GSL_LIBRARIES} - ${GMOCK_LIBRARIES} - ${GTEST_LIBRARIES}) + gmock +) add_dependencies(CurveFittingTest Algorithms) add_dependencies(FrameworkTests CurveFittingTest) # Test data diff --git a/Framework/CurveFitting/test/ComplexMatrixTest.h b/Framework/CurveFitting/test/ComplexMatrixTest.h index c9a165953fca6b64d0bfa83fbe85e3434aae7033..779dc5332b67e3a6a1b8edb3ae2f9f99e0f88641 100644 --- a/Framework/CurveFitting/test/ComplexMatrixTest.h +++ b/Framework/CurveFitting/test/ComplexMatrixTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/ComplexVectorTest.h b/Framework/CurveFitting/test/ComplexVectorTest.h index 5c02610fe62969ccc594c39c0b6deec9e892fecc..a05016881bd900f93040fa75bf0f999f3385d1b9 100644 --- a/Framework/CurveFitting/test/ComplexVectorTest.h +++ b/Framework/CurveFitting/test/ComplexVectorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/CompositeFunctionTest.h b/Framework/CurveFitting/test/CompositeFunctionTest.h index 9d03484d6a144f8b7b5bf2f6ab46298390f2d1d9..7bf4a0d7b823bb1d0325b448d1db3852f8834b77 100644 --- a/Framework/CurveFitting/test/CompositeFunctionTest.h +++ b/Framework/CurveFitting/test/CompositeFunctionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/Constraints/BoundaryConstraintTest.h b/Framework/CurveFitting/test/Constraints/BoundaryConstraintTest.h index a65ce567b4aebba878553ffc3beff3969b8fa23b..780735ecdad3d10630e7a6523a11e69d42f04fe5 100644 --- a/Framework/CurveFitting/test/Constraints/BoundaryConstraintTest.h +++ b/Framework/CurveFitting/test/Constraints/BoundaryConstraintTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/CostFuncPoissonTest.h b/Framework/CurveFitting/test/CostFuncPoissonTest.h index ed679d7bb6c225c1408ffa9ad2f04b5a09b7ee4e..a28657b471272f9e30d10170cda4c3c052223a7d 100644 --- a/Framework/CurveFitting/test/CostFuncPoissonTest.h +++ b/Framework/CurveFitting/test/CostFuncPoissonTest.h @@ -1,3 +1,9 @@ +// Mantid Repository : https://github.com/mantidproject/mantid +// +// Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS +// SPDX - License - Identifier: GPL - 3.0 + #pragma once #include <cmath> diff --git a/Framework/CurveFitting/test/CostFunctions/CostFuncFittingTest.h b/Framework/CurveFitting/test/CostFunctions/CostFuncFittingTest.h index cd0d45779afc94e63200ee353ef9fcb8b06cbd33..1cbfe6b916864d23def55dfbda470d75ea593fc2 100644 --- a/Framework/CurveFitting/test/CostFunctions/CostFuncFittingTest.h +++ b/Framework/CurveFitting/test/CostFunctions/CostFuncFittingTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/CostFunctions/CostFuncUnweightedLeastSquaresTest.h b/Framework/CurveFitting/test/CostFunctions/CostFuncUnweightedLeastSquaresTest.h index 9a139a498fc22cacf941696d2e4ad0548a316870..e557c4f986ba359a473b32dcc2dbfda385c76ea9 100644 --- a/Framework/CurveFitting/test/CostFunctions/CostFuncUnweightedLeastSquaresTest.h +++ b/Framework/CurveFitting/test/CostFunctions/CostFuncUnweightedLeastSquaresTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/CostFunctions/LeastSquaresTest.h b/Framework/CurveFitting/test/CostFunctions/LeastSquaresTest.h index 9905e106ba353db4c2d6e756485966e0d978c160..50f03e739b9e8f99f62520b3ba691be22588ec22 100644 --- a/Framework/CurveFitting/test/CostFunctions/LeastSquaresTest.h +++ b/Framework/CurveFitting/test/CostFunctions/LeastSquaresTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/FitMWTest.h b/Framework/CurveFitting/test/FitMWTest.h index f41f459db9312cb708476a448304be8ee0d3a9e6..7e170fb5a74d035901b9797dd0ccb050eb719ed6 100644 --- a/Framework/CurveFitting/test/FitMWTest.h +++ b/Framework/CurveFitting/test/FitMWTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -63,7 +63,7 @@ API::MatrixWorkspace_sptr createTestWorkspace(const bool histogram, return ws2; } -void doTestExecPointData(API::MatrixWorkspace_sptr ws2, +void doTestExecPointData(const API::MatrixWorkspace_sptr &ws2, bool performance = false) { API::IFunction_sptr fun(new ExpDecay); fun->setParameter("Height", 1.); @@ -169,7 +169,7 @@ void doTestExecPointData(API::MatrixWorkspace_sptr ws2, TS_ASSERT_DELTA(fun->getParameter("Lifetime"), 1.0, 1e-4); } } -void doTestExecHistogramData(API::MatrixWorkspace_sptr ws2, +void doTestExecHistogramData(const API::MatrixWorkspace_sptr &ws2, bool performance = false) { API::IFunction_sptr fun(new ExpDecay); fun->setParameter("Height", 1.); @@ -497,8 +497,6 @@ public: test_Composite_Function_With_SeparateMembers_Option_On_FitMW_Outputs_Composite_Values_Plus_Each_Member() { const bool histogram = true; auto ws2 = createTestWorkspace(histogram); - const std::string inputWSName = "FitMWTest_CompositeTest"; - // AnalysisDataService::Instance().add(inputWSName, ws2); auto composite = boost::make_shared<API::CompositeFunction>(); API::IFunction_sptr expDecay(new ExpDecay); diff --git a/Framework/CurveFitting/test/FortranMatrixTest.h b/Framework/CurveFitting/test/FortranMatrixTest.h index 5ea244feb020e7713373c3e3fb91b6f741087c88..61672490ecafcdd8d8f1dbda4bf0af028a1fbc0a 100644 --- a/Framework/CurveFitting/test/FortranMatrixTest.h +++ b/Framework/CurveFitting/test/FortranMatrixTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/FortranVectorTest.h b/Framework/CurveFitting/test/FortranVectorTest.h index d4e17e680a58a9a4baea1d2b3196d05f91c4952b..c6500cf93975f3045204bb2b44c1bbb60d4d3e9f 100644 --- a/Framework/CurveFitting/test/FortranVectorTest.h +++ b/Framework/CurveFitting/test/FortranVectorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/FuncMinimizers/BFGSTest.h b/Framework/CurveFitting/test/FuncMinimizers/BFGSTest.h index 7c6fc9abd7f7c8d97f92612c351f49b737b23f21..8c260d3cd0f6edaf1cb4edcf6c2457a5597490fc 100644 --- a/Framework/CurveFitting/test/FuncMinimizers/BFGSTest.h +++ b/Framework/CurveFitting/test/FuncMinimizers/BFGSTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/FuncMinimizers/DampedGaussNewtonMinimizerTest.h b/Framework/CurveFitting/test/FuncMinimizers/DampedGaussNewtonMinimizerTest.h index 63b4ed4cdd0efe8748ca0b7a27a66b9826d1bfc6..26ef2be2836443fde86bbf6e0b3d36c02fe8583a 100644 --- a/Framework/CurveFitting/test/FuncMinimizers/DampedGaussNewtonMinimizerTest.h +++ b/Framework/CurveFitting/test/FuncMinimizers/DampedGaussNewtonMinimizerTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/FuncMinimizers/ErrorMessagesTest.h b/Framework/CurveFitting/test/FuncMinimizers/ErrorMessagesTest.h index 3338c7ee60443f6f3f9c01a977ff036cba1730b6..5fedd5305bbf164e815a33f49e17ccb3d450d63a 100644 --- a/Framework/CurveFitting/test/FuncMinimizers/ErrorMessagesTest.h +++ b/Framework/CurveFitting/test/FuncMinimizers/ErrorMessagesTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/FuncMinimizers/FABADAMinimizerTest.h b/Framework/CurveFitting/test/FuncMinimizers/FABADAMinimizerTest.h index 29b4be545beae81b5b04e3976e4dd648ababc657..75543a266a9714190e91c26739fd97eba152e9ae 100644 --- a/Framework/CurveFitting/test/FuncMinimizers/FABADAMinimizerTest.h +++ b/Framework/CurveFitting/test/FuncMinimizers/FABADAMinimizerTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -46,7 +46,7 @@ MatrixWorkspace_sptr createTestWorkspace(size_t NVectors = 2, return ws2; } -void doTestExpDecay(MatrixWorkspace_sptr ws2) { +void doTestExpDecay(const MatrixWorkspace_sptr &ws2) { Mantid::API::IFunction_sptr fun(new ExpDecay); fun->setParameter("Height", 8.); diff --git a/Framework/CurveFitting/test/FuncMinimizers/FRConjugateGradientTest.h b/Framework/CurveFitting/test/FuncMinimizers/FRConjugateGradientTest.h index 1c508288b4b3d3808f654d25414360f05511fd8b..db899bb6888bde35bed296d0f24d02a017d9c6cc 100644 --- a/Framework/CurveFitting/test/FuncMinimizers/FRConjugateGradientTest.h +++ b/Framework/CurveFitting/test/FuncMinimizers/FRConjugateGradientTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/FuncMinimizers/LevenbergMarquardtMDTest.h b/Framework/CurveFitting/test/FuncMinimizers/LevenbergMarquardtMDTest.h index d3181e39a8fe09ab29793db0d772f3613160245b..32e6baf1132f497965762f302a5734c5bac787c5 100644 --- a/Framework/CurveFitting/test/FuncMinimizers/LevenbergMarquardtMDTest.h +++ b/Framework/CurveFitting/test/FuncMinimizers/LevenbergMarquardtMDTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -468,7 +468,8 @@ public: } private: - double fitBSpline(boost::shared_ptr<IFunction> bsp, std::string func) { + double fitBSpline(const boost::shared_ptr<IFunction> &bsp, + const std::string &func) { const double startx = bsp->getAttribute("StartX").asDouble(); const double endx = bsp->getAttribute("EndX").asDouble(); diff --git a/Framework/CurveFitting/test/FuncMinimizers/LevenbergMarquardtTest.h b/Framework/CurveFitting/test/FuncMinimizers/LevenbergMarquardtTest.h index ff67a959cc5dfb49c95fe9fc061cb273c5a26c50..575b2ed6844898f73bcdb8dba2ec8f856b8f7e00 100644 --- a/Framework/CurveFitting/test/FuncMinimizers/LevenbergMarquardtTest.h +++ b/Framework/CurveFitting/test/FuncMinimizers/LevenbergMarquardtTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/FuncMinimizers/PRConjugateGradientTest.h b/Framework/CurveFitting/test/FuncMinimizers/PRConjugateGradientTest.h index 81739e9e08d51410ae082616190c62f33c859071..ad9adf9617ad1aeb1126dd65340bb2ef79512acc 100644 --- a/Framework/CurveFitting/test/FuncMinimizers/PRConjugateGradientTest.h +++ b/Framework/CurveFitting/test/FuncMinimizers/PRConjugateGradientTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/FuncMinimizers/SimplexTest.h b/Framework/CurveFitting/test/FuncMinimizers/SimplexTest.h index 0663e42112c059a8bd68502fdd46875495d6f01b..22b5a9b270aec2f00d275a3b4a36db510b092c2f 100644 --- a/Framework/CurveFitting/test/FuncMinimizers/SimplexTest.h +++ b/Framework/CurveFitting/test/FuncMinimizers/SimplexTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/FuncMinimizers/TrustRegionMinimizerTest.h b/Framework/CurveFitting/test/FuncMinimizers/TrustRegionMinimizerTest.h index a11dc377acb51881d83705d1ddef00d56a1271df..0beccd3135959ab243864aa596b5650259d3dab5 100644 --- a/Framework/CurveFitting/test/FuncMinimizers/TrustRegionMinimizerTest.h +++ b/Framework/CurveFitting/test/FuncMinimizers/TrustRegionMinimizerTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/FunctionDomain1DSpectrumCreatorTest.h b/Framework/CurveFitting/test/FunctionDomain1DSpectrumCreatorTest.h index 376f6a3a171ea91f28ceb625c311a17ca9a0c4ff..6d86a80dfcc1a6338317f6a4675d480a06c06504 100644 --- a/Framework/CurveFitting/test/FunctionDomain1DSpectrumCreatorTest.h +++ b/Framework/CurveFitting/test/FunctionDomain1DSpectrumCreatorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/FunctionFactoryConstraintTest.h b/Framework/CurveFitting/test/FunctionFactoryConstraintTest.h index d95a114eaa07c0d11c6e81ff3c20a0fa4a8e4893..578253873ed42c2cf6233bc31fc713a304771023 100644 --- a/Framework/CurveFitting/test/FunctionFactoryConstraintTest.h +++ b/Framework/CurveFitting/test/FunctionFactoryConstraintTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/FunctionParameterDecoratorFitTest.h b/Framework/CurveFitting/test/FunctionParameterDecoratorFitTest.h index 73cb311cac189f6caf7d9d4add5a93a47bcda7b2..59219cf7038dbfd7980cd3af38f3436b2473e0cb 100644 --- a/Framework/CurveFitting/test/FunctionParameterDecoratorFitTest.h +++ b/Framework/CurveFitting/test/FunctionParameterDecoratorFitTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/Functions/AbragamTest.h b/Framework/CurveFitting/test/Functions/AbragamTest.h index 0eb105371f386804394ce7c69a98c936c2a8493a..b4b0fd22bf27a14c04cafc7fd59ba515298b9c2d 100644 --- a/Framework/CurveFitting/test/Functions/AbragamTest.h +++ b/Framework/CurveFitting/test/Functions/AbragamTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/Functions/BSplineTest.h b/Framework/CurveFitting/test/Functions/BSplineTest.h index cf4d963477b93f613866ce91085f7a9c910aca51..035a2afd161635f926c9de32674a477b82252cbf 100644 --- a/Framework/CurveFitting/test/Functions/BSplineTest.h +++ b/Framework/CurveFitting/test/Functions/BSplineTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/Functions/BackToBackExponentialTest.h b/Framework/CurveFitting/test/Functions/BackToBackExponentialTest.h index 4bc6969ed6f5dc2707383a4d906cf93dba809291..2620a1bc33a9af809719b5b7ac1ec3f2cc916035 100644 --- a/Framework/CurveFitting/test/Functions/BackToBackExponentialTest.h +++ b/Framework/CurveFitting/test/Functions/BackToBackExponentialTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/Functions/BivariateNormalTest.h b/Framework/CurveFitting/test/Functions/BivariateNormalTest.h index 760e97275c983cf254b5c79610445c2f0047092f..05b5a6b335c9f4d15b9da13233bcee8b5358e7ec 100644 --- a/Framework/CurveFitting/test/Functions/BivariateNormalTest.h +++ b/Framework/CurveFitting/test/Functions/BivariateNormalTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /* * BivariateNormalTest.h diff --git a/Framework/CurveFitting/test/Functions/Bk2BkExpConvPVTest.h b/Framework/CurveFitting/test/Functions/Bk2BkExpConvPVTest.h index 5e9cc9a403bf8f8995fec9b35d6720d381ebfe4c..b15e6705bc250caad47701acac76244bf2ee4a28 100644 --- a/Framework/CurveFitting/test/Functions/Bk2BkExpConvPVTest.h +++ b/Framework/CurveFitting/test/Functions/Bk2BkExpConvPVTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/Functions/ChebfunBaseTest.h b/Framework/CurveFitting/test/Functions/ChebfunBaseTest.h index 9427d3ffba5313b9f9ce33d4ca330592483f9009..5552bf2677df3bf6f5809ce1b0e627827a49b81b 100644 --- a/Framework/CurveFitting/test/Functions/ChebfunBaseTest.h +++ b/Framework/CurveFitting/test/Functions/ChebfunBaseTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -10,6 +10,7 @@ #include "MantidCurveFitting/Functions/ChebfunBase.h" #include <cmath> +#include <utility> using namespace Mantid; using namespace Mantid::API; @@ -115,8 +116,8 @@ public: void test_roots_SinCos() { do_test_roots(SinCos, -M_PI, M_PI, 2, 1e-5); } private: - void do_test_eval(std::function<double(double)> fun, double start, double end, - size_t n) { + void do_test_eval(const std::function<double(double)> &fun, double start, + double end, size_t n) { ChebfunBase base(n, start, end); auto p = base.fit(fun); auto x = base.linspace(2 * n); @@ -132,7 +133,7 @@ private: x.assign(xarr, xarr + narr); ChebfunBase base(n, start, end); - auto p = base.fit(fun); + auto p = base.fit(std::move(fun)); auto y = base.evalVector(x, p); TS_ASSERT_EQUALS(y.size(), x.size()); for (size_t i = 0; i < x.size(); ++i) { @@ -147,7 +148,7 @@ private: } } - void do_test_bestFit(std::function<double(double)> fun, double start, + void do_test_bestFit(const std::function<double(double)> &fun, double start, double end, size_t expected_n) { std::vector<double> p, a; auto base = ChebfunBase::bestFit(start, end, fun, p, a); @@ -161,14 +162,15 @@ private: void do_test_integrate(std::function<double(double)> fun, double start, double end, double expected_integral) { std::vector<double> p, a; - auto base = ChebfunBase::bestFit(start, end, fun, p, a); + auto base = ChebfunBase::bestFit(start, end, std::move(fun), p, a); TS_ASSERT_DELTA(base->integrate(p), expected_integral, 1e-14); } void do_test_derivative(std::function<double(double)> fun, double start, - double end, std::function<double(double)> deriv) { + double end, + const std::function<double(double)> &deriv) { std::vector<double> p, a, dp, da; - auto base = ChebfunBase::bestFit(start, end, fun, p, a); + auto base = ChebfunBase::bestFit(start, end, std::move(fun), p, a); base->derivative(a, da); dp = base->calcP(da); auto x = base->linspace(2 * base->size()); @@ -181,7 +183,7 @@ private: void do_test_roots(std::function<double(double)> fun, double start, double end, size_t n_roots, double tol = 1e-13) { std::vector<double> p, a; - auto base = ChebfunBase::bestFit(start, end, fun, p, a); + auto base = ChebfunBase::bestFit(start, end, std::move(fun), p, a); auto roots = base->roots(a); TS_ASSERT_EQUALS(n_roots, roots.size()); for (double root : roots) { diff --git a/Framework/CurveFitting/test/Functions/ChebyshevTest.h b/Framework/CurveFitting/test/Functions/ChebyshevTest.h index 9d67081e547813fa87d6d30ed173ef0d48fc01b5..2878fa8146044f143a47be5f7ae59e7ec8dbcacf 100644 --- a/Framework/CurveFitting/test/Functions/ChebyshevTest.h +++ b/Framework/CurveFitting/test/Functions/ChebyshevTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/Functions/ComptonPeakProfileTest.h b/Framework/CurveFitting/test/Functions/ComptonPeakProfileTest.h index 97c3475182838007cf449ca14a25b71a6715fb08..26dde36728e84ed9d9850b243b84898b2b6107a6 100644 --- a/Framework/CurveFitting/test/Functions/ComptonPeakProfileTest.h +++ b/Framework/CurveFitting/test/Functions/ComptonPeakProfileTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -31,13 +31,13 @@ public: void test_initialized_object_has_expected_attributes() { auto profile = createFunction(); static const size_t nattrs(3); - const char *expectedAttrs[nattrs] = {"WorkspaceIndex", "Mass", - "VoigtEnergyCutOff"}; TS_ASSERT_EQUALS(nattrs, profile->nAttributes()); // Test names as they are used in scripts if (profile->nAttributes() > 0) { + const char *expectedAttrs[nattrs] = {"WorkspaceIndex", "Mass", + "VoigtEnergyCutOff"}; std::unordered_set<std::string> expectedAttrSet(expectedAttrs, expectedAttrs + nattrs); std::vector<std::string> actualNames = profile->getAttributeNames(); diff --git a/Framework/CurveFitting/test/Functions/ComptonProfileTest.h b/Framework/CurveFitting/test/Functions/ComptonProfileTest.h index 718e4ea5d51726510ce1da63ac0769cecd6b637e..cadb3838c6a86b4a9e095993dffaa2a7b2928dc2 100644 --- a/Framework/CurveFitting/test/Functions/ComptonProfileTest.h +++ b/Framework/CurveFitting/test/Functions/ComptonProfileTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -30,12 +30,12 @@ public: void test_initialized_object_has_expected_parameters() { auto profile = createFunction(); static const size_t nparams(1); - const char *expectedParams[nparams] = {"Mass"}; TS_ASSERT_EQUALS(nparams, profile->nParams()); // Test names as they are used in scripts if (profile->nParams() > 0) { + const char *expectedParams[nparams] = {"Mass"}; std::unordered_set<std::string> expectedParamStr( expectedParams, expectedParams + nparams); std::vector<std::string> actualNames = profile->getParameterNames(); diff --git a/Framework/CurveFitting/test/Functions/ComptonProfileTestHelpers.h b/Framework/CurveFitting/test/Functions/ComptonProfileTestHelpers.h index 518a08fe056f5dfd51697d894583c809cf338880..6ba6589e8c31979dd8c6d048a9ea313863dcd8b2 100644 --- a/Framework/CurveFitting/test/Functions/ComptonProfileTestHelpers.h +++ b/Framework/CurveFitting/test/Functions/ComptonProfileTestHelpers.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/Functions/ComptonScatteringCountRateTest.h b/Framework/CurveFitting/test/Functions/ComptonScatteringCountRateTest.h index 99fed9002da11b6eef220749c12237078ee07945..2ed28a83f23d4f40f10f411e3a000b509c48b2d7 100644 --- a/Framework/CurveFitting/test/Functions/ComptonScatteringCountRateTest.h +++ b/Framework/CurveFitting/test/Functions/ComptonScatteringCountRateTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/Functions/ConvolutionTest.h b/Framework/CurveFitting/test/Functions/ConvolutionTest.h index 1a4c9913b8e117fef87e28cd3cf1f771b7757176..22e235d588f81cf1fd7be2a2f4d06e0fcc4e49a6 100644 --- a/Framework/CurveFitting/test/Functions/ConvolutionTest.h +++ b/Framework/CurveFitting/test/Functions/ConvolutionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -180,8 +180,7 @@ public: linear->setParameter(0, 0.1); linear->setParameter(1, 0.2); - size_t iFun = 10000; - iFun = conv.addFunction(linear); + size_t iFun = conv.addFunction(linear); TS_ASSERT_EQUALS(iFun, 0); iFun = conv.addFunction(gauss1); TS_ASSERT_EQUALS(iFun, 1); diff --git a/Framework/CurveFitting/test/Functions/CrystalFieldControlTest.h b/Framework/CurveFitting/test/Functions/CrystalFieldControlTest.h index 6799f3a6b4c366dcef070b83d8450af6248eafa0..9e3b44424fa2bbca271e1cc7cea4677699097889 100644 --- a/Framework/CurveFitting/test/Functions/CrystalFieldControlTest.h +++ b/Framework/CurveFitting/test/Functions/CrystalFieldControlTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/Functions/CrystalFieldEnergiesTest.h b/Framework/CurveFitting/test/Functions/CrystalFieldEnergiesTest.h index a2b73ee37a912de2e055938ffe984ee5029455eb..b42d1063f337768fb71238bb41bf2547bc8c2267 100644 --- a/Framework/CurveFitting/test/Functions/CrystalFieldEnergiesTest.h +++ b/Framework/CurveFitting/test/Functions/CrystalFieldEnergiesTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/Functions/CrystalFieldFunctionTest.h b/Framework/CurveFitting/test/Functions/CrystalFieldFunctionTest.h index 2e3954b9a5616c1063db71e9d16ffa36abb3361f..5f13c71620b4f8a617bcaeb3aadc55402e909a3f 100644 --- a/Framework/CurveFitting/test/Functions/CrystalFieldFunctionTest.h +++ b/Framework/CurveFitting/test/Functions/CrystalFieldFunctionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/Functions/CrystalFieldHeatCapacityTest.h b/Framework/CurveFitting/test/Functions/CrystalFieldHeatCapacityTest.h index e5d3fbd60f7e70aeb944ea604cd46192d3899d8f..f389ecf9c494c7d9e1d292cac34f9c9e7bf009da 100644 --- a/Framework/CurveFitting/test/Functions/CrystalFieldHeatCapacityTest.h +++ b/Framework/CurveFitting/test/Functions/CrystalFieldHeatCapacityTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/Functions/CrystalFieldMagnetisationTest.h b/Framework/CurveFitting/test/Functions/CrystalFieldMagnetisationTest.h index 04e011c47086e32e08df6c744303bfc47b06ee87..a83c99acad6d5b664002f747b5c628774380a776 100644 --- a/Framework/CurveFitting/test/Functions/CrystalFieldMagnetisationTest.h +++ b/Framework/CurveFitting/test/Functions/CrystalFieldMagnetisationTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/Functions/CrystalFieldMomentTest.h b/Framework/CurveFitting/test/Functions/CrystalFieldMomentTest.h index 197bfe3f5df6240bc479fc8e827f98f6745fa9aa..8b7feeaad3eec41c05dc043067f08b19fb1db94e 100644 --- a/Framework/CurveFitting/test/Functions/CrystalFieldMomentTest.h +++ b/Framework/CurveFitting/test/Functions/CrystalFieldMomentTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/Functions/CrystalFieldMultiSpectrumTest.h b/Framework/CurveFitting/test/Functions/CrystalFieldMultiSpectrumTest.h index ba05d60c9ee26861ad43ac5c7808b5d5e1aa2521..542d841818874dcabf16712511e9a3da663009c4 100644 --- a/Framework/CurveFitting/test/Functions/CrystalFieldMultiSpectrumTest.h +++ b/Framework/CurveFitting/test/Functions/CrystalFieldMultiSpectrumTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/Functions/CrystalFieldPeaksTest.h b/Framework/CurveFitting/test/Functions/CrystalFieldPeaksTest.h index e5c6946e9022e3708b1e2bcdef9ecc545d00ef77..83efed5c8b398a70cae9dc32fc1dd374ce2d11d1 100644 --- a/Framework/CurveFitting/test/Functions/CrystalFieldPeaksTest.h +++ b/Framework/CurveFitting/test/Functions/CrystalFieldPeaksTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/Functions/CrystalFieldSpectrumTest.h b/Framework/CurveFitting/test/Functions/CrystalFieldSpectrumTest.h index 1cfdcaf17f7051c3535b092a80be4d98023b9ec2..481018e9a489b66ad6b74c772cd218966fe51998 100644 --- a/Framework/CurveFitting/test/Functions/CrystalFieldSpectrumTest.h +++ b/Framework/CurveFitting/test/Functions/CrystalFieldSpectrumTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/Functions/CrystalFieldSusceptibilityTest.h b/Framework/CurveFitting/test/Functions/CrystalFieldSusceptibilityTest.h index 28b6f2a861b4377693354ad06e06124c6c8303aa..41cb3e9f671f7b552955d8d6a87db7e9f512ec39 100644 --- a/Framework/CurveFitting/test/Functions/CrystalFieldSusceptibilityTest.h +++ b/Framework/CurveFitting/test/Functions/CrystalFieldSusceptibilityTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/Functions/CrystalFieldTest.h b/Framework/CurveFitting/test/Functions/CrystalFieldTest.h index 4689d85cbf617f2d1e6e878d7cc133f71c3af000..c928574f741fc39dfbc0aa73cbf1fcaf127e6b50 100644 --- a/Framework/CurveFitting/test/Functions/CrystalFieldTest.h +++ b/Framework/CurveFitting/test/Functions/CrystalFieldTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/Functions/CubicSplineTest.h b/Framework/CurveFitting/test/Functions/CubicSplineTest.h index 9fa85f7a17a4a601504654ac9d67ea9feb6fe22d..ffdf02a4d3095c29e02f3f49180fd6e091edd9a3 100644 --- a/Framework/CurveFitting/test/Functions/CubicSplineTest.h +++ b/Framework/CurveFitting/test/Functions/CubicSplineTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/Functions/DeltaFunctionTest.h b/Framework/CurveFitting/test/Functions/DeltaFunctionTest.h index 1d60c27038b1d41498a9dd95cda909fb5fa41d33..f38a483801d8ef59bca3480eb465744d7b1cad0e 100644 --- a/Framework/CurveFitting/test/Functions/DeltaFunctionTest.h +++ b/Framework/CurveFitting/test/Functions/DeltaFunctionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/Functions/DiffRotDiscreteCircleTest.h b/Framework/CurveFitting/test/Functions/DiffRotDiscreteCircleTest.h index af82cb3a79bf0e3a9f0f4d56b9328dc520e1e20c..6a7a5ddde860ba9061a6ff452642f31b4a3448d5 100644 --- a/Framework/CurveFitting/test/Functions/DiffRotDiscreteCircleTest.h +++ b/Framework/CurveFitting/test/Functions/DiffRotDiscreteCircleTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/Functions/DiffSphereTest.h b/Framework/CurveFitting/test/Functions/DiffSphereTest.h index c0965cbee1a1b9f54cd44c7404baf5d9398e0f42..61eecfbfc21769f065ccb621f265fcd04362f4c9 100644 --- a/Framework/CurveFitting/test/Functions/DiffSphereTest.h +++ b/Framework/CurveFitting/test/Functions/DiffSphereTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/Functions/DynamicKuboToyabeTest.h b/Framework/CurveFitting/test/Functions/DynamicKuboToyabeTest.h index 3ff07ed267b7ce64db9f213ee15123876f8d624c..9f25be569f98814ab5f71565b69d75682fd2044f 100644 --- a/Framework/CurveFitting/test/Functions/DynamicKuboToyabeTest.h +++ b/Framework/CurveFitting/test/Functions/DynamicKuboToyabeTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/Functions/ElasticIsoRotDiffTest.h b/Framework/CurveFitting/test/Functions/ElasticIsoRotDiffTest.h index 5476975625eb45bdd3646f7e759800f1d08278ad..e5413a0e6500de4bd948a32ad42a8c49860fe6f8 100644 --- a/Framework/CurveFitting/test/Functions/ElasticIsoRotDiffTest.h +++ b/Framework/CurveFitting/test/Functions/ElasticIsoRotDiffTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/Functions/EndErfcTest.h b/Framework/CurveFitting/test/Functions/EndErfcTest.h index a576c8a501143e9410b735ac7d4fe2863905087f..ac9d529bdb197447ce7ad1b8056153ad2b08eb86 100644 --- a/Framework/CurveFitting/test/Functions/EndErfcTest.h +++ b/Framework/CurveFitting/test/Functions/EndErfcTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/Functions/ExpDecayMuonTest.h b/Framework/CurveFitting/test/Functions/ExpDecayMuonTest.h index 96144525e140f3a4447afc39a0d19405b3826a14..04157786cce004d6a3e1a783cdd2e2cffe79a3b8 100644 --- a/Framework/CurveFitting/test/Functions/ExpDecayMuonTest.h +++ b/Framework/CurveFitting/test/Functions/ExpDecayMuonTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/Functions/ExpDecayOscTest.h b/Framework/CurveFitting/test/Functions/ExpDecayOscTest.h index 8bd45d7bb1480511eac54117d685fa3f34bcfa3d..2d2f7aa319ed071e0afd1934be16ffbb156eb892 100644 --- a/Framework/CurveFitting/test/Functions/ExpDecayOscTest.h +++ b/Framework/CurveFitting/test/Functions/ExpDecayOscTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/Functions/ExpDecayTest.h b/Framework/CurveFitting/test/Functions/ExpDecayTest.h index 482fffcf4b428b4dc4f2afcb36c1da2d143cca93..0c8d4366dc02d6501c60e3ebc65be723c05c3ad6 100644 --- a/Framework/CurveFitting/test/Functions/ExpDecayTest.h +++ b/Framework/CurveFitting/test/Functions/ExpDecayTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/Functions/FlatBackgroundTest.h b/Framework/CurveFitting/test/Functions/FlatBackgroundTest.h index 5cab65a3b26e0551297c6e0e380d779b682077c1..08db73a27110d01e8d7f4405b083a64bf98ef563 100644 --- a/Framework/CurveFitting/test/Functions/FlatBackgroundTest.h +++ b/Framework/CurveFitting/test/Functions/FlatBackgroundTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/Functions/FullprofPolynomialTest.h b/Framework/CurveFitting/test/Functions/FullprofPolynomialTest.h index 5d13d29aa559f7587d909345fc318716bd26b7a1..9206759d49d9c400e76e5b73a205f7076ae0078a 100644 --- a/Framework/CurveFitting/test/Functions/FullprofPolynomialTest.h +++ b/Framework/CurveFitting/test/Functions/FullprofPolynomialTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/Functions/FunctionQDependsTest.h b/Framework/CurveFitting/test/Functions/FunctionQDependsTest.h index a1732bcafd8b6f39124fbdcc53d1eaf6a3add646..48649f739efc8c09a8f54eb4b8bedfeb636fa0e3 100644 --- a/Framework/CurveFitting/test/Functions/FunctionQDependsTest.h +++ b/Framework/CurveFitting/test/Functions/FunctionQDependsTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/Functions/GausDecayTest.h b/Framework/CurveFitting/test/Functions/GausDecayTest.h index 95f089234f3a66598b1506ff9cc2fdd02949b7e6..4cb7a3745d0326ecbd7d86ea64e78a019cbe5342 100644 --- a/Framework/CurveFitting/test/Functions/GausDecayTest.h +++ b/Framework/CurveFitting/test/Functions/GausDecayTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/Functions/GausOscTest.h b/Framework/CurveFitting/test/Functions/GausOscTest.h index f449d61a87b13a91cf695fc5f6847c749f15bff0..974c513dc5500fac54496bc943036bd191534f26 100644 --- a/Framework/CurveFitting/test/Functions/GausOscTest.h +++ b/Framework/CurveFitting/test/Functions/GausOscTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/Functions/GaussianComptonProfileTest.h b/Framework/CurveFitting/test/Functions/GaussianComptonProfileTest.h index 72898ba09c4c24ea657549ae1a950eb5c78fed7d..805d3b956f9de8bcf9a2b5decdd4b12d7323ebe1 100644 --- a/Framework/CurveFitting/test/Functions/GaussianComptonProfileTest.h +++ b/Framework/CurveFitting/test/Functions/GaussianComptonProfileTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -33,12 +33,13 @@ public: void test_Initialized_Function_Has_Expected_Parameters_In_Right_Order() { Mantid::API::IFunction_sptr profile = createFunction(); static const size_t nparams(3); - const char *expectedParams[nparams] = {"Mass", "Width", "Intensity"}; auto currentNames = profile->getParameterNames(); const size_t nnames = currentNames.size(); TS_ASSERT_EQUALS(nparams, nnames); + if (nnames == nparams) { + const char *expectedParams[nparams] = {"Mass", "Width", "Intensity"}; for (size_t i = 0; i < nnames; ++i) { TS_ASSERT_EQUALS(expectedParams[i], currentNames[i]); } diff --git a/Framework/CurveFitting/test/Functions/GaussianTest.h b/Framework/CurveFitting/test/Functions/GaussianTest.h index 44c2e2ed77678fbdf8b227361570f8feb9a60ede..d92eec8b84fe34fad5c7d815b463faf0578bfdfa 100644 --- a/Framework/CurveFitting/test/Functions/GaussianTest.h +++ b/Framework/CurveFitting/test/Functions/GaussianTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/Functions/GramCharlierComptonProfileTest.h b/Framework/CurveFitting/test/Functions/GramCharlierComptonProfileTest.h index 4ef1cdaecaad56129c32a16b0130a7724954359d..5a03d55af9c25b45b38d3cd347728896fa03826e 100644 --- a/Framework/CurveFitting/test/Functions/GramCharlierComptonProfileTest.h +++ b/Framework/CurveFitting/test/Functions/GramCharlierComptonProfileTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -152,12 +152,12 @@ private: void checkDefaultParametersExist(const Mantid::API::IFunction &profile) { static const size_t nparams(3); - const char *expectedParams[nparams] = {"Mass", "Width", "FSECoeff"}; auto currentNames = profile.getParameterNames(); const size_t nnames = currentNames.size(); TS_ASSERT_LESS_THAN_EQUALS(nparams, nnames); if (nnames <= nparams) { + const char *expectedParams[nparams] = {"Mass", "Width", "FSECoeff"}; for (size_t i = 0; i < nnames; ++i) { TS_ASSERT_EQUALS(expectedParams[i], currentNames[i]); } diff --git a/Framework/CurveFitting/test/Functions/IkedaCarpenterPVTest.h b/Framework/CurveFitting/test/Functions/IkedaCarpenterPVTest.h index ca3371192d1900465531f0d0eda0b12c92e24262..b3b0c8725b5927ad7b17b5fb9d26b42c26cbe7bf 100644 --- a/Framework/CurveFitting/test/Functions/IkedaCarpenterPVTest.h +++ b/Framework/CurveFitting/test/Functions/IkedaCarpenterPVTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/Functions/InelasticIsoRotDiffTest.h b/Framework/CurveFitting/test/Functions/InelasticIsoRotDiffTest.h index 4fc9b5d29c69664c56d63e5a5336c2c61a434aff..fbccc8e2905088ea3e912c1300c844269c6468e1 100644 --- a/Framework/CurveFitting/test/Functions/InelasticIsoRotDiffTest.h +++ b/Framework/CurveFitting/test/Functions/InelasticIsoRotDiffTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/Functions/IsoRotDiffTest.h b/Framework/CurveFitting/test/Functions/IsoRotDiffTest.h index 44f638922e2178cb9269d36f7717e53a17e5ebff..c015250cad5e3508641e1238cc7834313801656d 100644 --- a/Framework/CurveFitting/test/Functions/IsoRotDiffTest.h +++ b/Framework/CurveFitting/test/Functions/IsoRotDiffTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/Functions/KerenTest.h b/Framework/CurveFitting/test/Functions/KerenTest.h index 71ade6595cf342d402fb2636f61e87b059b0e2c2..ee62deff4879cdea4f99b2f18d51b73f9b93c497 100644 --- a/Framework/CurveFitting/test/Functions/KerenTest.h +++ b/Framework/CurveFitting/test/Functions/KerenTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/Functions/LinearBackgroundTest.h b/Framework/CurveFitting/test/Functions/LinearBackgroundTest.h index 4d1f4256575296c286853def39474c18daae45e9..f50ec61bc361d7b9ccbda59cca7d030c5662a460 100644 --- a/Framework/CurveFitting/test/Functions/LinearBackgroundTest.h +++ b/Framework/CurveFitting/test/Functions/LinearBackgroundTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/Functions/LogNormalTest.h b/Framework/CurveFitting/test/Functions/LogNormalTest.h index 2f5b82773a6ebe5473b749d51ad22a0d1c168611..d27cf8a8aa62246d89eff2631847c741813fb1f2 100644 --- a/Framework/CurveFitting/test/Functions/LogNormalTest.h +++ b/Framework/CurveFitting/test/Functions/LogNormalTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/Functions/LorentzianTest.h b/Framework/CurveFitting/test/Functions/LorentzianTest.h index 826c9fc79e386c00c3305647714bd35ee11879aa..e3a869c27bff5c8c355cf8fbd277a6572d18cf71 100644 --- a/Framework/CurveFitting/test/Functions/LorentzianTest.h +++ b/Framework/CurveFitting/test/Functions/LorentzianTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/Functions/MultivariateGaussianComptonProfileTest.h b/Framework/CurveFitting/test/Functions/MultivariateGaussianComptonProfileTest.h index 7d5182e7b59974432cc2ba2c7018ae7be2d60369..aa73d35207f35a8368c210c8585e6094da5efeb4 100644 --- a/Framework/CurveFitting/test/Functions/MultivariateGaussianComptonProfileTest.h +++ b/Framework/CurveFitting/test/Functions/MultivariateGaussianComptonProfileTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -33,12 +33,12 @@ public: void test_Initialized_Function_Has_Expected_Parameters_In_Right_Order() { Mantid::API::IFunction_sptr profile = createFunction(); static const size_t nparams(5); - const char *expectedParams[nparams] = {"Mass", "Intensity", "SigmaX", - "SigmaY", "SigmaZ"}; auto currentNames = profile->getParameterNames(); const size_t nnames = currentNames.size(); TS_ASSERT_EQUALS(nparams, nnames); if (nnames == nparams) { + const char *expectedParams[nparams] = {"Mass", "Intensity", "SigmaX", + "SigmaY", "SigmaZ"}; for (size_t i = 0; i < nnames; ++i) { TS_ASSERT_EQUALS(expectedParams[i], currentNames[i]); } @@ -48,12 +48,12 @@ public: void test_Initialized_Function_Has_Expected_Attributes() { Mantid::API::IFunction_sptr profile = createFunction(); static const size_t nattrs(1); - const char *expectedAttrs[nattrs] = {"IntegrationSteps"}; TS_ASSERT_EQUALS(nattrs, profile->nAttributes()); // Test names as they are used in scripts if (profile->nAttributes() > 0) { + const char *expectedAttrs[nattrs] = {"IntegrationSteps"}; std::set<std::string> expectedAttrSet(expectedAttrs, expectedAttrs + nattrs); std::vector<std::string> actualNames = profile->getAttributeNames(); diff --git a/Framework/CurveFitting/test/Functions/MuonFInteractionTest.h b/Framework/CurveFitting/test/Functions/MuonFInteractionTest.h index 9b04138be55b464da4cc06ccaed39b5f4d196782..30909d97b0a717f416627ffb293cfb5bd3d938b5 100644 --- a/Framework/CurveFitting/test/Functions/MuonFInteractionTest.h +++ b/Framework/CurveFitting/test/Functions/MuonFInteractionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/Functions/NeutronBk2BkExpConvPVoigtTest.h b/Framework/CurveFitting/test/Functions/NeutronBk2BkExpConvPVoigtTest.h index d62de46bc691b868785b53ab4d31da294f5d5df9..de6e38de3d5c7cf87f614035bfea5f31738dc639 100644 --- a/Framework/CurveFitting/test/Functions/NeutronBk2BkExpConvPVoigtTest.h +++ b/Framework/CurveFitting/test/Functions/NeutronBk2BkExpConvPVoigtTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/Functions/PawleyFunctionTest.h b/Framework/CurveFitting/test/Functions/PawleyFunctionTest.h index 61b3f5fa4061b02dd981edfaf0c8d12641188573..4424719c2f685e990f3c4cb28acb1f123f900567 100644 --- a/Framework/CurveFitting/test/Functions/PawleyFunctionTest.h +++ b/Framework/CurveFitting/test/Functions/PawleyFunctionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/Functions/PeakParameterFunctionTest.h b/Framework/CurveFitting/test/Functions/PeakParameterFunctionTest.h index 90d2f020eb8518ddb419868eab16fb44580dc27d..684311350f5d45e0ee6b689c1f126e40f6b8d43a 100644 --- a/Framework/CurveFitting/test/Functions/PeakParameterFunctionTest.h +++ b/Framework/CurveFitting/test/Functions/PeakParameterFunctionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/Functions/PolynomialTest.h b/Framework/CurveFitting/test/Functions/PolynomialTest.h index c7ceb11c1b214c5423181c805ed4795864d9e5a2..c10cba75e689d3c98103b0f24bbb98d660316b9d 100644 --- a/Framework/CurveFitting/test/Functions/PolynomialTest.h +++ b/Framework/CurveFitting/test/Functions/PolynomialTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/Functions/ProcessBackgroundTest.h b/Framework/CurveFitting/test/Functions/ProcessBackgroundTest.h index 1fa3cfd91364c6d2415564f5b1e40acddefb514f..9c5dc429d06d0dd7a6b6e4982f3171a8c4d6604b 100644 --- a/Framework/CurveFitting/test/Functions/ProcessBackgroundTest.h +++ b/Framework/CurveFitting/test/Functions/ProcessBackgroundTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -17,6 +17,7 @@ #include "MantidKernel/MersenneTwister.h" #include <fstream> +#include <utility> using Mantid::CurveFitting::Functions::ProcessBackground; using namespace Mantid; @@ -26,7 +27,8 @@ using namespace Mantid::DataObjects; using namespace HistogramData; namespace { -Workspace2D_sptr createInputWS(std::string name, size_t sizex, size_t sizey) { +Workspace2D_sptr createInputWS(const std::string &name, size_t sizex, + size_t sizey) { Workspace2D_sptr inputWS = boost::dynamic_pointer_cast<Workspace2D>( WorkspaceFactory::Instance().create("Workspace2D", 1, sizex, sizey)); AnalysisDataService::Instance().addOrReplace(name, inputWS); @@ -294,9 +296,9 @@ public: //---------------------------------------------------------------------------------------------- /** Read column file to create a workspace2D */ - Workspace2D_sptr createWorkspace2D(std::string filename) { + Workspace2D_sptr createWorkspace2D(const std::string &filename) { // 1. Read data - auto data = importDataFromColumnFile(filename); + auto data = importDataFromColumnFile(std::move(filename)); // 2. Create workspace size_t datasize = data.x().size(); @@ -314,7 +316,7 @@ public: /** Import data from a column data file */ - Histogram importDataFromColumnFile(std::string filename) { + Histogram importDataFromColumnFile(const std::string &filename) { // 1. Open file std::ifstream ins; ins.open(filename.c_str()); diff --git a/Framework/CurveFitting/test/Functions/ProductFunctionTest.h b/Framework/CurveFitting/test/Functions/ProductFunctionTest.h index 46f781d90fe91e8ef9ddf9d55312c08238e94ff7..8596d48dad3f5b078384f26a78c6af78bf8d393e 100644 --- a/Framework/CurveFitting/test/Functions/ProductFunctionTest.h +++ b/Framework/CurveFitting/test/Functions/ProductFunctionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -116,8 +116,7 @@ public: linear->setParameter(0, 0.1); linear->setParameter(1, 0.2); - size_t iFun = 100000; - iFun = prodF.addFunction(linear); + size_t iFun = prodF.addFunction(linear); TS_ASSERT_EQUALS(iFun, 0); iFun = prodF.addFunction(gauss1); TS_ASSERT_EQUALS(iFun, 1); diff --git a/Framework/CurveFitting/test/Functions/ProductLinearExpTest.h b/Framework/CurveFitting/test/Functions/ProductLinearExpTest.h index c793ead908318e6be6e5965d8ed0302f397defbc..2a1998ef026908b8340dfde49206a46137c44217 100644 --- a/Framework/CurveFitting/test/Functions/ProductLinearExpTest.h +++ b/Framework/CurveFitting/test/Functions/ProductLinearExpTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/Functions/ProductQuadraticExpTest.h b/Framework/CurveFitting/test/Functions/ProductQuadraticExpTest.h index 487232a3af181a4ed8c493e10201ec728ca72d0d..9d4a90ae25ebef6735b21cbe8369990dbf089f0f 100644 --- a/Framework/CurveFitting/test/Functions/ProductQuadraticExpTest.h +++ b/Framework/CurveFitting/test/Functions/ProductQuadraticExpTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/Functions/PseudoVoigtTest.h b/Framework/CurveFitting/test/Functions/PseudoVoigtTest.h index 73625b0ce75b2b27ea79b485b945c5c3a9b9da43..15ced3be6f57c1c921173f2946b2e2d32235adc7 100644 --- a/Framework/CurveFitting/test/Functions/PseudoVoigtTest.h +++ b/Framework/CurveFitting/test/Functions/PseudoVoigtTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/Functions/QuadraticTest.h b/Framework/CurveFitting/test/Functions/QuadraticTest.h index 4957ebee3eabad5541a85bfeba606d4ad1643bd7..a39c31b88baed85000b7020933e3ddf441f282e2 100644 --- a/Framework/CurveFitting/test/Functions/QuadraticTest.h +++ b/Framework/CurveFitting/test/Functions/QuadraticTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/Functions/ReflectivityMulfTest.h b/Framework/CurveFitting/test/Functions/ReflectivityMulfTest.h index d10d4c16bb5b1264c1e0180fe41127b479a6ce23..3478d5267a1f18b16214000a00739eeaf6e61cb0 100644 --- a/Framework/CurveFitting/test/Functions/ReflectivityMulfTest.h +++ b/Framework/CurveFitting/test/Functions/ReflectivityMulfTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/Functions/ResolutionTest.h b/Framework/CurveFitting/test/Functions/ResolutionTest.h index 87e0b89be897d3da5f4039038398c9b847f077ba..289f73c956bef8d4f8965e367b6ac541702cef84 100644 --- a/Framework/CurveFitting/test/Functions/ResolutionTest.h +++ b/Framework/CurveFitting/test/Functions/ResolutionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/Functions/SimpleChebfunTest.h b/Framework/CurveFitting/test/Functions/SimpleChebfunTest.h index 4f73b1c9faddd6bb56124d5c1464b07de4ab7695..fec05d704cb2b5a6f4a7bc53e2c5fab46171025d 100644 --- a/Framework/CurveFitting/test/Functions/SimpleChebfunTest.h +++ b/Framework/CurveFitting/test/Functions/SimpleChebfunTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -221,8 +221,8 @@ public: private: void do_test_values(const SimpleChebfun &cheb, - std::function<double(double)> fun, double accur1 = 1e-14, - double accur2 = 1e-14) { + const std::function<double(double)> &fun, + double accur1 = 1e-14, double accur2 = 1e-14) { TS_ASSERT(cheb.size() > 0); TS_ASSERT(cheb.width() > 0.0); if (cheb.isGood()) { diff --git a/Framework/CurveFitting/test/Functions/StaticKuboToyabeTest.h b/Framework/CurveFitting/test/Functions/StaticKuboToyabeTest.h index e793edadabe668acd554065c3cebcd208beb08bc..6076593a27e5f2a1c33f175867e24f23e7bbaec2 100644 --- a/Framework/CurveFitting/test/Functions/StaticKuboToyabeTest.h +++ b/Framework/CurveFitting/test/Functions/StaticKuboToyabeTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/Functions/StaticKuboToyabeTimesExpDecayTest.h b/Framework/CurveFitting/test/Functions/StaticKuboToyabeTimesExpDecayTest.h index f002099fd86feea5c2b94d47570ba98322e05ca6..8879cc44bea5a1d27a41563138525ef4aa72ddd8 100644 --- a/Framework/CurveFitting/test/Functions/StaticKuboToyabeTimesExpDecayTest.h +++ b/Framework/CurveFitting/test/Functions/StaticKuboToyabeTimesExpDecayTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/Functions/StaticKuboToyabeTimesGausDecayTest.h b/Framework/CurveFitting/test/Functions/StaticKuboToyabeTimesGausDecayTest.h index b013e8d4a8472a044062249d78c59f4378dfdac7..f1e9a3c46a01b6ed4acc93bddff48c1ed3b5b441 100644 --- a/Framework/CurveFitting/test/Functions/StaticKuboToyabeTimesGausDecayTest.h +++ b/Framework/CurveFitting/test/Functions/StaticKuboToyabeTimesGausDecayTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/Functions/StaticKuboToyabeTimesStretchExpTest.h b/Framework/CurveFitting/test/Functions/StaticKuboToyabeTimesStretchExpTest.h index 7a392aece92bfe571f0442876eebc7a3f2aa9f21..33204f02abea0cc88ea00909172db2ab68a01b65 100644 --- a/Framework/CurveFitting/test/Functions/StaticKuboToyabeTimesStretchExpTest.h +++ b/Framework/CurveFitting/test/Functions/StaticKuboToyabeTimesStretchExpTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/Functions/StretchExpMuonTest.h b/Framework/CurveFitting/test/Functions/StretchExpMuonTest.h index b4bfca2d9c2f570177e271687f3640675be7227c..4acc39e23c1d0642622913aa3c3fc619a1907e53 100644 --- a/Framework/CurveFitting/test/Functions/StretchExpMuonTest.h +++ b/Framework/CurveFitting/test/Functions/StretchExpMuonTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/Functions/StretchExpTest.h b/Framework/CurveFitting/test/Functions/StretchExpTest.h index 123b1cd706eaf5629572a8d145cc597042babe47..20dfa302aa7d77316e17413d7c245790619dbc4d 100644 --- a/Framework/CurveFitting/test/Functions/StretchExpTest.h +++ b/Framework/CurveFitting/test/Functions/StretchExpTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/Functions/TabulatedFunctionTest.h b/Framework/CurveFitting/test/Functions/TabulatedFunctionTest.h index 800120c63445de0f55e05a87ebd4f6c992b8bace..1dd90612783defd0e448652737fb9f90cece88d9 100644 --- a/Framework/CurveFitting/test/Functions/TabulatedFunctionTest.h +++ b/Framework/CurveFitting/test/Functions/TabulatedFunctionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/Functions/TeixeiraWaterSQETest.h b/Framework/CurveFitting/test/Functions/TeixeiraWaterSQETest.h index e0e7d21e9c5a1bf26016d3cec97600937e72b6fe..169950774821f8c84c3e971a7290eab44041b049 100644 --- a/Framework/CurveFitting/test/Functions/TeixeiraWaterSQETest.h +++ b/Framework/CurveFitting/test/Functions/TeixeiraWaterSQETest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/Functions/ThermalNeutronBk2BkExpAlphaTest.h b/Framework/CurveFitting/test/Functions/ThermalNeutronBk2BkExpAlphaTest.h index fc7b268d92065dd063e728f704b39564075d52d6..a3e1efbad7e81b1ea1cf78b7ca5ee0a78b8d08db 100644 --- a/Framework/CurveFitting/test/Functions/ThermalNeutronBk2BkExpAlphaTest.h +++ b/Framework/CurveFitting/test/Functions/ThermalNeutronBk2BkExpAlphaTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/Functions/ThermalNeutronBk2BkExpBetaTest.h b/Framework/CurveFitting/test/Functions/ThermalNeutronBk2BkExpBetaTest.h index 5d6bd83178b8c92f1b348db20add073e0747e7a8..74e6c304f3b10901d49d496a38e6e7a5a4d169a2 100644 --- a/Framework/CurveFitting/test/Functions/ThermalNeutronBk2BkExpBetaTest.h +++ b/Framework/CurveFitting/test/Functions/ThermalNeutronBk2BkExpBetaTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/Functions/ThermalNeutronBk2BkExpConvPVoigtTest.h b/Framework/CurveFitting/test/Functions/ThermalNeutronBk2BkExpConvPVoigtTest.h index 2b5e99ede2c41e1aa72ed0c2626bb1e5715344fc..cce095be6f080fd6dc160fffeb01cf4ba526d075 100644 --- a/Framework/CurveFitting/test/Functions/ThermalNeutronBk2BkExpConvPVoigtTest.h +++ b/Framework/CurveFitting/test/Functions/ThermalNeutronBk2BkExpConvPVoigtTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/Functions/ThermalNeutronBk2BkExpSigmaTest.h b/Framework/CurveFitting/test/Functions/ThermalNeutronBk2BkExpSigmaTest.h index 99a96a944afff73b8a01c137d1a43a5aa84a2ba4..b1e93337b601d4d588e34219105e7cd4e6f3a422 100644 --- a/Framework/CurveFitting/test/Functions/ThermalNeutronBk2BkExpSigmaTest.h +++ b/Framework/CurveFitting/test/Functions/ThermalNeutronBk2BkExpSigmaTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/Functions/ThermalNeutronDtoTOFFunctionTest.h b/Framework/CurveFitting/test/Functions/ThermalNeutronDtoTOFFunctionTest.h index a6f752986d707b20aca8a7e4ce1adb595592698f..6f8560b4c670d813b21fd6ef51bc541dcaf2581d 100644 --- a/Framework/CurveFitting/test/Functions/ThermalNeutronDtoTOFFunctionTest.h +++ b/Framework/CurveFitting/test/Functions/ThermalNeutronDtoTOFFunctionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/Functions/UserFunction1DTest.h b/Framework/CurveFitting/test/Functions/UserFunction1DTest.h index 06a7c280e3213a7b1a6948ea27cb5bccdb66fd58..50d80af74d7a2ceb5af7836d13b89a8a3dc2a800 100644 --- a/Framework/CurveFitting/test/Functions/UserFunction1DTest.h +++ b/Framework/CurveFitting/test/Functions/UserFunction1DTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/Functions/UserFunctionTest.h b/Framework/CurveFitting/test/Functions/UserFunctionTest.h index 28da6d53093762ed033422082f2ca92d953a21c5..7e917dc1dc1f15ffe8c1dc1e10265d0c8c51d550 100644 --- a/Framework/CurveFitting/test/Functions/UserFunctionTest.h +++ b/Framework/CurveFitting/test/Functions/UserFunctionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/Functions/VesuvioResolutionTest.h b/Framework/CurveFitting/test/Functions/VesuvioResolutionTest.h index 3fc5d6c80d30305a0211d8408505d808839d07a0..019eaa613ed8ef80c3478aeb7757e9fcdd12af2e 100644 --- a/Framework/CurveFitting/test/Functions/VesuvioResolutionTest.h +++ b/Framework/CurveFitting/test/Functions/VesuvioResolutionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/Functions/VoigtTest.h b/Framework/CurveFitting/test/Functions/VoigtTest.h index fda3e3467b780806f63ccba5a0b63efed696d9bd..a925130deea16deb4a3a86e2e827bca181338e7b 100644 --- a/Framework/CurveFitting/test/Functions/VoigtTest.h +++ b/Framework/CurveFitting/test/Functions/VoigtTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/GSLMatrixTest.h b/Framework/CurveFitting/test/GSLMatrixTest.h index 12f13657f75c6d2446071262afef53eb701c9ca8..c067f53e4c707be96da33cd91c8736b697a53b4d 100644 --- a/Framework/CurveFitting/test/GSLMatrixTest.h +++ b/Framework/CurveFitting/test/GSLMatrixTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/GSLVectorTest.h b/Framework/CurveFitting/test/GSLVectorTest.h index f4a574ea118482a872688f54d1a2b2ebec11b369..9b61b3ecbc69319b920362d051d4dde24c8eab42 100644 --- a/Framework/CurveFitting/test/GSLVectorTest.h +++ b/Framework/CurveFitting/test/GSLVectorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/GeneralDomainCreatorTest.h b/Framework/CurveFitting/test/GeneralDomainCreatorTest.h index ae4ba09d1aba601fd14ce3d8e2d6dc12cc47602d..01b19f40dd64413b93f6a023e1d82c1a36d5109d 100644 --- a/Framework/CurveFitting/test/GeneralDomainCreatorTest.h +++ b/Framework/CurveFitting/test/GeneralDomainCreatorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/GramCharlierTest.h b/Framework/CurveFitting/test/GramCharlierTest.h index a933e7f00484fb264970cb09a330a8460a67689c..3c666486976bed7cdfa3f246c477881c0b039d1b 100644 --- a/Framework/CurveFitting/test/GramCharlierTest.h +++ b/Framework/CurveFitting/test/GramCharlierTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/HistogramDomainCreatorTest.h b/Framework/CurveFitting/test/HistogramDomainCreatorTest.h index 17d01c251a12de9027af85696380d8ac10cccb03..a09450e0550a6e90852599ec757b5fc0d4a493af 100644 --- a/Framework/CurveFitting/test/HistogramDomainCreatorTest.h +++ b/Framework/CurveFitting/test/HistogramDomainCreatorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -463,8 +463,9 @@ private: return ws2; } - MatrixWorkspace_sptr createFitWorkspace(const size_t ny, - std::function<double(double)> fun) { + MatrixWorkspace_sptr + createFitWorkspace(const size_t ny, + const std::function<double(double)> &fun) { MatrixWorkspace_sptr ws(new WorkspaceTester); size_t nx = ny + 1; double x0 = -1.0; diff --git a/Framework/CurveFitting/test/IPeakFunctionCentreParameterNameTest.h b/Framework/CurveFitting/test/IPeakFunctionCentreParameterNameTest.h index c095613e1a47693fd18968b9f58149447ca93bee..ab434a83bf881bb31d65c22d0c35b88def94ac44 100644 --- a/Framework/CurveFitting/test/IPeakFunctionCentreParameterNameTest.h +++ b/Framework/CurveFitting/test/IPeakFunctionCentreParameterNameTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/IPeakFunctionIntensityTest.h b/Framework/CurveFitting/test/IPeakFunctionIntensityTest.h index 3b23ed34c585a183d1c708e371002e8d1c800625..0319a0b6c3df9f649ff7caf443ae272a9f771abc 100644 --- a/Framework/CurveFitting/test/IPeakFunctionIntensityTest.h +++ b/Framework/CurveFitting/test/IPeakFunctionIntensityTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/LatticeDomainCreatorTest.h b/Framework/CurveFitting/test/LatticeDomainCreatorTest.h index d695170fc1c2f891706ba85442ddfe42c473cf54..6b30616bd85e68ce80e3eccd09ef074e7c1cce16 100644 --- a/Framework/CurveFitting/test/LatticeDomainCreatorTest.h +++ b/Framework/CurveFitting/test/LatticeDomainCreatorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/LatticeFunctionTest.h b/Framework/CurveFitting/test/LatticeFunctionTest.h index 75462f9c46aef6d862f2395637d17e9753a10d23..f39305f96cca17c1f59acec69cd17017d2ea9e55 100644 --- a/Framework/CurveFitting/test/LatticeFunctionTest.h +++ b/Framework/CurveFitting/test/LatticeFunctionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/MultiDomainCreatorTest.h b/Framework/CurveFitting/test/MultiDomainCreatorTest.h index c850730248ae2cff71c7e0576e625eb0e4f382e7..146991f53f43eaa89eb392b6f937c8a064bacf9a 100644 --- a/Framework/CurveFitting/test/MultiDomainCreatorTest.h +++ b/Framework/CurveFitting/test/MultiDomainCreatorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -302,7 +302,7 @@ public: } private: - void doTestOutputSpectrum(MatrixWorkspace_sptr ws, size_t index) { + void doTestOutputSpectrum(const MatrixWorkspace_sptr &ws, size_t index) { TS_ASSERT(ws); TS_ASSERT_EQUALS(ws->getNumberHistograms(), 3); auto &data = ws->readY(0); diff --git a/Framework/CurveFitting/test/MultiDomainFunctionTest.h b/Framework/CurveFitting/test/MultiDomainFunctionTest.h index c01a088cc56725e24bec90cb7afd42d20ba2f79e..ac6054f57774a2fdb458a34e6f098d56add0d2c3 100644 --- a/Framework/CurveFitting/test/MultiDomainFunctionTest.h +++ b/Framework/CurveFitting/test/MultiDomainFunctionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/ParameterEstimatorTest.h b/Framework/CurveFitting/test/ParameterEstimatorTest.h index 1c0be9a2b9a4755416f70efe60080b0f0399245b..30378dbacfd07137b26fb9774d80695a68591d89 100644 --- a/Framework/CurveFitting/test/ParameterEstimatorTest.h +++ b/Framework/CurveFitting/test/ParameterEstimatorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/PrecompiledHeader.h b/Framework/CurveFitting/test/PrecompiledHeader.h index adcf3fe9edc168c3769b88c432395da8ff526ffa..df4e6052ccaafca874dce2fda2f80babe278e764 100644 --- a/Framework/CurveFitting/test/PrecompiledHeader.h +++ b/Framework/CurveFitting/test/PrecompiledHeader.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/RalNlls/NLLSTest.h b/Framework/CurveFitting/test/RalNlls/NLLSTest.h index b27765982a23a693e1738be2b982b2e8a16a451c..07c2c074b69878e7f1f2589d9d314db8fe08f468 100644 --- a/Framework/CurveFitting/test/RalNlls/NLLSTest.h +++ b/Framework/CurveFitting/test/RalNlls/NLLSTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/SpecialFunctionSupportTest.h b/Framework/CurveFitting/test/SpecialFunctionSupportTest.h index b2a5f94ed2a26b14f49c1f8730772841429c284b..ada39f86da58fa0abc19a458d02e07afb5cb49a6 100644 --- a/Framework/CurveFitting/test/SpecialFunctionSupportTest.h +++ b/Framework/CurveFitting/test/SpecialFunctionSupportTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/CurveFitting/test/TableWorkspaceDomainCreatorTest.h b/Framework/CurveFitting/test/TableWorkspaceDomainCreatorTest.h index ffde2f45454f088e5e6870a26dcdfa26a99cb5ac..743bac005d50c13b182e8e049207ffb4e01d1394 100644 --- a/Framework/CurveFitting/test/TableWorkspaceDomainCreatorTest.h +++ b/Framework/CurveFitting/test/TableWorkspaceDomainCreatorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -770,8 +770,8 @@ private: } boost::shared_ptr<Fit> - setupBasicFitPropertiesAlgorithm(API::IFunction_sptr fun, - API::Workspace_sptr ws, + setupBasicFitPropertiesAlgorithm(const API::IFunction_sptr &fun, + const API::Workspace_sptr &ws, bool createOutput = true) { auto fit = boost::make_shared<Fit>(); fit->initialize(); diff --git a/Framework/DataHandling/inc/MantidDataHandling/AppendGeometryToSNSNexus.h b/Framework/DataHandling/inc/MantidDataHandling/AppendGeometryToSNSNexus.h index 03137f7dc1b058bd36149845b913f199e80b61f9..971696c075357790711f54d7e5cdca4262d16f48 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/AppendGeometryToSNSNexus.h +++ b/Framework/DataHandling/inc/MantidDataHandling/AppendGeometryToSNSNexus.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -49,12 +49,12 @@ private: /// Run LoadInstrument as a Child Algorithm bool runLoadInstrument(const std::string &idf_filename, - API::MatrixWorkspace_sptr localWorkspace, + const API::MatrixWorkspace_sptr &localWorkspace, Algorithm *alg); /// Load logs from the NeXus file static bool runLoadNexusLogs(const std::string &nexusFileName, - API::MatrixWorkspace_sptr localWorkspace, + const API::MatrixWorkspace_sptr &localWorkspace, Algorithm *alg); /// Are we going to make a copy of the NeXus file to operate on ? diff --git a/Framework/DataHandling/inc/MantidDataHandling/AsciiPointBase.h b/Framework/DataHandling/inc/MantidDataHandling/AsciiPointBase.h index 75ce0a26f85cb0fe7c80e0efaa2815c7ef4b4c0c..0e79ae060fabd2eccbc5aa86739ac69c3b37e71e 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/AsciiPointBase.h +++ b/Framework/DataHandling/inc/MantidDataHandling/AsciiPointBase.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/BankPulseTimes.h b/Framework/DataHandling/inc/MantidDataHandling/BankPulseTimes.h index 6eb0d54646b1c4be7a34678e358602e4c7b77cd0..5edb30b89ebc93495d86522931ac795789434154 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/BankPulseTimes.h +++ b/Framework/DataHandling/inc/MantidDataHandling/BankPulseTimes.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -32,7 +32,7 @@ public: ~BankPulseTimes(); /// Equals - bool equals(size_t otherNumPulse, std::string otherStartTime); + bool equals(size_t otherNumPulse, const std::string &otherStartTime); /// String describing the start time std::string startTime; diff --git a/Framework/DataHandling/inc/MantidDataHandling/CheckMantidVersion.h b/Framework/DataHandling/inc/MantidDataHandling/CheckMantidVersion.h index d4c2a2ff43a0ee7d4da0db5d05f9bc9e00bbba2e..93ccd7d1b76c4712ce85a230fb1dd1a38ea3c99f 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/CheckMantidVersion.h +++ b/Framework/DataHandling/inc/MantidDataHandling/CheckMantidVersion.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/CompressEvents.h b/Framework/DataHandling/inc/MantidDataHandling/CompressEvents.h index dd91de0468861f5c41b79b1b5301de8ec039cb58..88d340a86e4ff6ca1fe3ec934951b2cf43d69501 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/CompressEvents.h +++ b/Framework/DataHandling/inc/MantidDataHandling/CompressEvents.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/CreateChunkingFromInstrument.h b/Framework/DataHandling/inc/MantidDataHandling/CreateChunkingFromInstrument.h index 46a685dd613c4a17423f6e5d84d5b17764fbcf16..6ccbb7ccb8c421e9e4d716998c15b4a49a9c0437 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/CreateChunkingFromInstrument.h +++ b/Framework/DataHandling/inc/MantidDataHandling/CreateChunkingFromInstrument.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/CreatePolarizationEfficiencies.h b/Framework/DataHandling/inc/MantidDataHandling/CreatePolarizationEfficiencies.h index 6a43da046e13b3a222ab11ab0c3e7412364dc0a3..1c20f79906982a5f9db1ee73feb6f360fcd1e6d7 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/CreatePolarizationEfficiencies.h +++ b/Framework/DataHandling/inc/MantidDataHandling/CreatePolarizationEfficiencies.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/CreatePolarizationEfficienciesBase.h b/Framework/DataHandling/inc/MantidDataHandling/CreatePolarizationEfficienciesBase.h index b6883f778d4548b9e4bb57d5904fc3a62ea9b597..9b0b0321d6b3b01c15e00220e48adafbf1700774 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/CreatePolarizationEfficienciesBase.h +++ b/Framework/DataHandling/inc/MantidDataHandling/CreatePolarizationEfficienciesBase.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/CreateSampleShape.h b/Framework/DataHandling/inc/MantidDataHandling/CreateSampleShape.h index 881f3232de8f0e8725a19bf8d0297a020fad7955..de6e87ba26f5662486da4e2e3f55d5d1b9fe09b0 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/CreateSampleShape.h +++ b/Framework/DataHandling/inc/MantidDataHandling/CreateSampleShape.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/CreateSimulationWorkspace.h b/Framework/DataHandling/inc/MantidDataHandling/CreateSimulationWorkspace.h index 642f04f376ba9187770c33627378dafc427fefa0..e8d09ae03001d2fc5cd7686788788a343b8043d1 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/CreateSimulationWorkspace.h +++ b/Framework/DataHandling/inc/MantidDataHandling/CreateSimulationWorkspace.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -54,7 +54,7 @@ private: /// Apply any instrument adjustments from the file void adjustInstrument(const std::string &filename); /// Set start date for dummy workspace - void setStartDate(API::MatrixWorkspace_sptr workspace); + void setStartDate(const API::MatrixWorkspace_sptr &workspace); /// Pointer to a progress object boost::shared_ptr<API::Progress> m_progress; diff --git a/Framework/DataHandling/inc/MantidDataHandling/DataBlock.h b/Framework/DataHandling/inc/MantidDataHandling/DataBlock.h index 040a1da942f6c8159dbfcbd14fa0c6585828804b..d5922d899916ad8846273f643926bd667d19ddad 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/DataBlock.h +++ b/Framework/DataHandling/inc/MantidDataHandling/DataBlock.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/DataBlockComposite.h b/Framework/DataHandling/inc/MantidDataHandling/DataBlockComposite.h index b519ddaddbb26abf1c51fdc111c0e7541f4a5aac..307d7b84caf8fbac1b4ac4071009b7dacb99fe13 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/DataBlockComposite.h +++ b/Framework/DataHandling/inc/MantidDataHandling/DataBlockComposite.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -33,7 +33,7 @@ public: bool operator==(const DataBlockComposite &other) const; // DataBlockComposite only mehtods - void addDataBlock(DataBlock dataBlock); + void addDataBlock(const DataBlock &dataBlock); std::vector<DataBlock> getDataBlocks(); DataBlockComposite operator+(const DataBlockComposite &other); void removeSpectra(DataBlockComposite &toRemove); diff --git a/Framework/DataHandling/inc/MantidDataHandling/DataBlockGenerator.h b/Framework/DataHandling/inc/MantidDataHandling/DataBlockGenerator.h index ce3122546dce0ab179753eb471fea9d08c0788dd..320685533e54dda6d51a34a29196e80a50388ce5 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/DataBlockGenerator.h +++ b/Framework/DataHandling/inc/MantidDataHandling/DataBlockGenerator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/DefaultEventLoader.h b/Framework/DataHandling/inc/MantidDataHandling/DefaultEventLoader.h index f5b4bd0a5c53763e15882f3b1c1866832cdcc21d..30241cf1d539d611bb70b8d5b57752c66641100d 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/DefaultEventLoader.h +++ b/Framework/DataHandling/inc/MantidDataHandling/DefaultEventLoader.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/DefineGaugeVolume.h b/Framework/DataHandling/inc/MantidDataHandling/DefineGaugeVolume.h index e55330eaa483d7180fafa24a4c3df46007433891..5416faaced5bf180cbbe37a7498b0d79f30c65c5 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/DefineGaugeVolume.h +++ b/Framework/DataHandling/inc/MantidDataHandling/DefineGaugeVolume.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/DeleteTableRows.h b/Framework/DataHandling/inc/MantidDataHandling/DeleteTableRows.h index 121cfbd08749c957b4f6c06f15b66019846816b8..c5a6af4f0d2c1f1c5a07220caf116eb62d8feb2f 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/DeleteTableRows.h +++ b/Framework/DataHandling/inc/MantidDataHandling/DeleteTableRows.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/DetermineChunking.h b/Framework/DataHandling/inc/MantidDataHandling/DetermineChunking.h index 0d7cfce521674b52135c20379a374810708264ed..5df1afc8758a885cd2641bdcdca2a96043b76509 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/DetermineChunking.h +++ b/Framework/DataHandling/inc/MantidDataHandling/DetermineChunking.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -57,7 +57,7 @@ public: private: void init() override; void exec() override; - std::string setTopEntryName(std::string filename); + std::string setTopEntryName(const std::string &filename); FileType getFileType(const std::string &filename); }; diff --git a/Framework/DataHandling/inc/MantidDataHandling/DllConfig.h b/Framework/DataHandling/inc/MantidDataHandling/DllConfig.h index e3baae7154b835d534fae5997f077e88ab06523a..ef854c388ba82c257979cb5aa9941e84212c8241 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/DllConfig.h +++ b/Framework/DataHandling/inc/MantidDataHandling/DllConfig.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/DownloadFile.h b/Framework/DataHandling/inc/MantidDataHandling/DownloadFile.h index d0cd55b2c89778ecec0a79667127683f85ee4bbf..855a63e048f09da5cd63077a975ea53920d9a092 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/DownloadFile.h +++ b/Framework/DataHandling/inc/MantidDataHandling/DownloadFile.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/DownloadInstrument.h b/Framework/DataHandling/inc/MantidDataHandling/DownloadInstrument.h index ec00f4cee4dc549cc517ff91c1c810c3d3e731ed..11994b4e7fdcd5f4b92dfa25e02046b742c7a024 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/DownloadInstrument.h +++ b/Framework/DataHandling/inc/MantidDataHandling/DownloadInstrument.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/EventWorkspaceCollection.h b/Framework/DataHandling/inc/MantidDataHandling/EventWorkspaceCollection.h index 92b67220c4f1fc6aa00c3ac621d311110fd62753..7e2dcfc33bbd9857fe1f0d2091b3fc1b5d1595b5 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/EventWorkspaceCollection.h +++ b/Framework/DataHandling/inc/MantidDataHandling/EventWorkspaceCollection.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -59,7 +59,7 @@ public: void setThickness(const float flag); void setHeight(const float flag); void setWidth(const float flag); - void setSpectrumNumbersFromUniqueSpectra(const std::set<int> uniqueSpectra); + void setSpectrumNumbersFromUniqueSpectra(const std::set<int> &uniqueSpectra); void setSpectrumNumberForAllPeriods(const size_t spectrumNumber, const specnum_t specid); void setDetectorIdsForAllPeriods(const size_t spectrumNumber, @@ -88,8 +88,9 @@ public: void setMonitorWorkspace(const boost::shared_ptr<API::MatrixWorkspace> &monitorWS); void updateSpectraUsing(const API::SpectrumDetectorMapping &map); - void setTitle(std::string title); - void applyFilter(boost::function<void(API::MatrixWorkspace_sptr)> func); + void setTitle(const std::string &title); + void + applyFilter(const boost::function<void(API::MatrixWorkspace_sptr)> &func); virtual bool threadSafe() const; }; diff --git a/Framework/DataHandling/inc/MantidDataHandling/ExtractMonitorWorkspace.h b/Framework/DataHandling/inc/MantidDataHandling/ExtractMonitorWorkspace.h index 45be425670b9b5255ea15e3a8876baee9c019d87..6037585a32df9dec77358385a8fc759281decd18 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/ExtractMonitorWorkspace.h +++ b/Framework/DataHandling/inc/MantidDataHandling/ExtractMonitorWorkspace.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/ExtractPolarizationEfficiencies.h b/Framework/DataHandling/inc/MantidDataHandling/ExtractPolarizationEfficiencies.h index adf43574345e5f7e303be3b92f7c6f0b29625526..4868f26620023ce881831aa8f88b7f4e71f85014 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/ExtractPolarizationEfficiencies.h +++ b/Framework/DataHandling/inc/MantidDataHandling/ExtractPolarizationEfficiencies.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/FilterEventsByLogValuePreNexus.h b/Framework/DataHandling/inc/MantidDataHandling/FilterEventsByLogValuePreNexus.h index 41fbcf8f2340fa75bb2ba8a4987b5a21fef90c1d..9a6d5d706a6e78d9eb423b49efb50bfe7d3fd96b 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/FilterEventsByLogValuePreNexus.h +++ b/Framework/DataHandling/inc/MantidDataHandling/FilterEventsByLogValuePreNexus.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -11,6 +11,7 @@ #include "MantidDataObjects/EventWorkspace.h" #include "MantidDataObjects/Events.h" #include "MantidKernel/BinaryFile.h" +#include "MantidKernel/FileDescriptor.h" #include <fstream> #include <string> #include <vector> @@ -121,7 +122,7 @@ private: void readPulseidFile(const std::string &filename, const bool throwError); void runLoadInstrument(const std::string &eventfilename, - API::MatrixWorkspace_sptr localWorkspace); + const API::MatrixWorkspace_sptr &localWorkspace); void procEvents(DataObjects::EventWorkspace_sptr &workspace); @@ -132,15 +133,15 @@ private: void setProtonCharge(DataObjects::EventWorkspace_sptr &workspace); - void addToWorkspaceLog(std::string logtitle, size_t mindex); + void addToWorkspaceLog(const std::string &logtitle, size_t mindex); void processEventLogs(); /// Pad out empty pixel - size_t padOutEmptyPixels(DataObjects::EventWorkspace_sptr eventws); + size_t padOutEmptyPixels(const DataObjects::EventWorkspace_sptr &eventws); /// Set up spectrum/detector ID map inside a workspace - void setupPixelSpectrumMap(DataObjects::EventWorkspace_sptr eventws); + void setupPixelSpectrumMap(const DataObjects::EventWorkspace_sptr &eventws); /// void filterEvents(); @@ -271,4 +272,4 @@ private: bool m_corretctTOF; }; } // namespace DataHandling -} // namespace Mantid \ No newline at end of file +} // namespace Mantid diff --git a/Framework/DataHandling/inc/MantidDataHandling/FindDetectorsInShape.h b/Framework/DataHandling/inc/MantidDataHandling/FindDetectorsInShape.h index 6f35c0a432697a70d626cf8d89fe5662033ccd3f..19dd2e4f28bad9c7ff6e6e20027a59725423dd7f 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/FindDetectorsInShape.h +++ b/Framework/DataHandling/inc/MantidDataHandling/FindDetectorsInShape.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/FindDetectorsPar.h b/Framework/DataHandling/inc/MantidDataHandling/FindDetectorsPar.h index 363f92ca3d7eb8aca780bee1cd693b01e1f38199..b3e3f1f62324251d5e30097b3bad112767551a22 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/FindDetectorsPar.h +++ b/Framework/DataHandling/inc/MantidDataHandling/FindDetectorsPar.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/GenerateGroupingPowder.h b/Framework/DataHandling/inc/MantidDataHandling/GenerateGroupingPowder.h index 68e99c7a732daf5f7db8b2c2f2d84b2532cac562..d3752517c426647b729354ee0b3395c20ae3b47f 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/GenerateGroupingPowder.h +++ b/Framework/DataHandling/inc/MantidDataHandling/GenerateGroupingPowder.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/GroupDetectors.h b/Framework/DataHandling/inc/MantidDataHandling/GroupDetectors.h index 7504062a1892de9b6e52e43f6c144fd1a3d23d30..c9b888db19cc82d39237470ecd32a6011221c7f4 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/GroupDetectors.h +++ b/Framework/DataHandling/inc/MantidDataHandling/GroupDetectors.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/GroupDetectors2.h b/Framework/DataHandling/inc/MantidDataHandling/GroupDetectors2.h index 6ed7cacd3bbe31a092728ab36282afd7647c9da8..fc590b50ef0a3c2305400075a71b9649e037af6f 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/GroupDetectors2.h +++ b/Framework/DataHandling/inc/MantidDataHandling/GroupDetectors2.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -151,23 +151,23 @@ private: void execEvent(); /// read in the input parameters and see what findout what will be to grouped - void getGroups(API::MatrixWorkspace_const_sptr workspace, + void getGroups(const API::MatrixWorkspace_const_sptr &workspace, std::vector<int64_t> &unUsedSpec); /// gets the list of spectra _index_ _numbers_ from a file of _spectra_ /// _numbers_ void processFile(const std::string &fname, - API::MatrixWorkspace_const_sptr workspace, + const API::MatrixWorkspace_const_sptr &workspace, std::vector<int64_t> &unUsedSpec); /// gets groupings from XML file void processXMLFile(const std::string &fname, - API::MatrixWorkspace_const_sptr workspace, + const API::MatrixWorkspace_const_sptr &workspace, std::vector<int64_t> &unUsedSpec); - void - processGroupingWorkspace(DataObjects::GroupingWorkspace_const_sptr groupWS, - API::MatrixWorkspace_const_sptr workspace, - std::vector<int64_t> &unUsedSpec); - void processMatrixWorkspace(API::MatrixWorkspace_const_sptr groupWS, - API::MatrixWorkspace_const_sptr workspace, + void processGroupingWorkspace( + const DataObjects::GroupingWorkspace_const_sptr &groupWS, + const API::MatrixWorkspace_const_sptr &workspace, + std::vector<int64_t> &unUsedSpec); + void processMatrixWorkspace(const API::MatrixWorkspace_const_sptr &groupWS, + const API::MatrixWorkspace_const_sptr &workspace, std::vector<int64_t> &unUsedSpec); /// used while reading the file turns the string into an integer number (if /// possible), white space and # comments ignored @@ -193,14 +193,15 @@ private: /// Copy the and combine the histograms that the user requested from the input /// into the output workspace - size_t formGroups(API::MatrixWorkspace_const_sptr inputWS, - API::MatrixWorkspace_sptr outputWS, const double prog4Copy, - const bool keepAll, const std::set<int64_t> &unGroupedSet, + size_t formGroups(const API::MatrixWorkspace_const_sptr &inputWS, + const API::MatrixWorkspace_sptr &outputWS, + const double prog4Copy, const bool keepAll, + const std::set<int64_t> &unGroupedSet, Indexing::IndexInfo &indexInfo); /// Copy the and combine the event lists that the user requested from the /// input into the output workspace - size_t formGroupsEvent(DataObjects::EventWorkspace_const_sptr inputWS, - DataObjects::EventWorkspace_sptr outputWS, + size_t formGroupsEvent(const DataObjects::EventWorkspace_const_sptr &inputWS, + const DataObjects::EventWorkspace_sptr &outputWS, const double prog4Copy); /// Copy the ungrouped spectra from the input workspace to the output diff --git a/Framework/DataHandling/inc/MantidDataHandling/H5Util.h b/Framework/DataHandling/inc/MantidDataHandling/H5Util.h index 3bec8788dd1dd23b188f50dceb32a6165b22cf92..ec6fc0381bc26f2e18df10f2270804b16d702b9b 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/H5Util.h +++ b/Framework/DataHandling/inc/MantidDataHandling/H5Util.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/ISISDataArchive.h b/Framework/DataHandling/inc/MantidDataHandling/ISISDataArchive.h index e2a089021e35e3a4e80970865920ed7edfc8e8bd..247b05bc0343e86d9751b08c8b0a2db2498d48a0 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/ISISDataArchive.h +++ b/Framework/DataHandling/inc/MantidDataHandling/ISISDataArchive.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/ISISRunLogs.h b/Framework/DataHandling/inc/MantidDataHandling/ISISRunLogs.h index 4281af62a6d7bc46ee4daa39723a2e8633b72153..32ae8a1f430c3191fb1a1319f0b9c0f909dca4a3 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/ISISRunLogs.h +++ b/Framework/DataHandling/inc/MantidDataHandling/ISISRunLogs.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/JoinISISPolarizationEfficiencies.h b/Framework/DataHandling/inc/MantidDataHandling/JoinISISPolarizationEfficiencies.h index f2bbf256eff989dd6b64e3ba1c5d9d21878137bf..61d2de494c1f0b1c71350307947fbc38663abd61 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/JoinISISPolarizationEfficiencies.h +++ b/Framework/DataHandling/inc/MantidDataHandling/JoinISISPolarizationEfficiencies.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -33,10 +33,10 @@ private: std::vector<API::MatrixWorkspace_sptr> interpolateWorkspaces( std::vector<API::MatrixWorkspace_sptr> const &workspaces); API::MatrixWorkspace_sptr - interpolatePointDataWorkspace(API::MatrixWorkspace_sptr ws, + interpolatePointDataWorkspace(const API::MatrixWorkspace_sptr &ws, size_t const maxSize); API::MatrixWorkspace_sptr - interpolateHistogramWorkspace(API::MatrixWorkspace_sptr ws, + interpolateHistogramWorkspace(const API::MatrixWorkspace_sptr &ws, size_t const maxSize); }; diff --git a/Framework/DataHandling/inc/MantidDataHandling/Load.h b/Framework/DataHandling/inc/MantidDataHandling/Load.h index a4ee231daa3ef1c22959177a2b26894e3b5e93e7..2fa6eb936de13d88971f8ba12e230c223ab37e5b 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/Load.h +++ b/Framework/DataHandling/inc/MantidDataHandling/Load.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -88,7 +88,8 @@ private: API::Workspace_sptr loadFileToWs(const std::string &fileName, const std::string &wsName); /// Plus two workspaces together, "in place". - API::Workspace_sptr plusWs(API::Workspace_sptr ws1, API::Workspace_sptr ws2); + API::Workspace_sptr plusWs(API::Workspace_sptr ws1, + const API::Workspace_sptr &ws2); /// Manually group workspaces. API::WorkspaceGroup_sptr groupWsList(const std::vector<API::Workspace_sptr> &wsList); diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadANSTOEventFile.h b/Framework/DataHandling/inc/MantidDataHandling/LoadANSTOEventFile.h index 5db6a29512b0743d656fbd94cb207e320a7a30b3..91ce18fbde18a8ba063a6bc827ffb90372a8e0c0 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadANSTOEventFile.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadANSTOEventFile.h @@ -1,3 +1,9 @@ +// Mantid Repository : https://github.com/mantidproject/mantid +// +// Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS +// SPDX - License - Identifier: GPL - 3.0 + #pragma once #include <cstdio> diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadANSTOHelper.h b/Framework/DataHandling/inc/MantidDataHandling/LoadANSTOHelper.h index 34e41fd3a2efacac290d4f1a7b67b77b7d35de3f..7b098263ee79424162b5dfae1b5f7f8c946db562 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadANSTOHelper.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadANSTOHelper.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadAscii.h b/Framework/DataHandling/inc/MantidDataHandling/LoadAscii.h index 2a0ff98847c63c1fb3feaf3df721106e20d92c41..ed66803c543a2be8aac1861363863239617a54b3 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadAscii.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadAscii.h @@ -1,13 +1,14 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidAPI/DeprecatedAlgorithm.h" #include "MantidAPI/IFileLoader.h" +#include "MantidKernel/FileDescriptor.h" #include <list> diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadAscii2.h b/Framework/DataHandling/inc/MantidDataHandling/LoadAscii2.h index 71b19ea45c7da8ae5ac023692b502dfdc4652976..3321435b6642a7a5d916f17d1f179b6b4a1b0076 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadAscii2.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadAscii2.h @@ -1,14 +1,15 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidAPI/IFileLoader.h" #include "MantidAPI/MatrixWorkspace_fwd.h" #include "MantidDataObjects/Histogram1D.h" +#include "MantidKernel/FileDescriptor.h" #include <list> diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadAsciiStl.h b/Framework/DataHandling/inc/MantidDataHandling/LoadAsciiStl.h index 9799919e6de009e1f00f6c9cafaac56cc14d6090..d955e90fec6acf00fd7e6139351b3e02406a2b1c 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadAsciiStl.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadAsciiStl.h @@ -1,12 +1,14 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidDataHandling/LoadStl.h" #include <iosfwd> +#include <utility> + namespace Mantid { namespace Kernel { @@ -21,12 +23,12 @@ namespace DataHandling { class DLLExport LoadAsciiStl : public LoadStl { public: LoadAsciiStl(std::string filename, ScaleUnits scaleType) - : LoadStl(filename, scaleType) {} + : LoadStl(std::move(filename), scaleType) {} LoadAsciiStl(std::string filename, ScaleUnits scaleType, ReadMaterial::MaterialParameters params) - : LoadStl(filename, scaleType, params) {} + : LoadStl(std::move(filename), scaleType, std::move(params)) {} std::unique_ptr<Geometry::MeshObject> readStl() override; - static bool isAsciiSTL(std::string filename); + static bool isAsciiSTL(const std::string &filename); private: int m_lineNumber = 0; diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadBBY.h b/Framework/DataHandling/inc/MantidDataHandling/LoadBBY.h index 8a5ddcacf084ccb47497f3eab6ed90f8cbf109f7..d14fcad53cc0515831ea2300571c28336d2d4629 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadBBY.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadBBY.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -14,6 +14,7 @@ #include "MantidAPI/IFileLoader.h" #include "MantidDataObjects/EventWorkspace.h" #include "MantidGeometry/Instrument.h" +#include "MantidKernel/FileDescriptor.h" #include "MantidNexus/NexusClasses.h" namespace Mantid { diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadBankFromDiskTask.h b/Framework/DataHandling/inc/MantidDataHandling/LoadBankFromDiskTask.h index 20394ae5f907805aaf155beffd47ab573ca12a1b..645839ec83f505f8a62875046e0ac7cb1ea69657 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadBankFromDiskTask.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadBankFromDiskTask.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadBinaryStl.h b/Framework/DataHandling/inc/MantidDataHandling/LoadBinaryStl.h index 885a37edf73fbc9814dc1cae64cf8a05e7cdf248..c69730cd169127a3069bce82e31b3b9bebc5078f 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadBinaryStl.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadBinaryStl.h @@ -1,10 +1,14 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once +#include <utility> + +#include <utility> + #include "MantidDataHandling/LoadStl.h" namespace Mantid { @@ -24,12 +28,13 @@ public: static constexpr uint32_t TRIANGLE_COUNT_DATA_SIZE = 4; static constexpr uint32_t VECTOR_DATA_SIZE = 12; LoadBinaryStl(std::string filename, ScaleUnits scaleType) - : LoadStl(filename, scaleType) {} + : LoadStl(std::move(std::move(filename)), scaleType) {} LoadBinaryStl(std::string filename, ScaleUnits scaleType, ReadMaterial::MaterialParameters params) - : LoadStl(filename, scaleType, params) {} + : LoadStl(std::move(std::move(filename)), scaleType, + std::move(std::move(params))) {} std::unique_ptr<Geometry::MeshObject> readStl() override; - static bool isBinarySTL(std::string filename); + static bool isBinarySTL(const std::string &filename); private: void readTriangle(Kernel::BinaryStreamReader, uint32_t &vertexCount); diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadCalFile.h b/Framework/DataHandling/inc/MantidDataHandling/LoadCalFile.h index f6d120b7d2c7a7384f4cd5902a29cb8d1d7b49e7..cec536b2ac4ed02aed40d42bc6cf821dee07ff50 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadCalFile.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadCalFile.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -53,10 +53,11 @@ public: getInstrument3Ways(API::Algorithm *alg); static bool instrumentIsSpecified(API::Algorithm *alg); - static void readCalFile(const std::string &calFileName, - Mantid::DataObjects::GroupingWorkspace_sptr groupWS, - Mantid::DataObjects::OffsetsWorkspace_sptr offsetsWS, - Mantid::DataObjects::MaskWorkspace_sptr maskWS); + static void + readCalFile(const std::string &calFileName, + const Mantid::DataObjects::GroupingWorkspace_sptr &groupWS, + const Mantid::DataObjects::OffsetsWorkspace_sptr &offsetsWS, + const Mantid::DataObjects::MaskWorkspace_sptr &maskWS); protected: Parallel::ExecutionMode getParallelExecutionMode( @@ -70,7 +71,7 @@ private: void exec() override; /// Checks if a detector ID is for a monitor on a given instrument - static bool idIsMonitor(Mantid::Geometry::Instrument_const_sptr inst, + static bool idIsMonitor(const Mantid::Geometry::Instrument_const_sptr &inst, int detID); }; diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadCanSAS1D.h b/Framework/DataHandling/inc/MantidDataHandling/LoadCanSAS1D.h index 4e2c787aa22a0ab03fd1211ed942737137312913..398a393a94fe92dce3e260d1798b73a7df21b3d3 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadCanSAS1D.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadCanSAS1D.h @@ -1,14 +1,16 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidAPI/IFileLoader.h" #include "MantidAPI/WorkspaceGroup_fwd.h" #include "MantidDataObjects/Workspace2D.h" +#include "MantidKernel/FileDescriptor.h" + #include <Poco/DOM/Element.h> #include <Poco/DOM/Node.h> @@ -74,18 +76,19 @@ protected: const std::string &name) const; /// Appends the new data workspace creating a workspace group if there was /// existing data - void appendDataToOutput(API::MatrixWorkspace_sptr newWork, + void appendDataToOutput(const API::MatrixWorkspace_sptr &newWork, const std::string &newWorkName, - API::WorkspaceGroup_sptr container); + const API::WorkspaceGroup_sptr &container); /// Run LoadInstrument Child Algorithm void runLoadInstrument(const std::string &inst_name, - API::MatrixWorkspace_sptr localWorkspace); + const API::MatrixWorkspace_sptr &localWorkspace); /// Loads data into the run log void createLogs(const Poco::XML::Element *const sasEntry, - API::MatrixWorkspace_sptr wSpace) const; + const API::MatrixWorkspace_sptr &wSpace) const; /// Loads the information about hhe sample - void createSampleInformation(const Poco::XML::Element *const sasEntry, - Mantid::API::MatrixWorkspace_sptr wSpace) const; + void createSampleInformation( + const Poco::XML::Element *const sasEntry, + const Mantid::API::MatrixWorkspace_sptr &wSpace) const; }; } // namespace DataHandling } // namespace Mantid diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadCanSAS1D2.h b/Framework/DataHandling/inc/MantidDataHandling/LoadCanSAS1D2.h index ae61a75f103693aeafcc6b9b6c2fbe625b5726a7..b5556639caa832dd0617f56eeae1c4e63ce83dbe 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadCanSAS1D2.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadCanSAS1D2.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadDaveGrp.h b/Framework/DataHandling/inc/MantidDataHandling/LoadDaveGrp.h index e10d459b1077bbfbc1d3c7c7868248208ed7b846..ca091548c58af7966b865e004ef7410f80090db8 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadDaveGrp.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadDaveGrp.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -11,6 +11,7 @@ #include <vector> #include "MantidAPI/IFileLoader.h" +#include "MantidKernel/FileDescriptor.h" #include "MantidKernel/cow_ptr.h" namespace Mantid { @@ -101,7 +102,7 @@ private: * * @param workspace handle to the workspace to to load data into */ - void getData(API::MatrixWorkspace_sptr workspace); + void getData(const API::MatrixWorkspace_sptr &workspace); /** * Function to setup the workspace ready for data to be loaded into it @@ -117,7 +118,7 @@ private: * @param xAxis the x axis data * @param yAxis the y axis data */ - void setWorkspaceAxes(API::MatrixWorkspace_sptr workspace, + void setWorkspaceAxes(const API::MatrixWorkspace_sptr &workspace, const std::vector<double> &xAxis, const std::vector<double> &yAxis) const; diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadDetectorInfo.h b/Framework/DataHandling/inc/MantidDataHandling/LoadDetectorInfo.h index be5c952181f92b7203eddf43fc8ebeb07be073f4..895cdf93f921f77b5a10da068452cda5eba31e39 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadDetectorInfo.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadDetectorInfo.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadDetectorsGroupingFile.h b/Framework/DataHandling/inc/MantidDataHandling/LoadDetectorsGroupingFile.h index 88bcf39e5020d969a6e9e07e19dcdf64fec7f032..66ba3fca07f27f50a888ad3221bc8973d2eca4de 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadDetectorsGroupingFile.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadDetectorsGroupingFile.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -107,7 +107,7 @@ class DLLExport LoadGroupXMLFile { public: LoadGroupXMLFile(); - void loadXMLFile(std::string xmlfilename); + void loadXMLFile(const std::string &xmlfilename); void setDefaultStartingGroupID(int startgroupid) { m_startGroupID = startgroupid; } @@ -167,7 +167,7 @@ private: void parseXML(); /// Get attribute value from an XML node static std::string getAttributeValueByName(Poco::XML::Node *pNode, - std::string attributename, + const std::string &attributename, bool &found); }; diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadDiffCal.h b/Framework/DataHandling/inc/MantidDataHandling/LoadDiffCal.h index 1384ea4286423631a2681bc682122df0eb63a9c0..7e4841ed8feaf0156278404198a71bbebcb5734b 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadDiffCal.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadDiffCal.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadDspacemap.h b/Framework/DataHandling/inc/MantidDataHandling/LoadDspacemap.h index 63f73c07997424eff10e45a399d4ebc1a089a94c..fe0f2ea36148a5bb42f820ff13a74a54115a778b 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadDspacemap.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadDspacemap.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -48,12 +48,12 @@ private: std::map<detid_t, double> &vulcan); void CalculateOffsetsFromDSpacemapFile( - const std::string DFileName, - Mantid::DataObjects::OffsetsWorkspace_sptr offsetsWS); + const std::string &DFileName, + const Mantid::DataObjects::OffsetsWorkspace_sptr &offsetsWS); void CalculateOffsetsFromVulcanFactors( std::map<detid_t, double> &vulcan, - Mantid::DataObjects::OffsetsWorkspace_sptr offsetsWS); + const Mantid::DataObjects::OffsetsWorkspace_sptr &offsetsWS); }; } // namespace DataHandling diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadEMU.h b/Framework/DataHandling/inc/MantidDataHandling/LoadEMU.h index ac4d4e56124925dd5f4bc4716017fcddf3f0b04d..ec17deec23bd392d9e482010bf22c5d57a795c08 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadEMU.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadEMU.h @@ -1,3 +1,9 @@ +// Mantid Repository : https://github.com/mantidproject/mantid +// +// Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS +// SPDX - License - Identifier: GPL - 3.0 + #pragma once //--------------------------------------------------- @@ -10,6 +16,8 @@ #include "MantidAPI/LogManager.h" #include "MantidDataObjects/EventWorkspace.h" #include "MantidGeometry/Instrument.h" +#include "MantidKernel/FileDescriptor.h" +#include "MantidKernel/NexusDescriptor.h" #include "MantidNexus/NexusClasses.h" namespace Mantid { @@ -21,27 +29,6 @@ using ANSTO::EventVector_pt; Loads an ANSTO EMU event file and stores it in an event workspace. @author Geish Miladinovic (ANSTO) - -Copyright © 2010 ISIS Rutherford Appleton Laboratory, NScD Oak Ridge -National Laboratory & European Spallation Source - -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> */ template <typename FD> class LoadEMU : public API::IFileLoader<FD> { diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadEmptyInstrument.h b/Framework/DataHandling/inc/MantidDataHandling/LoadEmptyInstrument.h index 87483d94a9fab406854da88aa1c3278026b6a535..78b53f5c0b711776ca91d90cedb7c4077c7bc9db 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadEmptyInstrument.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadEmptyInstrument.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -11,6 +11,7 @@ //---------------------------------------------------------------------- #include "MantidAPI/IFileLoader.h" #include "MantidDataObjects/Workspace2D.h" +#include "MantidKernel/FileDescriptor.h" namespace Mantid { namespace DataHandling { diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadEventNexus.h b/Framework/DataHandling/inc/MantidDataHandling/LoadEventNexus.h index b75c9dd5cda5c23914c6a9cfcd8b06ce4bc01e0a..3c2c8141cb82c705f1039663f4d50bed02e735b8 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadEventNexus.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadEventNexus.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -15,6 +15,7 @@ #include "MantidDataObjects/Events.h" #include "MantidGeometry/Instrument.h" #include "MantidGeometry/Instrument/ParameterMap.h" +#include "MantidKernel/NexusDescriptor.h" #include "MantidKernel/OptionalBool.h" #include "MantidKernel/TimeSeriesProperty.h" @@ -205,8 +206,8 @@ private: void createSpectraMapping( const std::string &nxsfile, const bool monitorsOnly, const std::vector<std::string> &bankNames = std::vector<std::string>()); - void deleteBanks(EventWorkspaceCollection_sptr workspace, - std::vector<std::string> bankNames); + void deleteBanks(const EventWorkspaceCollection_sptr &workspace, + const std::vector<std::string> &bankNames); bool hasEventMonitors(); void runLoadMonitors(); /// Set the filters on TOF. @@ -222,7 +223,7 @@ private: void setTopEntryName(); /// to open the nexus file with specific exception handling/message - void safeOpenFile(const std::string fname); + void safeOpenFile(const std::string &fname); /// Was the instrument loaded? bool m_instrument_loaded_correctly; diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadEventNexusIndexSetup.h b/Framework/DataHandling/inc/MantidDataHandling/LoadEventNexusIndexSetup.h index c2cc435cc9c3f91d121686e525027a7aa5b1f70c..a653534a18cd997ad2d7730614b602f1d2857832 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadEventNexusIndexSetup.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadEventNexusIndexSetup.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -28,7 +28,7 @@ class MANTID_DATAHANDLING_DLL LoadEventNexusIndexSetup { public: LoadEventNexusIndexSetup( API::MatrixWorkspace_const_sptr instrumentWorkspace, const int32_t min, - const int32_t max, const std::vector<int32_t> range, + const int32_t max, const std::vector<int32_t> &range, const Parallel::Communicator &communicator = Parallel::Communicator()); std::pair<int32_t, int32_t> eventIDLimits() const; diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadEventPreNexus2.h b/Framework/DataHandling/inc/MantidDataHandling/LoadEventPreNexus2.h index cb7adfda1243f155f8c8f0ad57be9da5c7bc1e1f..cb2b3b406b9d4056fa60823408b943728cd56014 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadEventPreNexus2.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadEventPreNexus2.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -10,6 +10,7 @@ #include "MantidDataObjects/EventWorkspace.h" #include "MantidDataObjects/Events.h" #include "MantidKernel/BinaryFile.h" +#include "MantidKernel/FileDescriptor.h" #include <fstream> #include <string> #include <vector> @@ -187,7 +188,7 @@ private: void readPulseidFile(const std::string &filename, const bool throwError); void runLoadInstrument(const std::string &eventfilename, - API::MatrixWorkspace_sptr localWorkspace); + const API::MatrixWorkspace_sptr &localWorkspace); inline void fixPixelId(PixelType &pixel, uint32_t &period) const; @@ -201,7 +202,7 @@ private: void setProtonCharge(DataObjects::EventWorkspace_sptr &workspace); - void addToWorkspaceLog(std::string logtitle, size_t mindex); + void addToWorkspaceLog(const std::string &logtitle, size_t mindex); void processImbedLogs(); @@ -211,10 +212,10 @@ private: API::MatrixWorkspace_sptr generateEventDistribtionWorkspace(); - void createOutputWorkspace(const std::string event_filename); + void createOutputWorkspace(const std::string &event_filename); /// Processing the input properties for purpose of investigation void processInvestigationInputs(); }; } // namespace DataHandling -} // namespace Mantid \ No newline at end of file +} // namespace Mantid diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadFITS.h b/Framework/DataHandling/inc/MantidDataHandling/LoadFITS.h index a185b4b5c6cd87f91116b2175188b8c4e705e476..c1720745222adb9c475b30ab537c636253e3a077 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadFITS.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadFITS.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -16,6 +16,7 @@ #include "MantidAPI/IFileLoader.h" #include "MantidDataObjects/Workspace2D.h" +#include "MantidKernel/FileDescriptor.h" namespace Mantid { namespace DataHandling { @@ -90,15 +91,16 @@ private: DataObjects::Workspace2D_sptr makeWorkspace( const FITSInfo &fileInfo, size_t &newFileNumber, std::vector<char> &buffer, API::MantidImage &imageY, - API::MantidImage &imageE, const DataObjects::Workspace2D_sptr parent, + API::MantidImage &imageE, const DataObjects::Workspace2D_sptr &parent, bool loadAsRectImg = false, int binSize = 1, double noiseThresh = false); - void addAxesInfoAndLogs(DataObjects::Workspace2D_sptr ws, bool loadAsRectImg, - const FITSInfo &fileInfo, int binSize, double cmpp); + void addAxesInfoAndLogs(const DataObjects::Workspace2D_sptr &ws, + bool loadAsRectImg, const FITSInfo &fileInfo, + int binSize, double cmpp); // Reads the data from a single FITS file into a workspace (directly, fast) void readDataToWorkspace(const FITSInfo &fileInfo, double cmpp, - DataObjects::Workspace2D_sptr ws, + const DataObjects::Workspace2D_sptr &ws, std::vector<char> &buffer); // Reads the data from a single FITS file into image objects (Y and E) that diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadFullprofResolution.h b/Framework/DataHandling/inc/MantidDataHandling/LoadFullprofResolution.h index 682472a00f9fe4ac18ad0c7ebe60b4a9aeab89c4..0796c67a633fb32f7c52e4b9ca49a60489704fe1 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadFullprofResolution.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadFullprofResolution.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -51,48 +51,48 @@ public: std::map<std::string, size_t> ¶mmap); /// Put parameters into a matrix workspace - static void putParametersIntoWorkspace(const API::Column_const_sptr, - API::MatrixWorkspace_sptr ws, + static void putParametersIntoWorkspace(const API::Column_const_sptr &, + const API::MatrixWorkspace_sptr &ws, int nProf, std::string ¶meterXMLString); /// Add an Ikeda-Carpenter PV ALFBE parameter - static void addALFBEParameter(const API::Column_const_sptr, + static void addALFBEParameter(const API::Column_const_sptr &, Poco::XML::Document *mDoc, Poco::XML::Element *parent, const std::string ¶mName); /// Add set of Ikeda-Carpenter PV Sigma parameters - static void addSigmaParameters(const API::Column_const_sptr, + static void addSigmaParameters(const API::Column_const_sptr &, Poco::XML::Document *mDoc, Poco::XML::Element *parent); /// Add set of Ikeda-Carpenter PV Gamma parameters - static void addGammaParameters(const API::Column_const_sptr, + static void addGammaParameters(const API::Column_const_sptr &, Poco::XML::Document *mDoc, Poco::XML::Element *parent); /// Add set of BackToBackExponential S parameters - static void addBBX_S_Parameters(const API::Column_const_sptr, + static void addBBX_S_Parameters(const API::Column_const_sptr &, Poco::XML::Document *mDoc, Poco::XML::Element *parent); /// Add set of BackToBackExponential A parameters - static void addBBX_A_Parameters(const API::Column_const_sptr, + static void addBBX_A_Parameters(const API::Column_const_sptr &, Poco::XML::Document *mDoc, Poco::XML::Element *parent); /// Add set of BackToBackExponential B parameters - static void addBBX_B_Parameters(const API::Column_const_sptr, + static void addBBX_B_Parameters(const API::Column_const_sptr &, Poco::XML::Document *mDoc, Poco::XML::Element *parent); /// Get value for XML eq attribute for parameter - static std::string getXMLEqValue(const API::Column_const_sptr, + static std::string getXMLEqValue(const API::Column_const_sptr &, const std::string &name); /// Get value for XML eq attribute for squared parameter - static std::string getXMLSquaredEqValue(const API::Column_const_sptr column, + static std::string getXMLSquaredEqValue(const API::Column_const_sptr &column, const std::string &name); // Translate a parameter name from as it appears in the table workspace to its @@ -114,7 +114,7 @@ private: void exec() override; /// Load file to a vector of strings - void loadFile(std::string filename, std::vector<std::string> &lines); + void loadFile(const std::string &filename, std::vector<std::string> &lines); /// Get the NPROF number int getProfNumber(const std::vector<std::string> &lines); diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadGSASInstrumentFile.h b/Framework/DataHandling/inc/MantidDataHandling/LoadGSASInstrumentFile.h index 432086914e8de06fd59358a3cad912e88ceed564..da15be2dc473984baadb9ec6a0fb53d566958b10 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadGSASInstrumentFile.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadGSASInstrumentFile.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -49,7 +49,7 @@ private: void exec() override; /// Load file to a vector of strings - void loadFile(std::string filename, std::vector<std::string> &lines); + void loadFile(const std::string &filename, std::vector<std::string> &lines); /// Get Histogram type std::string getHistogramType(const std::vector<std::string> &lines); diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadGSS.h b/Framework/DataHandling/inc/MantidDataHandling/LoadGSS.h index 8a357fc09ec3c17f412ce1c7945d323865c38058..cefa59b10e4c8305ff0a36a3a76e287513ddc6d0 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadGSS.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadGSS.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -10,6 +10,7 @@ // Includes //--------------------------------------------------- #include "MantidAPI/IFileLoader.h" +#include "MantidKernel/FileDescriptor.h" namespace Mantid { namespace DataHandling { @@ -62,7 +63,7 @@ private: double convertToDouble(std::string inputstring); /// Create an instrument geometry. - void createInstrumentGeometry(API::MatrixWorkspace_sptr workspace, + void createInstrumentGeometry(const API::MatrixWorkspace_sptr &workspace, const std::string &instrumentname, const double &primaryflightpath, const std::vector<int> &detectorids, @@ -70,4 +71,4 @@ private: const std::vector<double> &twothetas); }; } // namespace DataHandling -} // namespace Mantid \ No newline at end of file +} // namespace Mantid diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadGeometry.h b/Framework/DataHandling/inc/MantidDataHandling/LoadGeometry.h index f1af430b305b3c049de712b148a4f07e52d9f914..f06a9b423d35e4f733370699ee5e945fd2e798e0 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadGeometry.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadGeometry.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadHFIRSANS.h b/Framework/DataHandling/inc/MantidDataHandling/LoadHFIRSANS.h index d13111d5726373be0963231e50606a864ed1ebbb..e70c8ae8dcafd5ed0bafb5cf314b445e0be300e9 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadHFIRSANS.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadHFIRSANS.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -10,6 +10,8 @@ #include "MantidDataHandling/XmlHandler.h" #include "MantidDataObjects/Workspace2D.h" #include "MantidKernel/DateAndTime.h" +#include "MantidKernel/FileDescriptor.h" + #include <map> #include <string> #include <utility> diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadHelper.h b/Framework/DataHandling/inc/MantidDataHandling/LoadHelper.h index f21a7fcafe3d32b1b573cad59d77892e63bd31b7..e1d76e61361236dfe290af9096dcacfe1718bd56 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadHelper.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadHelper.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -35,18 +35,19 @@ public: static double calculateStandardError(double in) { return sqrt(in); } double calculateEnergy(double); double calculateTOF(double, double); - double getInstrumentProperty(const API::MatrixWorkspace_sptr &, std::string); + double getInstrumentProperty(const API::MatrixWorkspace_sptr &, + const std::string &); void addNexusFieldsToWsRun(NXhandle nxfileID, API::Run &runDetails); void dumpNexusAttributes(NXhandle nxfileID, std::string &indentStr); - std::string dateTimeInIsoFormat(std::string); + std::string dateTimeInIsoFormat(const std::string &); - void moveComponent(API::MatrixWorkspace_sptr ws, + void moveComponent(const API::MatrixWorkspace_sptr &ws, const std::string &componentName, const Kernel::V3D &newPos); - void rotateComponent(API::MatrixWorkspace_sptr ws, + void rotateComponent(const API::MatrixWorkspace_sptr &ws, const std::string &componentName, const Kernel::Quat &rot); - Kernel::V3D getComponentPosition(API::MatrixWorkspace_sptr ws, + Kernel::V3D getComponentPosition(const API::MatrixWorkspace_sptr &ws, const std::string &componentName); private: diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadIDFFromNexus.h b/Framework/DataHandling/inc/MantidDataHandling/LoadIDFFromNexus.h index d950f2206240db0973e2612c178eaf004816d9c3..b1e0389853c021cb04d8d3dd61fa0d830bc67983 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadIDFFromNexus.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadIDFFromNexus.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -59,7 +59,7 @@ public: /// Load the parameters from Nexus file if possible, else from parameter file, /// into workspace void LoadParameters(::NeXus::File *nxfile, - const API::MatrixWorkspace_sptr localWorkspace); + const API::MatrixWorkspace_sptr &localWorkspace); /// Algorithm's version for identification overriding a virtual method int version() const override { return 1; } @@ -77,7 +77,7 @@ private: /// Load Parameter File specified by full pathname into given workspace, /// return success bool loadParameterFile(const std::string &fullPathName, - const API::MatrixWorkspace_sptr localWorkspace); + const API::MatrixWorkspace_sptr &localWorkspace); }; } // namespace DataHandling diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadILLDiffraction.h b/Framework/DataHandling/inc/MantidDataHandling/LoadILLDiffraction.h index d24ba3fe0d206c79a40dbc01fba7cc4e88a2f857..5e62681ceae7f0caa121214a7e2303a489327e9d 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadILLDiffraction.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadILLDiffraction.h @@ -1,15 +1,18 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once +#include <utility> + #include "MantidAPI/IFileLoader.h" #include "MantidDataHandling/DllConfig.h" #include "MantidDataHandling/LoadHelper.h" #include "MantidKernel/DateAndTime.h" +#include "MantidKernel/NexusDescriptor.h" #include "MantidKernel/V3D.h" #include "MantidNexus/NexusClasses.h" @@ -44,7 +47,8 @@ private: std::string unit; ScannedVariables(std::string n, std::string p, std::string u) - : axis(0), scanned(0), name(n), property(p), unit(u) {} + : axis(0), scanned(0), name(std::move(n)), property(std::move(p)), + unit(std::move(u)) {} void setAxis(int a) { axis = a; } void setScanned(int s) { scanned = s; } diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadILLIndirect2.h b/Framework/DataHandling/inc/MantidDataHandling/LoadILLIndirect2.h index 691c3ede883a4325a109cb43807dca2e55a3c562..961712138804b2ffb89b6dab068706f4807b39d3 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadILLIndirect2.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadILLIndirect2.h @@ -1,13 +1,14 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidAPI/IFileLoader.h" #include "MantidDataHandling/LoadHelper.h" +#include "MantidKernel/NexusDescriptor.h" #include "MantidNexus/NexusClasses.h" namespace Mantid { @@ -43,7 +44,7 @@ private: void initWorkSpace(); void setInstrumentName(const NeXus::NXEntry &firstEntry, const std::string &instrumentNamePath); - void loadNexusEntriesIntoProperties(std::string nexusfilename); + void loadNexusEntriesIntoProperties(const std::string &nexusfilename); void loadDataIntoTheWorkSpace(NeXus::NXEntry &entry); void runLoadInstrument(); void moveComponent(const std::string &, double); diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadILLPolarizationFactors.h b/Framework/DataHandling/inc/MantidDataHandling/LoadILLPolarizationFactors.h index 12627afee1397864355871d3e611018e686535f7..365b904e106d9112b43a1cce8e605892f8c9a2e2 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadILLPolarizationFactors.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadILLPolarizationFactors.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadILLReflectometry.h b/Framework/DataHandling/inc/MantidDataHandling/LoadILLReflectometry.h index cc4377ee76657f038b2a4492bd399ce0425adf31..9d7f9380b540e94d142046e959226a354f93392a 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadILLReflectometry.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadILLReflectometry.h @@ -1,14 +1,15 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidAPI/IFileLoader.h" #include "MantidAPI/MatrixWorkspace_fwd.h" #include "MantidDataHandling/LoadHelper.h" +#include "MantidKernel/NexusDescriptor.h" #include "MantidNexus/NexusClasses.h" namespace Mantid { diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadILLSANS.h b/Framework/DataHandling/inc/MantidDataHandling/LoadILLSANS.h index f057580f8632d6516e1ac394290de492f1fe4e5e..42a1810760e308fa5b238dd56755a93c9158ad54 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadILLSANS.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadILLSANS.h @@ -1,13 +1,14 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidAPI/IFileLoader.h" #include "MantidDataHandling/LoadHelper.h" +#include "MantidKernel/NexusDescriptor.h" #include "MantidKernel/System.h" #include "MantidNexus/NexusClasses.h" diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadILLTOF2.h b/Framework/DataHandling/inc/MantidDataHandling/LoadILLTOF2.h index 5988e8116e754fd35fd328348c4616bc2662e767..7d19b4709aa4ac663668a8439f9dd89ecfd9ffc7 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadILLTOF2.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadILLTOF2.h @@ -1,14 +1,15 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidAPI/IFileLoader.h" #include "MantidDataHandling/LoadHelper.h" #include "MantidGeometry/IDTypes.h" +#include "MantidKernel/NexusDescriptor.h" #include "MantidNexus/NexusClasses.h" namespace Mantid { diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadISISNexus2.h b/Framework/DataHandling/inc/MantidDataHandling/LoadISISNexus2.h index 1843942ec663c75af3adbf73e8a46e4aa5a911f7..464d3ebe2a9ccabd431351d1e709cfee8b01d506 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadISISNexus2.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadISISNexus2.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -15,6 +15,7 @@ #include "MantidDataHandling/DataBlockComposite.h" #include "MantidDataHandling/ISISRunLogs.h" #include "MantidDataObjects/Workspace2D.h" +#include "MantidKernel/NexusDescriptor.h" #include "MantidNexus/NexusClasses.h" #include <nexus/NeXusFile.hpp> @@ -128,7 +129,7 @@ private: void createPeriodLogs(int64_t period, DataObjects::Workspace2D_sptr &local_workspace); // Validate multi-period logs - void validateMultiPeriodLogs(Mantid::API::MatrixWorkspace_sptr); + void validateMultiPeriodLogs(const Mantid::API::MatrixWorkspace_sptr &); // build the list of spectra numbers to load and include in the spectra list void buildSpectraInd2SpectraNumMap(bool range_supplied, bool hasSpectraList, diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadISISPolarizationEfficiencies.h b/Framework/DataHandling/inc/MantidDataHandling/LoadISISPolarizationEfficiencies.h index 588aa7bb6caf74dd64d326bbbbe3065c92f65dad..57db18558edb3e7c1be49ca4d66e0158fed20cdb 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadISISPolarizationEfficiencies.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadISISPolarizationEfficiencies.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadInstrument.h b/Framework/DataHandling/inc/MantidDataHandling/LoadInstrument.h index 05aacf736e880c1c71ba8313e13366fc2e441ee3..af8bcd4fb77fb0e86a76188e6a1d7181b9b2fbd2 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadInstrument.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadInstrument.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -82,12 +82,12 @@ private: /// Run the Child Algorithm LoadParameters void runLoadParameterFile(const boost::shared_ptr<API::MatrixWorkspace> &ws, - std::string filename); + const std::string &filename); /// Search directory for Parameter file, return full path name if found, else /// "". - std::string getFullPathParamIDF(std::string directoryName, - std::string filename); + std::string getFullPathParamIDF(const std::string &directoryName, + const std::string &filename); /// Mutex to avoid simultaneous access static std::recursive_mutex m_mutex; diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadInstrumentFromNexus.h b/Framework/DataHandling/inc/MantidDataHandling/LoadInstrumentFromNexus.h index 751ce3ac5efc917838b68e5df19d31093e300fa9..7fdbf25ea32ae5259d720c266f9eca1e7aac217b 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadInstrumentFromNexus.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadInstrumentFromNexus.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadInstrumentFromRaw.h b/Framework/DataHandling/inc/MantidDataHandling/LoadInstrumentFromRaw.h index 9c06decdd2fac5926b2832bfcb491784c8db98d3..9a09ce3ec53c415a27fb2513a5c110d3598c2613 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadInstrumentFromRaw.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadInstrumentFromRaw.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadIsawDetCal.h b/Framework/DataHandling/inc/MantidDataHandling/LoadIsawDetCal.h index c86549044b6342058d3f9526f8c88cc9be1b63e6..a9692c495fc22e48163add0679c910485aae26c0 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadIsawDetCal.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadIsawDetCal.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -66,15 +66,15 @@ private: /// Set the center of the supplied detector name void center(const double x, const double y, const double z, - const std::string &detname, API::Workspace_sptr ws, + const std::string &detname, const API::Workspace_sptr &ws, Geometry::ComponentInfo &componentInfo); - Geometry::Instrument_sptr getCheckInst(API::Workspace_sptr ws); + Geometry::Instrument_sptr getCheckInst(const API::Workspace_sptr &ws); std::vector<std::string> getFilenames(); void doRotation(Kernel::V3D rX, Kernel::V3D rY, Geometry::ComponentInfo &componentInfo, - boost::shared_ptr<const Geometry::IComponent> comp, + const boost::shared_ptr<const Geometry::IComponent> &comp, bool doWishCorrection = false); void applyScalings( API::Workspace_sptr &ws, diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadLLB.h b/Framework/DataHandling/inc/MantidDataHandling/LoadLLB.h index d26d86786d46a974a5f137694bfd80d67f49365c..b4837a291d2bd43abeec4c087ea91acca3c6773b 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadLLB.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadLLB.h @@ -1,14 +1,15 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidAPI/IFileLoader.h" #include "MantidDataHandling/LoadHelper.h" #include "MantidHistogramData/Histogram.h" +#include "MantidKernel/NexusDescriptor.h" #include "MantidKernel/System.h" #include "MantidNexus/NexusClasses.h" diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadLog.h b/Framework/DataHandling/inc/MantidDataHandling/LoadLog.h index 399408c33e93004d74407ecb054ceb03e7cb31bf..34112bb1bc4fe64eb146ece830f5aba4cb597753 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadLog.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadLog.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -114,7 +114,7 @@ private: /// Create timeseries property from .log file and adds that to sample object void loadThreeColumnLogFile(std::ifstream &logFileStream, - std::string logFileName, API::Run &run); + const std::string &logFileName, API::Run &run); /// Loads two column log file data into local workspace void loadTwoColumnLogFile(std::ifstream &logFileStream, diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadMLZ.h b/Framework/DataHandling/inc/MantidDataHandling/LoadMLZ.h index 0344b3cd18ca25170d499dee5bb576a355e0032d..a59f65279c13d0d8b76f1bccad04364be80161e2 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadMLZ.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadMLZ.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -11,6 +11,7 @@ //--------------------------------------------------- #include "MantidAPI/IFileLoader.h" #include "MantidDataHandling/LoadHelper.h" +#include "MantidKernel/NexusDescriptor.h" #include "MantidNexus/NexusClasses.h" namespace Mantid { diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadMappingTable.h b/Framework/DataHandling/inc/MantidDataHandling/LoadMappingTable.h index 1ccef3b185fa8853b8d4471389a8501f226be32c..c0670a007fe2fc8cbfe387d084b6f76c9491563a 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadMappingTable.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadMappingTable.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadMask.h b/Framework/DataHandling/inc/MantidDataHandling/LoadMask.h index 6cb9d80d880ca55192dd244a0640ba0bec1fdd7c..f62ba095d034cdaf60cd5c232c1afd36d247d45a 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadMask.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadMask.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadMcStas.h b/Framework/DataHandling/inc/MantidDataHandling/LoadMcStas.h index b398dd8572352174c819366012984a7b907c7942..04d1170a59f723fac0d2ba7f34ffa84cc75fd063 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadMcStas.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadMcStas.h @@ -1,14 +1,15 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidAPI/Algorithm.h" #include "MantidAPI/IEventWorkspace.h" #include "MantidAPI/IFileLoader.h" +#include "MantidKernel/NexusDescriptor.h" #include "MantidKernel/System.h" #include "MantidAPI/WorkspaceGroup_fwd.h" diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadMcStasNexus.h b/Framework/DataHandling/inc/MantidDataHandling/LoadMcStasNexus.h index 0741ffe0d6d3405fe18727e45bc2fab95accbe7a..3b102e1793de0db2f45cbcc48081ba74e8e3910d 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadMcStasNexus.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadMcStasNexus.h @@ -1,12 +1,13 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidAPI/IFileLoader.h" +#include "MantidKernel/NexusDescriptor.h" #include "MantidKernel/System.h" namespace Mantid { diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadMuonLog.h b/Framework/DataHandling/inc/MantidDataHandling/LoadMuonLog.h index a0c117dfff7cac5b464a479885315a86d487bb8b..1ed215720066a2cad3e2e9497eb36eda9b6e295c 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadMuonLog.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadMuonLog.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadMuonNexus.h b/Framework/DataHandling/inc/MantidDataHandling/LoadMuonNexus.h index 53e709f1bbc503967d600118e615f00b5987f211..b447ebc7abb4f9d607e76e9d37648bb6e8667062 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadMuonNexus.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadMuonNexus.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -11,6 +11,7 @@ //---------------------------------------------------------------------- #include "MantidAPI/IFileLoader.h" #include "MantidDataObjects/Workspace2D.h" +#include "MantidKernel/NexusDescriptor.h" #include "MantidKernel/System.h" //---------------------------------------------------------------------- @@ -74,7 +75,7 @@ public: protected: virtual void runLoadInstrumentFromNexus(DataObjects::Workspace2D_sptr) {} void checkOptionalProperties(); - void runLoadInstrument(DataObjects::Workspace2D_sptr); + void runLoadInstrument(const DataObjects::Workspace2D_sptr &); /// The name and path of the input file std::string m_filename; diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadMuonNexus1.h b/Framework/DataHandling/inc/MantidDataHandling/LoadMuonNexus1.h index 9fb3ba6f39d765ce260278b325f5bc59e23c29ac..a79a1ff9070a78daeed6b09623035444e5112c16 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadMuonNexus1.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadMuonNexus1.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -84,13 +84,13 @@ protected: private: void loadData(size_t hist, specnum_t &i, specnum_t specNo, MuonNexusReader &nxload, const int64_t lengthIn, - DataObjects::Workspace2D_sptr localWorkspace); + const DataObjects::Workspace2D_sptr &localWorkspace); void runLoadMappingTable(DataObjects::Workspace2D_sptr); - void runLoadLog(DataObjects::Workspace2D_sptr); - void loadRunDetails(DataObjects::Workspace2D_sptr localWorkspace); - void addPeriodLog(DataObjects::Workspace2D_sptr localWorkspace, + void runLoadLog(const DataObjects::Workspace2D_sptr &); + void loadRunDetails(const DataObjects::Workspace2D_sptr &localWorkspace); + void addPeriodLog(const DataObjects::Workspace2D_sptr &localWorkspace, int64_t period); - void addGoodFrames(DataObjects::Workspace2D_sptr localWorkspace, + void addGoodFrames(const DataObjects::Workspace2D_sptr &localWorkspace, int64_t period, int nperiods); /// Loads dead time table for the detector @@ -104,7 +104,7 @@ private: /// Loads detector grouping information API::Workspace_sptr loadDetectorGrouping(Mantid::NeXus::NXRoot &root, - Mantid::Geometry::Instrument_const_sptr inst); + const Mantid::Geometry::Instrument_const_sptr &inst); /// Creates Detector Grouping Table using all the data from the range DataObjects::TableWorkspace_sptr diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadMuonNexus2.h b/Framework/DataHandling/inc/MantidDataHandling/LoadMuonNexus2.h index c08c01166e15523d6d57019377a318a67768e01b..0b43a3c127de6bde6f27095e1c3bfdb74352984c 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadMuonNexus2.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadMuonNexus2.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -79,9 +79,9 @@ private: HistogramData::Histogram loadData(const Mantid::HistogramData::BinEdges &edges, const Mantid::NeXus::NXInt &counts, int period, int spec); - void loadLogs(API::MatrixWorkspace_sptr ws, Mantid::NeXus::NXEntry &entry, - int period); - void loadRunDetails(DataObjects::Workspace2D_sptr localWorkspace); + void loadLogs(const API::MatrixWorkspace_sptr &ws, + Mantid::NeXus::NXEntry &entry, int period); + void loadRunDetails(const DataObjects::Workspace2D_sptr &localWorkspace); std::map<int, std::set<int>> loadDetectorMapping(const Mantid::NeXus::NXInt &spectrumIndex); }; diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadNGEM.h b/Framework/DataHandling/inc/MantidDataHandling/LoadNGEM.h index f5bb976844b2a35293c14d2badd88c922c536fc3..e7b84da84da97f932d61f5d38340d83364fd027d 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadNGEM.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadNGEM.h @@ -1,14 +1,14 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #pragma once #include "MantidAPI/IFileLoader.h" #include "MantidDataObjects/EventWorkspace.h" +#include "MantidKernel/FileDescriptor.h" namespace Mantid { namespace DataHandling { diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadNXSPE.h b/Framework/DataHandling/inc/MantidDataHandling/LoadNXSPE.h index 4eac6e929550289fc5ddbd3d1ec5a92cbdec4566..1b374fa89366a9b2528d05306adcafad0c2347ad 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadNXSPE.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadNXSPE.h @@ -1,13 +1,14 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidAPI/IFileLoader.h" #include "MantidGeometry/Objects/CSGObject.h" +#include "MantidKernel/NexusDescriptor.h" #include "MantidKernel/System.h" namespace Mantid { diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadNXcanSAS.h b/Framework/DataHandling/inc/MantidDataHandling/LoadNXcanSAS.h index 79ac726248052e3d4ad8659eb69759e7166dbe1a..730652bde87b3271f6a545d506c87cfc4543c114 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadNXcanSAS.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadNXcanSAS.h @@ -1,13 +1,14 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidAPI/IFileLoader.h" #include "MantidDataHandling/DllConfig.h" +#include "MantidKernel/NexusDescriptor.h" namespace H5 { class Group; diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadNexus.h b/Framework/DataHandling/inc/MantidDataHandling/LoadNexus.h index a5e83b3d9295ea2002c679f2bee49c39c86e0dc7..8ba207d67c2e8988ffb162833b82b57104894921 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadNexus.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadNexus.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadNexusLogs.h b/Framework/DataHandling/inc/MantidDataHandling/LoadNexusLogs.h index 679c713698c3f5237028dea94b62caa5c80b0ebc..27d649c53b28bf725932bf3f41af037c2edd2b2f 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadNexusLogs.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadNexusLogs.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -62,18 +62,22 @@ private: /// Load log data from a group void loadLogs(::NeXus::File &file, const std::string &entry_name, const std::string &entry_class, - boost::shared_ptr<API::MatrixWorkspace> workspace) const; + const boost::shared_ptr<API::MatrixWorkspace> &workspace) const; /// Load an NXlog entry - void loadNXLog(::NeXus::File &file, const std::string &entry_name, - const std::string &entry_class, - boost::shared_ptr<API::MatrixWorkspace> workspace) const; + void + loadNXLog(::NeXus::File &file, const std::string &entry_name, + const std::string &entry_class, + const boost::shared_ptr<API::MatrixWorkspace> &workspace) const; /// Load an IXseblock entry - void loadSELog(::NeXus::File &file, const std::string &entry_name, - boost::shared_ptr<API::MatrixWorkspace> workspace) const; - void loadVetoPulses(::NeXus::File &file, - boost::shared_ptr<API::MatrixWorkspace> workspace) const; - void loadNPeriods(::NeXus::File &file, - boost::shared_ptr<API::MatrixWorkspace> workspace) const; + void + loadSELog(::NeXus::File &file, const std::string &entry_name, + const boost::shared_ptr<API::MatrixWorkspace> &workspace) const; + void loadVetoPulses( + ::NeXus::File &file, + const boost::shared_ptr<API::MatrixWorkspace> &workspace) const; + void + loadNPeriods(::NeXus::File &file, + const boost::shared_ptr<API::MatrixWorkspace> &workspace) const; /// Progress reporting object boost::shared_ptr<API::Progress> m_progress; diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadNexusMonitors.h b/Framework/DataHandling/inc/MantidDataHandling/LoadNexusMonitors.h index ffbf9a2815dbbe0116a0c795c8c2bc7d78f0ccbf..7a147fb4dbdab278ab097fdc041a5820d10f1637 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadNexusMonitors.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadNexusMonitors.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadNexusMonitors2.h b/Framework/DataHandling/inc/MantidDataHandling/LoadNexusMonitors2.h index 429d903f8b6fb441daf3b29656c6656ffd013f33..f1ef867e40190d6bcd5f399daf9ed1e665e9927e 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadNexusMonitors2.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadNexusMonitors2.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -82,8 +82,8 @@ private: void fixUDets(::NeXus::File &file); /// Load the logs - void runLoadLogs(const std::string filename, - API::MatrixWorkspace_sptr localWorkspace); + void runLoadLogs(const std::string &filename, + const API::MatrixWorkspace_sptr &localWorkspace); /// is it possible to open the file? bool canOpenAsNeXus(const std::string &fname); diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadNexusProcessed.h b/Framework/DataHandling/inc/MantidDataHandling/LoadNexusProcessed.h index cde394eb67b85e1f8f6d54d502805d02e9aa3656..48b3d6ffa83f69b253f2d6c06d81a1f8de4b0361 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadNexusProcessed.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadNexusProcessed.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -13,6 +13,7 @@ #include "MantidAPI/ITableWorkspace_fwd.h" #include "MantidAPI/MatrixWorkspace_fwd.h" #include "MantidHistogramData/BinEdges.h" +#include "MantidKernel/NexusDescriptor.h" #include "MantidKernel/cow_ptr.h" #include "MantidNexus/NexusClasses.h" #include <map> @@ -159,7 +160,7 @@ private: /// Read the bin masking information void readBinMasking(Mantid::NeXus::NXData &wksp_cls, - API::MatrixWorkspace_sptr local_workspace); + const API::MatrixWorkspace_sptr &local_workspace); /// Load a block of data into the workspace where it is assumed that the x /// bins have already been cached @@ -168,7 +169,7 @@ private: Mantid::NeXus::NXDataSetTyped<double> &farea, bool hasFArea, Mantid::NeXus::NXDouble &xErrors, bool hasXErrors, int blocksize, int nchannels, int &hist, - API::MatrixWorkspace_sptr local_workspace); + const API::MatrixWorkspace_sptr &local_workspace); /// Load a block of data into the workspace where it is assumed that the x /// bins have already been cached @@ -177,7 +178,7 @@ private: Mantid::NeXus::NXDataSetTyped<double> &farea, bool hasFArea, Mantid::NeXus::NXDouble &xErrors, bool hasXErrors, int blocksize, int nchannels, int &hist, int &wsIndex, - API::MatrixWorkspace_sptr local_workspace); + const API::MatrixWorkspace_sptr &local_workspace); /// Load a block of data into the workspace void loadBlock(Mantid::NeXus::NXDataSetTyped<double> &data, Mantid::NeXus::NXDataSetTyped<double> &errors, @@ -185,10 +186,10 @@ private: Mantid::NeXus::NXDouble &xErrors, bool hasXErrors, Mantid::NeXus::NXDouble &xbins, int blocksize, int nchannels, int &hist, int &wsIndex, - API::MatrixWorkspace_sptr local_workspace); + const API::MatrixWorkspace_sptr &local_workspace); /// Load the data from a non-spectra axis (Numeric/Text) into the workspace - void loadNonSpectraAxis(API::MatrixWorkspace_sptr local_workspace, + void loadNonSpectraAxis(const API::MatrixWorkspace_sptr &local_workspace, Mantid::NeXus::NXData &data); /// Validates the optional 'spectra to read' properties, if they have been set @@ -231,8 +232,8 @@ private: std::unique_ptr<::NeXus::File> m_nexusFile; }; /// to sort the algorithmhistory vector -bool UDlesserExecCount(Mantid::NeXus::NXClassInfo elem1, - Mantid::NeXus::NXClassInfo elem2); +bool UDlesserExecCount(const Mantid::NeXus::NXClassInfo &elem1, + const Mantid::NeXus::NXClassInfo &elem2); } // namespace DataHandling } // namespace Mantid diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadNexusProcessed2.h b/Framework/DataHandling/inc/MantidDataHandling/LoadNexusProcessed2.h index 19c80c794dade82caaa3ac1cb29ea91ed4ad256f..e805eb48d6e1da2e5e0f6001d59062b5b5e25b1c 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadNexusProcessed2.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadNexusProcessed2.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadOff.h b/Framework/DataHandling/inc/MantidDataHandling/LoadOff.h index 65f28caf7def09e9a4ee41b457a687e44d170741..eb30b111e84a9187ccd9cb9d75aa8fa6938bb812 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadOff.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadOff.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidDataHandling/MeshFileIO.h" @@ -25,7 +25,7 @@ Mantid::Kernel::Logger g_log("LoadOff"); } class DLLExport LoadOff : public MeshFileIO { public: - LoadOff(std::string filename, ScaleUnits scaleType); + LoadOff(const std::string &filename, ScaleUnits scaleType); std::unique_ptr<Geometry::MeshObject> readOFFshape(); private: diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadPDFgetNFile.h b/Framework/DataHandling/inc/MantidDataHandling/LoadPDFgetNFile.h index ef57c6a47f75ee07f4ca47e191ea023144c05218..315da9cc9f64a04425765649b11cec586cf09237 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadPDFgetNFile.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadPDFgetNFile.h @@ -1,13 +1,14 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidAPI/IFileLoader.h" #include "MantidDataObjects/Workspace2D.h" +#include "MantidKernel/FileDescriptor.h" #include "MantidKernel/System.h" namespace Mantid { @@ -45,7 +46,7 @@ private: int confidence(Kernel::FileDescriptor &descriptor) const override; /// Parse PDFgetN data file - void parseDataFile(std::string filename); + void parseDataFile(const std::string &filename); /// Check whether a string starts from a specified sub-string bool startsWith(const std::string &s, const std::string &header) const; @@ -69,7 +70,7 @@ private: void generateDataWorkspace(); /// Set X and Y axis unit and lebel - void setUnit(DataObjects::Workspace2D_sptr ws); + void setUnit(const DataObjects::Workspace2D_sptr &ws); void checkSameSize(const std::vector<size_t> &numptsvec, size_t numsets); }; diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadPLN.h b/Framework/DataHandling/inc/MantidDataHandling/LoadPLN.h index 116d89d10530b19e998e7b80d50ef2f3c4d4e4c6..e0028ec132b6e71067767be0fb6f2e065daabc7e 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadPLN.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadPLN.h @@ -1,6 +1,12 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS +// SPDX - License - Identifier: GPL - 3.0 + +// Mantid Repository : https://github.com/mantidproject/mantid +// +// Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, // NScD Oak Ridge National Laboratory, European Spallation Source // & Institut Laue - Langevin // SPDX - License - Identifier: GPL - 3.0 + @@ -16,6 +22,7 @@ #include "MantidAPI/LogManager.h" #include "MantidDataObjects/EventWorkspace.h" #include "MantidGeometry/Instrument.h" +#include "MantidKernel/NexusDescriptor.h" #include "MantidNexus/NexusClasses.h" namespace Mantid { @@ -27,27 +34,6 @@ using ANSTO::EventVector_pt; Loads an ANSTO Pelican event file and stores it in an event workspace. @author Geish Miladinovic (ANSTO) - -Copyright © 2010 ISIS Rutherford Appleton Laboratory, NScD Oak Ridge -National Laboratory & European Spallation Source - -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> */ /** LoadPLN : Loads an ANSTO PLN Hdf and linked event file into a workspace. diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadPSIMuonBin.h b/Framework/DataHandling/inc/MantidDataHandling/LoadPSIMuonBin.h index b1dbc4addfe391e61d629390dadea9c2cf42101b..05e96c92574a8e8fd922c58ed046bd3ca5fd2656 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadPSIMuonBin.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadPSIMuonBin.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -10,6 +10,7 @@ #include "MantidDataHandling/LoadRawHelper.h" #include "MantidDataObjects/Workspace2D.h" #include "MantidKernel/BinaryStreamReader.h" +#include "MantidKernel/FileDescriptor.h" #include <cstdint> /** LoadPSIMuonBin : Loads a bin file from the PSI facility for muon @@ -76,7 +77,8 @@ public: private: void init() override; void exec() override; - std::string getFormattedDateTime(std::string date, std::string time); + std::string getFormattedDateTime(const std::string &date, + const std::string &time); void assignOutputWorkspaceParticulars( DataObjects::Workspace2D_sptr &outputWorkspace); void readSingleVariables(Mantid::Kernel::BinaryStreamReader &streamReader); diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadParameterFile.h b/Framework/DataHandling/inc/MantidDataHandling/LoadParameterFile.h index 30cd215e3cd220bb1b1ccaabedfba7f1c697f7e3..2c34062370fd3d0272ad2d6f92f369feebb7e9df 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadParameterFile.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadParameterFile.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadPreNexus.h b/Framework/DataHandling/inc/MantidDataHandling/LoadPreNexus.h index b2c75974bd058b7614f306ae436a2dff3792ce4e..cc9889644e1dbb9207175c7fc2d7b947d80c4114 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadPreNexus.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadPreNexus.h @@ -1,13 +1,14 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidAPI/IEventWorkspace_fwd.h" #include "MantidAPI/IFileLoader.h" +#include "MantidKernel/FileDescriptor.h" #include "MantidKernel/System.h" #include <string> #include <vector> diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadPreNexusMonitors.h b/Framework/DataHandling/inc/MantidDataHandling/LoadPreNexusMonitors.h index 1b15e8f587ffb8df8c5352fb36b627d7386bbb75..40e77ebfef29bd30e43dadd12989fcb2e67d4b79 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadPreNexusMonitors.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadPreNexusMonitors.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -55,7 +55,7 @@ private: bool instrument_loaded_correctly; void runLoadInstrument(const std::string &instrument, - API::MatrixWorkspace_sptr localWorkspace); + const API::MatrixWorkspace_sptr &localWorkspace); }; } // namespace DataHandling diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadQKK.h b/Framework/DataHandling/inc/MantidDataHandling/LoadQKK.h index 2826c08bdedb9add4ef04a5472889f21fce5f128..3dca9bf38a729be700697167d0f1bd406b132319 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadQKK.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadQKK.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -10,6 +10,7 @@ // Includes //--------------------------------------------------- #include "MantidAPI/IFileLoader.h" +#include "MantidKernel/NexusDescriptor.h" namespace Mantid { namespace DataHandling { @@ -48,4 +49,4 @@ private: void exec() override; }; } // namespace DataHandling -} // namespace Mantid \ No newline at end of file +} // namespace Mantid diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadRKH.h b/Framework/DataHandling/inc/MantidDataHandling/LoadRKH.h index 742db4282a9dd1f240f3c14286b35bbe910bb2bb..14fa413ddb7dc5bc09e1c9fd4f79852276a4da1d 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadRKH.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadRKH.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -11,6 +11,7 @@ //--------------------------------------------------- #include "MantidAPI/IFileLoader.h" #include "MantidHistogramData/Histogram.h" +#include "MantidKernel/FileDescriptor.h" #include "MantidKernel/cow_ptr.h" #include <fstream> @@ -73,7 +74,7 @@ private: MantidVec &axis0Data); const std::string readUnit(const std::string &line); void readNumEntrys(const int nEntries, MantidVec &output); - void binCenter(const MantidVec oldBoundaries, MantidVec &toCenter) const; + void binCenter(const MantidVec &oldBoundaries, MantidVec &toCenter) const; // Remove lines from an input stream void skipLines(std::istream &strm, int nlines); @@ -89,4 +90,4 @@ private: API::Progress &prog, bool readXError = false); }; } // namespace DataHandling -} // namespace Mantid \ No newline at end of file +} // namespace Mantid diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadRaw3.h b/Framework/DataHandling/inc/MantidDataHandling/LoadRaw3.h index c3bad0c283c721fa044bb16a3e6e63828652f9c8..b8d7830f511bc39be6264aabf2252be16d500dbd 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadRaw3.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadRaw3.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -67,18 +67,18 @@ private: /// creates output workspace, monitors excluded from this workspace void excludeMonitors(FILE *file, const int &period, const std::vector<specnum_t> &monitorList, - DataObjects::Workspace2D_sptr ws_sptr); + const DataObjects::Workspace2D_sptr &ws_sptr); /// creates output workspace whcih includes monitors void includeMonitors(FILE *file, const int64_t &period, - DataObjects::Workspace2D_sptr ws_sptr); + const DataObjects::Workspace2D_sptr &ws_sptr); /// creates two output workspaces none normal workspace and separate one for /// monitors void separateMonitors(FILE *file, const int64_t &period, const std::vector<specnum_t> &monitorList, - DataObjects::Workspace2D_sptr ws_sptr, - DataObjects::Workspace2D_sptr mws_sptr); + const DataObjects::Workspace2D_sptr &ws_sptr, + const DataObjects::Workspace2D_sptr &mws_sptr); /// skip all spectra in a period void skipPeriod(FILE *file, const int64_t &period); diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadRawBin0.h b/Framework/DataHandling/inc/MantidDataHandling/LoadRawBin0.h index 0b0b0e114a466174c30925d2cb553b177f59ee04..e1295d068f66e54665ef23121b4574bcd367158d 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadRawBin0.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadRawBin0.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadRawHelper.h b/Framework/DataHandling/inc/MantidDataHandling/LoadRawHelper.h index 6388503966999b5b2b98cc80a38db7682f4e83b8..a58f0d23642f491bbd0656c1bebe2415df625bd6 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadRawHelper.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadRawHelper.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -11,6 +11,8 @@ #include "MantidAPI/WorkspaceGroup_fwd.h" #include "MantidDataHandling/ISISRunLogs.h" #include "MantidDataObjects/Workspace2D.h" +#include "MantidKernel/FileDescriptor.h" + #include <climits> #include <list> #include <memory> @@ -51,7 +53,7 @@ public: /// Opens Raw File FILE *openRawFile(const std::string &fileName); /// Read in run parameters Public so that LoadRaw2 can use it - void loadRunParameters(API::MatrixWorkspace_sptr localWorkspace, + void loadRunParameters(const API::MatrixWorkspace_sptr &localWorkspace, ISISRAW *const = nullptr) const; /// Returns a confidence value that this algorithm can load a file @@ -75,14 +77,15 @@ public: API::WorkspaceGroup_sptr &mongrp_sptr, const int64_t mwsSpecs, const int64_t nwsSpecs, const int64_t numberOfPeriods, const int64_t lengthIn, - std::string title, API::Algorithm *const pAlg); + const std::string &title, API::Algorithm *const pAlg); /// creates shared pointer to group workspace static API::WorkspaceGroup_sptr createGroupWorkspace(); /// creates shared pointer to workspace from parent workspace static DataObjects::Workspace2D_sptr - createWorkspace(DataObjects::Workspace2D_sptr ws_sptr, int64_t nVectors = -1, - int64_t xLengthIn = -1, int64_t yLengthIn = -1); + createWorkspace(const DataObjects::Workspace2D_sptr &ws_sptr, + int64_t nVectors = -1, int64_t xLengthIn = -1, + int64_t yLengthIn = -1); /// overloaded method to create shared pointer to workspace static DataObjects::Workspace2D_sptr @@ -92,14 +95,14 @@ public: /// sets the workspace property static void setWorkspaceProperty(const std::string &propertyName, const std::string &title, - API::WorkspaceGroup_sptr grpws_sptr, - DataObjects::Workspace2D_sptr ws_sptr, + const API::WorkspaceGroup_sptr &grpws_sptr, + const DataObjects::Workspace2D_sptr &ws_sptr, int64_t numberOfPeriods, bool bMonitor, API::Algorithm *const pAlg); /// overloaded method to set the workspace property - static void setWorkspaceProperty(DataObjects::Workspace2D_sptr ws_sptr, - API::WorkspaceGroup_sptr grpws_sptr, + static void setWorkspaceProperty(const DataObjects::Workspace2D_sptr &ws_sptr, + const API::WorkspaceGroup_sptr &grpws_sptr, const int64_t period, bool bmonitors, API::Algorithm *const pAlg); @@ -136,20 +139,20 @@ protected: getTimeChannels(const int64_t ®imes, const int64_t &lengthIn); /// loadinstrument Child Algorithm void runLoadInstrument(const std::string &fileName, - DataObjects::Workspace2D_sptr, double, double); + const DataObjects::Workspace2D_sptr &, double, double); /// loadinstrumentfromraw algorithm void runLoadInstrumentFromRaw(const std::string &fileName, - DataObjects::Workspace2D_sptr); + const DataObjects::Workspace2D_sptr &); /// loadinstrumentfromraw Child Algorithm void runLoadMappingTable(const std::string &fileName, - DataObjects::Workspace2D_sptr); + const DataObjects::Workspace2D_sptr &); /// load log algorithm - void runLoadLog(const std::string &fileName, DataObjects::Workspace2D_sptr, - double, double); + void runLoadLog(const std::string &fileName, + const DataObjects::Workspace2D_sptr &, double, double); /// Create the period specific logs void createPeriodLogs(int64_t period, - DataObjects::Workspace2D_sptr local_workspace); + const DataObjects::Workspace2D_sptr &local_workspace); /// gets the monitor spectrum list from the workspace std::vector<specnum_t> @@ -157,7 +160,7 @@ protected: /// This method sets the raw file data to workspace vectors void setWorkspaceData( - DataObjects::Workspace2D_sptr newWorkspace, + const DataObjects::Workspace2D_sptr &newWorkspace, const std::vector<boost::shared_ptr<HistogramData::HistogramX>> &timeChannelsVec, int64_t wsIndex, specnum_t nspecNum, int64_t noTimeRegimes, @@ -189,9 +192,10 @@ protected: specnum_t &normalwsSpecs, specnum_t &monitorwsSpecs); /// load the spectra - void loadSpectra(FILE *file, const int &period, const int &total_specs, - DataObjects::Workspace2D_sptr ws_sptr, - std::vector<boost::shared_ptr<HistogramData::HistogramX>>); + void loadSpectra( + FILE *file, const int &period, const int &total_specs, + const DataObjects::Workspace2D_sptr &ws_sptr, + const std::vector<boost::shared_ptr<HistogramData::HistogramX>> &); /// Has the spectrum_list property been set? bool m_list; @@ -251,4 +255,4 @@ private: }; } // namespace DataHandling -} // namespace Mantid \ No newline at end of file +} // namespace Mantid diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadRawSpectrum0.h b/Framework/DataHandling/inc/MantidDataHandling/LoadRawSpectrum0.h index 2d92979d0db08e373cb1c51412c62685c8f8f8cb..17dde61ce5a97aee5b943648e422116195f0ff21 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadRawSpectrum0.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadRawSpectrum0.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadSESANS.h b/Framework/DataHandling/inc/MantidDataHandling/LoadSESANS.h index 2451cf13ff5021b11bfc1fddf7922fa1faeebe8d..826ebbf974fd765adcc7d39d029be20074ad56e5 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadSESANS.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadSESANS.h @@ -1,13 +1,14 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidAPI/IFileLoader.h" #include "MantidDataHandling/DllConfig.h" +#include "MantidKernel/FileDescriptor.h" #include <unordered_map> diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadSINQFocus.h b/Framework/DataHandling/inc/MantidDataHandling/LoadSINQFocus.h index 3078a4f20168e7c6dc5fb6f141137803bdc0be28..b4045ed2eb0202e6ccf8aa2669d05e271cf70f0e 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadSINQFocus.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadSINQFocus.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -12,6 +12,7 @@ #include "MantidAPI/DeprecatedAlgorithm.h" #include "MantidAPI/IFileLoader.h" #include "MantidDataHandling/LoadHelper.h" +#include "MantidKernel/NexusDescriptor.h" #include "MantidNexus/NexusClasses.h" namespace Mantid { diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadSNSspec.h b/Framework/DataHandling/inc/MantidDataHandling/LoadSNSspec.h index 9f9465d3492cc6b7d69a56fee2c2a2b3f6c5acea..f7dfb3badec44ba9169d68c125cf8e09364ab5c0 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadSNSspec.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadSNSspec.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -11,6 +11,7 @@ //---------------------------------------------------------------------- #include "MantidAPI/DeprecatedAlgorithm.h" #include "MantidAPI/IFileLoader.h" +#include "MantidKernel/FileDescriptor.h" namespace Mantid { namespace DataHandling { diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadSPE.h b/Framework/DataHandling/inc/MantidDataHandling/LoadSPE.h index 89e09c8afbe3c4d4535dc7218bf776d0db0cdc48..2625e5f3a2f27d94952103d84f7c2843cc1b709f 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadSPE.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadSPE.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -10,6 +10,7 @@ // Includes //--------------------------------------------------- #include "MantidAPI/IFileLoader.h" +#include "MantidKernel/FileDescriptor.h" namespace Mantid { namespace DataHandling { @@ -52,7 +53,7 @@ private: // Execution code void exec() override; - void readHistogram(FILE *speFile, API::MatrixWorkspace_sptr workspace, + void readHistogram(FILE *speFile, const API::MatrixWorkspace_sptr &workspace, size_t index); void reportFormatError(const std::string &what); diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadSampleDetailsFromRaw.h b/Framework/DataHandling/inc/MantidDataHandling/LoadSampleDetailsFromRaw.h index fb273f82cb821e98bf884dc601155d78d7ffbe9c..89c9807590a3275ba3d3952d6413156d0a247eff 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadSampleDetailsFromRaw.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadSampleDetailsFromRaw.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadSampleEnvironment.h b/Framework/DataHandling/inc/MantidDataHandling/LoadSampleEnvironment.h index 8ba473ab80602936772005dd0558981b1333d9a7..ad555d2dc399e65cf24c5897dda632bdf576f0de 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadSampleEnvironment.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadSampleEnvironment.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadSampleShape.h b/Framework/DataHandling/inc/MantidDataHandling/LoadSampleShape.h index 2d3d329ddcea39a154935d409f91ae79dc21855b..c14c313e1f73e9bc1ee54e01690752e95f716ea6 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadSampleShape.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadSampleShape.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -51,7 +51,7 @@ private: void exec() override; }; void DLLExport rotate(Geometry::MeshObject &sampleMesh, - API::MatrixWorkspace_const_sptr inputWS); + const API::MatrixWorkspace_const_sptr &inputWS); } // namespace DataHandling } // namespace Mantid \ No newline at end of file diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadSassena.h b/Framework/DataHandling/inc/MantidDataHandling/LoadSassena.h index bdab1283344a0ab62cca899925d7aecee91dc10e..868bf2eaeec30b4ddc855ef3f1590450b15862ed 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadSassena.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadSassena.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -12,6 +12,8 @@ #include "MantidAPI/IFileLoader.h" #include "MantidAPI/WorkspaceGroup_fwd.h" #include "MantidDataObjects/Workspace2D.h" +#include "MantidKernel/NexusDescriptor.h" + #include <hdf5.h> namespace Mantid { @@ -60,26 +62,27 @@ public: protected: /// Add a workspace to the group and register in the analysis data service - void registerWorkspace(API::WorkspaceGroup_sptr gws, const std::string wsName, - DataObjects::Workspace2D_sptr ws, + void registerWorkspace(const API::WorkspaceGroup_sptr &gws, + const std::string &wsName, + const DataObjects::Workspace2D_sptr &ws, const std::string &description); /// Read info about one HDF5 dataset, log if error - herr_t dataSetInfo(const hid_t &h5file, const std::string setName, + herr_t dataSetInfo(const hid_t &h5file, const std::string &setName, hsize_t *dims) const; /// Read dataset data to a buffer ot type double - herr_t dataSetDouble(const hid_t &h5file, const std::string setName, + herr_t dataSetDouble(const hid_t &h5file, const std::string &setName, std::vector<double> &buf); /// Load qvectors dataset, calculate modulus of vectors HistogramData::Points loadQvectors(const hid_t &h5file, - API::WorkspaceGroup_sptr gws, + const API::WorkspaceGroup_sptr &gws, std::vector<int> &sorting_indexes); /// Load structure factor asa function of q-vector modulus - void loadFQ(const hid_t &h5file, API::WorkspaceGroup_sptr gws, - const std::string setName, const HistogramData::Points &qvmod, + void loadFQ(const hid_t &h5file, const API::WorkspaceGroup_sptr &gws, + const std::string &setName, const HistogramData::Points &qvmod, const std::vector<int> &sorting_indexes); /// Load time-dependent structure factor - void loadFQT(const hid_t &h5file, API::WorkspaceGroup_sptr gws, - const std::string setName, const HistogramData::Points &qvmod, + void loadFQT(const hid_t &h5file, const API::WorkspaceGroup_sptr &gws, + const std::string &setName, const HistogramData::Points &qvmod, const std::vector<int> &sorting_indexes); private: diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadSpec.h b/Framework/DataHandling/inc/MantidDataHandling/LoadSpec.h index e875c3a9a779b102d9e961476cbce1ee95d65934..75b630bd153eb5d073d32867decfe67653488bfa 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadSpec.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadSpec.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadSpice2D.h b/Framework/DataHandling/inc/MantidDataHandling/LoadSpice2D.h index 57b499e60df7cbdf64caf2aa3f5860622bbcba29..44282d49fa10f11bfe453f968b15056b3b50e5c2 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadSpice2D.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadSpice2D.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -10,6 +10,7 @@ #include "MantidDataHandling/XmlHandler.h" #include "MantidDataObjects/Workspace2D.h" #include "MantidKernel/DateAndTime.h" +#include "MantidKernel/FileDescriptor.h" #include <map> #include <string> #include <utility> @@ -92,7 +93,7 @@ private: const std::string &fileName); /// Run LoadInstrument Child Algorithm void runLoadInstrument(const std::string &inst_name, - DataObjects::Workspace2D_sptr localWorkspace); + const DataObjects::Workspace2D_sptr &localWorkspace); void setInputPropertiesAsMemberProperties(); diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadSpiceAscii.h b/Framework/DataHandling/inc/MantidDataHandling/LoadSpiceAscii.h index ac7ee0710b51a6db766b6c179f4ebdb48afaef17..933ba795ff60126f514a5691a8b5010ba9d8c01b 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadSpiceAscii.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadSpiceAscii.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -63,13 +63,13 @@ private: const std::string &timeformat); /// Set up run start time - void setupRunStartTime(API::MatrixWorkspace_sptr runinfows, + void setupRunStartTime(const API::MatrixWorkspace_sptr &runinfows, const std::vector<std::string> &datetimeprop); /// Add property to workspace template <typename T> - void addProperty(API::MatrixWorkspace_sptr ws, const std::string &pname, - T pvalue); + void addProperty(const API::MatrixWorkspace_sptr &ws, + const std::string &pname, T pvalue); }; } // namespace DataHandling diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadSpiceXML2DDet.h b/Framework/DataHandling/inc/MantidDataHandling/LoadSpiceXML2DDet.h index 8d4b2cab9d8a3665ed4c1beccc1222af25d21051..16779c563688f8f2c7c01d6dd91b6ad32f42aff5 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadSpiceXML2DDet.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadSpiceXML2DDet.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -96,22 +96,25 @@ private: /// Set up sample logs from table workspace loaded where SPICE data file is /// loaded - void setupSampleLogFromSpiceTable(API::MatrixWorkspace_sptr matrixws, - API::ITableWorkspace_sptr spicetablews, - int ptnumber); + void + setupSampleLogFromSpiceTable(const API::MatrixWorkspace_sptr &matrixws, + const API::ITableWorkspace_sptr &spicetablews, + int ptnumber); /// Set up sample logs in the output workspace - bool setupSampleLogs(API::MatrixWorkspace_sptr outws); + bool setupSampleLogs(const API::MatrixWorkspace_sptr &outws); /// Load instrument void loadInstrument(API::MatrixWorkspace_sptr matrixws, const std::string &idffilename); /// Get wavelength from workspace - bool getHB3AWavelength(API::MatrixWorkspace_sptr dataws, double &wavelength); + bool getHB3AWavelength(const API::MatrixWorkspace_sptr &dataws, + double &wavelength); /// Set output workspace's X-axs as lab-frame Q space - void setXtoLabQ(API::MatrixWorkspace_sptr dataws, const double &wavelength); + void setXtoLabQ(const API::MatrixWorkspace_sptr &dataws, + const double &wavelength); /// SPICE detector XML file std::string m_detXMLFileName; diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadStl.h b/Framework/DataHandling/inc/MantidDataHandling/LoadStl.h index 1e9e80755cb3bfa2e45ea5999e2d6d664bff0bf5..70f438c3e3f1dea953944c28d549a71232615ca4 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadStl.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadStl.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidDataHandling/LoadSampleShape.h" @@ -14,6 +14,10 @@ #include <boost/functional/hash.hpp> #include <functional> #include <unordered_set> +#include <utility> + +#include <utility> + namespace { Mantid::Kernel::Logger g_logstl("LoadStl"); } @@ -45,11 +49,12 @@ struct V3DTrueComparator { class DLLExport LoadStl : public MeshFileIO { public: LoadStl(std::string filename, ScaleUnits scaleType) - : MeshFileIO(scaleType), m_filename(filename), m_setMaterial(false) {} + : MeshFileIO(scaleType), m_filename(std::move(std::move(filename))), + m_setMaterial(false) {} LoadStl(std::string filename, ScaleUnits scaleType, ReadMaterial::MaterialParameters params) - : MeshFileIO(scaleType), m_filename(filename), m_setMaterial(true), - m_params(params) {} + : MeshFileIO(scaleType), m_filename(std::move(std::move(filename))), + m_setMaterial(true), m_params(std::move(std::move(params))) {} virtual std::unique_ptr<Geometry::MeshObject> readStl() = 0; virtual ~LoadStl() = default; diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadStlFactory.h b/Framework/DataHandling/inc/MantidDataHandling/LoadStlFactory.h index 15b4cabf2f9bf780f27729893bf688f262a3fa58..5fa31d720d3dcbb732459b9554e0a53947eebd95 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadStlFactory.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadStlFactory.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -15,7 +15,7 @@ namespace DataHandling { class MANTID_DATAHANDLING_DLL LoadStlFactory { public: - static std::unique_ptr<LoadStl> createReader(std::string filename, + static std::unique_ptr<LoadStl> createReader(const std::string &filename, ScaleUnits scaleType) { std::unique_ptr<LoadStl> reader = nullptr; if (LoadBinaryStl::isBinarySTL(filename)) { diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadSwans.h b/Framework/DataHandling/inc/MantidDataHandling/LoadSwans.h index 3417868ca2c4908225bf57473466587d47bbf57f..dc9823b118762f7fa751715a851e4fb5d566eedd 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadSwans.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadSwans.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -10,6 +10,7 @@ #include "MantidAPI/IFileLoader.h" #include "MantidDataHandling/DllConfig.h" #include "MantidDataObjects/EventWorkspace.h" +#include "MantidKernel/FileDescriptor.h" #include <map> namespace Mantid { diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadTBL.h b/Framework/DataHandling/inc/MantidDataHandling/LoadTBL.h index e06cee458cc743fa382512596306667ba5f45ffb..b0b805b2b947dbca71aeb88e49ac3779d1fd06d0 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadTBL.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadTBL.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -11,6 +11,7 @@ //---------------------------------------------------------------------- #include "MantidAPI/IFileLoader.h" #include "MantidDataObjects/TableWorkspace.h" +#include "MantidKernel/FileDescriptor.h" namespace Mantid { namespace DataHandling { @@ -51,13 +52,13 @@ private: size_t getCells(std::string line, std::vector<std::string> &cols, size_t expectedCommas, bool isOldTBL) const; /// count the number of commas in the line - size_t countCommas(std::string line) const; + size_t countCommas(const std::string &line) const; /// find all pairs of quotes in the line - size_t findQuotePairs(std::string line, + size_t findQuotePairs(const std::string &line, std::vector<std::vector<size_t>> "eBounds) const; /// Parse more complex CSV, used when the data involves commas in the data and /// quoted values - void csvParse(std::string line, std::vector<std::string> &cols, + void csvParse(const std::string &line, std::vector<std::string> &cols, std::vector<std::vector<size_t>> "eBounds, size_t expectedCommas) const; }; diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadTOFRawNexus.h b/Framework/DataHandling/inc/MantidDataHandling/LoadTOFRawNexus.h index 04bd38da86b9280fdda3890e5b4f9c3c0031ab07..2bced73be98aa817733b6259fb46fee170cabd58 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/LoadTOFRawNexus.h +++ b/Framework/DataHandling/inc/MantidDataHandling/LoadTOFRawNexus.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -14,6 +14,7 @@ #include "MantidAPI/SpectraDetectorTypes.h" #include "MantidDataObjects/Workspace2D.h" #include "MantidKernel/DateAndTime.h" +#include "MantidKernel/NexusDescriptor.h" #include "MantidNexus/NexusClasses.h" #include <mutex> @@ -78,7 +79,8 @@ protected: Mantid::NeXus::NXEntry &entry); void loadBank(const std::string &nexusfilename, const std::string &entry_name, - const std::string &bankName, API::MatrixWorkspace_sptr WS, + const std::string &bankName, + const API::MatrixWorkspace_sptr &WS, const detid2index_map &id_to_wi); /// List of the absolute time of each pulse diff --git a/Framework/DataHandling/inc/MantidDataHandling/MaskDetectors.h b/Framework/DataHandling/inc/MantidDataHandling/MaskDetectors.h index 7c31f9358ea6f2d952011bc3559e51492efe10fe..bed7624a812692c2b1450e279b5ee90863542302 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/MaskDetectors.h +++ b/Framework/DataHandling/inc/MantidDataHandling/MaskDetectors.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -78,41 +78,42 @@ private: /// Choose how to mask given that we have a mask workspace void - handleMaskByMaskWorkspace(const DataObjects::MaskWorkspace_const_sptr maskWs, - const API::MatrixWorkspace_const_sptr WS, + handleMaskByMaskWorkspace(const DataObjects::MaskWorkspace_const_sptr &maskWs, + const API::MatrixWorkspace_const_sptr &WS, std::vector<detid_t> &detectorList, std::vector<size_t> &indexList, const RangeInfo &rangeInfo); /// Choose how to mask given that we have a matrix workspace - void handleMaskByMatrixWorkspace(const API::MatrixWorkspace_const_sptr maskWs, - const API::MatrixWorkspace_const_sptr WS, - std::vector<detid_t> &detectorList, - std::vector<size_t> &indexList, - const RangeInfo &rangeInfo); + void + handleMaskByMatrixWorkspace(const API::MatrixWorkspace_const_sptr &maskWs, + const API::MatrixWorkspace_const_sptr &WS, + std::vector<detid_t> &detectorList, + std::vector<size_t> &indexList, + const RangeInfo &rangeInfo); - void execPeaks(DataObjects::PeaksWorkspace_sptr WS); + void execPeaks(const DataObjects::PeaksWorkspace_sptr &WS); void fillIndexListFromSpectra(std::vector<size_t> &indexList, std::vector<Indexing::SpectrumNumber> spectraList, - const API::MatrixWorkspace_sptr WS, + const API::MatrixWorkspace_sptr &WS, const RangeInfo &range_info); void appendToDetectorListFromComponentList( std::vector<detid_t> &detectorList, const std::vector<std::string> &componentList, - const API::MatrixWorkspace_const_sptr WS); - void - appendToIndexListFromWS(std::vector<size_t> &indexList, - const API::MatrixWorkspace_const_sptr maskedWorkspace, - const RangeInfo &range_info); + const API::MatrixWorkspace_const_sptr &WS); + void appendToIndexListFromWS( + std::vector<size_t> &indexList, + const API::MatrixWorkspace_const_sptr &maskedWorkspace, + const RangeInfo &range_info); void appendToDetectorListFromWS( std::vector<detid_t> &detectorList, - const API::MatrixWorkspace_const_sptr inputWs, - const API::MatrixWorkspace_const_sptr maskWs, + const API::MatrixWorkspace_const_sptr &inputWs, + const API::MatrixWorkspace_const_sptr &maskWs, const std::tuple<size_t, size_t, bool> &range_info); void appendToIndexListFromMaskWS( std::vector<size_t> &indexList, - const DataObjects::MaskWorkspace_const_sptr maskedWorkspace, + const DataObjects::MaskWorkspace_const_sptr &maskedWorkspace, const std::tuple<size_t, size_t, bool> &range_info); void extractMaskedWSDetIDs(std::vector<detid_t> &detectorList, diff --git a/Framework/DataHandling/inc/MantidDataHandling/MaskDetectorsInShape.h b/Framework/DataHandling/inc/MantidDataHandling/MaskDetectorsInShape.h index 654a65d570fa808960e4b084277b0c4afb442f4c..470d7a07065bac5024d3115dabde625150032913 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/MaskDetectorsInShape.h +++ b/Framework/DataHandling/inc/MantidDataHandling/MaskDetectorsInShape.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -58,11 +58,12 @@ private: void exec() override; // internal functions - std::vector<int> runFindDetectorsInShape(API::MatrixWorkspace_sptr workspace, - const std::string shapeXML, - const bool includeMonitors); + std::vector<int> + runFindDetectorsInShape(const API::MatrixWorkspace_sptr &workspace, + const std::string &shapeXML, + const bool includeMonitors); /// Calls MaskDetectors as a Child Algorithm - void runMaskDetectors(API::MatrixWorkspace_sptr workspace, + void runMaskDetectors(const API::MatrixWorkspace_sptr &workspace, const std::vector<int> &detectorIds); }; diff --git a/Framework/DataHandling/inc/MantidDataHandling/MaskSpectra.h b/Framework/DataHandling/inc/MantidDataHandling/MaskSpectra.h index c69016613fe66a2d2af1cde7f826dfec700fbfa2..06f61d8c9a784c9a9f2cbec34f9357f673783d5d 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/MaskSpectra.h +++ b/Framework/DataHandling/inc/MantidDataHandling/MaskSpectra.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/MeshFileIO.h b/Framework/DataHandling/inc/MantidDataHandling/MeshFileIO.h index 56b15366c2459fca9754b739e9787e093093ee15..836cbfa262b5f165b998d815893bc4b6cd596e03 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/MeshFileIO.h +++ b/Framework/DataHandling/inc/MantidDataHandling/MeshFileIO.h @@ -1,9 +1,13 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + +#include <utility> + +#include <utility> + #include "MantidGeometry/Objects/MeshObject.h" #include "MantidKernel/Logger.h" #include "MantidKernel/Matrix.h" @@ -32,7 +36,7 @@ public: boost::shared_ptr<Geometry::MeshObject> translate(boost::shared_ptr<Geometry::MeshObject> environmentMesh, - const std::vector<double> translationVector); + const std::vector<double> &translationVector); Kernel::V3D createScaledV3D(double xVal, double yVal, double zVal); @@ -40,7 +44,8 @@ protected: MeshFileIO(ScaleUnits scaleType) : m_scaleType(scaleType) {} MeshFileIO(ScaleUnits scaleType, std::vector<uint32_t> triangles, std::vector<Kernel::V3D> vertices) - : m_scaleType(scaleType), m_triangle(triangles), m_vertices(vertices) {} + : m_scaleType(scaleType), m_triangle(std::move(std::move(triangles))), + m_vertices(std::move(std::move(vertices))) {} double scaleValue(double val) { switch (m_scaleType) { case ScaleUnits::centimetres: diff --git a/Framework/DataHandling/inc/MantidDataHandling/ModifyDetectorDotDatFile.h b/Framework/DataHandling/inc/MantidDataHandling/ModifyDetectorDotDatFile.h index a6eaeb60fdde89046054d0a3779237a3dd7bf861..dbcecb349079de2248f95e1e876447ef3d706369 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/ModifyDetectorDotDatFile.h +++ b/Framework/DataHandling/inc/MantidDataHandling/ModifyDetectorDotDatFile.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/MoveInstrumentComponent.h b/Framework/DataHandling/inc/MantidDataHandling/MoveInstrumentComponent.h index 1a66cd822eeddcedf5f0d07ae49dfb1849dec4c8..9e34c7520c5e63764072c79ac0b60b7002bee20e 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/MoveInstrumentComponent.h +++ b/Framework/DataHandling/inc/MantidDataHandling/MoveInstrumentComponent.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/NXcanSASDefinitions.h b/Framework/DataHandling/inc/MantidDataHandling/NXcanSASDefinitions.h index 292ffa29eb284523726cdce43226d4b10ba02893..28c01b889962f55e88b67d85347d0297b20c4145 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/NXcanSASDefinitions.h +++ b/Framework/DataHandling/inc/MantidDataHandling/NXcanSASDefinitions.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/NexusTester.h b/Framework/DataHandling/inc/MantidDataHandling/NexusTester.h index a426ad64598e933f1a7551dc9f7c529228a21f14..1e4897426284c1cb1d619e340314d88a2c03d400 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/NexusTester.h +++ b/Framework/DataHandling/inc/MantidDataHandling/NexusTester.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/ORNLDataArchive.h b/Framework/DataHandling/inc/MantidDataHandling/ORNLDataArchive.h index 3b840f78cc4952a886e3f61b026fb6edbfb08957..f012df6dc0575e30f9ae425d06265008a2a2fbb0 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/ORNLDataArchive.h +++ b/Framework/DataHandling/inc/MantidDataHandling/ORNLDataArchive.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/PDLoadCharacterizations.h b/Framework/DataHandling/inc/MantidDataHandling/PDLoadCharacterizations.h index a23da323949693123f324f00b51a5a17114aa685..0a56541102e2d0c9cf0912ec3e2820b1524aec08 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/PDLoadCharacterizations.h +++ b/Framework/DataHandling/inc/MantidDataHandling/PDLoadCharacterizations.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -32,7 +32,7 @@ private: void init() override; void exec() override; std::vector<std::string> getFilenames(); - int readFocusInfo(std::ifstream &file, const std::string filename); + int readFocusInfo(std::ifstream &file, const std::string &filename); void readCharInfo(std::ifstream &file, API::ITableWorkspace_sptr &wksp, const std::string &filename, int linenum); void readVersion0(const std::string &filename, diff --git a/Framework/DataHandling/inc/MantidDataHandling/ParallelEventLoader.h b/Framework/DataHandling/inc/MantidDataHandling/ParallelEventLoader.h index 9b8fe418a8896d313ed62f1e3fc657275eadc6be..fda2e900d7f897d77e85078cb6729c5af5fd4ccb 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/ParallelEventLoader.h +++ b/Framework/DataHandling/inc/MantidDataHandling/ParallelEventLoader.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/PatchBBY.h b/Framework/DataHandling/inc/MantidDataHandling/PatchBBY.h index 879a975b1183cc9e66a80f34a565d16b562c79bb..e3fcb082e82393cdbd1aa7ccb21052aa24f69b2c 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/PatchBBY.h +++ b/Framework/DataHandling/inc/MantidDataHandling/PatchBBY.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/PrecompiledHeader.h b/Framework/DataHandling/inc/MantidDataHandling/PrecompiledHeader.h index 11e454e4d7c25eebd39f45db34aca49c4f3270f3..2574231796d040dedc544959befa972012c016eb 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/PrecompiledHeader.h +++ b/Framework/DataHandling/inc/MantidDataHandling/PrecompiledHeader.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/ProcessBankData.h b/Framework/DataHandling/inc/MantidDataHandling/ProcessBankData.h index d2e643bb24bd033c85a7acc4858aae1ef26882a7..ebb0f55a90997a2f76b89032e241b9eba8056b96 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/ProcessBankData.h +++ b/Framework/DataHandling/inc/MantidDataHandling/ProcessBankData.h @@ -1,13 +1,14 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidDataHandling/BankPulseTimes.h" #include "MantidGeometry/IDTypes.h" +#include "MantidKernel/NexusDescriptor.h" #include "MantidKernel/Task.h" #include "MantidKernel/Timer.h" diff --git a/Framework/DataHandling/inc/MantidDataHandling/RawFileInfo.h b/Framework/DataHandling/inc/MantidDataHandling/RawFileInfo.h index d7685a70e42c73ca7f3d634367e6df8a44c86420..691295db074f110f00ba0a057000cde38ea13dbe 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/RawFileInfo.h +++ b/Framework/DataHandling/inc/MantidDataHandling/RawFileInfo.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/ReadMaterial.h b/Framework/DataHandling/inc/MantidDataHandling/ReadMaterial.h index d8904adc2e542409f735d9a81e24bb7eef99ddfe..e0a893a88571fcd48451ab43b5d2e34e4286a921 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/ReadMaterial.h +++ b/Framework/DataHandling/inc/MantidDataHandling/ReadMaterial.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -90,7 +90,7 @@ private: */ Kernel::MaterialBuilder builder; - void setMaterial(const std::string chemicalSymbol, const int atomicNumber, + void setMaterial(const std::string &chemicalSymbol, const int atomicNumber, const int massNumber); void diff --git a/Framework/DataHandling/inc/MantidDataHandling/RemoveLogs.h b/Framework/DataHandling/inc/MantidDataHandling/RemoveLogs.h index 8734bbe38fb9b85d267c2ccc18e569117c6e5815..f8b729dc58e21a01d737cdf32708b5b7eabfc85a 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/RemoveLogs.h +++ b/Framework/DataHandling/inc/MantidDataHandling/RemoveLogs.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/RenameLog.h b/Framework/DataHandling/inc/MantidDataHandling/RenameLog.h index f1a8a615de2639f6be8d49a40decec0c6bdbc511..1065911ac0c49e2f7f2971acabe8d9bc6a219a89 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/RenameLog.h +++ b/Framework/DataHandling/inc/MantidDataHandling/RenameLog.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/RotateInstrumentComponent.h b/Framework/DataHandling/inc/MantidDataHandling/RotateInstrumentComponent.h index 0383426c66c894074ffda1b7f3f0be0831da92e5..051f88c275d8d79336639fe203ca97479305f0ac 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/RotateInstrumentComponent.h +++ b/Framework/DataHandling/inc/MantidDataHandling/RotateInstrumentComponent.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/RotateSource.h b/Framework/DataHandling/inc/MantidDataHandling/RotateSource.h index f2122c90a601e2101d99b0630cbfe339383218d0..1f44318ddf4a097b8a6fcd4df3ea22570325abe2 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/RotateSource.h +++ b/Framework/DataHandling/inc/MantidDataHandling/RotateSource.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/SampleEnvironmentFactory.h b/Framework/DataHandling/inc/MantidDataHandling/SampleEnvironmentFactory.h index 970be314c9e9331366213f0e89adb1fa1f078736..c766ad627b10135e5f11ce05f4f048c4f6bdc658 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/SampleEnvironmentFactory.h +++ b/Framework/DataHandling/inc/MantidDataHandling/SampleEnvironmentFactory.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/SampleEnvironmentSpec.h b/Framework/DataHandling/inc/MantidDataHandling/SampleEnvironmentSpec.h index bfc40cde254908cfc17a9bdeba72cab6a717bac5..f9ba800d36db01704466eaf416cb96e8b43b0f4a 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/SampleEnvironmentSpec.h +++ b/Framework/DataHandling/inc/MantidDataHandling/SampleEnvironmentSpec.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/SampleEnvironmentSpecParser.h b/Framework/DataHandling/inc/MantidDataHandling/SampleEnvironmentSpecParser.h index 4163307f7efe7e528aef76dc76c845bfdae31aab..78c8749ad34f366c0b06e7c4004a57b271b7595b 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/SampleEnvironmentSpecParser.h +++ b/Framework/DataHandling/inc/MantidDataHandling/SampleEnvironmentSpecParser.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -55,10 +55,10 @@ private: boost::shared_ptr<Geometry::MeshObject> loadMeshFromSTL(Poco::XML::Element *stlfile) const; void LoadOptionalDoubleFromXML(Poco::XML::Element *componentElement, - std::string elementName, + const std::string &elementName, double &targetVariable) const; std::vector<double> - parseTranslationVector(std::string translationVectorStr) const; + parseTranslationVector(const std::string &translationVectorStr) const; // Members MaterialsIndex m_materials; std::string m_filepath; diff --git a/Framework/DataHandling/inc/MantidDataHandling/SaveANSTOAscii.h b/Framework/DataHandling/inc/MantidDataHandling/SaveANSTOAscii.h index 0bdfc77f2913fc952f9c886b5867c955c878e40a..fdd6179174cf917d6a0cede6af95e73cf7e3d7e0 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/SaveANSTOAscii.h +++ b/Framework/DataHandling/inc/MantidDataHandling/SaveANSTOAscii.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/SaveAscii.h b/Framework/DataHandling/inc/MantidDataHandling/SaveAscii.h index 5f642bc6d1f5873cc45c859579f031fbcf21f5b4..b5681e953c80084832d2b8f6aeae5483ead425fd 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/SaveAscii.h +++ b/Framework/DataHandling/inc/MantidDataHandling/SaveAscii.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/SaveAscii2.h b/Framework/DataHandling/inc/MantidDataHandling/SaveAscii2.h index eff74596efa5ef746e6db99c46cd608cc464edaf..f8200d93c8dd6ff7825c0b7b4a031b8b5a63c218 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/SaveAscii2.h +++ b/Framework/DataHandling/inc/MantidDataHandling/SaveAscii2.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -71,7 +71,7 @@ private: void init() override; /// Overwrites Algorithm method void exec() override; - void writeTableWorkspace(API::ITableWorkspace_const_sptr tws, + void writeTableWorkspace(const API::ITableWorkspace_const_sptr &tws, const std::string &filename, bool appendToFile, bool writeHeader, int prec, bool scientific, const std::string &comment); diff --git a/Framework/DataHandling/inc/MantidDataHandling/SaveBankScatteringAngles.h b/Framework/DataHandling/inc/MantidDataHandling/SaveBankScatteringAngles.h index 2a53d11faa892343e0930f3948cf49a607375f77..925b59e7515ff8fb362b1663e82dc0352c92dcb2 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/SaveBankScatteringAngles.h +++ b/Framework/DataHandling/inc/MantidDataHandling/SaveBankScatteringAngles.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/SaveCSV.h b/Framework/DataHandling/inc/MantidDataHandling/SaveCSV.h index 7ea37b0c3ff56b3eb1ebf5635b692d258b5faf21..90f55bf118cd0c9d65a482245ca45288594bb8cd 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/SaveCSV.h +++ b/Framework/DataHandling/inc/MantidDataHandling/SaveCSV.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -93,7 +93,7 @@ private: /// Saves out x errors void saveXerrors(std::ofstream &stream, - const Mantid::DataObjects::Workspace2D_sptr workspace, + const Mantid::DataObjects::Workspace2D_sptr &workspace, const size_t numberOfHist); /// The name of the file used for storing the workspace diff --git a/Framework/DataHandling/inc/MantidDataHandling/SaveCalFile.h b/Framework/DataHandling/inc/MantidDataHandling/SaveCalFile.h index 814261ef01dc90b735706b211ab42333463a2a6d..4517ae2f2110875514cc96bc4156c7321acda561 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/SaveCalFile.h +++ b/Framework/DataHandling/inc/MantidDataHandling/SaveCalFile.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -46,9 +46,9 @@ public: } void saveCalFile(const std::string &calFileName, - Mantid::DataObjects::GroupingWorkspace_sptr groupWS, - Mantid::DataObjects::OffsetsWorkspace_sptr offsetsWS, - Mantid::DataObjects::MaskWorkspace_sptr maskWS); + const Mantid::DataObjects::GroupingWorkspace_sptr &groupWS, + const Mantid::DataObjects::OffsetsWorkspace_sptr &offsetsWS, + const Mantid::DataObjects::MaskWorkspace_sptr &maskWS); private: /// Initialise the properties diff --git a/Framework/DataHandling/inc/MantidDataHandling/SaveCanSAS1D.h b/Framework/DataHandling/inc/MantidDataHandling/SaveCanSAS1D.h index 3591c440196359fea3629874f566eb408f3ed86c..43542825fc3019ab71b956cee765b2e95dd8b43e 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/SaveCanSAS1D.h +++ b/Framework/DataHandling/inc/MantidDataHandling/SaveCanSAS1D.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/SaveCanSAS1D2.h b/Framework/DataHandling/inc/MantidDataHandling/SaveCanSAS1D2.h index d0f23b7092bf63405481e4842779166e87368a85..c9d525b813445346410972d9d3d5e2f9057b75e7 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/SaveCanSAS1D2.h +++ b/Framework/DataHandling/inc/MantidDataHandling/SaveCanSAS1D2.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/SaveDaveGrp.h b/Framework/DataHandling/inc/MantidDataHandling/SaveDaveGrp.h index 260aaf8f181803a174c3df2b5a1ee270225cb1be..afc3f4a35315d0e20abe2f60a699a71149273c05 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/SaveDaveGrp.h +++ b/Framework/DataHandling/inc/MantidDataHandling/SaveDaveGrp.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/SaveDetectorsGrouping.h b/Framework/DataHandling/inc/MantidDataHandling/SaveDetectorsGrouping.h index 74c401a3473a359324b76b0a7e23b53a53e85aea..c074c823132132df31cad6ab4b0f6f90fae5237c 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/SaveDetectorsGrouping.h +++ b/Framework/DataHandling/inc/MantidDataHandling/SaveDetectorsGrouping.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -53,8 +53,8 @@ private: std::map<int, std::vector<detid_t>> &groupdetidrangemap); /// Print Grouping to XML file - void printToXML(std::map<int, std::vector<detid_t>> groupdetidrangemap, - std::string xmlfilename); + void printToXML(const std::map<int, std::vector<detid_t>> &groupdetidrangemap, + const std::string &xmlfilename); // GroupingWorkspace DataObjects::GroupingWorkspace_const_sptr mGroupWS; diff --git a/Framework/DataHandling/inc/MantidDataHandling/SaveDiffCal.h b/Framework/DataHandling/inc/MantidDataHandling/SaveDiffCal.h index e8fe9599b8620fc35b76a100c2d1e748f8ebe603..31208c7163e9e419bf0a499bc6759d1b05b6d1c1 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/SaveDiffCal.h +++ b/Framework/DataHandling/inc/MantidDataHandling/SaveDiffCal.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -37,8 +37,9 @@ private: void writeDoubleFieldFromTable(H5::Group &group, const std::string &name); void writeIntFieldFromTable(H5::Group &group, const std::string &name); - void writeIntFieldFromSVWS(H5::Group &group, const std::string &name, - DataObjects::SpecialWorkspace2D_const_sptr ws); + void + writeIntFieldFromSVWS(H5::Group &group, const std::string &name, + const DataObjects::SpecialWorkspace2D_const_sptr &ws); void generateDetidToIndex(); bool tableHasColumn(const std::string &ColumnName) const; diff --git a/Framework/DataHandling/inc/MantidDataHandling/SaveDiffFittingAscii.h b/Framework/DataHandling/inc/MantidDataHandling/SaveDiffFittingAscii.h index dcd6c22ba1de54cb27b9c9fd661dafa16f79884e..3c21f96289b1ec337303fc1b647c54dbfc5786e6 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/SaveDiffFittingAscii.h +++ b/Framework/DataHandling/inc/MantidDataHandling/SaveDiffFittingAscii.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -57,7 +57,7 @@ private: std::map<std::string, std::string> validateInputs() override; /// Main exec routine, called for group or individual workspace processing. - void processAll(const std::vector<API::ITableWorkspace_sptr> input_ws); + void processAll(const std::vector<API::ITableWorkspace_sptr> &input_ws); std::vector<std::string> splitList(std::string strList); @@ -67,8 +67,8 @@ private: void writeHeader(const std::vector<std::string> &columnHeadings, std::ofstream &file); - void writeData(const API::ITableWorkspace_sptr workspace, std::ofstream &file, - const size_t columnSize); + void writeData(const API::ITableWorkspace_sptr &workspace, + std::ofstream &file, const size_t columnSize); void writeVal(const std::string &val, std::ofstream &file, const bool endline); diff --git a/Framework/DataHandling/inc/MantidDataHandling/SaveDspacemap.h b/Framework/DataHandling/inc/MantidDataHandling/SaveDspacemap.h index 677e333009e5072595504add1117ba30e1915bc5..37581742e89b42152724fe74d9c98fff69f98b3e 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/SaveDspacemap.h +++ b/Framework/DataHandling/inc/MantidDataHandling/SaveDspacemap.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -39,9 +39,9 @@ private: /// Run the algorithm void exec() override; - void - CalculateDspaceFromCal(Mantid::DataObjects::OffsetsWorkspace_sptr offsetsWS, - std::string DFileName); + void CalculateDspaceFromCal( + const Mantid::DataObjects::OffsetsWorkspace_sptr &offsetsWS, + const std::string &DFileName); }; } // namespace DataHandling diff --git a/Framework/DataHandling/inc/MantidDataHandling/SaveFITS.h b/Framework/DataHandling/inc/MantidDataHandling/SaveFITS.h index 598722ddebaaa051c7aa9fdc17e8cb7f627f8136..9c4afe889aa51f62ada4f52cc0566480b75a3860 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/SaveFITS.h +++ b/Framework/DataHandling/inc/MantidDataHandling/SaveFITS.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -36,20 +36,20 @@ private: std::map<std::string, std::string> validateInputs() override; - void saveFITSImage(const API::MatrixWorkspace_sptr img, + void saveFITSImage(const API::MatrixWorkspace_sptr &img, const std::string &filename); - void writeFITSHeaderBlock(const API::MatrixWorkspace_sptr img, + void writeFITSHeaderBlock(const API::MatrixWorkspace_sptr &img, std::ofstream &file); - void writeFITSImageMatrix(const API::MatrixWorkspace_sptr img, + void writeFITSImageMatrix(const API::MatrixWorkspace_sptr &img, std::ofstream &file); void writeFITSHeaderEntry(const std::string &hdr, std::ofstream &file); std::string makeBitDepthHeader(size_t depth) const; - void writeFITSHeaderAxesSizes(const API::MatrixWorkspace_sptr img, + void writeFITSHeaderAxesSizes(const API::MatrixWorkspace_sptr &img, std::ofstream &file); void writePaddingFITSHeaders(size_t count, std::ofstream &file); diff --git a/Framework/DataHandling/inc/MantidDataHandling/SaveFocusedXYE.h b/Framework/DataHandling/inc/MantidDataHandling/SaveFocusedXYE.h index 7066d366f4b6999e7ed3fbec0183c939de23fcd3..9b149c384cdb7fe58278fab1cfe2adeaae2ca634 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/SaveFocusedXYE.h +++ b/Framework/DataHandling/inc/MantidDataHandling/SaveFocusedXYE.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/SaveFullprofResolution.h b/Framework/DataHandling/inc/MantidDataHandling/SaveFullprofResolution.h index 5c84972f33ead9ce1dccae91ced78b17df539bac..2ce04b6bce0901256770d5a44200a1d6385aeb9d 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/SaveFullprofResolution.h +++ b/Framework/DataHandling/inc/MantidDataHandling/SaveFullprofResolution.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -57,7 +57,7 @@ private: void parseTableWorkspace(); /// Check wether a profile parameter map has the parameter - bool has_key(std::map<std::string, double> profmap, std::string key); + bool has_key(std::map<std::string, double> profmap, const std::string &key); /// Map containing the name of value of each parameter required by .irf file std::map<std::string, double> m_profileParamMap; diff --git a/Framework/DataHandling/inc/MantidDataHandling/SaveGDA.h b/Framework/DataHandling/inc/MantidDataHandling/SaveGDA.h index cb18f94e051e18d9d441b8069b95869e61901768..04806bce57d2c65feab4e6f0b6e113e383c7aae5 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/SaveGDA.h +++ b/Framework/DataHandling/inc/MantidDataHandling/SaveGDA.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/SaveGSASInstrumentFile.h b/Framework/DataHandling/inc/MantidDataHandling/SaveGSASInstrumentFile.h index 95c151bbcde41e0b1a2b592bf0d17138f5eccb63..a0024f2f5b488a04c6ca1c29173206c24250c426 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/SaveGSASInstrumentFile.h +++ b/Framework/DataHandling/inc/MantidDataHandling/SaveGSASInstrumentFile.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -66,7 +66,7 @@ private: /// Parse profile table workspace to a map void parseProfileTableWorkspace( - API::ITableWorkspace_sptr ws, + const API::ITableWorkspace_sptr &ws, std::map<unsigned int, std::map<std::string, double>> &profilemap); /// Convert to GSAS instrument file @@ -113,7 +113,7 @@ private: const std::string ¶mname); /// Load fullprof resolution file. - void loadFullprofResolutionFile(std::string irffilename); + void loadFullprofResolutionFile(const std::string &irffilename); /// Calcualte d-space value. double calDspRange(double dtt1, double zero, double tof); diff --git a/Framework/DataHandling/inc/MantidDataHandling/SaveGSS.h b/Framework/DataHandling/inc/MantidDataHandling/SaveGSS.h index e7ef93dc392e53fb81b7bee2f92799b9711e9882..c0aeed8e5e48b70fa099034f4b266dbb33dcd756 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/SaveGSS.h +++ b/Framework/DataHandling/inc/MantidDataHandling/SaveGSS.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/SaveILLCosmosAscii.h b/Framework/DataHandling/inc/MantidDataHandling/SaveILLCosmosAscii.h index d9fc9c73b209841c7ee398a3ee463e4a50509427..e143254f3721431d7cf8cf30db05e583a07b034a 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/SaveILLCosmosAscii.h +++ b/Framework/DataHandling/inc/MantidDataHandling/SaveILLCosmosAscii.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/SaveISISNexus.h b/Framework/DataHandling/inc/MantidDataHandling/SaveISISNexus.h index c54da2896ed9ec925ee2dfb2c461ce221aaadaf1..3ad741d2cc571f6a6ab4420dfd5f45ead3c7fb3f 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/SaveISISNexus.h +++ b/Framework/DataHandling/inc/MantidDataHandling/SaveISISNexus.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/SaveIsawDetCal.h b/Framework/DataHandling/inc/MantidDataHandling/SaveIsawDetCal.h index ee5edac22ee88cfb63d79bcb00a8d0da40a7b1be..2589c5a0b3971398f99f09cdf63f9fce0f6e9044 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/SaveIsawDetCal.h +++ b/Framework/DataHandling/inc/MantidDataHandling/SaveIsawDetCal.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -46,9 +46,9 @@ private: /// Run the algorithm void exec() override; /// find position for rectangular and non-rectangular - Kernel::V3D findPixelPos(std::string bankName, int col, int row); - void sizeBanks(std::string bankName, int &NCOLS, int &NROWS, double &xsize, - double &ysize); + Kernel::V3D findPixelPos(const std::string &bankName, int col, int row); + void sizeBanks(const std::string &bankName, int &NCOLS, int &NROWS, + double &xsize, double &ysize); Geometry::Instrument_const_sptr inst; }; diff --git a/Framework/DataHandling/inc/MantidDataHandling/SaveMask.h b/Framework/DataHandling/inc/MantidDataHandling/SaveMask.h index 4c286ed55c9b2e9d6f3e02267abfaf260bfc7ea7..00ad7ff57e010f5f74cf4d3ad656bd3e5eaf18d4 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/SaveMask.h +++ b/Framework/DataHandling/inc/MantidDataHandling/SaveMask.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/SaveNISTDAT.h b/Framework/DataHandling/inc/MantidDataHandling/SaveNISTDAT.h index 07ff65e22c943caa126294699309c8180076a8bb..9786014c85f6a404fe7db00a7af3104205bbd0e0 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/SaveNISTDAT.h +++ b/Framework/DataHandling/inc/MantidDataHandling/SaveNISTDAT.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/SaveNXSPE.h b/Framework/DataHandling/inc/MantidDataHandling/SaveNXSPE.h index d41a6212e0058572f7f0ec8d41607bbd8b323094..b18add8049cc8a7ed228cb71d6df62c736f10154 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/SaveNXSPE.h +++ b/Framework/DataHandling/inc/MantidDataHandling/SaveNXSPE.h @@ -1,9 +1,10 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + +// Mantid Repository : https://github.com/mantidproject/mantid #pragma once //--------------------------------------------------- diff --git a/Framework/DataHandling/inc/MantidDataHandling/SaveNXTomo.h b/Framework/DataHandling/inc/MantidDataHandling/SaveNXTomo.h index 919f38167084c9306ff26c4f16f0a0b092dce2c4..7a681a780a2138c96418980a8fa2952f7d9471f8 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/SaveNXTomo.h +++ b/Framework/DataHandling/inc/MantidDataHandling/SaveNXTomo.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -87,16 +87,16 @@ private: ::NeXus::File setupFile(); /// Writes a single workspace into the file - void writeSingleWorkspace(const DataObjects::Workspace2D_sptr workspace, + void writeSingleWorkspace(const DataObjects::Workspace2D_sptr &workspace, ::NeXus::File &nxFile); /// Write various pieces of data from the workspace log with checks on the /// structure of the nexus file - void writeLogValues(const DataObjects::Workspace2D_sptr workspace, + void writeLogValues(const DataObjects::Workspace2D_sptr &workspace, ::NeXus::File &nxFile, int thisFileInd); - void writeIntensityValue(const DataObjects::Workspace2D_sptr workspace, + void writeIntensityValue(const DataObjects::Workspace2D_sptr &workspace, ::NeXus::File &nxFile, int thisFileInd); - void writeImageKeyValue(const DataObjects::Workspace2D_sptr workspace, + void writeImageKeyValue(const DataObjects::Workspace2D_sptr &workspace, ::NeXus::File &nxFile, int thisFileInd); /// Main exec routine, called for group or individual workspace processing. diff --git a/Framework/DataHandling/inc/MantidDataHandling/SaveNXcanSAS.h b/Framework/DataHandling/inc/MantidDataHandling/SaveNXcanSAS.h index 3e00f540af1ae9f5d47247433231ce617a8f36e8..8dcceff7f8fb739ec32780685937f17339530086 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/SaveNXcanSAS.h +++ b/Framework/DataHandling/inc/MantidDataHandling/SaveNXcanSAS.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/SaveNexus.h b/Framework/DataHandling/inc/MantidDataHandling/SaveNexus.h index 621a64cff31b7d65accdfe3bfbaec15b7f07d8ee..d8fb9a59062b2c4ea05d64a1fc312de4d69b966b 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/SaveNexus.h +++ b/Framework/DataHandling/inc/MantidDataHandling/SaveNexus.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/SaveNexusESS.h b/Framework/DataHandling/inc/MantidDataHandling/SaveNexusESS.h index e7fb995e865387dd467345d940c3be9cc6bdcee2..cdc47c088f4658d8a73dff959c55f5a1f4d60cf0 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/SaveNexusESS.h +++ b/Framework/DataHandling/inc/MantidDataHandling/SaveNexusESS.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/SaveNexusGeometry.h b/Framework/DataHandling/inc/MantidDataHandling/SaveNexusGeometry.h index d07e95d253db94dbd802e4a908d79c07a08ff165..33bf190009f5824aa70cab6118062881e8f13dfc 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/SaveNexusGeometry.h +++ b/Framework/DataHandling/inc/MantidDataHandling/SaveNexusGeometry.h @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - /* SaveNexusGeometry : A thin Algorithm wrapper over * NexusGeometry::saveInstrument allowing user to save the geometry from * instrument attached to a workspace. diff --git a/Framework/DataHandling/inc/MantidDataHandling/SaveNexusProcessed.h b/Framework/DataHandling/inc/MantidDataHandling/SaveNexusProcessed.h index 6ab2f7ba1c68f237a84c313ed67b221395eb3e75..89c4f0f0f537281717fd740805302f391213bf03 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/SaveNexusProcessed.h +++ b/Framework/DataHandling/inc/MantidDataHandling/SaveNexusProcessed.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -74,8 +74,9 @@ protected: void exec() override; private: - void getWSIndexList(std::vector<int> &indices, - Mantid::API::MatrixWorkspace_const_sptr matrixWorkspace); + void getWSIndexList( + std::vector<int> &indices, + const Mantid::API::MatrixWorkspace_const_sptr &matrixWorkspace); template <class T> static void appendEventListData(const std::vector<T> &events, size_t offset, @@ -88,7 +89,7 @@ private: void setOtherProperties(IAlgorithm *alg, const std::string &propertyName, const std::string &propertyValue, int perioidNum) override; - void doExec(Mantid::API::Workspace_sptr inputWorkspace, + void doExec(const Mantid::API::Workspace_sptr &inputWorkspace, boost::shared_ptr<Mantid::NeXus::NexusFileIO> &nexusFile, const bool keepFile = false, boost::optional<size_t> entryNumber = boost::optional<size_t>()); diff --git a/Framework/DataHandling/inc/MantidDataHandling/SaveOpenGenieAscii.h b/Framework/DataHandling/inc/MantidDataHandling/SaveOpenGenieAscii.h index 03053999c9f65828e4cc4a02325477046d8535c1..ee96b53eb99ddc5e8cc2a5823b2fc4b69a61c539 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/SaveOpenGenieAscii.h +++ b/Framework/DataHandling/inc/MantidDataHandling/SaveOpenGenieAscii.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/SavePAR.h b/Framework/DataHandling/inc/MantidDataHandling/SavePAR.h index 50525c698a7fbe7468e0284f79845943bc5f7df4..a1479f7117aa4675bec5b590ce5815e4d7fca035 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/SavePAR.h +++ b/Framework/DataHandling/inc/MantidDataHandling/SavePAR.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/SavePDFGui.h b/Framework/DataHandling/inc/MantidDataHandling/SavePDFGui.h index 305db7dbe06a7c999ba585c68702cf28bc85deac..8c95297a31f7e4eb6ee34fef995387927cb75f83 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/SavePDFGui.h +++ b/Framework/DataHandling/inc/MantidDataHandling/SavePDFGui.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -36,8 +36,9 @@ private: void init() override; void exec() override; void writeMetaData(std::ofstream &out, - API::MatrixWorkspace_const_sptr inputWS); - void writeWSData(std::ofstream &out, API::MatrixWorkspace_const_sptr inputWS); + const API::MatrixWorkspace_const_sptr &inputWS); + void writeWSData(std::ofstream &out, + const API::MatrixWorkspace_const_sptr &inputWS); }; } // namespace DataHandling diff --git a/Framework/DataHandling/inc/MantidDataHandling/SavePHX.h b/Framework/DataHandling/inc/MantidDataHandling/SavePHX.h index 640e1a25b0b7e9f0580908806ad6e8502a492698..b24802a7054b61c0257b15bba454ac917ab727bd 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/SavePHX.h +++ b/Framework/DataHandling/inc/MantidDataHandling/SavePHX.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/SaveParameterFile.h b/Framework/DataHandling/inc/MantidDataHandling/SaveParameterFile.h index 3cc796c68f92cb4ca946b7d6bf74471cdd2e63b9..4faa53bfb306e2191d8134ed5f69c25ef1e58221 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/SaveParameterFile.h +++ b/Framework/DataHandling/inc/MantidDataHandling/SaveParameterFile.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/SaveRKH.h b/Framework/DataHandling/inc/MantidDataHandling/SaveRKH.h index 21864cc39335c253a27bcddeeb56860a17b04032..6a366e18f20c0bfd425c541681b0fc29094f667b 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/SaveRKH.h +++ b/Framework/DataHandling/inc/MantidDataHandling/SaveRKH.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/SaveRMCProfile.h b/Framework/DataHandling/inc/MantidDataHandling/SaveRMCProfile.h index cce8b3d8a49eae7cfc0a36fea0f1214e695ed96c..c8c67ab28d4d6f8b48a9e08c2330854e5e0b39da 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/SaveRMCProfile.h +++ b/Framework/DataHandling/inc/MantidDataHandling/SaveRMCProfile.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -36,8 +36,9 @@ private: void init() override; void exec() override; void writeMetaData(std::ofstream &out, - API::MatrixWorkspace_const_sptr inputWS); - void writeWSData(std::ofstream &out, API::MatrixWorkspace_const_sptr inputWS); + const API::MatrixWorkspace_const_sptr &inputWS); + void writeWSData(std::ofstream &out, + const API::MatrixWorkspace_const_sptr &inputWS); }; } // namespace DataHandling diff --git a/Framework/DataHandling/inc/MantidDataHandling/SaveReflCustomAscii.h b/Framework/DataHandling/inc/MantidDataHandling/SaveReflCustomAscii.h index 6a1d5ca4d35462a97d8c2b40fbe23f7944d18d0c..b0d3cc5b8cfe3ce54f5fc51a9cda44be6040a083 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/SaveReflCustomAscii.h +++ b/Framework/DataHandling/inc/MantidDataHandling/SaveReflCustomAscii.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/SaveReflThreeColumnAscii.h b/Framework/DataHandling/inc/MantidDataHandling/SaveReflThreeColumnAscii.h index 75f1a4ddb433518be28dc0af324a53f414eca372..31fc7e42aff1f6d974e7dfd663bdfcf412027b17 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/SaveReflThreeColumnAscii.h +++ b/Framework/DataHandling/inc/MantidDataHandling/SaveReflThreeColumnAscii.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/SaveReflectometryAscii.h b/Framework/DataHandling/inc/MantidDataHandling/SaveReflectometryAscii.h index e03bde6c999e56f965c758d87656ca80fba992a3..f809ddceca51b9438212b2f84ae448c6d4d5df70 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/SaveReflectometryAscii.h +++ b/Framework/DataHandling/inc/MantidDataHandling/SaveReflectometryAscii.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -49,22 +49,22 @@ private: /// Algorithm execution for WorkspaceGroups bool processGroups() override; /// Check file validity - void checkFile(const std::string filename); + void checkFile(const std::string &filename); /// Write the data void data(); /// Print a double value to file void outputval(double val); /// Write a string value - bool writeString(bool write, std::string s); + bool writeString(bool write, const std::string &s); /// Print a string value to file - void outputval(std::string val); + void outputval(const std::string &val); /// Retrieve sample log value std::string sampleLogValue(const std::string &logName); /// Retrieve sample log unit std::string sampleLogUnit(const std::string &logName); /// Write one header line - void writeInfo(const std::string logName, - const std::string logNameFixed = ""); + void writeInfo(const std::string &logName, + const std::string &logNameFixed = ""); /// Write header void header(); /// Determine the separator diff --git a/Framework/DataHandling/inc/MantidDataHandling/SaveSESANS.h b/Framework/DataHandling/inc/MantidDataHandling/SaveSESANS.h index abb38eca6d0237b8c3c6c62107fa3922626eea54..b3774a9a3e42c509794182e9cbaae8d0889058f8 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/SaveSESANS.h +++ b/Framework/DataHandling/inc/MantidDataHandling/SaveSESANS.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/SaveSPE.h b/Framework/DataHandling/inc/MantidDataHandling/SaveSPE.h index 44e1fbb01251e7e3eb1c2e72e9763a1f0a423d03..e755e6695aa0169d528674bcb44822fb2a620fcd 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/SaveSPE.h +++ b/Framework/DataHandling/inc/MantidDataHandling/SaveSPE.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -82,9 +82,9 @@ private: void writeSPEFile(FILE *outSPEFile, const API::MatrixWorkspace_const_sptr &inputWS); - void writeHists(const API::MatrixWorkspace_const_sptr WS, + void writeHists(const API::MatrixWorkspace_const_sptr &WS, FILE *const outFile); - void writeHist(const API::MatrixWorkspace_const_sptr WS, FILE *const outFile, + void writeHist(const API::MatrixWorkspace_const_sptr &WS, FILE *const outFile, const int wsIn) const; void writeMaskFlags(FILE *const outFile) const; void writeBins(const std::vector<double> &Vs, FILE *const outFile) const; diff --git a/Framework/DataHandling/inc/MantidDataHandling/SaveSampleEnvironmentAndShape.h b/Framework/DataHandling/inc/MantidDataHandling/SaveSampleEnvironmentAndShape.h index 642ec30fa58fa2e64a674986176ca2e656e522b2..f8f64c57b42ab90c42d72bfcd5d7d1fdc1b4592d 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/SaveSampleEnvironmentAndShape.h +++ b/Framework/DataHandling/inc/MantidDataHandling/SaveSampleEnvironmentAndShape.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/SaveStl.h b/Framework/DataHandling/inc/MantidDataHandling/SaveStl.h index 416fc51e5b3b1897f6166fcaaca95bb500bb99ef..5ef1d1bac0110cc3801a65aff138e5374fdf2d4a 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/SaveStl.h +++ b/Framework/DataHandling/inc/MantidDataHandling/SaveStl.h @@ -1,11 +1,15 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once +#include <utility> + +#include <utility> + #include "MantidDataHandling/MeshFileIO.h" #include "MantidKernel/BinaryStreamWriter.h" #include "MantidKernel/Logger.h" @@ -25,9 +29,10 @@ enum class ScaleUnits; */ class DLLExport SaveStl : public MeshFileIO { public: - SaveStl(const std::string &filename, const std::vector<uint32_t> triangle, + SaveStl(const std::string &filename, const std::vector<uint32_t> &triangle, std::vector<Kernel::V3D> vertices, ScaleUnits scaleType) - : MeshFileIO(scaleType, triangle, vertices), m_filename(filename) {} + : MeshFileIO(scaleType, triangle, std::move(std::move(vertices))), + m_filename(filename) {} void writeStl(); diff --git a/Framework/DataHandling/inc/MantidDataHandling/SaveTBL.h b/Framework/DataHandling/inc/MantidDataHandling/SaveTBL.h index 2f18dcdc83d2c01877a98fa5490229d824718217..8e47983f277944003fedfabdbe693790772bd82f 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/SaveTBL.h +++ b/Framework/DataHandling/inc/MantidDataHandling/SaveTBL.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -53,7 +53,7 @@ private: /// the separator const char m_sep; // populates the map and vector containing grouping information - void findGroups(API::ITableWorkspace_sptr ws); + void findGroups(const API::ITableWorkspace_sptr &ws); /// Map the separator options to their string equivalents std::map<int, std::vector<size_t>> m_stichgroups; std::vector<size_t> m_nogroup; diff --git a/Framework/DataHandling/inc/MantidDataHandling/SaveToSNSHistogramNexus.h b/Framework/DataHandling/inc/MantidDataHandling/SaveToSNSHistogramNexus.h index b2c591cb256a7589e6a2bbc1972d8902724d0d13..4d581a2352b5ce644c545fa88743735050e60d42 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/SaveToSNSHistogramNexus.h +++ b/Framework/DataHandling/inc/MantidDataHandling/SaveToSNSHistogramNexus.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -95,12 +95,13 @@ private: int copy_file(const char *inFile, int nx_read_access, const char *outFile, int nx_write_access); - int WriteOutDataOrErrors(Geometry::RectangularDetector_const_sptr det, + int WriteOutDataOrErrors(const Geometry::RectangularDetector_const_sptr &det, int x_pixel_slab, const char *field_name, const char *errors_field_name, bool doErrors, - bool doBoth, int is_definition, std::string bank); + bool doBoth, int is_definition, + const std::string &bank); - int WriteDataGroup(std::string bank, int is_definition); + int WriteDataGroup(const std::string &bank, int is_definition); // // // For iterating through the HDF file... diff --git a/Framework/DataHandling/inc/MantidDataHandling/SaveVTK.h b/Framework/DataHandling/inc/MantidDataHandling/SaveVTK.h index 2adc2c6184fdfd61eaefcdf51970517524175f30..21f99e58c41cecdef4bd219d7826d4b4e026bf02 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/SaveVTK.h +++ b/Framework/DataHandling/inc/MantidDataHandling/SaveVTK.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/SetBeam.h b/Framework/DataHandling/inc/MantidDataHandling/SetBeam.h index d5f75d1d3c2a440cefe59a7db0022371806c7c0f..348a2a1189fad401fbf7e82961602fefda0e6005 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/SetBeam.h +++ b/Framework/DataHandling/inc/MantidDataHandling/SetBeam.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/SetSample.h b/Framework/DataHandling/inc/MantidDataHandling/SetSample.h index d06a69145c688a8d1f871fa202529af4b2ddba83..c25b81361d20e76c517eb2a6de481fad45d8a7c7 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/SetSample.h +++ b/Framework/DataHandling/inc/MantidDataHandling/SetSample.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/SetSampleMaterial.h b/Framework/DataHandling/inc/MantidDataHandling/SetSampleMaterial.h index 496aec8cccdd8e60be3d744313424e6405432aa4..dd6f6e13c2b5e27b113d13045aa0a7421a0c3d2a 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/SetSampleMaterial.h +++ b/Framework/DataHandling/inc/MantidDataHandling/SetSampleMaterial.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/SetScalingPSD.h b/Framework/DataHandling/inc/MantidDataHandling/SetScalingPSD.h index 4c59658e91f635490fb75d3fd844ff9fc2540cd3..55c7170d7b40f49e606b805779ef2276851848b6 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/SetScalingPSD.h +++ b/Framework/DataHandling/inc/MantidDataHandling/SetScalingPSD.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -86,7 +86,8 @@ private: std::map<int, Kernel::V3D> &posMap, std::map<int, double> &scaleMap); /// read the positions of detectors defined in the raw file - void getDetPositionsFromRaw(std::string rawfile, std::vector<int> &detID, + void getDetPositionsFromRaw(const std::string &rawfile, + std::vector<int> &detID, std::vector<Kernel::V3D> &pos); }; diff --git a/Framework/DataHandling/inc/MantidDataHandling/SortTableWorkspace.h b/Framework/DataHandling/inc/MantidDataHandling/SortTableWorkspace.h index 46b2e59dbc08a98a6e0df4ceff24800e8f26d132..236a7c3a8e8bfbc461ee616a991fe39748b1a6ee 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/SortTableWorkspace.h +++ b/Framework/DataHandling/inc/MantidDataHandling/SortTableWorkspace.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/StartAndEndTimeFromNexusFileExtractor.h b/Framework/DataHandling/inc/MantidDataHandling/StartAndEndTimeFromNexusFileExtractor.h index 6241b76be76374d9c869efee299dd0a0349cf009..9547a69c08e294e5013e674584aae2896b060244 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/StartAndEndTimeFromNexusFileExtractor.h +++ b/Framework/DataHandling/inc/MantidDataHandling/StartAndEndTimeFromNexusFileExtractor.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/UpdateInstrumentFromFile.h b/Framework/DataHandling/inc/MantidDataHandling/UpdateInstrumentFromFile.h index 09ab3265f0fee5204384ba6cf8f87aa1daf57bdb..2dcfe88197d96171dada4c2f6236ee6abdb99cdc 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/UpdateInstrumentFromFile.h +++ b/Framework/DataHandling/inc/MantidDataHandling/UpdateInstrumentFromFile.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/inc/MantidDataHandling/XmlHandler.h b/Framework/DataHandling/inc/MantidDataHandling/XmlHandler.h index 48629d90a7cf0428d50f7876fdf2b69f77cc0bb3..3042711456f481c32cba6d5c76def87301d18567 100644 --- a/Framework/DataHandling/inc/MantidDataHandling/XmlHandler.h +++ b/Framework/DataHandling/inc/MantidDataHandling/XmlHandler.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -21,7 +21,7 @@ namespace DataHandling { class MANTID_DATAHANDLING_DLL XmlHandler { public: XmlHandler() = default; - XmlHandler(std::string); + XmlHandler(const std::string &); std::map<std::string, std::string> get_metadata(const std::vector<std::string> &tags_to_ignore); diff --git a/Framework/DataHandling/src/AppendGeometryToSNSNexus.cpp b/Framework/DataHandling/src/AppendGeometryToSNSNexus.cpp index f00a57613d54d04e6786fd5deb297dc5cc727127..762cf3c6eccd687c8b0ee502ff1aa617a5b1e2b5 100644 --- a/Framework/DataHandling/src/AppendGeometryToSNSNexus.cpp +++ b/Framework/DataHandling/src/AppendGeometryToSNSNexus.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/AppendGeometryToSNSNexus.h" #include "MantidAPI/FileProperty.h" @@ -360,8 +360,8 @@ AppendGeometryToSNSNexus::getInstrumentName(const std::string &nxfilename) { */ bool AppendGeometryToSNSNexus::runLoadInstrument( - const std::string &idf_filename, API::MatrixWorkspace_sptr localWorkspace, - Algorithm *alg) { + const std::string &idf_filename, + const API::MatrixWorkspace_sptr &localWorkspace, Algorithm *alg) { IAlgorithm_sptr loadInst = createChildAlgorithm("LoadInstrument", 0, 1, true); // Execute the Child Algorithm. @@ -399,8 +399,8 @@ bool AppendGeometryToSNSNexus::runLoadInstrument( * @return true if successful. */ bool AppendGeometryToSNSNexus::runLoadNexusLogs( - const std::string &nexusFileName, API::MatrixWorkspace_sptr localWorkspace, - Algorithm *alg) { + const std::string &nexusFileName, + const API::MatrixWorkspace_sptr &localWorkspace, Algorithm *alg) { IAlgorithm_sptr loadLogs = alg->createChildAlgorithm("LoadNexusLogs", 0, 1, true); diff --git a/Framework/DataHandling/src/AsciiPointBase.cpp b/Framework/DataHandling/src/AsciiPointBase.cpp index 8279276950143475707ca22b392c4c840bbecea5..2ce9275a1f0ddac7ea0aa180febd4efb76d97aba 100644 --- a/Framework/DataHandling/src/AsciiPointBase.cpp +++ b/Framework/DataHandling/src/AsciiPointBase.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /* AsciiPointBase is an abstract class holding the functionality for the diff --git a/Framework/DataHandling/src/BankPulseTimes.cpp b/Framework/DataHandling/src/BankPulseTimes.cpp index f36626fd2364595b008cea8f12611aa3f54c4a8d..02e4ed4436baa0e6d38140e73dfaa9c127f8c7bd 100644 --- a/Framework/DataHandling/src/BankPulseTimes.cpp +++ b/Framework/DataHandling/src/BankPulseTimes.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/BankPulseTimes.h" @@ -98,7 +98,8 @@ BankPulseTimes::~BankPulseTimes() { delete[] this->pulseTimes; } * @return true if the pulse times are the same and so don't need to be * reloaded. */ -bool BankPulseTimes::equals(size_t otherNumPulse, std::string otherStartTime) { +bool BankPulseTimes::equals(size_t otherNumPulse, + const std::string &otherStartTime) { return ((this->startTime == otherStartTime) && (this->numPulses == otherNumPulse)); } diff --git a/Framework/DataHandling/src/CheckMantidVersion.cpp b/Framework/DataHandling/src/CheckMantidVersion.cpp index 387a1c3e381b859936bcd7bb178c43ecbed0cfeb..68c640452855c1bb45f1093ac7db1d8b77566f2a 100644 --- a/Framework/DataHandling/src/CheckMantidVersion.cpp +++ b/Framework/DataHandling/src/CheckMantidVersion.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/CheckMantidVersion.h" #include "MantidKernel/ConfigService.h" diff --git a/Framework/DataHandling/src/CompressEvents.cpp b/Framework/DataHandling/src/CompressEvents.cpp index 2e267e35a58b919eb66b9ba839aaa553a741e069..f78d6c33a1b29bdd269c5038b033210962b441b8 100644 --- a/Framework/DataHandling/src/CompressEvents.cpp +++ b/Framework/DataHandling/src/CompressEvents.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/CompressEvents.h" #include "MantidAPI/Run.h" diff --git a/Framework/DataHandling/src/CreateChunkingFromInstrument.cpp b/Framework/DataHandling/src/CreateChunkingFromInstrument.cpp index fea21ffd0f8eb22d59bbeb6053a2f1f99b2bd2e6..aa449170b9d58550882ee1aa65f64eff387cda65 100644 --- a/Framework/DataHandling/src/CreateChunkingFromInstrument.cpp +++ b/Framework/DataHandling/src/CreateChunkingFromInstrument.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/CreateChunkingFromInstrument.h" #include "MantidAPI/FileProperty.h" @@ -216,7 +216,7 @@ bool startsWith(const string &str, const string &prefix) { * @return The correct parent name. This is an empty string if the name * isn't found. */ -string parentName(IComponent_const_sptr comp, const string &prefix) { +string parentName(const IComponent_const_sptr &comp, const string &prefix) { // handle the special case of the component has the name if (startsWith(comp->getName(), prefix)) return comp->getName(); @@ -242,7 +242,8 @@ string parentName(IComponent_const_sptr comp, const string &prefix) { * @return The correct parent name. This is an empty string if the name * isn't found. */ -string parentName(IComponent_const_sptr comp, const vector<string> &names) { +string parentName(const IComponent_const_sptr &comp, + const vector<string> &names) { // handle the special case of the component has the name for (const auto &name : names) if (name == comp->getName()) diff --git a/Framework/DataHandling/src/CreatePolarizationEfficiencies.cpp b/Framework/DataHandling/src/CreatePolarizationEfficiencies.cpp index 95d76c1d66ad3da7fbc790f4483eaa6824e35d2e..c3e1659b37ac0727fd6d15c3404bbf6dd48502bf 100644 --- a/Framework/DataHandling/src/CreatePolarizationEfficiencies.cpp +++ b/Framework/DataHandling/src/CreatePolarizationEfficiencies.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/CreatePolarizationEfficiencies.h" #include "MantidAPI/AnalysisDataService.h" diff --git a/Framework/DataHandling/src/CreatePolarizationEfficienciesBase.cpp b/Framework/DataHandling/src/CreatePolarizationEfficienciesBase.cpp index bd00b3bdb2b3ae75b44fa5743a91ddc3e8fa3ec5..51451136680cf1e962f1611055791ffcc172c240 100644 --- a/Framework/DataHandling/src/CreatePolarizationEfficienciesBase.cpp +++ b/Framework/DataHandling/src/CreatePolarizationEfficienciesBase.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/CreatePolarizationEfficienciesBase.h" #include "MantidAPI/AnalysisDataService.h" diff --git a/Framework/DataHandling/src/CreateSampleShape.cpp b/Framework/DataHandling/src/CreateSampleShape.cpp index 77b16b6247fe700831dd120bdfb7b1ea821a8093..47ff5811a77cd358bd97cea97dd1caed5a284656 100644 --- a/Framework/DataHandling/src/CreateSampleShape.cpp +++ b/Framework/DataHandling/src/CreateSampleShape.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //-------------------------------- // Includes diff --git a/Framework/DataHandling/src/CreateSimulationWorkspace.cpp b/Framework/DataHandling/src/CreateSimulationWorkspace.cpp index 08be0b64adb8c6e0ea881d8366a6e031169329f9..e0866c6462a1c5280972e50dc2e1c1519b170d18 100644 --- a/Framework/DataHandling/src/CreateSimulationWorkspace.cpp +++ b/Framework/DataHandling/src/CreateSimulationWorkspace.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/CreateSimulationWorkspace.h" #include "MantidAPI/Axis.h" @@ -38,7 +38,7 @@ struct StartAndEndTime { Mantid::Types::Core::DateAndTime endTime; }; -StartAndEndTime getStartAndEndTimesFromRawFile(std::string filename) { +StartAndEndTime getStartAndEndTimesFromRawFile(const std::string &filename) { FILE *rawFile = fopen(filename.c_str(), "rb"); if (!rawFile) throw std::runtime_error("Cannot open RAW file for reading: " + filename); @@ -58,7 +58,7 @@ StartAndEndTime getStartAndEndTimesFromRawFile(std::string filename) { } StartAndEndTime getStartAndEndTimesFromNexusFile( - std::string filename, + const std::string &filename, const Mantid::Types::Core::DateAndTime &startTimeDefault, const Mantid::Types::Core::DateAndTime &endTimeDefault) { StartAndEndTime startAndEndTime; @@ -411,7 +411,7 @@ void CreateSimulationWorkspace::adjustInstrument(const std::string &filename) { * @param workspace: dummy workspace */ void CreateSimulationWorkspace::setStartDate( - API::MatrixWorkspace_sptr workspace) { + const API::MatrixWorkspace_sptr &workspace) { const std::string detTableFile = getProperty("DetectorTableFilename"); auto hasDetTableFile = !detTableFile.empty(); auto &run = workspace->mutableRun(); diff --git a/Framework/DataHandling/src/DataBlock.cpp b/Framework/DataHandling/src/DataBlock.cpp index 2590ca80dca7cfbe2ac7ed3876e834cac6f57306..0bcd40df933ed7f6ab4807b53f4b87ebbaf61e1d 100644 --- a/Framework/DataHandling/src/DataBlock.cpp +++ b/Framework/DataHandling/src/DataBlock.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/DataBlock.h" #include "MantidDataHandling/DataBlockGenerator.h" diff --git a/Framework/DataHandling/src/DataBlockComposite.cpp b/Framework/DataHandling/src/DataBlockComposite.cpp index 325170c2378b3d39986ccd4a5a92847a4229d32a..fe4c1e8bb4e21cc02a1bf6024bdba2ac89230569 100644 --- a/Framework/DataHandling/src/DataBlockComposite.cpp +++ b/Framework/DataHandling/src/DataBlockComposite.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/DataBlockComposite.h" #include "MantidDataHandling/DataBlockGenerator.h" @@ -208,9 +208,12 @@ std::vector<std::pair<int64_t, int64_t>> spectrumIDIntervals( const std::vector<Mantid::DataHandling::DataBlock> &blocks) { std::vector<std::pair<int64_t, int64_t>> intervals; intervals.reserve(blocks.size()); - for (const auto &block : blocks) { - intervals.emplace_back(block.getMinSpectrumID(), block.getMaxSpectrumID()); - } + + std::transform(blocks.begin(), blocks.end(), std::back_inserter(intervals), + [](const auto &block) { + return std::make_pair(block.getMinSpectrumID(), + block.getMaxSpectrumID()); + }); return intervals; } } // namespace @@ -253,7 +256,7 @@ std::unique_ptr<DataBlockGenerator> DataBlockComposite::getGenerator() const { return std::make_unique<DataBlockGenerator>(intervals); } -void DataBlockComposite::addDataBlock(DataBlock dataBlock) { +void DataBlockComposite::addDataBlock(const DataBlock &dataBlock) { // Set the number of periods, number of spectra and number of channel m_numberOfPeriods = dataBlock.getNumberOfPeriods(); m_numberOfChannels = dataBlock.getNumberOfChannels(); diff --git a/Framework/DataHandling/src/DataBlockGenerator.cpp b/Framework/DataHandling/src/DataBlockGenerator.cpp index 36f026607a7ffc1f003f359b5c2a9792296f94e5..0726d5dc508fe498605a4893ca5a26bdd6ad59a7 100644 --- a/Framework/DataHandling/src/DataBlockGenerator.cpp +++ b/Framework/DataHandling/src/DataBlockGenerator.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/DataBlockGenerator.h" #include "MantidDataHandling/DataBlock.h" diff --git a/Framework/DataHandling/src/DefaultEventLoader.cpp b/Framework/DataHandling/src/DefaultEventLoader.cpp index 9874ccce0e4a49d0dacb6f6dcbd84e238f4533ad..49ca043da06298a9b7f6247fb9c1ad78cc77a811 100644 --- a/Framework/DataHandling/src/DefaultEventLoader.cpp +++ b/Framework/DataHandling/src/DefaultEventLoader.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/DefaultEventLoader.h" #include "MantidAPI/Progress.h" diff --git a/Framework/DataHandling/src/DefineGaugeVolume.cpp b/Framework/DataHandling/src/DefineGaugeVolume.cpp index 7d906bf8e5a5e52d0892a45830df7639c5c3a2a3..6751f461319da32c8fe1b60d02182c0a89370b66 100644 --- a/Framework/DataHandling/src/DefineGaugeVolume.cpp +++ b/Framework/DataHandling/src/DefineGaugeVolume.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/DefineGaugeVolume.h" #include "MantidAPI/MatrixWorkspace.h" diff --git a/Framework/DataHandling/src/DeleteTableRows.cpp b/Framework/DataHandling/src/DeleteTableRows.cpp index 906eb76bd6d1a181679e4889eead74f10693dac5..f2cc63f9d26e041d77fa7ed35c6ca942a0ebd36b 100644 --- a/Framework/DataHandling/src/DeleteTableRows.cpp +++ b/Framework/DataHandling/src/DeleteTableRows.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/DataHandling/src/DetermineChunking.cpp b/Framework/DataHandling/src/DetermineChunking.cpp index 07e36f52f4a02994627ed51a306dda4417974067..fe074a28eee6d1a81f006fb22cd4b681e4691486 100644 --- a/Framework/DataHandling/src/DetermineChunking.cpp +++ b/Framework/DataHandling/src/DetermineChunking.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/DetermineChunking.h" #include "LoadRaw/isisraw.h" @@ -292,7 +292,7 @@ void DetermineChunking::exec() { } /// set the name of the top level NXentry m_top_entry_name -std::string DetermineChunking::setTopEntryName(std::string filename) { +std::string DetermineChunking::setTopEntryName(const std::string &filename) { std::string top_entry_name; using string_map_t = std::map<std::string, std::string>; try { diff --git a/Framework/DataHandling/src/DownloadFile.cpp b/Framework/DataHandling/src/DownloadFile.cpp index 7241152f482035b2d344db9f9ed90787032d9f05..0b10bfc41029d2ee035ae541586bfaea382403c5 100644 --- a/Framework/DataHandling/src/DownloadFile.cpp +++ b/Framework/DataHandling/src/DownloadFile.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/DownloadFile.h" #include "MantidAPI/FileProperty.h" diff --git a/Framework/DataHandling/src/DownloadInstrument.cpp b/Framework/DataHandling/src/DownloadInstrument.cpp index 4be0290038b0aec718c2f490b993e709346478c2..457350b7ed8107b490fd41c9f5f64df5f36071a5 100644 --- a/Framework/DataHandling/src/DownloadInstrument.cpp +++ b/Framework/DataHandling/src/DownloadInstrument.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/DownloadInstrument.h" #include "MantidKernel/ChecksumHelper.h" diff --git a/Framework/DataHandling/src/EventWorkspaceCollection.cpp b/Framework/DataHandling/src/EventWorkspaceCollection.cpp index 7d570943446221361b908e4cd2307b0f2f15fcea..459a890bd5be949b4bd29d62fd9c19dfbcb6085b 100644 --- a/Framework/DataHandling/src/EventWorkspaceCollection.cpp +++ b/Framework/DataHandling/src/EventWorkspaceCollection.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/EventWorkspaceCollection.h" #include "MantidAPI/Axis.h" @@ -162,7 +162,7 @@ EventWorkspaceCollection::getSpectrum(const size_t index) const { return m_WsVec[0]->getSpectrum(index); } void EventWorkspaceCollection::setSpectrumNumbersFromUniqueSpectra( - const std::set<int> uniqueSpectra) { + const std::set<int> &uniqueSpectra) { // For each workspace, update all the spectrum numbers for (auto &ws : m_WsVec) { size_t counter = 0; @@ -279,14 +279,14 @@ void EventWorkspaceCollection::setWidth(const float flag) { } } -void EventWorkspaceCollection::setTitle(std::string title) { +void EventWorkspaceCollection::setTitle(const std::string &title) { for (auto &ws : m_WsVec) { ws->setTitle(title); } } void EventWorkspaceCollection::applyFilter( - boost::function<void(MatrixWorkspace_sptr)> func) { + const boost::function<void(MatrixWorkspace_sptr)> &func) { for (auto &ws : m_WsVec) { func(ws); } diff --git a/Framework/DataHandling/src/ExtractMonitorWorkspace.cpp b/Framework/DataHandling/src/ExtractMonitorWorkspace.cpp index 29a613e487035cb07c53fd0d3d5661cea1becd3b..ad6e697b6efe3736e384729fe7a72745d56e3e8a 100644 --- a/Framework/DataHandling/src/ExtractMonitorWorkspace.cpp +++ b/Framework/DataHandling/src/ExtractMonitorWorkspace.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/ExtractMonitorWorkspace.h" #include "MantidAPI/MatrixWorkspace.h" diff --git a/Framework/DataHandling/src/ExtractPolarizationEfficiencies.cpp b/Framework/DataHandling/src/ExtractPolarizationEfficiencies.cpp index fe3e6bbacfed32cef0599496af4de3e2eafd3f36..a4ebe5e7f9c30ccd79bcfcd2df6d707601db72dc 100644 --- a/Framework/DataHandling/src/ExtractPolarizationEfficiencies.cpp +++ b/Framework/DataHandling/src/ExtractPolarizationEfficiencies.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/ExtractPolarizationEfficiencies.h" #include "MantidAPI/MatrixWorkspace.h" diff --git a/Framework/DataHandling/src/FilterEventsByLogValuePreNexus.cpp b/Framework/DataHandling/src/FilterEventsByLogValuePreNexus.cpp index 2b9ffc084c8f3d81e01d18adfb671eb0df746120..b1ee58199cd933414d235b1e1e19863538ef326a 100644 --- a/Framework/DataHandling/src/FilterEventsByLogValuePreNexus.cpp +++ b/Framework/DataHandling/src/FilterEventsByLogValuePreNexus.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/FilterEventsByLogValuePreNexus.h" #include "MantidAPI/Axis.h" @@ -671,8 +671,8 @@ void FilterEventsByLogValuePreNexus::processEventLogs() { * @param logtitle :: title of the log to be inserted to workspace * @param mindex :: index of the the series in the wrong detectors map */ -void FilterEventsByLogValuePreNexus::addToWorkspaceLog(std::string logtitle, - size_t mindex) { +void FilterEventsByLogValuePreNexus::addToWorkspaceLog( + const std::string &logtitle, size_t mindex) { // Create TimeSeriesProperty auto property = new TimeSeriesProperty<double>(logtitle); @@ -770,7 +770,8 @@ void FilterEventsByLogValuePreNexus::doStatToEventLog(size_t mindex) { * geometry */ void FilterEventsByLogValuePreNexus::runLoadInstrument( - const std::string &eventfilename, MatrixWorkspace_sptr localWorkspace) { + const std::string &eventfilename, + const MatrixWorkspace_sptr &localWorkspace) { // start by getting just the filename string instrument = Poco::Path(eventfilename).getFileName(); @@ -930,7 +931,6 @@ void FilterEventsByLogValuePreNexus::procEvents( << " threads" << " in " << numBlocks << " blocks. " << "\n"; - // cppcheck-suppress syntaxError PRAGMA_OMP( parallel for schedule(dynamic, 1) if (m_parallelProcessing) ) for (int i = 0; i < int(numThreads); i++) { @@ -954,7 +954,7 @@ void FilterEventsByLogValuePreNexus::procEvents( // value = pointer to the events vector eventVectors[i] = new EventVector_pt[m_detid_max + 1]; EventVector_pt *theseEventVectors = eventVectors[i]; - for (detid_t j = 0; j < m_detid_max + 1; j++) { + for (detid_t j = 0; j < m_detid_max + 1; ++j) { size_t wi = m_pixelToWkspindex[j]; // Save a POINTER to the vector<tofEvent> theseEventVectors[j] = &partWS->getSpectrum(wi).getEvents(); @@ -1133,15 +1133,13 @@ void FilterEventsByLogValuePreNexus::procEventsLinear( << m_maxNumEvents << "\n"; maxeventid = m_maxNumEvents + 1; - size_t numbadeventindex = 0; - int numeventswritten = 0; // Declare local statistic parameters size_t local_numErrorEvents = 0; size_t local_numBadEvents = 0; - size_t local_numWrongdetidEvents = 0; size_t local_numIgnoredEvents = 0; + size_t local_numWrongdetidEvents = 0; size_t local_numGoodEvents = 0; double local_m_shortestTof = static_cast<double>(MAX_TOF_UINT32) * TOF_CONVERSION; @@ -1161,8 +1159,6 @@ void FilterEventsByLogValuePreNexus::procEventsLinear( int64_t i_pulse = 0; for (size_t ievent = 0; ievent < current_event_buffer_size; ++ievent) { - bool iswrongdetid = false; - // Load DasEvent DasEvent &tempevent = *(event_buffer + ievent); @@ -1186,6 +1182,7 @@ void FilterEventsByLogValuePreNexus::procEventsLinear( pixelid = this->m_pixelmap[unmapped_pid]; } + bool iswrongdetid = false; // Check special/wrong pixel IDs against max Detector ID if (pixelid > static_cast<PixelType>(m_detid_max)) { // Record the wrong/special ID @@ -1367,12 +1364,6 @@ void FilterEventsByLogValuePreNexus::procEventsLinear( if (local_m_longestTof > m_longestTof) m_longestTof = local_m_longestTof; } - - if (numbadeventindex > 0) { - g_log.notice() << "Single block: Encountered " << numbadeventindex - << " bad event indexes" - << "\n"; - } } //---------------------------------------------------------------------------------------------- @@ -1558,7 +1549,7 @@ void FilterEventsByLogValuePreNexus::filterEvents() { // value = pointer to the events vector eventVectors[i] = new EventVector_pt[m_detid_max + 1]; EventVector_pt *theseEventVectors = eventVectors[i]; - for (detid_t j = 0; j < m_detid_max + 1; j++) { + for (detid_t j = 0; j < m_detid_max + 1; ++j) { size_t wi = m_pixelToWkspindex[j]; // Save a POINTER to the vector<tofEvent> if (wi != static_cast<size_t>(-1)) @@ -1737,8 +1728,6 @@ void FilterEventsByLogValuePreNexus::filterEventsLinear( << m_maxNumEvents << "\n"; maxeventid = m_maxNumEvents + 1; - size_t numbadeventindex = 0; - // Declare local statistic parameters size_t local_numErrorEvents = 0; size_t local_numBadEvents = 0; @@ -1824,8 +1813,6 @@ void FilterEventsByLogValuePreNexus::filterEventsLinear( g_log.notice() << "[DB] L1 = " << l1 << "\n"; for (size_t ievent = 0; ievent < current_event_buffer_size; ++ievent) { - bool iswrongdetid = false; - bool islogevent = false; // Load DasEvent DasEvent &tempevent = *(event_buffer + ievent); @@ -1840,6 +1827,9 @@ void FilterEventsByLogValuePreNexus::filterEventsLinear( local_numBadEvents++; continue; } else { + bool islogevent = false; + bool iswrongdetid = false; + // Covert DAS Pixel ID to Mantid Pixel ID if (pixelid == 1073741843) { // downstream monitor pixel for SNAP @@ -2107,8 +2097,6 @@ void FilterEventsByLogValuePreNexus::filterEventsLinear( m_longestTof = local_m_longestTof; } - g_log.notice() << "Encountered " << numbadeventindex << " bad event indexes" - << "\n"; } // FilterEventsLinearly //---------------------------------------------------------------------------------------------- @@ -2118,7 +2106,7 @@ void FilterEventsByLogValuePreNexus::filterEventsLinear( * We want to pad out empty pixels: monitor */ size_t FilterEventsByLogValuePreNexus::padOutEmptyPixels( - DataObjects::EventWorkspace_sptr eventws) { + const DataObjects::EventWorkspace_sptr &eventws) { const auto &detectorInfo = eventws->detectorInfo(); const auto &detIDs = detectorInfo.detectorIDs(); @@ -2158,7 +2146,7 @@ size_t FilterEventsByLogValuePreNexus::padOutEmptyPixels( * pixel-spectrum map */ void FilterEventsByLogValuePreNexus::setupPixelSpectrumMap( - DataObjects::EventWorkspace_sptr eventws) { + const DataObjects::EventWorkspace_sptr &eventws) { const auto &detectorInfo = eventws->detectorInfo(); const auto &detIDs = detectorInfo.detectorIDs(); @@ -2368,8 +2356,6 @@ void FilterEventsByLogValuePreNexus::readPulseidFile( } } - double temp; - if (m_numPulses > 0) { DateAndTime lastPulseDateTime(0, 0); this->pulsetimes.reserve(m_numPulses); @@ -2384,7 +2370,7 @@ void FilterEventsByLogValuePreNexus::readPulseidFile( else lastPulseDateTime = pulseDateTime; - temp = pulse.pCurrent; + double temp = pulse.pCurrent; this->m_protonCharge.emplace_back(temp); if (temp < 0.) this->g_log.warning("Individual proton charge < 0 being ignored"); diff --git a/Framework/DataHandling/src/FindDetectorsInShape.cpp b/Framework/DataHandling/src/FindDetectorsInShape.cpp index 4f07956d3fea1d41be2f8631d4dda86c76c16451..fca06223d5d654d78ad6cdb3e62a777ed07ceaaa 100644 --- a/Framework/DataHandling/src/FindDetectorsInShape.cpp +++ b/Framework/DataHandling/src/FindDetectorsInShape.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/FindDetectorsInShape.h" #include "MantidAPI/MatrixWorkspace.h" diff --git a/Framework/DataHandling/src/FindDetectorsPar.cpp b/Framework/DataHandling/src/FindDetectorsPar.cpp index 050a24582fa6eda8624915b2731dd4ac5568200e..82c4d8447b280361fda0ebaf83adbf9355c57161 100644 --- a/Framework/DataHandling/src/FindDetectorsPar.cpp +++ b/Framework/DataHandling/src/FindDetectorsPar.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/FindDetectorsPar.h" diff --git a/Framework/DataHandling/src/GenerateGroupingPowder.cpp b/Framework/DataHandling/src/GenerateGroupingPowder.cpp index ce7c8753da090fa35b8bae79b2381b30d23fc578..2b62b534965a44f17afec59af125f557f91523f6 100644 --- a/Framework/DataHandling/src/GenerateGroupingPowder.cpp +++ b/Framework/DataHandling/src/GenerateGroupingPowder.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/GenerateGroupingPowder.h" #include "MantidAPI/FileProperty.h" diff --git a/Framework/DataHandling/src/GroupDetectors.cpp b/Framework/DataHandling/src/GroupDetectors.cpp index ef40fffbe3f30768945b9eb5e7e3b4b6aa4c4875..32a2d23d699fa87e4151520aee90177fe26fa387 100644 --- a/Framework/DataHandling/src/GroupDetectors.cpp +++ b/Framework/DataHandling/src/GroupDetectors.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/DataHandling/src/GroupDetectors2.cpp b/Framework/DataHandling/src/GroupDetectors2.cpp index 9669306c1f8e8f746efa9a8d8532d84de8903f5c..85655ee45d91a091f8557b1146c8a514bfbee58c 100644 --- a/Framework/DataHandling/src/GroupDetectors2.cpp +++ b/Framework/DataHandling/src/GroupDetectors2.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/GroupDetectors2.h" @@ -311,8 +311,9 @@ void GroupDetectors2::execEvent() { * @param workspace :: the user selected input workspace * @param unUsedSpec :: spectra indexes that are not members of any group */ -void GroupDetectors2::getGroups(API::MatrixWorkspace_const_sptr workspace, - std::vector<int64_t> &unUsedSpec) { +void GroupDetectors2::getGroups( + const API::MatrixWorkspace_const_sptr &workspace, + std::vector<int64_t> &unUsedSpec) { // this is the map that we are going to fill m_GroupWsInds.clear(); @@ -454,9 +455,9 @@ void GroupDetectors2::getGroups(API::MatrixWorkspace_const_sptr workspace, * a group (so far) * @throw FileError if there's any problem with the file or its format */ -void GroupDetectors2::processFile(const std::string &fname, - API::MatrixWorkspace_const_sptr workspace, - std::vector<int64_t> &unUsedSpec) { +void GroupDetectors2::processFile( + const std::string &fname, const API::MatrixWorkspace_const_sptr &workspace, + std::vector<int64_t> &unUsedSpec) { // tring to open the file the user told us exists, skip down 20 lines to find // out what happens if we can read from it g_log.debug() << "Opening input file ... " << fname; @@ -545,9 +546,9 @@ void GroupDetectors2::processFile(const std::string &fname, * a group (so far) * @throw FileError if there's any problem with the file or its format */ -void GroupDetectors2::processXMLFile(const std::string &fname, - API::MatrixWorkspace_const_sptr workspace, - std::vector<int64_t> &unUsedSpec) { +void GroupDetectors2::processXMLFile( + const std::string &fname, const API::MatrixWorkspace_const_sptr &workspace, + std::vector<int64_t> &unUsedSpec) { // 1. Get maps for spectrum No and detector ID spec2index_map specs2index; const SpectraAxis *axis = @@ -589,9 +590,7 @@ void GroupDetectors2::processXMLFile(const std::string &fname, if (ind != detIdToWiMap.end()) { size_t wsid = ind->second; wsindexes.emplace_back(wsid); - if (unUsedSpec[wsid] != (USED)) { - unUsedSpec[wsid] = (USED); - } + unUsedSpec[wsid] = (USED); } else { g_log.error() << "Detector with ID " << detid << " is not found in instrument \n"; @@ -615,9 +614,7 @@ void GroupDetectors2::processXMLFile(const std::string &fname, if (ind != specs2index.end()) { size_t wsid = ind->second; wsindexes.emplace_back(wsid); - if (unUsedSpec[wsid] != (USED)) { - unUsedSpec[wsid] = (USED); - } + unUsedSpec[wsid] = (USED); } else { g_log.error() << "Spectrum with ID " << specNum << " is not found in instrument \n"; @@ -634,8 +631,8 @@ void GroupDetectors2::processXMLFile(const std::string &fname, * in a group (so far) */ void GroupDetectors2::processGroupingWorkspace( - GroupingWorkspace_const_sptr groupWS, - API::MatrixWorkspace_const_sptr workspace, + const GroupingWorkspace_const_sptr &groupWS, + const API::MatrixWorkspace_const_sptr &workspace, std::vector<int64_t> &unUsedSpec) { detid2index_map detIdToWiMap = workspace->getDetectorIDToWorkspaceIndexMap(); @@ -662,9 +659,7 @@ void GroupDetectors2::processGroupingWorkspace( detIdToWiMap[detectorIDs[spectrumDefinition.first]]; targetWSIndexSet.insert(targetWSIndex); // mark as used - if (unUsedSpec[targetWSIndex] != (USED)) { - unUsedSpec[targetWSIndex] = (USED); - } + unUsedSpec[targetWSIndex] = (USED); } } } @@ -688,7 +683,8 @@ void GroupDetectors2::processGroupingWorkspace( * a group (so far) */ void GroupDetectors2::processMatrixWorkspace( - MatrixWorkspace_const_sptr groupWS, MatrixWorkspace_const_sptr workspace, + const MatrixWorkspace_const_sptr &groupWS, + const MatrixWorkspace_const_sptr &workspace, std::vector<int64_t> &unUsedSpec) { detid2index_map detIdToWiMap = workspace->getDetectorIDToWorkspaceIndexMap(); @@ -700,7 +696,6 @@ void GroupDetectors2::processMatrixWorkspace( for (size_t i = 0; i < spectrumInfo.size(); ++i) { // read spectra from groupingws size_t groupid = i; - if (group2WSIndexSetmap.find(groupid) == group2WSIndexSetmap.end()) { // not found - create an empty set group2WSIndexSetmap.emplace(groupid, std::set<size_t>()); @@ -716,9 +711,7 @@ void GroupDetectors2::processMatrixWorkspace( detIdToWiMap[detectorIDs[spectrumDefinition.first]]; targetWSIndexSet.insert(targetWSIndex); // mark as used - if (unUsedSpec[targetWSIndex] != (USED)) { - unUsedSpec[targetWSIndex] = (USED); - } + unUsedSpec[targetWSIndex] = (USED); } } } @@ -939,11 +932,12 @@ double GroupDetectors2::fileReadProg( * indexing after grouping * @return number of new grouped spectra */ -size_t GroupDetectors2::formGroups(API::MatrixWorkspace_const_sptr inputWS, - API::MatrixWorkspace_sptr outputWS, - const double prog4Copy, const bool keepAll, - const std::set<int64_t> &unGroupedSet, - Indexing::IndexInfo &indexInfo) { +size_t +GroupDetectors2::formGroups(const API::MatrixWorkspace_const_sptr &inputWS, + const API::MatrixWorkspace_sptr &outputWS, + const double prog4Copy, const bool keepAll, + const std::set<int64_t> &unGroupedSet, + Indexing::IndexInfo &indexInfo) { const std::string behaviourChoice = getProperty("Behaviour"); const auto behaviour = behaviourChoice == "Sum" ? Behaviour::SUM : Behaviour::AVERAGE; @@ -1062,10 +1056,9 @@ size_t GroupDetectors2::formGroups(API::MatrixWorkspace_const_sptr inputWS, * a single spectra * @return number of new grouped spectra */ -size_t -GroupDetectors2::formGroupsEvent(DataObjects::EventWorkspace_const_sptr inputWS, - DataObjects::EventWorkspace_sptr outputWS, - const double prog4Copy) { +size_t GroupDetectors2::formGroupsEvent( + const DataObjects::EventWorkspace_const_sptr &inputWS, + const DataObjects::EventWorkspace_sptr &outputWS, const double prog4Copy) { if (inputWS->detectorInfo().isScanning()) throw std::runtime_error("GroupDetectors does not currently support " "EventWorkspaces with detector scans."); diff --git a/Framework/DataHandling/src/H5Util.cpp b/Framework/DataHandling/src/H5Util.cpp index 8d1278272deae08f781c24ee419b9f2327818e06..0803e85103d98b2c23c3f5a2c84c73927e34b557 100644 --- a/Framework/DataHandling/src/H5Util.cpp +++ b/Framework/DataHandling/src/H5Util.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/H5Util.h" #include "MantidAPI/LogManager.h" diff --git a/Framework/DataHandling/src/ISISDataArchive.cpp b/Framework/DataHandling/src/ISISDataArchive.cpp index 3e54ea79784af662394707fcb503b7b1f301c189..97e527d681e19f7e81f953d4d1cd4609d3d1a15d 100644 --- a/Framework/DataHandling/src/ISISDataArchive.cpp +++ b/Framework/DataHandling/src/ISISDataArchive.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/DataHandling/src/ISISRunLogs.cpp b/Framework/DataHandling/src/ISISRunLogs.cpp index bfad70bab747d77da07a3ef5e2c41d2aa5346698..423a6ad018686e69c9ed6225b3638c72242fe21f 100644 --- a/Framework/DataHandling/src/ISISRunLogs.cpp +++ b/Framework/DataHandling/src/ISISRunLogs.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + // Includes #include "MantidDataHandling/ISISRunLogs.h" diff --git a/Framework/DataHandling/src/JoinISISPolarizationEfficiencies.cpp b/Framework/DataHandling/src/JoinISISPolarizationEfficiencies.cpp index c882579d9b3749ad32227454807fb10e59139cdd..53b7b63f955b45373c4410082c51b345e29c6326 100644 --- a/Framework/DataHandling/src/JoinISISPolarizationEfficiencies.cpp +++ b/Framework/DataHandling/src/JoinISISPolarizationEfficiencies.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/JoinISISPolarizationEfficiencies.h" @@ -196,7 +196,7 @@ JoinISISPolarizationEfficiencies::interpolateWorkspaces( MatrixWorkspace_sptr JoinISISPolarizationEfficiencies::interpolatePointDataWorkspace( - MatrixWorkspace_sptr ws, size_t const maxSize) { + const MatrixWorkspace_sptr &ws, size_t const maxSize) { auto const &x = ws->x(0); auto const startX = x.front(); auto const endX = x.back(); @@ -213,7 +213,7 @@ JoinISISPolarizationEfficiencies::interpolatePointDataWorkspace( MatrixWorkspace_sptr JoinISISPolarizationEfficiencies::interpolateHistogramWorkspace( - MatrixWorkspace_sptr ws, size_t const maxSize) { + const MatrixWorkspace_sptr &ws, size_t const maxSize) { ws->setDistribution(true); auto const &x = ws->x(0); auto const dX = (x.back() - x.front()) / double(maxSize); diff --git a/Framework/DataHandling/src/Load.cpp b/Framework/DataHandling/src/Load.cpp index 9016deff67f020149bfc81a894ad3415d60aac19..3dccfb9b1d7d8a9ff72b2b8a7907d765e4af1078 100644 --- a/Framework/DataHandling/src/Load.cpp +++ b/Framework/DataHandling/src/Load.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/Load.h" #include "MantidAPI/AlgorithmManager.h" @@ -54,7 +54,8 @@ bool isSingleFile(const std::vector<std::vector<std::string>> &fileNames) { * @returns a string containing a suggested ws name based on the given file *names. */ -std::string generateWsNameFromFileNames(std::vector<std::string> filenames) { +std::string +generateWsNameFromFileNames(const std::vector<std::string> &filenames) { std::string wsName; for (auto &filename : filenames) { @@ -678,7 +679,8 @@ API::Workspace_sptr Load::loadFileToWs(const std::string &fileName, * * @returns a pointer to the result (the first workspace). */ -API::Workspace_sptr Load::plusWs(Workspace_sptr ws1, Workspace_sptr ws2) { +API::Workspace_sptr Load::plusWs(Workspace_sptr ws1, + const Workspace_sptr &ws2) { WorkspaceGroup_sptr group1 = boost::dynamic_pointer_cast<WorkspaceGroup>(ws1); WorkspaceGroup_sptr group2 = boost::dynamic_pointer_cast<WorkspaceGroup>(ws2); diff --git a/Framework/DataHandling/src/LoadANSTOHelper.cpp b/Framework/DataHandling/src/LoadANSTOHelper.cpp index d1bd8acda8ed6a3dbe546c3555a421af4f2fb696..9c50f98a95f0ee2acaeb3e00e450847cd2775746 100644 --- a/Framework/DataHandling/src/LoadANSTOHelper.cpp +++ b/Framework/DataHandling/src/LoadANSTOHelper.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/LoadANSTOHelper.h" #include "MantidAPI/FileProperty.h" diff --git a/Framework/DataHandling/src/LoadAscii.cpp b/Framework/DataHandling/src/LoadAscii.cpp index edbef52288ce83bb3b3b5809059ad6a1af212c83..1a7630b8e28bc30b101251b73738b4babe187f61 100644 --- a/Framework/DataHandling/src/LoadAscii.cpp +++ b/Framework/DataHandling/src/LoadAscii.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/LoadAscii.h" #include "MantidAPI/Axis.h" diff --git a/Framework/DataHandling/src/LoadAscii2.cpp b/Framework/DataHandling/src/LoadAscii2.cpp index 9bce357a49ad3f82f0ed9327a97574a1aa91fd58..5737b92a05e1da5002ba5fa343da2c73924c85ce 100644 --- a/Framework/DataHandling/src/LoadAscii2.cpp +++ b/Framework/DataHandling/src/LoadAscii2.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/LoadAscii2.h" #include "MantidAPI/Axis.h" diff --git a/Framework/DataHandling/src/LoadAsciiStl.cpp b/Framework/DataHandling/src/LoadAsciiStl.cpp index 2d7efe50d39c4fc0fe635635bd4df8276d8e4e97..6babcfa54c05091fe578325794aa6b6cc6327b3e 100644 --- a/Framework/DataHandling/src/LoadAsciiStl.cpp +++ b/Framework/DataHandling/src/LoadAsciiStl.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/LoadAsciiStl.h" #include "MantidGeometry/Objects/MeshObject.h" @@ -11,7 +11,7 @@ namespace Mantid { namespace DataHandling { -bool LoadAsciiStl::isAsciiSTL(std::string filename) { +bool LoadAsciiStl::isAsciiSTL(const std::string &filename) { std::ifstream file(filename.c_str()); if (!file) { // if the file cannot be read then it is not a valid asciiStl File diff --git a/Framework/DataHandling/src/LoadBBY.cpp b/Framework/DataHandling/src/LoadBBY.cpp index e93082e36ec396a47fd3e4cb2e7ab18b7e4ee727..1a35f3da47bea2bd01c6c1da30ef90b4435bdfa3 100644 --- a/Framework/DataHandling/src/LoadBBY.cpp +++ b/Framework/DataHandling/src/LoadBBY.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include <cmath> #include <cstdio> @@ -305,7 +305,7 @@ void LoadBBY::exec() { eventAssigner); } - auto getParam = [&allParams](std::string tag, double defValue) { + auto getParam = [&allParams](const std::string &tag, double defValue) { try { return std::stod(allParams[tag]); } catch (const std::invalid_argument &) { diff --git a/Framework/DataHandling/src/LoadBankFromDiskTask.cpp b/Framework/DataHandling/src/LoadBankFromDiskTask.cpp index aca1aa0aabf3fe21e1b5c5c756b44d875d9caac7..c823bc7cde21c485a754b655110b3aaa3dd7e9f5 100644 --- a/Framework/DataHandling/src/LoadBankFromDiskTask.cpp +++ b/Framework/DataHandling/src/LoadBankFromDiskTask.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/LoadBankFromDiskTask.h" #include "MantidDataHandling/BankPulseTimes.h" diff --git a/Framework/DataHandling/src/LoadBinaryStl.cpp b/Framework/DataHandling/src/LoadBinaryStl.cpp index 945ee681b868481ca8b1963619268a5beaf0daab..a43550ec716d1cece46d4f138e8f81eb8ebde543 100644 --- a/Framework/DataHandling/src/LoadBinaryStl.cpp +++ b/Framework/DataHandling/src/LoadBinaryStl.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/LoadBinaryStl.h" #include "MantidGeometry/Objects/MeshObject.h" @@ -24,7 +24,7 @@ uint32_t getNumberTriangles(Kernel::BinaryStreamReader streamReader, } } // namespace -bool LoadBinaryStl::isBinarySTL(std::string filename) { +bool LoadBinaryStl::isBinarySTL(const std::string &filename) { Poco::File stlFile = Poco::File(filename); if (!stlFile.exists()) { // if the file cannot be read then it is not a valid binary Stl File diff --git a/Framework/DataHandling/src/LoadCalFile.cpp b/Framework/DataHandling/src/LoadCalFile.cpp index 19e2f9c2626d1287b39f9669f43f3a5b4749fca3..3062ed3fa00c59cf91a7608745425e0d82c79c7e 100644 --- a/Framework/DataHandling/src/LoadCalFile.cpp +++ b/Framework/DataHandling/src/LoadCalFile.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/LoadCalFile.h" #include "MantidAPI/Algorithm.h" @@ -237,9 +237,9 @@ void LoadCalFile::exec() { *initialized to the right instrument. */ void LoadCalFile::readCalFile(const std::string &calFileName, - GroupingWorkspace_sptr groupWS, - OffsetsWorkspace_sptr offsetsWS, - MaskWorkspace_sptr maskWS) { + const GroupingWorkspace_sptr &groupWS, + const OffsetsWorkspace_sptr &offsetsWS, + const MaskWorkspace_sptr &maskWS) { auto doGroup = bool(groupWS); auto doOffsets = bool(offsetsWS); auto doMask = bool(maskWS); @@ -360,7 +360,7 @@ void LoadCalFile::readCalFile(const std::string &calFileName, * @param detID Detector ID to check * @return True if a monitor, false otherwise */ -bool LoadCalFile::idIsMonitor(Instrument_const_sptr inst, int detID) { +bool LoadCalFile::idIsMonitor(const Instrument_const_sptr &inst, int detID) { auto monitorList = inst->getMonitors(); auto it = std::find(monitorList.begin(), monitorList.end(), detID); return (it != monitorList.end()); diff --git a/Framework/DataHandling/src/LoadCanSAS1D.cpp b/Framework/DataHandling/src/LoadCanSAS1D.cpp index 0e48fbf494c7f6389a21dc1a54d2b5c886dc317b..49edd128199eaafd36aae0fdbe5b94f3d1162951 100644 --- a/Framework/DataHandling/src/LoadCanSAS1D.cpp +++ b/Framework/DataHandling/src/LoadCanSAS1D.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/LoadCanSAS1D.h" #include "MantidAPI/Axis.h" @@ -297,9 +297,9 @@ void LoadCanSAS1D::check(const Poco::XML::Element *const toCheck, * @param[out] container the data will be added to this group * @throw ExistsError if a workspace with this name had already been added */ -void LoadCanSAS1D::appendDataToOutput(API::MatrixWorkspace_sptr newWork, - const std::string &newWorkName, - API::WorkspaceGroup_sptr container) { +void LoadCanSAS1D::appendDataToOutput( + const API::MatrixWorkspace_sptr &newWork, const std::string &newWorkName, + const API::WorkspaceGroup_sptr &container) { // the name of the property, like the workspace name must be different for // each workspace. Add "_run" at the end to stop problems with names like // "outputworkspace" @@ -317,8 +317,9 @@ void LoadCanSAS1D::appendDataToOutput(API::MatrixWorkspace_sptr newWork, * @param inst_name :: The name written in the Nexus file * @param localWorkspace :: The workspace to insert the instrument into */ -void LoadCanSAS1D::runLoadInstrument(const std::string &inst_name, - API::MatrixWorkspace_sptr localWorkspace) { +void LoadCanSAS1D::runLoadInstrument( + const std::string &inst_name, + const API::MatrixWorkspace_sptr &localWorkspace) { API::IAlgorithm_sptr loadInst = createChildAlgorithm("LoadInstrument"); @@ -342,7 +343,7 @@ void LoadCanSAS1D::runLoadInstrument(const std::string &inst_name, * @param[in] wSpace the log will be created in this workspace */ void LoadCanSAS1D::createLogs(const Poco::XML::Element *const sasEntry, - API::MatrixWorkspace_sptr wSpace) const { + const API::MatrixWorkspace_sptr &wSpace) const { API::Run &run = wSpace->mutableRun(); Element *runText = sasEntry->getChildElement("Run"); check(runText, "Run"); @@ -369,7 +370,7 @@ void LoadCanSAS1D::createLogs(const Poco::XML::Element *const sasEntry, void LoadCanSAS1D::createSampleInformation( const Poco::XML::Element *const sasEntry, - Mantid::API::MatrixWorkspace_sptr wSpace) const { + const Mantid::API::MatrixWorkspace_sptr &wSpace) const { auto &sample = wSpace->mutableSample(); // Get the thickness information diff --git a/Framework/DataHandling/src/LoadCanSAS1D2.cpp b/Framework/DataHandling/src/LoadCanSAS1D2.cpp index 608615c1884303cb50113528fa49f6a7f7281cd2..b2cfc31cfe68bb1b46125c4ca5b7683628e9294b 100644 --- a/Framework/DataHandling/src/LoadCanSAS1D2.cpp +++ b/Framework/DataHandling/src/LoadCanSAS1D2.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/LoadCanSAS1D2.h" #include "MantidAPI/Axis.h" diff --git a/Framework/DataHandling/src/LoadDaveGrp.cpp b/Framework/DataHandling/src/LoadDaveGrp.cpp index 7e2f8c40d0462ecef8155e1ca57d8308949ff217..840a1fb136d79519d7fae632caa14ddabe91dffe 100644 --- a/Framework/DataHandling/src/LoadDaveGrp.cpp +++ b/Framework/DataHandling/src/LoadDaveGrp.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/LoadDaveGrp.h" #include "MantidAPI/FileProperty.h" @@ -176,7 +176,7 @@ API::MatrixWorkspace_sptr LoadDaveGrp::setupWorkspace() const { return outputWorkspace; } -void LoadDaveGrp::setWorkspaceAxes(API::MatrixWorkspace_sptr workspace, +void LoadDaveGrp::setWorkspaceAxes(const API::MatrixWorkspace_sptr &workspace, const std::vector<double> &xAxis, const std::vector<double> &yAxis) const { @@ -231,7 +231,7 @@ void LoadDaveGrp::getAxisValues(std::vector<double> &axis, } } -void LoadDaveGrp::getData(API::MatrixWorkspace_sptr workspace) { +void LoadDaveGrp::getData(const API::MatrixWorkspace_sptr &workspace) { double data_val = 0.0; double err_val = 0.0; diff --git a/Framework/DataHandling/src/LoadDetectorInfo.cpp b/Framework/DataHandling/src/LoadDetectorInfo.cpp index 01604bd765e1bdb2259b482063df92e2c6e6073e..f9c69fde861bffd714adc30a7a2b2de1597a320d 100644 --- a/Framework/DataHandling/src/LoadDetectorInfo.cpp +++ b/Framework/DataHandling/src/LoadDetectorInfo.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/LoadDetectorInfo.h" #include "LoadRaw/isisraw2.h" @@ -65,8 +65,6 @@ void LoadDetectorInfo::init() { Direction::Input); } -/** - */ void LoadDetectorInfo::exec() { cacheInputs(); std::string filename = getPropertyValue("DataFilename"); diff --git a/Framework/DataHandling/src/LoadDetectorsGroupingFile.cpp b/Framework/DataHandling/src/LoadDetectorsGroupingFile.cpp index 6320362d2e5ceac533226092660214b449c8a01b..b2ccf757b1cea94807d4e8db93b0b10cb4f83e87 100644 --- a/Framework/DataHandling/src/LoadDetectorsGroupingFile.cpp +++ b/Framework/DataHandling/src/LoadDetectorsGroupingFile.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include <sstream> @@ -409,7 +409,7 @@ LoadGroupXMLFile::LoadGroupXMLFile() m_pDoc(), m_groupComponentsMap(), m_groupDetectorsMap(), m_groupSpectraMap(), m_startGroupID(1), m_groupNamesMap() {} -void LoadGroupXMLFile::loadXMLFile(std::string xmlfilename) { +void LoadGroupXMLFile::loadXMLFile(const std::string &xmlfilename) { this->initializeXMLParser(xmlfilename); this->parseXML(); @@ -604,9 +604,8 @@ void LoadGroupXMLFile::parseXML() { /* * Get attribute's value by name from a Node */ -std::string LoadGroupXMLFile::getAttributeValueByName(Poco::XML::Node *pNode, - std::string attributename, - bool &found) { +std::string LoadGroupXMLFile::getAttributeValueByName( + Poco::XML::Node *pNode, const std::string &attributename, bool &found) { // 1. Init Poco::AutoPtr<Poco::XML::NamedNodeMap> att = pNode->attributes(); found = false; diff --git a/Framework/DataHandling/src/LoadDiffCal.cpp b/Framework/DataHandling/src/LoadDiffCal.cpp index 3e81539db5f3d2120e17bbc91674e99c38a089d5..a75167db988a85a08dd7744d051363411fe98ccc 100644 --- a/Framework/DataHandling/src/LoadDiffCal.cpp +++ b/Framework/DataHandling/src/LoadDiffCal.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/LoadDiffCal.h" @@ -132,7 +132,7 @@ bool endswith(const std::string &str, const std::string &ending) { } void setGroupWSProperty(API::Algorithm *alg, const std::string &prefix, - GroupingWorkspace_sptr wksp) { + const GroupingWorkspace_sptr &wksp) { alg->declareProperty( std::make_unique<WorkspaceProperty<DataObjects::GroupingWorkspace>>( "OutputGroupingWorkspace", prefix + "_group", Direction::Output), @@ -141,7 +141,7 @@ void setGroupWSProperty(API::Algorithm *alg, const std::string &prefix, } void setMaskWSProperty(API::Algorithm *alg, const std::string &prefix, - MaskWorkspace_sptr wksp) { + const MaskWorkspace_sptr &wksp) { alg->declareProperty( std::make_unique<WorkspaceProperty<DataObjects::MaskWorkspace>>( "OutputMaskWorkspace", prefix + "_mask", Direction::Output), @@ -150,7 +150,7 @@ void setMaskWSProperty(API::Algorithm *alg, const std::string &prefix, } void setCalWSProperty(API::Algorithm *alg, const std::string &prefix, - ITableWorkspace_sptr wksp) { + const ITableWorkspace_sptr &wksp) { alg->declareProperty( std::make_unique<WorkspaceProperty<ITableWorkspace>>( "OutputCalWorkspace", prefix + "_cal", Direction::Output), diff --git a/Framework/DataHandling/src/LoadDspacemap.cpp b/Framework/DataHandling/src/LoadDspacemap.cpp index f4730178194b3a5cda9909fce19eccb1f3d6a8fb..6a5e8ac1596e0eaba40523dbd2684cf02addf649 100644 --- a/Framework/DataHandling/src/LoadDspacemap.cpp +++ b/Framework/DataHandling/src/LoadDspacemap.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/LoadDspacemap.h" #include "MantidAPI/FileProperty.h" @@ -95,8 +95,8 @@ void LoadDspacemap::exec() { * @param offsetsWS :: OffsetsWorkspace to be filled. */ void LoadDspacemap::CalculateOffsetsFromDSpacemapFile( - const std::string DFileName, - Mantid::DataObjects::OffsetsWorkspace_sptr offsetsWS) { + const std::string &DFileName, + const Mantid::DataObjects::OffsetsWorkspace_sptr &offsetsWS) { // Get a pointer to the instrument contained in the workspace const auto &detectorInfo = offsetsWS->detectorInfo(); @@ -150,7 +150,7 @@ const double CONSTANT = (PhysicalConstants::h * 1e10) / */ void LoadDspacemap::CalculateOffsetsFromVulcanFactors( std::map<detid_t, double> &vulcan, - Mantid::DataObjects::OffsetsWorkspace_sptr offsetsWS) { + const Mantid::DataObjects::OffsetsWorkspace_sptr &offsetsWS) { // Get a pointer to the instrument contained in the workspace // At this point, instrument VULCAN has been created? Instrument_const_sptr instrument = offsetsWS->getInstrument(); diff --git a/Framework/DataHandling/src/LoadEMU.cpp b/Framework/DataHandling/src/LoadEMU.cpp index 433cd332d037cd4971d9dbbb3f2376cc08db87e2..24443dec1cbed536bb6d8059bee27b62f3896c84 100644 --- a/Framework/DataHandling/src/LoadEMU.cpp +++ b/Framework/DataHandling/src/LoadEMU.cpp @@ -1,3 +1,9 @@ +// Mantid Repository : https://github.com/mantidproject/mantid +// +// Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS +// SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/LoadEMU.h" #include "MantidAPI/AnalysisDataService.h" @@ -674,7 +680,7 @@ void LoadEMU<FD>::exec(const std::string &hdfFile, // lambda to simplify loading instrument parameters auto instr = m_localWorkspace->getInstrument(); - auto iparam = [&instr](std::string tag) { + auto iparam = [&instr](const std::string &tag) { return instr->getNumberParameter(tag)[0]; }; @@ -684,7 +690,7 @@ void LoadEMU<FD>::exec(const std::string &hdfFile, // double sampleAnalyser = iparam("SampleAnalyser"); auto endID = static_cast<detid_t>(DETECTOR_TUBES * PIXELS_PER_TUBE); - for (detid_t detID = 0; detID < endID; detID++) + for (detid_t detID = 0; detID < endID; ++detID) updateNeutronicPostions(detID, sampleAnalyser); // get the detector map from raw input to a physical detector diff --git a/Framework/DataHandling/src/LoadEmptyInstrument.cpp b/Framework/DataHandling/src/LoadEmptyInstrument.cpp index a05786eac339d7d4a8b908329180b1a537ecd8af..4dd5da6febaca3ec2003de92767bb56171867e59 100644 --- a/Framework/DataHandling/src/LoadEmptyInstrument.cpp +++ b/Framework/DataHandling/src/LoadEmptyInstrument.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/LoadEmptyInstrument.h" #include "MantidAPI/FileProperty.h" diff --git a/Framework/DataHandling/src/LoadEventNexus.cpp b/Framework/DataHandling/src/LoadEventNexus.cpp index 1c458f0242c4c25ab917127ad08ac587780c07d5..61db89516575f4fe66cc477f89452e79a674ad10 100644 --- a/Framework/DataHandling/src/LoadEventNexus.cpp +++ b/Framework/DataHandling/src/LoadEventNexus.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/LoadEventNexus.h" #include "MantidAPI/Axis.h" @@ -1177,8 +1177,8 @@ bool LoadEventNexus::runLoadInstrument<EventWorkspaceCollection_sptr>( * @param workspace :: The workspace to contain the spectra mapping * @param bankNames :: Bank names that are in Nexus file */ -void LoadEventNexus::deleteBanks(EventWorkspaceCollection_sptr workspace, - std::vector<std::string> bankNames) { +void LoadEventNexus::deleteBanks(const EventWorkspaceCollection_sptr &workspace, + const std::vector<std::string> &bankNames) { Instrument_sptr inst = boost::const_pointer_cast<Instrument>( workspace->getInstrument()->baseInstrument()); // Build a list of Rectangular Detectors @@ -1537,7 +1537,7 @@ void LoadEventNexus::loadSampleDataISIScompatibility( * * @param fname name of the nexus file to open */ -void LoadEventNexus::safeOpenFile(const std::string fname) { +void LoadEventNexus::safeOpenFile(const std::string &fname) { try { m_file = std::make_unique<::NeXus::File>(m_filename, NXACC_READ); } catch (std::runtime_error &e) { diff --git a/Framework/DataHandling/src/LoadEventNexusIndexSetup.cpp b/Framework/DataHandling/src/LoadEventNexusIndexSetup.cpp index 6bf7d7dc2f585e436add5e941aaa590e8a023d74..6a3d324202792265dac3304d609c690b890fab27 100644 --- a/Framework/DataHandling/src/LoadEventNexusIndexSetup.cpp +++ b/Framework/DataHandling/src/LoadEventNexusIndexSetup.cpp @@ -1,11 +1,13 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + -#include "MantidDataHandling/LoadEventNexusIndexSetup.h" +#include <utility> + #include "MantidAPI/SpectrumDetectorMapping.h" +#include "MantidDataHandling/LoadEventNexusIndexSetup.h" #include "MantidGeometry/Instrument.h" #include "MantidGeometry/Instrument/ComponentInfo.h" #include "MantidGeometry/Instrument/DetectorInfo.h" @@ -42,10 +44,10 @@ void setupConsistentSpectrumNumbers(IndexInfo &filtered, LoadEventNexusIndexSetup::LoadEventNexusIndexSetup( MatrixWorkspace_const_sptr instrumentWorkspace, const int32_t min, - const int32_t max, const std::vector<int32_t> range, + const int32_t max, const std::vector<int32_t> &range, const Parallel::Communicator &communicator) - : m_instrumentWorkspace(instrumentWorkspace), m_min(min), m_max(max), - m_range(range), m_communicator(communicator) {} + : m_instrumentWorkspace(std::move(instrumentWorkspace)), m_min(min), + m_max(max), m_range(range), m_communicator(communicator) {} std::pair<int32_t, int32_t> LoadEventNexusIndexSetup::eventIDLimits() const { return {m_min, m_max}; diff --git a/Framework/DataHandling/src/LoadEventPreNexus2.cpp b/Framework/DataHandling/src/LoadEventPreNexus2.cpp index 3dac5b9551094d447bd40326cdb7a4630be2a74e..447ae3efef5c428fc26df9a69020bdf5283c27c6 100644 --- a/Framework/DataHandling/src/LoadEventPreNexus2.cpp +++ b/Framework/DataHandling/src/LoadEventPreNexus2.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/LoadEventPreNexus2.h" #include "MantidAPI/Axis.h" @@ -405,7 +405,7 @@ void LoadEventPreNexus2::exec() { /** Create and set up output Event Workspace */ void LoadEventPreNexus2::createOutputWorkspace( - const std::string event_filename) { + const std::string &event_filename) { // Create the output workspace localWorkspace = EventWorkspace_sptr(new EventWorkspace()); @@ -570,7 +570,7 @@ void LoadEventPreNexus2::processImbedLogs() { * @param mindex :: index of the log in pulse time ... * - mindex: index of the the series in the list */ -void LoadEventPreNexus2::addToWorkspaceLog(std::string logtitle, +void LoadEventPreNexus2::addToWorkspaceLog(const std::string &logtitle, size_t mindex) { // Create TimeSeriesProperty auto property = new TimeSeriesProperty<double>(logtitle); @@ -601,7 +601,8 @@ void LoadEventPreNexus2::addToWorkspaceLog(std::string logtitle, * geometry */ void LoadEventPreNexus2::runLoadInstrument( - const std::string &eventfilename, MatrixWorkspace_sptr localWorkspace) { + const std::string &eventfilename, + const MatrixWorkspace_sptr &localWorkspace) { // start by getting just the filename string instrument = Poco::Path(eventfilename).getFileName(); @@ -757,7 +758,6 @@ void LoadEventPreNexus2::procEvents( partWorkspaces.resize(numThreads); buffers.resize(numThreads); eventVectors = new EventVector_pt *[numThreads]; - // cppcheck-suppress syntaxError PRAGMA_OMP( parallel for if (parallelProcessing) ) for (int i = 0; i < int(numThreads); i++) { @@ -780,7 +780,7 @@ void LoadEventPreNexus2::procEvents( // value = pointer to the events vector eventVectors[i] = new EventVector_pt[detid_max + 1]; EventVector_pt *theseEventVectors = eventVectors[i]; - for (detid_t j = 0; j < detid_max + 1; j++) { + for (detid_t j = 0; j < detid_max + 1; ++j) { size_t wi = pixel_to_wkspindex[j]; // Save a POINTER to the vector<tofEvent> if (wi != static_cast<size_t>(-1)) @@ -1322,7 +1322,6 @@ void LoadEventPreNexus2::readPulseidFile(const std::string &filename, } if (num_pulses > 0) { - double temp; DateAndTime lastPulseDateTime(0, 0); this->pulsetimes.reserve(num_pulses); for (const auto &pulse : pulses) { @@ -1336,7 +1335,7 @@ void LoadEventPreNexus2::readPulseidFile(const std::string &filename, else lastPulseDateTime = pulseDateTime; - temp = pulse.pCurrent; + double temp = pulse.pCurrent; this->proton_charge.emplace_back(temp); if (temp < 0.) this->g_log.warning("Individual proton charge < 0 being ignored"); diff --git a/Framework/DataHandling/src/LoadFITS.cpp b/Framework/DataHandling/src/LoadFITS.cpp index 7b7cbdc4af6cfa80d8647222eb1c54df526a6140..57f2df40ce813f0c338daed43f07fa5eca0716d4 100644 --- a/Framework/DataHandling/src/LoadFITS.cpp +++ b/Framework/DataHandling/src/LoadFITS.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/LoadFITS.h" #include "MantidAPI/FileProperty.h" @@ -678,7 +678,7 @@ void LoadFITS::parseHeader(FITSInfo &headerInfo) { Workspace2D_sptr LoadFITS::makeWorkspace(const FITSInfo &fileInfo, size_t &newFileNumber, std::vector<char> &buffer, MantidImage &imageY, - MantidImage &imageE, const Workspace2D_sptr parent, + MantidImage &imageE, const Workspace2D_sptr &parent, bool loadAsRectImg, int binSize, double noiseThresh) { // Create workspace (taking into account already here if rebinning is // going to happen) @@ -763,9 +763,9 @@ LoadFITS::makeWorkspace(const FITSInfo &fileInfo, size_t &newFileNumber, * @param cmpp centimeters per pixel (already taking into account * possible rebinning) */ -void LoadFITS::addAxesInfoAndLogs(Workspace2D_sptr ws, bool loadAsRectImg, - const FITSInfo &fileInfo, int binSize, - double cmpp) { +void LoadFITS::addAxesInfoAndLogs(const Workspace2D_sptr &ws, + bool loadAsRectImg, const FITSInfo &fileInfo, + int binSize, double cmpp) { // add axes size_t width = fileInfo.axisPixelLengths[0] / binSize; size_t height = fileInfo.axisPixelLengths[1] / binSize; @@ -848,7 +848,7 @@ void LoadFITS::addAxesInfoAndLogs(Workspace2D_sptr ws, bool loadAsRectImg, * @throws std::runtime_error if there are file input issues */ void LoadFITS::readDataToWorkspace(const FITSInfo &fileInfo, double cmpp, - Workspace2D_sptr ws, + const Workspace2D_sptr &ws, std::vector<char> &buffer) { const size_t bytespp = (fileInfo.bitsPerPixel / 8); const size_t len = m_pixelCount * bytespp; diff --git a/Framework/DataHandling/src/LoadFullprofResolution.cpp b/Framework/DataHandling/src/LoadFullprofResolution.cpp index 371ee85edb9d4f59eca0af54b01d55b44b37c58f..085341074867ca897a0942efc1d6b0687ba5d347 100644 --- a/Framework/DataHandling/src/LoadFullprofResolution.cpp +++ b/Framework/DataHandling/src/LoadFullprofResolution.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/LoadFullprofResolution.h" #include "MantidAPI/FileProperty.h" @@ -240,7 +240,8 @@ void LoadFullprofResolution::exec() { * @param filename :: string for name of the .irf file * @param lines :: vector of strings for each non-empty line in .irf file */ -void LoadFullprofResolution::loadFile(string filename, vector<string> &lines) { +void LoadFullprofResolution::loadFile(const string &filename, + vector<string> &lines) { string line; // the variable of type ifstream: @@ -773,8 +774,8 @@ void LoadFullprofResolution::createBankToWorkspaceMap( * stored */ void LoadFullprofResolution::putParametersIntoWorkspace( - API::Column_const_sptr column, API::MatrixWorkspace_sptr ws, int nProf, - std::string ¶meterXMLString) { + const API::Column_const_sptr &column, const API::MatrixWorkspace_sptr &ws, + int nProf, std::string ¶meterXMLString) { // Get instrument name from matrix workspace std::string instrumentName = ws->getInstrument()->getName(); @@ -833,7 +834,7 @@ void LoadFullprofResolution::putParametersIntoWorkspace( * paramName is the name of the parameter as it appears in the table workspace */ void LoadFullprofResolution::addALFBEParameter( - const API::Column_const_sptr column, Poco::XML::Document *mDoc, + const API::Column_const_sptr &column, Poco::XML::Document *mDoc, Element *parent, const std::string ¶mName) { AutoPtr<Element> parameterElem = mDoc->createElement("parameter"); parameterElem->setAttribute("name", getXMLParameterName(paramName)); @@ -856,7 +857,7 @@ void LoadFullprofResolution::addALFBEParameter( * for the bank at the given column of the table workspace */ void LoadFullprofResolution::addSigmaParameters( - const API::Column_const_sptr column, Poco::XML::Document *mDoc, + const API::Column_const_sptr &column, Poco::XML::Document *mDoc, Poco::XML::Element *parent) { AutoPtr<Element> parameterElem = mDoc->createElement("parameter"); parameterElem->setAttribute("name", "IkedaCarpenterPV:SigmaSquared"); @@ -878,7 +879,7 @@ void LoadFullprofResolution::addSigmaParameters( * for the bank at the given column of the table workspace */ void LoadFullprofResolution::addGammaParameters( - const API::Column_const_sptr column, Poco::XML::Document *mDoc, + const API::Column_const_sptr &column, Poco::XML::Document *mDoc, Poco::XML::Element *parent) { AutoPtr<Element> parameterElem = mDoc->createElement("parameter"); parameterElem->setAttribute("name", "IkedaCarpenterPV:Gamma"); @@ -899,7 +900,7 @@ void LoadFullprofResolution::addGammaParameters( * for the bank at the given column of the table workspace */ void LoadFullprofResolution::addBBX_S_Parameters( - const API::Column_const_sptr column, Poco::XML::Document *mDoc, + const API::Column_const_sptr &column, Poco::XML::Document *mDoc, Poco::XML::Element *parent) { AutoPtr<Element> parameterElem = mDoc->createElement("parameter"); parameterElem->setAttribute("name", "BackToBackExponential:S"); @@ -923,7 +924,7 @@ void LoadFullprofResolution::addBBX_S_Parameters( * for the bank at the given column of the table workspace */ void LoadFullprofResolution::addBBX_A_Parameters( - const API::Column_const_sptr column, Poco::XML::Document *mDoc, + const API::Column_const_sptr &column, Poco::XML::Document *mDoc, Poco::XML::Element *parent) { AutoPtr<Element> parameterElem = mDoc->createElement("parameter"); parameterElem->setAttribute("name", "BackToBackExponential:A"); @@ -948,7 +949,7 @@ void LoadFullprofResolution::addBBX_A_Parameters( * for the bank at the given column of the table workspace */ void LoadFullprofResolution::addBBX_B_Parameters( - const API::Column_const_sptr column, Poco::XML::Document *mDoc, + const API::Column_const_sptr &column, Poco::XML::Document *mDoc, Poco::XML::Element *parent) { AutoPtr<Element> parameterElem = mDoc->createElement("parameter"); parameterElem->setAttribute("name", "BackToBackExponential:B"); @@ -992,7 +993,7 @@ LoadFullprofResolution::getXMLParameterName(const std::string &name) { * given the name of the parameter in the table workspace. */ std::string -LoadFullprofResolution::getXMLEqValue(const API::Column_const_sptr column, +LoadFullprofResolution::getXMLEqValue(const API::Column_const_sptr &column, const std::string &name) { size_t paramNumber = LoadFullprofResolution::m_rowNumbers[name]; // API::Column_const_sptr column = tablews->getColumn( columnIndex ); @@ -1006,7 +1007,7 @@ LoadFullprofResolution::getXMLEqValue(const API::Column_const_sptr column, * given the name of the parameter in the table workspace. */ std::string LoadFullprofResolution::getXMLSquaredEqValue( - const API::Column_const_sptr column, const std::string &name) { + const API::Column_const_sptr &column, const std::string &name) { size_t paramNumber = LoadFullprofResolution::m_rowNumbers[name]; // API::Column_const_sptr column = tablews->getColumn( columnIndex ); double eqValue = column->cell<double>(paramNumber); diff --git a/Framework/DataHandling/src/LoadGSASInstrumentFile.cpp b/Framework/DataHandling/src/LoadGSASInstrumentFile.cpp index 11bb6c6d6bda7080a3ce9697f10b052d4d27c9d4..e5174ebb212284c9e6c338c5620b925fcc701482 100644 --- a/Framework/DataHandling/src/LoadGSASInstrumentFile.cpp +++ b/Framework/DataHandling/src/LoadGSASInstrumentFile.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/LoadGSASInstrumentFile.h" #include "MantidAPI/FileProperty.h" @@ -214,7 +214,8 @@ void LoadGSASInstrumentFile::exec() { * @param filename :: string for name of the .prm file * @param lines :: vector of strings for each non-empty line in .prm file */ -void LoadGSASInstrumentFile::loadFile(string filename, vector<string> &lines) { +void LoadGSASInstrumentFile::loadFile(const string &filename, + vector<string> &lines) { string line; // the variable of type ifstream: @@ -254,7 +255,7 @@ LoadGSASInstrumentFile::getHistogramType(const vector<string> &lines) { // We assume there is just one HTYPE line, look for it from beginning and // return its value. std::string lookFor = "INS HTYPE"; - for (size_t i = 0; i <= lines.size(); ++i) { + for (size_t i = 0; i < lines.size(); ++i) { if (lines[i].substr(0, lookFor.size()) == lookFor) { if (lines[i].size() < lookFor.size() + 7) { // line too short @@ -274,7 +275,7 @@ size_t LoadGSASInstrumentFile::getNumberOfBanks(const vector<string> &lines) { // We assume there is just one BANK line, look for it from beginning and // return its value. std::string lookFor = "INS BANK"; - for (size_t i = 0; i <= lines.size(); ++i) { + for (size_t i = 0; i < lines.size(); ++i) { if (lines[i].substr(0, lookFor.size()) == lookFor) { if (lines[i].size() < lookFor.size() + 3) { // line too short diff --git a/Framework/DataHandling/src/LoadGSS.cpp b/Framework/DataHandling/src/LoadGSS.cpp index 7c8e64ca991c6c202e197a2399cb03aacba917e4..4456422c817533eb8153a6675f21cb9e1d74e3e4 100644 --- a/Framework/DataHandling/src/LoadGSS.cpp +++ b/Framework/DataHandling/src/LoadGSS.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //--------------------------------------------------- // Includes @@ -488,7 +488,7 @@ double LoadGSS::convertToDouble(std::string inputstring) { /** Create the instrument geometry with Instrument */ void LoadGSS::createInstrumentGeometry( - MatrixWorkspace_sptr workspace, const std::string &instrumentname, + const MatrixWorkspace_sptr &workspace, const std::string &instrumentname, const double &primaryflightpath, const std::vector<int> &detectorids, const std::vector<double> &totalflightpaths, const std::vector<double> &twothetas) { diff --git a/Framework/DataHandling/src/LoadGeometry.cpp b/Framework/DataHandling/src/LoadGeometry.cpp index dfdec036a23846d9d9de243c52ee01bdf1dc2cba..fd5fedf95434363f47655e6991444ef54d3016d1 100644 --- a/Framework/DataHandling/src/LoadGeometry.cpp +++ b/Framework/DataHandling/src/LoadGeometry.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/LoadGeometry.h" #include "MantidKernel/FileDescriptor.h" diff --git a/Framework/DataHandling/src/LoadHFIRSANS.cpp b/Framework/DataHandling/src/LoadHFIRSANS.cpp index f1e86e0da34f44707ca679d0953b454b9b961b6d..b21a243dae1a18010545daaee2cf1225917d326c 100644 --- a/Framework/DataHandling/src/LoadHFIRSANS.cpp +++ b/Framework/DataHandling/src/LoadHFIRSANS.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/LoadHFIRSANS.h" #include "MantidAPI/AlgorithmFactory.h" diff --git a/Framework/DataHandling/src/LoadHelper.cpp b/Framework/DataHandling/src/LoadHelper.cpp index 1985372614b22053e8aa3975c0d9b1132841b254..6461e0fa1ecee7e18c16136c0dd3847c87c9d370 100644 --- a/Framework/DataHandling/src/LoadHelper.cpp +++ b/Framework/DataHandling/src/LoadHelper.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /* * Helper file to gather common routines to the Loaders @@ -119,7 +119,7 @@ double LoadHelper::calculateTOF(double distance, double wavelength) { */ double LoadHelper::getInstrumentProperty(const API::MatrixWorkspace_sptr &workspace, - std::string s) { + const std::string &s) { std::vector<std::string> prop = workspace->getInstrument()->getStringParameter(s); if (prop.empty()) { @@ -509,7 +509,7 @@ void LoadHelper::dumpNexusAttributes(NXhandle nxfileID, * @param dateToParse :: date as string * @return date as required in Mantid */ -std::string LoadHelper::dateTimeInIsoFormat(std::string dateToParse) { +std::string LoadHelper::dateTimeInIsoFormat(const std::string &dateToParse) { namespace bt = boost::posix_time; // parsing format const std::locale format = std::locale( @@ -535,7 +535,7 @@ std::string LoadHelper::dateTimeInIsoFormat(std::string dateToParse) { * @param componentName The name of the component of the instrument * @param newPos New position of the component */ -void LoadHelper::moveComponent(API::MatrixWorkspace_sptr ws, +void LoadHelper::moveComponent(const API::MatrixWorkspace_sptr &ws, const std::string &componentName, const V3D &newPos) { Geometry::IComponent_const_sptr component = @@ -557,7 +557,7 @@ void LoadHelper::moveComponent(API::MatrixWorkspace_sptr ws, * @param rot Rotations defined by setting a quaternion from an angle in degrees * and an axis */ -void LoadHelper::rotateComponent(API::MatrixWorkspace_sptr ws, +void LoadHelper::rotateComponent(const API::MatrixWorkspace_sptr &ws, const std::string &componentName, const Kernel::Quat &rot) { Geometry::IComponent_const_sptr component = @@ -578,7 +578,7 @@ void LoadHelper::rotateComponent(API::MatrixWorkspace_sptr ws, * @param componentName The Name of the component of the instrument * @return The position of the component */ -V3D LoadHelper::getComponentPosition(API::MatrixWorkspace_sptr ws, +V3D LoadHelper::getComponentPosition(const API::MatrixWorkspace_sptr &ws, const std::string &componentName) { Geometry::IComponent_const_sptr component = ws->getInstrument()->getComponentByName(componentName); diff --git a/Framework/DataHandling/src/LoadIDFFromNexus.cpp b/Framework/DataHandling/src/LoadIDFFromNexus.cpp index 3d83827d602e23363b153bc22200f6d17cd418f4..e4110c861240910b55f90ff5f918f46c64ee40c7 100644 --- a/Framework/DataHandling/src/LoadIDFFromNexus.cpp +++ b/Framework/DataHandling/src/LoadIDFFromNexus.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/LoadIDFFromNexus.h" #include "MantidAPI/FileProperty.h" @@ -271,7 +271,7 @@ void LoadIDFFromNexus::readParameterCorrectionFile( * @throw FileError Thrown if unable to parse XML file */ void LoadIDFFromNexus::LoadParameters( - ::NeXus::File *nxfile, const MatrixWorkspace_sptr localWorkspace) { + ::NeXus::File *nxfile, const MatrixWorkspace_sptr &localWorkspace) { std::string parameterString; @@ -314,7 +314,7 @@ void LoadIDFFromNexus::LoadParameters( // given workspace, returning success. bool LoadIDFFromNexus::loadParameterFile( const std::string &fullPathName, - const MatrixWorkspace_sptr localWorkspace) { + const MatrixWorkspace_sptr &localWorkspace) { try { // load and also populate instrument parameters from this 'fallback' diff --git a/Framework/DataHandling/src/LoadILLDiffraction.cpp b/Framework/DataHandling/src/LoadILLDiffraction.cpp index 0295cf68436f14c27afdb390b075297f7c437c1a..c89ad71a52ec4102c53730137f98610ef684d585 100644 --- a/Framework/DataHandling/src/LoadILLDiffraction.cpp +++ b/Framework/DataHandling/src/LoadILLDiffraction.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/LoadILLDiffraction.h" #include "MantidAPI/FileProperty.h" diff --git a/Framework/DataHandling/src/LoadILLIndirect2.cpp b/Framework/DataHandling/src/LoadILLIndirect2.cpp index ce72fbb1cb71973d5289162ccfaeb19a867e4146..80aa732d8839dcef9dd7d69eba521e956598ef69 100644 --- a/Framework/DataHandling/src/LoadILLIndirect2.cpp +++ b/Framework/DataHandling/src/LoadILLIndirect2.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/LoadILLIndirect2.h" #include "MantidAPI/Axis.h" @@ -271,7 +271,7 @@ void LoadILLIndirect2::loadDataIntoTheWorkSpace(NeXus::NXEntry &entry) { * @param nexusfilename */ void LoadILLIndirect2::loadNexusEntriesIntoProperties( - std::string nexusfilename) { + const std::string &nexusfilename) { API::Run &runDetails = m_localWorkspace->mutableRun(); diff --git a/Framework/DataHandling/src/LoadILLPolarizationFactors.cpp b/Framework/DataHandling/src/LoadILLPolarizationFactors.cpp index 1be1064d3740b30e7263d5847fdd672e4ff42db1..0d2f3f16d31489e0bcc1e0f8bc2c5f180592dfc5 100644 --- a/Framework/DataHandling/src/LoadILLPolarizationFactors.cpp +++ b/Framework/DataHandling/src/LoadILLPolarizationFactors.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/LoadILLPolarizationFactors.h" diff --git a/Framework/DataHandling/src/LoadILLReflectometry.cpp b/Framework/DataHandling/src/LoadILLReflectometry.cpp index 30390ef3ea4a52ac45aa7f4284ad3543a9c3049c..798119a6b915b66f1756ad932a6ba58a5ffdaaf8 100644 --- a/Framework/DataHandling/src/LoadILLReflectometry.cpp +++ b/Framework/DataHandling/src/LoadILLReflectometry.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/LoadILLReflectometry.h" diff --git a/Framework/DataHandling/src/LoadILLSANS.cpp b/Framework/DataHandling/src/LoadILLSANS.cpp index a906eb7e610a1376c4c6d9575953ca4b8ffed4d3..348f3900a5987810d392239376f433079adced2e 100644 --- a/Framework/DataHandling/src/LoadILLSANS.cpp +++ b/Framework/DataHandling/src/LoadILLSANS.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/LoadILLSANS.h" #include "MantidAPI/Axis.h" diff --git a/Framework/DataHandling/src/LoadILLTOF2.cpp b/Framework/DataHandling/src/LoadILLTOF2.cpp index bfca4327a809f6f869cb5d8ed646748b71a26047..8fdefe0b00a76226613db9c027599b60b0ce7cd5 100644 --- a/Framework/DataHandling/src/LoadILLTOF2.cpp +++ b/Framework/DataHandling/src/LoadILLTOF2.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/LoadILLTOF2.h" diff --git a/Framework/DataHandling/src/LoadISISNexus2.cpp b/Framework/DataHandling/src/LoadISISNexus2.cpp index b05477979af60eb6de989bedf580372b28a95bfa..abebe9c0e77ed172113684b4e6c01ec485b49294 100644 --- a/Framework/DataHandling/src/LoadISISNexus2.cpp +++ b/Framework/DataHandling/src/LoadISISNexus2.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes @@ -459,7 +459,7 @@ Check for a set of synthetic logs associated with multi-period log data. Raise warnings where necessary. */ void LoadISISNexus2::validateMultiPeriodLogs( - Mantid::API::MatrixWorkspace_sptr ws) { + const Mantid::API::MatrixWorkspace_sptr &ws) { const Run &run = ws->run(); if (!run.hasProperty("current_period")) { g_log.warning("Workspace has no current_period log."); diff --git a/Framework/DataHandling/src/LoadISISPolarizationEfficiencies.cpp b/Framework/DataHandling/src/LoadISISPolarizationEfficiencies.cpp index 78c3bf2ffa592f8129837692a4ee22f96f9c7b1b..6888e6dc9914e5ad1986a9a0e1c87e8ec795d55a 100644 --- a/Framework/DataHandling/src/LoadISISPolarizationEfficiencies.cpp +++ b/Framework/DataHandling/src/LoadISISPolarizationEfficiencies.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/LoadISISPolarizationEfficiencies.h" diff --git a/Framework/DataHandling/src/LoadInstrument.cpp b/Framework/DataHandling/src/LoadInstrument.cpp index 49a75fac9cabf6cfa528a9f05eda872991d16237..4274685e262fcc20afe59aec5d0192e266ee2834 100644 --- a/Framework/DataHandling/src/LoadInstrument.cpp +++ b/Framework/DataHandling/src/LoadInstrument.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/LoadInstrument.h" #include "MantidAPI/FileProperty.h" @@ -255,7 +255,8 @@ void LoadInstrument::exec() { //----------------------------------------------------------------------------------------------------------------------- /// Run the Child Algorithm LoadInstrument (or LoadInstrumentFromRaw) void LoadInstrument::runLoadParameterFile( - const boost::shared_ptr<API::MatrixWorkspace> &ws, std::string filename) { + const boost::shared_ptr<API::MatrixWorkspace> &ws, + const std::string &filename) { g_log.debug("Loading the parameter definition..."); // First search for XML parameter file in same folder as IDF file @@ -311,8 +312,9 @@ void LoadInstrument::runLoadParameterFile( /// Search the directory for the Parameter IDF file and return full path name if /// found, else return "". // directoryName must include a final '/'. -std::string LoadInstrument::getFullPathParamIDF(std::string directoryName, - std::string filename) { +std::string +LoadInstrument::getFullPathParamIDF(const std::string &directoryName, + const std::string &filename) { Poco::Path directoryPath(directoryName); directoryPath.makeDirectory(); // Remove the path from the filename diff --git a/Framework/DataHandling/src/LoadInstrumentFromNexus.cpp b/Framework/DataHandling/src/LoadInstrumentFromNexus.cpp index b87252277d7b4688f244780a3b6e8d3c3e470f37..a6659322a911a3f94d4b3b2d96a62571f5933db0 100644 --- a/Framework/DataHandling/src/LoadInstrumentFromNexus.cpp +++ b/Framework/DataHandling/src/LoadInstrumentFromNexus.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/DataHandling/src/LoadInstrumentFromRaw.cpp b/Framework/DataHandling/src/LoadInstrumentFromRaw.cpp index d99d9810286f60136c5c2ab5145a66ca208a3b0b..9f23d53ba167a902fe36a076f7e7ad0f99c0407f 100644 --- a/Framework/DataHandling/src/LoadInstrumentFromRaw.cpp +++ b/Framework/DataHandling/src/LoadInstrumentFromRaw.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/DataHandling/src/LoadIsawDetCal.cpp b/Framework/DataHandling/src/LoadIsawDetCal.cpp index b2771173b1f9acfbb934d6134c98caa5c801055d..4c8e0c67a366277621c990efbbcf8e4be04e5b72 100644 --- a/Framework/DataHandling/src/LoadIsawDetCal.cpp +++ b/Framework/DataHandling/src/LoadIsawDetCal.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/LoadIsawDetCal.h" @@ -29,6 +29,7 @@ #include <fstream> #include <numeric> #include <sstream> +#include <utility> namespace Mantid { namespace DataHandling { @@ -74,7 +75,7 @@ std::string getBankName(const std::string &bankPart, const int idnum) { } } -std::string getInstName(API::Workspace_const_sptr wksp) { +std::string getInstName(const API::Workspace_const_sptr &wksp) { MatrixWorkspace_const_sptr matrixWksp = boost::dynamic_pointer_cast<const MatrixWorkspace>(wksp); if (matrixWksp) { @@ -352,10 +353,11 @@ void LoadIsawDetCal::exec() { * @param componentInfo :: The component info object for the workspace */ void LoadIsawDetCal::center(const double x, const double y, const double z, - const std::string &detname, API::Workspace_sptr ws, + const std::string &detname, + const API::Workspace_sptr &ws, Geometry::ComponentInfo &componentInfo) { - Instrument_sptr inst = getCheckInst(ws); + Instrument_sptr inst = getCheckInst(std::move(ws)); IComponent_const_sptr comp = inst->getComponentByName(detname); if (comp == nullptr) { @@ -378,7 +380,7 @@ void LoadIsawDetCal::center(const double x, const double y, const double z, * @throw std::runtime_error if there's any problem with the workspace or it is * not possible to get an instrument object from it */ -Instrument_sptr LoadIsawDetCal::getCheckInst(API::Workspace_sptr ws) { +Instrument_sptr LoadIsawDetCal::getCheckInst(const API::Workspace_sptr &ws) { MatrixWorkspace_sptr inputW = boost::dynamic_pointer_cast<MatrixWorkspace>(ws); PeaksWorkspace_sptr inputP = boost::dynamic_pointer_cast<PeaksWorkspace>(ws); @@ -432,7 +434,7 @@ std::vector<std::string> LoadIsawDetCal::getFilenames() { * @param doWishCorrection if true apply a special correction for WISH */ void LoadIsawDetCal::doRotation(V3D rX, V3D rY, ComponentInfo &componentInfo, - boost::shared_ptr<const IComponent> comp, + const boost::shared_ptr<const IComponent> &comp, bool doWishCorrection) { // These are the ISAW axes rX.normalize(); diff --git a/Framework/DataHandling/src/LoadLLB.cpp b/Framework/DataHandling/src/LoadLLB.cpp index 608031e8613d9f1bace7e7df9f752b334e5e732a..8b98880899cf437e853daf64d2f9ae55fdcd3fe2 100644 --- a/Framework/DataHandling/src/LoadLLB.cpp +++ b/Framework/DataHandling/src/LoadLLB.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/LoadLLB.h" #include "MantidAPI/Axis.h" @@ -149,9 +149,6 @@ void LoadLLB::initWorkSpace(NeXus::NXEntry &entry) { m_localWorkspace->setYUnitLabel("Counts"); } -/** - * - */ void LoadLLB::loadTimeDetails(NeXus::NXEntry &entry) { m_wavelength = entry.getFloat("nxbeam/incident_wavelength"); diff --git a/Framework/DataHandling/src/LoadLog.cpp b/Framework/DataHandling/src/LoadLog.cpp index 039ad3a6693db773b60e7d55adc914ac4b293efc..c771655cb7074ad72a821c71a55a2f2ba7b81172 100644 --- a/Framework/DataHandling/src/LoadLog.cpp +++ b/Framework/DataHandling/src/LoadLog.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes @@ -28,6 +28,7 @@ #include <boost/algorithm/string.hpp> #include <fstream> // used to get ifstream #include <sstream> +#include <utility> using Mantid::Types::Core::DateAndTime; @@ -202,8 +203,8 @@ void LoadLog::loadTwoColumnLogFile(std::ifstream &logFileStream, } try { - Property *log = - LogParser::createLogProperty(m_filename, stringToLower(logFileName)); + Property *log = LogParser::createLogProperty( + m_filename, stringToLower(std::move(logFileName))); if (log) { run.addLogData(log); } @@ -220,7 +221,8 @@ void LoadLog::loadTwoColumnLogFile(std::ifstream &logFileStream, * @param run :: The run information object */ void LoadLog::loadThreeColumnLogFile(std::ifstream &logFileStream, - std::string logFileName, API::Run &run) { + const std::string &logFileName, + API::Run &run) { std::string str; std::string propname; std::map<std::string, std::unique_ptr<Kernel::TimeSeriesProperty<double>>> diff --git a/Framework/DataHandling/src/LoadMLZ.cpp b/Framework/DataHandling/src/LoadMLZ.cpp index 46e856275e2029d8cd76fdee1cbfea7e1a8f2698..97410d411f414704605010f210c76c37bd441b23 100644 --- a/Framework/DataHandling/src/LoadMLZ.cpp +++ b/Framework/DataHandling/src/LoadMLZ.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/LoadMLZ.h" #include "MantidAPI/Axis.h" diff --git a/Framework/DataHandling/src/LoadMappingTable.cpp b/Framework/DataHandling/src/LoadMappingTable.cpp index 2a40d6efb2e356095769517c400d91f84e9a54cf..a0baad281702a3e2f679e78b538dadf1277dda8f 100644 --- a/Framework/DataHandling/src/LoadMappingTable.cpp +++ b/Framework/DataHandling/src/LoadMappingTable.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/LoadMappingTable.h" #include "LoadRaw/isisraw2.h" diff --git a/Framework/DataHandling/src/LoadMask.cpp b/Framework/DataHandling/src/LoadMask.cpp index f37e142eb35d2586e0fafd71f00280ef3cabd8c9..184f01d96791dc7a3e3e65e61a6e233a3d8f8ac6 100644 --- a/Framework/DataHandling/src/LoadMask.cpp +++ b/Framework/DataHandling/src/LoadMask.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/LoadMask.h" #include "MantidAPI/FileFinder.h" diff --git a/Framework/DataHandling/src/LoadMcStas.cpp b/Framework/DataHandling/src/LoadMcStas.cpp index 95f7fc732c5562c4cb7aac192ea69661b38d50df..9635cef5addfb13c4f3fdfcf0477f619b7788235 100644 --- a/Framework/DataHandling/src/LoadMcStas.cpp +++ b/Framework/DataHandling/src/LoadMcStas.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/LoadMcStas.h" #include "MantidAPI/AlgorithmManager.h" diff --git a/Framework/DataHandling/src/LoadMcStasNexus.cpp b/Framework/DataHandling/src/LoadMcStasNexus.cpp index f3e0705c26d5288b588e31d3ff2805c83ba22152..85c61c152b0a620e5b080bd0ac910324c82e3e7d 100644 --- a/Framework/DataHandling/src/LoadMcStasNexus.cpp +++ b/Framework/DataHandling/src/LoadMcStasNexus.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/LoadMcStasNexus.h" #include "MantidAPI/FileProperty.h" diff --git a/Framework/DataHandling/src/LoadMuonLog.cpp b/Framework/DataHandling/src/LoadMuonLog.cpp index 4b41ff77cc4b17b4b650906e2d142da3fb74b467..fc591ae00c50a6554067ce42dd3b0d90ab8dde88 100644 --- a/Framework/DataHandling/src/LoadMuonLog.cpp +++ b/Framework/DataHandling/src/LoadMuonLog.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/LoadMuonLog.h" #include "MantidAPI/FileProperty.h" diff --git a/Framework/DataHandling/src/LoadMuonNexus.cpp b/Framework/DataHandling/src/LoadMuonNexus.cpp index 0e318418510be27650bd46acc6006ed945f31d07..214b258eb14a4fd68fb99f1dff7e599ef112ccc0 100644 --- a/Framework/DataHandling/src/LoadMuonNexus.cpp +++ b/Framework/DataHandling/src/LoadMuonNexus.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes @@ -152,7 +152,7 @@ void LoadMuonNexus::checkOptionalProperties() { /// Run the Child Algorithm LoadInstrument void LoadMuonNexus::runLoadInstrument( - DataObjects::Workspace2D_sptr localWorkspace) { + const DataObjects::Workspace2D_sptr &localWorkspace) { IAlgorithm_sptr loadInst = createChildAlgorithm("LoadInstrument"); diff --git a/Framework/DataHandling/src/LoadMuonNexus1.cpp b/Framework/DataHandling/src/LoadMuonNexus1.cpp index 22ed23222941768b0ec18eaaf4fcb3785c058b34..77aac4add36dd6b1ac04b5939ccd21f36d4c1a35 100644 --- a/Framework/DataHandling/src/LoadMuonNexus1.cpp +++ b/Framework/DataHandling/src/LoadMuonNexus1.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/LoadMuonNexus1.h" @@ -448,9 +448,8 @@ void LoadMuonNexus1::loadDeadTimes(NXRoot &root) { * @param inst :: Pointer to instrument (to use if IDF needed) * @returns :: Grouping table - or tables, if per period */ -Workspace_sptr -LoadMuonNexus1::loadDetectorGrouping(NXRoot &root, - Geometry::Instrument_const_sptr inst) { +Workspace_sptr LoadMuonNexus1::loadDetectorGrouping( + NXRoot &root, const Geometry::Instrument_const_sptr &inst) { NXEntry dataEntry = root.openEntry("run/histogram_data_1"); NXInfo infoGrouping = dataEntry.getDataSetInfo("grouping"); @@ -660,9 +659,10 @@ LoadMuonNexus1::createDetectorGroupingTable(std::vector<int> specToLoad, * @param localWorkspace :: A pointer to the workspace in which the data will * be stored */ -void LoadMuonNexus1::loadData(size_t hist, specnum_t &i, specnum_t specNo, - MuonNexusReader &nxload, const int64_t lengthIn, - DataObjects::Workspace2D_sptr localWorkspace) { +void LoadMuonNexus1::loadData( + size_t hist, specnum_t &i, specnum_t specNo, MuonNexusReader &nxload, + const int64_t lengthIn, + const DataObjects::Workspace2D_sptr &localWorkspace) { // Read in a spectrum // Put it into a vector, discarding the 1st entry, which is rubbish // But note that the last (overflow) bin is kept @@ -689,7 +689,7 @@ void LoadMuonNexus1::loadData(size_t hist, specnum_t &i, specnum_t specNo, * @param localWorkspace :: The workspace details to use */ void LoadMuonNexus1::loadRunDetails( - DataObjects::Workspace2D_sptr localWorkspace) { + const DataObjects::Workspace2D_sptr &localWorkspace) { API::Run &runDetails = localWorkspace->mutableRun(); runDetails.addProperty("run_title", localWorkspace->getTitle(), true); @@ -737,7 +737,8 @@ void LoadMuonNexus1::loadRunDetails( } /// Run the LoadLog Child Algorithm -void LoadMuonNexus1::runLoadLog(DataObjects::Workspace2D_sptr localWorkspace) { +void LoadMuonNexus1::runLoadLog( + const DataObjects::Workspace2D_sptr &localWorkspace) { IAlgorithm_sptr loadLog = createChildAlgorithm("LoadMuonLog"); // Pass through the same input filename loadLog->setPropertyValue("Filename", m_filename); @@ -791,8 +792,8 @@ void LoadMuonNexus1::runLoadLog(DataObjects::Workspace2D_sptr localWorkspace) { * @param localWorkspace A workspace to add the log to. * @param period A period for this workspace. */ -void LoadMuonNexus1::addPeriodLog(DataObjects::Workspace2D_sptr localWorkspace, - int64_t period) { +void LoadMuonNexus1::addPeriodLog( + const DataObjects::Workspace2D_sptr &localWorkspace, int64_t period) { auto &run = localWorkspace->mutableRun(); ISISRunLogs runLogs(run); if (period == 0) { @@ -803,8 +804,9 @@ void LoadMuonNexus1::addPeriodLog(DataObjects::Workspace2D_sptr localWorkspace, } } -void LoadMuonNexus1::addGoodFrames(DataObjects::Workspace2D_sptr localWorkspace, - int64_t period, int nperiods) { +void LoadMuonNexus1::addGoodFrames( + const DataObjects::Workspace2D_sptr &localWorkspace, int64_t period, + int nperiods) { // Get handle to nexus file ::NeXus::File handle(m_filename, NXACC_READ); diff --git a/Framework/DataHandling/src/LoadMuonNexus2.cpp b/Framework/DataHandling/src/LoadMuonNexus2.cpp index 58ad6f2b99c267a5287c21a39bf712dae8c97708..d1e1ba3e54aa154699164c648b60bfefa5332301 100644 --- a/Framework/DataHandling/src/LoadMuonNexus2.cpp +++ b/Framework/DataHandling/src/LoadMuonNexus2.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/LoadMuonNexus2.h" #include "MantidAPI/Axis.h" @@ -335,8 +335,8 @@ Histogram LoadMuonNexus2::loadData(const BinEdges &edges, * @param entry :: The Nexus entry * @param period :: The period of this workspace */ -void LoadMuonNexus2::loadLogs(API::MatrixWorkspace_sptr ws, NXEntry &entry, - int period) { +void LoadMuonNexus2::loadLogs(const API::MatrixWorkspace_sptr &ws, + NXEntry &entry, int period) { // Avoid compiler warning (void)period; @@ -373,7 +373,7 @@ void LoadMuonNexus2::loadLogs(API::MatrixWorkspace_sptr ws, NXEntry &entry, * @param localWorkspace :: The workspace details to use */ void LoadMuonNexus2::loadRunDetails( - DataObjects::Workspace2D_sptr localWorkspace) { + const DataObjects::Workspace2D_sptr &localWorkspace) { API::Run &runDetails = localWorkspace->mutableRun(); runDetails.addProperty("run_title", localWorkspace->getTitle(), true); diff --git a/Framework/DataHandling/src/LoadNGEM.cpp b/Framework/DataHandling/src/LoadNGEM.cpp index ae3d23afd9344255d42a255923a2cbab6e0afddb..691a7a43075ca8c5bf5d08239471fb7e4a91b7d8 100644 --- a/Framework/DataHandling/src/LoadNGEM.cpp +++ b/Framework/DataHandling/src/LoadNGEM.cpp @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #include "MantidDataHandling/LoadNGEM.h" #include "MantidAPI/Axis.h" #include "MantidAPI/MultipleFileProperty.h" diff --git a/Framework/DataHandling/src/LoadNXSPE.cpp b/Framework/DataHandling/src/LoadNXSPE.cpp index 3229303962b3bda6daf0ebf5847169b506f49ce3..d574160974ec110053d45bc50f15e4d6f149e02a 100644 --- a/Framework/DataHandling/src/LoadNXSPE.cpp +++ b/Framework/DataHandling/src/LoadNXSPE.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/LoadNXSPE.h" #include "MantidAPI/ExperimentInfo.h" @@ -353,10 +353,13 @@ void LoadNXSPE::exec() { boost::shared_ptr<Geometry::CSGObject> LoadNXSPE::createCuboid(double dx, double dy, double dz) { + UNUSED_ARG(dx) + UNUSED_ARG(dy) + UNUSED_ARG(dz) - dx = 0.5 * std::fabs(dx); - dy = 0.5 * std::fabs(dy); - dz = 0.5 * std::fabs(dz); + // dx = 0.5 * std::fabs(dx); + // dy = 0.5 * std::fabs(dy); + // dz = 0.5 * std::fabs(dz); /* std::stringstream planeName; diff --git a/Framework/DataHandling/src/LoadNXcanSAS.cpp b/Framework/DataHandling/src/LoadNXcanSAS.cpp index a7a6631ab87fd66c7b1cf2ec7d5aac62616afee0..b1cc42fb7c8f0167dcb990305bd0e32ee707788c 100644 --- a/Framework/DataHandling/src/LoadNXcanSAS.cpp +++ b/Framework/DataHandling/src/LoadNXcanSAS.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/LoadNXcanSAS.h" #include "MantidAPI/AlgorithmManager.h" @@ -106,7 +106,8 @@ createWorkspaceForHistogram(H5::DataSet &dataSet) { // ----- LOGS -void loadLogs(H5::Group &entry, Mantid::API::MatrixWorkspace_sptr workspace) { +void loadLogs(H5::Group &entry, + const Mantid::API::MatrixWorkspace_sptr &workspace) { auto &run = workspace->mutableRun(); // Load UserFile (optional) @@ -133,7 +134,7 @@ void loadLogs(H5::Group &entry, Mantid::API::MatrixWorkspace_sptr workspace) { } // ----- INSTRUMENT -std::string extractIdfFileOnCurrentSystem(std::string idf) { +std::string extractIdfFileOnCurrentSystem(const std::string &idf) { // If the idf is is not empty extract the last element from the file if (idf.empty()) { return ""; @@ -161,7 +162,7 @@ std::string extractIdfFileOnCurrentSystem(std::string idf) { } void loadInstrument(H5::Group &entry, - Mantid::API::MatrixWorkspace_sptr workspace) { + const Mantid::API::MatrixWorkspace_sptr &workspace) { auto instrument = entry.openGroup(sasInstrumentGroupName); // Get instrument name @@ -232,7 +233,7 @@ bool hasQDev(H5::Group &dataGroup) { } void loadData1D(H5::Group &dataGroup, - Mantid::API::MatrixWorkspace_sptr workspace) { + const Mantid::API::MatrixWorkspace_sptr &workspace) { // General workspace->setDistribution(true); @@ -268,7 +269,7 @@ void loadData1D(H5::Group &dataGroup, template <typename Functor> void read2DWorkspace(H5::DataSet &dataSet, Mantid::API::MatrixWorkspace_sptr workspace, Functor func, - H5::DataType memoryDataType) { + const H5::DataType &memoryDataType) { using namespace Mantid::DataHandling::NXcanSAS; auto dimInfo = getDataSpaceInfo(dataSet); @@ -297,8 +298,8 @@ void read2DWorkspace(H5::DataSet &dataSet, } void readQyInto2DWorkspace(H5::DataSet &dataSet, - Mantid::API::MatrixWorkspace_sptr workspace, - H5::DataType memoryDataType) { + const Mantid::API::MatrixWorkspace_sptr &workspace, + const H5::DataType &memoryDataType) { using namespace Mantid::DataHandling::NXcanSAS; // Get info about the data set @@ -342,13 +343,13 @@ void readQyInto2DWorkspace(H5::DataSet &dataSet, } void loadData2D(H5::Group &dataGroup, - Mantid::API::MatrixWorkspace_sptr workspace) { + const Mantid::API::MatrixWorkspace_sptr &workspace) { // General workspace->setDistribution(true); //----------------------------------------- // Load the I value. auto iDataSet = dataGroup.openDataSet(sasDataI); - auto iExtractor = [](Mantid::API::MatrixWorkspace_sptr ws, + auto iExtractor = [](const Mantid::API::MatrixWorkspace_sptr &ws, size_t index) -> HistogramY & { return ws->mutableY(index); }; @@ -360,7 +361,7 @@ void loadData2D(H5::Group &dataGroup, //----------------------------------------- // Load the Idev value auto eDataSet = dataGroup.openDataSet(sasDataIdev); - auto eExtractor = [](Mantid::API::MatrixWorkspace_sptr ws, + auto eExtractor = [](const Mantid::API::MatrixWorkspace_sptr &ws, size_t index) -> HistogramE & { return ws->mutableE(index); }; @@ -369,7 +370,7 @@ void loadData2D(H5::Group &dataGroup, //----------------------------------------- // Load the Qx value + units auto qxDataSet = dataGroup.openDataSet(sasDataQx); - auto qxExtractor = [](Mantid::API::MatrixWorkspace_sptr ws, + auto qxExtractor = [](const Mantid::API::MatrixWorkspace_sptr &ws, size_t index) -> HistogramX & { return ws->mutableX(index); }; @@ -384,7 +385,8 @@ void loadData2D(H5::Group &dataGroup, readQyInto2DWorkspace(qyDataSet, workspace, qyDataType); } -void loadData(H5::Group &entry, Mantid::API::MatrixWorkspace_sptr workspace) { +void loadData(H5::Group &entry, + const Mantid::API::MatrixWorkspace_sptr &workspace) { auto dataGroup = entry.openGroup(sasDataGroupName); auto dimensionality = getWorkspaceDimensionality(dataGroup); switch (dimensionality) { @@ -433,7 +435,7 @@ bool hasTransmissionEntry(H5::Group &entry, const std::string &name) { } void loadTransmissionData(H5::Group &transmission, - Mantid::API::MatrixWorkspace_sptr workspace) { + const Mantid::API::MatrixWorkspace_sptr &workspace) { //----------------------------------------- // Load T workspace->mutableY(0) = diff --git a/Framework/DataHandling/src/LoadNexus.cpp b/Framework/DataHandling/src/LoadNexus.cpp index 4eae8c7d08fbe3effcd9e89b613f25c5851a89db..3a6d324d1abd17e787ac6550fede6ed03268e185 100644 --- a/Framework/DataHandling/src/LoadNexus.cpp +++ b/Framework/DataHandling/src/LoadNexus.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + // LoadNexus // @author Freddie Akeroyd, STFC ISIS Faility diff --git a/Framework/DataHandling/src/LoadNexusLogs.cpp b/Framework/DataHandling/src/LoadNexusLogs.cpp index 1d9b2e315111d37c769232214d709be4b3c7fa36..5e328a533e060bf7c39a579f742fa008ae86e623 100644 --- a/Framework/DataHandling/src/LoadNexusLogs.cpp +++ b/Framework/DataHandling/src/LoadNexusLogs.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/LoadNexusLogs.h" #include "MantidAPI/FileProperty.h" @@ -549,7 +549,7 @@ void LoadNexusLogs::exec() { */ void LoadNexusLogs::loadVetoPulses( ::NeXus::File &file, - boost::shared_ptr<API::MatrixWorkspace> workspace) const { + const boost::shared_ptr<API::MatrixWorkspace> &workspace) const { try { file.openGroup("Veto_pulse", "NXgroup"); } catch (::NeXus::Exception &) { @@ -583,7 +583,7 @@ void LoadNexusLogs::loadVetoPulses( void LoadNexusLogs::loadNPeriods( ::NeXus::File &file, - boost::shared_ptr<API::MatrixWorkspace> workspace) const { + const boost::shared_ptr<API::MatrixWorkspace> &workspace) const { int value = 1; // Default to 1-period unless try { file.openGroup("periods", "IXperiods"); @@ -648,7 +648,7 @@ void LoadNexusLogs::loadNPeriods( void LoadNexusLogs::loadLogs( ::NeXus::File &file, const std::string &entry_name, const std::string &entry_class, - boost::shared_ptr<API::MatrixWorkspace> workspace) const { + const boost::shared_ptr<API::MatrixWorkspace> &workspace) const { file.openGroup(entry_name, entry_class); std::map<std::string, std::string> entries = file.getEntries(); std::map<std::string, std::string>::const_iterator iend = entries.end(); @@ -677,7 +677,7 @@ void LoadNexusLogs::loadLogs( void LoadNexusLogs::loadNXLog( ::NeXus::File &file, const std::string &entry_name, const std::string &entry_class, - boost::shared_ptr<API::MatrixWorkspace> workspace) const { + const boost::shared_ptr<API::MatrixWorkspace> &workspace) const { g_log.debug() << "processing " << entry_name << ":" << entry_class << "\n"; file.openGroup(entry_name, entry_class); @@ -715,7 +715,7 @@ void LoadNexusLogs::loadNXLog( */ void LoadNexusLogs::loadSELog( ::NeXus::File &file, const std::string &entry_name, - boost::shared_ptr<API::MatrixWorkspace> workspace) const { + const boost::shared_ptr<API::MatrixWorkspace> &workspace) const { // Open the entry file.openGroup(entry_name, "IXseblock"); std::string propName = entry_name; diff --git a/Framework/DataHandling/src/LoadNexusMonitors.cpp b/Framework/DataHandling/src/LoadNexusMonitors.cpp index c850897c9f866a1e2a1db7d3926af582c2fa66a6..e05a9c922eb9cfcbb9cac0ff4731a80ee6194621 100644 --- a/Framework/DataHandling/src/LoadNexusMonitors.cpp +++ b/Framework/DataHandling/src/LoadNexusMonitors.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/LoadNexusMonitors.h" diff --git a/Framework/DataHandling/src/LoadNexusMonitors2.cpp b/Framework/DataHandling/src/LoadNexusMonitors2.cpp index 60a4e9a00593210f22ce14426a98dff6da584c9c..8abcaf1e5414537d323b58731dc580afdfe75f5e 100644 --- a/Framework/DataHandling/src/LoadNexusMonitors2.cpp +++ b/Framework/DataHandling/src/LoadNexusMonitors2.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/LoadNexusMonitors2.h" @@ -47,7 +47,7 @@ DECLARE_ALGORITHM(LoadNexusMonitors2) namespace { void loadSampleDataISIScompatibilityInfo( - ::NeXus::File &file, Mantid::API::MatrixWorkspace_sptr const WS) { + ::NeXus::File &file, Mantid::API::MatrixWorkspace_sptr const &WS) { try { file.openGroup("isis_vms_compat", "IXvms"); } catch (::NeXus::Exception &) { @@ -403,8 +403,9 @@ void LoadNexusMonitors2::fixUDets(::NeXus::File &file) { } } -void LoadNexusMonitors2::runLoadLogs(const std::string filename, - API::MatrixWorkspace_sptr localWorkspace) { +void LoadNexusMonitors2::runLoadLogs( + const std::string &filename, + const API::MatrixWorkspace_sptr &localWorkspace) { // do the actual work API::IAlgorithm_sptr loadLogs = createChildAlgorithm("LoadNexusLogs"); diff --git a/Framework/DataHandling/src/LoadNexusProcessed.cpp b/Framework/DataHandling/src/LoadNexusProcessed.cpp index f22a90ae90b0b7ea5ded8acc6a8a874032817d2e..beb8c91a4dc5412d098c51e5f0e088aeeba48cbc 100644 --- a/Framework/DataHandling/src/LoadNexusProcessed.cpp +++ b/Framework/DataHandling/src/LoadNexusProcessed.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/LoadNexusProcessed.h" #include "MantidAPI/AlgorithmFactory.h" @@ -156,7 +156,7 @@ SpectraInfo extractMappingInfo(NXEntry &mtd_entry, Logger &logger) { * @param log : Information logger object * @return True only if multiperiod. */ -bool isMultiPeriodFile(int nWorkspaceEntries, Workspace_sptr sampleWS, +bool isMultiPeriodFile(int nWorkspaceEntries, const Workspace_sptr &sampleWS, Logger &log) { bool isMultiPeriod = false; if (ExperimentInfo_sptr expInfo = @@ -1736,7 +1736,7 @@ std::map<std::string, std::string> LoadNexusProcessed::validateInputs() { * @param data :: reference to the NeXuS data for the axis */ void LoadNexusProcessed::loadNonSpectraAxis( - API::MatrixWorkspace_sptr local_workspace, NXData &data) { + const API::MatrixWorkspace_sptr &local_workspace, NXData &data) { Axis *axis = local_workspace->getAxis(1); if (axis->isNumeric()) { @@ -1773,7 +1773,7 @@ void LoadNexusProcessed::loadNonSpectraAxis( * @param elem1 :: first element in the vector * @param elem2 :: second element in the vecor */ -bool UDlesserExecCount(NXClassInfo elem1, NXClassInfo elem2) { +bool UDlesserExecCount(const NXClassInfo &elem1, const NXClassInfo &elem2) { std::string::size_type index1, index2; std::string num1, num2; // find the number after "_" in algorithm name ( eg:MantidAlogorthm_1) @@ -1859,7 +1859,7 @@ void LoadNexusProcessed::getWordsInString(const std::string &words4, * @param local_workspace :: The workspace to read into */ void LoadNexusProcessed::readBinMasking( - NXData &wksp_cls, API::MatrixWorkspace_sptr local_workspace) { + NXData &wksp_cls, const API::MatrixWorkspace_sptr &local_workspace) { if (wksp_cls.getDataSetInfo("masked_spectra").stat == NX_ERROR) { return; } @@ -1897,12 +1897,11 @@ void LoadNexusProcessed::readBinMasking( * @param hist :: The workspace index to start reading into * @param local_workspace :: A pointer to the workspace */ -void LoadNexusProcessed::loadBlock(NXDataSetTyped<double> &data, - NXDataSetTyped<double> &errors, - NXDataSetTyped<double> &farea, bool hasFArea, - NXDouble &xErrors, bool hasXErrors, - int blocksize, int nchannels, int &hist, - API::MatrixWorkspace_sptr local_workspace) { +void LoadNexusProcessed::loadBlock( + NXDataSetTyped<double> &data, NXDataSetTyped<double> &errors, + NXDataSetTyped<double> &farea, bool hasFArea, NXDouble &xErrors, + bool hasXErrors, int blocksize, int nchannels, int &hist, + const API::MatrixWorkspace_sptr &local_workspace) { data.load(blocksize, hist); errors.load(blocksize, hist); double *data_start = data(); @@ -1979,13 +1978,11 @@ void LoadNexusProcessed::loadBlock(NXDataSetTyped<double> &data, * @param local_workspace :: A pointer to the workspace */ -void LoadNexusProcessed::loadBlock(NXDataSetTyped<double> &data, - NXDataSetTyped<double> &errors, - NXDataSetTyped<double> &farea, bool hasFArea, - NXDouble &xErrors, bool hasXErrors, - int blocksize, int nchannels, int &hist, - int &wsIndex, - API::MatrixWorkspace_sptr local_workspace) { +void LoadNexusProcessed::loadBlock( + NXDataSetTyped<double> &data, NXDataSetTyped<double> &errors, + NXDataSetTyped<double> &farea, bool hasFArea, NXDouble &xErrors, + bool hasXErrors, int blocksize, int nchannels, int &hist, int &wsIndex, + const API::MatrixWorkspace_sptr &local_workspace) { data.load(blocksize, hist); errors.load(blocksize, hist); double *data_start = data(); @@ -2062,13 +2059,11 @@ void LoadNexusProcessed::loadBlock(NXDataSetTyped<double> &data, * @param wsIndex :: The workspace index to save data into * @param local_workspace :: A pointer to the workspace */ -void LoadNexusProcessed::loadBlock(NXDataSetTyped<double> &data, - NXDataSetTyped<double> &errors, - NXDataSetTyped<double> &farea, bool hasFArea, - NXDouble &xErrors, bool hasXErrors, - NXDouble &xbins, int blocksize, - int nchannels, int &hist, int &wsIndex, - API::MatrixWorkspace_sptr local_workspace) { +void LoadNexusProcessed::loadBlock( + NXDataSetTyped<double> &data, NXDataSetTyped<double> &errors, + NXDataSetTyped<double> &farea, bool hasFArea, NXDouble &xErrors, + bool hasXErrors, NXDouble &xbins, int blocksize, int nchannels, int &hist, + int &wsIndex, const API::MatrixWorkspace_sptr &local_workspace) { data.load(blocksize, hist); double *data_start = data(); double *data_end = data_start + nchannels; diff --git a/Framework/DataHandling/src/LoadNexusProcessed2.cpp b/Framework/DataHandling/src/LoadNexusProcessed2.cpp index 0f2c075897fad50c22bcc496d91ae00335e649f4..de884a13f03117203dca7b86451be5e15f32beaf 100644 --- a/Framework/DataHandling/src/LoadNexusProcessed2.cpp +++ b/Framework/DataHandling/src/LoadNexusProcessed2.cpp @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #include "MantidDataHandling/LoadNexusProcessed2.h" #include "MantidAPI/MatrixWorkspace.h" #include "MantidAPI/RegisterFileLoader.h" diff --git a/Framework/DataHandling/src/LoadOff.cpp b/Framework/DataHandling/src/LoadOff.cpp index 1ba3b31dfcc6d66973fb743d703325d20fa333a6..f67ce2dacaa1c14629d2ca915f350c2b6ce1ae06 100644 --- a/Framework/DataHandling/src/LoadOff.cpp +++ b/Framework/DataHandling/src/LoadOff.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/LoadOff.h" #include "MantidGeometry/Instrument.h" @@ -15,7 +15,7 @@ namespace Mantid { namespace DataHandling { -LoadOff::LoadOff(std::string filename, ScaleUnits scaleType) +LoadOff::LoadOff(const std::string &filename, ScaleUnits scaleType) : MeshFileIO(scaleType) { m_file = std::ifstream(filename.c_str()); if (!m_file) { diff --git a/Framework/DataHandling/src/LoadPDFgetNFile.cpp b/Framework/DataHandling/src/LoadPDFgetNFile.cpp index 0f6c63c80546f07f565edf54ae000bd66483cf9c..6f6fec0ad9add2cdb6b6ba94b1d07ceccca9749e 100644 --- a/Framework/DataHandling/src/LoadPDFgetNFile.cpp +++ b/Framework/DataHandling/src/LoadPDFgetNFile.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/LoadPDFgetNFile.h" #include "MantidAPI/Axis.h" @@ -106,7 +106,7 @@ void LoadPDFgetNFile::exec() { * 1. a 2D vector for column data * 2. a 1D string vector for column name */ -void LoadPDFgetNFile::parseDataFile(std::string filename) { +void LoadPDFgetNFile::parseDataFile(const std::string &filename) { // 1. Open file std::ifstream ifile; ifile.open((filename.c_str())); @@ -257,7 +257,7 @@ void LoadPDFgetNFile::parseDataLine(string line) { } //---------------------------------------------------------------------------------------------- -void LoadPDFgetNFile::setUnit(Workspace2D_sptr ws) { +void LoadPDFgetNFile::setUnit(const Workspace2D_sptr &ws) { // 1. Set X string xcolname = mColumnNames[0]; diff --git a/Framework/DataHandling/src/LoadPLN.cpp b/Framework/DataHandling/src/LoadPLN.cpp index 416d4d4a3557fdc7805e25f2d2c116340917bcc5..89b49d1998b9a6ef524873e8e0b0f4e89bac99dc 100644 --- a/Framework/DataHandling/src/LoadPLN.cpp +++ b/Framework/DataHandling/src/LoadPLN.cpp @@ -1,3 +1,9 @@ +// Mantid Repository : https://github.com/mantidproject/mantid +// +// Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS +// SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/LoadPLN.h" #include "MantidAPI/Axis.h" diff --git a/Framework/DataHandling/src/LoadPSIMuonBin.cpp b/Framework/DataHandling/src/LoadPSIMuonBin.cpp index 3df3202a082722c84d5e40bfa38bc11d1d9dab54..c0895643e2b450325011680d68cee27c632c16a2 100644 --- a/Framework/DataHandling/src/LoadPSIMuonBin.cpp +++ b/Framework/DataHandling/src/LoadPSIMuonBin.cpp @@ -1,8 +1,9 @@ +// Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/LoadPSIMuonBin.h" #include "MantidAPI/Algorithm.h" @@ -233,8 +234,8 @@ void LoadPSIMuonBin::makeDeadTimeTable(const size_t &numSpec) { setProperty("DeadTimeTable", deadTimeTable); } -std::string LoadPSIMuonBin::getFormattedDateTime(std::string date, - std::string time) { +std::string LoadPSIMuonBin::getFormattedDateTime(const std::string &date, + const std::string &time) { std::string year; if (date.size() == 11) { year = date.substr(7, 4); diff --git a/Framework/DataHandling/src/LoadParameterFile.cpp b/Framework/DataHandling/src/LoadParameterFile.cpp index 3e3a03901405e6d7b76509fd323e9a40cca4ddf2..950e46f094ac0973427de64c4991f2d46327fc13 100644 --- a/Framework/DataHandling/src/LoadParameterFile.cpp +++ b/Framework/DataHandling/src/LoadParameterFile.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/LoadParameterFile.h" #include "MantidAPI/FileProperty.h" diff --git a/Framework/DataHandling/src/LoadPreNexus.cpp b/Framework/DataHandling/src/LoadPreNexus.cpp index b59b0a213fd2420d645dc461c6501ee6c0c8b759..274d74bc98ea8bdc5dc0ae80f63db78aa3725947 100644 --- a/Framework/DataHandling/src/LoadPreNexus.cpp +++ b/Framework/DataHandling/src/LoadPreNexus.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/LoadPreNexus.h" #include "MantidAPI/FileProperty.h" diff --git a/Framework/DataHandling/src/LoadPreNexusMonitors.cpp b/Framework/DataHandling/src/LoadPreNexusMonitors.cpp index 5b2b81a994b403d2788ec7bc26c923d22f47ced0..29dd9cca6fb69bdac16d481d8f35ba12b6e03f21 100644 --- a/Framework/DataHandling/src/LoadPreNexusMonitors.cpp +++ b/Framework/DataHandling/src/LoadPreNexusMonitors.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/LoadPreNexusMonitors.h" @@ -226,7 +226,7 @@ void LoadPreNexusMonitors::exec() { * geometry */ void LoadPreNexusMonitors::runLoadInstrument( - const std::string &instrument, MatrixWorkspace_sptr localWorkspace) { + const std::string &instrument, const MatrixWorkspace_sptr &localWorkspace) { IAlgorithm_sptr loadInst = createChildAlgorithm("LoadInstrument"); diff --git a/Framework/DataHandling/src/LoadQKK.cpp b/Framework/DataHandling/src/LoadQKK.cpp index dad28898c537a05f7de89fece500b777ce94e6ed..23b59c43fd366f17a2795974d4c04fa7dedd0018 100644 --- a/Framework/DataHandling/src/LoadQKK.cpp +++ b/Framework/DataHandling/src/LoadQKK.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/LoadQKK.h" diff --git a/Framework/DataHandling/src/LoadRKH.cpp b/Framework/DataHandling/src/LoadRKH.cpp index 62b710e177d4bb2c652c409dde55a315dfcfb6b7..dcaa1c1d5847562c917e8a894f87c3bd71be710f 100644 --- a/Framework/DataHandling/src/LoadRKH.cpp +++ b/Framework/DataHandling/src/LoadRKH.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //--------------------------------------------------- // Includes @@ -585,7 +585,7 @@ void LoadRKH::skipLines(std::istream &strm, int nlines) { * @param[out] toCenter an array that is one shorter than oldBoundaries, the * values of the means of pairs of values from the input */ -void LoadRKH::binCenter(const MantidVec oldBoundaries, +void LoadRKH::binCenter(const MantidVec &oldBoundaries, MantidVec &toCenter) const { VectorHelper::convertToBinCentre(oldBoundaries, toCenter); } diff --git a/Framework/DataHandling/src/LoadRaw/byte_rel_comp.cpp b/Framework/DataHandling/src/LoadRaw/byte_rel_comp.cpp index 623d30585d4623d87520a8e587a12a86bb0b06bd..d80e940ecf030c7b18a7f21450a855402a07fb5c 100644 --- a/Framework/DataHandling/src/LoadRaw/byte_rel_comp.cpp +++ b/Framework/DataHandling/src/LoadRaw/byte_rel_comp.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /* C diff --git a/Framework/DataHandling/src/LoadRaw/byte_rel_comp.h b/Framework/DataHandling/src/LoadRaw/byte_rel_comp.h index 78e32dc8e46d2a22883639247e19e44b13d08dd4..8309a9d5b8129d76840d03dbe16ed7cff22d679a 100644 --- a/Framework/DataHandling/src/LoadRaw/byte_rel_comp.h +++ b/Framework/DataHandling/src/LoadRaw/byte_rel_comp.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + int byte_rel_comp(int *data_in, int n_in, char *data_out, int max_out, int &n_out); diff --git a/Framework/DataHandling/src/LoadRaw/isisraw.cpp b/Framework/DataHandling/src/LoadRaw/isisraw.cpp index ed5797781eb2b9ae81c300ab354711a161b74d69..4f583929f01245a5ec2bea5a8cde64a08f63934f 100644 --- a/Framework/DataHandling/src/LoadRaw/isisraw.cpp +++ b/Framework/DataHandling/src/LoadRaw/isisraw.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "isisraw.h" #include "MantidKernel/Logger.h" @@ -715,10 +715,10 @@ int ISISRAW::ioRAW(FILE *file, LOG_STRUCT *s, int len, bool from_file) { int ISISRAW::ioRAW(FILE *file, LOG_LINE *s, int len, bool from_file) { char padding[5]; memset(padding, ' ', sizeof(padding)); - int i, nbytes_rounded; + int i; for (i = 0; i < len; i++) { ioRAW(file, &(s[i].len), 1, from_file); - nbytes_rounded = 4 * (1 + (s[i].len - 1) / 4); + int nbytes_rounded = 4 * (1 + (s[i].len - 1) / 4); ioRAW(file, &(s[i].data), s[i].len, from_file); ioRAW(file, padding, nbytes_rounded - s[i].len, from_file); } @@ -731,12 +731,11 @@ int ISISRAW::ioRAW(FILE *file, char *s, int len, bool from_file) { return 0; } - size_t n; if (from_file) { - n = fread(s, sizeof(char), len, file); + size_t n = fread(s, sizeof(char), len, file); return static_cast<int>(n - len); } else { - n = fwrite(s, sizeof(char), len, file); + fwrite(s, sizeof(char), len, file); } return 0; @@ -748,12 +747,11 @@ int ISISRAW::ioRAW(FILE *file, int *s, int len, bool from_file) { return 0; } - size_t n; if (from_file) { - n = fread(s, sizeof(int), len, file); + size_t n = fread(s, sizeof(int), len, file); return static_cast<int>(n - len); } else { - n = fwrite(s, sizeof(int), len, file); + fwrite(s, sizeof(int), len, file); } return 0; @@ -765,12 +763,11 @@ int ISISRAW::ioRAW(FILE *file, uint32_t *s, int len, bool from_file) { return 0; } - size_t n; if (from_file) { - n = fread(s, sizeof(uint32_t), len, file); + size_t n = fread(s, sizeof(uint32_t), len, file); return static_cast<int>(n - len); } else { - n = fwrite(s, sizeof(uint32_t), len, file); + fwrite(s, sizeof(uint32_t), len, file); } return 0; } @@ -782,14 +779,13 @@ int ISISRAW::ioRAW(FILE *file, float *s, int len, bool from_file) { return 0; } - size_t n; if (from_file) { - n = fread(s, sizeof(float), len, file); + size_t n = fread(s, sizeof(float), len, file); vaxf_to_local(s, &len, &errcode); return static_cast<int>(n - len); } else { local_to_vaxf(s, &len, &errcode); - n = fwrite(s, sizeof(float), len, file); + fwrite(s, sizeof(float), len, file); vaxf_to_local(s, &len, &errcode); } return 0; @@ -942,6 +938,7 @@ int ISISRAW::vmstime(char *timbuf, int len, time_t time_value) { * get time in VMS format 01-JAN-1970 00:00:00 */ size_t i, n; + // cppcheck-suppress redundantAssignment struct tm *tmstruct = nullptr; #ifdef MS_VISUAL_STUDIO errno_t err = localtime_s(tmstruct, &time_value); diff --git a/Framework/DataHandling/src/LoadRaw/isisraw.h b/Framework/DataHandling/src/LoadRaw/isisraw.h index 402e857227b808e04e6dbb68e1c97b4924b7d645..c80633c41d84d3adcdbabf3c3e108fe4ac5de991 100644 --- a/Framework/DataHandling/src/LoadRaw/isisraw.h +++ b/Framework/DataHandling/src/LoadRaw/isisraw.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/src/LoadRaw/isisraw2.cpp b/Framework/DataHandling/src/LoadRaw/isisraw2.cpp index 8673b016fb69958228c78ec3d1c1be5d28b6a903..0d389c3a241dd8ae60d32cb4ba11ddeab35e288a 100644 --- a/Framework/DataHandling/src/LoadRaw/isisraw2.cpp +++ b/Framework/DataHandling/src/LoadRaw/isisraw2.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "isisraw2.h" #include "byte_rel_comp.h" diff --git a/Framework/DataHandling/src/LoadRaw/isisraw2.h b/Framework/DataHandling/src/LoadRaw/isisraw2.h index 3811f1a494ad361fd795507eb6b67178d0b7827d..c398042408a60e324b62a7586f7131d5b0cc534a 100644 --- a/Framework/DataHandling/src/LoadRaw/isisraw2.h +++ b/Framework/DataHandling/src/LoadRaw/isisraw2.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/src/LoadRaw/item_struct.cpp b/Framework/DataHandling/src/LoadRaw/item_struct.cpp index 90bd14e97325f13d1624ad157389c56cd5786cfd..115f9f7f7dce3b5391d97144e8e659ba491a1d6c 100644 --- a/Framework/DataHandling/src/LoadRaw/item_struct.cpp +++ b/Framework/DataHandling/src/LoadRaw/item_struct.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "item_struct.h" #include <cstdlib> diff --git a/Framework/DataHandling/src/LoadRaw/item_struct.h b/Framework/DataHandling/src/LoadRaw/item_struct.h index 7f3839e1f63aaf9d9ed731befd5ef4165f7b8ac3..781412564886a568bff4eb9aa7d588102201c89d 100644 --- a/Framework/DataHandling/src/LoadRaw/item_struct.h +++ b/Framework/DataHandling/src/LoadRaw/item_struct.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/src/LoadRaw/vms_convert.cpp b/Framework/DataHandling/src/LoadRaw/vms_convert.cpp index 3814190908459cec5a3ba4d57c747978efddf32e..80fc6dc7a17c01a9519f15bf766a4076bfcf3b64 100644 --- a/Framework/DataHandling/src/LoadRaw/vms_convert.cpp +++ b/Framework/DataHandling/src/LoadRaw/vms_convert.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /* * Module: vms_convert diff --git a/Framework/DataHandling/src/LoadRaw/vms_convert.h b/Framework/DataHandling/src/LoadRaw/vms_convert.h index 805465e109aefa5106a81c92c8b893ffcc96a1b8..ff11d74ca54b5cca49aebf7f8a6dbbb26d551343 100644 --- a/Framework/DataHandling/src/LoadRaw/vms_convert.h +++ b/Framework/DataHandling/src/LoadRaw/vms_convert.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/src/LoadRaw3.cpp b/Framework/DataHandling/src/LoadRaw3.cpp index 0e1398f8777464bf9d89694887b77f32c559f129..a964ca6db5f6d4c947247cf905541e57dffdbeac 100644 --- a/Framework/DataHandling/src/LoadRaw3.cpp +++ b/Framework/DataHandling/src/LoadRaw3.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/LoadRaw3.h" #include "LoadRaw/isisraw2.h" @@ -311,7 +311,7 @@ void LoadRaw3::exec() { */ void LoadRaw3::excludeMonitors(FILE *file, const int &period, const std::vector<specnum_t> &monitorList, - DataObjects::Workspace2D_sptr ws_sptr) { + const DataObjects::Workspace2D_sptr &ws_sptr) { int64_t histCurrent = -1; int64_t wsIndex = 0; auto histTotal = static_cast<double>(m_total_specs * m_numberOfPeriods); @@ -358,7 +358,7 @@ void LoadRaw3::excludeMonitors(FILE *file, const int &period, *@param ws_sptr :: shared pointer to workspace */ void LoadRaw3::includeMonitors(FILE *file, const int64_t &period, - DataObjects::Workspace2D_sptr ws_sptr) { + const DataObjects::Workspace2D_sptr &ws_sptr) { int64_t histCurrent = -1; int64_t wsIndex = 0; @@ -404,8 +404,8 @@ void LoadRaw3::includeMonitors(FILE *file, const int64_t &period, void LoadRaw3::separateMonitors(FILE *file, const int64_t &period, const std::vector<specnum_t> &monitorList, - DataObjects::Workspace2D_sptr ws_sptr, - DataObjects::Workspace2D_sptr mws_sptr) { + const DataObjects::Workspace2D_sptr &ws_sptr, + const DataObjects::Workspace2D_sptr &mws_sptr) { int64_t histCurrent = -1; int64_t wsIndex = 0; int64_t mwsIndex = 0; diff --git a/Framework/DataHandling/src/LoadRawBin0.cpp b/Framework/DataHandling/src/LoadRawBin0.cpp index d14d8d56d001ab995b975776167728ab2fe5453f..7a5262b9aff1a6192f48c148df0b9a03f67fb9f6 100644 --- a/Framework/DataHandling/src/LoadRawBin0.cpp +++ b/Framework/DataHandling/src/LoadRawBin0.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/LoadRawBin0.h" #include "LoadRaw/isisraw2.h" diff --git a/Framework/DataHandling/src/LoadRawHelper.cpp b/Framework/DataHandling/src/LoadRawHelper.cpp index 40437f212c538ab7f737b17660c10cd865831db0..49410e7ce21bf7ac8ee03675c71922ed6d050338 100644 --- a/Framework/DataHandling/src/LoadRawHelper.cpp +++ b/Framework/DataHandling/src/LoadRawHelper.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/LoadRawHelper.h" #include "LoadRaw/isisraw2.h" @@ -216,7 +216,7 @@ void LoadRawHelper::readworkspaceParameters(specnum_t &numberOfSpectra, * @return an empty workspace of the given parameters */ DataObjects::Workspace2D_sptr -LoadRawHelper::createWorkspace(DataObjects::Workspace2D_sptr ws_sptr, +LoadRawHelper::createWorkspace(const DataObjects::Workspace2D_sptr &ws_sptr, int64_t nVectors, int64_t xLengthIn, int64_t yLengthIn) { DataObjects::Workspace2D_sptr empty; @@ -270,7 +270,7 @@ void LoadRawHelper::createMonitorWorkspace( DataObjects::Workspace2D_sptr &normalws_sptr, WorkspaceGroup_sptr &mongrp_sptr, const int64_t mwsSpecs, const int64_t nwsSpecs, const int64_t numberOfPeriods, - const int64_t lengthIn, const std::string title, + const int64_t lengthIn, const std::string &title, API::Algorithm *const pAlg) { try { // create monitor group workspace @@ -328,10 +328,10 @@ void LoadRawHelper::exec() {} * @param bmonitors :: boolean flag to name the workspaces * @param pAlg :: pointer to algorithm this method works with. */ -void LoadRawHelper::setWorkspaceProperty(DataObjects::Workspace2D_sptr ws_sptr, - WorkspaceGroup_sptr grpws_sptr, - const int64_t period, bool bmonitors, - API::Algorithm *const pAlg) { +void LoadRawHelper::setWorkspaceProperty( + const DataObjects::Workspace2D_sptr &ws_sptr, + const WorkspaceGroup_sptr &grpws_sptr, const int64_t period, bool bmonitors, + API::Algorithm *const pAlg) { if (!ws_sptr) return; if (!grpws_sptr) @@ -366,12 +366,11 @@ void LoadRawHelper::setWorkspaceProperty(DataObjects::Workspace2D_sptr ws_sptr, * workspace * @param pAlg :: pointer to algorithm this method works with. */ -void LoadRawHelper::setWorkspaceProperty(const std::string &propertyName, - const std::string &title, - WorkspaceGroup_sptr grpws_sptr, - DataObjects::Workspace2D_sptr ws_sptr, - int64_t numberOfPeriods, bool bMonitor, - API::Algorithm *const pAlg) { +void LoadRawHelper::setWorkspaceProperty( + const std::string &propertyName, const std::string &title, + const WorkspaceGroup_sptr &grpws_sptr, + const DataObjects::Workspace2D_sptr &ws_sptr, int64_t numberOfPeriods, + bool bMonitor, API::Algorithm *const pAlg) { UNUSED_ARG(bMonitor); Property *ws = pAlg->getProperty("OutputWorkspace"); if (!ws) @@ -401,7 +400,7 @@ void LoadRawHelper::setWorkspaceProperty(const std::string &propertyName, * @param binStart :: start of bin */ void LoadRawHelper::setWorkspaceData( - DataObjects::Workspace2D_sptr newWorkspace, + const DataObjects::Workspace2D_sptr &newWorkspace, const std::vector<boost::shared_ptr<HistogramData::HistogramX>> &timeChannelsVec, int64_t wsIndex, specnum_t nspecNum, int64_t noTimeRegimes, @@ -544,8 +543,9 @@ LoadRawHelper::getTimeChannels(const int64_t ®imes, /// @param progStart :: progress at start /// @param progEnd :: progress at end void LoadRawHelper::runLoadInstrument( - const std::string &fileName, DataObjects::Workspace2D_sptr localWorkspace, - double progStart, double progEnd) { + const std::string &fileName, + const DataObjects::Workspace2D_sptr &localWorkspace, double progStart, + double progEnd) { g_log.debug("Loading the instrument definition..."); m_prog = progStart; progress(m_prog, "Loading the instrument geometry..."); @@ -631,7 +631,8 @@ void LoadRawHelper::runLoadInstrument( /// @param fileName :: the raw file filename /// @param localWorkspace :: The workspace to load the instrument for void LoadRawHelper::runLoadInstrumentFromRaw( - const std::string &fileName, DataObjects::Workspace2D_sptr localWorkspace) { + const std::string &fileName, + const DataObjects::Workspace2D_sptr &localWorkspace) { IAlgorithm_sptr loadInst = createChildAlgorithm("LoadInstrumentFromRaw"); loadInst->setPropertyValue("Filename", fileName); // Set the workspace property to be the same one filled above @@ -659,7 +660,8 @@ void LoadRawHelper::runLoadInstrumentFromRaw( /// @param fileName :: the raw file filename /// @param localWorkspace :: The workspace to load the mapping table for void LoadRawHelper::runLoadMappingTable( - const std::string &fileName, DataObjects::Workspace2D_sptr localWorkspace) { + const std::string &fileName, + const DataObjects::Workspace2D_sptr &localWorkspace) { g_log.debug("Loading the spectra-detector mapping..."); progress(m_prog, "Loading the spectra-detector mapping..."); // Now determine the spectra to detector map calling Child Algorithm @@ -685,9 +687,10 @@ void LoadRawHelper::runLoadMappingTable( /// @param localWorkspace :: The workspace to load the logs for /// @param progStart :: starting progress fraction /// @param progEnd :: ending progress fraction -void LoadRawHelper::runLoadLog(const std::string &fileName, - DataObjects::Workspace2D_sptr localWorkspace, - double progStart, double progEnd) { +void LoadRawHelper::runLoadLog( + const std::string &fileName, + const DataObjects::Workspace2D_sptr &localWorkspace, double progStart, + double progEnd) { // search for the log file to load, and save their names in a set. std::list<std::string> logFiles = searchForLogFiles(fileName); @@ -773,7 +776,7 @@ std::string LoadRawHelper::extractLogName(const std::string &path) { * @param local_workspace :: workspace to add period log data to. */ void LoadRawHelper::createPeriodLogs( - int64_t period, DataObjects::Workspace2D_sptr local_workspace) { + int64_t period, const DataObjects::Workspace2D_sptr &local_workspace) { m_logCreator->addPeriodLogs(static_cast<int>(period), local_workspace->mutableRun()); } @@ -785,8 +788,9 @@ void LoadRawHelper::createPeriodLogs( * @param localWorkspace :: The workspace to attach the information to * @param rawFile :: The handle to an ISIS Raw file */ -void LoadRawHelper::loadRunParameters(API::MatrixWorkspace_sptr localWorkspace, - ISISRAW *const rawFile) const { +void LoadRawHelper::loadRunParameters( + const API::MatrixWorkspace_sptr &localWorkspace, + ISISRAW *const rawFile) const { ISISRAW &localISISRaw = [this, rawFile]() -> ISISRAW & { if (rawFile) return *rawFile; @@ -1098,8 +1102,9 @@ void LoadRawHelper::calculateWorkspacesizes( void LoadRawHelper::loadSpectra( FILE *file, const int &period, const int &total_specs, - DataObjects::Workspace2D_sptr ws_sptr, - std::vector<boost::shared_ptr<HistogramData::HistogramX>> timeChannelsVec) { + const DataObjects::Workspace2D_sptr &ws_sptr, + const std::vector<boost::shared_ptr<HistogramData::HistogramX>> + &timeChannelsVec) { double progStart = m_prog; double progEnd = 1.0; // Assume this function is called last diff --git a/Framework/DataHandling/src/LoadRawSpectrum0.cpp b/Framework/DataHandling/src/LoadRawSpectrum0.cpp index 9e539aa75ce30f5bd2a9c0e074532ed982402577..11671f1d430770a8551f519042320c669dac9b70 100644 --- a/Framework/DataHandling/src/LoadRawSpectrum0.cpp +++ b/Framework/DataHandling/src/LoadRawSpectrum0.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/LoadRawSpectrum0.h" #include "LoadRaw/isisraw2.h" diff --git a/Framework/DataHandling/src/LoadSESANS.cpp b/Framework/DataHandling/src/LoadSESANS.cpp index d22254c24602d7be380b0ae433de8528ea9b4a41..f5f3c891036b6e76f646a03d9c3e7b9a25303725 100644 --- a/Framework/DataHandling/src/LoadSESANS.cpp +++ b/Framework/DataHandling/src/LoadSESANS.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/LoadSESANS.h" diff --git a/Framework/DataHandling/src/LoadSINQFocus.cpp b/Framework/DataHandling/src/LoadSINQFocus.cpp index ae52037db036ca32bcb3466ed7dafc5c41dae029..4907603f428a83cec3e56132bfaae696befe0f3c 100644 --- a/Framework/DataHandling/src/LoadSINQFocus.cpp +++ b/Framework/DataHandling/src/LoadSINQFocus.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/LoadSINQFocus.h" diff --git a/Framework/DataHandling/src/LoadSNSspec.cpp b/Framework/DataHandling/src/LoadSNSspec.cpp index c99f70ea34ace17215f003b5ea400d854c769d7a..b5359f5166cf0d2dcb1a1cb2e572801de4cf4aa9 100644 --- a/Framework/DataHandling/src/LoadSNSspec.cpp +++ b/Framework/DataHandling/src/LoadSNSspec.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/DataHandling/src/LoadSPE.cpp b/Framework/DataHandling/src/LoadSPE.cpp index 246e7e8fa32758c48bdd1bee1246ef80a279a1e7..791b44ecdf01f8d7179d9e6c3f28ecb5b7d913ce 100644 --- a/Framework/DataHandling/src/LoadSPE.cpp +++ b/Framework/DataHandling/src/LoadSPE.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/LoadSPE.h" #include "MantidAPI/Axis.h" @@ -185,7 +185,8 @@ void LoadSPE::exec() { * @param workspace :: The output workspace * @param index :: The index of the current spectrum */ -void LoadSPE::readHistogram(FILE *speFile, API::MatrixWorkspace_sptr workspace, +void LoadSPE::readHistogram(FILE *speFile, + const API::MatrixWorkspace_sptr &workspace, size_t index) { // First, there should be a comment line char comment[100]; diff --git a/Framework/DataHandling/src/LoadSampleDetailsFromRaw.cpp b/Framework/DataHandling/src/LoadSampleDetailsFromRaw.cpp index cd47e662f9f757dc77daad6339e34497a5d8eb2b..81fd5b1d05b7c1cb17e895220564fd68c3fa0c74 100644 --- a/Framework/DataHandling/src/LoadSampleDetailsFromRaw.cpp +++ b/Framework/DataHandling/src/LoadSampleDetailsFromRaw.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //------------------------------------------------------- // Includes diff --git a/Framework/DataHandling/src/LoadSampleEnvironment.cpp b/Framework/DataHandling/src/LoadSampleEnvironment.cpp index 6ce98dbf2f32ccdfd5efff0f26b1fde7304b9a26..db6153d6a910c06256a74e6748b3aaa9fa9cbccf 100644 --- a/Framework/DataHandling/src/LoadSampleEnvironment.cpp +++ b/Framework/DataHandling/src/LoadSampleEnvironment.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/LoadSampleEnvironment.h" #include "MantidDataHandling/LoadAsciiStl.h" diff --git a/Framework/DataHandling/src/LoadSampleShape.cpp b/Framework/DataHandling/src/LoadSampleShape.cpp index 62451d163497b73f84d52d42e08520225e6d4b5d..1ab9f5ac533c4e64934fd78f45845e251020280d 100644 --- a/Framework/DataHandling/src/LoadSampleShape.cpp +++ b/Framework/DataHandling/src/LoadSampleShape.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/LoadSampleShape.h" #include "MantidDataHandling/LoadAsciiStl.h" @@ -99,7 +99,7 @@ void LoadSampleShape::exec() { * @param inputWS The workspace to get the rotation from * @returns a shared pointer to the newly rotated Shape */ -void rotate(MeshObject &sampleMesh, MatrixWorkspace_const_sptr inputWS) { +void rotate(MeshObject &sampleMesh, const MatrixWorkspace_const_sptr &inputWS) { const std::vector<double> rotationMatrix = inputWS->run().getGoniometer().getR(); sampleMesh.rotate(rotationMatrix); diff --git a/Framework/DataHandling/src/LoadSassena.cpp b/Framework/DataHandling/src/LoadSassena.cpp index f1d53337aad52ad0d62da8a223b05ee6637f4d01..0635840afa17101d9d464afeec450e8e34fe8e27 100644 --- a/Framework/DataHandling/src/LoadSassena.cpp +++ b/Framework/DataHandling/src/LoadSassena.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/LoadSassena.h" #include "MantidAPI/AnalysisDataService.h" @@ -20,6 +20,8 @@ #include <hdf5_hl.h> +#include <utility> + namespace Mantid { namespace DataHandling { @@ -47,9 +49,9 @@ int LoadSassena::confidence(Kernel::NexusDescriptor &descriptor) const { * @param ws pointer to workspace to be added and registered * @param description */ -void LoadSassena::registerWorkspace(API::WorkspaceGroup_sptr gws, - const std::string wsName, - DataObjects::Workspace2D_sptr ws, +void LoadSassena::registerWorkspace(const API::WorkspaceGroup_sptr &gws, + const std::string &wsName, + const DataObjects::Workspace2D_sptr &ws, const std::string &description) { UNUSED_ARG(description); API::AnalysisDataService::Instance().add(wsName, ws); @@ -63,7 +65,7 @@ void LoadSassena::registerWorkspace(API::WorkspaceGroup_sptr gws, * @param dims storing dimensionality */ -herr_t LoadSassena::dataSetInfo(const hid_t &h5file, const std::string setName, +herr_t LoadSassena::dataSetInfo(const hid_t &h5file, const std::string &setName, hsize_t *dims) const { H5T_class_t class_id; size_t type_size; @@ -82,7 +84,7 @@ herr_t LoadSassena::dataSetInfo(const hid_t &h5file, const std::string setName, * @param buf storing dataset */ herr_t LoadSassena::dataSetDouble(const hid_t &h5file, - const std::string setName, + const std::string &setName, std::vector<double> &buf) { herr_t errorcode = H5LTread_dataset_double(h5file, setName.c_str(), buf.data()); @@ -110,7 +112,8 @@ bool compare(const mypair &left, const mypair &right) { * increasing order of momemtum transfer */ HistogramData::Points -LoadSassena::loadQvectors(const hid_t &h5file, API::WorkspaceGroup_sptr gws, +LoadSassena::loadQvectors(const hid_t &h5file, + const API::WorkspaceGroup_sptr &gws, std::vector<int> &sorting_indexes) { // store the modulus of the vector @@ -169,7 +172,8 @@ LoadSassena::loadQvectors(const hid_t &h5file, API::WorkspaceGroup_sptr gws, "MomentumTransfer"); // Set the Units this->registerWorkspace( - gws, wsName, ws, "X-axis: origin of Q-vectors; Y-axis: tip of Q-vectors"); + std::move(gws), wsName, ws, + "X-axis: origin of Q-vectors; Y-axis: tip of Q-vectors"); return HistogramData::Points(std::move(qvmod)); } @@ -184,8 +188,9 @@ LoadSassena::loadQvectors(const hid_t &h5file, API::WorkspaceGroup_sptr gws, * @param sorting_indexes permutation of qvmod indexes to render it in * increasing order of momemtum transfer */ -void LoadSassena::loadFQ(const hid_t &h5file, API::WorkspaceGroup_sptr gws, - const std::string setName, +void LoadSassena::loadFQ(const hid_t &h5file, + const API::WorkspaceGroup_sptr &gws, + const std::string &setName, const HistogramData::Points &qvmod, const std::vector<int> &sorting_indexes) { @@ -221,7 +226,7 @@ void LoadSassena::loadFQ(const hid_t &h5file, API::WorkspaceGroup_sptr gws, Kernel::UnitFactory::Instance().create("MomentumTransfer"); this->registerWorkspace( - gws, wsName, ws, + std::move(gws), wsName, ws, "X-axis: Q-vector modulus; Y-axis: intermediate structure factor"); } @@ -238,8 +243,9 @@ void LoadSassena::loadFQ(const hid_t &h5file, API::WorkspaceGroup_sptr gws, * @param sorting_indexes permutation of qvmod indexes to render it in * increasing order of momemtum transfer */ -void LoadSassena::loadFQT(const hid_t &h5file, API::WorkspaceGroup_sptr gws, - const std::string setName, +void LoadSassena::loadFQT(const hid_t &h5file, + const API::WorkspaceGroup_sptr &gws, + const std::string &setName, const HistogramData::Points &qvmod, const std::vector<int> &sorting_indexes) { diff --git a/Framework/DataHandling/src/LoadSpec.cpp b/Framework/DataHandling/src/LoadSpec.cpp index be236c9d7de739c3534c91c6db70760bb3cc5409..ae2bf97715cd727c48e76a3b1cd012365e127cb8 100644 --- a/Framework/DataHandling/src/LoadSpec.cpp +++ b/Framework/DataHandling/src/LoadSpec.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/DataHandling/src/LoadSpice2D.cpp b/Framework/DataHandling/src/LoadSpice2D.cpp index 1595360f2c8bfb1a38e165b06b19ea3d9e1574d0..0b71b10809625963f8b46093e64cab6cc372cc79 100644 --- a/Framework/DataHandling/src/LoadSpice2D.cpp +++ b/Framework/DataHandling/src/LoadSpice2D.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/LoadSpice2D.h" #include "MantidAPI/AlgorithmFactory.h" @@ -80,8 +80,9 @@ bool from_string(T &t, const std::string &s, * @param wavelength: wavelength value [Angstrom] * @param dwavelength: error on the wavelength [Angstrom] */ -void store_value(DataObjects::Workspace2D_sptr ws, int specID, double value, - double error, double wavelength, double dwavelength) { +void store_value(const DataObjects::Workspace2D_sptr &ws, int specID, + double value, double error, double wavelength, + double dwavelength) { auto &X = ws->mutableX(specID); auto &Y = ws->mutableY(specID); auto &E = ws->mutableE(specID); @@ -659,7 +660,7 @@ void LoadSpice2D::detectorTranslation( */ void LoadSpice2D::runLoadInstrument( const std::string &inst_name, - DataObjects::Workspace2D_sptr localWorkspace) { + const DataObjects::Workspace2D_sptr &localWorkspace) { API::IAlgorithm_sptr loadInst = createChildAlgorithm("LoadInstrument"); diff --git a/Framework/DataHandling/src/LoadSpiceAscii.cpp b/Framework/DataHandling/src/LoadSpiceAscii.cpp index 1e5322cc1e96b813d7b1d224e1fab6aca34db30c..d95e776cdeb1d5d3f0be6b480b9ef259b9312f79 100644 --- a/Framework/DataHandling/src/LoadSpiceAscii.cpp +++ b/Framework/DataHandling/src/LoadSpiceAscii.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include <boost/algorithm/string.hpp> #include <fstream> @@ -436,7 +436,7 @@ LoadSpiceAscii::createRunInfoWS(std::map<std::string, std::string> runinfodict, * @param datetimeprop */ void LoadSpiceAscii::setupRunStartTime( - API::MatrixWorkspace_sptr runinfows, + const API::MatrixWorkspace_sptr &runinfows, const std::vector<std::string> &datetimeprop) { // Check if no need to process run start time if (datetimeprop.empty()) { @@ -596,7 +596,7 @@ std::string LoadSpiceAscii::processTimeString(const std::string &rawtime, * @param pvalue */ template <typename T> -void LoadSpiceAscii::addProperty(API::MatrixWorkspace_sptr ws, +void LoadSpiceAscii::addProperty(const API::MatrixWorkspace_sptr &ws, const std::string &pname, T pvalue) { ws->mutableRun().addLogData(new PropertyWithValue<T>(pname, pvalue)); } diff --git a/Framework/DataHandling/src/LoadSpiceXML2DDet.cpp b/Framework/DataHandling/src/LoadSpiceXML2DDet.cpp index b8a99b0d4b39dfbf39115fe7f9691301761595a8..d1d6d36bc5cb1a99486c6cde3a45e57180ee2a8d 100644 --- a/Framework/DataHandling/src/LoadSpiceXML2DDet.cpp +++ b/Framework/DataHandling/src/LoadSpiceXML2DDet.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/LoadSpiceXML2DDet.h" #include "MantidAPI/Axis.h" @@ -283,7 +283,8 @@ void LoadSpiceXML2DDet::processInputs() { * @param outws :: workspace to have sample logs to set up * @return */ -bool LoadSpiceXML2DDet::setupSampleLogs(API::MatrixWorkspace_sptr outws) { +bool LoadSpiceXML2DDet::setupSampleLogs( + const API::MatrixWorkspace_sptr &outws) { // With given spice scan table, 2-theta is read from there. if (m_hasScanTable) { ITableWorkspace_sptr spicetablews = getProperty("SpiceTableWorkspace"); @@ -813,8 +814,6 @@ MatrixWorkspace_sptr LoadSpiceXML2DDet::xmlCreateMatrixWorkspaceUnknowGeometry( return outws; } -/** - */ API::MatrixWorkspace_sptr LoadSpiceXML2DDet::xmlParseDetectorNode( const std::string &detvaluestr, bool loadinstrument, double &max_counts) { // Split to lines @@ -940,8 +939,8 @@ API::MatrixWorkspace_sptr LoadSpiceXML2DDet::xmlParseDetectorNode( * @param ptnumber */ void LoadSpiceXML2DDet::setupSampleLogFromSpiceTable( - MatrixWorkspace_sptr matrixws, ITableWorkspace_sptr spicetablews, - int ptnumber) { + const MatrixWorkspace_sptr &matrixws, + const ITableWorkspace_sptr &spicetablews, int ptnumber) { size_t numrows = spicetablews->rowCount(); std::vector<std::string> colnames = spicetablews->getColumnNames(); // FIXME - Shouldn't give a better value? @@ -980,7 +979,7 @@ void LoadSpiceXML2DDet::setupSampleLogFromSpiceTable( * @param wavelength * @return */ -bool LoadSpiceXML2DDet::getHB3AWavelength(MatrixWorkspace_sptr dataws, +bool LoadSpiceXML2DDet::getHB3AWavelength(const MatrixWorkspace_sptr &dataws, double &wavelength) { bool haswavelength(false); wavelength = -1.; @@ -1045,7 +1044,7 @@ bool LoadSpiceXML2DDet::getHB3AWavelength(MatrixWorkspace_sptr dataws, * @param dataws * @param wavelength */ -void LoadSpiceXML2DDet::setXtoLabQ(API::MatrixWorkspace_sptr dataws, +void LoadSpiceXML2DDet::setXtoLabQ(const API::MatrixWorkspace_sptr &dataws, const double &wavelength) { size_t numspec = dataws->getNumberHistograms(); @@ -1077,9 +1076,7 @@ void LoadSpiceXML2DDet::loadInstrument(API::MatrixWorkspace_sptr matrixws, loadinst->setProperty("RewriteSpectraMap", Mantid::Kernel::OptionalBool(true)); loadinst->execute(); - if (loadinst->isExecuted()) - matrixws = loadinst->getProperty("Workspace"); - else + if (!loadinst->isExecuted()) g_log.error("Unable to load instrument to output workspace"); } diff --git a/Framework/DataHandling/src/LoadStl.cpp b/Framework/DataHandling/src/LoadStl.cpp index 09aae99310d357bdf8006e20ddd26dab25c60846..e8613effdc4fed9c08bc0c3d33b4a3a8788809b4 100644 --- a/Framework/DataHandling/src/LoadStl.cpp +++ b/Framework/DataHandling/src/LoadStl.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/LoadStl.h" #include "MantidKernel/V3D.h" diff --git a/Framework/DataHandling/src/LoadSwans.cpp b/Framework/DataHandling/src/LoadSwans.cpp index fd920544c289f9db828119f1d9aceb3320fa8015..1f92b4dad1086d7915400af13a02c0583f0032d1 100644 --- a/Framework/DataHandling/src/LoadSwans.cpp +++ b/Framework/DataHandling/src/LoadSwans.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/LoadSwans.h" #include "MantidAPI/FileProperty.h" diff --git a/Framework/DataHandling/src/LoadTBL.cpp b/Framework/DataHandling/src/LoadTBL.cpp index ba9169b5b1fa1285cce080d3f9ae950cf01e3ee0..32b8778f367e9e648c7ffa43de25c71e8545daca 100644 --- a/Framework/DataHandling/src/LoadTBL.cpp +++ b/Framework/DataHandling/src/LoadTBL.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes @@ -81,7 +81,7 @@ int LoadTBL::confidence(Kernel::FileDescriptor &descriptor) const { * @param line the line to count from * @returns a size_t of how many commas were in line */ -size_t LoadTBL::countCommas(std::string line) const { +size_t LoadTBL::countCommas(const std::string &line) const { size_t found = 0; size_t pos = line.find(',', 0); if (pos != std::string::npos) { @@ -104,7 +104,7 @@ size_t LoadTBL::countCommas(std::string line) const { * @returns a size_t of how many pairs of quotes were in line */ size_t -LoadTBL::findQuotePairs(std::string line, +LoadTBL::findQuotePairs(const std::string &line, std::vector<std::vector<size_t>> "eBounds) const { size_t quoteOne = 0; size_t quoteTwo = 0; @@ -137,7 +137,7 @@ LoadTBL::findQuotePairs(std::string line, * @throws std::length_error if anything other than 17 columns (or 16 * cell-delimiting commas) is found */ -void LoadTBL::csvParse(std::string line, std::vector<std::string> &cols, +void LoadTBL::csvParse(const std::string &line, std::vector<std::string> &cols, std::vector<std::vector<size_t>> "eBounds, size_t expectedCommas) const { size_t pairID = 0; diff --git a/Framework/DataHandling/src/LoadTOFRawNexus.cpp b/Framework/DataHandling/src/LoadTOFRawNexus.cpp index 78d82cc7cc007255c1bc8702fe2d97650efe4023..70e95229d386aa2235aa911d7854350fdd623fa3 100644 --- a/Framework/DataHandling/src/LoadTOFRawNexus.cpp +++ b/Framework/DataHandling/src/LoadTOFRawNexus.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/LoadTOFRawNexus.h" #include "MantidAPI/Axis.h" @@ -20,6 +20,7 @@ #include <boost/algorithm/string/detail/classification.hpp> #include <boost/algorithm/string/split.hpp> +#include <utility> namespace Mantid { namespace DataHandling { @@ -267,7 +268,7 @@ namespace { // Check the numbers supplied are not in the range and erase the ones that are struct range_check { range_check(specnum_t min, specnum_t max, detid2index_map id_to_wi) - : m_min(min), m_max(max), m_id_to_wi(id_to_wi) {} + : m_min(min), m_max(max), m_id_to_wi(std::move(id_to_wi)) {} bool operator()(specnum_t x) { auto wi = static_cast<specnum_t>((m_id_to_wi)[x]); @@ -292,7 +293,7 @@ private: void LoadTOFRawNexus::loadBank(const std::string &nexusfilename, const std::string &entry_name, const std::string &bankName, - API::MatrixWorkspace_sptr WS, + const API::MatrixWorkspace_sptr &WS, const detid2index_map &id_to_wi) { g_log.debug() << "Loading bank " << bankName << '\n'; // To avoid segfaults on RHEL5/6 and Fedora diff --git a/Framework/DataHandling/src/MaskDetectors.cpp b/Framework/DataHandling/src/MaskDetectors.cpp index 37c03c2fe0dd87007946ea89886c8c665412fa80..1661e4a4605111cc81bbb257a0248d27493cd18a 100644 --- a/Framework/DataHandling/src/MaskDetectors.cpp +++ b/Framework/DataHandling/src/MaskDetectors.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/MaskDetectors.h" @@ -244,8 +244,8 @@ void MaskDetectors::exec() { * @param rangeInfo :: information about the spectrum range to use when masking */ void MaskDetectors::handleMaskByMaskWorkspace( - const MaskWorkspace_const_sptr maskWs, - const API::MatrixWorkspace_const_sptr WS, + const MaskWorkspace_const_sptr &maskWs, + const API::MatrixWorkspace_const_sptr &WS, std::vector<detid_t> &detectorList, std::vector<size_t> &indexList, const RangeInfo &rangeInfo) { @@ -280,8 +280,8 @@ void MaskDetectors::handleMaskByMaskWorkspace( * @param rangeInfo :: information about the spectrum range to use when masking */ void MaskDetectors::handleMaskByMatrixWorkspace( - const API::MatrixWorkspace_const_sptr maskWs, - const API::MatrixWorkspace_const_sptr WS, + const API::MatrixWorkspace_const_sptr &maskWs, + const API::MatrixWorkspace_const_sptr &WS, std::vector<detid_t> &detectorList, std::vector<size_t> &indexList, const RangeInfo &rangeInfo) { @@ -395,7 +395,7 @@ void MaskDetectors::extractMaskedWSDetIDs( * Peaks exec body * @param WS :: The input peaks workspace to be masked */ -void MaskDetectors::execPeaks(PeaksWorkspace_sptr WS) { +void MaskDetectors::execPeaks(const PeaksWorkspace_sptr &WS) { std::vector<detid_t> detectorList = getProperty("DetectorList"); const MatrixWorkspace_sptr prevMasking = getProperty("MaskedWorkspace"); @@ -455,7 +455,7 @@ void MaskDetectors::execPeaks(PeaksWorkspace_sptr WS) { void MaskDetectors::fillIndexListFromSpectra( std::vector<size_t> &indexList, std::vector<Indexing::SpectrumNumber> spectraList, - const API::MatrixWorkspace_sptr WS, + const API::MatrixWorkspace_sptr &WS, const std::tuple<size_t, size_t, bool> &range_info) { std::vector<size_t> tmp_index; @@ -494,7 +494,7 @@ void MaskDetectors::fillIndexListFromSpectra( * Boolean indicating if these ranges are defined */ void MaskDetectors::appendToIndexListFromWS( - std::vector<size_t> &indexList, const MatrixWorkspace_const_sptr sourceWS, + std::vector<size_t> &indexList, const MatrixWorkspace_const_sptr &sourceWS, const std::tuple<size_t, size_t, bool> &range_info) { std::vector<size_t> tmp_index; @@ -537,8 +537,8 @@ void MaskDetectors::appendToIndexListFromWS( */ void MaskDetectors::appendToDetectorListFromWS( std::vector<detid_t> &detectorList, - const MatrixWorkspace_const_sptr inputWs, - const MatrixWorkspace_const_sptr maskWs, + const MatrixWorkspace_const_sptr &inputWs, + const MatrixWorkspace_const_sptr &maskWs, const std::tuple<size_t, size_t, bool> &range_info) { const auto startIndex = std::get<0>(range_info); const auto endIndex = std::get<1>(range_info); @@ -567,7 +567,7 @@ void MaskDetectors::appendToDetectorListFromWS( */ void MaskDetectors::appendToIndexListFromMaskWS( std::vector<size_t> &indexList, - const DataObjects::MaskWorkspace_const_sptr maskedWorkspace, + const DataObjects::MaskWorkspace_const_sptr &maskedWorkspace, const std::tuple<size_t, size_t, bool> &range_info) { std::vector<size_t> tmp_index; @@ -610,7 +610,7 @@ void MaskDetectors::appendToIndexListFromMaskWS( void MaskDetectors::appendToDetectorListFromComponentList( std::vector<detid_t> &detectorList, const std::vector<std::string> &componentList, - const API::MatrixWorkspace_const_sptr WS) { + const API::MatrixWorkspace_const_sptr &WS) { const auto instrument = WS->getInstrument(); if (!instrument) { g_log.error() diff --git a/Framework/DataHandling/src/MaskDetectorsInShape.cpp b/Framework/DataHandling/src/MaskDetectorsInShape.cpp index 84a8a117563b300ddb13405906d7fe4866a1e485..08b2a090d9deccb5f9e997d58dd43ccdadf24b86 100644 --- a/Framework/DataHandling/src/MaskDetectorsInShape.cpp +++ b/Framework/DataHandling/src/MaskDetectorsInShape.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/MaskDetectorsInShape.h" @@ -53,7 +53,7 @@ void MaskDetectorsInShape::exec() { /// Run the FindDetectorsInShape Child Algorithm std::vector<int> MaskDetectorsInShape::runFindDetectorsInShape( - API::MatrixWorkspace_sptr workspace, const std::string shapeXML, + const API::MatrixWorkspace_sptr &workspace, const std::string &shapeXML, const bool includeMonitors) { IAlgorithm_sptr alg = createChildAlgorithm("FindDetectorsInShape"); alg->setPropertyValue("IncludeMonitors", includeMonitors ? "1" : "0"); @@ -76,7 +76,8 @@ std::vector<int> MaskDetectorsInShape::runFindDetectorsInShape( } void MaskDetectorsInShape::runMaskDetectors( - API::MatrixWorkspace_sptr workspace, const std::vector<int> &detectorIds) { + const API::MatrixWorkspace_sptr &workspace, + const std::vector<int> &detectorIds) { auto &detectorInfo = workspace->mutableDetectorInfo(); for (const auto &id : detectorIds) detectorInfo.setMasked(detectorInfo.indexOf(id), true); diff --git a/Framework/DataHandling/src/MaskSpectra.cpp b/Framework/DataHandling/src/MaskSpectra.cpp index 541656d284be5e3674c102473543953484f33888..f10384929bfa2577f97be0eb8ce4fb609dd62504 100644 --- a/Framework/DataHandling/src/MaskSpectra.cpp +++ b/Framework/DataHandling/src/MaskSpectra.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/MaskSpectra.h" #include "MantidAPI/Algorithm.tcc" diff --git a/Framework/DataHandling/src/MeshFileIO.cpp b/Framework/DataHandling/src/MeshFileIO.cpp index 2a087ed9fcedc0f898a5cf257cc00cc6b0b3360f..6b899115961f763a04bcdd3b85edabb69d0deb27 100644 --- a/Framework/DataHandling/src/MeshFileIO.cpp +++ b/Framework/DataHandling/src/MeshFileIO.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/MeshFileIO.h" @@ -88,7 +88,7 @@ Kernel::Matrix<double> MeshFileIO::generateZRotation(double zRotation) { */ boost::shared_ptr<Geometry::MeshObject> MeshFileIO::translate(boost::shared_ptr<Geometry::MeshObject> environmentMesh, - const std::vector<double> translationVector) { + const std::vector<double> &translationVector) { std::vector<double> checkVector = std::vector<double>(3, 0.0); if (translationVector != checkVector) { if (translationVector.size() != 3) { diff --git a/Framework/DataHandling/src/ModifyDetectorDotDatFile.cpp b/Framework/DataHandling/src/ModifyDetectorDotDatFile.cpp index dde0a11c38ca29259804dd070f4aacfa2647143d..a7323dbec7b00b0f06e66065735a2d5d68df095f 100644 --- a/Framework/DataHandling/src/ModifyDetectorDotDatFile.cpp +++ b/Framework/DataHandling/src/ModifyDetectorDotDatFile.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/ModifyDetectorDotDatFile.h" #include "MantidAPI/ExperimentInfo.h" diff --git a/Framework/DataHandling/src/MoveInstrumentComponent.cpp b/Framework/DataHandling/src/MoveInstrumentComponent.cpp index 3351f45b5944aa5ab818db6849bb1354e1c10989..0fef348ea450e562656a7d3ad9eac63bd3e0539b 100644 --- a/Framework/DataHandling/src/MoveInstrumentComponent.cpp +++ b/Framework/DataHandling/src/MoveInstrumentComponent.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/MoveInstrumentComponent.h" #include "MantidDataObjects/PeaksWorkspace.h" diff --git a/Framework/DataHandling/src/NexusTester.cpp b/Framework/DataHandling/src/NexusTester.cpp index 4aeef600cf38813150de7123306fea306c570280..317e451bb6c9fce1aeb88bf8058bb98166b4b3c9 100644 --- a/Framework/DataHandling/src/NexusTester.cpp +++ b/Framework/DataHandling/src/NexusTester.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/NexusTester.h" #include "MantidAPI/FileProperty.h" diff --git a/Framework/DataHandling/src/ORNLDataArchive.cpp b/Framework/DataHandling/src/ORNLDataArchive.cpp index b2049b57c34a5363a664c9bac4fe64f49477a083..5aca71f158dcd855242b1fbe0bc90ed22698b427 100644 --- a/Framework/DataHandling/src/ORNLDataArchive.cpp +++ b/Framework/DataHandling/src/ORNLDataArchive.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/DataHandling/src/PDLoadCharacterizations.cpp b/Framework/DataHandling/src/PDLoadCharacterizations.cpp index ee65146cd9e59df09a37a911e4b9ade867665778..6bccfcb4b5f6224e29ae90466eeefc478b456a2c 100644 --- a/Framework/DataHandling/src/PDLoadCharacterizations.cpp +++ b/Framework/DataHandling/src/PDLoadCharacterizations.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/PDLoadCharacterizations.h" #include "MantidAPI/FileProperty.h" @@ -298,7 +298,7 @@ std::vector<std::string> PDLoadCharacterizations::getFilenames() { * @returns line number that file was read to */ int PDLoadCharacterizations::readFocusInfo(std::ifstream &file, - const std::string filename) { + const std::string &filename) { // end early if already at the end of the file if (file.eof()) return 0; diff --git a/Framework/DataHandling/src/ParallelEventLoader.cpp b/Framework/DataHandling/src/ParallelEventLoader.cpp index 0245ed6ce1f872d21166ca3e68581b9f727c8e45..c4e132bbf646ab0afa51365332ffa4b3b9ae0a52 100644 --- a/Framework/DataHandling/src/ParallelEventLoader.cpp +++ b/Framework/DataHandling/src/ParallelEventLoader.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/ParallelEventLoader.h" #include "MantidDataObjects/EventWorkspace.h" diff --git a/Framework/DataHandling/src/PatchBBY.cpp b/Framework/DataHandling/src/PatchBBY.cpp index ab695d1a070457933d67fd37e2a5123bee4635f1..6effcdc1a8821f9ce371c8f311285d8059f27f90 100644 --- a/Framework/DataHandling/src/PatchBBY.cpp +++ b/Framework/DataHandling/src/PatchBBY.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/PatchBBY.h" #include "MantidAPI/FileProperty.h" diff --git a/Framework/DataHandling/src/ProcessBankData.cpp b/Framework/DataHandling/src/ProcessBankData.cpp index 97f578f16e89e0e5bd343302dc82ebaf32c8e89f..120fcf64becde776c121ddcb8baebed4e5c9d95d 100644 --- a/Framework/DataHandling/src/ProcessBankData.cpp +++ b/Framework/DataHandling/src/ProcessBankData.cpp @@ -1,12 +1,14 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + -#include "MantidDataHandling/ProcessBankData.h" +#include <utility> + #include "MantidDataHandling/DefaultEventLoader.h" #include "MantidDataHandling/LoadEventNexus.h" +#include "MantidDataHandling/ProcessBankData.h" using namespace Mantid::DataObjects; @@ -21,14 +23,16 @@ ProcessBankData::ProcessBankData( boost::shared_ptr<BankPulseTimes> thisBankPulseTimes, bool have_weight, boost::shared_array<float> event_weight, detid_t min_event_id, detid_t max_event_id) - : Task(), m_loader(m_loader), entry_name(entry_name), + : Task(), m_loader(m_loader), entry_name(std::move(entry_name)), pixelID_to_wi_vector(m_loader.pixelID_to_wi_vector), pixelID_to_wi_offset(m_loader.pixelID_to_wi_offset), prog(prog), - event_id(event_id), event_time_of_flight(event_time_of_flight), - numEvents(numEvents), startAt(startAt), event_index(event_index), - thisBankPulseTimes(thisBankPulseTimes), have_weight(have_weight), - event_weight(event_weight), m_min_id(min_event_id), - m_max_id(max_event_id) { + event_id(std::move(event_id)), + event_time_of_flight(std::move(event_time_of_flight)), + numEvents(numEvents), startAt(startAt), + event_index(std::move(event_index)), + thisBankPulseTimes(std::move(thisBankPulseTimes)), + have_weight(have_weight), event_weight(std::move(event_weight)), + m_min_id(min_event_id), m_max_id(max_event_id) { // Cost is approximately proportional to the number of events to process. m_cost = static_cast<double>(numEvents); } @@ -88,7 +92,7 @@ void ProcessBankData::run() { // override { // Now we pre-allocate (reserve) the vectors of events in each pixel // counted const size_t numEventLists = outputWS.getNumberHistograms(); - for (detid_t pixID = m_min_id; pixID <= m_max_id; pixID++) { + for (detid_t pixID = m_min_id; pixID <= m_max_id; ++pixID) { if (counts[pixID - m_min_id] > 0) { size_t wi = getWorkspaceIndexFromPixelID(pixID); // Find the the workspace index corresponding to that pixel ID @@ -220,7 +224,7 @@ void ProcessBankData::run() { // override { //------------ Compress Events (or set sort order) ------------------ // Do it on all the detector IDs we touched if (compress) { - for (detid_t pixID = m_min_id; pixID <= m_max_id; pixID++) { + for (detid_t pixID = m_min_id; pixID <= m_max_id; ++pixID) { if (usedDetIds[pixID - m_min_id]) { // Find the the workspace index corresponding to that pixel ID size_t wi = getWorkspaceIndexFromPixelID(pixID); diff --git a/Framework/DataHandling/src/RawFileInfo.cpp b/Framework/DataHandling/src/RawFileInfo.cpp index d4a1101eccc55966f6dae307f768248b32e583ac..c6164b48e85fb453f73b8191e79a8363751c0f5f 100644 --- a/Framework/DataHandling/src/RawFileInfo.cpp +++ b/Framework/DataHandling/src/RawFileInfo.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------- // Includes diff --git a/Framework/DataHandling/src/ReadMaterial.cpp b/Framework/DataHandling/src/ReadMaterial.cpp index 5cc03a0ed259d50cc96871c1993a6898726e29ba..a980ac163eedae10a6b9899c0af60ec85f86cd25 100644 --- a/Framework/DataHandling/src/ReadMaterial.cpp +++ b/Framework/DataHandling/src/ReadMaterial.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/ReadMaterial.h" #include "MantidAPI/Algorithm.h" @@ -80,8 +80,6 @@ ReadMaterial::validateInputs(const MaterialParameters ¶ms) { if (canCalculateMassDensity) { result["SampleMassDensity"] = "Cannot give SampleMassDensity with SampleNumberDensity set"; - result["SampleMassDensity"] = - "Cannot give SampleMassDensity with SampleNumberDensity set"; } } return result; @@ -120,7 +118,7 @@ std::unique_ptr<Kernel::Material> ReadMaterial::buildMaterial() { return std::make_unique<Kernel::Material>(builder.build()); } -void ReadMaterial::setMaterial(const std::string chemicalSymbol, +void ReadMaterial::setMaterial(const std::string &chemicalSymbol, const int atomicNumber, const int massNumber) { if (!chemicalSymbol.empty()) { builder.setFormula(chemicalSymbol); diff --git a/Framework/DataHandling/src/RemoveLogs.cpp b/Framework/DataHandling/src/RemoveLogs.cpp index 3e5a75aeb99781521aad14721d09a58dc87d3643..f2dbe6e7ad0a8dc825aa81110ffe71c9e9b2e04f 100644 --- a/Framework/DataHandling/src/RemoveLogs.cpp +++ b/Framework/DataHandling/src/RemoveLogs.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/DataHandling/src/RenameLog.cpp b/Framework/DataHandling/src/RenameLog.cpp index 4e70bed82d0e81eefea902aec713de91138bcbaa..628b8f48b3ab583685139c2c53e4047260c1edec 100644 --- a/Framework/DataHandling/src/RenameLog.cpp +++ b/Framework/DataHandling/src/RenameLog.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/RenameLog.h" #include "MantidAPI/MatrixWorkspace.h" diff --git a/Framework/DataHandling/src/RotateInstrumentComponent.cpp b/Framework/DataHandling/src/RotateInstrumentComponent.cpp index 1fa81f42a4533f240d0b114450dad0b27758d301..9adf12e05f14453a75382181553b6e43c6f38110 100644 --- a/Framework/DataHandling/src/RotateInstrumentComponent.cpp +++ b/Framework/DataHandling/src/RotateInstrumentComponent.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/RotateInstrumentComponent.h" #include "MantidDataObjects/PeaksWorkspace.h" diff --git a/Framework/DataHandling/src/RotateSource.cpp b/Framework/DataHandling/src/RotateSource.cpp index 46678da60e3ea31365a57e66aaf543b9da1684f7..204fd9a2129fb0b06d391cf7d09092426cf703a5 100644 --- a/Framework/DataHandling/src/RotateSource.cpp +++ b/Framework/DataHandling/src/RotateSource.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/RotateSource.h" #include "MantidDataObjects/PeaksWorkspace.h" diff --git a/Framework/DataHandling/src/SampleEnvironmentFactory.cpp b/Framework/DataHandling/src/SampleEnvironmentFactory.cpp index 4c5f6a8a40cf1eb9944baec209861375f67d6426..2fd72a25384b9eb0e11907cb56ac4476da1acc7e 100644 --- a/Framework/DataHandling/src/SampleEnvironmentFactory.cpp +++ b/Framework/DataHandling/src/SampleEnvironmentFactory.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/SampleEnvironmentFactory.h" #include "MantidDataHandling/SampleEnvironmentSpecParser.h" diff --git a/Framework/DataHandling/src/SampleEnvironmentSpec.cpp b/Framework/DataHandling/src/SampleEnvironmentSpec.cpp index 4cd741870f2ac421307fcbcea523698e6258c43d..75b10f2bfbfda78630daca47a3c11835af27a05d 100644 --- a/Framework/DataHandling/src/SampleEnvironmentSpec.cpp +++ b/Framework/DataHandling/src/SampleEnvironmentSpec.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/SampleEnvironmentSpec.h" diff --git a/Framework/DataHandling/src/SampleEnvironmentSpecParser.cpp b/Framework/DataHandling/src/SampleEnvironmentSpecParser.cpp index 9fa03151b78240591c238971d3cc8e7c44642e86..abd34e805106dfca274f7fd091a3d4688afdf29c 100644 --- a/Framework/DataHandling/src/SampleEnvironmentSpecParser.cpp +++ b/Framework/DataHandling/src/SampleEnvironmentSpecParser.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/SampleEnvironmentSpecParser.h" #include "MantidAPI/FileFinder.h" @@ -259,7 +259,7 @@ SampleEnvironmentSpecParser::parseContainer(Element *element) const { * @param targetVariable Value read from element attribute */ void SampleEnvironmentSpecParser::LoadOptionalDoubleFromXML( - Poco::XML::Element *componentElement, std::string attributeName, + Poco::XML::Element *componentElement, const std::string &attributeName, double &targetVariable) const { auto attributeText = componentElement->getAttribute(attributeName); @@ -280,7 +280,7 @@ void SampleEnvironmentSpecParser::LoadOptionalDoubleFromXML( * @return vector containing translations */ std::vector<double> SampleEnvironmentSpecParser::parseTranslationVector( - std::string translationVectorStr) const { + const std::string &translationVectorStr) const { std::vector<double> translationVector; diff --git a/Framework/DataHandling/src/SaveANSTOAscii.cpp b/Framework/DataHandling/src/SaveANSTOAscii.cpp index 12a3a63cb714f675fa4ad7e20876a4db68583908..9e86b4c8974536d4276248bb6b9fc309be221df6 100644 --- a/Framework/DataHandling/src/SaveANSTOAscii.cpp +++ b/Framework/DataHandling/src/SaveANSTOAscii.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/SaveANSTOAscii.h" diff --git a/Framework/DataHandling/src/SaveAscii.cpp b/Framework/DataHandling/src/SaveAscii.cpp index ec718bc25528250ed1ae8b0fc270679ddd08b4f4..a98894a50713eb5194449acd4c684a031aecbc64 100644 --- a/Framework/DataHandling/src/SaveAscii.cpp +++ b/Framework/DataHandling/src/SaveAscii.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/DataHandling/src/SaveAscii2.cpp b/Framework/DataHandling/src/SaveAscii2.cpp index 97e0db1dfc76654d38cdd0fe362f4c0ed356840d..b4b20cc7d6e9a4f138f9ff3b48bec7da738f17b9 100644 --- a/Framework/DataHandling/src/SaveAscii2.cpp +++ b/Framework/DataHandling/src/SaveAscii2.cpp @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #include "MantidDataHandling/SaveAscii2.h" #include "MantidAPI/Axis.h" #include "MantidAPI/BinEdgeAxis.h" @@ -474,7 +473,7 @@ bool SaveAscii2::findElementInUnorderedStringVector( return std::find(vector.cbegin(), vector.cend(), toFind) != vector.cend(); } -void SaveAscii2::writeTableWorkspace(ITableWorkspace_const_sptr tws, +void SaveAscii2::writeTableWorkspace(const ITableWorkspace_const_sptr &tws, const std::string &filename, bool appendToFile, bool writeHeader, int prec, bool scientific, diff --git a/Framework/DataHandling/src/SaveBankScatteringAngles.cpp b/Framework/DataHandling/src/SaveBankScatteringAngles.cpp index c7c6493d8c56b8b8a77528b20c8cd4c544b7cb90..05be7d01b44d1d9a239e5981f6f25d8e41587b34 100644 --- a/Framework/DataHandling/src/SaveBankScatteringAngles.cpp +++ b/Framework/DataHandling/src/SaveBankScatteringAngles.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/SaveBankScatteringAngles.h" diff --git a/Framework/DataHandling/src/SaveCSV.cpp b/Framework/DataHandling/src/SaveCSV.cpp index e54966ae95ed58be4646d4f0e6766ec08c0725f8..ffe7c857944f8f5a1ac4003333d01c9ca6bd691c 100644 --- a/Framework/DataHandling/src/SaveCSV.cpp +++ b/Framework/DataHandling/src/SaveCSV.cpp @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #include "MantidDataHandling/SaveCSV.h" #include "MantidAPI/FileProperty.h" #include "MantidDataObjects/Workspace2D.h" @@ -185,9 +184,10 @@ void SaveCSV::exec() { outCSV_File.close(); } -void SaveCSV::saveXerrors(std::ofstream &stream, - const Mantid::DataObjects::Workspace2D_sptr workspace, - const size_t numberOfHist) { +void SaveCSV::saveXerrors( + std::ofstream &stream, + const Mantid::DataObjects::Workspace2D_sptr &workspace, + const size_t numberOfHist) { // If there isn't a dx values present in the first entry then return if (!workspace->hasDx(0)) { return; diff --git a/Framework/DataHandling/src/SaveCalFile.cpp b/Framework/DataHandling/src/SaveCalFile.cpp index 757bd40d26a7feeec043c9314431c9ae4393e82f..ddf6721fe4b616a169974c9d214f3bf81d2499c6 100644 --- a/Framework/DataHandling/src/SaveCalFile.cpp +++ b/Framework/DataHandling/src/SaveCalFile.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/SaveCalFile.h" #include "MantidAPI/FileProperty.h" @@ -80,9 +80,9 @@ void SaveCalFile::exec() { *(selected) if not specified. */ void SaveCalFile::saveCalFile(const std::string &calFileName, - GroupingWorkspace_sptr groupWS, - OffsetsWorkspace_sptr offsetsWS, - MaskWorkspace_sptr maskWS) { + const GroupingWorkspace_sptr &groupWS, + const OffsetsWorkspace_sptr &offsetsWS, + const MaskWorkspace_sptr &maskWS) { Instrument_const_sptr inst; bool doGroup = false; diff --git a/Framework/DataHandling/src/SaveCanSAS1D.cpp b/Framework/DataHandling/src/SaveCanSAS1D.cpp index 380a0ed53132a46a0b872ac0d4ba0f670441f735..8e8d8802f7586129f50b564f42c11f4b9723c544 100644 --- a/Framework/DataHandling/src/SaveCanSAS1D.cpp +++ b/Framework/DataHandling/src/SaveCanSAS1D.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/SaveCanSAS1D.h" diff --git a/Framework/DataHandling/src/SaveCanSAS1D2.cpp b/Framework/DataHandling/src/SaveCanSAS1D2.cpp index c8fe3e0c80c4da8f4829a6f9663aa9226af670ad..5a11c8a5a0aee3f9721f02acbc5b3dd946feaa96 100644 --- a/Framework/DataHandling/src/SaveCanSAS1D2.cpp +++ b/Framework/DataHandling/src/SaveCanSAS1D2.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/SaveCanSAS1D2.h" #include "MantidAPI/Axis.h" diff --git a/Framework/DataHandling/src/SaveDaveGrp.cpp b/Framework/DataHandling/src/SaveDaveGrp.cpp index b37103a425b672f232015b1b34a967e69bac6eab..3d83d345713f54143450a94a24905cf14b314089 100644 --- a/Framework/DataHandling/src/SaveDaveGrp.cpp +++ b/Framework/DataHandling/src/SaveDaveGrp.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/SaveDaveGrp.h" #include "MantidAPI/Axis.h" diff --git a/Framework/DataHandling/src/SaveDetectorsGrouping.cpp b/Framework/DataHandling/src/SaveDetectorsGrouping.cpp index 669ff7626bf3ab469cef886eee2eef2698bd6e4e..33f3f59cda0925b4cec88dc58809f9fcdeb1d8ab 100644 --- a/Framework/DataHandling/src/SaveDetectorsGrouping.cpp +++ b/Framework/DataHandling/src/SaveDetectorsGrouping.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/SaveDetectorsGrouping.h" @@ -143,8 +143,8 @@ void SaveDetectorsGrouping::convertToDetectorsRanges( } void SaveDetectorsGrouping::printToXML( - std::map<int, std::vector<detid_t>> groupdetidrangemap, - std::string xmlfilename) { + const std::map<int, std::vector<detid_t>> &groupdetidrangemap, + const std::string &xmlfilename) { // 1. Get Instrument information const auto &instrument = mGroupWS->getInstrument(); diff --git a/Framework/DataHandling/src/SaveDiffCal.cpp b/Framework/DataHandling/src/SaveDiffCal.cpp index 124ab34c3cfff61e327ca7c5a242d87e48a1a6ce..1911d8a18894b7cd8dbb9279dc9f9617ca1ea520 100644 --- a/Framework/DataHandling/src/SaveDiffCal.cpp +++ b/Framework/DataHandling/src/SaveDiffCal.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/SaveDiffCal.h" #include "MantidAPI/FileProperty.h" @@ -107,6 +107,7 @@ std::map<std::string, std::string> SaveDiffCal::validateInputs() { void SaveDiffCal::writeDoubleFieldFromTable(H5::Group &group, const std::string &name) { auto column = m_calibrationWS->getColumn(name); + // cppcheck-suppress compareBoolExpressionWithInt auto data = column->numeric_fill<>(m_numValues); H5Util::writeArray1D(group, name, data); } @@ -121,7 +122,7 @@ void SaveDiffCal::writeIntFieldFromTable(H5::Group &group, // TODO should flip for mask void SaveDiffCal::writeIntFieldFromSVWS( H5::Group &group, const std::string &name, - DataObjects::SpecialWorkspace2D_const_sptr ws) { + const DataObjects::SpecialWorkspace2D_const_sptr &ws) { const bool isMask = (name == "use"); // output array defaults to all one (one group, use the pixel) diff --git a/Framework/DataHandling/src/SaveDiffFittingAscii.cpp b/Framework/DataHandling/src/SaveDiffFittingAscii.cpp index 1ff23b2fb823997c4c60a5e46fb36c0e3e3acbb3..855f18b005d43ab8dc3b8bc6820ce4e8b37cb540 100644 --- a/Framework/DataHandling/src/SaveDiffFittingAscii.cpp +++ b/Framework/DataHandling/src/SaveDiffFittingAscii.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/SaveDiffFittingAscii.h" @@ -111,7 +111,7 @@ bool SaveDiffFittingAscii::processGroups() { } void SaveDiffFittingAscii::processAll( - const std::vector<API::ITableWorkspace_sptr> input_ws) { + const std::vector<API::ITableWorkspace_sptr> &input_ws) { const std::string filename = getProperty("Filename"); const std::string outMode = getProperty("OutMode"); @@ -208,7 +208,7 @@ void SaveDiffFittingAscii::writeHeader( } } -void SaveDiffFittingAscii::writeData(const API::ITableWorkspace_sptr workspace, +void SaveDiffFittingAscii::writeData(const API::ITableWorkspace_sptr &workspace, std::ofstream &file, const size_t columnSize) { diff --git a/Framework/DataHandling/src/SaveDspacemap.cpp b/Framework/DataHandling/src/SaveDspacemap.cpp index d73dec64bdbe625a48301ad9104fb3138d14116f..aec81df61090cf12ca9c730e716a1da2bb74b9dd 100644 --- a/Framework/DataHandling/src/SaveDspacemap.cpp +++ b/Framework/DataHandling/src/SaveDspacemap.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/SaveDspacemap.h" #include "MantidAPI/FileProperty.h" @@ -56,8 +56,8 @@ void SaveDspacemap::exec() { * @param offsetsWS :: OffsetsWorkspace with instrument and offsets */ void SaveDspacemap::CalculateDspaceFromCal( - Mantid::DataObjects::OffsetsWorkspace_sptr offsetsWS, - std::string DFileName) { + const Mantid::DataObjects::OffsetsWorkspace_sptr &offsetsWS, + const std::string &DFileName) { const char *filename = DFileName.c_str(); // Get a pointer to the instrument contained in the workspace Instrument_const_sptr instrument = offsetsWS->getInstrument(); @@ -87,7 +87,7 @@ void SaveDspacemap::CalculateDspaceFromCal( std::ofstream fout(filename, std::ios_base::out | std::ios_base::binary); Progress prog(this, 0.0, 1.0, maxdetID); - for (detid_t i = 0; i != maxdetID; i++) { + for (detid_t i = 0; i != maxdetID; ++i) { // Compute the factor double factor; Geometry::IDetector_const_sptr det; diff --git a/Framework/DataHandling/src/SaveFITS.cpp b/Framework/DataHandling/src/SaveFITS.cpp index 38b993283b7174f362131c0833c04511acefd5ef..a1ed7eb99a111a11ae7f74d9ab9d25f48077de78 100644 --- a/Framework/DataHandling/src/SaveFITS.cpp +++ b/Framework/DataHandling/src/SaveFITS.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/SaveFITS.h" @@ -143,7 +143,7 @@ void SaveFITS::exec() { * @param img matrix workspace (one spectrum per row) * @param filename relative or full path, should be already checked */ -void SaveFITS::saveFITSImage(const API::MatrixWorkspace_sptr img, +void SaveFITS::saveFITSImage(const API::MatrixWorkspace_sptr &img, const std::string &filename) { std::ofstream outfile(filename, std::ofstream::binary); @@ -151,7 +151,7 @@ void SaveFITS::saveFITSImage(const API::MatrixWorkspace_sptr img, writeFITSImageMatrix(img, outfile); } -void SaveFITS::writeFITSHeaderBlock(const API::MatrixWorkspace_sptr img, +void SaveFITS::writeFITSHeaderBlock(const API::MatrixWorkspace_sptr &img, std::ofstream &file) { // minimal sequence of standard headers writeFITSHeaderEntry(g_FITSHdrFirst, file); @@ -169,7 +169,7 @@ void SaveFITS::writeFITSHeaderBlock(const API::MatrixWorkspace_sptr img, writePaddingFITSHeaders(entriesPerHDU - 9, file); } -void SaveFITS::writeFITSImageMatrix(const API::MatrixWorkspace_sptr img, +void SaveFITS::writeFITSImageMatrix(const API::MatrixWorkspace_sptr &img, std::ofstream &file) { const size_t sizeX = img->blocksize(); const size_t sizeY = img->getNumberHistograms(); @@ -213,7 +213,7 @@ void SaveFITS::writeFITSHeaderEntry(const std::string &hdr, file.write(blanks.data(), g_maxLenHdr - count); } -void SaveFITS::writeFITSHeaderAxesSizes(const API::MatrixWorkspace_sptr img, +void SaveFITS::writeFITSHeaderAxesSizes(const API::MatrixWorkspace_sptr &img, std::ofstream &file) { const std::string sizeX = std::to_string(img->blocksize()); const std::string sizeY = std::to_string(img->getNumberHistograms()); diff --git a/Framework/DataHandling/src/SaveFocusedXYE.cpp b/Framework/DataHandling/src/SaveFocusedXYE.cpp index 1dbdd9a1838d66a8a387dd78b59c0bc7c6d9a8f5..b7f792e257c660828a1d897e758baf832df638e9 100644 --- a/Framework/DataHandling/src/SaveFocusedXYE.cpp +++ b/Framework/DataHandling/src/SaveFocusedXYE.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/SaveFocusedXYE.h" #include "MantidAPI/Axis.h" diff --git a/Framework/DataHandling/src/SaveFullprofResolution.cpp b/Framework/DataHandling/src/SaveFullprofResolution.cpp index 1f3ac15a050e49752013d2049aefcfea93f6f02b..b0fe14c72c8aa6f8be85871ef322d92fc22b42bd 100644 --- a/Framework/DataHandling/src/SaveFullprofResolution.cpp +++ b/Framework/DataHandling/src/SaveFullprofResolution.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/SaveFullprofResolution.h" #include "MantidAPI/FileProperty.h" @@ -480,7 +480,7 @@ std::string SaveFullprofResolution::toProf9IrfString() { /** Check wether a profile parameter map has the parameter */ bool SaveFullprofResolution::has_key(std::map<std::string, double> profmap, - std::string key) { + const std::string &key) { map<string, double>::iterator fiter; fiter = profmap.find(key); bool exist = true; diff --git a/Framework/DataHandling/src/SaveGDA.cpp b/Framework/DataHandling/src/SaveGDA.cpp index c1f059d278cd732015deb4f48933df4468b13c41..fe6497c0e3dbf5897df3f8c42ef8d568018b8998 100644 --- a/Framework/DataHandling/src/SaveGDA.cpp +++ b/Framework/DataHandling/src/SaveGDA.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/SaveGDA.h" diff --git a/Framework/DataHandling/src/SaveGSASInstrumentFile.cpp b/Framework/DataHandling/src/SaveGSASInstrumentFile.cpp index d36fa246eb29397761a11f39fa1b25eb597fb7d3..940ca4ab246527012b02f557c0ea07d04a08040e 100644 --- a/Framework/DataHandling/src/SaveGSASInstrumentFile.cpp +++ b/Framework/DataHandling/src/SaveGSASInstrumentFile.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/SaveGSASInstrumentFile.h" #include "MantidAPI/FileProperty.h" @@ -142,8 +142,7 @@ vector<unsigned int> ChopperConfiguration::getBankIDs() const { } //---------------------------------------------------------------------------------------------- -/** - */ + bool ChopperConfiguration::hasBank(unsigned int bankid) const { return std::find(m_bankIDs.begin(), m_bankIDs.end(), bankid) != m_bankIDs.end(); @@ -506,7 +505,7 @@ void SaveGSASInstrumentFile::initConstants( /** Parse profile table workspace to a map (the new ... */ void SaveGSASInstrumentFile::parseProfileTableWorkspace( - ITableWorkspace_sptr ws, + const ITableWorkspace_sptr &ws, map<unsigned int, map<string, double>> &profilemap) { size_t numbanks = ws->columnCount() - 1; size_t numparams = ws->rowCount(); @@ -897,74 +896,74 @@ void SaveGSASInstrumentFile::writePRMSingleBank( throw runtime_error(errss.str()); } - fprintf(pFile, "INS %2d ICONS%10.3f%10.3f%10.3f %10.3f%5d%10.3f\n", + fprintf(pFile, "INS %2u ICONS%10.3f%10.3f%10.3f %10.3f%5d%10.3f\n", bankid, instC * 1.00009, 0.0, zero, 0.0, 0, 0.0); - fprintf(pFile, "INS %2dBNKPAR%10.3f%10.3f%10.3f%10.3f%10.3f%5d%5d\n", bankid, + fprintf(pFile, "INS %2uBNKPAR%10.3f%10.3f%10.3f%10.3f%10.3f%5d%5d\n", bankid, m_L2, twotheta, 0., 0., 0.2, 1, 1); - fprintf(pFile, "INS %2dBAKGD 1 4 Y 0 Y\n", bankid); - fprintf(pFile, "INS %2dI HEAD %s\n", bankid, titleline.c_str()); - fprintf(pFile, "INS %2dI ITYP%5d%10.4f%10.4f%10i\n", bankid, 0, + fprintf(pFile, "INS %2uBAKGD 1 4 Y 0 Y\n", bankid); + fprintf(pFile, "INS %2uI HEAD %s\n", bankid, titleline.c_str()); + fprintf(pFile, "INS %2uI ITYP%5d%10.4f%10.4f%10i\n", bankid, 0, mindsp * 0.001 * instC, maxtof, randint); - fprintf(pFile, "INS %2dINAME %s \n", bankid, m_instrument.c_str()); - fprintf(pFile, "INS %2dPRCF1 %5d%5d%10.5f\n", bankid, -3, 21, 0.002); - fprintf(pFile, "INS %2dPRCF11%15.6f%15.6f%15.6f%15.6f\n", bankid, 0.0, 0.0, + fprintf(pFile, "INS %2uINAME %s \n", bankid, m_instrument.c_str()); + fprintf(pFile, "INS %2uPRCF1 %5d%5d%10.5f\n", bankid, -3, 21, 0.002); + fprintf(pFile, "INS %2uPRCF11%15.6f%15.6f%15.6f%15.6f\n", bankid, 0.0, 0.0, 0.0, sig0); - fprintf(pFile, "INS %2dPRCF12%15.6f%15.6f%15.6f%15.6f\n", bankid, sig1, sig2, + fprintf(pFile, "INS %2uPRCF12%15.6f%15.6f%15.6f%15.6f\n", bankid, sig1, sig2, gam0, gam1); - fprintf(pFile, "INS %2dPRCF13%15.6f%15.6f%15.6f%15.6f\n", bankid, gam2, 0.0, + fprintf(pFile, "INS %2uPRCF13%15.6f%15.6f%15.6f%15.6f\n", bankid, gam2, 0.0, 0.0, 0.0); - fprintf(pFile, "INS %2dPRCF14%15.6f%15.6f%15.6f%15.6f\n", bankid, 0.0, 0.0, + fprintf(pFile, "INS %2uPRCF14%15.6f%15.6f%15.6f%15.6f\n", bankid, 0.0, 0.0, 0.0, 0.0); - fprintf(pFile, "INS %2dPRCF15%15.6f%15.6f%15.6f%15.6f\n", bankid, 0.0, 0.0, + fprintf(pFile, "INS %2uPRCF15%15.6f%15.6f%15.6f%15.6f\n", bankid, 0.0, 0.0, 0.0, 0.0); - fprintf(pFile, "INS %2dPRCF16%15.6f\n", bankid, 0.0); - fprintf(pFile, "INS %2dPAB3 %3d\n", bankid, 90); + fprintf(pFile, "INS %2uPRCF16%15.6f\n", bankid, 0.0); + fprintf(pFile, "INS %2uPAB3 %3d\n", bankid, 90); for (size_t k = 0; k < 90; ++k) { - fprintf(pFile, "INS %2dPAB3%2d%10.5f%10.5f%10.5f%10.5f\n", bankid, + fprintf(pFile, "INS %2uPAB3%2d%10.5f%10.5f%10.5f%10.5f\n", bankid, static_cast<int>(k) + 1, m_gdsp[k], m_gdt[k], m_galpha[k], m_gbeta[k]); } - fprintf(pFile, "INS %2dPRCF2 %5i%5i%10.5f\n", bankid, -4, 27, 0.002); - fprintf(pFile, "INS %2dPRCF21%15.6f%15.6f%15.6f%15.6f\n", bankid, 0.0, 0.0, + fprintf(pFile, "INS %2uPRCF2 %5i%5i%10.5f\n", bankid, -4, 27, 0.002); + fprintf(pFile, "INS %2uPRCF21%15.6f%15.6f%15.6f%15.6f\n", bankid, 0.0, 0.0, 0.0, sig1); - fprintf(pFile, "INS %2dPRCF22%15.6f%15.6f%15.6f%15.6f\n", bankid, sig2, gam2, + fprintf(pFile, "INS %2uPRCF22%15.6f%15.6f%15.6f%15.6f\n", bankid, sig2, gam2, 0.0, 0.0); - fprintf(pFile, "INS %2dPRCF23%15.6f%15.6f%15.6f%15.6f\n", bankid, 0.0, 0.0, + fprintf(pFile, "INS %2uPRCF23%15.6f%15.6f%15.6f%15.6f\n", bankid, 0.0, 0.0, 0.0, 0.0); - fprintf(pFile, "INS %2dPRCF24%15.6f%15.6f%15.6f%15.6f\n", bankid, 0.0, 0.0, + fprintf(pFile, "INS %2uPRCF24%15.6f%15.6f%15.6f%15.6f\n", bankid, 0.0, 0.0, 0.0, 0.0); - fprintf(pFile, "INS %2dPRCF25%15.6f%15.6f%15.6f%15.6f\n", bankid, 0.0, 0.0, + fprintf(pFile, "INS %2uPRCF25%15.6f%15.6f%15.6f%15.6f\n", bankid, 0.0, 0.0, 0.0, 0.0); - fprintf(pFile, "INS %2dPRCF26%15.6f%15.6f%15.6f%15.6f\n", bankid, 0.0, 0.0, + fprintf(pFile, "INS %2uPRCF26%15.6f%15.6f%15.6f%15.6f\n", bankid, 0.0, 0.0, 0.0, 0.0); - fprintf(pFile, "INS %2dPRCF27%15.6f%15.6f%15.6f \n", bankid, 0.0, 0.0, 0.0); + fprintf(pFile, "INS %2uPRCF27%15.6f%15.6f%15.6f \n", bankid, 0.0, 0.0, 0.0); - fprintf(pFile, "INS %2dPAB4 %3i\n", bankid, 90); + fprintf(pFile, "INS %2uPAB4 %3i\n", bankid, 90); for (size_t k = 0; k < 90; ++k) { - fprintf(pFile, "INS %2dPAB4%2d%10.5f%10.5f%10.5f%10.5f\n", bankid, + fprintf(pFile, "INS %2uPAB4%2d%10.5f%10.5f%10.5f%10.5f\n", bankid, static_cast<int>(k) + 1, m_gdsp[k], m_gdt[k], m_galpha[k], m_gbeta[k]); } - fprintf(pFile, "INS %2dPRCF3 %5i%5i%10.5f\n", bankid, -5, 21, 0.002); - fprintf(pFile, "INS %2dPRCF31%15.6f%15.6f%15.6f%15.6f\n", bankid, 0.0, 0.0, + fprintf(pFile, "INS %2uPRCF3 %5i%5i%10.5f\n", bankid, -5, 21, 0.002); + fprintf(pFile, "INS %2uPRCF31%15.6f%15.6f%15.6f%15.6f\n", bankid, 0.0, 0.0, 0.0, sig0); - fprintf(pFile, "INS %2dPRCF32%15.6f%15.6f%15.6f%15.6f\n", bankid, sig1, sig2, + fprintf(pFile, "INS %2uPRCF32%15.6f%15.6f%15.6f%15.6f\n", bankid, sig1, sig2, gam0, gam1); - fprintf(pFile, "INS %2dPRCF33%15.6f%15.6f%15.6f%15.6f\n", bankid, gam2, 0.0, + fprintf(pFile, "INS %2uPRCF33%15.6f%15.6f%15.6f%15.6f\n", bankid, gam2, 0.0, 0.0, 0.0); - fprintf(pFile, "INS %2dPRCF34%15.6f%15.6f%15.6f%15.6f\n", bankid, 0.0, 0.0, + fprintf(pFile, "INS %2uPRCF34%15.6f%15.6f%15.6f%15.6f\n", bankid, 0.0, 0.0, 0.0, 0.0); - fprintf(pFile, "INS %2dPRCF35%15.6f%15.6f%15.6f%15.6f\n", bankid, 0.0, 0.0, + fprintf(pFile, "INS %2uPRCF35%15.6f%15.6f%15.6f%15.6f\n", bankid, 0.0, 0.0, 0.0, 0.0); - fprintf(pFile, "INS %2dPRCF36%15.6f\n", bankid, 0.0); + fprintf(pFile, "INS %2uPRCF36%15.6f\n", bankid, 0.0); - fprintf(pFile, "INS %2dPAB5 %3i\n", bankid, + fprintf(pFile, "INS %2uPAB5 %3i\n", bankid, 90); // 90 means there will be 90 lines of table for (size_t k = 0; k < 90; k++) { - fprintf(pFile, "INS %2dPAB5%2d%10.5f%10.5f%10.5f%10.5f\n", bankid, + fprintf(pFile, "INS %2uPAB5%2d%10.5f%10.5f%10.5f%10.5f\n", bankid, static_cast<int>(k) + 1, m_gdsp[k], m_gdt[k], m_galpha[k], m_gbeta[k]); } @@ -1087,7 +1086,7 @@ double SaveGSASInstrumentFile::calDspRange(double dtt1, double zero, * @param irffilename */ void SaveGSASInstrumentFile::loadFullprofResolutionFile( - std::string irffilename) { + const std::string &irffilename) { IAlgorithm_sptr loadfpirf; try { loadfpirf = createChildAlgorithm("LoadFullprofResolution"); diff --git a/Framework/DataHandling/src/SaveGSS.cpp b/Framework/DataHandling/src/SaveGSS.cpp index 7cf51513c8b2956bb0170158c6fde10a4a4478fd..08c330eeec8f5812322dff823508f70fc47cf70f 100644 --- a/Framework/DataHandling/src/SaveGSS.cpp +++ b/Framework/DataHandling/src/SaveGSS.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/SaveGSS.h" diff --git a/Framework/DataHandling/src/SaveILLCosmosAscii.cpp b/Framework/DataHandling/src/SaveILLCosmosAscii.cpp index b5da2dbb18e57dbb1cc2f62d87410d0090632f3e..091b8394ee724c80c37c7ae0355551a61ab5059a 100644 --- a/Framework/DataHandling/src/SaveILLCosmosAscii.cpp +++ b/Framework/DataHandling/src/SaveILLCosmosAscii.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/SaveILLCosmosAscii.h" #include "MantidAPI/MatrixWorkspace.h" diff --git a/Framework/DataHandling/src/SaveISISNexus.cpp b/Framework/DataHandling/src/SaveISISNexus.cpp index c2b5fb00fb6c7462318da5f844e01fef6e1d7ceb..d2c07beccf10243a35a9460768fde1661e014f85 100644 --- a/Framework/DataHandling/src/SaveISISNexus.cpp +++ b/Framework/DataHandling/src/SaveISISNexus.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + // SaveISISNexus // @author Freddie Akeroyd, STFC ISIS Faility diff --git a/Framework/DataHandling/src/SaveIsawDetCal.cpp b/Framework/DataHandling/src/SaveIsawDetCal.cpp index 05ece58a6fb8be897b2d0ac3bb636d571d8fee70..87374bdf19a85da55beb4cc4ad530f38b1e1135c 100644 --- a/Framework/DataHandling/src/SaveIsawDetCal.cpp +++ b/Framework/DataHandling/src/SaveIsawDetCal.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/SaveIsawDetCal.h" #include "MantidAPI/ExperimentInfo.h" @@ -227,7 +227,8 @@ void SaveIsawDetCal::exec() { out.close(); } -V3D SaveIsawDetCal::findPixelPos(std::string bankName, int col, int row) { +V3D SaveIsawDetCal::findPixelPos(const std::string &bankName, int col, + int row) { boost::shared_ptr<const IComponent> parent = inst->getComponentByName(bankName); if (parent->type() == "RectangularDetector") { @@ -261,8 +262,8 @@ V3D SaveIsawDetCal::findPixelPos(std::string bankName, int col, int row) { } } -void SaveIsawDetCal::sizeBanks(std::string bankName, int &NCOLS, int &NROWS, - double &xsize, double &ysize) { +void SaveIsawDetCal::sizeBanks(const std::string &bankName, int &NCOLS, + int &NROWS, double &xsize, double &ysize) { if (bankName == "None") return; boost::shared_ptr<const IComponent> parent = diff --git a/Framework/DataHandling/src/SaveMask.cpp b/Framework/DataHandling/src/SaveMask.cpp index 0db860c97baf3c9d146276469f0624ed7c62794c..935a84c581bb9bbb9a00ede0b413c1ca83b2d558 100644 --- a/Framework/DataHandling/src/SaveMask.cpp +++ b/Framework/DataHandling/src/SaveMask.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/SaveMask.h" diff --git a/Framework/DataHandling/src/SaveNISTDAT.cpp b/Framework/DataHandling/src/SaveNISTDAT.cpp index 0f3f6b10651b750aede929ab3a61aa95169df54b..da68630323e575ea34586d4fc717ec516ba332d5 100644 --- a/Framework/DataHandling/src/SaveNISTDAT.cpp +++ b/Framework/DataHandling/src/SaveNISTDAT.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/DataHandling/src/SaveNXSPE.cpp b/Framework/DataHandling/src/SaveNXSPE.cpp index c586071d5504f248f3625a92166ec63748f3b4cf..01c4dacdf51908381db971556837a72aef4ef45f 100644 --- a/Framework/DataHandling/src/SaveNXSPE.cpp +++ b/Framework/DataHandling/src/SaveNXSPE.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/SaveNXSPE.h" diff --git a/Framework/DataHandling/src/SaveNXTomo.cpp b/Framework/DataHandling/src/SaveNXTomo.cpp index 09aeba795ffeb1fb4bc8e44a796167fdb9e651ad..435d1e504a3fea4f863fe3bbfcbb3fb68b676bd8 100644 --- a/Framework/DataHandling/src/SaveNXTomo.cpp +++ b/Framework/DataHandling/src/SaveNXTomo.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/SaveNXTomo.h" @@ -304,7 +304,7 @@ void SaveNXTomo::processAll() { * @param workspace the workspace to get data from * @param nxFile the nexus file to save data into */ -void SaveNXTomo::writeSingleWorkspace(const Workspace2D_sptr workspace, +void SaveNXTomo::writeSingleWorkspace(const Workspace2D_sptr &workspace, ::NeXus::File &nxFile) { try { nxFile.openPath("/entry1/tomo_entry/data"); @@ -372,7 +372,7 @@ void SaveNXTomo::writeSingleWorkspace(const Workspace2D_sptr workspace, } void SaveNXTomo::writeImageKeyValue( - const DataObjects::Workspace2D_sptr workspace, ::NeXus::File &nxFile, + const DataObjects::Workspace2D_sptr &workspace, ::NeXus::File &nxFile, int thisFileInd) { // Add ImageKey to instrument/image_key if present, use 0 if not try { @@ -401,7 +401,7 @@ void SaveNXTomo::writeImageKeyValue( nxFile.closeGroup(); } -void SaveNXTomo::writeLogValues(const DataObjects::Workspace2D_sptr workspace, +void SaveNXTomo::writeLogValues(const DataObjects::Workspace2D_sptr &workspace, ::NeXus::File &nxFile, int thisFileInd) { // Add Log information (minus special values - Rotation, ImageKey, Intensity) // Unable to add multidimensional string data, storing strings as @@ -446,7 +446,7 @@ void SaveNXTomo::writeLogValues(const DataObjects::Workspace2D_sptr workspace, } void SaveNXTomo::writeIntensityValue( - const DataObjects::Workspace2D_sptr workspace, ::NeXus::File &nxFile, + const DataObjects::Workspace2D_sptr &workspace, ::NeXus::File &nxFile, int thisFileInd) { // Add Intensity to control if present, use 1 if not try { diff --git a/Framework/DataHandling/src/SaveNXcanSAS.cpp b/Framework/DataHandling/src/SaveNXcanSAS.cpp index 0437e754d6d2e5510010378bb0fec362bbb412b7..1fdff8ad829b488b8f9b816b6e56393c937d0b29 100644 --- a/Framework/DataHandling/src/SaveNXcanSAS.cpp +++ b/Framework/DataHandling/src/SaveNXcanSAS.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/SaveNXcanSAS.h" #include "MantidAPI/Axis.h" @@ -34,6 +34,7 @@ #include <cctype> #include <functional> #include <iterator> +#include <utility> using namespace Mantid::Kernel; using namespace Mantid::Geometry; @@ -56,9 +57,9 @@ void removeSpecialCharacters(std::string &input) { input = boost::regex_replace(input, toReplace, replaceWith); } -std::string -makeCompliantName(const std::string &input, bool isStrict, - std::function<void(std::string &)> captializeStrategy) { +std::string makeCompliantName( + const std::string &input, bool isStrict, + const std::function<void(std::string &)> &captializeStrategy) { auto output = input; // Check if input is compliant if (!isCanSASCompliant(isStrict, output)) { @@ -173,7 +174,7 @@ std::vector<std::string> splitDetectorNames(std::string detectorNames) { * @return the sasEntry */ H5::Group addSasEntry(H5::H5File &file, - Mantid::API::MatrixWorkspace_sptr workspace, + const Mantid::API::MatrixWorkspace_sptr &workspace, const std::string &suffix) { using namespace Mantid::DataHandling::NXcanSAS; const std::string sasEntryName = sasEntryGroupName + suffix; @@ -201,18 +202,20 @@ H5::Group addSasEntry(H5::H5File &file, } //------- SASinstrument -std::string getInstrumentName(Mantid::API::MatrixWorkspace_sptr workspace) { +std::string +getInstrumentName(const Mantid::API::MatrixWorkspace_sptr &workspace) { auto instrument = workspace->getInstrument(); return instrument->getFullName(); } -std::string getIDF(Mantid::API::MatrixWorkspace_sptr workspace) { +std::string getIDF(const Mantid::API::MatrixWorkspace_sptr &workspace) { auto date = workspace->getWorkspaceStartDate(); auto instrumentName = getInstrumentName(workspace); return workspace->getInstrumentFilename(instrumentName, date); } -void addDetectors(H5::Group &group, Mantid::API::MatrixWorkspace_sptr workspace, +void addDetectors(H5::Group &group, + const Mantid::API::MatrixWorkspace_sptr &workspace, const std::vector<std::string> &detectorNames) { // If the group is empty then don't add anything if (!detectorNames.empty()) { @@ -256,7 +259,7 @@ void addDetectors(H5::Group &group, Mantid::API::MatrixWorkspace_sptr workspace, * @param detectorNames: the names of the detectors to store */ void addInstrument(H5::Group &group, - Mantid::API::MatrixWorkspace_sptr workspace, + const Mantid::API::MatrixWorkspace_sptr &workspace, const std::string &radiationSource, const std::vector<std::string> &detectorNames) { // Setup instrument @@ -301,7 +304,8 @@ std::string getDate() { * @param group: the sasEntry * @param workspace: the workspace which is being stored */ -void addProcess(H5::Group &group, Mantid::API::MatrixWorkspace_sptr workspace) { +void addProcess(H5::Group &group, + const Mantid::API::MatrixWorkspace_sptr &workspace) { // Setup process const std::string sasProcessNameForGroup = sasProcessGroupName; auto process = Mantid::DataHandling::H5Util::createGroupCanSAS( @@ -334,8 +338,9 @@ void addProcess(H5::Group &group, Mantid::API::MatrixWorkspace_sptr workspace) { * @param group: the sasEntry * @param workspace: the workspace which is being stored */ -void addProcess(H5::Group &group, Mantid::API::MatrixWorkspace_sptr workspace, - Mantid::API::MatrixWorkspace_sptr canWorkspace) { +void addProcess(H5::Group &group, + const Mantid::API::MatrixWorkspace_sptr &workspace, + const Mantid::API::MatrixWorkspace_sptr &canWorkspace) { // Setup process const std::string sasProcessNameForGroup = sasProcessGroupName; auto process = Mantid::DataHandling::H5Util::createGroupCanSAS( @@ -401,7 +406,7 @@ void addNoteToProcess(H5::Group &group, const std::string &firstEntryName, } WorkspaceDimensionality -getWorkspaceDimensionality(Mantid::API::MatrixWorkspace_sptr workspace) { +getWorkspaceDimensionality(const Mantid::API::MatrixWorkspace_sptr &workspace) { auto numberOfHistograms = workspace->getNumberHistograms(); WorkspaceDimensionality dimensionality(WorkspaceDimensionality::other); if (numberOfHistograms == 1) { @@ -422,7 +427,8 @@ std::string getIntensityUnitLabel(std::string intensityUnitLabel) { } } -std::string getIntensityUnit(Mantid::API::MatrixWorkspace_sptr workspace) { +std::string +getIntensityUnit(const Mantid::API::MatrixWorkspace_sptr &workspace) { auto iUnit = workspace->YUnit(); if (iUnit.empty()) { iUnit = workspace->YUnitLabel(); @@ -438,13 +444,14 @@ std::string getMomentumTransferLabel(std::string momentumTransferLabel) { } } -std::string -getUnitFromMDDimension(Mantid::Geometry::IMDDimension_const_sptr dimension) { +std::string getUnitFromMDDimension( + const Mantid::Geometry::IMDDimension_const_sptr &dimension) { const auto unitLabel = dimension->getMDUnits().getUnitLabel(); return unitLabel.ascii(); } -void addData1D(H5::Group &data, Mantid::API::MatrixWorkspace_sptr workspace) { +void addData1D(H5::Group &data, + const Mantid::API::MatrixWorkspace_sptr &workspace) { // Add attributes for @signal, @I_axes, @Q_indices, Mantid::DataHandling::H5Util::writeStrAttribute(data, sasSignal, sasDataI); Mantid::DataHandling::H5Util::writeStrAttribute(data, sasDataIAxesAttr, @@ -512,7 +519,7 @@ void addData1D(H5::Group &data, Mantid::API::MatrixWorkspace_sptr workspace) { } } -bool areAxesNumeric(Mantid::API::MatrixWorkspace_sptr workspace) { +bool areAxesNumeric(const Mantid::API::MatrixWorkspace_sptr &workspace) { const unsigned indices[] = {0, 1}; for (const auto index : indices) { auto axis = workspace->getAxis(index); @@ -527,12 +534,12 @@ class SpectrumAxisValueProvider { public: explicit SpectrumAxisValueProvider( Mantid::API::MatrixWorkspace_sptr workspace) - : m_workspace(workspace) { + : m_workspace(std::move(workspace)) { setSpectrumAxisValues(); } Mantid::MantidVec::value_type * - operator()(Mantid::API::MatrixWorkspace_sptr /*unused*/, int index) { + operator()(const Mantid::API::MatrixWorkspace_sptr & /*unused*/, int index) { auto isPointData = m_workspace->getNumberHistograms() == m_spectrumAxisValues.size(); double value = 0; @@ -566,7 +573,7 @@ private: */ template <typename T> class QxExtractor { public: - T *operator()(Mantid::API::MatrixWorkspace_sptr ws, int index) { + T *operator()(const Mantid::API::MatrixWorkspace_sptr &ws, int index) { if (ws->isHistogramData()) { qxPointData.clear(); Mantid::Kernel::VectorHelper::convertToBinCentre(ws->dataX(index), @@ -620,7 +627,8 @@ public: * . * QxN QxN ... QxN */ -void addData2D(H5::Group &data, Mantid::API::MatrixWorkspace_sptr workspace) { +void addData2D(H5::Group &data, + const Mantid::API::MatrixWorkspace_sptr &workspace) { if (!areAxesNumeric(workspace)) { std::invalid_argument("SaveNXcanSAS: The provided 2D workspace needs " "to have 2 numeric axes."); @@ -664,7 +672,7 @@ void addData2D(H5::Group &data, Mantid::API::MatrixWorkspace_sptr workspace) { iAttributes.emplace(sasUncertaintyAttr, sasDataIdev); iAttributes.emplace(sasUncertaintiesAttr, sasDataIdev); - auto iExtractor = [](Mantid::API::MatrixWorkspace_sptr ws, int index) { + auto iExtractor = [](const Mantid::API::MatrixWorkspace_sptr &ws, int index) { return ws->dataY(index).data(); }; write2DWorkspace(data, workspace, sasDataI, iExtractor, iAttributes); @@ -674,13 +682,13 @@ void addData2D(H5::Group &data, Mantid::API::MatrixWorkspace_sptr workspace) { eAttributes.insert( std::make_pair(sasUnitAttr, iUnit)); // same units as intensity - auto iDevExtractor = [](Mantid::API::MatrixWorkspace_sptr ws, int index) { - return ws->dataE(index).data(); - }; + auto iDevExtractor = [](const Mantid::API::MatrixWorkspace_sptr &ws, + int index) { return ws->dataE(index).data(); }; write2DWorkspace(data, workspace, sasDataIdev, iDevExtractor, eAttributes); } -void addData(H5::Group &group, Mantid::API::MatrixWorkspace_sptr workspace) { +void addData(H5::Group &group, + const Mantid::API::MatrixWorkspace_sptr &workspace) { const std::string sasDataName = sasDataGroupName; auto data = Mantid::DataHandling::H5Util::createGroupCanSAS( group, sasDataName, nxDataClassAttr, sasDataClassAttr); @@ -701,8 +709,8 @@ void addData(H5::Group &group, Mantid::API::MatrixWorkspace_sptr workspace) { //------- SAStransmission_spectrum void addTransmission(H5::Group &group, - Mantid::API::MatrixWorkspace_const_sptr workspace, - std::string transmissionName) { + const Mantid::API::MatrixWorkspace_const_sptr &workspace, + const std::string &transmissionName) { // Setup process const std::string sasTransmissionName = sasTransmissionSpectrumGroupName + "_" + transmissionName; @@ -856,8 +864,9 @@ std::map<std::string, std::string> SaveNXcanSAS::validateInputs() { Mantid::API::MatrixWorkspace_sptr transmissionCan = getProperty("TransmissionCan"); - auto checkTransmission = [&result](Mantid::API::MatrixWorkspace_sptr trans, - std::string propertyName) { + auto checkTransmission = [&result]( + const Mantid::API::MatrixWorkspace_sptr &trans, + const std::string &propertyName) { if (trans->getNumberHistograms() != 1) { result.emplace(propertyName, "The input workspaces for transmissions have to be 1D."); diff --git a/Framework/DataHandling/src/SaveNexus.cpp b/Framework/DataHandling/src/SaveNexus.cpp index ec1811144b2accaa5c4a1ddc64a22b40695fe876..b7b027dd13c96cdbec24dbc3fec8fb0dd90fcb4c 100644 --- a/Framework/DataHandling/src/SaveNexus.cpp +++ b/Framework/DataHandling/src/SaveNexus.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + // SaveNeXus // @author Freddie Akeroyd, STFC ISIS Faility diff --git a/Framework/DataHandling/src/SaveNexusESS.cpp b/Framework/DataHandling/src/SaveNexusESS.cpp index 6cdfabbae886a11842289020627bf8f75546a5d2..db2de8360ff0afcbd2c883900877f17e04cd94e4 100644 --- a/Framework/DataHandling/src/SaveNexusESS.cpp +++ b/Framework/DataHandling/src/SaveNexusESS.cpp @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #include "MantidDataHandling/SaveNexusESS.h" #include "MantidNexusGeometry/NexusGeometrySave.h" #include <H5Cpp.h> diff --git a/Framework/DataHandling/src/SaveNexusGeometry.cpp b/Framework/DataHandling/src/SaveNexusGeometry.cpp index ab5e69c3f93453e58a6854e16fc5475c27086b45..810d7d696b07adbd4f1d61e2255f87f0633b0273 100644 --- a/Framework/DataHandling/src/SaveNexusGeometry.cpp +++ b/Framework/DataHandling/src/SaveNexusGeometry.cpp @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - /* SaveNexusGeometry : A thin Algorithm wrapper over * NexusGeometry::saveInstrument allowing user to save the geometry from * instrument attached to a workspace. diff --git a/Framework/DataHandling/src/SaveNexusProcessed.cpp b/Framework/DataHandling/src/SaveNexusProcessed.cpp index 192a716f0f30ed78c26f0f9b593a7e9c64fec204..d3f73902802631589e0b5ae833ee7f6a24010ed4 100644 --- a/Framework/DataHandling/src/SaveNexusProcessed.cpp +++ b/Framework/DataHandling/src/SaveNexusProcessed.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + // SaveNexusProcessed // @author Ronald Fowler, based on SaveNexus @@ -21,6 +21,7 @@ #include "MantidKernel/BoundedValidator.h" #include "MantidNexus/NexusFileIO.h" #include <boost/shared_ptr.hpp> +#include <utility> using namespace Mantid::API; @@ -168,7 +169,8 @@ void SaveNexusProcessed::init() { * @param matrixWorkspace :: pointer to a MatrixWorkspace */ void SaveNexusProcessed::getWSIndexList( - std::vector<int> &indices, MatrixWorkspace_const_sptr matrixWorkspace) { + std::vector<int> &indices, + const MatrixWorkspace_const_sptr &matrixWorkspace) { const std::vector<int> spec_list = getProperty("WorkspaceIndexList"); int spec_min = getProperty("WorkspaceIndexMin"); int spec_max = getProperty("WorkspaceIndexMax"); @@ -217,7 +219,7 @@ void SaveNexusProcessed::getWSIndexList( } void SaveNexusProcessed::doExec( - Workspace_sptr inputWorkspace, + const Workspace_sptr &inputWorkspace, boost::shared_ptr<Mantid::NeXus::NexusFileIO> &nexusFile, const bool keepFile, optional_size_t entryNumber) { // TODO: Remove? @@ -291,7 +293,8 @@ void SaveNexusProcessed::doExec( const bool append_to_file = getProperty("Append"); nexusFile->resetProgress(&prog_init); - nexusFile->openNexusWrite(filename, entryNumber, append_to_file || keepFile); + nexusFile->openNexusWrite(filename, std::move(entryNumber), + append_to_file || keepFile); // Equivalent C++ API handle ::NeXus::File cppFile(nexusFile->fileID); diff --git a/Framework/DataHandling/src/SaveOpenGenieAscii.cpp b/Framework/DataHandling/src/SaveOpenGenieAscii.cpp index b9078da4a29ff77dd4b98a6b020cf0afd7dcc765..2920fa8ed81275bfbb6a7740d381d0b84d0e9690 100644 --- a/Framework/DataHandling/src/SaveOpenGenieAscii.cpp +++ b/Framework/DataHandling/src/SaveOpenGenieAscii.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/SaveOpenGenieAscii.h" diff --git a/Framework/DataHandling/src/SavePAR.cpp b/Framework/DataHandling/src/SavePAR.cpp index 9062cb73d3d469d180a4618e9153a88cbd249f56..645ff81ac7e3ae980a05e6c8c1c8fd7ae843ab2b 100644 --- a/Framework/DataHandling/src/SavePAR.cpp +++ b/Framework/DataHandling/src/SavePAR.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/SavePAR.h" #include "MantidDataHandling/FindDetectorsPar.h" diff --git a/Framework/DataHandling/src/SavePDFGui.cpp b/Framework/DataHandling/src/SavePDFGui.cpp index 4c6d0c34c7866388a3a19748f1d8052fea8a6b12..019c3242ffa8dc9f262b1e2dd58a37a95bc070c2 100644 --- a/Framework/DataHandling/src/SavePDFGui.cpp +++ b/Framework/DataHandling/src/SavePDFGui.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/SavePDFGui.h" @@ -92,7 +92,7 @@ void SavePDFGui::exec() { } void SavePDFGui::writeMetaData(std::ofstream &out, - API::MatrixWorkspace_const_sptr inputWS) { + const API::MatrixWorkspace_const_sptr &inputWS) { out << "#Comment: neutron"; auto run = inputWS->run(); if (run.hasProperty("Qmin")) { @@ -120,7 +120,7 @@ void SavePDFGui::writeMetaData(std::ofstream &out, } void SavePDFGui::writeWSData(std::ofstream &out, - API::MatrixWorkspace_const_sptr inputWS) { + const API::MatrixWorkspace_const_sptr &inputWS) { const auto &x = inputWS->points(0); const auto &y = inputWS->y(0); const auto &dy = inputWS->e(0); diff --git a/Framework/DataHandling/src/SavePHX.cpp b/Framework/DataHandling/src/SavePHX.cpp index 25d9567d2c951b43ee48d373d76e38aa53fac20f..817e0a0c4a8de5202b43e8703544f6fd818058a1 100644 --- a/Framework/DataHandling/src/SavePHX.cpp +++ b/Framework/DataHandling/src/SavePHX.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/SavePHX.h" #include "MantidDataHandling/FindDetectorsPar.h" diff --git a/Framework/DataHandling/src/SaveParameterFile.cpp b/Framework/DataHandling/src/SaveParameterFile.cpp index b51a56122485f9a91cf91fdc333a4137b948ef5a..f6559d4bab4378d95feafd2d8169ae617852f55d 100644 --- a/Framework/DataHandling/src/SaveParameterFile.cpp +++ b/Framework/DataHandling/src/SaveParameterFile.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/SaveParameterFile.h" diff --git a/Framework/DataHandling/src/SaveRKH.cpp b/Framework/DataHandling/src/SaveRKH.cpp index a947ab0aed650cfb9f76ea9cfe878c27caf870c3..52e82e015c0164fdda0540907bb92bd84589d46f 100644 --- a/Framework/DataHandling/src/SaveRKH.cpp +++ b/Framework/DataHandling/src/SaveRKH.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/SaveRKH.h" diff --git a/Framework/DataHandling/src/SaveRMCProfile.cpp b/Framework/DataHandling/src/SaveRMCProfile.cpp index ec078d36ba62ad9d50bf05e9986d0db444014a86..5d545763d6efba2b2bc8cbd369f1218c72ba88ab 100644 --- a/Framework/DataHandling/src/SaveRMCProfile.cpp +++ b/Framework/DataHandling/src/SaveRMCProfile.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/SaveRMCProfile.h" @@ -96,8 +96,8 @@ void SaveRMCProfile::exec() { out.close(); } -void SaveRMCProfile::writeMetaData(std::ofstream &out, - API::MatrixWorkspace_const_sptr inputWS) { +void SaveRMCProfile::writeMetaData( + std::ofstream &out, const API::MatrixWorkspace_const_sptr &inputWS) { const auto &y = inputWS->y(0); const std::string title = getProperty("Title"); const std::string inputType = getProperty("InputType"); @@ -107,8 +107,8 @@ void SaveRMCProfile::writeMetaData(std::ofstream &out, std::cout << "rmc " << inputType << " # " << title << std::endl; } -void SaveRMCProfile::writeWSData(std::ofstream &out, - API::MatrixWorkspace_const_sptr inputWS) { +void SaveRMCProfile::writeWSData( + std::ofstream &out, const API::MatrixWorkspace_const_sptr &inputWS) { const auto &x = inputWS->points(0); const auto &y = inputWS->y(0); for (size_t i = 0; i < x.size(); ++i) { diff --git a/Framework/DataHandling/src/SaveReflCustomAscii.cpp b/Framework/DataHandling/src/SaveReflCustomAscii.cpp index 462cd59f4f8eb60f01619c73a7377562a186047b..fb79e1259f47c2ff27cfcbb7df4c116975ef183e 100644 --- a/Framework/DataHandling/src/SaveReflCustomAscii.cpp +++ b/Framework/DataHandling/src/SaveReflCustomAscii.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/SaveReflCustomAscii.h" #include "MantidAPI/MatrixWorkspace.h" diff --git a/Framework/DataHandling/src/SaveReflThreeColumnAscii.cpp b/Framework/DataHandling/src/SaveReflThreeColumnAscii.cpp index 1bccafe32189fe330c9ae6e6e3d3e1e4a4f03d5d..45c30426a8fc7015d3bae770a82df6a733724f62 100644 --- a/Framework/DataHandling/src/SaveReflThreeColumnAscii.cpp +++ b/Framework/DataHandling/src/SaveReflThreeColumnAscii.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/SaveReflThreeColumnAscii.h" #include "MantidAPI/MatrixWorkspace.h" diff --git a/Framework/DataHandling/src/SaveReflectometryAscii.cpp b/Framework/DataHandling/src/SaveReflectometryAscii.cpp index 9abda5b8db0dbc55e5a03904ccd46c89905dbc12..c87a19371d4ca200c562e01bb42d99e84e55e7a2 100644 --- a/Framework/DataHandling/src/SaveReflectometryAscii.cpp +++ b/Framework/DataHandling/src/SaveReflectometryAscii.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/SaveReflectometryAscii.h" #include "MantidAPI/AnalysisDataService.h" @@ -141,7 +141,7 @@ void SaveReflectometryAscii::separator() { * @param write :: if true, write string * @param s :: string */ -bool SaveReflectometryAscii::writeString(bool write, std::string s) { +bool SaveReflectometryAscii::writeString(bool write, const std::string &s) { if (write) { if (m_ext == "custom" || m_ext == ".txt") m_file << m_sep << s; @@ -172,7 +172,7 @@ void SaveReflectometryAscii::outputval(double val) { /** Write formatted line of data * @param val :: a string value to be written */ -void SaveReflectometryAscii::outputval(std::string val) { +void SaveReflectometryAscii::outputval(const std::string &val) { m_file << std::setw(28) << val; } @@ -201,8 +201,8 @@ std::string SaveReflectometryAscii::sampleLogUnit(const std::string &logName) { * @param logName :: the name of a SampleLog entry to get its value from * @param logNameFixed :: the name of the SampleLog entry defined by the header */ -void SaveReflectometryAscii::writeInfo(const std::string logName, - const std::string logNameFixed) { +void SaveReflectometryAscii::writeInfo(const std::string &logName, + const std::string &logNameFixed) { const std::string logValue = sampleLogValue(logName); const std::string logUnit = sampleLogUnit(logName); if (!logNameFixed.empty()) { @@ -255,7 +255,7 @@ void SaveReflectometryAscii::header() { } /// Check file -void SaveReflectometryAscii::checkFile(const std::string filename) { +void SaveReflectometryAscii::checkFile(const std::string &filename) { if (Poco::File(filename).exists()) { g_log.warning("File already exists and will be overwritten"); try { diff --git a/Framework/DataHandling/src/SaveSESANS.cpp b/Framework/DataHandling/src/SaveSESANS.cpp index 8351e59d6e9a626709b6bc26a6e6e26fb64e6c39..27027b95f29e6d7563f4d3ff3e2bda4dd53b42db 100644 --- a/Framework/DataHandling/src/SaveSESANS.cpp +++ b/Framework/DataHandling/src/SaveSESANS.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/SaveSESANS.h" diff --git a/Framework/DataHandling/src/SaveSPE.cpp b/Framework/DataHandling/src/SaveSPE.cpp index 12822e5f60c9085346e084e4d6453be07715e0b5..9c18c1f701d28feebe03d0209ed6866fc45ef9ec 100644 --- a/Framework/DataHandling/src/SaveSPE.cpp +++ b/Framework/DataHandling/src/SaveSPE.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/SaveSPE.h" #include "MantidAPI/Axis.h" @@ -210,7 +210,7 @@ void SaveSPE::writeSPEFile(FILE *outSPEFile, * @param WS :: the workspace to be saved * @param outFile :: the file object to write to */ -void SaveSPE::writeHists(const API::MatrixWorkspace_const_sptr WS, +void SaveSPE::writeHists(const API::MatrixWorkspace_const_sptr &WS, FILE *const outFile) { // We write out values NUM_PER_LINE at a time, so will need to do extra work // if nBins isn't a factor of NUM_PER_LINE @@ -286,7 +286,7 @@ void SaveSPE::check_and_copy_spectra(const HistogramData::HistogramY &inSignal, * @param outFile :: the file object to write to * @param wsIn :: the index number of the histogram to write */ -void SaveSPE::writeHist(const API::MatrixWorkspace_const_sptr WS, +void SaveSPE::writeHist(const API::MatrixWorkspace_const_sptr &WS, FILE *const outFile, const int wsIn) const { check_and_copy_spectra(WS->y(wsIn), WS->e(wsIn), m_tSignal, m_tError); FPRINTF_WITH_EXCEPTION(outFile, "%s", Y_HEADER); diff --git a/Framework/DataHandling/src/SaveSampleEnvironmentAndShape.cpp b/Framework/DataHandling/src/SaveSampleEnvironmentAndShape.cpp index c266af4b19231b9e1db3f914f9350d64efe4bcbe..a3c06739886687777fd5ed57505597c3ed7b9343 100644 --- a/Framework/DataHandling/src/SaveSampleEnvironmentAndShape.cpp +++ b/Framework/DataHandling/src/SaveSampleEnvironmentAndShape.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/SaveSampleEnvironmentAndShape.h" #include "MantidAPI/FileProperty.h" diff --git a/Framework/DataHandling/src/SaveStl.cpp b/Framework/DataHandling/src/SaveStl.cpp index 1581b452e397666b9e015ce183517da97834c963..e8813708d3d275bcb5a57393959978341af5b57d 100644 --- a/Framework/DataHandling/src/SaveStl.cpp +++ b/Framework/DataHandling/src/SaveStl.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/SaveStl.h" #include "MantidGeometry/Objects/MeshObject.h" diff --git a/Framework/DataHandling/src/SaveTBL.cpp b/Framework/DataHandling/src/SaveTBL.cpp index 3eea11cf3617681350d2eba1a0a54bdb68ddd81e..bc27ecab0d18a8965ce016bfb6fec9bfb9951cdb 100644 --- a/Framework/DataHandling/src/SaveTBL.cpp +++ b/Framework/DataHandling/src/SaveTBL.cpp @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - //---------------------------------------------------------------------- // Includes //---------------------------------------------------------------------- @@ -45,7 +44,7 @@ void SaveTBL::init() { * Finds the stitch groups that need to be on the same line * @param ws : a pointer to a tableworkspace */ -void SaveTBL::findGroups(ITableWorkspace_sptr ws) { +void SaveTBL::findGroups(const ITableWorkspace_sptr &ws) { size_t rowCount = ws->rowCount(); for (size_t i = 0; i < rowCount; ++i) { TableRow row = ws->getRow(i); diff --git a/Framework/DataHandling/src/SaveToSNSHistogramNexus.cpp b/Framework/DataHandling/src/SaveToSNSHistogramNexus.cpp index 57e3d886c73e3079af6cf7a5096966b7f680a24d..1543210a0ef79414636258d77c1b395b370cc0f4 100644 --- a/Framework/DataHandling/src/SaveToSNSHistogramNexus.cpp +++ b/Framework/DataHandling/src/SaveToSNSHistogramNexus.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + // SaveToSNSHistogramNexus // @author Freddie Akeroyd, STFC ISIS Faility @@ -187,9 +187,9 @@ int SaveToSNSHistogramNexus::copy_file(const char *inFile, int nx__access, * @return error code */ int SaveToSNSHistogramNexus::WriteOutDataOrErrors( - Geometry::RectangularDetector_const_sptr det, int x_pixel_slab, + const Geometry::RectangularDetector_const_sptr &det, int x_pixel_slab, const char *field_name, const char *errors_field_name, bool doErrors, - bool doBoth, int is_definition, std::string bank) { + bool doBoth, int is_definition, const std::string &bank) { int dataRank, dataDimensions[NX_MAXRANK]; int slabDimensions[NX_MAXRANK], slabStartIndices[NX_MAXRANK]; @@ -412,7 +412,7 @@ int SaveToSNSHistogramNexus::WriteOutDataOrErrors( * @param is_definition * @return error code */ -int SaveToSNSHistogramNexus::WriteDataGroup(std::string bank, +int SaveToSNSHistogramNexus::WriteDataGroup(const std::string &bank, int is_definition) { int dataType, dataRank, dataDimensions[NX_MAXRANK]; NXname name; diff --git a/Framework/DataHandling/src/SaveVTK.cpp b/Framework/DataHandling/src/SaveVTK.cpp index 651987feb6815d8275713c6dbdf35872429e191a..b7c6bbab677f7d808c72550eb25c7ba5a08c23e8 100644 --- a/Framework/DataHandling/src/SaveVTK.cpp +++ b/Framework/DataHandling/src/SaveVTK.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //--------------------------------------------------- // Includes diff --git a/Framework/DataHandling/src/SetBeam.cpp b/Framework/DataHandling/src/SetBeam.cpp index da9f409ec40d071186077acb9884236c74324b1e..9fe5131aac5aff039640ae4c7a18aeff9470b3f9 100644 --- a/Framework/DataHandling/src/SetBeam.cpp +++ b/Framework/DataHandling/src/SetBeam.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/SetBeam.h" diff --git a/Framework/DataHandling/src/SetSample.cpp b/Framework/DataHandling/src/SetSample.cpp index ab141cad2b7bb87d2f6d73ef36642663bd9efd66..4e1f906a273486d6d7c7ef47c9fc25e0ac993b85 100644 --- a/Framework/DataHandling/src/SetSample.cpp +++ b/Framework/DataHandling/src/SetSample.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/SetSample.h" diff --git a/Framework/DataHandling/src/SetSampleMaterial.cpp b/Framework/DataHandling/src/SetSampleMaterial.cpp index 58edc26ce16cb80856ad528af5f18d0354ce6de8..b85c58e3c54476bcd4a62be758887a6566d0f34a 100644 --- a/Framework/DataHandling/src/SetSampleMaterial.cpp +++ b/Framework/DataHandling/src/SetSampleMaterial.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/SetSampleMaterial.h" #include "MantidAPI/ExperimentInfo.h" diff --git a/Framework/DataHandling/src/SetScalingPSD.cpp b/Framework/DataHandling/src/SetScalingPSD.cpp index 630ccee41611ef5bb458dc5b75625415cfec4092..c0c85e120cb29a4ee79faac5d93adca13cf915b0 100644 --- a/Framework/DataHandling/src/SetScalingPSD.cpp +++ b/Framework/DataHandling/src/SetScalingPSD.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + // @author Ronald Fowler #include "MantidDataHandling/SetScalingPSD.h" @@ -293,7 +293,7 @@ void SetScalingPSD::movePos(API::MatrixWorkspace_sptr &WS, * @param detID :: Vector of detector numbers * @param pos :: V3D of detector positions corresponding to detID */ -void SetScalingPSD::getDetPositionsFromRaw(std::string rawfile, +void SetScalingPSD::getDetPositionsFromRaw(const std::string &rawfile, std::vector<int> &detID, std::vector<Kernel::V3D> &pos) { (void)rawfile; // Avoid compiler warning diff --git a/Framework/DataHandling/src/SortTableWorkspace.cpp b/Framework/DataHandling/src/SortTableWorkspace.cpp index ddfedf5c9c1b2502d85d01ed9f30f9c9a5d978a4..1d0b2077dbd3456851b49c7bacdf503ae4c706df 100644 --- a/Framework/DataHandling/src/SortTableWorkspace.cpp +++ b/Framework/DataHandling/src/SortTableWorkspace.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/SortTableWorkspace.h" #include "MantidAPI/ITableWorkspace.h" diff --git a/Framework/DataHandling/src/StartAndEndTimeFromNexusFileExtractor.cpp b/Framework/DataHandling/src/StartAndEndTimeFromNexusFileExtractor.cpp index 263f4f5d43ce2f4e939ca7312058c1c57631f2eb..02254b4f3e8210f30f7e9968358990bc2f53b198 100644 --- a/Framework/DataHandling/src/StartAndEndTimeFromNexusFileExtractor.cpp +++ b/Framework/DataHandling/src/StartAndEndTimeFromNexusFileExtractor.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/StartAndEndTimeFromNexusFileExtractor.h" #include "MantidAPI/FileFinder.h" @@ -24,8 +24,8 @@ namespace DataHandling { enum class NexusType { Muon, Processed, ISIS, TofRaw }; enum class TimeType : unsigned char { StartTime, EndTime }; -Mantid::Types::Core::DateAndTime handleMuonNexusFile(TimeType type, - std::string filename) { +Mantid::Types::Core::DateAndTime +handleMuonNexusFile(TimeType type, const std::string &filename) { Mantid::NeXus::NXRoot root(filename); if (type == TimeType::StartTime) { return Mantid::Types::Core::DateAndTime(root.getString("run/start_time")); @@ -35,7 +35,7 @@ Mantid::Types::Core::DateAndTime handleMuonNexusFile(TimeType type, } Mantid::Types::Core::DateAndTime -handleProcessedNexusFile(TimeType type, std::string filename) { +handleProcessedNexusFile(TimeType type, const std::string &filename) { Mantid::NeXus::NXRoot root(filename); if (type == TimeType::StartTime) { return Mantid::Types::Core::DateAndTime( @@ -46,8 +46,8 @@ handleProcessedNexusFile(TimeType type, std::string filename) { } } -Mantid::Types::Core::DateAndTime handleISISNexusFile(TimeType type, - std::string filename) { +Mantid::Types::Core::DateAndTime +handleISISNexusFile(TimeType type, const std::string &filename) { Mantid::NeXus::NXRoot root(filename); if (type == TimeType::StartTime) { return Mantid::Types::Core::DateAndTime( @@ -58,8 +58,8 @@ Mantid::Types::Core::DateAndTime handleISISNexusFile(TimeType type, } } -Mantid::Types::Core::DateAndTime handleTofRawNexusFile(TimeType type, - std::string filename) { +Mantid::Types::Core::DateAndTime +handleTofRawNexusFile(TimeType type, const std::string &filename) { Mantid::NeXus::NXRoot root(filename); if (type == TimeType::StartTime) { return Mantid::Types::Core::DateAndTime(root.getString("entry/start_time")); @@ -68,7 +68,7 @@ Mantid::Types::Core::DateAndTime handleTofRawNexusFile(TimeType type, } } -NexusType whichNexusType(std::string filename) { +NexusType whichNexusType(const std::string &filename) { std::vector<std::string> entryName; std::vector<std::string> definition; auto count = @@ -112,8 +112,8 @@ NexusType whichNexusType(std::string filename) { return nexusType; } -Mantid::Types::Core::DateAndTime extractDateAndTime(TimeType type, - std::string filename) { +Mantid::Types::Core::DateAndTime +extractDateAndTime(TimeType type, const std::string &filename) { auto fullFileName = Mantid::API::FileFinder::Instance().getFullPath(filename); // Figure out the type of the Nexus file. We need to handle them individually // since they store the datetime differently diff --git a/Framework/DataHandling/src/UpdateInstrumentFromFile.cpp b/Framework/DataHandling/src/UpdateInstrumentFromFile.cpp index b601a7fb2786eac0b9347d74a646d5fb58f5d99b..75fe0a1740edbc486193337fdfb5706e35be5f27 100644 --- a/Framework/DataHandling/src/UpdateInstrumentFromFile.cpp +++ b/Framework/DataHandling/src/UpdateInstrumentFromFile.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/UpdateInstrumentFromFile.h" #include "LoadRaw/isisraw2.h" diff --git a/Framework/DataHandling/src/XmlHandler.cpp b/Framework/DataHandling/src/XmlHandler.cpp index 72c831bf070635ee3086839ea6211a67b7fda23f..4c4c2ae194e54dab1ae1ee4fd2e4582ebd098d2e 100644 --- a/Framework/DataHandling/src/XmlHandler.cpp +++ b/Framework/DataHandling/src/XmlHandler.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/XmlHandler.h" @@ -23,7 +23,7 @@ namespace Mantid { namespace DataHandling { -XmlHandler::XmlHandler(std::string filename) { +XmlHandler::XmlHandler(const std::string &filename) { std::ifstream in(filename); Poco::XML::InputSource src(in); Poco::XML::DOMParser parser; diff --git a/Framework/DataHandling/test/AppendGeometryToSNSNexusTest.h b/Framework/DataHandling/test/AppendGeometryToSNSNexusTest.h index b7bff479f0c24d6da86a66d3316dd7aef5f2cd47..f20ba364c175eb51efbad3f6d4e13b939ae18536 100644 --- a/Framework/DataHandling/test/AppendGeometryToSNSNexusTest.h +++ b/Framework/DataHandling/test/AppendGeometryToSNSNexusTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/CheckMantidVersionTest.h b/Framework/DataHandling/test/CheckMantidVersionTest.h index f3ec5cba9265d808558e0e83269f79998f462bd5..085fa054352d2e26ba6dbb02a2a6bc147facf70b 100644 --- a/Framework/DataHandling/test/CheckMantidVersionTest.h +++ b/Framework/DataHandling/test/CheckMantidVersionTest.h @@ -1,13 +1,15 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include <cxxtest/TestSuite.h> +#include <utility> + #include "MantidDataHandling/CheckMantidVersion.h" using Mantid::DataHandling::CheckMantidVersion; @@ -21,8 +23,8 @@ class MockedCheckMantidVersion : public CheckMantidVersion { public: MockedCheckMantidVersion(std::string currentVersion, std::string gitHubVersion) - : CheckMantidVersion(), CurrentVersion(currentVersion), - GitHubVersion(gitHubVersion) {} + : CheckMantidVersion(), CurrentVersion(std::move(currentVersion)), + GitHubVersion(std::move(gitHubVersion)) {} std::string CurrentVersion; std::string GitHubVersion; @@ -117,8 +119,7 @@ public: std::string currentVersion = alg.PropertyManagerOwner::getProperty("CurrentVersion"); - std::string mostRecentVersion = - alg.PropertyManagerOwner::getProperty("MostRecentVersion"); + alg.PropertyManagerOwner::getProperty("MostRecentVersion"); bool isNewVersionAvailable = alg.PropertyManagerOwner::getProperty("IsNewVersionAvailable"); diff --git a/Framework/DataHandling/test/CompressEventsTest.h b/Framework/DataHandling/test/CompressEventsTest.h index 1aab4ca4284fa1c566ddb9dc85f29f362bc569c3..4d5ce1d84e74e3087d627902b1cdeb27b043c8e3 100644 --- a/Framework/DataHandling/test/CompressEventsTest.h +++ b/Framework/DataHandling/test/CompressEventsTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -37,8 +37,9 @@ public: TS_ASSERT_THROWS_NOTHING(alg.setPropertyValue("Tolerance", "0.0")); } - void doTest(std::string inputName, std::string outputName, double tolerance, - int numPixels = 50, double wallClockTolerance = 0.) { + void doTest(const std::string &inputName, const std::string &outputName, + double tolerance, int numPixels = 50, + double wallClockTolerance = 0.) { EventWorkspace_sptr input, output; EventType eventType = WEIGHTED_NOTIME; if (wallClockTolerance > 0.) diff --git a/Framework/DataHandling/test/CreateChunkingFromInstrumentTest.h b/Framework/DataHandling/test/CreateChunkingFromInstrumentTest.h index cb84830e25581a743e3ce54f3a12149e8ffc2556..576785bc1cadfb409cf58b7c2ad46215faf03824 100644 --- a/Framework/DataHandling/test/CreateChunkingFromInstrumentTest.h +++ b/Framework/DataHandling/test/CreateChunkingFromInstrumentTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/CreatePolarizationEfficienciesTest.h b/Framework/DataHandling/test/CreatePolarizationEfficienciesTest.h index dc4cccab49e765466b47105b10a961acebe8092a..4facc901729b2a5f17bab29c674ae714f1b3767d 100644 --- a/Framework/DataHandling/test/CreatePolarizationEfficienciesTest.h +++ b/Framework/DataHandling/test/CreatePolarizationEfficienciesTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/CreateSampleShapeTest.h b/Framework/DataHandling/test/CreateSampleShapeTest.h index 2ec12a4988c2d9c9ad52985c230e4e288ec12813..96d71c38a39838cdaa32874a977aae9d5feb9cad 100644 --- a/Framework/DataHandling/test/CreateSampleShapeTest.h +++ b/Framework/DataHandling/test/CreateSampleShapeTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -83,8 +83,8 @@ public: TS_ASSERT_DELTA(2.6989, material.numberDensity(), 1e-04); } - void runStandardTest(std::string xmlShape, double x, double y, double z, - bool inside) { + void runStandardTest(const std::string &xmlShape, double x, double y, + double z, bool inside) { // Need a test workspace Mantid::API::AnalysisDataService::Instance().add( "TestWorkspace", diff --git a/Framework/DataHandling/test/CreateSimulationWorkspaceTest.h b/Framework/DataHandling/test/CreateSimulationWorkspaceTest.h index 29edc1c95e617e9afaaf3b060c2dc813d250071c..f523688c52b2171b21b7ec27a477c532d326032e 100644 --- a/Framework/DataHandling/test/CreateSimulationWorkspaceTest.h +++ b/Framework/DataHandling/test/CreateSimulationWorkspaceTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -178,7 +178,7 @@ private: .retrieveWS<MatrixWorkspace>(m_wsName); } - void doBinCheck(Mantid::API::MatrixWorkspace_sptr outputWS, + void doBinCheck(const Mantid::API::MatrixWorkspace_sptr &outputWS, const size_t expectedSize) { TS_ASSERT_EQUALS(outputWS->readX(0).size(), expectedSize); // Check bins are correct @@ -189,7 +189,7 @@ private: } } - void doInstrumentCheck(Mantid::API::MatrixWorkspace_sptr outputWS, + void doInstrumentCheck(const Mantid::API::MatrixWorkspace_sptr &outputWS, const std::string &name, const size_t ndets) { Mantid::Geometry::Instrument_const_sptr instr = outputWS->getInstrument(); @@ -208,7 +208,7 @@ private: } void compareSimulationWorkspaceIDFWithFileIDF( - Mantid::API::MatrixWorkspace_sptr simulationWorkspace, + const Mantid::API::MatrixWorkspace_sptr &simulationWorkspace, const std::string &filename, const std::string &algorithmName) { std::string outputWSName = "outWSIDFCompareNexus"; auto alg = Mantid::API::AlgorithmManager::Instance().createUnmanaged( @@ -235,10 +235,6 @@ private: class CreateSimulationWorkspaceTestPerformance : public CxxTest::TestSuite { public: void setUp() override { - - // Starting bin, bin width, last bin - const std::string binParams("-30,3,279"); - alg.initialize(); alg.setPropertyValue("Instrument", "HET"); diff --git a/Framework/DataHandling/test/DataBlockCompositeTest.h b/Framework/DataHandling/test/DataBlockCompositeTest.h index 5412b5fd8bc9fdf281daf814236eacc2c5eef395..48d5eeaf17ad88314bac17409b8d8cc1c8093964 100644 --- a/Framework/DataHandling/test/DataBlockCompositeTest.h +++ b/Framework/DataHandling/test/DataBlockCompositeTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/DataBlockGeneratorTest.h b/Framework/DataHandling/test/DataBlockGeneratorTest.h index c9f2ca5701a7796754bb08d7927c97b338f6ade0..8abd5cb4dc21feab966cb7d3c0acf288978542d2 100644 --- a/Framework/DataHandling/test/DataBlockGeneratorTest.h +++ b/Framework/DataHandling/test/DataBlockGeneratorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -96,8 +96,9 @@ public: } private: - void do_test_interval(std::vector<std::pair<int64_t, int64_t>> interval, - std::vector<int64_t> expectedOutput) { + void + do_test_interval(const std::vector<std::pair<int64_t, int64_t>> &interval, + std::vector<int64_t> expectedOutput) { Mantid::DataHandling::DataBlockGenerator generator(interval); TSM_ASSERT("Should be done", !generator.isDone()); diff --git a/Framework/DataHandling/test/DataBlockTest.h b/Framework/DataHandling/test/DataBlockTest.h index 1ab53a84d34a2b4946dcdc083f37f6413457b604..1ecf2b5619165c8b04c7c8c1585eefdb1d9b1e7e 100644 --- a/Framework/DataHandling/test/DataBlockTest.h +++ b/Framework/DataHandling/test/DataBlockTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/DefineGaugeVolumeTest.h b/Framework/DataHandling/test/DefineGaugeVolumeTest.h index cb8198a59292fd89a706607a4b492f44c5725533..affe394b11f30f9faed0ab1a456acdc3c2191bcc 100644 --- a/Framework/DataHandling/test/DefineGaugeVolumeTest.h +++ b/Framework/DataHandling/test/DefineGaugeVolumeTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/DeleteTableRowsTest.h b/Framework/DataHandling/test/DeleteTableRowsTest.h index 32ddd784d13bc6a41e5297e8da12cb5d5ac09b67..5d8455078c7843563375cadd6dd4c245f0f65912 100644 --- a/Framework/DataHandling/test/DeleteTableRowsTest.h +++ b/Framework/DataHandling/test/DeleteTableRowsTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/DetermineChunkingTest.h b/Framework/DataHandling/test/DetermineChunkingTest.h index 3e91d68028f8eff5726b19adcbcdde264443572b..1d00246ff1285e8e4404f64cb3a2e67b1025224c 100644 --- a/Framework/DataHandling/test/DetermineChunkingTest.h +++ b/Framework/DataHandling/test/DetermineChunkingTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/DownloadFileTest.h b/Framework/DataHandling/test/DownloadFileTest.h index 7b0cfe2ac780f28578d4dcfedfbcfe2ebb28ea7b..e86c96762ec53b9328f52c5e08cac926a39b24f9 100644 --- a/Framework/DataHandling/test/DownloadFileTest.h +++ b/Framework/DataHandling/test/DownloadFileTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -73,8 +73,8 @@ public: exec_alg(url, tmpFile.path(), "http://" + url); } - void exec_alg(std::string address, std::string filename, - std::string newAddress = "") { + void exec_alg(const std::string &address, const std::string &filename, + const std::string &newAddress = "") { MockedDownloadFile alg; TS_ASSERT_THROWS_NOTHING(alg.initialize()) TS_ASSERT(alg.isInitialized()) diff --git a/Framework/DataHandling/test/DownloadInstrumentTest.h b/Framework/DataHandling/test/DownloadInstrumentTest.h index 87cb744d9e847ad882f3ba172b8ccd66bd90ea16..5572bb93725bf144bf11f86c3c9f5e6edcd24a70 100644 --- a/Framework/DataHandling/test/DownloadInstrumentTest.h +++ b/Framework/DataHandling/test/DownloadInstrumentTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -105,7 +105,7 @@ public: } static void destroySuite(DownloadInstrumentTest *suite) { delete suite; } - void createDirectory(Poco::Path path) { + void createDirectory(const Poco::Path &path) { Poco::File file(path); if (file.createDirectory()) { m_directoriesToRemove.emplace_back(file); @@ -190,9 +190,6 @@ public: } int runDownloadInstrument() { - // Name of the output workspace. - std::string outWSName("DownloadInstrumentTest_OutputWS"); - MockedDownloadInstrument alg; TS_ASSERT_THROWS_NOTHING(alg.initialize()) TS_ASSERT(alg.isInitialized()) diff --git a/Framework/DataHandling/test/EventWorkspaceCollectionTest.h b/Framework/DataHandling/test/EventWorkspaceCollectionTest.h index 5434b7d912d79fb5363f8be2438c6d0516283ce8..4105138c317d774a7b15a6e5c729737b42c819a9 100644 --- a/Framework/DataHandling/test/EventWorkspaceCollectionTest.h +++ b/Framework/DataHandling/test/EventWorkspaceCollectionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/ExtractMonitorWorkspaceTest.h b/Framework/DataHandling/test/ExtractMonitorWorkspaceTest.h index 9c1ffc5bbc6685c37cc093d3e29606a51f8954db..520f80cc285848289c8c6511ef3c720c40f2a008 100644 --- a/Framework/DataHandling/test/ExtractMonitorWorkspaceTest.h +++ b/Framework/DataHandling/test/ExtractMonitorWorkspaceTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -45,7 +45,8 @@ public: TS_ASSERT(!alg.isExecuted()); } - void doTest(MatrixWorkspace_sptr inws, MatrixWorkspace_sptr monws) { + void doTest(const MatrixWorkspace_sptr &inws, + const MatrixWorkspace_sptr &monws) { inws->setMonitorWorkspace(monws); TS_ASSERT_EQUALS(inws->monitorWorkspace(), monws); diff --git a/Framework/DataHandling/test/ExtractPolarizationEfficienciesTest.h b/Framework/DataHandling/test/ExtractPolarizationEfficienciesTest.h index 71b64c73d44830f1e1b7191f6c65c86bc8720fcd..184c924ff5f5fb2fe0cba40f97e647ba08001881 100644 --- a/Framework/DataHandling/test/ExtractPolarizationEfficienciesTest.h +++ b/Framework/DataHandling/test/ExtractPolarizationEfficienciesTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/FilterEventsByLogValuePreNexusTest.h b/Framework/DataHandling/test/FilterEventsByLogValuePreNexusTest.h index 97e207d79394a6816f1a33caf603aeab7c499d27..d73716c382b61f344b77804620b4fec4d4961bd6 100644 --- a/Framework/DataHandling/test/FilterEventsByLogValuePreNexusTest.h +++ b/Framework/DataHandling/test/FilterEventsByLogValuePreNexusTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/FindDetectorsInShapeTest.h b/Framework/DataHandling/test/FindDetectorsInShapeTest.h index 7a6af438b28c6bcf935a5aeaf58afbc65c13fe89..0ff8b16016839ea982196c523e4df1e3bd65c6d5 100644 --- a/Framework/DataHandling/test/FindDetectorsInShapeTest.h +++ b/Framework/DataHandling/test/FindDetectorsInShapeTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -117,7 +117,7 @@ public: runTest(xmlShape, "320,340,360,380", false); } - void runTest(std::string xmlShape, std::string expectedHits, + void runTest(const std::string &xmlShape, std::string expectedHits, bool includeMonitors = true) { Mantid::DataHandling::FindDetectorsInShape alg; TS_ASSERT_THROWS_NOTHING(alg.initialize()); diff --git a/Framework/DataHandling/test/FindDetectorsParTest.h b/Framework/DataHandling/test/FindDetectorsParTest.h index a38cf5f8345cb48de234afebe510495a1fd4bfd4..e2dfa289a2467599865d3370ad1d062b784e646a 100644 --- a/Framework/DataHandling/test/FindDetectorsParTest.h +++ b/Framework/DataHandling/test/FindDetectorsParTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/GenerateGroupingPowderTest.h b/Framework/DataHandling/test/GenerateGroupingPowderTest.h index 2efd0f58835c2b98c96b2d4b9a9c5b1a8d49583e..e5422c8fd611e8feaae84065ec35dda2a5aa9bb1 100644 --- a/Framework/DataHandling/test/GenerateGroupingPowderTest.h +++ b/Framework/DataHandling/test/GenerateGroupingPowderTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/GroupDetectors2Test.h b/Framework/DataHandling/test/GroupDetectors2Test.h index b7a8b43b4996c0c564f8f7b129583124601185dc..d97897e4d44842fea9cf599b2341a8f754ef4513 100644 --- a/Framework/DataHandling/test/GroupDetectors2Test.h +++ b/Framework/DataHandling/test/GroupDetectors2Test.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -560,21 +560,21 @@ public: TS_ASSERT_EQUALS(*specDet, 2); specDet = output2D1->getSpectrum(2).getDetectorIDs().begin(); TS_ASSERT_EQUALS(*specDet, 3); - specDet++; + ++specDet; TS_ASSERT_EQUALS(*specDet, 4); - specDet++; + ++specDet; TS_ASSERT_EQUALS(*specDet, 5); specDet = output2D1->getSpectrum(3).getDetectorIDs().begin(); TS_ASSERT_EQUALS(*specDet, 2); - specDet++; + ++specDet; TS_ASSERT_EQUALS(*specDet, 8); - specDet++; + ++specDet; TS_ASSERT_EQUALS(*specDet, 9); - specDet++; + ++specDet; TS_ASSERT_EQUALS(*specDet, 11); - specDet++; + ++specDet; TS_ASSERT_EQUALS(*specDet, 12); - specDet++; + ++specDet; TS_ASSERT_EQUALS(*specDet, 13); AnalysisDataService::Instance().remove(outputSpace); @@ -631,6 +631,7 @@ public: const auto &y = output->y(0); const auto &e = output->e(0); for (size_t i = 0; i < y.size(); ++i) { + // cppcheck-suppress unreadVariable const double expectedSignal = i == 0 ? 2. : (1. + 2.) / 2.; TS_ASSERT_EQUALS(y[i], expectedSignal) const double expectedError = i == 0 ? 1. : std::sqrt(2.) / 2.; @@ -659,6 +660,7 @@ public: const auto &y = output->y(0); const auto &e = output->e(0); for (size_t i = 0; i < y.size(); ++i) { + // cppcheck-suppress unreadVariable const double expectedSignal = i == 0 ? 2. : 1. + 2.; TS_ASSERT_EQUALS(y[i], expectedSignal) const double expectedError = i == 0 ? 1. : std::sqrt(2.); @@ -1122,7 +1124,7 @@ private: } Instrument_sptr instr(new Instrument); - for (detid_t i = 0; i < NHIST; i++) { + for (detid_t i = 0; i < NHIST; ++i) { Detector *d = new Detector("det", i, nullptr); d->setPos(1. + static_cast<double>(i) * 0.1, 0., 1.); instr->add(d); diff --git a/Framework/DataHandling/test/GroupDetectorsTest.h b/Framework/DataHandling/test/GroupDetectorsTest.h index 51343f9ac30ea31d49d182019f9bcf6c5911f2c8..47ff0be4fca32510e463c54c48adf788896180c0 100644 --- a/Framework/DataHandling/test/GroupDetectorsTest.h +++ b/Framework/DataHandling/test/GroupDetectorsTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -52,7 +52,7 @@ public: space2D->getSpectrum(j).setDetectorID(j); } Instrument_sptr instr(new Instrument); - for (detid_t i = 0; i < 5; i++) { + for (detid_t i = 0; i < 5; ++i) { Detector *d = new Detector("det", i, nullptr); instr->add(d); instr->markAsDetector(d); diff --git a/Framework/DataHandling/test/H5UtilTest.h b/Framework/DataHandling/test/H5UtilTest.h index 119220c21cd87cb79bedc58f9ce4a394575f3e11..3f695dbb67a694ddc290d6e66891251380e1e3d7 100644 --- a/Framework/DataHandling/test/H5UtilTest.h +++ b/Framework/DataHandling/test/H5UtilTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/ISISDataArchiveTest.h b/Framework/DataHandling/test/ISISDataArchiveTest.h index 2a89d686f86ef1b80828c27e58da1f48ea5c8c16..91dc12b26a40d26c4e10e6fa78f9b4ebcd7dcd1e 100644 --- a/Framework/DataHandling/test/ISISDataArchiveTest.h +++ b/Framework/DataHandling/test/ISISDataArchiveTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/InstrumentRayTracerTest.h b/Framework/DataHandling/test/InstrumentRayTracerTest.h index 2a3e577d2289a1bf17aed583b3a570477ba65e09..7ec49b9084a3838c01638a9bc69bd99555c39016 100644 --- a/Framework/DataHandling/test/InstrumentRayTracerTest.h +++ b/Framework/DataHandling/test/InstrumentRayTracerTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -98,9 +98,9 @@ public: } private: - void showResults(Links &results, Instrument_const_sptr inst) { + void showResults(Links &results, const Instrument_const_sptr &inst) { Links::const_iterator resultItr = results.begin(); - for (; resultItr != results.end(); resultItr++) { + for (; resultItr != results.end(); ++resultItr) { IComponent_const_sptr component = inst->getComponentByID(resultItr->componentID); std::cout << component->getName() << ", "; diff --git a/Framework/DataHandling/test/JoinISISPolarizationEfficienciesTest.h b/Framework/DataHandling/test/JoinISISPolarizationEfficienciesTest.h index 99b87596d364aee55128cbfffd272b1919dbd43a..647debee579dce0e72a326fe6271c79e084d91aa 100644 --- a/Framework/DataHandling/test/JoinISISPolarizationEfficienciesTest.h +++ b/Framework/DataHandling/test/JoinISISPolarizationEfficienciesTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/LoadAscii2Test.h b/Framework/DataHandling/test/LoadAscii2Test.h index 7feaa017b0a2fb386403e1ce164159a1d928c244..85b348f697c9e0ebe4ea73992857223e578db3ff 100644 --- a/Framework/DataHandling/test/LoadAscii2Test.h +++ b/Framework/DataHandling/test/LoadAscii2Test.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -434,7 +434,7 @@ private: return save.getPropertyValue("Filename"); } - void checkTableData(const Mantid::API::ITableWorkspace_sptr outputWS) { + void checkTableData(const Mantid::API::ITableWorkspace_sptr &outputWS) { const std::string name = "Compare_SaveAsciiWS"; auto wsToCompare = SaveAscii2Test::writeTableWS(name); @@ -590,7 +590,7 @@ private: return outputWS; } - void checkData(const Mantid::API::MatrixWorkspace_sptr outputWS, + void checkData(const Mantid::API::MatrixWorkspace_sptr &outputWS, const int cols) { TS_ASSERT_EQUALS(outputWS->getNumberHistograms(), 5); TS_ASSERT_EQUALS(outputWS->blocksize(), 4); diff --git a/Framework/DataHandling/test/LoadAsciiStlTest.h b/Framework/DataHandling/test/LoadAsciiStlTest.h index 96e1e2d6ee58999b07fdf58f0e5315b39c3d44d0..f07ca0e9dc976b26043fd8f02bad866768f6a57f 100644 --- a/Framework/DataHandling/test/LoadAsciiStlTest.h +++ b/Framework/DataHandling/test/LoadAsciiStlTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -53,7 +53,7 @@ public: loadFailureTest("invalid_triangle.stl"); } - void loadFailureTest(const std::string filename) { + void loadFailureTest(const std::string &filename) { std::string path = FileFinder::Instance().getFullPath(filename); auto Loader = LoadAsciiStl(path, units); TS_ASSERT_THROWS_ANYTHING(Loader.readStl()); diff --git a/Framework/DataHandling/test/LoadAsciiTest.h b/Framework/DataHandling/test/LoadAsciiTest.h index 4a3d84cba65f215af24502fcd00e097f9fc2f8a7..efacceca2097553fdfc39f109c69d6ec627c3b82 100644 --- a/Framework/DataHandling/test/LoadAsciiTest.h +++ b/Framework/DataHandling/test/LoadAsciiTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -275,7 +275,7 @@ private: return outputWS; } - void checkData(const Mantid::API::MatrixWorkspace_sptr outputWS, + void checkData(const Mantid::API::MatrixWorkspace_sptr &outputWS, const bool threeColumn) { if (threeColumn) { TS_ASSERT_EQUALS(outputWS->getNumberHistograms(), 1); diff --git a/Framework/DataHandling/test/LoadBBYTest.h b/Framework/DataHandling/test/LoadBBYTest.h index e9e55b71bcdc6972ad7e27eda2dab3e75d313214..b488a8c2c675d2f14ac6b78eaccd4921f7e2dbff 100644 --- a/Framework/DataHandling/test/LoadBBYTest.h +++ b/Framework/DataHandling/test/LoadBBYTest.h @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #pragma once #include <cxxtest/TestSuite.h> diff --git a/Framework/DataHandling/test/LoadBinaryStlTest.h b/Framework/DataHandling/test/LoadBinaryStlTest.h index 2915fd793f263dad7e448319a0ee8b25463065de..86cccd22e358b55d1f11c180b4966bc4b0d639e9 100644 --- a/Framework/DataHandling/test/LoadBinaryStlTest.h +++ b/Framework/DataHandling/test/LoadBinaryStlTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidAPI/FileFinder.h" diff --git a/Framework/DataHandling/test/LoadCalFileTest.h b/Framework/DataHandling/test/LoadCalFileTest.h index 66c5b0e9a91002eee246004d02b26f27ef2355d0..2d090729f18aba88cb34923cb5bf0382918ac045 100644 --- a/Framework/DataHandling/test/LoadCalFileTest.h +++ b/Framework/DataHandling/test/LoadCalFileTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/LoadCanSAS1dTest.h b/Framework/DataHandling/test/LoadCanSAS1dTest.h index db4cedf7a37dff40d75ec96575a9963d00d9e2fa..6b3b63b028d9e6dcdc73e5602e9d9f7521bd99fc 100644 --- a/Framework/DataHandling/test/LoadCanSAS1dTest.h +++ b/Framework/DataHandling/test/LoadCanSAS1dTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/LoadDAETest.h b/Framework/DataHandling/test/LoadDAETest.h index cb6cd3bd816fd385b6a66e0d8c851c06edcba4cd..d99150cd8c18fc786ab5c97a2ec3987f85533545 100644 --- a/Framework/DataHandling/test/LoadDAETest.h +++ b/Framework/DataHandling/test/LoadDAETest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/LoadDaveGrpTest.h b/Framework/DataHandling/test/LoadDaveGrpTest.h index a580b0b378f352c898f8dd6aa4bcdb1c2aa73962..d4e71624fb93db7eb13ed2404c9e7940a4abb24f 100644 --- a/Framework/DataHandling/test/LoadDaveGrpTest.h +++ b/Framework/DataHandling/test/LoadDaveGrpTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/LoadDetectorInfoTest.h b/Framework/DataHandling/test/LoadDetectorInfoTest.h index a8909db12b5b816f64bbecff08aa225a58ea2df8..c80177d12810fb113a1980f647dfc07a062b436b 100644 --- a/Framework/DataHandling/test/LoadDetectorInfoTest.h +++ b/Framework/DataHandling/test/LoadDetectorInfoTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/LoadDetectorsGroupingFileTest.h b/Framework/DataHandling/test/LoadDetectorsGroupingFileTest.h index c213f76a3d7c6ea58c4aa3e599ff675c296839a5..3ec153753df288da1f1ad1051877395e237c40e9 100644 --- a/Framework/DataHandling/test/LoadDetectorsGroupingFileTest.h +++ b/Framework/DataHandling/test/LoadDetectorsGroupingFileTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -124,7 +124,7 @@ public: API::AnalysisDataService::Instance().remove(ws); } - ScopedFile generateAutoGroupIDGroupXMLFile(std::string xmlfilename) { + ScopedFile generateAutoGroupIDGroupXMLFile(const std::string &xmlfilename) { std::ostringstream os; os << "<?xml version=\"1.0\"?>\n"; @@ -173,7 +173,7 @@ public: API::AnalysisDataService::Instance().remove(ws); } - ScopedFile generateSpectrumIDXMLFile(std::string xmlfilename) { + ScopedFile generateSpectrumIDXMLFile(const std::string &xmlfilename) { std::ostringstream os; os << "<?xml version=\"1.0\"?>\n"; @@ -222,7 +222,7 @@ public: API::AnalysisDataService::Instance().remove(ws); } - ScopedFile generateOldSpectrumIDXMLFile(std::string xmlfilename) { + ScopedFile generateOldSpectrumIDXMLFile(const std::string &xmlfilename) { std::ostringstream os; os << "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n"; diff --git a/Framework/DataHandling/test/LoadDiffCalTest.h b/Framework/DataHandling/test/LoadDiffCalTest.h index 6df1b26d6a3b29a373ad22babacf574fe481efc8..173fe25c474ea1b6ed49b55a5cf1aa54fdb56d86 100644 --- a/Framework/DataHandling/test/LoadDiffCalTest.h +++ b/Framework/DataHandling/test/LoadDiffCalTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/LoadDspacemapTest.h b/Framework/DataHandling/test/LoadDspacemapTest.h index 7c8abd8070de89633a970a8d3a9f7e2cf69e9daa..c6b72d53cd1540c8eff1463efb9a7dcb3408bad3 100644 --- a/Framework/DataHandling/test/LoadDspacemapTest.h +++ b/Framework/DataHandling/test/LoadDspacemapTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -58,9 +58,8 @@ public: TS_ASSERT_DELTA(offsetsWS->dataY(0)[0], -0.6162, 0.0001); } - void doTestVulcan(std::string dspaceFile, std::string fileType) { - std::string outputFile = "./VULCAN_dspacemaptocal_test.cal"; - + void doTestVulcan(const std::string &dspaceFile, + const std::string &fileType) { LoadDspacemap testerDSP; TS_ASSERT_THROWS_NOTHING(testerDSP.initialize()); TS_ASSERT_THROWS_NOTHING(testerDSP.isInitialized()); diff --git a/Framework/DataHandling/test/LoadEMUauTest.h b/Framework/DataHandling/test/LoadEMUauTest.h index c4fabc01c4ba867a093efa98792125d81d358c22..53e348f516e74d0a2b898aa52edb2df77406e11f 100644 --- a/Framework/DataHandling/test/LoadEMUauTest.h +++ b/Framework/DataHandling/test/LoadEMUauTest.h @@ -1,3 +1,9 @@ +// Mantid Repository : https://github.com/mantidproject/mantid +// +// Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS +// SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -76,7 +82,7 @@ public: run.getProperty("end_time")->value().find("2018-07-26T10:17:12.6") == 0) // test some data properties - auto logpm = [&run](std::string tag) { + auto logpm = [&run](const std::string &tag) { return dynamic_cast<TimeSeriesProperty<double> *>(run.getProperty(tag)) ->firstValue(); }; @@ -85,7 +91,7 @@ public: // test some instrument parameters auto instr = output->getInstrument(); - auto iparam = [&instr](std::string tag) { + auto iparam = [&instr](const std::string &tag) { return instr->getNumberParameter(tag)[0]; }; TS_ASSERT_DELTA(iparam("AnalysedV2"), 630.866, 1.0e-3); diff --git a/Framework/DataHandling/test/LoadEmptyInstrumentTest.h b/Framework/DataHandling/test/LoadEmptyInstrumentTest.h index ecf044d2e22abcf194210757ea577bea50516778..fa8b7b2b450e96d90a0f8e1cbe656693ddc21764 100644 --- a/Framework/DataHandling/test/LoadEmptyInstrumentTest.h +++ b/Framework/DataHandling/test/LoadEmptyInstrumentTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -38,7 +38,7 @@ public: static void destroySuite(LoadEmptyInstrumentTest *suite) { delete suite; } /// Helper that checks that each spectrum has one detector - void check_workspace_detectors(MatrixWorkspace_sptr output, + void check_workspace_detectors(const MatrixWorkspace_sptr &output, size_t numberDetectors) { TS_ASSERT_EQUALS(output->getNumberHistograms(), numberDetectors); for (size_t i = 0; i < output->getNumberHistograms(); i++) { diff --git a/Framework/DataHandling/test/LoadEventNexusIndexSetupTest.h b/Framework/DataHandling/test/LoadEventNexusIndexSetupTest.h index 59c3920f5be90a67bc573b3ee8456165ca73c7cb..5b74867c4825fc33ab0df4ed747532e2a93b027e 100644 --- a/Framework/DataHandling/test/LoadEventNexusIndexSetupTest.h +++ b/Framework/DataHandling/test/LoadEventNexusIndexSetupTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/LoadEventNexusTest.h b/Framework/DataHandling/test/LoadEventNexusTest.h index 228a491444b3f53494523fc1cf8d4e2a9894c772..893761b6f34538fa96195443ce94400b123a2192 100644 --- a/Framework/DataHandling/test/LoadEventNexusTest.h +++ b/Framework/DataHandling/test/LoadEventNexusTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -106,7 +106,7 @@ load_reference_workspace(const std::string &filename) { return boost::dynamic_pointer_cast<const EventWorkspace>(out); } void run_MPI_load(const Parallel::Communicator &comm, - boost::shared_ptr<std::mutex> mutex, + const boost::shared_ptr<std::mutex> &mutex, const std::string &filename) { boost::shared_ptr<const EventWorkspace> reference; boost::shared_ptr<const EventWorkspace> eventWS; @@ -736,7 +736,7 @@ public: } void doTestSingleBank(bool SingleBankPixelsOnly, bool Precount, - std::string BankName = "bank36", + const std::string &BankName = "bank36", bool willFail = false) { Mantid::API::FrameworkManager::Instance(); LoadEventNexus ld; diff --git a/Framework/DataHandling/test/LoadEventPreNexus2Test.h b/Framework/DataHandling/test/LoadEventPreNexus2Test.h index 2e046e128e8b983955149527ea253edf519bf2c4..795fe4a2878e38d2e7a738cc8e1bd38cebb85c33 100644 --- a/Framework/DataHandling/test/LoadEventPreNexus2Test.h +++ b/Framework/DataHandling/test/LoadEventPreNexus2Test.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -69,7 +69,7 @@ public: TS_ASSERT_EQUALS(sizeof(DasEvent), 8); } - void checkWorkspace(std::string eventfile, std::string WSName, + void checkWorkspace(const std::string &eventfile, const std::string &WSName, int numpixels_with_events) { // Get the event file size struct stat filestatus; @@ -143,7 +143,7 @@ public: do_test_LoadPreNeXus_CNCS("Parallel"); } - void do_test_LoadPreNeXus_CNCS(std::string parallel) { + void do_test_LoadPreNeXus_CNCS(const std::string ¶llel) { std::string eventfile("CNCS_7860_neutron_event.dat"); eventLoader->setPropertyValue("EventFilename", eventfile); eventLoader->setPropertyValue("MappingFilename", "CNCS_TS_2008_08_18.dat"); diff --git a/Framework/DataHandling/test/LoadFITSTest.h b/Framework/DataHandling/test/LoadFITSTest.h index aa6f05f7bc90d35dcb2c533786e38e5a09b9a828..a0ae1413401e20162c1d1361ea107568a8738e96 100644 --- a/Framework/DataHandling/test/LoadFITSTest.h +++ b/Framework/DataHandling/test/LoadFITSTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/LoadFullprofResolutionTest.h b/Framework/DataHandling/test/LoadFullprofResolutionTest.h index 1bbfed94e8410c314000688a4900971ca93b96bd..975766df8d4eb8e165961fb282630fb24d410a89 100644 --- a/Framework/DataHandling/test/LoadFullprofResolutionTest.h +++ b/Framework/DataHandling/test/LoadFullprofResolutionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -747,7 +747,7 @@ public: //---------------------------------------------------------------------------------------------- /** Parse a TableWorkspace to a map */ - void parseTableWorkspace(TableWorkspace_sptr tablews, + void parseTableWorkspace(const TableWorkspace_sptr &tablews, map<string, double> ¶mmap) { parammap.clear(); @@ -766,7 +766,7 @@ public: //---------------------------------------------------------------------------------------------- /** Parse a TableWorkspace's 2nd bank to a map */ - void parseTableWorkspace2(TableWorkspace_sptr tablews, + void parseTableWorkspace2(const TableWorkspace_sptr &tablews, map<string, double> ¶mmap) { parammap.clear(); @@ -785,7 +785,7 @@ public: //---------------------------------------------------------------------------------------------- /** Generate a GEM workspace group with specified number of workspaces. */ - void load_GEM(size_t numberOfWorkspaces, std::string workspaceName) { + void load_GEM(size_t numberOfWorkspaces, const std::string &workspaceName) { LoadInstrument loaderGEM; TS_ASSERT_THROWS_NOTHING(loaderGEM.initialize()); @@ -818,7 +818,7 @@ public: //---------------------------------------------------------------------------------------------- /** Generate a 1 bank .irf file */ - void generate1BankIrfFile(string filename) { + void generate1BankIrfFile(const string &filename) { ofstream ofile; ofile.open(filename.c_str()); @@ -879,7 +879,7 @@ public: //---------------------------------------------------------------------------------------------- /** Generate a 2 bank .irf file */ - void generate2BankIrfFile(string filename) { + void generate2BankIrfFile(const string &filename) { ofstream ofile; ofile.open(filename.c_str()); @@ -977,7 +977,7 @@ public: /** Generate a 3 bank .irf file */ - void generate3BankIrfFile(string filename) { + void generate3BankIrfFile(const string &filename) { ofstream ofile; ofile.open(filename.c_str()); @@ -1116,7 +1116,7 @@ public: //---------------------------------------------------------------------------------------------- /** Generate a 1 bank .irf file for BackToBackExponential fitting function */ - void generate1BankIrfBBXFile(string filename) { + void generate1BankIrfBBXFile(const string &filename) { ofstream ofile; ofile.open(filename.c_str()); diff --git a/Framework/DataHandling/test/LoadGSASInstrumentFileTest.h b/Framework/DataHandling/test/LoadGSASInstrumentFileTest.h index 8b8ea9147fb140ee71bd49213413d71b967a3df8..e7e65b5ee5304332d6139900c436e704d673bf5a 100644 --- a/Framework/DataHandling/test/LoadGSASInstrumentFileTest.h +++ b/Framework/DataHandling/test/LoadGSASInstrumentFileTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -322,7 +322,7 @@ public: //---------------------------------------------------------------------------------------------- /** Parse a TableWorkspace to a map */ - void parseTableWorkspace(TableWorkspace_sptr tablews, + void parseTableWorkspace(const TableWorkspace_sptr &tablews, map<string, double> ¶mmap) { parammap.clear(); @@ -341,7 +341,7 @@ public: //---------------------------------------------------------------------------------------------- /** Parse a TableWorkspace's 2nd bank to a map */ - void parseTableWorkspace2(TableWorkspace_sptr tablews, + void parseTableWorkspace2(const TableWorkspace_sptr &tablews, map<string, double> ¶mmap) { parammap.clear(); @@ -360,7 +360,7 @@ public: //---------------------------------------------------------------------------------------------- /** Generate a 1 bank .prm file */ - void generate1BankPrmFile(string filename) { + void generate1BankPrmFile(const string &filename) { ofstream ofile; ofile.open(filename.c_str()); @@ -402,7 +402,7 @@ public: //---------------------------------------------------------------------------------------------- /** Generate a 2 bank .irf file */ - void generate2BankPrmFile(string filename) { + void generate2BankPrmFile(const string &filename) { ofstream ofile; ofile.open(filename.c_str()); @@ -456,7 +456,7 @@ public: //---------------------------------------------------------------------------------------------- /** Generate a 1 bank .prm file */ - void generateBadHistogramTypePrmFile(string filename) { + void generateBadHistogramTypePrmFile(const string &filename) { ofstream ofile; ofile.open(filename.c_str()); @@ -497,7 +497,7 @@ public: /** Create a workspace group with specified number of workspaces. */ void createWorkspaceGroup(size_t numberOfWorkspaces, - std::string workspaceName) { + const std::string &workspaceName) { // create a workspace with some sample data WorkspaceGroup_sptr gws(new API::WorkspaceGroup); diff --git a/Framework/DataHandling/test/LoadGSSTest.h b/Framework/DataHandling/test/LoadGSSTest.h index 66aa280e96b3d7993dae67cc08f4221e3e07e23b..0e329f120848458d60c00721c162faef6e12aadc 100644 --- a/Framework/DataHandling/test/LoadGSSTest.h +++ b/Framework/DataHandling/test/LoadGSSTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/LoadHFIRSANSTest.h b/Framework/DataHandling/test/LoadHFIRSANSTest.h index e35f166f77464acb4053a3f9facda5a992640628..3ce8956d33a0de68a966ab345d08d696d534c7de 100644 --- a/Framework/DataHandling/test/LoadHFIRSANSTest.h +++ b/Framework/DataHandling/test/LoadHFIRSANSTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/LoadIDFFromNexusTest.h b/Framework/DataHandling/test/LoadIDFFromNexusTest.h index 86b4a7c51e32507c4f367477250a52628fd9d82b..cb0c22b2ece65bdb3d61e7670292fcfc76797fbc 100644 --- a/Framework/DataHandling/test/LoadIDFFromNexusTest.h +++ b/Framework/DataHandling/test/LoadIDFFromNexusTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/LoadILLDiffractionTest.h b/Framework/DataHandling/test/LoadILLDiffractionTest.h index a93a1ac43353f4fbf0c2ccbc7222e3c81ccbb5cd..1f43b32b0c1a26a2f071fff1a27b8871c9cae268 100644 --- a/Framework/DataHandling/test/LoadILLDiffractionTest.h +++ b/Framework/DataHandling/test/LoadILLDiffractionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -325,7 +325,7 @@ public: TS_ASSERT_DELTA(theta, 147.55, 0.001) } - void do_test_D2B_single_file(std::string dataType) { + void do_test_D2B_single_file(const std::string &dataType) { // Test a D2B detector scan file with 25 detector positions const int NUMBER_OF_TUBES = 128; diff --git a/Framework/DataHandling/test/LoadILLIndirect2Test.h b/Framework/DataHandling/test/LoadILLIndirect2Test.h index 9b04ad1f4b0cd5da6cbdd3d81cd011f06f7ce8e5..02465c18282079feb5399c7f48ce82481a6791f3 100644 --- a/Framework/DataHandling/test/LoadILLIndirect2Test.h +++ b/Framework/DataHandling/test/LoadILLIndirect2Test.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/LoadILLPolarizationFactorsTest.h b/Framework/DataHandling/test/LoadILLPolarizationFactorsTest.h index 25d0b1fb4b078e8f41ca27f04643a4cb4ac853f2..9fe661638ca62398ac9437ae925eb27b85034a5d 100644 --- a/Framework/DataHandling/test/LoadILLPolarizationFactorsTest.h +++ b/Framework/DataHandling/test/LoadILLPolarizationFactorsTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/LoadILLReflectometryTest.h b/Framework/DataHandling/test/LoadILLReflectometryTest.h index b1c9cd5b4fc26bd93aabf4220e8bf3e407624bf4..e282244fd77ce2e225e7860a0642270d60997648 100644 --- a/Framework/DataHandling/test/LoadILLReflectometryTest.h +++ b/Framework/DataHandling/test/LoadILLReflectometryTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -34,7 +34,7 @@ private: // Name of the default output workspace const std::string m_outWSName{"LoadILLReflectometryTest_OutputWS"}; - static void commonProperties(MatrixWorkspace_sptr output, + static void commonProperties(const MatrixWorkspace_sptr &output, const std::string &instrName) { TS_ASSERT(output->isHistogramData()) const auto &spectrumInfo = output->spectrumInfo(); @@ -59,7 +59,7 @@ private: "degree") } - static double detCounts(MatrixWorkspace_sptr output) { + static double detCounts(const MatrixWorkspace_sptr &output) { // sum of detector counts double counts{0.0}; for (size_t i = 0; i < output->getNumberHistograms(); ++i) { @@ -696,10 +696,12 @@ public: auto instrument = output->getInstrument(); auto slit1 = instrument->getComponentByName("slit2"); auto slit2 = instrument->getComponentByName("slit3"); + // cppcheck-suppress unreadVariable const double S2z = -output->run().getPropertyValueAsType<double>("Distance.S2toSample") * 1e-3; TS_ASSERT_EQUALS(slit1->getPos(), V3D(0.0, 0.0, S2z)) + // cppcheck-suppress unreadVariable const double S3z = -output->run().getPropertyValueAsType<double>("Distance.S3toSample") * 1e-3; diff --git a/Framework/DataHandling/test/LoadILLSANSTest.h b/Framework/DataHandling/test/LoadILLSANSTest.h index 46d7b6214cd506933954499945fec7d8eebbf95b..61bc23b0b9b99128ea5d4fae264ba13103d363cf 100644 --- a/Framework/DataHandling/test/LoadILLSANSTest.h +++ b/Framework/DataHandling/test/LoadILLSANSTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/LoadILLTOF2Test.h b/Framework/DataHandling/test/LoadILLTOF2Test.h index af8c635b512d13899e40f1cc13bcbbf1fd612fd0..9a2b9dcd7b92b3528bf7c95fed32dce57d57c414 100644 --- a/Framework/DataHandling/test/LoadILLTOF2Test.h +++ b/Framework/DataHandling/test/LoadILLTOF2Test.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -46,7 +46,7 @@ public: * The elastic peak is obtained on the fly from the sample data. */ MatrixWorkspace_sptr - loadDataFile(const std::string dataFile, const size_t numberOfHistograms, + loadDataFile(const std::string &dataFile, const size_t numberOfHistograms, const size_t numberOfMonitors, const size_t numberOfChannels, const double tofDelay, const double tofChannelWidth) { LoadILLTOF2 loader; diff --git a/Framework/DataHandling/test/LoadILLTest.h b/Framework/DataHandling/test/LoadILLTest.h index 2fa6ef09668c53da197f888c77bd4943030541c7..5a70735944f9894c2c18dddeb99bcaa4a65301e2 100644 --- a/Framework/DataHandling/test/LoadILLTest.h +++ b/Framework/DataHandling/test/LoadILLTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -27,7 +27,7 @@ public: void tearDown() override { AnalysisDataService::Instance().clear(); } - void checkLoader(std::string filename, std::string resultLoader) { + void checkLoader(const std::string &filename, std::string resultLoader) { Load alg; alg.setChild(true); alg.initialize(); diff --git a/Framework/DataHandling/test/LoadISISNexusTest.h b/Framework/DataHandling/test/LoadISISNexusTest.h index 4c691e3351cba3814b8d9e80eb2801b242c2dcc6..8179ec60a6eb7a37ff892464fbcf9c79ae8bd158 100644 --- a/Framework/DataHandling/test/LoadISISNexusTest.h +++ b/Framework/DataHandling/test/LoadISISNexusTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -27,7 +27,7 @@ using namespace Mantid::DataHandling; class LoadISISNexusTest : public CxxTest::TestSuite { private: // Helper method to fetch the log property entry corresponding to period. - Property *fetchPeriodLog(MatrixWorkspace_sptr workspace, + Property *fetchPeriodLog(const MatrixWorkspace_sptr &workspace, int expectedPeriodNumber) { std::stringstream period_number_stream; period_number_stream << expectedPeriodNumber; @@ -38,14 +38,14 @@ private: // Helper method to fetch the log property entry corresponding to the current // period. - Property *fetchCurrentPeriodLog(MatrixWorkspace_sptr workspace) { + Property *fetchCurrentPeriodLog(const MatrixWorkspace_sptr &workspace) { Property *p = workspace->run().getLogData("current_period"); return p; } // Helper method to check that the log data contains a specific period number // entry. - void checkPeriodLogData(MatrixWorkspace_sptr workspace, + void checkPeriodLogData(const MatrixWorkspace_sptr &workspace, int expectedPeriodNumber) { Property *p = nullptr; TS_ASSERT_THROWS_NOTHING( diff --git a/Framework/DataHandling/test/LoadISISPolarizationEfficienciesTest.h b/Framework/DataHandling/test/LoadISISPolarizationEfficienciesTest.h index fc554962b7abbf59aa5f86fc5c02eef58f60efcb..0c4da0ed7ecba16bf6562bd07ffdb8564f0fdc39 100644 --- a/Framework/DataHandling/test/LoadISISPolarizationEfficienciesTest.h +++ b/Framework/DataHandling/test/LoadISISPolarizationEfficienciesTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/LoadInstrumentFromNexusTest.h b/Framework/DataHandling/test/LoadInstrumentFromNexusTest.h index 028d5813634bd749ecb0ea40d8e9469e4461e5b6..73bee0f6b2f36581b9b2f2e946b876c9552159d5 100644 --- a/Framework/DataHandling/test/LoadInstrumentFromNexusTest.h +++ b/Framework/DataHandling/test/LoadInstrumentFromNexusTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/LoadInstrumentFromRawTest.h b/Framework/DataHandling/test/LoadInstrumentFromRawTest.h index 914a76005b2b137e17dbe66db747579403795cd1..9a4b487d216b164c8d09b85fdd3c1edbed1056a1 100644 --- a/Framework/DataHandling/test/LoadInstrumentFromRawTest.h +++ b/Framework/DataHandling/test/LoadInstrumentFromRawTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/LoadInstrumentTest.h b/Framework/DataHandling/test/LoadInstrumentTest.h index 8263e32e0576dcb869991d8a3b0797142789b7de..8dd42e1c98a50c6f5b618d607fca1fa1d483eb77 100644 --- a/Framework/DataHandling/test/LoadInstrumentTest.h +++ b/Framework/DataHandling/test/LoadInstrumentTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -418,7 +418,7 @@ public: } /// Common initialisation for Nexus loading tests - MatrixWorkspace_sptr doLoadNexus(const std::string filename) { + MatrixWorkspace_sptr doLoadNexus(const std::string &filename) { LoadInstrument nexusLoader; nexusLoader.initialize(); nexusLoader.setChild(true); @@ -860,9 +860,9 @@ private: // @param paramFilename Expected parameter file to be loaded as part of // LoadInstrument // @param par A specific parameter to check if have been loaded - void doTestParameterFileSelection(std::string filename, - std::string paramFilename, - std::string par) { + void doTestParameterFileSelection(const std::string &filename, + const std::string ¶mFilename, + const std::string &par) { InstrumentDataService::Instance().clear(); LoadInstrument loader; @@ -914,7 +914,7 @@ public: ws = WorkspaceCreationHelper::create2DWorkspace(1, 2); } - void doTest(std::string filename, size_t numTimes = 1) { + void doTest(const std::string &filename, size_t numTimes = 1) { for (size_t i = 0; i < numTimes; ++i) { // Remove any existing instruments, so each time they are loaded. InstrumentDataService::Instance().clear(); diff --git a/Framework/DataHandling/test/LoadIsawDetCalTest.h b/Framework/DataHandling/test/LoadIsawDetCalTest.h index 2ef508bb91b8d1e2ece3c0f0ebd9f7fc14809f23..0b4d947c3555b98ed4423f7955b646d62be82aca 100644 --- a/Framework/DataHandling/test/LoadIsawDetCalTest.h +++ b/Framework/DataHandling/test/LoadIsawDetCalTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -48,8 +48,8 @@ void loadEmptyInstrument(const std::string &filename, class LoadIsawDetCalTest : public CxxTest::TestSuite { public: - void checkPosition(IComponent_const_sptr det, const double x, const double y, - const double z) { + void checkPosition(const IComponent_const_sptr &det, const double x, + const double y, const double z) { if (det != nullptr) { const auto detPos = det->getPos(); const V3D testPos(x, y, z); @@ -59,8 +59,8 @@ public: } } - void checkRotation(IComponent_const_sptr det, const double w, const double a, - const double b, const double c) { + void checkRotation(const IComponent_const_sptr &det, const double w, + const double a, const double b, const double c) { if (det != nullptr) { const auto detRot = det->getRotation(); const Quat testRot(w, a, b, c); diff --git a/Framework/DataHandling/test/LoadLLBTest.h b/Framework/DataHandling/test/LoadLLBTest.h index 31d1b88277bca223c18fa3c597c1dcde3f74d035..417c9181147ecd83149a931504516071c88b1c00 100644 --- a/Framework/DataHandling/test/LoadLLBTest.h +++ b/Framework/DataHandling/test/LoadLLBTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/LoadLogTest.h b/Framework/DataHandling/test/LoadLogTest.h index c2812d8f294becf0a0de609a40718e61c78ff830..58dcad0cf3c002eb32cf94408b3a5dd05cb3e8b5 100644 --- a/Framework/DataHandling/test/LoadLogTest.h +++ b/Framework/DataHandling/test/LoadLogTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -173,8 +173,8 @@ public: TS_ASSERT(ws->run().hasProperty("str3")); } - void do_test_SNSTextFile(std::string names, std::string units, bool willFail, - bool createWorkspace = true, + void do_test_SNSTextFile(const std::string &names, const std::string &units, + bool willFail, bool createWorkspace = true, std::string expectedLastUnit = "Furlongs") { // Create an empty workspace and put it in the AnalysisDataService diff --git a/Framework/DataHandling/test/LoadMLZTest.h b/Framework/DataHandling/test/LoadMLZTest.h index 7107779ba7c910f3a5ecb32850f7fa8d366bf124..683da2459488a1eb2c97a909f9b60e5eca40adad 100644 --- a/Framework/DataHandling/test/LoadMLZTest.h +++ b/Framework/DataHandling/test/LoadMLZTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/LoadMappingTableTest.h b/Framework/DataHandling/test/LoadMappingTableTest.h index 907b640facf13647da9ae71fa82931139173dc02..9459270a3e8745cfc06b3a23b3a4d008ff70235e 100644 --- a/Framework/DataHandling/test/LoadMappingTableTest.h +++ b/Framework/DataHandling/test/LoadMappingTableTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -80,7 +80,7 @@ public: detectorgroup = work1->getSpectrum(2083).getDetectorIDs(); std::set<detid_t>::const_iterator it; int pixnum = 101191; - for (it = detectorgroup.begin(); it != detectorgroup.end(); it++) + for (it = detectorgroup.begin(); it != detectorgroup.end(); ++it) TS_ASSERT_EQUALS(*it, pixnum++); AnalysisDataService::Instance().remove(outputSpace); diff --git a/Framework/DataHandling/test/LoadMaskTest.h b/Framework/DataHandling/test/LoadMaskTest.h index 9b68071bbe3862359e4fb2ecdbd33e47893c0130..3dff548e4ac24aa802e25bea3c80b5a9662bb8bb 100644 --- a/Framework/DataHandling/test/LoadMaskTest.h +++ b/Framework/DataHandling/test/LoadMaskTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -515,9 +515,9 @@ public: /* * Create a masking file */ - ScopedFileHelper::ScopedFile genMaskingFile(std::string maskfilename, + ScopedFileHelper::ScopedFile genMaskingFile(const std::string &maskfilename, std::vector<int> detids, - std::vector<int> banks) { + const std::vector<int> &banks) { std::stringstream ss; // 1. Header @@ -551,8 +551,8 @@ public: * Create an ISIS format masking file */ ScopedFileHelper::ScopedFile - genISISMaskingFile(std::string maskfilename, - std::vector<specnum_t> singlespectra, + genISISMaskingFile(const std::string &maskfilename, + const std::vector<specnum_t> &singlespectra, std::vector<specnum_t> pairspectra) { std::stringstream ss; diff --git a/Framework/DataHandling/test/LoadMcStasNexusTest.h b/Framework/DataHandling/test/LoadMcStasNexusTest.h index 3b856f9d3c1f97790c98431fd95009b47792aadf..cdec2e8310b3f24b21b3d1d2f34c0b44a97fb17a 100644 --- a/Framework/DataHandling/test/LoadMcStasNexusTest.h +++ b/Framework/DataHandling/test/LoadMcStasNexusTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/LoadMcStasTest.h b/Framework/DataHandling/test/LoadMcStasTest.h index 82f354c36db0acb9e43b30ffe4181a8111f73429..986f30afe83125f7cd7fa3bcb5f7a99f6cb8b380 100644 --- a/Framework/DataHandling/test/LoadMcStasTest.h +++ b/Framework/DataHandling/test/LoadMcStasTest.h @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #pragma once #include <cxxtest/TestSuite.h> @@ -165,7 +164,7 @@ public: } private: - double extractSumAndTest(MatrixWorkspace_sptr workspace, + double extractSumAndTest(const MatrixWorkspace_sptr &workspace, const double &expectedSum) { TS_ASSERT_EQUALS(workspace->getNumberHistograms(), 8192); auto sum = 0.0; @@ -176,8 +175,8 @@ private: return sum; } - boost::shared_ptr<WorkspaceGroup> load_test(std::string fileName, - std::string outputName) { + boost::shared_ptr<WorkspaceGroup> load_test(const std::string &fileName, + const std::string &outputName) { // specify name of file to load workspace from algToBeTested.setProperty("Filename", fileName); diff --git a/Framework/DataHandling/test/LoadMuonLogTest.h b/Framework/DataHandling/test/LoadMuonLogTest.h index 9ae6a1b014233b6598a4224c81257c2ef0d87908..8f10927f57f4a7f2cb64628bf717468b1d940884 100644 --- a/Framework/DataHandling/test/LoadMuonLogTest.h +++ b/Framework/DataHandling/test/LoadMuonLogTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/LoadMuonNexus1Test.h b/Framework/DataHandling/test/LoadMuonNexus1Test.h index faf0615ea1bf39a30b412ecb7b03e65d2fd66f3d..338d2c2b160390440e0d9dd53050206ef5d0d9d2 100644 --- a/Framework/DataHandling/test/LoadMuonNexus1Test.h +++ b/Framework/DataHandling/test/LoadMuonNexus1Test.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/LoadMuonNexus2Test.h b/Framework/DataHandling/test/LoadMuonNexus2Test.h index f528f96203c0e2e26fdfcb87f1f0a12915c41989..4b9c1947e22e2c3a39e9dad0ebf90d0976b3a6d5 100644 --- a/Framework/DataHandling/test/LoadMuonNexus2Test.h +++ b/Framework/DataHandling/test/LoadMuonNexus2Test.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -33,7 +33,7 @@ using Mantid::Types::Core::DateAndTime; class LoadMuonNexus2Test : public CxxTest::TestSuite { public: - void check_spectra_and_detectors(MatrixWorkspace_sptr output) { + void check_spectra_and_detectors(const MatrixWorkspace_sptr &output) { //---------------------------------------------------------------------- // Tests to check that spectra-detector mapping is done correctly diff --git a/Framework/DataHandling/test/LoadMuonNexusTest.h b/Framework/DataHandling/test/LoadMuonNexusTest.h index cb67f1f54cbd448afcb370a52694bec222ffa42f..dc90ab446e6b428c157991bfaa464f69341cd5a1 100644 --- a/Framework/DataHandling/test/LoadMuonNexusTest.h +++ b/Framework/DataHandling/test/LoadMuonNexusTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/LoadNGEMTest.h b/Framework/DataHandling/test/LoadNGEMTest.h index ba6e07e92c9109ae1ea74cc82dfcabd589135040..315af662515055833e595b6e6a57c3817c359644 100644 --- a/Framework/DataHandling/test/LoadNGEMTest.h +++ b/Framework/DataHandling/test/LoadNGEMTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/LoadNXSPETest.h b/Framework/DataHandling/test/LoadNXSPETest.h index 6f97817c40b4b20c3ed662293109b1788596647f..86939d38e882a1fa93b7bbd2b87d74dbae5be989 100644 --- a/Framework/DataHandling/test/LoadNXSPETest.h +++ b/Framework/DataHandling/test/LoadNXSPETest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/LoadNXcanSASTest.h b/Framework/DataHandling/test/LoadNXcanSASTest.h index 5291bdea12163e7f18a3b5dea06f85f6b0b96f2b..033734375592a3701800865d0f057eab86112f6c 100644 --- a/Framework/DataHandling/test/LoadNXcanSASTest.h +++ b/Framework/DataHandling/test/LoadNXcanSASTest.h @@ -1,13 +1,15 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include <cxxtest/TestSuite.h> +#include <utility> + #include "MantidAPI/AlgorithmManager.h" #include "MantidAPI/AnalysisDataService.h" #include "MantidAPI/Axis.h" @@ -266,7 +268,7 @@ public: } private: - void removeWorkspaceFromADS(const std::string toRemove) { + void removeWorkspaceFromADS(const std::string &toRemove) { if (AnalysisDataService::Instance().doesExist(toRemove)) { AnalysisDataService::Instance().remove(toRemove); } @@ -296,10 +298,11 @@ private: return ws; } - void save_file_no_issues(MatrixWorkspace_sptr workspace, - NXcanSASTestParameters ¶meters, - MatrixWorkspace_sptr transmission = nullptr, - MatrixWorkspace_sptr transmissionCan = nullptr) { + void + save_file_no_issues(const MatrixWorkspace_sptr &workspace, + NXcanSASTestParameters ¶meters, + const MatrixWorkspace_sptr &transmission = nullptr, + const MatrixWorkspace_sptr &transmissionCan = nullptr) { auto saveAlg = AlgorithmManager::Instance().createUnmanaged("SaveNXcanSAS"); saveAlg->initialize(); saveAlg->setProperty("Filename", parameters.filename); @@ -342,7 +345,8 @@ private: } } - void do_assert_units(MatrixWorkspace_sptr wsIn, MatrixWorkspace_sptr wsOut) { + void do_assert_units(const MatrixWorkspace_sptr &wsIn, + const MatrixWorkspace_sptr &wsOut) { // Ensure that units of axis 0 are matching auto unit0In = wsIn->getAxis(0)->unit()->label().ascii(); auto unit0Out = wsOut->getAxis(0)->unit()->label().ascii(); @@ -361,8 +365,8 @@ private: TSM_ASSERT_EQUALS("Should have the same y unit", unitYIn, unitYOut); } - void do_assert_axis1_values_are_the_same(MatrixWorkspace_sptr wsIn, - MatrixWorkspace_sptr wsOut) { + void do_assert_axis1_values_are_the_same(const MatrixWorkspace_sptr &wsIn, + const MatrixWorkspace_sptr &wsOut) { if (!wsOut->getAxis(1)->isNumeric()) { return; } @@ -391,8 +395,8 @@ private: } } - void do_assert_sample_logs(MatrixWorkspace_sptr wsIn, - MatrixWorkspace_sptr wsOut) { + void do_assert_sample_logs(const MatrixWorkspace_sptr &wsIn, + const MatrixWorkspace_sptr &wsOut) { auto &runIn = wsIn->mutableRun(); auto &runOut = wsOut->mutableRun(); @@ -413,16 +417,17 @@ private: } } - void do_assert_instrument(MatrixWorkspace_sptr wsIn, - MatrixWorkspace_sptr wsOut) { - auto idfIn = getIDFfromWorkspace(wsIn); - auto idfOut = getIDFfromWorkspace(wsOut); + void do_assert_instrument(const MatrixWorkspace_sptr &wsIn, + const MatrixWorkspace_sptr &wsOut) { + auto idfIn = getIDFfromWorkspace(std::move(wsIn)); + auto idfOut = getIDFfromWorkspace(std::move(wsOut)); TSM_ASSERT_EQUALS("Should have the same instrument", idfIn, idfOut); } - void do_assert_transmission(MatrixWorkspace_sptr mainWorkspace, - MatrixWorkspace_sptr transIn, - NXcanSASTestTransmissionParameters parameters) { + void + do_assert_transmission(const MatrixWorkspace_sptr &mainWorkspace, + const MatrixWorkspace_sptr &transIn, + const NXcanSASTestTransmissionParameters ¶meters) { if (!parameters.usesTransmission || !transIn) { return; } @@ -435,32 +440,34 @@ private: AnalysisDataService::Instance().retrieveWS<MatrixWorkspace>(transName); // Ensure that both have the same Y data - auto readDataY = [](MatrixWorkspace_sptr ws, size_t index) { + auto readDataY = [](const MatrixWorkspace_sptr &ws, size_t index) { return ws->y(index); }; do_assert_data(transIn, transOut, readDataY); // Ensure that both have the same E data - auto readDataE = [](MatrixWorkspace_sptr ws, size_t index) { + auto readDataE = [](const MatrixWorkspace_sptr &ws, size_t index) { return ws->e(index); }; do_assert_data(transIn, transOut, readDataE); // Ensure that both have the same X data - auto readDataX = [](MatrixWorkspace_sptr ws, size_t index) { + auto readDataX = [](const MatrixWorkspace_sptr &ws, size_t index) { return ws->x(index); }; do_assert_data(transIn, transOut, readDataX); } - void do_assert_load(MatrixWorkspace_sptr wsIn, MatrixWorkspace_sptr wsOut, - NXcanSASTestParameters ¶meters, - MatrixWorkspace_sptr transmission = nullptr, - MatrixWorkspace_sptr transmissionCan = nullptr, - NXcanSASTestTransmissionParameters sampleParameters = - NXcanSASTestTransmissionParameters(), - NXcanSASTestTransmissionParameters canParameters = - NXcanSASTestTransmissionParameters()) { + void + do_assert_load(const MatrixWorkspace_sptr &wsIn, + const MatrixWorkspace_sptr &wsOut, + NXcanSASTestParameters ¶meters, + const MatrixWorkspace_sptr &transmission = nullptr, + const MatrixWorkspace_sptr &transmissionCan = nullptr, + const NXcanSASTestTransmissionParameters &sampleParameters = + NXcanSASTestTransmissionParameters(), + const NXcanSASTestTransmissionParameters &canParameters = + NXcanSASTestTransmissionParameters()) { // Ensure that both have the same units do_assert_units(wsIn, wsOut); @@ -468,26 +475,26 @@ private: TSM_ASSERT("Should be a point workspace", !wsOut->isHistogramData()); // Ensure that both have the same Y data - auto readDataY = [](MatrixWorkspace_sptr ws, size_t index) { + auto readDataY = [](const MatrixWorkspace_sptr &ws, size_t index) { return ws->y(index); }; do_assert_data(wsIn, wsOut, readDataY); // Ensure that both have the same E data - auto readDataE = [](MatrixWorkspace_sptr ws, size_t index) { + auto readDataE = [](const MatrixWorkspace_sptr &ws, size_t index) { return ws->e(index); }; do_assert_data(wsIn, wsOut, readDataE); // Ensure that both have the same X data - auto readDataX = [](MatrixWorkspace_sptr ws, size_t index) { + auto readDataX = [](const MatrixWorkspace_sptr &ws, size_t index) { return ws->x(index); }; do_assert_data(wsIn, wsOut, readDataX); // If applicable, ensure that both have the same Xdev data if (parameters.hasDx) { - auto readDataDX = [](MatrixWorkspace_sptr ws, size_t index) { + auto readDataDX = [](const MatrixWorkspace_sptr &ws, size_t index) { return ws->dataDx(index); }; do_assert_data(wsIn, wsOut, readDataDX); @@ -503,8 +510,10 @@ private: do_assert_instrument(wsIn, wsOut); // Test transmission workspaces - do_assert_transmission(wsOut, transmission, sampleParameters); - do_assert_transmission(wsOut, transmissionCan, canParameters); + do_assert_transmission(wsOut, std::move(transmission), + std::move(sampleParameters)); + do_assert_transmission(wsOut, std::move(transmissionCan), + std::move(canParameters)); } }; @@ -537,7 +546,7 @@ private: NXcanSASTestParameters parameters1D; NXcanSASTestParameters parameters2D; - void save_no_assert(MatrixWorkspace_sptr ws, + void save_no_assert(const MatrixWorkspace_sptr &ws, NXcanSASTestParameters ¶meters) { auto saveAlg = AlgorithmManager::Instance().createUnmanaged("SaveNXcanSAS"); saveAlg->initialize(); diff --git a/Framework/DataHandling/test/LoadNexusLogsTest.h b/Framework/DataHandling/test/LoadNexusLogsTest.h index 0c2cabbf0c25344a4de513c8b7c283367ec3da14..85aa8487e0ed19f07443919a42b354249279e6fd 100644 --- a/Framework/DataHandling/test/LoadNexusLogsTest.h +++ b/Framework/DataHandling/test/LoadNexusLogsTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -272,7 +272,6 @@ public: void test_last_time_series_log_entry_equals_end_time() { LoadNexusLogs ld; - std::string outws_name = "REF_L_instrument"; ld.initialize(); ld.setPropertyValue("Filename", "REF_L_32035.nxs"); MatrixWorkspace_sptr ws = createTestWorkspace(); diff --git a/Framework/DataHandling/test/LoadNexusMonitorsTest.h b/Framework/DataHandling/test/LoadNexusMonitorsTest.h index a824d5e3298c1b139ee6f104ae80d358191c053d..555ccfdb57ea33aa9b67ae227c893819e96be558 100644 --- a/Framework/DataHandling/test/LoadNexusMonitorsTest.h +++ b/Framework/DataHandling/test/LoadNexusMonitorsTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/LoadNexusProcessed2Test.h b/Framework/DataHandling/test/LoadNexusProcessed2Test.h index d233ecfe376a427fef533986d143e9bcae99008d..b63a4ed5c8a937597c901153cf827508f57bfbeb 100644 --- a/Framework/DataHandling/test/LoadNexusProcessed2Test.h +++ b/Framework/DataHandling/test/LoadNexusProcessed2Test.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -52,7 +52,7 @@ Mantid::API::MatrixWorkspace_sptr do_load_v1(const std::string &filename) { } namespace test_utility { -template <typename T> void save(const std::string filename, T &ws) { +template <typename T> void save(const std::string &filename, T &ws) { SaveNexusESS alg; alg.setChild(true); alg.setRethrows(true); diff --git a/Framework/DataHandling/test/LoadNexusProcessedTest.h b/Framework/DataHandling/test/LoadNexusProcessedTest.h index 5a43a2046beb3842a499bace593665cce383132c..f501fc6c6639c50127dae9f2d713d1fa8c4d1d73 100644 --- a/Framework/DataHandling/test/LoadNexusProcessedTest.h +++ b/Framework/DataHandling/test/LoadNexusProcessedTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -1110,7 +1110,7 @@ public: } private: - void doHistoryTest(MatrixWorkspace_sptr matrix_ws) { + void doHistoryTest(const MatrixWorkspace_sptr &matrix_ws) { const WorkspaceHistory history = matrix_ws->getHistory(); int nalgs = static_cast<int>(history.size()); TS_ASSERT_EQUALS(nalgs, 4); @@ -1201,7 +1201,7 @@ private: * be present */ void doSpectrumListTests(LoadNexusProcessed &alg, - const std::vector<int> expectedSpectra) { + const std::vector<int> &expectedSpectra) { TS_ASSERT_THROWS_NOTHING(alg.execute()); TS_ASSERT(alg.isExecuted()); diff --git a/Framework/DataHandling/test/LoadNexusTest.h b/Framework/DataHandling/test/LoadNexusTest.h index a2a28f08e823dea99eb777ccdb492cc9cb589ba1..ec377147e65ca4c435ab883e301ea6ad4e227f26 100644 --- a/Framework/DataHandling/test/LoadNexusTest.h +++ b/Framework/DataHandling/test/LoadNexusTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/LoadPDFgetNFileTest.h b/Framework/DataHandling/test/LoadPDFgetNFileTest.h index d305b1a9524e32e1b2ace14e440aadcdee7e00b0..767c6ccc68a8d5edc7d7dc9533b0e71e84221f61 100644 --- a/Framework/DataHandling/test/LoadPDFgetNFileTest.h +++ b/Framework/DataHandling/test/LoadPDFgetNFileTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/LoadPLNTest.h b/Framework/DataHandling/test/LoadPLNTest.h index 564dd5342365d46dc039531fc96e2226a8fe84c1..80d8d067d5464e7a0d863df5fad343649d24d20c 100644 --- a/Framework/DataHandling/test/LoadPLNTest.h +++ b/Framework/DataHandling/test/LoadPLNTest.h @@ -1,3 +1,9 @@ +// Mantid Repository : https://github.com/mantidproject/mantid +// +// Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS +// SPDX - License - Identifier: GPL - 3.0 + #pragma once #include <cxxtest/TestSuite.h> @@ -68,7 +74,7 @@ public: run.getProperty("end_time")->value().find("2018-11-12T11:45:06.6") == 0) // test some data properties - auto logpm = [&run](std::string tag) { + auto logpm = [&run](const std::string &tag) { return dynamic_cast<TimeSeriesProperty<double> *>(run.getProperty(tag)) ->firstValue(); }; @@ -123,7 +129,7 @@ public: run.getProperty("end_time")->value().find("2018-11-12T11:45:06.6") == 0) // test some data properties - auto logpm = [&run](std::string tag) { + auto logpm = [&run](const std::string &tag) { return dynamic_cast<TimeSeriesProperty<double> *>(run.getProperty(tag)) ->firstValue(); }; diff --git a/Framework/DataHandling/test/LoadPSIMuonBinTest.h b/Framework/DataHandling/test/LoadPSIMuonBinTest.h index 45b3ae72f569ddc59622ae6fa77ea931c992d6ee..3a137c2f6fb836e09a969fc89b1a38a72b25d250 100644 --- a/Framework/DataHandling/test/LoadPSIMuonBinTest.h +++ b/Framework/DataHandling/test/LoadPSIMuonBinTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/LoadParameterFileTest.h b/Framework/DataHandling/test/LoadParameterFileTest.h index 5f2665851f4673d7482d6ede97b49ec3a7ca6737..5ada1ac483d9825ed57ab7bc22716149565cc4d7 100644 --- a/Framework/DataHandling/test/LoadParameterFileTest.h +++ b/Framework/DataHandling/test/LoadParameterFileTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/LoadPreNexusMonitorsTest.h b/Framework/DataHandling/test/LoadPreNexusMonitorsTest.h index b32a79c5c2134ec9927e91dcf742b966f54314c8..15d25bb56daa8fed4a72bcbc8314ad78887bbfef 100644 --- a/Framework/DataHandling/test/LoadPreNexusMonitorsTest.h +++ b/Framework/DataHandling/test/LoadPreNexusMonitorsTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/LoadPreNexusTest.h b/Framework/DataHandling/test/LoadPreNexusTest.h index b7c274374202083e691e4d7dcfb0375a168b1766..0412f9ed31e1396cca84836f2af7953227068b22 100644 --- a/Framework/DataHandling/test/LoadPreNexusTest.h +++ b/Framework/DataHandling/test/LoadPreNexusTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/LoadQKKTest.h b/Framework/DataHandling/test/LoadQKKTest.h index 1003fe6a1d25085c5a85a3cc119ef2e193aefe47..6453986938e4d1e6454e09a418aa96307d435c65 100644 --- a/Framework/DataHandling/test/LoadQKKTest.h +++ b/Framework/DataHandling/test/LoadQKKTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/LoadRKHTest.h b/Framework/DataHandling/test/LoadRKHTest.h index 780a70a3af4e03d015284ddde735cca3b7e4a1e4..5c9277b7fe52c85f92505fb5097cbf1f31651af9 100644 --- a/Framework/DataHandling/test/LoadRKHTest.h +++ b/Framework/DataHandling/test/LoadRKHTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/LoadRaw3Test.h b/Framework/DataHandling/test/LoadRaw3Test.h index 44ed9b419dcd0e68850c013f0171c361e2d6f226..19f298d7286d2601c15d6c37b854f92a88b385bb 100644 --- a/Framework/DataHandling/test/LoadRaw3Test.h +++ b/Framework/DataHandling/test/LoadRaw3Test.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -153,7 +153,7 @@ public: detectorgroup = output2D->getSpectrum(2083).getDetectorIDs(); std::set<detid_t>::const_iterator it; int pixnum = 101191; - for (it = detectorgroup.begin(); it != detectorgroup.end(); it++) + for (it = detectorgroup.begin(); it != detectorgroup.end(); ++it) TS_ASSERT_EQUALS(*it, pixnum++); AnalysisDataService::Instance().remove(outputSpace); @@ -375,7 +375,7 @@ public: wsNamevec = sptrWSGrp->getNames(); int period = 1; std::vector<std::string>::const_iterator it = wsNamevec.begin(); - for (; it != wsNamevec.end(); it++) { + for (; it != wsNamevec.end(); ++it) { std::stringstream count; count << period; std::string wsName = "multiperiod_" + count.str(); @@ -385,7 +385,7 @@ public: std::vector<std::string>::const_iterator itr1 = wsNamevec.begin(); int periodNumber = 0; const int nHistograms = 4; - for (; itr1 != wsNamevec.end(); itr1++) { + for (; itr1 != wsNamevec.end(); ++itr1) { MatrixWorkspace_sptr outsptr; TS_ASSERT_THROWS_NOTHING( outsptr = AnalysisDataService::Instance().retrieveWS<MatrixWorkspace>( @@ -581,7 +581,7 @@ public: detectorgroup = output2D->getSpectrum(2079).getDetectorIDs(); std::set<detid_t>::const_iterator it; int pixnum = 101191; - for (it = detectorgroup.begin(); it != detectorgroup.end(); it++) + for (it = detectorgroup.begin(); it != detectorgroup.end(); ++it) TS_ASSERT_EQUALS(*it, pixnum++); // Test if filename log is found in both monitor and sata workspace @@ -626,7 +626,7 @@ public: monitorsptrWSGrp->getNames(); int period = 1; std::vector<std::string>::const_iterator it = monitorwsNamevec.begin(); - for (; it != monitorwsNamevec.end(); it++) { + for (; it != monitorwsNamevec.end(); ++it) { std::stringstream count; count << period; std::string wsName = "multiperiod_monitors_" + count.str(); @@ -634,7 +634,7 @@ public: period++; } std::vector<std::string>::const_iterator itr1 = monitorwsNamevec.begin(); - for (; itr1 != monitorwsNamevec.end(); itr1++) { + for (; itr1 != monitorwsNamevec.end(); ++itr1) { MatrixWorkspace_sptr outsptr; TS_ASSERT_THROWS_NOTHING( outsptr = AnalysisDataService::Instance().retrieveWS<MatrixWorkspace>( @@ -674,7 +674,7 @@ public: const std::vector<std::string> wsNamevec = sptrWSGrp->getNames(); period = 1; it = wsNamevec.begin(); - for (; it != wsNamevec.end(); it++) { + for (; it != wsNamevec.end(); ++it) { std::stringstream count; count << period; std::string wsName = "multiperiod_" + count.str(); @@ -684,7 +684,7 @@ public: itr1 = wsNamevec.begin(); int periodNumber = 0; const int nHistograms = 2; - for (; itr1 != wsNamevec.end(); itr1++) { + for (; itr1 != wsNamevec.end(); ++itr1) { MatrixWorkspace_sptr outsptr; TS_ASSERT_THROWS_NOTHING( outsptr = AnalysisDataService::Instance().retrieveWS<MatrixWorkspace>( @@ -1151,7 +1151,7 @@ public: private: /// Helper method to run common set of tests on a workspace in a multi-period /// group. - void doTestMultiPeriodWorkspace(MatrixWorkspace_sptr workspace, + void doTestMultiPeriodWorkspace(const MatrixWorkspace_sptr &workspace, const size_t &nHistograms, int expected_period) { // Check the number of histograms. @@ -1173,8 +1173,8 @@ private: } /// Check that two matrix workspaces match - std::string checkWorkspacesMatch(Workspace_sptr workspace1, - Workspace_sptr workspace2) { + std::string checkWorkspacesMatch(const Workspace_sptr &workspace1, + const Workspace_sptr &workspace2) { auto ws1 = boost::dynamic_pointer_cast<MatrixWorkspace>(workspace1); auto ws2 = boost::dynamic_pointer_cast<MatrixWorkspace>(workspace2); if (!ws1 || !ws2) { diff --git a/Framework/DataHandling/test/LoadRawBin0Test.h b/Framework/DataHandling/test/LoadRawBin0Test.h index 6a098125181c3be100b0a2da1801982786377da0..b1c314f1c7aacf32c87eeedb8302d56e5425d2a8 100644 --- a/Framework/DataHandling/test/LoadRawBin0Test.h +++ b/Framework/DataHandling/test/LoadRawBin0Test.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -108,7 +108,7 @@ public: wsNamevec = sptrWSGrp->getNames(); int period = 1; std::vector<std::string>::const_iterator it = wsNamevec.begin(); - for (; it != wsNamevec.end(); it++) { + for (; it != wsNamevec.end(); ++it) { std::stringstream count; count << period; std::string wsName = "multiperiod_" + count.str(); @@ -118,7 +118,7 @@ public: std::vector<std::string>::const_iterator itr1 = wsNamevec.begin(); int periodNumber = 0; const int nHistograms = 4; - for (; itr1 != wsNamevec.end(); itr1++) { + for (; itr1 != wsNamevec.end(); ++itr1) { MatrixWorkspace_sptr outsptr; TS_ASSERT_THROWS_NOTHING( outsptr = AnalysisDataService::Instance().retrieveWS<MatrixWorkspace>( @@ -149,7 +149,7 @@ public: private: /// Helper method to run common set of tests on a workspace in a multi-period /// group. - void doTestMultiPeriodWorkspace(MatrixWorkspace_sptr workspace, + void doTestMultiPeriodWorkspace(const MatrixWorkspace_sptr &workspace, const size_t &nHistograms, int expected_period) { // Check the number of histograms. diff --git a/Framework/DataHandling/test/LoadRawSaveNxsLoadNxsTest.h b/Framework/DataHandling/test/LoadRawSaveNxsLoadNxsTest.h index dfb363245ae97b1db026e177f3c79b821762cd51..7af33edb978501176d9265d130fa18bb3d3b0302 100644 --- a/Framework/DataHandling/test/LoadRawSaveNxsLoadNxsTest.h +++ b/Framework/DataHandling/test/LoadRawSaveNxsLoadNxsTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -72,7 +72,6 @@ public: // specify name of file to save workspace to outputFile = "testSaveLoadrawCSP.nxs"; remove(outputFile.c_str()); - std::string dataName = "spectra"; std::string title = "Workspace from Loadraw CSP78173"; saveNexusP.setPropertyValue("FileName", outputFile); outputFile = saveNexusP.getPropertyValue("Filename"); diff --git a/Framework/DataHandling/test/LoadRawSpectrum0Test.h b/Framework/DataHandling/test/LoadRawSpectrum0Test.h index c2baba38295e3fb39da316f1430d50deb952e611..96a7f376aa8c278c2d8adf6c7e1e3062d381fd90 100644 --- a/Framework/DataHandling/test/LoadRawSpectrum0Test.h +++ b/Framework/DataHandling/test/LoadRawSpectrum0Test.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -110,7 +110,7 @@ public: wsNamevec = sptrWSGrp->getNames(); int period = 1; std::vector<std::string>::const_iterator it = wsNamevec.begin(); - for (; it != wsNamevec.end(); it++) { + for (; it != wsNamevec.end(); ++it) { std::stringstream count; count << period; std::string wsName = "multiperiod_" + count.str(); @@ -119,7 +119,7 @@ public: } std::vector<std::string>::const_iterator itr1 = wsNamevec.begin(); int expectedPeriod = 0; - for (; itr1 != wsNamevec.end(); itr1++) { + for (; itr1 != wsNamevec.end(); ++itr1) { MatrixWorkspace_sptr outsptr; TS_ASSERT_THROWS_NOTHING( outsptr = AnalysisDataService::Instance().retrieveWS<MatrixWorkspace>( @@ -146,7 +146,7 @@ public: private: /// Helper method to run common set of tests on a workspace in a multi-period /// group. - void doTestMultiPeriodWorkspace(MatrixWorkspace_sptr workspace, + void doTestMultiPeriodWorkspace(const MatrixWorkspace_sptr &workspace, int expected_period) { // Check the current period property. const Mantid::API::Run &run = workspace->run(); diff --git a/Framework/DataHandling/test/LoadSESANSTest.h b/Framework/DataHandling/test/LoadSESANSTest.h index 4a4bc4ffbcdbfd6a5a1c22cff46ad24ca1915396..1e11915cd878b5f92a4523ddf9abff67f120e130 100644 --- a/Framework/DataHandling/test/LoadSESANSTest.h +++ b/Framework/DataHandling/test/LoadSESANSTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/LoadSINQFocusTest.h b/Framework/DataHandling/test/LoadSINQFocusTest.h index 30d2bbdbfb7afd3c85b243b893dcfeeaaf3b68c1..2640ff91b36f1a1cafe47f052a0b00aed2b74cca 100644 --- a/Framework/DataHandling/test/LoadSINQFocusTest.h +++ b/Framework/DataHandling/test/LoadSINQFocusTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/LoadSNSNexusTest.h b/Framework/DataHandling/test/LoadSNSNexusTest.h index fd8b636cb307548aaf50770b0f6d62cafda0540a..00e2cf5475819983d2001734cfd4ffbf537472e5 100644 --- a/Framework/DataHandling/test/LoadSNSNexusTest.h +++ b/Framework/DataHandling/test/LoadSNSNexusTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/LoadSNSspecTest.h b/Framework/DataHandling/test/LoadSNSspecTest.h index 6505003b5e3334d33cac50d2f05c464ab8978ae6..edee893b80897a6c1586124178bf7db76cdb6119 100644 --- a/Framework/DataHandling/test/LoadSNSspecTest.h +++ b/Framework/DataHandling/test/LoadSNSspecTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/LoadSPETest.h b/Framework/DataHandling/test/LoadSPETest.h index c97dd8f796e36dd8b3d59f51c5d9282929544524..4179b2f25533103371d65ecb02816f4854cdef3c 100644 --- a/Framework/DataHandling/test/LoadSPETest.h +++ b/Framework/DataHandling/test/LoadSPETest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/LoadSampleDetailsFromRawTest.h b/Framework/DataHandling/test/LoadSampleDetailsFromRawTest.h index f69d170502fab54d61d4fb6fefb5039024c9d025..f3fc7a0b4ecd925f235a3e4e472924500f189116 100644 --- a/Framework/DataHandling/test/LoadSampleDetailsFromRawTest.h +++ b/Framework/DataHandling/test/LoadSampleDetailsFromRawTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/LoadSampleEnvironmentTest.h b/Framework/DataHandling/test/LoadSampleEnvironmentTest.h index f9fcb3847626b31725f84055717d88bd6ca28833..c7166c7618f5d2bd084a8b234d3284336d933f2c 100644 --- a/Framework/DataHandling/test/LoadSampleEnvironmentTest.h +++ b/Framework/DataHandling/test/LoadSampleEnvironmentTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/LoadSampleShapeTest.h b/Framework/DataHandling/test/LoadSampleShapeTest.h index bcd5e660083bc312271ff24e07e9c0ad78717f81..62b10eaac5e0c7cadfe15bfee5d30b09a3dc3e5d 100644 --- a/Framework/DataHandling/test/LoadSampleShapeTest.h +++ b/Framework/DataHandling/test/LoadSampleShapeTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -217,7 +217,7 @@ private: const MeshObject *loadMeshObject(LoadSampleShape &alg, bool outputWsSameAsInputWs, - const std::string filename) { + const std::string &filename) { alg.initialize(); alg.setPropertyValue("Filename", filename); prepareWorkspaces(alg, outputWsSameAsInputWs); @@ -226,7 +226,7 @@ private: return getMeshObject(alg); } - void loadFailureTest(LoadSampleShape &alg, const std::string filename) { + void loadFailureTest(LoadSampleShape &alg, const std::string &filename) { alg.initialize(); alg.setPropertyValue("Filename", filename); prepareWorkspaces(alg, true); @@ -276,7 +276,7 @@ private: std::unique_ptr<LoadSampleShape> alg; const int numberOfIterations = 5; - std::unique_ptr<LoadSampleShape> setupAlg(Workspace2D_sptr inputWS) { + std::unique_ptr<LoadSampleShape> setupAlg(const Workspace2D_sptr &inputWS) { auto loadAlg = std::make_unique<LoadSampleShape>(); loadAlg->initialize(); loadAlg->setChild(true); diff --git a/Framework/DataHandling/test/LoadSassenaTest.h b/Framework/DataHandling/test/LoadSassenaTest.h index b7d4dcefea2ae20b2c7a5286539a44cf7cb9aa41..bd7d2309f318a7a0c4702e63e779161e29a1a8c3 100644 --- a/Framework/DataHandling/test/LoadSassenaTest.h +++ b/Framework/DataHandling/test/LoadSassenaTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/LoadSaveAsciiTest.h b/Framework/DataHandling/test/LoadSaveAsciiTest.h index 05c4cd2b46f71e7390f4b51fa6a2c7680a10665c..2a096f73da971aae89c9240532d3e5d05e75288b 100644 --- a/Framework/DataHandling/test/LoadSaveAsciiTest.h +++ b/Framework/DataHandling/test/LoadSaveAsciiTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/LoadSpecTest.h b/Framework/DataHandling/test/LoadSpecTest.h index 3d0a3cb098b0d4850488e29cca7a99150bb18535..7d082efd0fb6e46c078d79de9be09aa5187b72f2 100644 --- a/Framework/DataHandling/test/LoadSpecTest.h +++ b/Framework/DataHandling/test/LoadSpecTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/LoadSpice2dTest.h b/Framework/DataHandling/test/LoadSpice2dTest.h index 7f0acac4d8a9408700c720967a9e259e8064d936..3f44d326e21df75d7b134475c5b5452cd3e88235 100644 --- a/Framework/DataHandling/test/LoadSpice2dTest.h +++ b/Framework/DataHandling/test/LoadSpice2dTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -222,7 +222,8 @@ public: TS_ASSERT_DELTA(ws2d->x(192 + nmon)[0], 4.5, tolerance); } - void assertDetectorDistances(Mantid::DataObjects::Workspace2D_sptr ws2d) { + void + assertDetectorDistances(const Mantid::DataObjects::Workspace2D_sptr &ws2d) { Mantid::Kernel::Property *prop = ws2d->run().getProperty("sample-detector-distance"); Mantid::Kernel::PropertyWithValue<double> *sdd = diff --git a/Framework/DataHandling/test/LoadSpiceAsciiTest.h b/Framework/DataHandling/test/LoadSpiceAsciiTest.h index 4cfee433ed9023f6daed6b635149d1fe91488cbb..7800ed880807f8c01adcdf6ce88b525d70dfb151 100644 --- a/Framework/DataHandling/test/LoadSpiceAsciiTest.h +++ b/Framework/DataHandling/test/LoadSpiceAsciiTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/LoadSpiceXML2DDetTest.h b/Framework/DataHandling/test/LoadSpiceXML2DDetTest.h index e41e36beb7c65740cb7ed60473598d80d4fb9c58..228781e9a8bf6a53a40d0f463460571cd0b1f9aa 100644 --- a/Framework/DataHandling/test/LoadSpiceXML2DDetTest.h +++ b/Framework/DataHandling/test/LoadSpiceXML2DDetTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/LoadStlTest.h b/Framework/DataHandling/test/LoadStlTest.h index 670dc417e336b150fcc20f469355891d0ce5e2e9..b071d08f350670f3d0c9533446194642f1edf3d0 100644 --- a/Framework/DataHandling/test/LoadStlTest.h +++ b/Framework/DataHandling/test/LoadStlTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidDataHandling/LoadStl.h" diff --git a/Framework/DataHandling/test/LoadSwansTest.h b/Framework/DataHandling/test/LoadSwansTest.h index f1ce11d74b5b00a811030e774dd88f56212fa7a4..0cce790da3ec63285b0dd5a8391bc0b06cbd6195 100644 --- a/Framework/DataHandling/test/LoadSwansTest.h +++ b/Framework/DataHandling/test/LoadSwansTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/LoadTBLTest.h b/Framework/DataHandling/test/LoadTBLTest.h index 08b723dd30f17a219ce355fcf9a74ab10a064bf3..94037a706547cbedc646d83f9a610c72f2cbb420 100644 --- a/Framework/DataHandling/test/LoadTBLTest.h +++ b/Framework/DataHandling/test/LoadTBLTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/LoadTOFRawNexusTest.h b/Framework/DataHandling/test/LoadTOFRawNexusTest.h index 9b229c327f9390df92b3bba9f27ab96b1b44538f..8e98e929c2792990890164cb1ca9a7d8a5cd9c32 100644 --- a/Framework/DataHandling/test/LoadTOFRawNexusTest.h +++ b/Framework/DataHandling/test/LoadTOFRawNexusTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/LoadTest.h b/Framework/DataHandling/test/LoadTest.h index b7ef50b9f1f724a3a09062e3a2ba5325d2c08507..8e4217aae1f6fdcb819f61bc16b4f173cd4d9d56 100644 --- a/Framework/DataHandling/test/LoadTest.h +++ b/Framework/DataHandling/test/LoadTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/MaskDetectorsInShapeTest.h b/Framework/DataHandling/test/MaskDetectorsInShapeTest.h index 9a6cac9aa9b8d290c6af54f10872f27addbdae1e..c675b30f5b874ce8dccf40e107baf6dd619663f2 100644 --- a/Framework/DataHandling/test/MaskDetectorsInShapeTest.h +++ b/Framework/DataHandling/test/MaskDetectorsInShapeTest.h @@ -1,13 +1,15 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include <cxxtest/TestSuite.h> +#include <utility> + #include "MantidAPI/AnalysisDataService.h" #include "MantidAPI/FrameworkManager.h" #include "MantidDataHandling/LoadEmptyInstrument.h" @@ -59,7 +61,7 @@ public: runTest(xmlShape, "320,340,360,380", false); } - void runTest(std::string xmlShape, std::string expectedHits, + void runTest(const std::string &xmlShape, std::string expectedHits, bool includeMonitors = true) { using namespace Mantid::API; @@ -80,21 +82,21 @@ public: MatrixWorkspace_const_sptr outWS = AnalysisDataService::Instance().retrieveWS<MatrixWorkspace>(wsName); - checkDeadDetectors(outWS, expectedHits); + checkDeadDetectors(outWS, std::move(expectedHits)); } - void checkDeadDetectors(Mantid::API::MatrixWorkspace_const_sptr outWS, - std::string expectedHits) { + void checkDeadDetectors(const Mantid::API::MatrixWorkspace_const_sptr &outWS, + const std::string &expectedHits) { // check that the detectors have actually been marked dead std::vector<int> expectedDetectorArray = - convertStringToVector(expectedHits); + convertStringToVector(std::move(expectedHits)); const auto &detectorInfo = outWS->detectorInfo(); for (const auto detID : expectedDetectorArray) { TS_ASSERT(detectorInfo.isMasked(detectorInfo.indexOf(detID))); } } - std::vector<int> convertStringToVector(const std::string input) { + std::vector<int> convertStringToVector(const std::string &input) { Mantid::Kernel::ArrayProperty<int> arrayProp("name", input); return arrayProp(); } diff --git a/Framework/DataHandling/test/MaskDetectorsTest.h b/Framework/DataHandling/test/MaskDetectorsTest.h index 9258e4f7859a280f32431b83bd73df66f650411c..747f7e786ad4ab4ce7bf82ba074404283aba0d93 100644 --- a/Framework/DataHandling/test/MaskDetectorsTest.h +++ b/Framework/DataHandling/test/MaskDetectorsTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -649,9 +649,9 @@ public: void test_MaskWithWorkspaceWithDetectorIDs() { auto &ads = AnalysisDataService::Instance(); - const std::string inputWSName("inputWS"), existingMaskName("existingMask"); const int numInputSpec(90); + const std::string inputWSName("inputWS"); setUpWS(false, inputWSName, false, numInputSpec); auto inputWS = ads.retrieveWS<MatrixWorkspace>(inputWSName); @@ -717,7 +717,7 @@ public: void test_MaskWithWorkspaceWithDetectorIDsAndWsIndexRange() { auto &ads = AnalysisDataService::Instance(); - const std::string inputWSName("inputWS"), existingMaskName("existingMask"); + const std::string inputWSName("inputWS"); const int numInputSpec(90); setUpWS(false, inputWSName, false, numInputSpec); diff --git a/Framework/DataHandling/test/MaskSpectraTest.h b/Framework/DataHandling/test/MaskSpectraTest.h index da35a4c65377075d11bd360853330642e08885dc..3fb4c93b10e2c4ab8671f97a37ed15075e55799d 100644 --- a/Framework/DataHandling/test/MaskSpectraTest.h +++ b/Framework/DataHandling/test/MaskSpectraTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -47,7 +47,7 @@ void checkWorkspace(const MatrixWorkspace &ws) { TS_ASSERT_EQUALS(ws.e(3)[0], 0.0); } -MatrixWorkspace_sptr runMaskSpectra(MatrixWorkspace_sptr inputWS) { +MatrixWorkspace_sptr runMaskSpectra(const MatrixWorkspace_sptr &inputWS) { MaskSpectra alg; alg.setChild(true); alg.initialize(); diff --git a/Framework/DataHandling/test/MeshFileIOTest.h b/Framework/DataHandling/test/MeshFileIOTest.h index 77ac5a8ebb30c5102aee0ece4df17ef7403fb044..250ab9d37adab299ded5c6bcc27d7ad3e14b05e2 100644 --- a/Framework/DataHandling/test/MeshFileIOTest.h +++ b/Framework/DataHandling/test/MeshFileIOTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/ModifyDetectorDotDatFileTest.h b/Framework/DataHandling/test/ModifyDetectorDotDatFileTest.h index db4395595c92a2a9695dfec7fe2aec86348da279..06952764d25273b980f81344fe851384a8ee9791 100644 --- a/Framework/DataHandling/test/ModifyDetectorDotDatFileTest.h +++ b/Framework/DataHandling/test/ModifyDetectorDotDatFileTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/MoveInstrumentComponentTest.h b/Framework/DataHandling/test/MoveInstrumentComponentTest.h index d06d56d17062d1543103c6a34bc1614e25694b81..a37af917f981ade14aaf63d9847617a7e899d0d7 100644 --- a/Framework/DataHandling/test/MoveInstrumentComponentTest.h +++ b/Framework/DataHandling/test/MoveInstrumentComponentTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/NXcanSASTestHelper.cpp b/Framework/DataHandling/test/NXcanSASTestHelper.cpp index fd0887048eb8016a40e3196964636c37f360dead..a1a2381f0f47e6be2e550681a35cf3dbed3085ba 100644 --- a/Framework/DataHandling/test/NXcanSASTestHelper.cpp +++ b/Framework/DataHandling/test/NXcanSASTestHelper.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "NXcanSASTestHelper.h" #include "MantidAPI/AlgorithmManager.h" @@ -18,7 +18,8 @@ namespace NXcanSASTestHelper { -std::string concatenateStringVector(std::vector<std::string> stringVector) { +std::string +concatenateStringVector(const std::vector<std::string> &stringVector) { std::ostringstream os; for (auto &element : stringVector) { os << element; @@ -28,7 +29,8 @@ std::string concatenateStringVector(std::vector<std::string> stringVector) { return os.str(); } -std::string getIDFfromWorkspace(Mantid::API::MatrixWorkspace_sptr workspace) { +std::string +getIDFfromWorkspace(const Mantid::API::MatrixWorkspace_sptr &workspace) { auto instrument = workspace->getInstrument(); auto name = instrument->getFullName(); auto date = workspace->getWorkspaceStartDate(); @@ -36,7 +38,8 @@ std::string getIDFfromWorkspace(Mantid::API::MatrixWorkspace_sptr workspace) { } void setXValuesOn1DWorkspaceWithPointData( - Mantid::API::MatrixWorkspace_sptr workspace, double xmin, double xmax) { + const Mantid::API::MatrixWorkspace_sptr &workspace, double xmin, + double xmax) { auto &xValues = workspace->dataX(0); auto size = xValues.size(); double binWidth = (xmax - xmin) / static_cast<double>(size - 1); @@ -46,7 +49,7 @@ void setXValuesOn1DWorkspaceWithPointData( } } -void add_sample_log(Mantid::API::MatrixWorkspace_sptr workspace, +void add_sample_log(const Mantid::API::MatrixWorkspace_sptr &workspace, const std::string &logName, const std::string &logValue) { auto logAlg = Mantid::API::AlgorithmManager::Instance().createUnmanaged("AddSampleLog"); @@ -58,7 +61,7 @@ void add_sample_log(Mantid::API::MatrixWorkspace_sptr workspace, logAlg->execute(); } -void set_logs(Mantid::API::MatrixWorkspace_sptr workspace, +void set_logs(const Mantid::API::MatrixWorkspace_sptr &workspace, const std::string &runNumber, const std::string &userFile) { if (!runNumber.empty()) { add_sample_log(workspace, "run_number", runNumber); @@ -69,7 +72,7 @@ void set_logs(Mantid::API::MatrixWorkspace_sptr workspace, } } -void set_instrument(Mantid::API::MatrixWorkspace_sptr workspace, +void set_instrument(const Mantid::API::MatrixWorkspace_sptr &workspace, const std::string &instrumentName) { auto instAlg = Mantid::API::AlgorithmManager::Instance().createUnmanaged( "LoadInstrument"); @@ -205,7 +208,7 @@ provide2DWorkspace(NXcanSASTestParameters ¶meters) { return ws; } -void set2DValues(Mantid::API::MatrixWorkspace_sptr ws) { +void set2DValues(const Mantid::API::MatrixWorkspace_sptr &ws) { const auto numberOfHistograms = ws->getNumberHistograms(); for (size_t index = 0; index < numberOfHistograms; ++index) { @@ -214,7 +217,7 @@ void set2DValues(Mantid::API::MatrixWorkspace_sptr ws) { } } -void removeFile(std::string filename) { +void removeFile(const std::string &filename) { if (Poco::File(filename).exists()) Poco::File(filename).remove(); } diff --git a/Framework/DataHandling/test/NXcanSASTestHelper.h b/Framework/DataHandling/test/NXcanSASTestHelper.h index 208a518af2a599ab901ed293c9ee2a6ab171e39b..aec86f5708d92f56494687531d4a9db492c41339 100644 --- a/Framework/DataHandling/test/NXcanSASTestHelper.h +++ b/Framework/DataHandling/test/NXcanSASTestHelper.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -92,20 +92,23 @@ struct NXcanSASTestTransmissionParameters { bool usesTransmission; }; -std::string concatenateStringVector(std::vector<std::string> stringVector); +std::string +concatenateStringVector(const std::vector<std::string> &stringVector); -std::string getIDFfromWorkspace(Mantid::API::MatrixWorkspace_sptr workspace); +std::string +getIDFfromWorkspace(const Mantid::API::MatrixWorkspace_sptr &workspace); void setXValuesOn1DWorkspaceWithPointData( - Mantid::API::MatrixWorkspace_sptr workspace, double xmin, double xmax); + const Mantid::API::MatrixWorkspace_sptr &workspace, double xmin, + double xmax); -void add_sample_log(Mantid::API::MatrixWorkspace_sptr workspace, +void add_sample_log(const Mantid::API::MatrixWorkspace_sptr &workspace, const std::string &logName, const std::string &logValue); -void set_logs(Mantid::API::MatrixWorkspace_sptr workspace, +void set_logs(const Mantid::API::MatrixWorkspace_sptr &workspace, const std::string &runNumber, const std::string &userFile); -void set_instrument(Mantid::API::MatrixWorkspace_sptr workspace, +void set_instrument(const Mantid::API::MatrixWorkspace_sptr &workspace, const std::string &instrumentName); Mantid::API::MatrixWorkspace_sptr @@ -117,7 +120,7 @@ getTransmissionWorkspace(NXcanSASTestTransmissionParameters ¶meters); Mantid::API::MatrixWorkspace_sptr provide2DWorkspace(NXcanSASTestParameters ¶meters); -void set2DValues(Mantid::API::MatrixWorkspace_sptr ws); +void set2DValues(const Mantid::API::MatrixWorkspace_sptr &ws); -void removeFile(std::string filename); +void removeFile(const std::string &filename); } // namespace NXcanSASTestHelper \ No newline at end of file diff --git a/Framework/DataHandling/test/NexusTesterTest.h b/Framework/DataHandling/test/NexusTesterTest.h index b6faa1dcf5577b9aab4cc47aa095c2f4c82f6b9d..628d760d407c150289a860f4a223992c50e540d9 100644 --- a/Framework/DataHandling/test/NexusTesterTest.h +++ b/Framework/DataHandling/test/NexusTesterTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/ORNLDataArchiveTest.h b/Framework/DataHandling/test/ORNLDataArchiveTest.h index c2eeba4b342bd778bb78bb39e38f4c3f2635990c..8fd8ecc62279f3e52dd934b4c8f0825b7178587c 100644 --- a/Framework/DataHandling/test/ORNLDataArchiveTest.h +++ b/Framework/DataHandling/test/ORNLDataArchiveTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/PDLoadCharacterizationsTest.h b/Framework/DataHandling/test/PDLoadCharacterizationsTest.h index d4c8195d86a9ea115aadc3a2899aa0712757ec1e..e2cdb212692197b441a1fe64723123a0f936565b 100644 --- a/Framework/DataHandling/test/PDLoadCharacterizationsTest.h +++ b/Framework/DataHandling/test/PDLoadCharacterizationsTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/PrecompiledHeader.h b/Framework/DataHandling/test/PrecompiledHeader.h index 01998fafe5ca90306f4703414f66b1e6587bd976..39ec1738948b787deed71e6a250ff3d6e27b368f 100644 --- a/Framework/DataHandling/test/PrecompiledHeader.h +++ b/Framework/DataHandling/test/PrecompiledHeader.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/RawFileInfoTest.h b/Framework/DataHandling/test/RawFileInfoTest.h index db90b36c467a46671b92fdeb144725b1b90fa942..71260db94cd932f7d8d2a447fd652b96a454ccbd 100644 --- a/Framework/DataHandling/test/RawFileInfoTest.h +++ b/Framework/DataHandling/test/RawFileInfoTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/ReadMaterialTest.h b/Framework/DataHandling/test/ReadMaterialTest.h index 9d2594c8a606b668440dcfaf03c0ecc24f3d1a89..1e3483b393561242ee56ae2f055c9cbb9461a745 100644 --- a/Framework/DataHandling/test/ReadMaterialTest.h +++ b/Framework/DataHandling/test/ReadMaterialTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataHandling/ReadMaterial.h" #include "MantidKernel/Atom.h" diff --git a/Framework/DataHandling/test/RemoveLogsTest.h b/Framework/DataHandling/test/RemoveLogsTest.h index eae8f6d845299befc59192e9a80d0c6fe47104cd..5858c9d4c34d1b1b52a55be1397c7a047ed7d061 100644 --- a/Framework/DataHandling/test/RemoveLogsTest.h +++ b/Framework/DataHandling/test/RemoveLogsTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/RenameLogTest.h b/Framework/DataHandling/test/RenameLogTest.h index 3ad646c3272421711bcb0a2092cbfe2a1fffd22a..013170d6a27e6ae24312e6c0db7227ed7f1c797b 100644 --- a/Framework/DataHandling/test/RenameLogTest.h +++ b/Framework/DataHandling/test/RenameLogTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -124,8 +124,8 @@ private: return testWS; } - void verifyLog(API::MatrixWorkspace_sptr resultWS, - const std::string logName) { + void verifyLog(const API::MatrixWorkspace_sptr &resultWS, + const std::string &logName) { Kernel::TimeSeriesProperty<double> *rp; TS_ASSERT_THROWS_NOTHING( rp = dynamic_cast<Kernel::TimeSeriesProperty<double> *>( diff --git a/Framework/DataHandling/test/RotateInstrumentComponentTest.h b/Framework/DataHandling/test/RotateInstrumentComponentTest.h index 917664f79eec13dd9797be2b8516a68cd95c52ab..04033314263c615ad9b9879ded7a2f6f2df24e45 100644 --- a/Framework/DataHandling/test/RotateInstrumentComponentTest.h +++ b/Framework/DataHandling/test/RotateInstrumentComponentTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/RotateSourceTest.h b/Framework/DataHandling/test/RotateSourceTest.h index 5625b837f0ac2201332544a28d4f4fb1f2656f46..2381847fb9550f2b5658154bb28166254a24ce57 100644 --- a/Framework/DataHandling/test/RotateSourceTest.h +++ b/Framework/DataHandling/test/RotateSourceTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/SampleEnvironmentFactoryTest.h b/Framework/DataHandling/test/SampleEnvironmentFactoryTest.h index 54989dbd17a69859a10cc78b3677c7beecfec016..49c1944e9ecba7ca97e1d494e959084d5abe7d10 100644 --- a/Framework/DataHandling/test/SampleEnvironmentFactoryTest.h +++ b/Framework/DataHandling/test/SampleEnvironmentFactoryTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/SampleEnvironmentSpecFileFinderTest.h b/Framework/DataHandling/test/SampleEnvironmentSpecFileFinderTest.h index 4ffa11066f7eed8fe68322754475e62a9b5e9d1d..ce45e3095a386750a7755f6c35162e071bc45dfc 100644 --- a/Framework/DataHandling/test/SampleEnvironmentSpecFileFinderTest.h +++ b/Framework/DataHandling/test/SampleEnvironmentSpecFileFinderTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/SampleEnvironmentSpecParserTest.h b/Framework/DataHandling/test/SampleEnvironmentSpecParserTest.h index a043183b4c2af0042b3fa6098037c962fc841ab8..9ddcb3e102b882b44389e87e5b87b5e3fd6709f2 100644 --- a/Framework/DataHandling/test/SampleEnvironmentSpecParserTest.h +++ b/Framework/DataHandling/test/SampleEnvironmentSpecParserTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/SampleEnvironmentSpecTest.h b/Framework/DataHandling/test/SampleEnvironmentSpecTest.h index c51a1eb2e494b91b9085a43e1b53fb9e80989ab6..1cafa0969be15e8f29d0eeab4905094bf451a748 100644 --- a/Framework/DataHandling/test/SampleEnvironmentSpecTest.h +++ b/Framework/DataHandling/test/SampleEnvironmentSpecTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/SaveANSTOAsciiTest.h b/Framework/DataHandling/test/SaveANSTOAsciiTest.h index 3ee6ca51d410110d7a5b5570e4f1ee427795e6f9..29b9d1a2ac35b2e887632567051785b1e5977f37 100644 --- a/Framework/DataHandling/test/SaveANSTOAsciiTest.h +++ b/Framework/DataHandling/test/SaveANSTOAsciiTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/SaveAscii2Test.h b/Framework/DataHandling/test/SaveAscii2Test.h index 5d646f4c9612bfa4e01c74317b9535ace7d79780..d9f1c18952fa87ca84964ff883952d9bf2d615d5 100644 --- a/Framework/DataHandling/test/SaveAscii2Test.h +++ b/Framework/DataHandling/test/SaveAscii2Test.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -114,7 +114,7 @@ public: } AnalysisDataService::Instance().add(m_name, wsToSave); SaveAscii2 save; - std::string filename = initSaveAscii2(save); + initSaveAscii2(save); TS_ASSERT_THROWS_NOTHING(save.setPropertyValue("WriteXError", "1")); TS_ASSERT_THROWS_ANYTHING(save.execute()); AnalysisDataService::Instance().remove(m_name); @@ -530,7 +530,7 @@ public: writeSampleWS(wsToSave, false); SaveAscii2 save; - std::string filename = initSaveAscii2(save); + initSaveAscii2(save); TS_ASSERT_THROWS_NOTHING( save.setProperty("SpectrumMetaData", "SpectrumNumber")); @@ -836,7 +836,7 @@ public: writeSampleWS(wsToSave); SaveAscii2 save; - std::string filename = initSaveAscii2(save); + initSaveAscii2(save); TS_ASSERT_THROWS_NOTHING( save.setPropertyValue("SpectrumMetaData", "NotAValidChoice")); diff --git a/Framework/DataHandling/test/SaveAsciiTest.h b/Framework/DataHandling/test/SaveAsciiTest.h index 10de218915c3200fdd7a6e908998ba37543fe005..3cd8b3417113ed4b2273af016e28835e22b3be98 100644 --- a/Framework/DataHandling/test/SaveAsciiTest.h +++ b/Framework/DataHandling/test/SaveAsciiTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/SaveBankScatteringAnglesTest.h b/Framework/DataHandling/test/SaveBankScatteringAnglesTest.h index da2f92c5e88db9ec38b9028f9c672ef25b7e1954..ab924856da4df1c1aa5826f1d67ae087ed8a389a 100644 --- a/Framework/DataHandling/test/SaveBankScatteringAnglesTest.h +++ b/Framework/DataHandling/test/SaveBankScatteringAnglesTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -62,9 +62,9 @@ public: std::ifstream file(tempFileName); std::string line; - int numLines = 0; if (file.is_open()) { + int numLines = 0; while (std::getline(file, line)) { numLines++; } diff --git a/Framework/DataHandling/test/SaveCSVTest.h b/Framework/DataHandling/test/SaveCSVTest.h index 749b80f8ce0b8e9fc6a72942175b0de51e814cc0..21c841e809974d36e6b9527411f1dc7f3cd5fb7e 100644 --- a/Framework/DataHandling/test/SaveCSVTest.h +++ b/Framework/DataHandling/test/SaveCSVTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -169,7 +169,8 @@ private: Poco::File(fileName).remove(); } - void evaluateFileWithDX(std::string fileName, const size_t nSpec) const { + void evaluateFileWithDX(const std::string &fileName, + const size_t nSpec) const { std::ifstream stream(fileName.c_str()); std::istringstream dataStream; std::string line; diff --git a/Framework/DataHandling/test/SaveCalFileTest.h b/Framework/DataHandling/test/SaveCalFileTest.h index 29bf4eb9554d1005fea752e3630f1c3815ec5bf0..d8ffb94aec8834a46a081466e5adeba6b079e1b5 100644 --- a/Framework/DataHandling/test/SaveCalFileTest.h +++ b/Framework/DataHandling/test/SaveCalFileTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -51,9 +51,6 @@ public: maskWS->getSpectrum(0).clearData(); maskWS->mutableSpectrumInfo().setMasked(0, true); - // Name of the output workspace. - std::string outWSName("SaveCalFileTest_OutputWS"); - SaveCalFile alg; TS_ASSERT_THROWS_NOTHING(alg.initialize()) TS_ASSERT(alg.isInitialized()) diff --git a/Framework/DataHandling/test/SaveCanSAS1dTest.h b/Framework/DataHandling/test/SaveCanSAS1dTest.h index 363f891be4df0c652032a16ad33ed7361379cde9..2aa5b7d87f847dedade0f5a5cb675388740f840f 100644 --- a/Framework/DataHandling/test/SaveCanSAS1dTest.h +++ b/Framework/DataHandling/test/SaveCanSAS1dTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include <cxxtest/TestSuite.h> diff --git a/Framework/DataHandling/test/SaveCanSAS1dTest2.h b/Framework/DataHandling/test/SaveCanSAS1dTest2.h index af23d1e4c2155eedca920384adf9edc158a45e5e..bdc0197aa1bece3c989d5fd525a0a145df683a50 100644 --- a/Framework/DataHandling/test/SaveCanSAS1dTest2.h +++ b/Framework/DataHandling/test/SaveCanSAS1dTest2.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include <cxxtest/TestSuite.h> diff --git a/Framework/DataHandling/test/SaveDaveGrpTest.h b/Framework/DataHandling/test/SaveDaveGrpTest.h index 307f27d592ba04562561b49555636e23a5d60fcd..f3dcf752e3bbe97ef93e7b906a04675049c21d80 100644 --- a/Framework/DataHandling/test/SaveDaveGrpTest.h +++ b/Framework/DataHandling/test/SaveDaveGrpTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/SaveDetectorsGroupingTest.h b/Framework/DataHandling/test/SaveDetectorsGroupingTest.h index afd64124b1c47301075be0d32c3cef0a84d18e70..5b9a1e7480ee023a2457c72ee7ee0e7a28fb0b0d 100644 --- a/Framework/DataHandling/test/SaveDetectorsGroupingTest.h +++ b/Framework/DataHandling/test/SaveDetectorsGroupingTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/SaveDiffCalTest.h b/Framework/DataHandling/test/SaveDiffCalTest.h index 748689f998598104cb9f7240e6dee8c018104ed9..132d4bb7ca5c363c3a5eb0538cf324917fadd4cf 100644 --- a/Framework/DataHandling/test/SaveDiffCalTest.h +++ b/Framework/DataHandling/test/SaveDiffCalTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/SaveDspacemapTest.h b/Framework/DataHandling/test/SaveDspacemapTest.h index c0e1c660a891de332207560ab26112c805d856ae..c83c3880c46069c03f5588cceef28b00177c70fa 100644 --- a/Framework/DataHandling/test/SaveDspacemapTest.h +++ b/Framework/DataHandling/test/SaveDspacemapTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/SaveFITSTest.h b/Framework/DataHandling/test/SaveFITSTest.h index 652e7f51cd4349c116191319ea5df96be7995806..7f77d07f2af9c4915b1847e0ee19d3c4336f9b35 100644 --- a/Framework/DataHandling/test/SaveFITSTest.h +++ b/Framework/DataHandling/test/SaveFITSTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/SaveFocusedXYETest.h b/Framework/DataHandling/test/SaveFocusedXYETest.h index 19e3783fdcaff463ab6267a13273fa9fa71dde5e..44c9f95d335022405c44008c9c13fc2deba70ba2 100644 --- a/Framework/DataHandling/test/SaveFocusedXYETest.h +++ b/Framework/DataHandling/test/SaveFocusedXYETest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/SaveFullprofResolutionTest.h b/Framework/DataHandling/test/SaveFullprofResolutionTest.h index 9bfadb39e281b78845e5278a17a38e285609ff45..8b088df4b745ee8d900aa7c0cd3457c3184ac9ad 100644 --- a/Framework/DataHandling/test/SaveFullprofResolutionTest.h +++ b/Framework/DataHandling/test/SaveFullprofResolutionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -184,7 +184,7 @@ public: //---------------------------------------------------------------------------------------------- /** Find out number of lines in a text file */ - int getFileLines(std::string filename) { + int getFileLines(const std::string &filename) { ifstream infile; infile.open(filename.c_str()); @@ -206,7 +206,7 @@ public: /** Write out a TableWorkspace contain 2 banks' parameters * ISIS HRPD Data */ - void create2BankProf9Table(string workspacename) { + void create2BankProf9Table(const string &workspacename) { TableWorkspace_sptr partablews = boost::make_shared<TableWorkspace>(); partablews->addColumn("str", "Name"); partablews->addColumn("double", "Value_1"); @@ -261,7 +261,7 @@ public: * 10 * Source data is from POWGEN's bank 1 calibrated */ - void createProfile10TableWS(std::string wsname) { + void createProfile10TableWS(const std::string &wsname) { // Create a map of string/double for parameters of profile 10 std::map<std::string, double> parammap{ {"BANK", 1.}, {"Alph0", 1.88187}, {"Alph0t", 64.4102}, diff --git a/Framework/DataHandling/test/SaveGDATest.h b/Framework/DataHandling/test/SaveGDATest.h index 221578a36388ff3dc46fb58500a5cfc9484716fe..77b89ce57301161ca657f3fb76b8b7c23d74d3e1 100644 --- a/Framework/DataHandling/test/SaveGDATest.h +++ b/Framework/DataHandling/test/SaveGDATest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/SaveGSASInstrumentFileTest.h b/Framework/DataHandling/test/SaveGSASInstrumentFileTest.h index a01cb51288a53e41eb72c3f9903cbe68fe9ce04f..641319f16a8906c980d4a8dab1df33863ba0040d 100644 --- a/Framework/DataHandling/test/SaveGSASInstrumentFileTest.h +++ b/Framework/DataHandling/test/SaveGSASInstrumentFileTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -186,7 +186,7 @@ public: //---------------------------------------------------------------------------------------------- /** Load table workspace containing instrument parameters */ - void loadProfileTable(string wsname) { + void loadProfileTable(const string &wsname) { // The data befow is from Bank1 in pg60_2011B.irf auto tablews = boost::make_shared<TableWorkspace>(); @@ -266,7 +266,7 @@ public: //---------------------------------------------------------------------------------------------- /** Generate a 3 bank .irf file */ - void generate3BankIrfFile(string filename) { + void generate3BankIrfFile(const string &filename) { ofstream ofile; ofile.open(filename.c_str()); @@ -457,7 +457,8 @@ public: } // Compare 2 files - bool compare2Files(std::string filename1, std::string filename2) { + bool compare2Files(const std::string &filename1, + const std::string &filename2) { ifstream file1(filename1.c_str(), std::ifstream::in); ifstream file2(filename2.c_str(), std::ifstream::in); @@ -496,7 +497,6 @@ public: while (!file2.eof()) { getline(file2, str); - c2++; } // Reset file stream pointer diff --git a/Framework/DataHandling/test/SaveGSSTest.h b/Framework/DataHandling/test/SaveGSSTest.h index e22ea6823ba66013d8cd59f7ec028980f71dc6e3..59255d5f52c4212011755c34e180079e2ba2dc0e 100644 --- a/Framework/DataHandling/test/SaveGSSTest.h +++ b/Framework/DataHandling/test/SaveGSSTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/SaveILLCosmosAsciiTest.h b/Framework/DataHandling/test/SaveILLCosmosAsciiTest.h index 84e267de2275976d204c06abd0360cec26457e5f..865a4120f72e304172115e8982b68abac3d42523 100644 --- a/Framework/DataHandling/test/SaveILLCosmosAsciiTest.h +++ b/Framework/DataHandling/test/SaveILLCosmosAsciiTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -228,7 +228,8 @@ public: private: void headingsTests(std::ifstream &in, std::string &fullline, - bool propertiesLogs = false, std::string sep = "\t") { + bool propertiesLogs = false, + const std::string &sep = "\t") { getline(in, fullline); TS_ASSERT_EQUALS(fullline, "MFT"); getline(in, fullline); diff --git a/Framework/DataHandling/test/SaveIsawDetCalTest.h b/Framework/DataHandling/test/SaveIsawDetCalTest.h index 2221f2f618f431b6c93a144caead9caf8d37de40..80d5fddee5000c1f77424a997d5d6b36643cf855 100644 --- a/Framework/DataHandling/test/SaveIsawDetCalTest.h +++ b/Framework/DataHandling/test/SaveIsawDetCalTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/SaveMaskTest.h b/Framework/DataHandling/test/SaveMaskTest.h index e1584c0c7cff2d521950b94faf112dbb6ff942b1..019f24d62e222dbc49496556705aecdcf95bf4c6 100644 --- a/Framework/DataHandling/test/SaveMaskTest.h +++ b/Framework/DataHandling/test/SaveMaskTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/SaveNISTDATTest.h b/Framework/DataHandling/test/SaveNISTDATTest.h index 2e8fda3652cfbf351d29d39f050228e1d4de4097..642ec0b61bc01f7ef35c04a59dcab61d5d6d86cf 100644 --- a/Framework/DataHandling/test/SaveNISTDATTest.h +++ b/Framework/DataHandling/test/SaveNISTDATTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/SaveNXSPETest.h b/Framework/DataHandling/test/SaveNXSPETest.h index 71525257205f7a223878624a109a0453a256363f..fe41ac1a3d787fad738385e1c24877e96cedbff2 100644 --- a/Framework/DataHandling/test/SaveNXSPETest.h +++ b/Framework/DataHandling/test/SaveNXSPETest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -175,7 +175,7 @@ private: boost::tuple<boost::shared_array<hsize_t>, boost::shared_array<double>, boost::shared_array<double>>; - DataHolder saveAndReloadWorkspace(const MatrixWorkspace_sptr inputWS) { + DataHolder saveAndReloadWorkspace(const MatrixWorkspace_sptr &inputWS) { SaveNXSPE saver; saver.initialize(); saver.setChild(true); diff --git a/Framework/DataHandling/test/SaveNXTomoTest.h b/Framework/DataHandling/test/SaveNXTomoTest.h index 82a7768c5a652a90142769f355f56bc4ad371406..659808195de2a5e019fdece69f9b6d5ba41d25cb 100644 --- a/Framework/DataHandling/test/SaveNXTomoTest.h +++ b/Framework/DataHandling/test/SaveNXTomoTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/SaveNXcanSASTest.h b/Framework/DataHandling/test/SaveNXcanSASTest.h index 6607bbdffffd4a7a292cc4f023ef5da3cf7ff924..46bdbabd14ebec8da4d43704c48d5307f23d798b 100644 --- a/Framework/DataHandling/test/SaveNXcanSASTest.h +++ b/Framework/DataHandling/test/SaveNXcanSASTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -373,10 +373,10 @@ public: private: void save_file_no_issues( - Mantid::API::MatrixWorkspace_sptr workspace, + const Mantid::API::MatrixWorkspace_sptr &workspace, NXcanSASTestParameters ¶meters, - Mantid::API::MatrixWorkspace_sptr transmission = nullptr, - Mantid::API::MatrixWorkspace_sptr transmissionCan = nullptr) { + const Mantid::API::MatrixWorkspace_sptr &transmission = nullptr, + const Mantid::API::MatrixWorkspace_sptr &transmissionCan = nullptr) { auto saveAlg = Mantid::API::AlgorithmManager::Instance().createUnmanaged( "SaveNXcanSAS"); saveAlg->initialize(); @@ -472,7 +472,7 @@ private: } void do_assert_detector(H5::Group &instrument, - std::vector<std::string> detectors) { + const std::vector<std::string> &detectors) { for (auto &detector : detectors) { std::string detectorName = sasInstrumentDetectorGroupName + detector; auto detectorNameSanitized = @@ -616,7 +616,7 @@ private: void do_assert_process_note(H5::Group ¬e, const bool &hasSampleRuns, const bool &hasCanRuns, const std::string &sampleDirectRun, - const std::string canDirectRun) { + const std::string &canDirectRun) { auto numAttributes = note.getNumAttrs(); TSM_ASSERT_EQUALS("Should have 2 attributes", 2, numAttributes); diff --git a/Framework/DataHandling/test/SaveNexusESSTest.h b/Framework/DataHandling/test/SaveNexusESSTest.h index 99b1845310e06569c115ed1e85c65db0f06c2b6e..4bbeb8a86e7a756438af1095e7f0aebc3c5b325b 100644 --- a/Framework/DataHandling/test/SaveNexusESSTest.h +++ b/Framework/DataHandling/test/SaveNexusESSTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -33,7 +33,7 @@ using namespace Mantid::DataHandling; using namespace Mantid::API; namespace { -template <typename T> void do_execute(const std::string filename, T &ws) { +template <typename T> void do_execute(const std::string &filename, T &ws) { SaveNexusESS alg; alg.setChild(true); alg.setRethrows(true); diff --git a/Framework/DataHandling/test/SaveNexusGeometryTest.h b/Framework/DataHandling/test/SaveNexusGeometryTest.h index 436664f8d3b6039b6b34be79044fac19614e5e40..47558ab87afd9b9e979812b706b887544231344e 100644 --- a/Framework/DataHandling/test/SaveNexusGeometryTest.h +++ b/Framework/DataHandling/test/SaveNexusGeometryTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/SaveNexusProcessedTest.h b/Framework/DataHandling/test/SaveNexusProcessedTest.h index b3bf80278c428e21104d95affb74887193ad7d0b..44bf634212da801aff15160c70ee12b2ffb74efd 100644 --- a/Framework/DataHandling/test/SaveNexusProcessedTest.h +++ b/Framework/DataHandling/test/SaveNexusProcessedTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -228,7 +228,7 @@ public: * @return */ static EventWorkspace_sptr - do_testExec_EventWorkspaces(std::string filename_root, EventType type, + do_testExec_EventWorkspaces(const std::string &filename_root, EventType type, std::string &outputFile, bool makeDifferentTypes, bool clearfiles, bool PreserveEvents = true, bool CompressNexus = false) { diff --git a/Framework/DataHandling/test/SaveNexusTest.h b/Framework/DataHandling/test/SaveNexusTest.h index 724b6ef0eeaaf1ecc6dfb5dee0de374becf21770..0cdde866973532ddb57f69cc92e488d432f83698 100644 --- a/Framework/DataHandling/test/SaveNexusTest.h +++ b/Framework/DataHandling/test/SaveNexusTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/SaveOpenGenieAsciiTest.h b/Framework/DataHandling/test/SaveOpenGenieAsciiTest.h index 518f60d7bce2c894f0447b32e8726e08b8cc0f2f..cf19f1e0ba05191663bf916e2f19417fb5e05707 100644 --- a/Framework/DataHandling/test/SaveOpenGenieAsciiTest.h +++ b/Framework/DataHandling/test/SaveOpenGenieAsciiTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidDataHandling/SaveOpenGenieAscii.h" @@ -82,7 +82,7 @@ private: const std::string m_inputNexusFile{"SaveOpenGenieAsciiInput.nxs"}; std::unique_ptr<SaveOpenGenieAscii> - createAlg(MatrixWorkspace_sptr ws, const std::string &tempFilePath) { + createAlg(const MatrixWorkspace_sptr &ws, const std::string &tempFilePath) { auto alg = std::make_unique<SaveOpenGenieAscii>(); alg->initialize(); diff --git a/Framework/DataHandling/test/SavePARTest.h b/Framework/DataHandling/test/SavePARTest.h index 53aecc977af60afc69cbbb6ea26d5fc544669f3c..27b69f468920790d8f787d9bf018f97830862cab 100644 --- a/Framework/DataHandling/test/SavePARTest.h +++ b/Framework/DataHandling/test/SavePARTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/SavePDFGuiTest.h b/Framework/DataHandling/test/SavePDFGuiTest.h index d2a2d0245d8c37b1222adc0f86e869ebd90b172f..adea18d2e1b0ce8f715607b46b6a73a32e715d87 100644 --- a/Framework/DataHandling/test/SavePDFGuiTest.h +++ b/Framework/DataHandling/test/SavePDFGuiTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -59,7 +59,7 @@ public: return n; } - bool loadWorkspace(const std::string &filename, const std::string wsName) { + bool loadWorkspace(const std::string &filename, const std::string &wsName) { LoadNexusProcessed load; load.initialize(); load.setProperty("Filename", filename); @@ -112,9 +112,6 @@ public: grpAlg->setPropertyValue("OutputWorkspace", groupName); grpAlg->execute(); - // name of the output file - const std::string outFilename("SavePDFGUIGroup.gr"); - // run the algorithm with a group SavePDFGui alg; TS_ASSERT_THROWS_NOTHING(alg.initialize()); diff --git a/Framework/DataHandling/test/SavePHXTest.h b/Framework/DataHandling/test/SavePHXTest.h index 4f1aa9d45fb21f524ea6950412fbfedf4d6d3ed7..0f1660350ec509d3121d5935d1ca5c63da847762 100644 --- a/Framework/DataHandling/test/SavePHXTest.h +++ b/Framework/DataHandling/test/SavePHXTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/SaveParameterFileTest.h b/Framework/DataHandling/test/SaveParameterFileTest.h index ceef868a5138684cea719c03fd120b80a4e17447..69616ee7242286f6a1717248a65d00869b484701 100644 --- a/Framework/DataHandling/test/SaveParameterFileTest.h +++ b/Framework/DataHandling/test/SaveParameterFileTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -77,21 +77,23 @@ public: "linear ; TOF ; TOF"); } - void setParam(std::string cName, std::string pName, std::string value) { + void setParam(const std::string &cName, const std::string &pName, + const std::string &value) { Instrument_const_sptr inst = m_ws->getInstrument(); ParameterMap ¶mMap = m_ws->instrumentParameters(); boost::shared_ptr<const IComponent> comp = inst->getComponentByName(cName); paramMap.addString(comp->getComponentID(), pName, value); } - void setParam(std::string cName, std::string pName, double value) { + void setParam(const std::string &cName, const std::string &pName, + double value) { Instrument_const_sptr inst = m_ws->getInstrument(); ParameterMap ¶mMap = m_ws->instrumentParameters(); boost::shared_ptr<const IComponent> comp = inst->getComponentByName(cName); paramMap.addDouble(comp->getComponentID(), pName, value); } - void setParamByDetID(int id, std::string pName, double value) { + void setParamByDetID(int id, const std::string &pName, double value) { ParameterMap ¶mMap = m_ws->instrumentParameters(); const auto &detectorInfo = m_ws->detectorInfo(); const auto detectorIndex = detectorInfo.indexOf(id); @@ -99,7 +101,8 @@ public: paramMap.addDouble(detector.getComponentID(), pName, value); } - void setFitParam(std::string cName, std::string pName, std::string value) { + void setFitParam(const std::string &cName, const std::string &pName, + const std::string &value) { Instrument_const_sptr inst = m_ws->getInstrument(); ParameterMap ¶mMap = m_ws->instrumentParameters(); boost::shared_ptr<const IComponent> comp = inst->getComponentByName(cName); @@ -108,7 +111,8 @@ public: paramMap.add(comp.get(), param); } - void checkParam(std::string cName, std::string pName, std::string value) { + void checkParam(const std::string &cName, const std::string &pName, + std::string value) { Instrument_const_sptr inst = m_ws->getInstrument(); ParameterMap ¶mMap = m_ws->instrumentParameters(); boost::shared_ptr<const IComponent> comp = inst->getComponentByName(cName); @@ -116,7 +120,8 @@ public: TS_ASSERT_EQUALS(value, param); } - void checkParam(std::string cName, std::string pName, double value) { + void checkParam(const std::string &cName, const std::string &pName, + double value) { Instrument_const_sptr inst = m_ws->getInstrument(); ParameterMap ¶mMap = m_ws->instrumentParameters(); boost::shared_ptr<const IComponent> comp = inst->getComponentByName(cName); @@ -124,7 +129,7 @@ public: TS_ASSERT_DELTA(value, values.front(), 0.0001); } - void checkParamByDetID(int id, std::string pName, double value) { + void checkParamByDetID(int id, const std::string &pName, double value) { ParameterMap ¶mMap = m_ws->instrumentParameters(); const auto &detectorInfo = m_ws->detectorInfo(); const auto &detector = detectorInfo.detector(detectorInfo.indexOf(id)); @@ -133,7 +138,8 @@ public: TS_ASSERT_DELTA(value, pValue, 0.0001); } - void checkFitParam(std::string cName, std::string pName, std::string value) { + void checkFitParam(const std::string &cName, const std::string &pName, + const std::string &value) { Instrument_const_sptr inst = m_ws->getInstrument(); ParameterMap ¶mMap = m_ws->instrumentParameters(); boost::shared_ptr<const IComponent> comp = inst->getComponentByName(cName); @@ -150,7 +156,7 @@ public: TS_ASSERT_EQUALS(fitParam.getFormulaUnit(), values[8]); } - void loadParams(std::string filename) { + void loadParams(const std::string &filename) { LoadParameterFile loaderPF; TS_ASSERT_THROWS_NOTHING(loaderPF.initialize()); loaderPF.setPropertyValue("Filename", filename); @@ -159,7 +165,7 @@ public: TS_ASSERT(loaderPF.isExecuted()); } - void saveParams(std::string filename) { + void saveParams(const std::string &filename) { SaveParameterFile saverPF; TS_ASSERT_THROWS_NOTHING(saverPF.initialize()); saverPF.setPropertyValue("Filename", filename); diff --git a/Framework/DataHandling/test/SaveRKHTest.h b/Framework/DataHandling/test/SaveRKHTest.h index 3eff74e3cdec6d5ee5c9f6f1fd2ee10ee3460dc1..25f66b1b56f25c3ae9dedb2ff333233665cb006f 100644 --- a/Framework/DataHandling/test/SaveRKHTest.h +++ b/Framework/DataHandling/test/SaveRKHTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/SaveRMCProfileTest.h b/Framework/DataHandling/test/SaveRMCProfileTest.h index 78630f05465f55f965f9aab91673c76bae7ea3ba..89765159bfe1f60db60794c2ec88dbf8b2b5961b 100644 --- a/Framework/DataHandling/test/SaveRMCProfileTest.h +++ b/Framework/DataHandling/test/SaveRMCProfileTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -59,7 +59,7 @@ public: return n; } - bool loadWorkspace(const std::string &filename, const std::string wsName) { + bool loadWorkspace(const std::string &filename, const std::string &wsName) { LoadNexusProcessed load; load.initialize(); load.setProperty("Filename", filename); diff --git a/Framework/DataHandling/test/SaveReflCustomAsciiTest.h b/Framework/DataHandling/test/SaveReflCustomAsciiTest.h index 5b66a08765e79c060978431419b239b5ecefacf2..88274093117c4df7a0fd9c4ba13878e0c13163fe 100644 --- a/Framework/DataHandling/test/SaveReflCustomAsciiTest.h +++ b/Framework/DataHandling/test/SaveReflCustomAsciiTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/SaveReflThreeColumnAsciiTest.h b/Framework/DataHandling/test/SaveReflThreeColumnAsciiTest.h index 28660e35b806bf5ee4306fc8369faacd68d9c23a..b17f9a0a973c0a5c62330854e0639dee721f36f8 100644 --- a/Framework/DataHandling/test/SaveReflThreeColumnAsciiTest.h +++ b/Framework/DataHandling/test/SaveReflThreeColumnAsciiTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/SaveReflectometryAsciiTest.h b/Framework/DataHandling/test/SaveReflectometryAsciiTest.h index 7d25e46662079ad712e92135b408826cf077853a..4de5db7961120adda24e641744a7ca923100fe05 100644 --- a/Framework/DataHandling/test/SaveReflectometryAsciiTest.h +++ b/Framework/DataHandling/test/SaveReflectometryAsciiTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/SaveSESANSTest.h b/Framework/DataHandling/test/SaveSESANSTest.h index 5b8fe5282f11e8e92d78b10ce8edf2f247dbdedc..cb72394e094b169a05851fa2f06a5b0fc58e443f 100644 --- a/Framework/DataHandling/test/SaveSESANSTest.h +++ b/Framework/DataHandling/test/SaveSESANSTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/SaveSPETest.h b/Framework/DataHandling/test/SaveSPETest.h index a47fca9b566f144e9a594c7928dc0ce60d22a9c2..64ac643edf86974a916ff5fb6372008e6f503797 100644 --- a/Framework/DataHandling/test/SaveSPETest.h +++ b/Framework/DataHandling/test/SaveSPETest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/SaveSampleEnvironmentAndShapeTest.h b/Framework/DataHandling/test/SaveSampleEnvironmentAndShapeTest.h index 10d471fae2c82364c67f9c2b142fb07c7ec27e0f..8d8d2d69346d94d2a0f6d61e94fb6e60e2495945 100644 --- a/Framework/DataHandling/test/SaveSampleEnvironmentAndShapeTest.h +++ b/Framework/DataHandling/test/SaveSampleEnvironmentAndShapeTest.h @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #include "MantidAPI/Sample.h" #include "MantidDataHandling/LoadBinaryStl.h" #include "MantidDataHandling/SaveSampleEnvironmentAndShape.h" diff --git a/Framework/DataHandling/test/SaveStlTest.h b/Framework/DataHandling/test/SaveStlTest.h index 9a02116c0492daa86995b32026f87500d4ab2cb2..414cda894f68d85cff687348602c3ada2e3c116c 100644 --- a/Framework/DataHandling/test/SaveStlTest.h +++ b/Framework/DataHandling/test/SaveStlTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidAPI/FileFinder.h" diff --git a/Framework/DataHandling/test/SaveTBLTest.h b/Framework/DataHandling/test/SaveTBLTest.h index 1c144f0a57dcdeefecbc0c9f5e6508d28bcedef3..1c41ea685704557334ae4d63098a2f5486ccfd3a 100644 --- a/Framework/DataHandling/test/SaveTBLTest.h +++ b/Framework/DataHandling/test/SaveTBLTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/SaveToSNSHistogramNexusTest.h b/Framework/DataHandling/test/SaveToSNSHistogramNexusTest.h index d7772ce2e7f453dd52a3e565330ee1395ff5e59c..e0362a86f93312fc7ccc7c74b49f890d0e6be7d9 100644 --- a/Framework/DataHandling/test/SaveToSNSHistogramNexusTest.h +++ b/Framework/DataHandling/test/SaveToSNSHistogramNexusTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/SetBeamTest.h b/Framework/DataHandling/test/SetBeamTest.h index d8bf13d9939ebc5407b9c1603d3d1efdad144143..3bb86583835d7743ea2365d4a17c86f79a820c4e 100644 --- a/Framework/DataHandling/test/SetBeamTest.h +++ b/Framework/DataHandling/test/SetBeamTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/SetSampleMaterialTest.h b/Framework/DataHandling/test/SetSampleMaterialTest.h index fe1273aa1f77d6605ab003b5b0f4c7a98af91d40..c197e29c8f4138e2880668fa1793c0ac22e156bf 100644 --- a/Framework/DataHandling/test/SetSampleMaterialTest.h +++ b/Framework/DataHandling/test/SetSampleMaterialTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/SetSampleTest.h b/Framework/DataHandling/test/SetSampleTest.h index 875d08b474957e57c0a37c1d5dd31427260e31ad..8a7e80e2801fa9a8799b86215084b5e68bd0b84a 100644 --- a/Framework/DataHandling/test/SetSampleTest.h +++ b/Framework/DataHandling/test/SetSampleTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -576,7 +576,8 @@ private: return false; } - void setTestReferenceFrame(Mantid::API::MatrixWorkspace_sptr workspace) { + void + setTestReferenceFrame(const Mantid::API::MatrixWorkspace_sptr &workspace) { using Mantid::Geometry::Instrument; using Mantid::Geometry::ReferenceFrame; // Use Z=up,Y=across,X=beam so we test it listens to the reference frame diff --git a/Framework/DataHandling/test/SetScalingPSDTest.h b/Framework/DataHandling/test/SetScalingPSDTest.h index 3813cb5add2c02d985e877d9e91f577343789afe..63db0e059384b003d13116bcd19468331330692b 100644 --- a/Framework/DataHandling/test/SetScalingPSDTest.h +++ b/Framework/DataHandling/test/SetScalingPSDTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -128,7 +128,7 @@ public: } private: - std::string createTestScalingFile(Workspace2D_sptr testWS) { + std::string createTestScalingFile(const Workspace2D_sptr &testWS) { // NOTE: The only values read by the algorithm are the number of detectors // and then from each detector line // det no., (l2,theta,phi). All other values will be set to -1 here diff --git a/Framework/DataHandling/test/SortTableWorkspaceTest.h b/Framework/DataHandling/test/SortTableWorkspaceTest.h index 8c8b773cfab2bbfdddb18a12624139ed6fd99159..757fb6734f1f07a4566ae4ac3134842c4cc18636 100644 --- a/Framework/DataHandling/test/SortTableWorkspaceTest.h +++ b/Framework/DataHandling/test/SortTableWorkspaceTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/StartAndEndTimeFromNexusFileExtractorTest.h b/Framework/DataHandling/test/StartAndEndTimeFromNexusFileExtractorTest.h index ea9247a2dbfa450231647222665829c359437775..d48ab799e61542697e06e271b61326a2f89076df 100644 --- a/Framework/DataHandling/test/StartAndEndTimeFromNexusFileExtractorTest.h +++ b/Framework/DataHandling/test/StartAndEndTimeFromNexusFileExtractorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataHandling/test/UpdateInstrumentFromFileTest.h b/Framework/DataHandling/test/UpdateInstrumentFromFileTest.h index 0ed7df3c1e8de0982e5cdaa03c4d52ed3395db18..f7ae6029178db8ecd996a98c8491064889e306eb 100644 --- a/Framework/DataHandling/test/UpdateInstrumentFromFileTest.h +++ b/Framework/DataHandling/test/UpdateInstrumentFromFileTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -137,7 +137,6 @@ public: void test_DAT_Extension_Without_Header_Assumes_Detector_Calibration_File_And_Fails_If_Number_Of_Columns_Incorrect() { - const std::string colNames = "spectrum,theta,t0,-,R"; const std::string contents = "plik det t0 l0 l1\n" " 3 130.4653 -0.4157 11.0050 0.6708\n" " 4 131.9319 -0.5338 11.0050 0.6545"; diff --git a/Framework/DataHandling/test/XMLInstrumentParameterTest.h b/Framework/DataHandling/test/XMLInstrumentParameterTest.h index f17e095d5b215b4f3ea61e270b26e2e1808392e9..162aa9ab52699fb76c816df065265390c29ec5c0 100644 --- a/Framework/DataHandling/test/XMLInstrumentParameterTest.h +++ b/Framework/DataHandling/test/XMLInstrumentParameterTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/inc/MantidDataObjects/AffineMatrixParameter.h b/Framework/DataObjects/inc/MantidDataObjects/AffineMatrixParameter.h index 409263b6b61c6cfbd146f1da18276a32c77d329e..39c06e04c2c4987d13c85199f3f12b80a29ee18f 100644 --- a/Framework/DataObjects/inc/MantidDataObjects/AffineMatrixParameter.h +++ b/Framework/DataObjects/inc/MantidDataObjects/AffineMatrixParameter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -29,7 +29,7 @@ public: bool isValid() const override; std::string toXMLString() const override; AffineMatrixParameter *clone() const override; - void setMatrix(const AffineMatrixType newMatrix); + void setMatrix(const AffineMatrixType &newMatrix); AffineMatrixParameter(size_t outD, size_t inD); AffineMatrixParameter(const AffineMatrixParameter &); AffineMatrixParameter &operator=(const AffineMatrixParameter &other); diff --git a/Framework/DataObjects/inc/MantidDataObjects/AffineMatrixParameterParser.h b/Framework/DataObjects/inc/MantidDataObjects/AffineMatrixParameterParser.h index e28ad70151b733759125fd723848bc2b38ff986c..b5fab33a7676d5b791ab88dacb129dc5c55e064d 100644 --- a/Framework/DataObjects/inc/MantidDataObjects/AffineMatrixParameterParser.h +++ b/Framework/DataObjects/inc/MantidDataObjects/AffineMatrixParameterParser.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/inc/MantidDataObjects/BoxControllerNeXusIO.h b/Framework/DataObjects/inc/MantidDataObjects/BoxControllerNeXusIO.h index 78990306fe241a79389815b5e0c7a0633bc288ef..1832b1dda3f5e086221ec4d0b86df0370ba7d3b1 100644 --- a/Framework/DataObjects/inc/MantidDataObjects/BoxControllerNeXusIO.h +++ b/Framework/DataObjects/inc/MantidDataObjects/BoxControllerNeXusIO.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -129,7 +129,7 @@ private: // get the event type from event name static EventType TypeFromString(const std::vector<std::string> &typesSupported, - const std::string typeName); + const std::string &typeName); /// the enum, which suggests the way (currently)two possible data types are /// converted to each other enum CoordConversion { diff --git a/Framework/DataObjects/inc/MantidDataObjects/CalculateReflectometry.h b/Framework/DataObjects/inc/MantidDataObjects/CalculateReflectometry.h index 46b96c407af6c9939afeca27cd3a0da66687bee3..f47d9adf501eae6ad07248896ad14b5c7dcaf4a4 100644 --- a/Framework/DataObjects/inc/MantidDataObjects/CalculateReflectometry.h +++ b/Framework/DataObjects/inc/MantidDataObjects/CalculateReflectometry.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/inc/MantidDataObjects/CalculateReflectometryKiKf.h b/Framework/DataObjects/inc/MantidDataObjects/CalculateReflectometryKiKf.h index bfbbabe3bab985f6abada5c7eaa0fae9a04967d1..6ce0925d8ee51f6e38b33640332d88b1049a4308 100644 --- a/Framework/DataObjects/inc/MantidDataObjects/CalculateReflectometryKiKf.h +++ b/Framework/DataObjects/inc/MantidDataObjects/CalculateReflectometryKiKf.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidDataObjects/CalculateReflectometry.h" diff --git a/Framework/DataObjects/inc/MantidDataObjects/CalculateReflectometryP.h b/Framework/DataObjects/inc/MantidDataObjects/CalculateReflectometryP.h index fa14354b3724a302f940ed9b35b0ad3cc8ed94b2..228094dd9fee723860559fe98c5cbddf4d503263 100644 --- a/Framework/DataObjects/inc/MantidDataObjects/CalculateReflectometryP.h +++ b/Framework/DataObjects/inc/MantidDataObjects/CalculateReflectometryP.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/inc/MantidDataObjects/CalculateReflectometryQxQz.h b/Framework/DataObjects/inc/MantidDataObjects/CalculateReflectometryQxQz.h index 53d9dc653126d9167e1d3f44cee20c9431b586a1..cbc9102bf6b2cc36992284c583f9cad55f7e2b66 100644 --- a/Framework/DataObjects/inc/MantidDataObjects/CalculateReflectometryQxQz.h +++ b/Framework/DataObjects/inc/MantidDataObjects/CalculateReflectometryQxQz.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/inc/MantidDataObjects/CoordTransformAffine.h b/Framework/DataObjects/inc/MantidDataObjects/CoordTransformAffine.h index d9df4eb9f086809bb17bc1bf53ba29d31d9a4ab0..7dc44697f4e6bcb2d8279f395f8ded2f8920d54b 100644 --- a/Framework/DataObjects/inc/MantidDataObjects/CoordTransformAffine.h +++ b/Framework/DataObjects/inc/MantidDataObjects/CoordTransformAffine.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/inc/MantidDataObjects/CoordTransformAffineParser.h b/Framework/DataObjects/inc/MantidDataObjects/CoordTransformAffineParser.h index 33d48e0a1aaffd88228a42f3c7b53a7abb676817..d73fd12c0a426f6291d76b2d3292c8a9ce6c3643 100644 --- a/Framework/DataObjects/inc/MantidDataObjects/CoordTransformAffineParser.h +++ b/Framework/DataObjects/inc/MantidDataObjects/CoordTransformAffineParser.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/inc/MantidDataObjects/CoordTransformAligned.h b/Framework/DataObjects/inc/MantidDataObjects/CoordTransformAligned.h index 9ec2a3f4cf2ae11ce3ef8bea76fcc9475e05e7ea..8f315244a548cb72c0629bb532f04867c131d898 100644 --- a/Framework/DataObjects/inc/MantidDataObjects/CoordTransformAligned.h +++ b/Framework/DataObjects/inc/MantidDataObjects/CoordTransformAligned.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/inc/MantidDataObjects/CoordTransformDistance.h b/Framework/DataObjects/inc/MantidDataObjects/CoordTransformDistance.h index 76c0e73a7d9415c770d0d4dd0b401ff61659c5f2..6e90be78931f09f0ed12892456670724cecd858c 100644 --- a/Framework/DataObjects/inc/MantidDataObjects/CoordTransformDistance.h +++ b/Framework/DataObjects/inc/MantidDataObjects/CoordTransformDistance.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/inc/MantidDataObjects/CoordTransformDistanceParser.h b/Framework/DataObjects/inc/MantidDataObjects/CoordTransformDistanceParser.h index cc8b6c21ff9756186964a6f4aaf426b7ea8fa68a..ae9d05d283443f370b18841ecb512f87feac7679 100644 --- a/Framework/DataObjects/inc/MantidDataObjects/CoordTransformDistanceParser.h +++ b/Framework/DataObjects/inc/MantidDataObjects/CoordTransformDistanceParser.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/inc/MantidDataObjects/DllConfig.h b/Framework/DataObjects/inc/MantidDataObjects/DllConfig.h index 9eb5149000e359afe25298ec534ef00e7ead8c6e..cb961a15999053b61bde66ffe630408e27434e89 100644 --- a/Framework/DataObjects/inc/MantidDataObjects/DllConfig.h +++ b/Framework/DataObjects/inc/MantidDataObjects/DllConfig.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/inc/MantidDataObjects/EventList.h b/Framework/DataObjects/inc/MantidDataObjects/EventList.h index 6eacecaac6f4654cb0d014018cf7e04e6a40c5bc..f751a4e62955bf0061c48b416ccfc911486e43ce 100644 --- a/Framework/DataObjects/inc/MantidDataObjects/EventList.h +++ b/Framework/DataObjects/inc/MantidDataObjects/EventList.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -447,7 +447,7 @@ private: const double maxX, const bool entireRange); template <class T> void convertTofHelper(std::vector<T> &events, - std::function<double(double)> func); + const std::function<double(double)> &func); template <class T> void convertTofHelper(std::vector<T> &events, const double factor, diff --git a/Framework/DataObjects/inc/MantidDataObjects/EventWorkspace.h b/Framework/DataObjects/inc/MantidDataObjects/EventWorkspace.h index dfea169327480637c2466de488e634259ea52778..66a58603a8e726d5ac8467faf0f12a08b1a6be82 100644 --- a/Framework/DataObjects/inc/MantidDataObjects/EventWorkspace.h +++ b/Framework/DataObjects/inc/MantidDataObjects/EventWorkspace.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/inc/MantidDataObjects/EventWorkspaceHelpers.h b/Framework/DataObjects/inc/MantidDataObjects/EventWorkspaceHelpers.h index 86ef7b8cb73cc0c4256a005a7f6602668d96857c..89d4c4fe1f736d4b3f2bfcbf95ac5d30449c1be4 100644 --- a/Framework/DataObjects/inc/MantidDataObjects/EventWorkspaceHelpers.h +++ b/Framework/DataObjects/inc/MantidDataObjects/EventWorkspaceHelpers.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -20,7 +20,7 @@ namespace DataObjects { struct DLLExport EventWorkspaceHelpers { /// Converts an EventWorkspace to an equivalent Workspace2D. static API::MatrixWorkspace_sptr - convertEventTo2D(API::MatrixWorkspace_sptr inputMatrixW); + convertEventTo2D(const API::MatrixWorkspace_sptr &inputMatrixW); }; } // namespace DataObjects diff --git a/Framework/DataObjects/inc/MantidDataObjects/EventWorkspaceMRU.h b/Framework/DataObjects/inc/MantidDataObjects/EventWorkspaceMRU.h index e89acfd1d24f85de450ce97eb2a67ae7951d62bf..d72aeff9cbd9f7cb7358e2f59e3dbd612620e4d0 100644 --- a/Framework/DataObjects/inc/MantidDataObjects/EventWorkspaceMRU.h +++ b/Framework/DataObjects/inc/MantidDataObjects/EventWorkspaceMRU.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/inc/MantidDataObjects/Events.h b/Framework/DataObjects/inc/MantidDataObjects/Events.h index 5b475b86c4c421dec3387f29d8f362caf6c6cc8c..6f11c41b6d9f41702a2adf147469e8fff97f12b3 100644 --- a/Framework/DataObjects/inc/MantidDataObjects/Events.h +++ b/Framework/DataObjects/inc/MantidDataObjects/Events.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/inc/MantidDataObjects/FakeMD.h b/Framework/DataObjects/inc/MantidDataObjects/FakeMD.h index e4dd36d0a8a61a4512dec71cb7cb24abf74d80b6..2a3c9fdc44ef36b030237af44178b3a6726d9681 100644 --- a/Framework/DataObjects/inc/MantidDataObjects/FakeMD.h +++ b/Framework/DataObjects/inc/MantidDataObjects/FakeMD.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -25,7 +25,7 @@ public: const std::vector<double> &peakParams, const int randomSeed, const bool randomizeSignal); - void fill(API::IMDEventWorkspace_sptr workspace); + void fill(const API::IMDEventWorkspace_sptr &workspace); private: void setupDetectorCache(const API::IMDEventWorkspace &workspace); diff --git a/Framework/DataObjects/inc/MantidDataObjects/FractionalRebinning.h b/Framework/DataObjects/inc/MantidDataObjects/FractionalRebinning.h index cfd77a428bf86d4aead981895481d830eddcd4f3..10f5d984973f784d655f8318ccccf53c33ea047f 100644 --- a/Framework/DataObjects/inc/MantidDataObjects/FractionalRebinning.h +++ b/Framework/DataObjects/inc/MantidDataObjects/FractionalRebinning.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -42,8 +42,8 @@ getIntersectionRegion(const std::vector<double> &xAxis, /// Compute sqrt of errors and put back in bin width division if necessary MANTID_DATAOBJECTS_DLL void -normaliseOutput(API::MatrixWorkspace_sptr outputWS, - API::MatrixWorkspace_const_sptr inputWS, +normaliseOutput(const API::MatrixWorkspace_sptr &outputWS, + const API::MatrixWorkspace_const_sptr &inputWS, API::Progress *progress = nullptr); /// Rebin the input quadrilateral to to output grid diff --git a/Framework/DataObjects/inc/MantidDataObjects/GroupingWorkspace.h b/Framework/DataObjects/inc/MantidDataObjects/GroupingWorkspace.h index 47ca58aaf770a7fb064d5b826657765ea673866b..75c6291d90146383baa3f2cb8a44cb78fcdef80f 100644 --- a/Framework/DataObjects/inc/MantidDataObjects/GroupingWorkspace.h +++ b/Framework/DataObjects/inc/MantidDataObjects/GroupingWorkspace.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -25,7 +25,7 @@ namespace DataObjects { */ class DLLExport GroupingWorkspace : public SpecialWorkspace2D { public: - GroupingWorkspace(Geometry::Instrument_const_sptr inst); + GroupingWorkspace(const Geometry::Instrument_const_sptr &inst); GroupingWorkspace() = default; GroupingWorkspace(size_t numvectors); GroupingWorkspace &operator=(const GroupingWorkspace &) = delete; diff --git a/Framework/DataObjects/inc/MantidDataObjects/Histogram1D.h b/Framework/DataObjects/inc/MantidDataObjects/Histogram1D.h index 52c6c9d74473bd8ed548016fb8b8203035ffe5f6..eb73b5b3bfe86179946499c0e1471a53d0368c53 100644 --- a/Framework/DataObjects/inc/MantidDataObjects/Histogram1D.h +++ b/Framework/DataObjects/inc/MantidDataObjects/Histogram1D.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/inc/MantidDataObjects/MDBin.h b/Framework/DataObjects/inc/MantidDataObjects/MDBin.h index c6e59f13d750d82adc19e7354bfbf11cb42e3d0b..10c6ab0dc697555f5848b4ee6cb693a54e472e64 100644 --- a/Framework/DataObjects/inc/MantidDataObjects/MDBin.h +++ b/Framework/DataObjects/inc/MantidDataObjects/MDBin.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/inc/MantidDataObjects/MDBin.tcc b/Framework/DataObjects/inc/MantidDataObjects/MDBin.tcc index e9ae279f92a9b8008aeb45f7b9f4a7bfda720a87..2240231055dedc0b6a0b881b786c07450b4c2e29 100644 --- a/Framework/DataObjects/inc/MantidDataObjects/MDBin.tcc +++ b/Framework/DataObjects/inc/MantidDataObjects/MDBin.tcc @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataObjects/MDBin.h" #include "MantidKernel/System.h" diff --git a/Framework/DataObjects/inc/MantidDataObjects/MDBox.h b/Framework/DataObjects/inc/MantidDataObjects/MDBox.h index 68a99e1f131efac3ba2c95b5ef20f2d1ad136692..3b3b15b54b66008dcc8c30daae461cb41a4ef66d 100644 --- a/Framework/DataObjects/inc/MantidDataObjects/MDBox.h +++ b/Framework/DataObjects/inc/MantidDataObjects/MDBox.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -83,14 +83,14 @@ public: void setFileBacked() override; void clearFileBacked(bool loadDiskBackedData) override; //----------------------------------------------------------------------------------------------- - void saveAt(API::IBoxControllerIO *const /* */, + void saveAt(API::IBoxControllerIO *const, uint64_t /*position*/) const override; - void loadAndAddFrom(API::IBoxControllerIO *const /* */, uint64_t /*position*/, + void loadAndAddFrom(API::IBoxControllerIO *const, uint64_t /*position*/, size_t /* Size */) override; void reserveMemoryForLoad(uint64_t /* Size */) override; /**drop events data from memory but keep averages (and file-backed info) */ void clearDataFromMemory() override; - /** */ + void clear() override; uint64_t getNPoints() const override; diff --git a/Framework/DataObjects/inc/MantidDataObjects/MDBox.tcc b/Framework/DataObjects/inc/MantidDataObjects/MDBox.tcc index 06cf030da192ce9aa7c39cf6b2a0d27f0e28b189..053576a81c294bc6db0a9c12f79f20b84063dbbf 100644 --- a/Framework/DataObjects/inc/MantidDataObjects/MDBox.tcc +++ b/Framework/DataObjects/inc/MantidDataObjects/MDBox.tcc @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataObjects/MDBox.h" #include "MantidDataObjects/MDBoxSaveable.h" diff --git a/Framework/DataObjects/inc/MantidDataObjects/MDBoxBase.h b/Framework/DataObjects/inc/MantidDataObjects/MDBoxBase.h index f551613b3336ad6649021fd62304437df5d2a2b7..024530bdfe43d5ea95d8cabb23165c51df6a1f81 100644 --- a/Framework/DataObjects/inc/MantidDataObjects/MDBoxBase.h +++ b/Framework/DataObjects/inc/MantidDataObjects/MDBoxBase.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/inc/MantidDataObjects/MDBoxBase.tcc b/Framework/DataObjects/inc/MantidDataObjects/MDBoxBase.tcc index f7f55e09ae2dab9f12d8f1dc47159a8efcb7863d..cbdab69d2c3617e96d6a1d910a760d66c27cb688 100644 --- a/Framework/DataObjects/inc/MantidDataObjects/MDBoxBase.tcc +++ b/Framework/DataObjects/inc/MantidDataObjects/MDBoxBase.tcc @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataObjects/MDBoxBase.h" #include "MantidDataObjects/MDEvent.h" diff --git a/Framework/DataObjects/inc/MantidDataObjects/MDBoxFlatTree.h b/Framework/DataObjects/inc/MantidDataObjects/MDBoxFlatTree.h index db407f34e4aa6911e64f64907e23f8528c8cbba3..3527cca7f74aa0e9b07966bcf89532c9d181be79 100644 --- a/Framework/DataObjects/inc/MantidDataObjects/MDBoxFlatTree.h +++ b/Framework/DataObjects/inc/MantidDataObjects/MDBoxFlatTree.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -47,7 +47,7 @@ public: //--------------------------------------------------------------------------------------------------------------------- /// convert MDWS box structure into flat structure used for saving/loading on /// hdd - void initFlatStructure(API::IMDEventWorkspace_sptr pws, + void initFlatStructure(const API::IMDEventWorkspace_sptr &pws, const std::string &fileName); uint64_t restoreBoxTree(std::vector<API::IMDNode *> &Boxes, @@ -118,26 +118,28 @@ public: // save each experiment info into its own NeXus group within an existing // opened group static void saveExperimentInfos(::NeXus::File *const file, - API::IMDEventWorkspace_const_sptr ws); + const API::IMDEventWorkspace_const_sptr &ws); // load experiment infos, previously saved through the the saveExperimentInfo // function - static void - loadExperimentInfos(::NeXus::File *const file, const std::string &filename, - boost::shared_ptr<API::MultipleExperimentInfos> mei, - bool lazy = false); + static void loadExperimentInfos( + ::NeXus::File *const file, const std::string &filename, + const boost::shared_ptr<API::MultipleExperimentInfos> &mei, + bool lazy = false); - static void saveAffineTransformMatricies(::NeXus::File *const file, - API::IMDWorkspace_const_sptr ws); + static void + saveAffineTransformMatricies(::NeXus::File *const file, + const API::IMDWorkspace_const_sptr &ws); static void saveAffineTransformMatrix(::NeXus::File *const file, API::CoordTransform const *transform, - std::string entry_name); + const std::string &entry_name); static void saveWSGenericInfo(::NeXus::File *const file, - API::IMDWorkspace_const_sptr ws); + const API::IMDWorkspace_const_sptr &ws); }; template <typename T> -void saveMatrix(::NeXus::File *const file, std::string name, - Kernel::Matrix<T> &m, ::NeXus::NXnumtype type, std::string tag); +void saveMatrix(::NeXus::File *const file, const std::string &name, + Kernel::Matrix<T> &m, ::NeXus::NXnumtype type, + const std::string &tag); } // namespace DataObjects } // namespace Mantid \ No newline at end of file diff --git a/Framework/DataObjects/inc/MantidDataObjects/MDBoxIterator.h b/Framework/DataObjects/inc/MantidDataObjects/MDBoxIterator.h index 8a82ee2519061bbd694a2f59fac963e36c143b56..78c2cecbef32298cd09fd3c998136bacdace5839 100644 --- a/Framework/DataObjects/inc/MantidDataObjects/MDBoxIterator.h +++ b/Framework/DataObjects/inc/MantidDataObjects/MDBoxIterator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/inc/MantidDataObjects/MDBoxIterator.tcc b/Framework/DataObjects/inc/MantidDataObjects/MDBoxIterator.tcc index 5ea7bd27e87b49734c194bde13e1f7f97e096379..19f943e312dea491237bed956f52e49aeaa7150f 100644 --- a/Framework/DataObjects/inc/MantidDataObjects/MDBoxIterator.tcc +++ b/Framework/DataObjects/inc/MantidDataObjects/MDBoxIterator.tcc @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataObjects/MDBoxBase.h" #include "MantidDataObjects/MDBoxIterator.h" diff --git a/Framework/DataObjects/inc/MantidDataObjects/MDBoxSaveable.h b/Framework/DataObjects/inc/MantidDataObjects/MDBoxSaveable.h index 50e8b27fa9c4b845f4d6b29c314e7b4c7f37c9c7..7d8fcdcf0df272d0533caa3f3079f198039a8b34 100644 --- a/Framework/DataObjects/inc/MantidDataObjects/MDBoxSaveable.h +++ b/Framework/DataObjects/inc/MantidDataObjects/MDBoxSaveable.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/inc/MantidDataObjects/MDDimensionStats.h b/Framework/DataObjects/inc/MantidDataObjects/MDDimensionStats.h index 53a137cad91bed16def52320b9e430f7b12949ff..21d03f2085e9587c42ddebde1accef5f04d37073 100644 --- a/Framework/DataObjects/inc/MantidDataObjects/MDDimensionStats.h +++ b/Framework/DataObjects/inc/MantidDataObjects/MDDimensionStats.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/inc/MantidDataObjects/MDEvent.h b/Framework/DataObjects/inc/MantidDataObjects/MDEvent.h index 9504f7b2fa65a131143a53db76d861240f30e2dc..56b64903f30791324769ba97edfd4a6f5dbfe97c 100644 --- a/Framework/DataObjects/inc/MantidDataObjects/MDEvent.h +++ b/Framework/DataObjects/inc/MantidDataObjects/MDEvent.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/inc/MantidDataObjects/MDEventFactory.h b/Framework/DataObjects/inc/MantidDataObjects/MDEventFactory.h index 1db791c8034b89b6673736b41421236158ddd8a7..7981e61723243d53e5da5b053cbbb6e68283d372 100644 --- a/Framework/DataObjects/inc/MantidDataObjects/MDEventFactory.h +++ b/Framework/DataObjects/inc/MantidDataObjects/MDEventFactory.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/inc/MantidDataObjects/MDEventInserter.h b/Framework/DataObjects/inc/MantidDataObjects/MDEventInserter.h index b41b622f147646b62f902eaebad41e3447d5eab4..0f6686a2ca62f931b0cff659aeb9fb7f8aca9d4d 100644 --- a/Framework/DataObjects/inc/MantidDataObjects/MDEventInserter.h +++ b/Framework/DataObjects/inc/MantidDataObjects/MDEventInserter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/inc/MantidDataObjects/MDEventWorkspace.h b/Framework/DataObjects/inc/MantidDataObjects/MDEventWorkspace.h index d9e25022e65123cc3ff1ae4a702f5eeed817d095..d5e25bdfe834c49d81cb18debe59504abe2708e3 100644 --- a/Framework/DataObjects/inc/MantidDataObjects/MDEventWorkspace.h +++ b/Framework/DataObjects/inc/MantidDataObjects/MDEventWorkspace.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/inc/MantidDataObjects/MDEventWorkspace.tcc b/Framework/DataObjects/inc/MantidDataObjects/MDEventWorkspace.tcc index 32f9600358ccdb1db7f581ab6710907045a8b1c4..b916e103a42898577e846633e0f03eb48fa7a6e9 100644 --- a/Framework/DataObjects/inc/MantidDataObjects/MDEventWorkspace.tcc +++ b/Framework/DataObjects/inc/MantidDataObjects/MDEventWorkspace.tcc @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/ITableWorkspace.h" #include "MantidDataObjects/MDBox.h" diff --git a/Framework/DataObjects/inc/MantidDataObjects/MDFramesToSpecialCoordinateSystem.h b/Framework/DataObjects/inc/MantidDataObjects/MDFramesToSpecialCoordinateSystem.h index e6661600d8a180c6b337fd52a684529fe2813ddd..c6e9884b53da8170e4c03ef6eeaf2d93a2e5e4bf 100644 --- a/Framework/DataObjects/inc/MantidDataObjects/MDFramesToSpecialCoordinateSystem.h +++ b/Framework/DataObjects/inc/MantidDataObjects/MDFramesToSpecialCoordinateSystem.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -27,8 +27,8 @@ private: Mantid::Kernel::SpecialCoordinateSystem specialCoordinateSystem, boost::optional<Mantid::Kernel::SpecialCoordinateSystem> qFrameType) const; - bool - isUnknownFrame(Mantid::Geometry::IMDDimension_const_sptr dimension) const; + bool isUnknownFrame( + const Mantid::Geometry::IMDDimension_const_sptr &dimension) const; }; } // namespace DataObjects diff --git a/Framework/DataObjects/inc/MantidDataObjects/MDGridBox.h b/Framework/DataObjects/inc/MantidDataObjects/MDGridBox.h index 2c1a61f561f01327882335acfe6e7bfced5ce7f3..e65984529ed0e65a783a95c1c0acad81ac9eee05 100644 --- a/Framework/DataObjects/inc/MantidDataObjects/MDGridBox.h +++ b/Framework/DataObjects/inc/MantidDataObjects/MDGridBox.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -77,12 +77,12 @@ public: } /**Save the box at specific disk position using the class, respoinsible for * the file IO. */ - void saveAt(API::IBoxControllerIO *const /* */, + void saveAt(API::IBoxControllerIO *const, uint64_t /*position*/) const override { /*Not saveable */ } /**Load the box data of specified size from the disk location provided using * the class, respoinsible for the file IO. */ - void loadAndAddFrom(API::IBoxControllerIO *const /* */, uint64_t /*position*/, + void loadAndAddFrom(API::IBoxControllerIO *const, uint64_t /*position*/, size_t /* Size */) override { /*Not directly loadable */ } void reserveMemoryForLoad( diff --git a/Framework/DataObjects/inc/MantidDataObjects/MDGridBox.tcc b/Framework/DataObjects/inc/MantidDataObjects/MDGridBox.tcc index ba010e243f169a1c8a6d1450eee7da23d257b438..b217fc3bb83562474216adcb851a4c15d46a9f84 100644 --- a/Framework/DataObjects/inc/MantidDataObjects/MDGridBox.tcc +++ b/Framework/DataObjects/inc/MantidDataObjects/MDGridBox.tcc @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataObjects/MDBox.h" #include "MantidDataObjects/MDEvent.h" diff --git a/Framework/DataObjects/inc/MantidDataObjects/MDHistoWorkspace.h b/Framework/DataObjects/inc/MantidDataObjects/MDHistoWorkspace.h index 1613dde1695d46a8d4ded58556696eb16502bcf0..4271118b885f973ab3513f6bbb54c33f12dcf291 100644 --- a/Framework/DataObjects/inc/MantidDataObjects/MDHistoWorkspace.h +++ b/Framework/DataObjects/inc/MantidDataObjects/MDHistoWorkspace.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -91,7 +91,8 @@ public: const Mantid::Kernel::VMD &end, Mantid::API::MDNormalization normalize) const override; - void checkWorkspaceSize(const MDHistoWorkspace &other, std::string operation); + void checkWorkspaceSize(const MDHistoWorkspace &other, + const std::string &operation); // -------------------------------------------------------------------------------------------- MDHistoWorkspace &operator+=(const MDHistoWorkspace &b); diff --git a/Framework/DataObjects/inc/MantidDataObjects/MDHistoWorkspaceIterator.h b/Framework/DataObjects/inc/MantidDataObjects/MDHistoWorkspaceIterator.h index 7bea2657b52357eba272890d522e1a3483ffaef1..6b0bd4ee5debcad7b572334d399a0bc6bdd115de 100644 --- a/Framework/DataObjects/inc/MantidDataObjects/MDHistoWorkspaceIterator.h +++ b/Framework/DataObjects/inc/MantidDataObjects/MDHistoWorkspaceIterator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -38,7 +38,8 @@ using VecMDExtents = std::vector<MDExtentPair>; class DLLExport MDHistoWorkspaceIterator : public Mantid::API::IMDIterator { public: MDHistoWorkspaceIterator( - MDHistoWorkspace_const_sptr workspace, SkippingPolicy *skippingPolicy, + const MDHistoWorkspace_const_sptr &workspace, + SkippingPolicy *skippingPolicy, Mantid::Geometry::MDImplicitFunction *function = nullptr, size_t beginPos = 0, size_t endPos = size_t(-1)); MDHistoWorkspaceIterator( @@ -46,7 +47,7 @@ public: Mantid::Geometry::MDImplicitFunction *function = nullptr, size_t beginPos = 0, size_t endPos = size_t(-1)); MDHistoWorkspaceIterator( - MDHistoWorkspace_const_sptr workspace, + const MDHistoWorkspace_const_sptr &workspace, Mantid::Geometry::MDImplicitFunction *function = nullptr, size_t beginPos = 0, size_t endPos = size_t(-1)); MDHistoWorkspaceIterator( diff --git a/Framework/DataObjects/inc/MantidDataObjects/MDLeanEvent.h b/Framework/DataObjects/inc/MantidDataObjects/MDLeanEvent.h index eff0ce487ed0cc77761cac6f98629f776bb777af..ad93a7845b067fc2aee89be778d165b18e572c27 100644 --- a/Framework/DataObjects/inc/MantidDataObjects/MDLeanEvent.h +++ b/Framework/DataObjects/inc/MantidDataObjects/MDLeanEvent.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/inc/MantidDataObjects/MaskWorkspace.h b/Framework/DataObjects/inc/MantidDataObjects/MaskWorkspace.h index f4996b3076f439ff9adc37cd3ef0d0fe80eb8eab..590f0f050c5def9c2291277865ed56ba6b179a35 100644 --- a/Framework/DataObjects/inc/MantidDataObjects/MaskWorkspace.h +++ b/Framework/DataObjects/inc/MantidDataObjects/MaskWorkspace.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -20,9 +20,9 @@ class DLLExport MaskWorkspace : public SpecialWorkspace2D, public: MaskWorkspace() = default; MaskWorkspace(std::size_t numvectors); - MaskWorkspace(Mantid::Geometry::Instrument_const_sptr instrument, + MaskWorkspace(const Mantid::Geometry::Instrument_const_sptr &instrument, const bool includeMonitors = false); - MaskWorkspace(const API::MatrixWorkspace_const_sptr parent); + MaskWorkspace(const API::MatrixWorkspace_const_sptr &parent); /// Returns a clone of the workspace std::unique_ptr<MaskWorkspace> clone() const { diff --git a/Framework/DataObjects/inc/MantidDataObjects/MementoTableWorkspace.h b/Framework/DataObjects/inc/MantidDataObjects/MementoTableWorkspace.h index ff90723ff700277dfd9472154030ea9061e1e882..cc57d2f8a04c95b68097ab7e399019d196e51819 100644 --- a/Framework/DataObjects/inc/MantidDataObjects/MementoTableWorkspace.h +++ b/Framework/DataObjects/inc/MantidDataObjects/MementoTableWorkspace.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/Column.h" #include "MantidDataObjects/TableWorkspace.h" @@ -48,8 +48,8 @@ private: return new MementoTableWorkspace(); } - static bool expectedColumn(Mantid::API::Column_const_sptr expected, - Mantid::API::Column_const_sptr candidate); + static bool expectedColumn(const Mantid::API::Column_const_sptr &expected, + const Mantid::API::Column_const_sptr &candidate); }; } // namespace DataObjects } // namespace Mantid diff --git a/Framework/DataObjects/inc/MantidDataObjects/MortonIndex/BitInterleaving.h b/Framework/DataObjects/inc/MantidDataObjects/MortonIndex/BitInterleaving.h index 2d2a2f7e30102459a94498b17282f879a35396bb..f7e9e149d8711fc6d1a14480e12ccc435ca0bc13 100644 --- a/Framework/DataObjects/inc/MantidDataObjects/MortonIndex/BitInterleaving.h +++ b/Framework/DataObjects/inc/MantidDataObjects/MortonIndex/BitInterleaving.h @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #pragma once #include <cinttypes> diff --git a/Framework/DataObjects/inc/MantidDataObjects/MortonIndex/CoordinateConversion.h b/Framework/DataObjects/inc/MantidDataObjects/MortonIndex/CoordinateConversion.h index 1fd858b9ef37f01814cf79d9d2637b05a6782543..b92af804200259544aa1465341253e899b2c6e8d 100644 --- a/Framework/DataObjects/inc/MantidDataObjects/MortonIndex/CoordinateConversion.h +++ b/Framework/DataObjects/inc/MantidDataObjects/MortonIndex/CoordinateConversion.h @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #pragma once #include "Types.h" diff --git a/Framework/DataObjects/inc/MantidDataObjects/MortonIndex/Types.h b/Framework/DataObjects/inc/MantidDataObjects/MortonIndex/Types.h index 2a61cc9fce7e0d1c0ff554f465a77b986da22d48..875f1fa7a83a7fd7a1e622c2fe9d26cd47d57709 100644 --- a/Framework/DataObjects/inc/MantidDataObjects/MortonIndex/Types.h +++ b/Framework/DataObjects/inc/MantidDataObjects/MortonIndex/Types.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/inc/MantidDataObjects/MortonIndex/WideIntImpl.h b/Framework/DataObjects/inc/MantidDataObjects/MortonIndex/WideIntImpl.h index 31313e3657c05a51c406255901a4fdd35cc9ead8..f466dcc728b9bcc0046e637a96d6686542b45745 100644 --- a/Framework/DataObjects/inc/MantidDataObjects/MortonIndex/WideIntImpl.h +++ b/Framework/DataObjects/inc/MantidDataObjects/MortonIndex/WideIntImpl.h @@ -1,3 +1,9 @@ +// Mantid Repository : https://github.com/mantidproject/mantid +// +// Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS +// SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "WideInt.h" diff --git a/Framework/DataObjects/inc/MantidDataObjects/NoShape.h b/Framework/DataObjects/inc/MantidDataObjects/NoShape.h index 3194f966411609eb9bb0d8a0496ce3a97ff04004..d0e5ca348dc9ec058c690f884ebf247ad4e0e81c 100644 --- a/Framework/DataObjects/inc/MantidDataObjects/NoShape.h +++ b/Framework/DataObjects/inc/MantidDataObjects/NoShape.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/inc/MantidDataObjects/OffsetsWorkspace.h b/Framework/DataObjects/inc/MantidDataObjects/OffsetsWorkspace.h index fc19f82d2c4e95b9ea56210653a85d9b046b78fb..9e6418697e9f63f2e6641ada3f8e9ff784e73088 100644 --- a/Framework/DataObjects/inc/MantidDataObjects/OffsetsWorkspace.h +++ b/Framework/DataObjects/inc/MantidDataObjects/OffsetsWorkspace.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -24,7 +24,7 @@ namespace DataObjects { class DLLExport OffsetsWorkspace : public SpecialWorkspace2D { public: OffsetsWorkspace() = default; - OffsetsWorkspace(Geometry::Instrument_const_sptr inst); + OffsetsWorkspace(const Geometry::Instrument_const_sptr &inst); /// Returns a clone of the workspace std::unique_ptr<OffsetsWorkspace> clone() const { diff --git a/Framework/DataObjects/inc/MantidDataObjects/Peak.h b/Framework/DataObjects/inc/MantidDataObjects/Peak.h index c0d1a01e08519c858b50ec85bf9b2f1e43dd71f4..22bf77ca23869b025f29ffa6895154215c47ab57 100644 --- a/Framework/DataObjects/inc/MantidDataObjects/Peak.h +++ b/Framework/DataObjects/inc/MantidDataObjects/Peak.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/inc/MantidDataObjects/PeakColumn.h b/Framework/DataObjects/inc/MantidDataObjects/PeakColumn.h index f3895ebbeacd1b6527254534a5fb961ed46724d8..c9e4024f8b9b90527ebc35926faba7db73bd2eb0 100644 --- a/Framework/DataObjects/inc/MantidDataObjects/PeakColumn.h +++ b/Framework/DataObjects/inc/MantidDataObjects/PeakColumn.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/inc/MantidDataObjects/PeakNoShapeFactory.h b/Framework/DataObjects/inc/MantidDataObjects/PeakNoShapeFactory.h index 2d9c564a9fd1b376f65b1e157eafe6de0cc3d845..b00a1d32cf6b893747afa91433b919336693333b 100644 --- a/Framework/DataObjects/inc/MantidDataObjects/PeakNoShapeFactory.h +++ b/Framework/DataObjects/inc/MantidDataObjects/PeakNoShapeFactory.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/inc/MantidDataObjects/PeakShapeBase.h b/Framework/DataObjects/inc/MantidDataObjects/PeakShapeBase.h index 74dd0faabe916fc8e7851ea18b453cf861ef1d7d..32ddda1f8d85be8c6fc7df661dbb57baf63ce0f8 100644 --- a/Framework/DataObjects/inc/MantidDataObjects/PeakShapeBase.h +++ b/Framework/DataObjects/inc/MantidDataObjects/PeakShapeBase.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/inc/MantidDataObjects/PeakShapeEllipsoid.h b/Framework/DataObjects/inc/MantidDataObjects/PeakShapeEllipsoid.h index d9665a824a8efc937cb9bf201e24f249e3cdb192..e208a7307ef048cd795cdc98678a5ebc3b4ab23a 100644 --- a/Framework/DataObjects/inc/MantidDataObjects/PeakShapeEllipsoid.h +++ b/Framework/DataObjects/inc/MantidDataObjects/PeakShapeEllipsoid.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/inc/MantidDataObjects/PeakShapeEllipsoidFactory.h b/Framework/DataObjects/inc/MantidDataObjects/PeakShapeEllipsoidFactory.h index 7ec54e891eefd133f7b6a8a47b779cae607b7a6e..7d88c522faebb83fb1929f1ede59353dce5bc5c5 100644 --- a/Framework/DataObjects/inc/MantidDataObjects/PeakShapeEllipsoidFactory.h +++ b/Framework/DataObjects/inc/MantidDataObjects/PeakShapeEllipsoidFactory.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/inc/MantidDataObjects/PeakShapeFactory.h b/Framework/DataObjects/inc/MantidDataObjects/PeakShapeFactory.h index f4b281a6377f8019f40358bf90a0928c2181332b..7ed74548c4c5ef132c65265b645744acd665342f 100644 --- a/Framework/DataObjects/inc/MantidDataObjects/PeakShapeFactory.h +++ b/Framework/DataObjects/inc/MantidDataObjects/PeakShapeFactory.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/inc/MantidDataObjects/PeakShapeSpherical.h b/Framework/DataObjects/inc/MantidDataObjects/PeakShapeSpherical.h index 4a0dda1ae2084b2e2e7ea700b36f7090f50780db..fbc6037bd5e65525f37906d1aebd0f2503c8345f 100644 --- a/Framework/DataObjects/inc/MantidDataObjects/PeakShapeSpherical.h +++ b/Framework/DataObjects/inc/MantidDataObjects/PeakShapeSpherical.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/inc/MantidDataObjects/PeakShapeSphericalFactory.h b/Framework/DataObjects/inc/MantidDataObjects/PeakShapeSphericalFactory.h index c86134567f8d64e80248871e3afb1a59a68c0ecf..de46364ac3490213d287b2e6c6d879dba8a33ac7 100644 --- a/Framework/DataObjects/inc/MantidDataObjects/PeakShapeSphericalFactory.h +++ b/Framework/DataObjects/inc/MantidDataObjects/PeakShapeSphericalFactory.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/inc/MantidDataObjects/PeaksWorkspace.h b/Framework/DataObjects/inc/MantidDataObjects/PeaksWorkspace.h index ecc9f8d0dd8bcd5c9ee6d6befc0e5eef82086d44..cd8c9922460c06bf1e50ab2b22c9c3cf770a5378 100644 --- a/Framework/DataObjects/inc/MantidDataObjects/PeaksWorkspace.h +++ b/Framework/DataObjects/inc/MantidDataObjects/PeaksWorkspace.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/inc/MantidDataObjects/PrecompiledHeader.h b/Framework/DataObjects/inc/MantidDataObjects/PrecompiledHeader.h index 14081f94966d15d6e326796df01bfd49eb5ef84b..eca45f28eb3d6ba80e69ffdeff3c923324d80b52 100644 --- a/Framework/DataObjects/inc/MantidDataObjects/PrecompiledHeader.h +++ b/Framework/DataObjects/inc/MantidDataObjects/PrecompiledHeader.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/inc/MantidDataObjects/RebinnedOutput.h b/Framework/DataObjects/inc/MantidDataObjects/RebinnedOutput.h index ba52e57e7fc280200674b560fa4d0fbcbdcb9d18..a0ef1cf087f9d6d5378267ae1178e797906fee54 100644 --- a/Framework/DataObjects/inc/MantidDataObjects/RebinnedOutput.h +++ b/Framework/DataObjects/inc/MantidDataObjects/RebinnedOutput.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/inc/MantidDataObjects/ReflectometryTransform.h b/Framework/DataObjects/inc/MantidDataObjects/ReflectometryTransform.h index 409b1821cb5c25f316a49605528b914047e269de..5a80a5b485e857d69f9c61d08e4e840125ac1848 100644 --- a/Framework/DataObjects/inc/MantidDataObjects/ReflectometryTransform.h +++ b/Framework/DataObjects/inc/MantidDataObjects/ReflectometryTransform.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -58,29 +58,30 @@ protected: mutable std::vector<double> m_thetaWidths; boost::shared_ptr<DataObjects::MDEventWorkspace2Lean> - createMDWorkspace(Geometry::IMDDimension_sptr, Geometry::IMDDimension_sptr, - API::BoxController_sptr boxController) const; + createMDWorkspace(const Geometry::IMDDimension_sptr &, + const Geometry::IMDDimension_sptr &, + const API::BoxController_sptr &boxController) const; public: // Execute the strategy to produce a transformed, output MDWorkspace Mantid::API::IMDEventWorkspace_sptr - executeMD(Mantid::API::MatrixWorkspace_const_sptr inputWs, - Mantid::API::BoxController_sptr boxController, + executeMD(const Mantid::API::MatrixWorkspace_const_sptr &inputWs, + const Mantid::API::BoxController_sptr &boxController, Mantid::Geometry::MDFrame_uptr frame) const; // Execute the strategy to produce a transformed, output group of Matrix (2D) // Workspaces Mantid::API::MatrixWorkspace_sptr - execute(Mantid::API::MatrixWorkspace_const_sptr inputWs) const; + execute(const Mantid::API::MatrixWorkspace_const_sptr &inputWs) const; /// Execuate transformation using normalised polynomial binning Mantid::API::MatrixWorkspace_sptr executeNormPoly( const Mantid::API::MatrixWorkspace_const_sptr &inputWS, boost::shared_ptr<Mantid::DataObjects::TableWorkspace> &vertexes, - bool dumpVertexes, std::string outputDimensions) const; + bool dumpVertexes, const std::string &outputDimensions) const; - Mantid::API::IMDHistoWorkspace_sptr - executeMDNormPoly(Mantid::API::MatrixWorkspace_const_sptr inputWs) const; + Mantid::API::IMDHistoWorkspace_sptr executeMDNormPoly( + const Mantid::API::MatrixWorkspace_const_sptr &inputWs) const; virtual ~ReflectometryTransform() = default; ReflectometryTransform(const std::string &d0Label, const std::string &d0ID, double d0Min, double d0Max, const std::string &d1Label, diff --git a/Framework/DataObjects/inc/MantidDataObjects/ScanningWorkspaceBuilder.h b/Framework/DataObjects/inc/MantidDataObjects/ScanningWorkspaceBuilder.h index 84798e6ba9ce8114f18667189c8a9707068bd8f2..ce4ad566de80dd0c9de1ab69ba43858cdcaa1205 100644 --- a/Framework/DataObjects/inc/MantidDataObjects/ScanningWorkspaceBuilder.h +++ b/Framework/DataObjects/inc/MantidDataObjects/ScanningWorkspaceBuilder.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/inc/MantidDataObjects/SkippingPolicy.h b/Framework/DataObjects/inc/MantidDataObjects/SkippingPolicy.h index 1ad13e25735ece618b7aa8e3437c4aa23334d8a5..c23d709f58b9ab587a6bc7f2c7d728b1e986929a 100644 --- a/Framework/DataObjects/inc/MantidDataObjects/SkippingPolicy.h +++ b/Framework/DataObjects/inc/MantidDataObjects/SkippingPolicy.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/inc/MantidDataObjects/SpecialWorkspace2D.h b/Framework/DataObjects/inc/MantidDataObjects/SpecialWorkspace2D.h index fac0d0c92594a367166b36af5b7c21d476d2ab4b..a27600d5cd9fdb73ade236179c0a4c7f698f5eee 100644 --- a/Framework/DataObjects/inc/MantidDataObjects/SpecialWorkspace2D.h +++ b/Framework/DataObjects/inc/MantidDataObjects/SpecialWorkspace2D.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -31,9 +31,9 @@ public: class DLLExport SpecialWorkspace2D : public Workspace2D { public: SpecialWorkspace2D() = default; - SpecialWorkspace2D(Geometry::Instrument_const_sptr inst, + SpecialWorkspace2D(const Geometry::Instrument_const_sptr &inst, const bool includeMonitors = false); - SpecialWorkspace2D(API::MatrixWorkspace_const_sptr parent); + SpecialWorkspace2D(const API::MatrixWorkspace_const_sptr &parent); /// Returns a clone of the workspace std::unique_ptr<SpecialWorkspace2D> clone() const { @@ -73,7 +73,7 @@ private: SpecialWorkspace2D *doCloneEmpty() const override { return new SpecialWorkspace2D(); } - bool isCompatible(boost::shared_ptr<const SpecialWorkspace2D> ws); + bool isCompatible(const boost::shared_ptr<const SpecialWorkspace2D> &ws); protected: /// Protected copy constructor. May be used by childs for cloning. @@ -86,9 +86,9 @@ protected: /// Return human-readable string const std::string toString() const override; - void binaryAND(boost::shared_ptr<const SpecialWorkspace2D> ws); - void binaryOR(boost::shared_ptr<const SpecialWorkspace2D> ws); - void binaryXOR(boost::shared_ptr<const SpecialWorkspace2D> ws); + void binaryAND(const boost::shared_ptr<const SpecialWorkspace2D> &ws); + void binaryOR(const boost::shared_ptr<const SpecialWorkspace2D> &ws); + void binaryXOR(const boost::shared_ptr<const SpecialWorkspace2D> &ws); void binaryNOT(); /// Map with key = detector ID, and value = workspace index. diff --git a/Framework/DataObjects/inc/MantidDataObjects/SplittersWorkspace.h b/Framework/DataObjects/inc/MantidDataObjects/SplittersWorkspace.h index 1c74bb83b216e5aeda7ac7e8e538303e20c5809d..16dd0d692ac951839e4e3b6ad34957e6863470d7 100644 --- a/Framework/DataObjects/inc/MantidDataObjects/SplittersWorkspace.h +++ b/Framework/DataObjects/inc/MantidDataObjects/SplittersWorkspace.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/inc/MantidDataObjects/TableColumn.h b/Framework/DataObjects/inc/MantidDataObjects/TableColumn.h index e7519ec8a726c03c94c360ae462602a57f838ba0..3a9ab90425009e934f9872764dbed5af69a59863 100644 --- a/Framework/DataObjects/inc/MantidDataObjects/TableColumn.h +++ b/Framework/DataObjects/inc/MantidDataObjects/TableColumn.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -556,7 +556,7 @@ public: /** Constructor @param c :: Shared pointer to a column */ - TableColumn_ptr(boost::shared_ptr<API::Column> c) + TableColumn_ptr(const boost::shared_ptr<API::Column> &c) : TableColumn_ptr<API::Boolean>(c) { if (!this->get()) { std::string str = "Data type of column " + c->name() + diff --git a/Framework/DataObjects/inc/MantidDataObjects/TableWorkspace.h b/Framework/DataObjects/inc/MantidDataObjects/TableWorkspace.h index 6b2d539b7173de101221033c0833ca2a197c9f97..026ccd6688f9659566560ea4250493c061c4bae5 100644 --- a/Framework/DataObjects/inc/MantidDataObjects/TableWorkspace.h +++ b/Framework/DataObjects/inc/MantidDataObjects/TableWorkspace.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -17,6 +17,21 @@ #include "MantidKernel/V3D.h" #include <boost/shared_ptr.hpp> #include <boost/tuple/tuple.hpp> +#include <utility> + +#include <utility> + +#include <utility> + +#include <utility> + +#include <utility> + +#include <utility> + +#include <utility> + +#include <utility> namespace Mantid { @@ -321,7 +336,7 @@ private: } } - void addColumn(boost::shared_ptr<API::Column> column); + void addColumn(const boost::shared_ptr<API::Column> &column); /** This method finds the row and column index of an integer cell value in a * table workspace @@ -339,7 +354,9 @@ private: * @param col column number of the value searched */ virtual void find(std::string value, size_t &row, size_t &col) { - findValue(value, row, col); + findValue(std::move(std::move(std::move(std::move( + std::move(std::move(std::move(std::move(value)))))))), + row, col); } /** This method finds the row and column index of an float value in a table * workspace diff --git a/Framework/DataObjects/inc/MantidDataObjects/VectorColumn.h b/Framework/DataObjects/inc/MantidDataObjects/VectorColumn.h index e99dc5bc8f9854c7b7073831eef070a07e7709a5..d3d8bbdd3d50c65baa0e42d6be86fcaac313b8ed 100644 --- a/Framework/DataObjects/inc/MantidDataObjects/VectorColumn.h +++ b/Framework/DataObjects/inc/MantidDataObjects/VectorColumn.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/inc/MantidDataObjects/Workspace2D.h b/Framework/DataObjects/inc/MantidDataObjects/Workspace2D.h index 2848ecb7d5e86b34cc1d6e545d30b37dd15a0a84..6dc256f713fb6d7084af04765e87a02514c048af 100644 --- a/Framework/DataObjects/inc/MantidDataObjects/Workspace2D.h +++ b/Framework/DataObjects/inc/MantidDataObjects/Workspace2D.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/inc/MantidDataObjects/WorkspaceCreation.h b/Framework/DataObjects/inc/MantidDataObjects/WorkspaceCreation.h index 913858c51e9f472857d481389c649f626bcf606b..679b81bc968bad8d4a8e83aaf24619ee124043d0 100644 --- a/Framework/DataObjects/inc/MantidDataObjects/WorkspaceCreation.h +++ b/Framework/DataObjects/inc/MantidDataObjects/WorkspaceCreation.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/inc/MantidDataObjects/WorkspaceSingleValue.h b/Framework/DataObjects/inc/MantidDataObjects/WorkspaceSingleValue.h index 60d4d59ab46a0c40a887d0578421834db9e1348b..ed7d506aa646d6a6fc490bdc398206ed01836587 100644 --- a/Framework/DataObjects/inc/MantidDataObjects/WorkspaceSingleValue.h +++ b/Framework/DataObjects/inc/MantidDataObjects/WorkspaceSingleValue.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/scripts/analysis.py b/Framework/DataObjects/scripts/analysis.py index aac17f53c2a2274bfe4293beb79d9a720fdf50aa..0f00fb2e3bc5ebad1e495c0af67c3ff17f22579e 100644 --- a/Framework/DataObjects/scripts/analysis.py +++ b/Framework/DataObjects/scripts/analysis.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + """Analysis of results from mdevents_optimize.py and others diff --git a/Framework/DataObjects/src/AffineMatrixParameter.cpp b/Framework/DataObjects/src/AffineMatrixParameter.cpp index 130f4d1ca519d773c76af709b85e03f0377068d6..5cc5b9c7b5cb928866d69678986fe7c37a431668 100644 --- a/Framework/DataObjects/src/AffineMatrixParameter.cpp +++ b/Framework/DataObjects/src/AffineMatrixParameter.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataObjects/AffineMatrixParameter.h" @@ -162,7 +162,7 @@ AffineMatrixParameter::AffineMatrixParameter(const AffineMatrixParameter &other) * * @param newMatrix : new matrix to use. */ -void AffineMatrixParameter::setMatrix(const AffineMatrixType newMatrix) { +void AffineMatrixParameter::setMatrix(const AffineMatrixType &newMatrix) { if (newMatrix.numRows() != this->m_affineMatrix.numRows()) throw std::runtime_error("setMatrix(): Number of rows must match!"); if (newMatrix.numCols() != this->m_affineMatrix.numCols()) diff --git a/Framework/DataObjects/src/AffineMatrixParameterParser.cpp b/Framework/DataObjects/src/AffineMatrixParameterParser.cpp index c3abb1a7637ba42eb142c2ab9a9cd24f2b695f7e..a70fb2b504fca09d343522157f79ed197222d9cc 100644 --- a/Framework/DataObjects/src/AffineMatrixParameterParser.cpp +++ b/Framework/DataObjects/src/AffineMatrixParameterParser.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataObjects/AffineMatrixParameterParser.h" #include <boost/algorithm/string.hpp> diff --git a/Framework/DataObjects/src/BoxControllerNeXusIO.cpp b/Framework/DataObjects/src/BoxControllerNeXusIO.cpp index 1530f6bea4d0558ea9511184ae0952d660c2cf2c..25d6f75416e3bd7f704a4561914190c9113d53f8 100644 --- a/Framework/DataObjects/src/BoxControllerNeXusIO.cpp +++ b/Framework/DataObjects/src/BoxControllerNeXusIO.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataObjects/BoxControllerNeXusIO.h" @@ -48,7 +48,7 @@ BoxControllerNeXusIO::BoxControllerNeXusIO(API::BoxController *const bc) /**get event type form its string representation*/ BoxControllerNeXusIO::EventType BoxControllerNeXusIO::TypeFromString( const std::vector<std::string> &typesSupported, - const std::string typeName) { + const std::string &typeName) { auto it = std::find(typesSupported.begin(), typesSupported.end(), typeName); if (it == typesSupported.end()) throw std::invalid_argument("Unsupported event type: " + typeName + diff --git a/Framework/DataObjects/src/CoordTransformAffine.cpp b/Framework/DataObjects/src/CoordTransformAffine.cpp index cf2a180cfd73c11caf28c2f4a93f45b7e9b2a453..f9037dd63ac5b5f5c7982e331c749779d189c3dc 100644 --- a/Framework/DataObjects/src/CoordTransformAffine.cpp +++ b/Framework/DataObjects/src/CoordTransformAffine.cpp @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #include "MantidDataObjects/CoordTransformAffine.h" #include "MantidAPI/CoordTransform.h" #include "MantidDataObjects/CoordTransformAligned.h" diff --git a/Framework/DataObjects/src/CoordTransformAffineParser.cpp b/Framework/DataObjects/src/CoordTransformAffineParser.cpp index 14ceca9d1e95589bdc5dcf90bbb88376bf0ff8af..a632b1bf3b6bcaf4ab629c660c50f9144a2e347c 100644 --- a/Framework/DataObjects/src/CoordTransformAffineParser.cpp +++ b/Framework/DataObjects/src/CoordTransformAffineParser.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataObjects/CoordTransformAffineParser.h" #include "MantidAPI/CoordTransform.h" diff --git a/Framework/DataObjects/src/CoordTransformAligned.cpp b/Framework/DataObjects/src/CoordTransformAligned.cpp index 8df6a99239ac8b5e3d92a22dd21264401978447e..ed684dbacd07feea3834faaab3370381c0855ec7 100644 --- a/Framework/DataObjects/src/CoordTransformAligned.cpp +++ b/Framework/DataObjects/src/CoordTransformAligned.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataObjects/CoordTransformAligned.h" #include "MantidKernel/Matrix.h" diff --git a/Framework/DataObjects/src/CoordTransformDistance.cpp b/Framework/DataObjects/src/CoordTransformDistance.cpp index 397359b78671a9d7677988c02d510004dcfbb14b..9a5452d8acc8720cb0d766803c139a7ebbe56ab6 100644 --- a/Framework/DataObjects/src/CoordTransformDistance.cpp +++ b/Framework/DataObjects/src/CoordTransformDistance.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataObjects/CoordTransformDistance.h" #include "MantidAPI/CoordTransform.h" diff --git a/Framework/DataObjects/src/CoordTransformDistanceParser.cpp b/Framework/DataObjects/src/CoordTransformDistanceParser.cpp index 29971d445cbe2a1c97b93a49336a339831a4c801..b7022dfef75a9d648715dc481959cfd412540141 100644 --- a/Framework/DataObjects/src/CoordTransformDistanceParser.cpp +++ b/Framework/DataObjects/src/CoordTransformDistanceParser.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataObjects/CoordTransformDistanceParser.h" #include "MantidAPI/SingleValueParameterParser.h" diff --git a/Framework/DataObjects/src/EventList.cpp b/Framework/DataObjects/src/EventList.cpp index 67cc33071c8517dba978a6e31cefd2e8ff2ec1ae..918f0d08e849259247c968e22a15c7630ec892e7 100644 --- a/Framework/DataObjects/src/EventList.cpp +++ b/Framework/DataObjects/src/EventList.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataObjects/EventList.h" #include "MantidAPI/MatrixWorkspace.h" @@ -2555,7 +2555,7 @@ void EventList::convertTof(std::function<double(double)> func, */ template <class T> void EventList::convertTofHelper(std::vector<T> &events, - std::function<double(double)> func) { + const std::function<double(double)> &func) { // iterate through all events for (auto &ev : events) ev.m_tof = func(ev.m_tof); diff --git a/Framework/DataObjects/src/EventWorkspace.cpp b/Framework/DataObjects/src/EventWorkspace.cpp index d72a508cad6a177b5b4186c21de331e5bf545092..c7e018571dc4aea257af4c8466cff354d90c93d4 100644 --- a/Framework/DataObjects/src/EventWorkspace.cpp +++ b/Framework/DataObjects/src/EventWorkspace.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataObjects/EventWorkspace.h" #include "MantidAPI/Algorithm.h" diff --git a/Framework/DataObjects/src/EventWorkspaceHelpers.cpp b/Framework/DataObjects/src/EventWorkspaceHelpers.cpp index 05e865264ed5dd97b34e8e973fc6efeb17f4669b..edcc382d398d66eb02bd9c5d08facbf135ee1e06 100644 --- a/Framework/DataObjects/src/EventWorkspaceHelpers.cpp +++ b/Framework/DataObjects/src/EventWorkspaceHelpers.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataObjects/EventWorkspaceHelpers.h" #include "MantidAPI/AnalysisDataService.h" @@ -20,8 +20,8 @@ namespace DataObjects { * @param inputMatrixW :: input event workspace * @return a MatrixWorkspace_sptr */ -MatrixWorkspace_sptr -EventWorkspaceHelpers::convertEventTo2D(MatrixWorkspace_sptr inputMatrixW) { +MatrixWorkspace_sptr EventWorkspaceHelpers::convertEventTo2D( + const MatrixWorkspace_sptr &inputMatrixW) { EventWorkspace_sptr inputW = boost::dynamic_pointer_cast<EventWorkspace>(inputMatrixW); if (!inputW) diff --git a/Framework/DataObjects/src/EventWorkspaceMRU.cpp b/Framework/DataObjects/src/EventWorkspaceMRU.cpp index 7bfbcb82c215959d08f1620dcaa961ee50ea0941..a3ba7b924caca84d0422782ba296d5cd873b663c 100644 --- a/Framework/DataObjects/src/EventWorkspaceMRU.cpp +++ b/Framework/DataObjects/src/EventWorkspaceMRU.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataObjects/EventWorkspaceMRU.h" #include "MantidKernel/System.h" diff --git a/Framework/DataObjects/src/Events.cpp b/Framework/DataObjects/src/Events.cpp index 0643d95b0c1e6b35da632f01a993a63919059f8d..05fff8adcd70229f81c24c936df0ac6452c0203c 100644 --- a/Framework/DataObjects/src/Events.cpp +++ b/Framework/DataObjects/src/Events.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataObjects/Events.h" #include "MantidAPI/MatrixWorkspace.h" diff --git a/Framework/DataObjects/src/FakeMD.cpp b/Framework/DataObjects/src/FakeMD.cpp index fc020653d2a5c60e2662cf837ae64c64325fc4b4..bd3ffa4ae22199f46953d644fb216a2845733721 100644 --- a/Framework/DataObjects/src/FakeMD.cpp +++ b/Framework/DataObjects/src/FakeMD.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //-------------------------------------------------------------------------------------------------- // Includes @@ -49,7 +49,7 @@ FakeMD::FakeMD(const std::vector<double> &uniformParams, * @param workspace A pointer to MD event workspace to fill using the object * parameters */ -void FakeMD::fill(API::IMDEventWorkspace_sptr workspace) { +void FakeMD::fill(const API::IMDEventWorkspace_sptr &workspace) { setupDetectorCache(*workspace); CALL_MDEVENT_FUNCTION(this->addFakePeak, workspace) diff --git a/Framework/DataObjects/src/FractionalRebinning.cpp b/Framework/DataObjects/src/FractionalRebinning.cpp index 3064644bf89025447f3f597f81f79af207f2ed01..0b5aee3aec784ae5146cafddbe061e8f30821125 100644 --- a/Framework/DataObjects/src/FractionalRebinning.cpp +++ b/Framework/DataObjects/src/FractionalRebinning.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataObjects/FractionalRebinning.h" @@ -495,8 +495,9 @@ void calcGeneralIntersections(const std::vector<double> &xAxis, * @param inputWS The input workspace used for testing distribution state * @param progress An optional progress object. Reported to once per bin. */ -void normaliseOutput(MatrixWorkspace_sptr outputWS, - MatrixWorkspace_const_sptr inputWS, Progress *progress) { +void normaliseOutput(const MatrixWorkspace_sptr &outputWS, + const MatrixWorkspace_const_sptr &inputWS, + Progress *progress) { const bool removeBinWidth(inputWS->isDistribution() && outputWS->id() != "RebinnedOutput"); for (size_t i = 0; i < outputWS->getNumberHistograms(); ++i) { @@ -608,7 +609,7 @@ void rebinToFractionalOutput(const Quadrilateral &inputQ, RebinnedOutput &outputWS, const std::vector<double> &verticalAxis, const RebinnedOutput_const_sptr &inputRB) { - const auto &inX = inputWS->x(i); + const auto &inX = inputWS->binEdges(i); const auto &inY = inputWS->y(i); const auto &inE = inputWS->e(i); double signal = inY[j]; diff --git a/Framework/DataObjects/src/GroupingWorkspace.cpp b/Framework/DataObjects/src/GroupingWorkspace.cpp index 8efee827fc1aa5afcb7edf0c2e8b5b58f3be9f97..ee76a32caaa78a62e39e56d0befc47027b115131 100644 --- a/Framework/DataObjects/src/GroupingWorkspace.cpp +++ b/Framework/DataObjects/src/GroupingWorkspace.cpp @@ -1,12 +1,14 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + -#include "MantidDataObjects/GroupingWorkspace.h" +#include <utility> + #include "MantidAPI/SpectraAxis.h" #include "MantidAPI/WorkspaceFactory.h" +#include "MantidDataObjects/GroupingWorkspace.h" #include "MantidKernel/IPropertyManager.h" #include "MantidKernel/System.h" @@ -33,8 +35,9 @@ GroupingWorkspace::GroupingWorkspace(size_t numvectors) { * @param inst :: input instrument that is the base for this workspace * @return created GroupingWorkspace */ -GroupingWorkspace::GroupingWorkspace(Geometry::Instrument_const_sptr inst) - : SpecialWorkspace2D(inst) {} +GroupingWorkspace::GroupingWorkspace( + const Geometry::Instrument_const_sptr &inst) + : SpecialWorkspace2D(std::move(inst)) {} //---------------------------------------------------------------------------------------------- /** Fill a map with key = detector ID, value = group number diff --git a/Framework/DataObjects/src/Histogram1D.cpp b/Framework/DataObjects/src/Histogram1D.cpp index 8c36c5c9e91536812aee2e0f26ce0c057735ce7c..c93c7162957c5cf4b08b774f4e5f84d0f2de9688 100644 --- a/Framework/DataObjects/src/Histogram1D.cpp +++ b/Framework/DataObjects/src/Histogram1D.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataObjects/Histogram1D.h" #include "MantidKernel/Exception.h" diff --git a/Framework/DataObjects/src/MDBoxFlatTree.cpp b/Framework/DataObjects/src/MDBoxFlatTree.cpp index 39cbc17a62ebadbf39b0094a6c8d40332f45130a..7984ef15c55648e66a3bd5056ff76f7d1501e6b9 100644 --- a/Framework/DataObjects/src/MDBoxFlatTree.cpp +++ b/Framework/DataObjects/src/MDBoxFlatTree.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataObjects/MDBoxFlatTree.h" #include "MantidAPI/BoxController.h" @@ -14,6 +14,8 @@ #include "MantidKernel/Strings.h" #include <Poco/File.h> +#include <utility> + using file_holder_type = std::unique_ptr<::NeXus::File>; namespace Mantid { @@ -33,7 +35,7 @@ MDBoxFlatTree::MDBoxFlatTree() : m_nDim(-1) {} * @param fileName -- the name of the file, where this structure should be *written. TODO: It is here for the case of file based workspaces */ -void MDBoxFlatTree::initFlatStructure(API::IMDEventWorkspace_sptr pws, +void MDBoxFlatTree::initFlatStructure(const API::IMDEventWorkspace_sptr &pws, const std::string &fileName) { m_bcXMLDescr = pws->getBoxController()->toXMLString(); m_FileName = fileName; @@ -353,8 +355,8 @@ void MDBoxFlatTree::loadBoxStructure(::NeXus::File *hFile, bool onlyEventInfo) { *@param ws -- the shared pointer to the workspace with experiment infos to *write. */ -void MDBoxFlatTree::saveExperimentInfos(::NeXus::File *const file, - API::IMDEventWorkspace_const_sptr ws) { +void MDBoxFlatTree::saveExperimentInfos( + ::NeXus::File *const file, const API::IMDEventWorkspace_const_sptr &ws) { std::map<std::string, std::string> entries; file->getEntries(entries); @@ -406,7 +408,8 @@ void MDBoxFlatTree::saveExperimentInfos(::NeXus::File *const file, */ void MDBoxFlatTree::loadExperimentInfos( ::NeXus::File *const file, const std::string &filename, - boost::shared_ptr<Mantid::API::MultipleExperimentInfos> mei, bool lazy) { + const boost::shared_ptr<Mantid::API::MultipleExperimentInfos> &mei, + bool lazy) { // First, find how many experimentX blocks there are std::map<std::string, std::string> entries; file->getEntries(entries); @@ -748,7 +751,7 @@ MDBoxFlatTree::createOrOpenMDWSgroup(const std::string &fileName, int &nDims, /**Save workspace generic info like dimension structure, history, title * dimensions etc.*/ void MDBoxFlatTree::saveWSGenericInfo(::NeXus::File *const file, - API::IMDWorkspace_const_sptr ws) { + const API::IMDWorkspace_const_sptr &ws) { // Write out the coordinate system file->writeData("coordinate_system", static_cast<uint32_t>(ws->getSpecialCoordinateSystem())); @@ -794,7 +797,7 @@ void MDBoxFlatTree::saveWSGenericInfo(::NeXus::File *const file, * @param ws : workspace to get matrix from */ void MDBoxFlatTree::saveAffineTransformMatricies( - ::NeXus::File *const file, API::IMDWorkspace_const_sptr ws) { + ::NeXus::File *const file, const API::IMDWorkspace_const_sptr &ws) { try { saveAffineTransformMatrix(file, ws->getTransformToOriginal(), "transform_to_orig"); @@ -816,12 +819,12 @@ void MDBoxFlatTree::saveAffineTransformMatricies( */ void MDBoxFlatTree::saveAffineTransformMatrix( ::NeXus::File *const file, API::CoordTransform const *transform, - std::string entry_name) { + const std::string &entry_name) { if (!transform) return; Kernel::Matrix<coord_t> matrix = transform->makeAffineMatrix(); g_log.debug() << "TRFM: " << matrix.str() << '\n'; - saveMatrix<coord_t>(file, entry_name, matrix, ::NeXus::FLOAT32, + saveMatrix<coord_t>(file, std::move(entry_name), matrix, ::NeXus::FLOAT32, transform->id()); } @@ -834,9 +837,9 @@ void MDBoxFlatTree::saveAffineTransformMatrix( * @param tag : id for an affine matrix conversion */ template <typename T> -void saveMatrix(::NeXus::File *const file, std::string name, +void saveMatrix(::NeXus::File *const file, const std::string &name, Kernel::Matrix<T> &m, ::NeXus::NXnumtype type, - std::string tag) { + const std::string &tag) { std::vector<T> v = m.getVector(); // Number of data points auto nPoints = static_cast<int>(v.size()); diff --git a/Framework/DataObjects/src/MDBoxSaveable.cpp b/Framework/DataObjects/src/MDBoxSaveable.cpp index 7d8c5d4eb680e2ac817361c89205d65730e7b7f4..1ec6c8b2f06cd0b7467736beba95e81fa401be25 100644 --- a/Framework/DataObjects/src/MDBoxSaveable.cpp +++ b/Framework/DataObjects/src/MDBoxSaveable.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataObjects/MDBoxSaveable.h" #include "MantidDataObjects/MDBox.h" diff --git a/Framework/DataObjects/src/MDEventFactory.cpp b/Framework/DataObjects/src/MDEventFactory.cpp index 13b66fd882a69c95919341ccec48c9873eb30e77..be8c09660a851be3ead86b8d5e33c8a8149fa422 100644 --- a/Framework/DataObjects/src/MDEventFactory.cpp +++ b/Framework/DataObjects/src/MDEventFactory.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataObjects/MDEventFactory.h" #include "MantidAPI/IMDEventWorkspace.h" diff --git a/Framework/DataObjects/src/MDFramesToSpecialCoordinateSystem.cpp b/Framework/DataObjects/src/MDFramesToSpecialCoordinateSystem.cpp index dd310f765a362d76ad55ad6dc2a6ea4ea8560b50..2f1fd3fe91c0cee5e1e1f126145c902e9af1098d 100644 --- a/Framework/DataObjects/src/MDFramesToSpecialCoordinateSystem.cpp +++ b/Framework/DataObjects/src/MDFramesToSpecialCoordinateSystem.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataObjects/MDFramesToSpecialCoordinateSystem.h" #include "MantidAPI/IMDEventWorkspace.h" @@ -92,7 +92,7 @@ void MDFramesToSpecialCoordinateSystem::checkQCompatibility( * @returns true if the MDFrame is of UnknownFrame type. */ bool MDFramesToSpecialCoordinateSystem::isUnknownFrame( - Mantid::Geometry::IMDDimension_const_sptr dimension) const { + const Mantid::Geometry::IMDDimension_const_sptr &dimension) const { Mantid::Geometry::MDFrame_uptr replica(dimension->getMDFrame().clone()); auto isUnknown = false; if (dynamic_cast<Mantid::Geometry::UnknownFrame *>(replica.get())) { diff --git a/Framework/DataObjects/src/MDHistoWorkspace.cpp b/Framework/DataObjects/src/MDHistoWorkspace.cpp index 12beca1c71a91b1937f950e12505edb90549103b..b26d2cae3ff61712a88974828c8d130bdd127ea3 100644 --- a/Framework/DataObjects/src/MDHistoWorkspace.cpp +++ b/Framework/DataObjects/src/MDHistoWorkspace.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataObjects/MDHistoWorkspace.h" #include "MantidAPI/IMDIterator.h" @@ -737,7 +737,7 @@ MDHistoWorkspace::getBinBoundariesOnLine(const VMD &start, const VMD &end, * @throw an error if they don't match */ void MDHistoWorkspace::checkWorkspaceSize(const MDHistoWorkspace &other, - std::string operation) { + const std::string &operation) { if (other.getNumDims() != this->getNumDims()) throw std::invalid_argument("Cannot perform the " + operation + " operation on this MDHistoWorkspace. The " diff --git a/Framework/DataObjects/src/MDHistoWorkspaceIterator.cpp b/Framework/DataObjects/src/MDHistoWorkspaceIterator.cpp index f1d8a5427c76c89a48a7c3fbbf1129c733886f11..d93a52bb004c59e7f80947ae4840a1dae3d38fea 100644 --- a/Framework/DataObjects/src/MDHistoWorkspaceIterator.cpp +++ b/Framework/DataObjects/src/MDHistoWorkspaceIterator.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataObjects/MDHistoWorkspaceIterator.h" #include "MantidGeometry/MDGeometry/IMDDimension.h" @@ -90,7 +90,7 @@ namespace DataObjects { * @param endPos :: end position */ MDHistoWorkspaceIterator::MDHistoWorkspaceIterator( - MDHistoWorkspace_const_sptr workspace, + const MDHistoWorkspace_const_sptr &workspace, Mantid::Geometry::MDImplicitFunction *function, size_t beginPos, size_t endPos) : m_skippingPolicy(new SkipMaskedBins(this)) { @@ -123,7 +123,8 @@ MDHistoWorkspaceIterator::MDHistoWorkspaceIterator( * @param endPos :: End position */ MDHistoWorkspaceIterator::MDHistoWorkspaceIterator( - MDHistoWorkspace_const_sptr workspace, SkippingPolicy *skippingPolicy, + const MDHistoWorkspace_const_sptr &workspace, + SkippingPolicy *skippingPolicy, Mantid::Geometry::MDImplicitFunction *function, size_t beginPos, size_t endPos) : m_skippingPolicy(skippingPolicy) { diff --git a/Framework/DataObjects/src/MDLeanEvent.cpp b/Framework/DataObjects/src/MDLeanEvent.cpp index 5a8c79a88b2c99fc64fef87120fee26a9b7efa0a..63979b5ea5ec0d776e700ee0cdb0a1d9f0e153f1 100644 --- a/Framework/DataObjects/src/MDLeanEvent.cpp +++ b/Framework/DataObjects/src/MDLeanEvent.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataObjects/MDLeanEvent.h" #include "MantidKernel/System.h" diff --git a/Framework/DataObjects/src/MaskWorkspace.cpp b/Framework/DataObjects/src/MaskWorkspace.cpp index e65df42c1867655c074292f838662641aad783df..07944ba17974fa461c3c9e843cd23a724f9b712c 100644 --- a/Framework/DataObjects/src/MaskWorkspace.cpp +++ b/Framework/DataObjects/src/MaskWorkspace.cpp @@ -1,11 +1,13 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + -#include "MantidDataObjects/MaskWorkspace.h" +#include <utility> + #include "MantidAPI/WorkspaceFactory.h" +#include "MantidDataObjects/MaskWorkspace.h" #include "MantidGeometry/Instrument/DetectorInfo.h" #include "MantidKernel/IPropertyManager.h" #include "MantidKernel/System.h" @@ -51,9 +53,10 @@ MaskWorkspace::MaskWorkspace(std::size_t numvectors) { * workspace. * @return MaskWorkspace */ -MaskWorkspace::MaskWorkspace(Mantid::Geometry::Instrument_const_sptr instrument, - const bool includeMonitors) - : SpecialWorkspace2D(instrument, includeMonitors) { +MaskWorkspace::MaskWorkspace( + const Mantid::Geometry::Instrument_const_sptr &instrument, + const bool includeMonitors) + : SpecialWorkspace2D(std::move(instrument), includeMonitors) { this->clearMask(); } @@ -63,7 +66,7 @@ MaskWorkspace::MaskWorkspace(Mantid::Geometry::Instrument_const_sptr instrument, * It must have an instrument. * @return MaskWorkspace */ -MaskWorkspace::MaskWorkspace(const API::MatrixWorkspace_const_sptr parent) +MaskWorkspace::MaskWorkspace(const API::MatrixWorkspace_const_sptr &parent) : SpecialWorkspace2D(parent) { this->clearMask(); } diff --git a/Framework/DataObjects/src/MementoTableWorkspace.cpp b/Framework/DataObjects/src/MementoTableWorkspace.cpp index 06f64636609aea4dba97b97166a3ab17a8194b01..432172802dad8cfa6f04e3cd754514dc78a3f729 100644 --- a/Framework/DataObjects/src/MementoTableWorkspace.cpp +++ b/Framework/DataObjects/src/MementoTableWorkspace.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataObjects/MementoTableWorkspace.h" @@ -22,8 +22,8 @@ Determines whether the provided column has the same name and type as expected. @return true if all expectations are met. */ bool MementoTableWorkspace::expectedColumn( - Mantid::API::Column_const_sptr expected, - Mantid::API::Column_const_sptr candidate) { + const Mantid::API::Column_const_sptr &expected, + const Mantid::API::Column_const_sptr &candidate) { if (expected->name() != candidate->name()) { return false; } else if (expected->type() != candidate->type()) { diff --git a/Framework/DataObjects/src/NoShape.cpp b/Framework/DataObjects/src/NoShape.cpp index 05e0e110cb39920073ddc6680de4d5850a86b61e..7bdcab44b045812c2cab13a1b2493a17f3db3af4 100644 --- a/Framework/DataObjects/src/NoShape.cpp +++ b/Framework/DataObjects/src/NoShape.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataObjects/NoShape.h" #include <json/json.h> diff --git a/Framework/DataObjects/src/OffsetsWorkspace.cpp b/Framework/DataObjects/src/OffsetsWorkspace.cpp index 600ad8f15bf7174add7f2aad000c7fa217c4607d..c053f57c95ee98c28706255f3652fa96f109e611 100644 --- a/Framework/DataObjects/src/OffsetsWorkspace.cpp +++ b/Framework/DataObjects/src/OffsetsWorkspace.cpp @@ -1,12 +1,14 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + -#include "MantidDataObjects/OffsetsWorkspace.h" +#include <utility> + #include "MantidAPI/SpectraAxis.h" #include "MantidAPI/WorkspaceFactory.h" +#include "MantidDataObjects/OffsetsWorkspace.h" #include "MantidKernel/IPropertyManager.h" #include "MantidKernel/System.h" @@ -21,8 +23,8 @@ DECLARE_WORKSPACE(OffsetsWorkspace) * @param inst :: input instrument that is the base for this workspace * @return created OffsetsWorkspace */ -OffsetsWorkspace::OffsetsWorkspace(Geometry::Instrument_const_sptr inst) - : SpecialWorkspace2D(inst) {} +OffsetsWorkspace::OffsetsWorkspace(const Geometry::Instrument_const_sptr &inst) + : SpecialWorkspace2D(std::move(inst)) {} } // namespace DataObjects } // namespace Mantid diff --git a/Framework/DataObjects/src/Peak.cpp b/Framework/DataObjects/src/Peak.cpp index d6e4340ed245931cffb66de7c43ee1157066a81b..a4829a2c3c936d5c8e0733813131526e0212ac31 100644 --- a/Framework/DataObjects/src/Peak.cpp +++ b/Framework/DataObjects/src/Peak.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataObjects/Peak.h" #include "MantidDataObjects/NoShape.h" @@ -20,6 +20,7 @@ #include <algorithm> #include <cctype> #include <string> +#include <utility> using namespace Mantid; using namespace Mantid::Kernel; @@ -60,7 +61,7 @@ Peak::Peak(const Geometry::Instrument_const_sptr &m_inst, m_peakShape(boost::make_shared<NoShape>()) { convention = Kernel::ConfigService::Instance().getString("Q.convention"); this->setInstrument(m_inst); - this->setQLabFrame(QLabFrame, detectorDistance); + this->setQLabFrame(QLabFrame, std::move(detectorDistance)); } //---------------------------------------------------------------------------------------------- @@ -90,7 +91,7 @@ Peak::Peak(const Geometry::Instrument_const_sptr &m_inst, throw std::invalid_argument( "Peak::ctor(): Goniometer matrix must non-singular."); this->setInstrument(m_inst); - this->setQSampleFrame(QSampleFrame, detectorDistance); + this->setQSampleFrame(QSampleFrame, std::move(detectorDistance)); } //---------------------------------------------------------------------------------------------- @@ -779,7 +780,7 @@ void Peak::setL(double m_L) { this->m_L = m_L; } /** Set the BankName of this peak * @param m_bankName :: index to set */ void Peak::setBankName(std::string m_bankName) { - this->m_bankName = m_bankName; + this->m_bankName = std::move(m_bankName); } /** Set all three H,K,L indices of the peak */ diff --git a/Framework/DataObjects/src/PeakColumn.cpp b/Framework/DataObjects/src/PeakColumn.cpp index 406eb1760253f668c67142432f73f7e966ae8a90..90a7644f06ec11aebcbea03be3841aa2cd886afd 100644 --- a/Framework/DataObjects/src/PeakColumn.cpp +++ b/Framework/DataObjects/src/PeakColumn.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataObjects/PeakColumn.h" #include "MantidKernel/ConfigService.h" diff --git a/Framework/DataObjects/src/PeakNoShapeFactory.cpp b/Framework/DataObjects/src/PeakNoShapeFactory.cpp index 70dbddc1a19d855d1c1f2895443f5293621fff7f..c97368ab26abe67894ea1d7d5893b56fc2b4a279 100644 --- a/Framework/DataObjects/src/PeakNoShapeFactory.cpp +++ b/Framework/DataObjects/src/PeakNoShapeFactory.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataObjects/PeakNoShapeFactory.h" #include "MantidDataObjects/NoShape.h" diff --git a/Framework/DataObjects/src/PeakShapeBase.cpp b/Framework/DataObjects/src/PeakShapeBase.cpp index 81094f9f834da04e21cbe44af7186c03855c1aac..8845e3b7d64fb03190128c0d000bf684476149ee 100644 --- a/Framework/DataObjects/src/PeakShapeBase.cpp +++ b/Framework/DataObjects/src/PeakShapeBase.cpp @@ -1,19 +1,21 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataObjects/PeakShapeBase.h" #include "MantidKernel/SpecialCoordinateSystem.h" #include <json/json.h> +#include <utility> + namespace Mantid { namespace DataObjects { PeakShapeBase::PeakShapeBase(Kernel::SpecialCoordinateSystem frame, std::string algorithmName, int algorithmVersion) - : m_frame(frame), m_algorithmName(algorithmName), + : m_frame(frame), m_algorithmName(std::move(algorithmName)), m_algorithmVersion(algorithmVersion) {} /** diff --git a/Framework/DataObjects/src/PeakShapeEllipsoid.cpp b/Framework/DataObjects/src/PeakShapeEllipsoid.cpp index 961fc2d61a7dfe6f5561a2c483b598608062af96..07ece5fe3ccafddee39e548b8605555190eb0d1b 100644 --- a/Framework/DataObjects/src/PeakShapeEllipsoid.cpp +++ b/Framework/DataObjects/src/PeakShapeEllipsoid.cpp @@ -1,13 +1,15 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataObjects/PeakShapeEllipsoid.h" #include "MantidKernel/cow_ptr.h" #include <json/json.h> +#include <utility> + namespace Mantid { namespace DataObjects { @@ -18,7 +20,7 @@ PeakShapeEllipsoid::PeakShapeEllipsoid( const std::vector<double> &abcRadiiBackgroundOuter, Kernel::SpecialCoordinateSystem frame, std::string algorithmName, int algorithmVersion) - : PeakShapeBase(frame, algorithmName, algorithmVersion), + : PeakShapeBase(frame, std::move(algorithmName), algorithmVersion), m_directions(directions), m_abc_radii(abcRadii), m_abc_radiiBackgroundInner(abcRadiiBackgroundInner), m_abc_radiiBackgroundOuter(abcRadiiBackgroundOuter) { diff --git a/Framework/DataObjects/src/PeakShapeEllipsoidFactory.cpp b/Framework/DataObjects/src/PeakShapeEllipsoidFactory.cpp index 066237eaac58149ad504e820a08fbce66d696e7d..ff039271e91a3bb761bf5e6b2ce6538675da2c83 100644 --- a/Framework/DataObjects/src/PeakShapeEllipsoidFactory.cpp +++ b/Framework/DataObjects/src/PeakShapeEllipsoidFactory.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataObjects/PeakShapeEllipsoidFactory.h" #include "MantidDataObjects/PeakShapeEllipsoid.h" diff --git a/Framework/DataObjects/src/PeakShapeSpherical.cpp b/Framework/DataObjects/src/PeakShapeSpherical.cpp index b57944bc5bd9fc97a928556baf880dcaf1563d98..b81814575802d1535ca5299197e001352950a214 100644 --- a/Framework/DataObjects/src/PeakShapeSpherical.cpp +++ b/Framework/DataObjects/src/PeakShapeSpherical.cpp @@ -1,12 +1,13 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataObjects/PeakShapeSpherical.h" #include <json/json.h> #include <stdexcept> +#include <utility> namespace Mantid { namespace DataObjects { @@ -22,7 +23,7 @@ PeakShapeSpherical::PeakShapeSpherical(const double &peakRadius, Kernel::SpecialCoordinateSystem frame, std::string algorithmName, int algorithmVersion) - : PeakShapeBase(frame, algorithmName, algorithmVersion), + : PeakShapeBase(frame, std::move(algorithmName), algorithmVersion), m_radius(peakRadius) {} /** @@ -40,7 +41,7 @@ PeakShapeSpherical::PeakShapeSpherical(const double &peakRadius, Kernel::SpecialCoordinateSystem frame, std::string algorithmName, int algorithmVersion) - : PeakShapeBase(frame, algorithmName, algorithmVersion), + : PeakShapeBase(frame, std::move(algorithmName), algorithmVersion), m_radius(peakRadius), m_backgroundInnerRadius(peakInnerRadius), m_backgroundOuterRadius(peakOuterRadius) { if (peakRadius == m_backgroundInnerRadius) { diff --git a/Framework/DataObjects/src/PeakShapeSphericalFactory.cpp b/Framework/DataObjects/src/PeakShapeSphericalFactory.cpp index 6230c72ec53d7f29e9718a109630b878dec8fffd..6d861fb19196eabf81761c95f50dab891e3c5ab4 100644 --- a/Framework/DataObjects/src/PeakShapeSphericalFactory.cpp +++ b/Framework/DataObjects/src/PeakShapeSphericalFactory.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataObjects/PeakShapeSphericalFactory.h" #include "MantidDataObjects/PeakShapeSpherical.h" diff --git a/Framework/DataObjects/src/PeaksWorkspace.cpp b/Framework/DataObjects/src/PeaksWorkspace.cpp index c14b4563259972476587ee32854f3ee3e66a79f5..22466423b9758e31f520f613c8f7f3edab9d87a2 100644 --- a/Framework/DataObjects/src/PeaksWorkspace.cpp +++ b/Framework/DataObjects/src/PeaksWorkspace.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataObjects/PeaksWorkspace.h" #include "MantidAPI/AlgorithmFactory.h" diff --git a/Framework/DataObjects/src/PropertyWithValue.cpp b/Framework/DataObjects/src/PropertyWithValue.cpp index 7e65fcb24c0ca914d62bf1f3739af23dc6562f9b..d89d73472dc9b1321747658af46d64dd89fbac2c 100644 --- a/Framework/DataObjects/src/PropertyWithValue.cpp +++ b/Framework/DataObjects/src/PropertyWithValue.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/PropertyWithValue.h" #include "MantidDataObjects/DllConfig.h" diff --git a/Framework/DataObjects/src/RebinnedOutput.cpp b/Framework/DataObjects/src/RebinnedOutput.cpp index 04570f44d9d606767c997e116cc8c408b5ff73aa..8b8e2fbfaaeeb5682daa61901863a21ec13313a6 100644 --- a/Framework/DataObjects/src/RebinnedOutput.cpp +++ b/Framework/DataObjects/src/RebinnedOutput.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataObjects/RebinnedOutput.h" diff --git a/Framework/DataObjects/src/ReflectometryTransform.cpp b/Framework/DataObjects/src/ReflectometryTransform.cpp index b0a1dd48628308d68db34cff3a4baa6784e52825..ff876f436d7840effe4a666d11b67e0f4c0be90e 100644 --- a/Framework/DataObjects/src/ReflectometryTransform.cpp +++ b/Framework/DataObjects/src/ReflectometryTransform.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataObjects/ReflectometryTransform.h" @@ -31,6 +31,7 @@ #include "MantidKernel/VectorHelper.h" #include <boost/shared_ptr.hpp> +#include <utility> using namespace Mantid::API; using namespace Mantid::Geometry; @@ -125,13 +126,13 @@ ReflectometryTransform::ReflectometryTransform( */ boost::shared_ptr<MDEventWorkspace2Lean> ReflectometryTransform::createMDWorkspace( - Mantid::Geometry::IMDDimension_sptr a, - Mantid::Geometry::IMDDimension_sptr b, - BoxController_sptr boxController) const { + const Mantid::Geometry::IMDDimension_sptr &a, + const Mantid::Geometry::IMDDimension_sptr &b, + const BoxController_sptr &boxController) const { auto ws = boost::make_shared<MDEventWorkspace2Lean>(); - ws->addDimension(a); - ws->addDimension(b); + ws->addDimension(std::move(a)); + ws->addDimension(std::move(b)); BoxController_sptr wsbc = ws->getBoxController(); // Get the box controller wsbc->setSplitInto(boxController->getSplitInto(0)); @@ -280,8 +281,8 @@ DetectorAngularCache initAngularCaches(const MatrixWorkspace *const workspace) { * @returns An MDWorkspace based on centre-point rebinning of the inputWS */ Mantid::API::IMDEventWorkspace_sptr ReflectometryTransform::executeMD( - Mantid::API::MatrixWorkspace_const_sptr inputWs, - BoxController_sptr boxController, + const Mantid::API::MatrixWorkspace_const_sptr &inputWs, + const BoxController_sptr &boxController, Mantid::Geometry::MDFrame_uptr frame) const { auto dim0 = boost::make_shared<MDHistoDimension>( m_d0Label, m_d0ID, *frame, static_cast<Mantid::coord_t>(m_d0Min), @@ -290,7 +291,7 @@ Mantid::API::IMDEventWorkspace_sptr ReflectometryTransform::executeMD( m_d1Label, m_d1ID, *frame, static_cast<Mantid::coord_t>(m_d1Min), static_cast<Mantid::coord_t>(m_d1Max), m_d1NumBins); - auto ws = createMDWorkspace(dim0, dim1, boxController); + auto ws = createMDWorkspace(dim0, dim1, std::move(boxController)); auto spectraAxis = inputWs->getAxis(1); for (size_t index = 0; index < inputWs->getNumberHistograms(); ++index) { @@ -324,7 +325,7 @@ Mantid::API::IMDEventWorkspace_sptr ReflectometryTransform::executeMD( * @return workspace group containing output matrix workspaces of ki and kf */ Mantid::API::MatrixWorkspace_sptr ReflectometryTransform::execute( - Mantid::API::MatrixWorkspace_const_sptr inputWs) const { + const Mantid::API::MatrixWorkspace_const_sptr &inputWs) const { auto ws = boost::make_shared<Mantid::DataObjects::Workspace2D>(); ws->initialize(m_d1NumBins, m_d0NumBins, @@ -380,7 +381,7 @@ Mantid::API::MatrixWorkspace_sptr ReflectometryTransform::execute( } IMDHistoWorkspace_sptr ReflectometryTransform::executeMDNormPoly( - MatrixWorkspace_const_sptr inputWs) const { + const MatrixWorkspace_const_sptr &inputWs) const { auto input_x_dim = inputWs->getXDimension(); @@ -428,7 +429,7 @@ IMDHistoWorkspace_sptr ReflectometryTransform::executeMDNormPoly( MatrixWorkspace_sptr ReflectometryTransform::executeNormPoly( const MatrixWorkspace_const_sptr &inputWS, boost::shared_ptr<Mantid::DataObjects::TableWorkspace> &vertexes, - bool dumpVertexes, std::string outputDimensions) const { + bool dumpVertexes, const std::string &outputDimensions) const { MatrixWorkspace_sptr temp = WorkspaceFactory::Instance().create( "RebinnedOutput", m_d1NumBins, m_d0NumBins + 1, m_d0NumBins); RebinnedOutput_sptr outWS = boost::static_pointer_cast<RebinnedOutput>(temp); diff --git a/Framework/DataObjects/src/ScanningWorkspaceBuilder.cpp b/Framework/DataObjects/src/ScanningWorkspaceBuilder.cpp index ea06bfc17c26afc8e18f173b2adb18efad6ede81..0b2f5af762050472a828605696a8b262317d4a2f 100644 --- a/Framework/DataObjects/src/ScanningWorkspaceBuilder.cpp +++ b/Framework/DataObjects/src/ScanningWorkspaceBuilder.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataObjects/ScanningWorkspaceBuilder.h" diff --git a/Framework/DataObjects/src/SpecialWorkspace2D.cpp b/Framework/DataObjects/src/SpecialWorkspace2D.cpp index 8cdd62660232dad471ead5ca13ce6fd91d3d839e..915bffb65a17304a95fdcf0066b65ee6b51b4a0a 100644 --- a/Framework/DataObjects/src/SpecialWorkspace2D.cpp +++ b/Framework/DataObjects/src/SpecialWorkspace2D.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataObjects/SpecialWorkspace2D.h" #include "MantidAPI/SpectraAxis.h" @@ -32,8 +32,8 @@ DECLARE_WORKSPACE(SpecialWorkspace2D) * @param includeMonitors :: If false the monitors are not included * @return created SpecialWorkspace2D */ -SpecialWorkspace2D::SpecialWorkspace2D(Geometry::Instrument_const_sptr inst, - const bool includeMonitors) { +SpecialWorkspace2D::SpecialWorkspace2D( + const Geometry::Instrument_const_sptr &inst, const bool includeMonitors) { // Init the Workspace2D with one spectrum per detector, in the same order. this->initialize(inst->getNumberDetectors(!includeMonitors), 1, 1); @@ -59,7 +59,8 @@ SpecialWorkspace2D::SpecialWorkspace2D(Geometry::Instrument_const_sptr inst, * @param parent :: input workspace that is the base for this workspace * @return created SpecialWorkspace2D */ -SpecialWorkspace2D::SpecialWorkspace2D(API::MatrixWorkspace_const_sptr parent) { +SpecialWorkspace2D::SpecialWorkspace2D( + const API::MatrixWorkspace_const_sptr &parent) { this->initialize(parent->getNumberHistograms(), 1, 1); API::WorkspaceFactory::Instance().initializeFromParent(*parent, *this, false); // Make the mapping, which will be used for speed later. @@ -263,7 +264,7 @@ void SpecialWorkspace2D::binaryOperation(const unsigned int operatortype) { * */ void SpecialWorkspace2D::binaryAND( - boost::shared_ptr<const SpecialWorkspace2D> ws) { + const boost::shared_ptr<const SpecialWorkspace2D> &ws) { for (size_t i = 0; i < this->getNumberHistograms(); i++) { double y1 = this->dataY(i)[0]; @@ -281,7 +282,7 @@ void SpecialWorkspace2D::binaryAND( * */ void SpecialWorkspace2D::binaryOR( - boost::shared_ptr<const SpecialWorkspace2D> ws) { + const boost::shared_ptr<const SpecialWorkspace2D> &ws) { for (size_t i = 0; i < this->getNumberHistograms(); i++) { double y1 = this->dataY(i)[0]; @@ -307,7 +308,7 @@ if (y1 < 1.0E-10 && y2 < 1.0E-10){ * */ void SpecialWorkspace2D::binaryXOR( - boost::shared_ptr<const SpecialWorkspace2D> ws) { + const boost::shared_ptr<const SpecialWorkspace2D> &ws) { for (size_t i = 0; i < this->getNumberHistograms(); i++) { double y1 = this->dataY(i)[0]; @@ -343,7 +344,7 @@ void SpecialWorkspace2D::binaryNOT() { * @ return */ bool SpecialWorkspace2D::isCompatible( - boost::shared_ptr<const SpecialWorkspace2D> ws) { + const boost::shared_ptr<const SpecialWorkspace2D> &ws) { // 1. Check number of histogram size_t numhist1 = this->getNumberHistograms(); diff --git a/Framework/DataObjects/src/SplittersWorkspace.cpp b/Framework/DataObjects/src/SplittersWorkspace.cpp index e835a1accd21e68eda55d94953745065c6a238a6..075eb29292fa345c617cffe3aa3af362395d2c7d 100644 --- a/Framework/DataObjects/src/SplittersWorkspace.cpp +++ b/Framework/DataObjects/src/SplittersWorkspace.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataObjects/SplittersWorkspace.h" #include "MantidAPI/Column.h" diff --git a/Framework/DataObjects/src/TableColumn.cpp b/Framework/DataObjects/src/TableColumn.cpp index af379b35ac99bee8a5d67baefad0c5e33c59eb56..4b4fad0a6818df119b012ab4a273962902402106 100644 --- a/Framework/DataObjects/src/TableColumn.cpp +++ b/Framework/DataObjects/src/TableColumn.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataObjects/TableColumn.h" #include "MantidAPI/ColumnFactory.h" diff --git a/Framework/DataObjects/src/TableWorkspace.cpp b/Framework/DataObjects/src/TableWorkspace.cpp index 8ef5f95a072d02a56286181110542c83a846e920..8b871aa20e73fd593b6175fe3ba083140f4fc361 100644 --- a/Framework/DataObjects/src/TableWorkspace.cpp +++ b/Framework/DataObjects/src/TableWorkspace.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataObjects/TableWorkspace.h" #include "MantidAPI/ColumnFactory.h" @@ -200,7 +200,7 @@ std::vector<std::string> TableWorkspace::getColumnNames() const { return nameList; } -void TableWorkspace::addColumn(boost::shared_ptr<API::Column> column) { +void TableWorkspace::addColumn(const boost::shared_ptr<API::Column> &column) { auto ci = std::find_if(m_columns.begin(), m_columns.end(), FindName(column->name())); if (ci != m_columns.end()) { diff --git a/Framework/DataObjects/src/VectorColumn.cpp b/Framework/DataObjects/src/VectorColumn.cpp index 4b501237d59199fc0659b6557c82d786cdadbba3..00fab11da2eb8807d023213c8644d4d32aef6c7a 100644 --- a/Framework/DataObjects/src/VectorColumn.cpp +++ b/Framework/DataObjects/src/VectorColumn.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataObjects/VectorColumn.h" #include "MantidAPI/ColumnFactory.h" diff --git a/Framework/DataObjects/src/Workspace2D.cpp b/Framework/DataObjects/src/Workspace2D.cpp index 5d7cb6e8467ef6b30190fb1ec7128da5052c4051..b3af1ff0c703bf76610b1c8a13950c3d84b3480a 100644 --- a/Framework/DataObjects/src/Workspace2D.cpp +++ b/Framework/DataObjects/src/Workspace2D.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataObjects/Workspace2D.h" #include "MantidAPI/ISpectrum.h" diff --git a/Framework/DataObjects/src/WorkspaceCreation.cpp b/Framework/DataObjects/src/WorkspaceCreation.cpp index a039b194342edde10d7169d4d9cfcb2594a3c37e..d6312f0e55ae35e93fd23d1d0d41dff75f451daf 100644 --- a/Framework/DataObjects/src/WorkspaceCreation.cpp +++ b/Framework/DataObjects/src/WorkspaceCreation.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataObjects/WorkspaceCreation.h" #include "MantidAPI/WorkspaceFactory.h" diff --git a/Framework/DataObjects/src/WorkspaceProperty.cpp b/Framework/DataObjects/src/WorkspaceProperty.cpp index 8bb75043cbd82d26bb1e11da151a4b153a3c1db7..19eca7bddbf26b550541d198a9aa0dffa2355837 100644 --- a/Framework/DataObjects/src/WorkspaceProperty.cpp +++ b/Framework/DataObjects/src/WorkspaceProperty.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataObjects/EventWorkspace.h" #include "MantidDataObjects/GroupingWorkspace.h" diff --git a/Framework/DataObjects/src/WorkspaceSingleValue.cpp b/Framework/DataObjects/src/WorkspaceSingleValue.cpp index 70edacbe0cb89a4ddc3526bbe59fbcf1ff37f033..9d929fdd8df96e4825542e713bb43bc47932129e 100644 --- a/Framework/DataObjects/src/WorkspaceSingleValue.cpp +++ b/Framework/DataObjects/src/WorkspaceSingleValue.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataObjects/WorkspaceSingleValue.h" #include "MantidAPI/WorkspaceFactory.h" diff --git a/Framework/DataObjects/src/generate_mdevent_declarations.py b/Framework/DataObjects/src/generate_mdevent_declarations.py index c514798806495022928100b8120dc52a7597350b..4bc9ee9924b3271e195d5a63d71049a4c700e960 100644 --- a/Framework/DataObjects/src/generate_mdevent_declarations.py +++ b/Framework/DataObjects/src/generate_mdevent_declarations.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + """ Simple script that generates references to all needed MDEvent<X>/MDLeanEvent<X> instantiations. """ diff --git a/Framework/DataObjects/test/AffineMatrixParameterParserTest.h b/Framework/DataObjects/test/AffineMatrixParameterParserTest.h index 3098a09e5f39850f6fb622b514df9db7f51aeb45..c1f4f0cbf110b551cccf0c0c8b382ae957f58410 100644 --- a/Framework/DataObjects/test/AffineMatrixParameterParserTest.h +++ b/Framework/DataObjects/test/AffineMatrixParameterParserTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/test/AffineMatrixParameterTest.h b/Framework/DataObjects/test/AffineMatrixParameterTest.h index ba7b12afc15fffaf657b5b8aeda71514b30596f0..58da4a15d11fc3ed309a41537df6a91c2b97cb57 100644 --- a/Framework/DataObjects/test/AffineMatrixParameterTest.h +++ b/Framework/DataObjects/test/AffineMatrixParameterTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -111,7 +111,6 @@ public: } param.setMatrix(transform); - std::string result = param.toXMLString(); TSM_ASSERT_EQUALS( "Serialization of CoordTransform has not worked correctly.", "<Parameter><Type>AffineMatrixParameter</" diff --git a/Framework/DataObjects/test/BoxControllerNeXusIOTest.h b/Framework/DataObjects/test/BoxControllerNeXusIOTest.h index 3e8054a1139ace21fe98f08c6f1dad927ebea02e..af0c776c26707c216145f4b100c60cc58ccca980 100644 --- a/Framework/DataObjects/test/BoxControllerNeXusIOTest.h +++ b/Framework/DataObjects/test/BoxControllerNeXusIOTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/test/CMakeLists.txt b/Framework/DataObjects/test/CMakeLists.txt index 53b945c2313481daeba9ea42413525b9237f8755..d68c2134650c827d661e8eb43342e26cff600368 100644 --- a/Framework/DataObjects/test/CMakeLists.txt +++ b/Framework/DataObjects/test/CMakeLists.txt @@ -1,8 +1,7 @@ if(CXXTEST_FOUND) include_directories(SYSTEM ${CXXTEST_INCLUDE_DIR} - ${GMOCK_INCLUDE_DIR} - ${GTEST_INCLUDE_DIR}) +) include_directories(../../TestHelpers/inc) # This variable is used within the cxxtest_add_test macro to build this helper @@ -28,8 +27,8 @@ if(CXXTEST_FOUND) DataObjects ${NEXUS_LIBRARIES} ${JSONCPP_LIBRARIES} - ${GMOCK_LIBRARIES} - ${GTEST_LIBRARIES}) + gmock +) # Specify implicit dependency, but don't link to it add_dependencies(FrameworkTests DataObjectsTest) # Add to the 'FrameworkTests' group in VS diff --git a/Framework/DataObjects/test/CoordTransformAffineParserTest.h b/Framework/DataObjects/test/CoordTransformAffineParserTest.h index 1eb7cac325e61c9090e1a26491772b0238b6d760..ef7787b570df9c4cf80839d9b72e10d4625d9a6a 100644 --- a/Framework/DataObjects/test/CoordTransformAffineParserTest.h +++ b/Framework/DataObjects/test/CoordTransformAffineParserTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/test/CoordTransformAffineTest.h b/Framework/DataObjects/test/CoordTransformAffineTest.h index 53cff57e5b92c790baff3e8c6e6c0748a80da5f6..be4a58a2b7fceb5d200f19dea0a2063f1c368d9b 100644 --- a/Framework/DataObjects/test/CoordTransformAffineTest.h +++ b/Framework/DataObjects/test/CoordTransformAffineTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/test/CoordTransformAlignedTest.h b/Framework/DataObjects/test/CoordTransformAlignedTest.h index e1ee2c0a2c263e2750c38e97db525cc21b5b42a9..e9adc88ddf34fbe64a79802ccd2c904211ba874e 100644 --- a/Framework/DataObjects/test/CoordTransformAlignedTest.h +++ b/Framework/DataObjects/test/CoordTransformAlignedTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/test/CoordTransformDistanceParserTest.h b/Framework/DataObjects/test/CoordTransformDistanceParserTest.h index 84ca567dbfd9d80536411095240b0470fef3d42a..1fd1a4224b47c59183af29a383a51b65e9e09f39 100644 --- a/Framework/DataObjects/test/CoordTransformDistanceParserTest.h +++ b/Framework/DataObjects/test/CoordTransformDistanceParserTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/test/CoordTransformDistanceTest.h b/Framework/DataObjects/test/CoordTransformDistanceTest.h index fe5832aa94f774e3318a6df58ef1490d301b963b..93275edf5cab3a6ade6f6a1c086241a5a43a0ec3 100644 --- a/Framework/DataObjects/test/CoordTransformDistanceTest.h +++ b/Framework/DataObjects/test/CoordTransformDistanceTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/test/EventListTest.h b/Framework/DataObjects/test/EventListTest.h index 2089324e76e1efa181237ad84f2657c58744440a..270a304588200d6da9ac1dfc907ff369c9241cd7 100644 --- a/Framework/DataObjects/test/EventListTest.h +++ b/Framework/DataObjects/test/EventListTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/test/EventWorkspaceMRUTest.h b/Framework/DataObjects/test/EventWorkspaceMRUTest.h index 82706e5152323381f2c64780f3307ef7bcacbd9c..e8934fd4ca4554d3542526bb6afa439613476646 100644 --- a/Framework/DataObjects/test/EventWorkspaceMRUTest.h +++ b/Framework/DataObjects/test/EventWorkspaceMRUTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/test/EventWorkspaceTest.h b/Framework/DataObjects/test/EventWorkspaceTest.h index 4923ac338a39851769c915273da6dabdb290c587..24fa648b83f372c14a45593fc4dd61dc9adc6df3 100644 --- a/Framework/DataObjects/test/EventWorkspaceTest.h +++ b/Framework/DataObjects/test/EventWorkspaceTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /* * EventWorkspaceTest.h @@ -421,7 +421,7 @@ public: const std::range_error &); } - void do_test_binning(EventWorkspace_sptr ws, const BinEdges &axis, + void do_test_binning(const EventWorkspace_sptr &ws, const BinEdges &axis, size_t expected_occupancy_per_bin) { MantidVec Y(NUMBINS - 1); MantidVec E(NUMBINS - 1); diff --git a/Framework/DataObjects/test/EventsTest.h b/Framework/DataObjects/test/EventsTest.h index 30b5db888702354d9038f6e8a68d72621b818f56..ad72df2484c5d01bf0ab69889562a832516c57d0 100644 --- a/Framework/DataObjects/test/EventsTest.h +++ b/Framework/DataObjects/test/EventsTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/test/FakeMDTest.h b/Framework/DataObjects/test/FakeMDTest.h index d35aca470affbf979cc039dca6d8442ad2d4c50a..8ad2948de782a3e24916ab61219e73aba43bcc42 100644 --- a/Framework/DataObjects/test/FakeMDTest.h +++ b/Framework/DataObjects/test/FakeMDTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/test/GroupingWorkspaceTest.h b/Framework/DataObjects/test/GroupingWorkspaceTest.h index 3b152c7b331610081dd5a89016d20fd198231996..ed73b5cee24a5f3791d35b8684753d0a96398107 100644 --- a/Framework/DataObjects/test/GroupingWorkspaceTest.h +++ b/Framework/DataObjects/test/GroupingWorkspaceTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/test/Histogram1DTest.h b/Framework/DataObjects/test/Histogram1DTest.h index 5db8328f8470b2a84b5a5bdd100aac1577977631..9e3eae112c39447ddc0173374473a70f79e0df5a 100644 --- a/Framework/DataObjects/test/Histogram1DTest.h +++ b/Framework/DataObjects/test/Histogram1DTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/test/MDBinTest.h b/Framework/DataObjects/test/MDBinTest.h index 357b42559726524775d978ea1dbfcca51b2e73c8..fc46b275e60240e1a9985a45e79c9b060952cd03 100644 --- a/Framework/DataObjects/test/MDBinTest.h +++ b/Framework/DataObjects/test/MDBinTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/test/MDBoxBaseTest.h b/Framework/DataObjects/test/MDBoxBaseTest.h index 6b8f00416ec6d34679a747d128deac3812bfe338..bc5656366d77e6f71d8aa959e1f9465ab0a60f4c 100644 --- a/Framework/DataObjects/test/MDBoxBaseTest.h +++ b/Framework/DataObjects/test/MDBoxBaseTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -42,9 +42,9 @@ public: const bool /*markSaved*/) override{}; void clearFileBacked(bool /* loadData*/) override{/**does nothing*/}; void setFileBacked() override{}; - void saveAt(API::IBoxControllerIO *const /* */, + void saveAt(API::IBoxControllerIO *const, uint64_t /*position*/) const override{/*Not saveable */}; - void loadAndAddFrom(API::IBoxControllerIO *const /* */, uint64_t /*position*/, + void loadAndAddFrom(API::IBoxControllerIO *const, uint64_t /*position*/, size_t /* Size */) override{}; void reserveMemoryForLoad(uint64_t /* Size */) override{}; // regardless of what is actually instantiated, base tester would call itself diff --git a/Framework/DataObjects/test/MDBoxFlatTreeTest.h b/Framework/DataObjects/test/MDBoxFlatTreeTest.h index f80c08cb9e7e5b5959e45f8da3e9f9338751f112..0d96984310ec7d90d7252a95e4d3f107c2a351e5 100644 --- a/Framework/DataObjects/test/MDBoxFlatTreeTest.h +++ b/Framework/DataObjects/test/MDBoxFlatTreeTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/test/MDBoxIteratorTest.h b/Framework/DataObjects/test/MDBoxIteratorTest.h index 19ec4fc80a6bb51685a449acbfa40172ceffb39d..6e23634155f3250062a0dab1b36a0e1fb24e1fbd 100644 --- a/Framework/DataObjects/test/MDBoxIteratorTest.h +++ b/Framework/DataObjects/test/MDBoxIteratorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/test/MDBoxSaveableTest.h b/Framework/DataObjects/test/MDBoxSaveableTest.h index 927c57affb22e565b6e231bb28c044ac580c000f..5f298769abc70e5711e0456b4443f407998537c8 100644 --- a/Framework/DataObjects/test/MDBoxSaveableTest.h +++ b/Framework/DataObjects/test/MDBoxSaveableTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -24,6 +24,7 @@ #include <map> #include <memory> #include <nexus/NeXusFile.hpp> +#include <utility> using namespace Mantid; using namespace Mantid::Geometry; @@ -43,7 +44,7 @@ class MDBoxSaveableTest : public CxxTest::TestSuite { /** Deletes the file created by do_saveNexus */ static std::string - do_deleteNexusFile(std::string barefilename = "MDBoxTest.nxs") { + do_deleteNexusFile(const std::string &barefilename = "MDBoxTest.nxs") { std::string filename( ConfigService::Instance().getString("defaultsave.directory") + barefilename); @@ -69,11 +70,12 @@ public: * @return ptr to the NeXus file object * */ void do_createNeXusBackedBox(MDBox<MDLeanEvent<3>, 3> &box, - BoxController_sptr bc, + const BoxController_sptr &bc, std::string barefilename = "MDBoxTest.nxs", bool goofyWeights = true) { // Create the NXS file - std::string filename = do_createNexus(goofyWeights, barefilename); + std::string filename = + do_createNexus(goofyWeights, std::move(barefilename)); // Must get ready to load in the data auto loader = boost::shared_ptr<API::IBoxControllerIO>( @@ -100,8 +102,9 @@ public: * @param barefilename :: file to save to (no path) * @return filename with full path that was saved. * */ - std::string do_createNexus(bool goofyWeights = true, - std::string barefilename = "MDBoxTest.nxs") { + std::string + do_createNexus(bool goofyWeights = true, + const std::string &barefilename = "MDBoxTest.nxs") { // Box with 1000 events evenly spread MDBox<MDLeanEvent<3>, 3> b(sc.get()); MDEventsTestHelper::feedMDBox(&b, 1, 10, 0.5, 1.0); @@ -118,7 +121,7 @@ public: auto Saver = new BoxControllerNeXusIO(sc.get()); Saver->setDataType(b.getCoordType(), b.getEventType()); - std::string filename = do_deleteNexusFile(barefilename); + std::string filename = do_deleteNexusFile(std::move(barefilename)); Saver->openFile(filename, "w"); diff --git a/Framework/DataObjects/test/MDBoxTest.h b/Framework/DataObjects/test/MDBoxTest.h index 71e0a6d9382679b00006aa585a00485731409681..4b5ad0ed75a40c8e53c776a14d4ff92ace8bfba9 100644 --- a/Framework/DataObjects/test/MDBoxTest.h +++ b/Framework/DataObjects/test/MDBoxTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/test/MDDimensionStatsTest.h b/Framework/DataObjects/test/MDDimensionStatsTest.h index c6582c319dce0ae2a0e8640459ef9aca5c2d1ca6..1029dee5139c5f8c5331b29488ce42f4f0c7747c 100644 --- a/Framework/DataObjects/test/MDDimensionStatsTest.h +++ b/Framework/DataObjects/test/MDDimensionStatsTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/test/MDEventFactoryTest.h b/Framework/DataObjects/test/MDEventFactoryTest.h index cbff12bec36c362db408238cdec1e88e875d515c..d68e91dc00b60d0886f7c60f7e299ffc1fce5f85 100644 --- a/Framework/DataObjects/test/MDEventFactoryTest.h +++ b/Framework/DataObjects/test/MDEventFactoryTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/test/MDEventInserterTest.h b/Framework/DataObjects/test/MDEventInserterTest.h index 6de23833720a8885cc34c62cdcbebd3581009c99..49ecd11b37fdedb4e34ede05d6e320b00136a379 100644 --- a/Framework/DataObjects/test/MDEventInserterTest.h +++ b/Framework/DataObjects/test/MDEventInserterTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/test/MDEventTest.h b/Framework/DataObjects/test/MDEventTest.h index 5a5578f0c17ae7cb19e05979baf94ce682a6a606..fb111aefad2c34d07667b26eadb1de03db7d80ab 100644 --- a/Framework/DataObjects/test/MDEventTest.h +++ b/Framework/DataObjects/test/MDEventTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/test/MDEventWorkspaceTest.h b/Framework/DataObjects/test/MDEventWorkspaceTest.h index 520347e22519868d7a1fa6acfc9f3813df0e5d3d..3f1d9a598ee544da4169d50e25e7a0a5d98cbcbc 100644 --- a/Framework/DataObjects/test/MDEventWorkspaceTest.h +++ b/Framework/DataObjects/test/MDEventWorkspaceTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -40,7 +40,7 @@ class MDEventWorkspaceTest : public CxxTest::TestSuite { private: /// Helper function to return the number of masked bins in a workspace. TODO: /// move helper into test helpers - size_t getNumberMasked(Mantid::API::IMDWorkspace_sptr ws) { + size_t getNumberMasked(const Mantid::API::IMDWorkspace_sptr &ws) { auto it = ws->createIterator(nullptr); size_t numberMasked = 0; size_t counter = 0; @@ -479,7 +479,7 @@ public: TS_ASSERT_DELTA(ext[1].getMax(), ymax, 1e-4); } - void addEvent(MDEventWorkspace2Lean::sptr b, double x, double y) { + void addEvent(const MDEventWorkspace2Lean::sptr &b, double x, double y) { coord_t centers[2] = {static_cast<coord_t>(x), static_cast<coord_t>(y)}; b->addEvent(MDLeanEvent<2>(2.0, 2.0, centers)); } diff --git a/Framework/DataObjects/test/MDFramesToSpecialCoordinateSystemTest.h b/Framework/DataObjects/test/MDFramesToSpecialCoordinateSystemTest.h index 0afede36487a91178580a4df3cecbe7e76c8e69e..ffc66126e5969e257cde753ccdfef7ec4d5b6174 100644 --- a/Framework/DataObjects/test/MDFramesToSpecialCoordinateSystemTest.h +++ b/Framework/DataObjects/test/MDFramesToSpecialCoordinateSystemTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/test/MDGridBoxTest.h b/Framework/DataObjects/test/MDGridBoxTest.h index 5106d3369f323b7f64f4f32b9578e4d488e09861..500e4f3c403ab1f0988823391a33c6904370986a 100644 --- a/Framework/DataObjects/test/MDGridBoxTest.h +++ b/Framework/DataObjects/test/MDGridBoxTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -1205,7 +1205,8 @@ public: */ void do_check_integrateSphere(MDGridBox<MDLeanEvent<2>, 2> &box, double x, double y, const double radius, - double numExpected, std::string message) { + double numExpected, + const std::string &message) { // The sphere transformation bool dimensionsUsed[2] = {true, true}; coord_t center[2] = {static_cast<coord_t>(x), static_cast<coord_t>(y)}; @@ -1336,7 +1337,8 @@ public: */ void do_check_integrateSphere3d(MDGridBox<MDLeanEvent<3>, 3> &box, double x, double y, double z, const double radius, - double numExpected, std::string message) { + double numExpected, + const std::string &message) { // The sphere transformation bool dimensionsUsed[3] = {true, true, true}; coord_t center[3] = {static_cast<coord_t>(x), static_cast<coord_t>(y), @@ -1394,7 +1396,7 @@ public: void do_check_centroidSphere(MDGridBox<MDLeanEvent<2>, 2> &box, double x, double y, const double radius, double numExpected, double xExpected, - double yExpected, std::string message) { + double yExpected, const std::string &message) { // The sphere transformation bool dimensionsUsed[2] = {true, true}; coord_t center[2] = {static_cast<coord_t>(x), static_cast<coord_t>(y)}; diff --git a/Framework/DataObjects/test/MDHistoWorkspaceIteratorTest.h b/Framework/DataObjects/test/MDHistoWorkspaceIteratorTest.h index 053551e40d1d3048d150c520d899b2ead4565a24..37a9635c1505237544603a38c04670b66f0044c9 100644 --- a/Framework/DataObjects/test/MDHistoWorkspaceIteratorTest.h +++ b/Framework/DataObjects/test/MDHistoWorkspaceIteratorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -17,6 +17,8 @@ #include "MantidTestHelpers/MDEventsTestHelper.h" #include <boost/scoped_ptr.hpp> #include <cmath> +#include <utility> + #include <cxxtest/TestSuite.h> using namespace Mantid; @@ -36,7 +38,7 @@ private: class WritableHistoWorkspace : public Mantid::DataObjects::MDHistoWorkspace { public: WritableHistoWorkspace(MDHistoDimension_sptr x) - : Mantid::DataObjects::MDHistoWorkspace(x) {} + : Mantid::DataObjects::MDHistoWorkspace(std::move(x)) {} void setMaskValueAt(size_t at, bool value) { m_masks[at] = value; } }; @@ -366,8 +368,8 @@ public: } void do_test_neighbours_1d( - boost::function<std::vector<size_t>(MDHistoWorkspaceIterator *)> - findNeighbourMemberFunction) { + const boost::function<std::vector<size_t>(MDHistoWorkspaceIterator *)> + &findNeighbourMemberFunction) { const size_t nd = 1; MDHistoWorkspace_sptr ws = MDEventsTestHelper::makeFakeMDHistoWorkspace(1.0, nd, 10); diff --git a/Framework/DataObjects/test/MDHistoWorkspaceTest.h b/Framework/DataObjects/test/MDHistoWorkspaceTest.h index 1313c820e4d730f9002a13d94748c2ba4b4d2935..4225ef8039248a2700faa4308ef0e1ed8f20c264 100644 --- a/Framework/DataObjects/test/MDHistoWorkspaceTest.h +++ b/Framework/DataObjects/test/MDHistoWorkspaceTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -37,7 +37,7 @@ class MDHistoWorkspaceTest : public CxxTest::TestSuite { private: /// Helper function to return the number of masked bins in a workspace. TODO: /// move helper into test helpers - size_t getNumberMasked(Mantid::API::IMDWorkspace_sptr ws) { + size_t getNumberMasked(const Mantid::API::IMDWorkspace_sptr &ws) { auto it = ws->createIterator(nullptr); size_t numberMasked = 0; size_t counter = 0; @@ -93,7 +93,7 @@ public: } /** Check that a workspace has the right signal/error*/ - void checkWorkspace(MDHistoWorkspace_sptr ws, double expectedSignal, + void checkWorkspace(const MDHistoWorkspace_sptr &ws, double expectedSignal, double expectedErrorSquared, double expectedNumEvents = 1.0) { for (size_t i = 0; i < ws->getNPoints(); i++) { diff --git a/Framework/DataObjects/test/MDLeanEventTest.h b/Framework/DataObjects/test/MDLeanEventTest.h index 8948c728f5dbe94cc81d78f92e934dcac673a605..fedd756040d4e6f503ae1035c6aba3cf50f7736f 100644 --- a/Framework/DataObjects/test/MDLeanEventTest.h +++ b/Framework/DataObjects/test/MDLeanEventTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/test/MaskWorkspaceTest.h b/Framework/DataObjects/test/MaskWorkspaceTest.h index ca58891e051fa1e437365676795c208000ee4e96..eebe7e7b667a731f09f25d5247a72e4c3695b0e1 100644 --- a/Framework/DataObjects/test/MaskWorkspaceTest.h +++ b/Framework/DataObjects/test/MaskWorkspaceTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/test/MementoTableWorkspaceTest.h b/Framework/DataObjects/test/MementoTableWorkspaceTest.h index 715f72e2b8d6ed2087010b7fea9c7ae15b7e6877..cdca2fce703d510bb93696bf4f947bd883f4d3c0 100644 --- a/Framework/DataObjects/test/MementoTableWorkspaceTest.h +++ b/Framework/DataObjects/test/MementoTableWorkspaceTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/test/MockObjects.h b/Framework/DataObjects/test/MockObjects.h index e375eb426dcaa5c9fce49073498eda4c400e7c87..e0e36c52730d2a2e475bec1eaa22d7af2c5b4063 100644 --- a/Framework/DataObjects/test/MockObjects.h +++ b/Framework/DataObjects/test/MockObjects.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/test/MortonIndex/BitInterleavingTest.h b/Framework/DataObjects/test/MortonIndex/BitInterleavingTest.h index 3167b94f737c199fc3a8113ebe7435f3d69cb9cc..89f786e03a0d01c83516f4554e30824916f63be5 100644 --- a/Framework/DataObjects/test/MortonIndex/BitInterleavingTest.h +++ b/Framework/DataObjects/test/MortonIndex/BitInterleavingTest.h @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #include "MantidDataObjects/MortonIndex/BitInterleaving.h" #include <cxxtest/TestSuite.h> #include <utility> diff --git a/Framework/DataObjects/test/NoShapeTest.h b/Framework/DataObjects/test/NoShapeTest.h index a3f58ec39842b11b23354ca0c292e61eecc3b613..31a2ce7ec19aeae0bc99e586502966b25fd67c13 100644 --- a/Framework/DataObjects/test/NoShapeTest.h +++ b/Framework/DataObjects/test/NoShapeTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/test/OffsetsWorkspaceTest.h b/Framework/DataObjects/test/OffsetsWorkspaceTest.h index 14ed0b31f26b9efcb802a49072ec171da5a255c3..f9bdc537d569b241fdd35cdbe61c7e380ccf4b30 100644 --- a/Framework/DataObjects/test/OffsetsWorkspaceTest.h +++ b/Framework/DataObjects/test/OffsetsWorkspaceTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/test/PeakColumnTest.h b/Framework/DataObjects/test/PeakColumnTest.h index 4f4f4df54e036081e69f39ce5627362bf29c1756..d05894749ba5dfbc281f09334c5beef24e2697fe 100644 --- a/Framework/DataObjects/test/PeakColumnTest.h +++ b/Framework/DataObjects/test/PeakColumnTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/test/PeakNoShapeFactoryTest.h b/Framework/DataObjects/test/PeakNoShapeFactoryTest.h index 0e4dedfc2ffbf05a322acf480ca0a7ddbf330efa..0e9478e0efd887ad38387e7c6619ea39bca460e6 100644 --- a/Framework/DataObjects/test/PeakNoShapeFactoryTest.h +++ b/Framework/DataObjects/test/PeakNoShapeFactoryTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/test/PeakShapeEllipsoidFactoryTest.h b/Framework/DataObjects/test/PeakShapeEllipsoidFactoryTest.h index 84de32e67c620203a551f6d48319f9437a5d7a68..04892b1e6d51ee4dc1ebeeff908e8a5e13b164a2 100644 --- a/Framework/DataObjects/test/PeakShapeEllipsoidFactoryTest.h +++ b/Framework/DataObjects/test/PeakShapeEllipsoidFactoryTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/test/PeakShapeEllipsoidTest.h b/Framework/DataObjects/test/PeakShapeEllipsoidTest.h index 9dc7153f57a45140ae2747f6ef4f7bb466a726cc..74b6c3f4734c7086bf9af3b8af54009bc0859eba 100644 --- a/Framework/DataObjects/test/PeakShapeEllipsoidTest.h +++ b/Framework/DataObjects/test/PeakShapeEllipsoidTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/test/PeakShapeSphericalFactoryTest.h b/Framework/DataObjects/test/PeakShapeSphericalFactoryTest.h index b19df384d81c22579de2bd907c6bc4d43b5b5a39..3e3b04f1c3e7c15159b940fd85eee3876ea2ea13 100644 --- a/Framework/DataObjects/test/PeakShapeSphericalFactoryTest.h +++ b/Framework/DataObjects/test/PeakShapeSphericalFactoryTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/test/PeakShapeSphericalTest.h b/Framework/DataObjects/test/PeakShapeSphericalTest.h index c33cfe511ea00e9be8721c3219cee2f35bca6d01..06de64ef2cdff9b433a921c3e3d1e339dda85c39 100644 --- a/Framework/DataObjects/test/PeakShapeSphericalTest.h +++ b/Framework/DataObjects/test/PeakShapeSphericalTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/test/PeakTest.h b/Framework/DataObjects/test/PeakTest.h index bd787fcac431493d6274e3dcdd67fb56cfa6b9a0..eedab2753eb15f6bd981f47db7e716e17d653927 100644 --- a/Framework/DataObjects/test/PeakTest.h +++ b/Framework/DataObjects/test/PeakTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/test/PeaksWorkspaceTest.h b/Framework/DataObjects/test/PeaksWorkspaceTest.h index 790a466460e96406600582d47da202ef8e011d31..da1044841203748e52fb814c0c1107b0a39558d7 100644 --- a/Framework/DataObjects/test/PeaksWorkspaceTest.h +++ b/Framework/DataObjects/test/PeaksWorkspaceTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -140,9 +140,6 @@ public: } void test_Save_Unmodified_PeaksWorkspace_Nexus() { - - const std::string filename = - "test_Save_Unmodified_PeaksWorkspace_Nexus.nxs"; auto testPWS = createSaveTestPeaksWorkspace(); NexusTestHelper nexusHelper(true); nexusHelper.createFile("testSavePeaksWorkspace.nxs"); diff --git a/Framework/DataObjects/test/PrecompiledHeader.h b/Framework/DataObjects/test/PrecompiledHeader.h index 32a9ee3a6db62de1130e99fdfa0b3e4b7750d172..46cd1862455ed0ad64393f43541fd9f6fe0c3bab 100644 --- a/Framework/DataObjects/test/PrecompiledHeader.h +++ b/Framework/DataObjects/test/PrecompiledHeader.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/test/PropertyManagerHelper.h b/Framework/DataObjects/test/PropertyManagerHelper.h index aa228d879bed8ae442dd39a3bb475de095e573dd..594e63608fdd4e5e1e9bf7f45091ba2af42ed4c3 100644 --- a/Framework/DataObjects/test/PropertyManagerHelper.h +++ b/Framework/DataObjects/test/PropertyManagerHelper.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/test/RebinnedOutputTest.h b/Framework/DataObjects/test/RebinnedOutputTest.h index 306072243b8c705b177ed7c5259eaec89903a7c4..f8466e8e553e56f194e66165a6c3f2bd6d7face4 100644 --- a/Framework/DataObjects/test/RebinnedOutputTest.h +++ b/Framework/DataObjects/test/RebinnedOutputTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/test/RefAxisTest.h b/Framework/DataObjects/test/RefAxisTest.h index 8ac015971e31e16efc80d4d1e81fe5973f0479fe..6f05152bf4a57eeb240cc50ff75148857b13bc74 100644 --- a/Framework/DataObjects/test/RefAxisTest.h +++ b/Framework/DataObjects/test/RefAxisTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //------------------------------------------------------------------------------------------------- // This set of tests has been placed in DataObjects because it really needs to diff --git a/Framework/DataObjects/test/ReflectometryTransformTest.h b/Framework/DataObjects/test/ReflectometryTransformTest.h index 37f2eea5d5a9cdd2f2b884fec89d87114d4157f6..b763dcd62c99032e0938bfc0efd9a038c45d0987 100644 --- a/Framework/DataObjects/test/ReflectometryTransformTest.h +++ b/Framework/DataObjects/test/ReflectometryTransformTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/test/ScanningWorkspaceBuilderTest.h b/Framework/DataObjects/test/ScanningWorkspaceBuilderTest.h index 333a6846a7acb6414a188740b988eead551100d0..ac118fd2b9a77e277122db4d2df3e55d8d08eea2 100644 --- a/Framework/DataObjects/test/ScanningWorkspaceBuilderTest.h +++ b/Framework/DataObjects/test/ScanningWorkspaceBuilderTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/test/SkippingPolicyTest.h b/Framework/DataObjects/test/SkippingPolicyTest.h index a6c9bb899e1196dd786d92ab7f650ba940619df4..c9f5e373920cbda03b65695925fb3652e2b7487e 100644 --- a/Framework/DataObjects/test/SkippingPolicyTest.h +++ b/Framework/DataObjects/test/SkippingPolicyTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/test/SpecialWorkspace2DTest.h b/Framework/DataObjects/test/SpecialWorkspace2DTest.h index 980577ca338ad8af05c9b736c27bfb4811598948..52f7990639f497e837506d360611087d075d81fe 100644 --- a/Framework/DataObjects/test/SpecialWorkspace2DTest.h +++ b/Framework/DataObjects/test/SpecialWorkspace2DTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/test/SplittersWorkspaceTest.h b/Framework/DataObjects/test/SplittersWorkspaceTest.h index 16216b80e86565b75abaa3675736f970ea10fe86..d8dc2dba863ec0a412ac5829fa76defdff100950 100644 --- a/Framework/DataObjects/test/SplittersWorkspaceTest.h +++ b/Framework/DataObjects/test/SplittersWorkspaceTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/test/TableColumnTest.h b/Framework/DataObjects/test/TableColumnTest.h index 74b1ac7dc50040f0bd7559189a705810834db70f..32dc797b35137a4150d286c03335a751f4dfcdf3 100644 --- a/Framework/DataObjects/test/TableColumnTest.h +++ b/Framework/DataObjects/test/TableColumnTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/test/TableWorkspacePropertyTest.h b/Framework/DataObjects/test/TableWorkspacePropertyTest.h index 86677bcf397b33d7eb9f9617dffef76b33b1cc18..7e8d7aefb23abeed7bc4dc5d9e0106936649dc67 100644 --- a/Framework/DataObjects/test/TableWorkspacePropertyTest.h +++ b/Framework/DataObjects/test/TableWorkspacePropertyTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/test/TableWorkspaceTest.h b/Framework/DataObjects/test/TableWorkspaceTest.h index baa63d6f1bb18dead895bc1a5bf06b61a3ad9e05..bd3394fe9b2437e61a58a402853dfad8c37d4839 100644 --- a/Framework/DataObjects/test/TableWorkspaceTest.h +++ b/Framework/DataObjects/test/TableWorkspaceTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/test/VectorColumnTest.h b/Framework/DataObjects/test/VectorColumnTest.h index 027abada484481e960e44a14b44c3f728e5c316c..a95133f555a57c394e5d3018e4e583912123fa4e 100644 --- a/Framework/DataObjects/test/VectorColumnTest.h +++ b/Framework/DataObjects/test/VectorColumnTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/test/WeightedEventNoTimeTest.h b/Framework/DataObjects/test/WeightedEventNoTimeTest.h index a3ed0554ab3148762577ce37765491c12c0b8d9d..b6896dfe75272cc1eac1c589012a5cde95d8ab45 100644 --- a/Framework/DataObjects/test/WeightedEventNoTimeTest.h +++ b/Framework/DataObjects/test/WeightedEventNoTimeTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/test/WeightedEventTest.h b/Framework/DataObjects/test/WeightedEventTest.h index c64ca08590c2801f7b230c952d41bda3ee7df26e..621d22978ef0873674d6dc30e42fcc84f6f1c172 100644 --- a/Framework/DataObjects/test/WeightedEventTest.h +++ b/Framework/DataObjects/test/WeightedEventTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -62,6 +62,7 @@ public: // Copy constructor we = WeightedEvent(); we2 = WeightedEvent(456, 789, 2.5, 1.5 * 1.5); + // cppcheck-suppress redundantAssignment we = we2; TS_ASSERT_EQUALS(we.tof(), 456); TS_ASSERT_EQUALS(we.pulseTime(), 789); diff --git a/Framework/DataObjects/test/Workspace2DTest.h b/Framework/DataObjects/test/Workspace2DTest.h index bf6738e1a582948241f7767de7867206a86602dc..4294c09d46a3e1e5c6c37bd90de97a5e493a7e81 100644 --- a/Framework/DataObjects/test/Workspace2DTest.h +++ b/Framework/DataObjects/test/Workspace2DTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/test/WorkspaceCreationTest.h b/Framework/DataObjects/test/WorkspaceCreationTest.h index d26e0a4aa134e6fcb83f4df2a69139d294462afc..fb3c4f964ddaf9e9bf671304ab8a20eaecdd4602 100644 --- a/Framework/DataObjects/test/WorkspaceCreationTest.h +++ b/Framework/DataObjects/test/WorkspaceCreationTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -78,7 +78,7 @@ void run_create_partitioned_parent(const Parallel::Communicator &comm) { void run_create_partitioned_with_instrument( const Parallel::Communicator &comm, - boost::shared_ptr<Geometry::Instrument> instrument) { + const boost::shared_ptr<Geometry::Instrument> &instrument) { IndexInfo indices(4, Parallel::StorageMode::Distributed, comm); // should a nullptr spectrum definitions vector indicate building default // defs? diff --git a/Framework/DataObjects/test/WorkspaceIteratorTest.h b/Framework/DataObjects/test/WorkspaceIteratorTest.h index 853ab1412efa4c5438ed3fefbb52357db30e3de1..f8ffa3b152408ef19263b103d87a29b9ecf5a006 100644 --- a/Framework/DataObjects/test/WorkspaceIteratorTest.h +++ b/Framework/DataObjects/test/WorkspaceIteratorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/test/WorkspaceSingleValueTest.h b/Framework/DataObjects/test/WorkspaceSingleValueTest.h index 3071749f34658fc408c5b1a0a50d724b22af9bff..08dd2e2840d2fcc24a91de2d5535cd567352dc37 100644 --- a/Framework/DataObjects/test/WorkspaceSingleValueTest.h +++ b/Framework/DataObjects/test/WorkspaceSingleValueTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/DataObjects/test/WorkspaceValidatorsTest.h b/Framework/DataObjects/test/WorkspaceValidatorsTest.h index 77c4130ffc2e9746b499844cba63189e96f5ad13..9ee824a6829e79c162ef8086f210a512871225c8 100644 --- a/Framework/DataObjects/test/WorkspaceValidatorsTest.h +++ b/Framework/DataObjects/test/WorkspaceValidatorsTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Doxygen/make_header.py b/Framework/Doxygen/make_header.py index c07203fdc0535aced671b9be45cdb4048d7c42db..44edaf67920aabc0cd32df85c7f3fd886f88bef7 100644 --- a/Framework/Doxygen/make_header.py +++ b/Framework/Doxygen/make_header.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) from six.moves import range #pylint: disable=redefined-builtin diff --git a/Framework/Examples/HelloWorldAlgorithm.cpp b/Framework/Examples/HelloWorldAlgorithm.cpp index 01a197ca904eb69dfdec7c744e6328aa93089c1c..ae2353f176fcb885de0488147c4b7edc893aea88 100644 --- a/Framework/Examples/HelloWorldAlgorithm.cpp +++ b/Framework/Examples/HelloWorldAlgorithm.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "HelloWorldAlgorithm.h" @@ -11,14 +11,10 @@ namespace Algorithms { DECLARE_ALGORITHM(HelloWorldAlgorithm) -/** - */ void HelloWorldAlgorithm::init() { declareProperty("WhatKindOfWorld", "Mantid"); } -/** - */ void HelloWorldAlgorithm::exec() { // g_log is a reference to the logger. It is used to print out information, // warning, and error messages diff --git a/Framework/Examples/HelloWorldAlgorithm.h b/Framework/Examples/HelloWorldAlgorithm.h index e523dc452c137b556286ddec84ca4c0935218442..4e4ca1cf948c41f7cb498064c4cc9f961b1ae5f7 100644 --- a/Framework/Examples/HelloWorldAlgorithm.h +++ b/Framework/Examples/HelloWorldAlgorithm.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Examples/LorentzianTest.cpp b/Framework/Examples/LorentzianTest.cpp index 3dc79f38e4e3068cd88ef2f1747cad18672d71f4..cf6593ab75e48e1d69f966f2513b48c779039290 100644 --- a/Framework/Examples/LorentzianTest.cpp +++ b/Framework/Examples/LorentzianTest.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/Examples/LorentzianTest.h b/Framework/Examples/LorentzianTest.h index 4a516e9a7d7d2c7e914335ef127b0e134bc1009f..3af7d86b70b73d20eb65284494c5d0d78c6748ba 100644 --- a/Framework/Examples/LorentzianTest.h +++ b/Framework/Examples/LorentzianTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Examples/ModifyData.cpp b/Framework/Examples/ModifyData.cpp index 508b882be08a039765cdd1a582e8d8d92a19a9aa..607864bf6b43acc1bc582e3db2e02744ad54a5f4 100644 --- a/Framework/Examples/ModifyData.cpp +++ b/Framework/Examples/ModifyData.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "ModifyData.h" #include "MantidAPI/MatrixWorkspace.h" diff --git a/Framework/Examples/ModifyData.h b/Framework/Examples/ModifyData.h index 02213f624db6832cd3dc2236ab3adb08062484ac..9ae675ab63331b91b2dd71044eef9c5eb2880e45 100644 --- a/Framework/Examples/ModifyData.h +++ b/Framework/Examples/ModifyData.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Examples/Muon_ExpDecayOscTest.cpp b/Framework/Examples/Muon_ExpDecayOscTest.cpp index 311cb042b89a324fea7b373404f80324dd43c669..6371477dfc73992965ecdfcbc263e1a38eb21fc8 100644 --- a/Framework/Examples/Muon_ExpDecayOscTest.cpp +++ b/Framework/Examples/Muon_ExpDecayOscTest.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/Examples/Muon_ExpDecayOscTest.h b/Framework/Examples/Muon_ExpDecayOscTest.h index 2e97b32d845c9d6ddaec0a585dc26b3b6e940c2f..de4b1de0cc878139c874279daef8080435fb3484 100644 --- a/Framework/Examples/Muon_ExpDecayOscTest.h +++ b/Framework/Examples/Muon_ExpDecayOscTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Examples/PropertyAlgorithm.cpp b/Framework/Examples/PropertyAlgorithm.cpp index f5b1e135a370c74ddcb38d05e91d1909c9486252..71b22982ce4a817c5e5bb0026a4e5fa172db81f3 100644 --- a/Framework/Examples/PropertyAlgorithm.cpp +++ b/Framework/Examples/PropertyAlgorithm.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "PropertyAlgorithm.h" #include "MantidKernel/ArrayProperty.h" diff --git a/Framework/Examples/PropertyAlgorithm.h b/Framework/Examples/PropertyAlgorithm.h index 511065c8e929c3e7050c95bc0f94171b074d358d..d44bfd484ea3848a74d15cefd4b356a88a687c61 100644 --- a/Framework/Examples/PropertyAlgorithm.h +++ b/Framework/Examples/PropertyAlgorithm.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Examples/WorkspaceAlgorithm.cpp b/Framework/Examples/WorkspaceAlgorithm.cpp index dc08c8fa3398d272ef80873fda8d21a2e229895c..98d1671f38050787effce6c1070ec24996a4aa91 100644 --- a/Framework/Examples/WorkspaceAlgorithm.cpp +++ b/Framework/Examples/WorkspaceAlgorithm.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "WorkspaceAlgorithm.h" diff --git a/Framework/Examples/WorkspaceAlgorithm.h b/Framework/Examples/WorkspaceAlgorithm.h index 5403464b7afa3510156805a28faaa3f77681bee9..aef67836fc2a2ef4795c8dce90f436241015f3cd 100644 --- a/Framework/Examples/WorkspaceAlgorithm.h +++ b/Framework/Examples/WorkspaceAlgorithm.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/ComponentParser.h b/Framework/Geometry/inc/MantidGeometry/ComponentParser.h index c17434e7f5ef489cfabe5a81d7f46b585e56622d..8b449b9861caee677f0bb886112b1c215e2bcfb4 100644 --- a/Framework/Geometry/inc/MantidGeometry/ComponentParser.h +++ b/Framework/Geometry/inc/MantidGeometry/ComponentParser.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Crystal/AngleUnits.h b/Framework/Geometry/inc/MantidGeometry/Crystal/AngleUnits.h index 862cae80c8351c8b374c4239d25f631396c85d6a..e14cbf9df0b01f9689612465bfb741cea581657e 100644 --- a/Framework/Geometry/inc/MantidGeometry/Crystal/AngleUnits.h +++ b/Framework/Geometry/inc/MantidGeometry/Crystal/AngleUnits.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Crystal/BasicHKLFilters.h b/Framework/Geometry/inc/MantidGeometry/Crystal/BasicHKLFilters.h index 8de06fe5f8f14052a9a5bd9bb02af219a84f1552..746caffa361806732063dab85df48159045e04a5 100644 --- a/Framework/Geometry/inc/MantidGeometry/Crystal/BasicHKLFilters.h +++ b/Framework/Geometry/inc/MantidGeometry/Crystal/BasicHKLFilters.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Crystal/BraggScatterer.h b/Framework/Geometry/inc/MantidGeometry/Crystal/BraggScatterer.h index 7dde867cf22a22da8637a5c3f8613f46046cf952..84793667fee54915b20e288e5c6bbcd0b915831c 100644 --- a/Framework/Geometry/inc/MantidGeometry/Crystal/BraggScatterer.h +++ b/Framework/Geometry/inc/MantidGeometry/Crystal/BraggScatterer.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Crystal/BraggScattererFactory.h b/Framework/Geometry/inc/MantidGeometry/Crystal/BraggScattererFactory.h index 790745ccdc0e073d36451da7769415bebd47e083..d1ac9ace26f9e2f3d0a7ff61e6dd9f273a663239 100644 --- a/Framework/Geometry/inc/MantidGeometry/Crystal/BraggScattererFactory.h +++ b/Framework/Geometry/inc/MantidGeometry/Crystal/BraggScattererFactory.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Crystal/BraggScattererInCrystalStructure.h b/Framework/Geometry/inc/MantidGeometry/Crystal/BraggScattererInCrystalStructure.h index 2f559f6306d8af69069d4d82df07dc1d4768a826..8dca16b9f2f63b39cd5a4817b1efec051443714a 100644 --- a/Framework/Geometry/inc/MantidGeometry/Crystal/BraggScattererInCrystalStructure.h +++ b/Framework/Geometry/inc/MantidGeometry/Crystal/BraggScattererInCrystalStructure.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Crystal/CenteringGroup.h b/Framework/Geometry/inc/MantidGeometry/Crystal/CenteringGroup.h index 78d63cfd96235f6b693897984ae22b88b1ea144e..31493e8e6eac3b6cfddd9448a0aa47ac43c50244 100644 --- a/Framework/Geometry/inc/MantidGeometry/Crystal/CenteringGroup.h +++ b/Framework/Geometry/inc/MantidGeometry/Crystal/CenteringGroup.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Crystal/CompositeBraggScatterer.h b/Framework/Geometry/inc/MantidGeometry/Crystal/CompositeBraggScatterer.h index be2af73f21a975ba4c2ab3b8d2bd63b93360e3c2..6bcddff7989c920586cf188386d68216d61968e2 100644 --- a/Framework/Geometry/inc/MantidGeometry/Crystal/CompositeBraggScatterer.h +++ b/Framework/Geometry/inc/MantidGeometry/Crystal/CompositeBraggScatterer.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Crystal/ConcretePeakTransformFactory.h b/Framework/Geometry/inc/MantidGeometry/Crystal/ConcretePeakTransformFactory.h index 26c4c8eb2a6a6be26f38cea434c388f6ab407052..4959ac07d3fff9d4ee2c427770362bd0c9f40ece 100644 --- a/Framework/Geometry/inc/MantidGeometry/Crystal/ConcretePeakTransformFactory.h +++ b/Framework/Geometry/inc/MantidGeometry/Crystal/ConcretePeakTransformFactory.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Crystal/ConventionalCell.h b/Framework/Geometry/inc/MantidGeometry/Crystal/ConventionalCell.h index ebf2d8a9060a784cd4fe4c80982b8950f25039f6..6c95e58b3be87e6abd417ac82c0ecb2ae52d4838 100644 --- a/Framework/Geometry/inc/MantidGeometry/Crystal/ConventionalCell.h +++ b/Framework/Geometry/inc/MantidGeometry/Crystal/ConventionalCell.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Crystal/CrystalStructure.h b/Framework/Geometry/inc/MantidGeometry/Crystal/CrystalStructure.h index e6fea4d924a0b738ebcdf7c6684bbafef0e0015c..ad08e61e74c3190f59b1b2eb43b2e47d9cf92207 100644 --- a/Framework/Geometry/inc/MantidGeometry/Crystal/CrystalStructure.h +++ b/Framework/Geometry/inc/MantidGeometry/Crystal/CrystalStructure.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Crystal/CyclicGroup.h b/Framework/Geometry/inc/MantidGeometry/Crystal/CyclicGroup.h index bd272c178fa259fd94535facb50c4a9c8d790458..9e2df7965bc72c0ead2494bc3072f61764adcf03 100644 --- a/Framework/Geometry/inc/MantidGeometry/Crystal/CyclicGroup.h +++ b/Framework/Geometry/inc/MantidGeometry/Crystal/CyclicGroup.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Crystal/EdgePixel.h b/Framework/Geometry/inc/MantidGeometry/Crystal/EdgePixel.h index b8e5220195be76621c8affcb0b3105bdaff1fda0..d3ac30bf65e1c8ea237abfb10225d2b77792fb25 100644 --- a/Framework/Geometry/inc/MantidGeometry/Crystal/EdgePixel.h +++ b/Framework/Geometry/inc/MantidGeometry/Crystal/EdgePixel.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -12,9 +12,9 @@ namespace Mantid { namespace Geometry { /// Function to find peaks near detector edge -MANTID_GEOMETRY_DLL bool edgePixel(Geometry::Instrument_const_sptr inst, - std::string bankName, int col, int row, - int Edge); +MANTID_GEOMETRY_DLL bool edgePixel(const Geometry::Instrument_const_sptr &inst, + const std::string &bankName, int col, + int row, int Edge); } // namespace Geometry } // namespace Mantid diff --git a/Framework/Geometry/inc/MantidGeometry/Crystal/Group.h b/Framework/Geometry/inc/MantidGeometry/Crystal/Group.h index 6510d3cd102c2903a55635d8db75ab75424a16d2..bff49aa196d0a3fa80f74d517835e44df1218410 100644 --- a/Framework/Geometry/inc/MantidGeometry/Crystal/Group.h +++ b/Framework/Geometry/inc/MantidGeometry/Crystal/Group.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Crystal/GroupTransformation.h b/Framework/Geometry/inc/MantidGeometry/Crystal/GroupTransformation.h index f4d44480ce1efe98262046297ef7a444bc49e6b4..0fdaf0da1d27716e5c98bfe3df91ceb8cb918875 100644 --- a/Framework/Geometry/inc/MantidGeometry/Crystal/GroupTransformation.h +++ b/Framework/Geometry/inc/MantidGeometry/Crystal/GroupTransformation.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Crystal/HKLFilter.h b/Framework/Geometry/inc/MantidGeometry/Crystal/HKLFilter.h index 84f299d6b7ea18bef3362b3dd52950ed4ff805c9..cb340537de088bfbc7ad8d6fbb5e65aec72ba0ab 100644 --- a/Framework/Geometry/inc/MantidGeometry/Crystal/HKLFilter.h +++ b/Framework/Geometry/inc/MantidGeometry/Crystal/HKLFilter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Crystal/HKLFilterWavelength.h b/Framework/Geometry/inc/MantidGeometry/Crystal/HKLFilterWavelength.h index 7f814a12930735fc79cd68517071f44cd269744c..3bd5d22c8b27093f14b901d6116d0bdbb2be7c07 100644 --- a/Framework/Geometry/inc/MantidGeometry/Crystal/HKLFilterWavelength.h +++ b/Framework/Geometry/inc/MantidGeometry/Crystal/HKLFilterWavelength.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Crystal/HKLGenerator.h b/Framework/Geometry/inc/MantidGeometry/Crystal/HKLGenerator.h index fb45fef75fae54b1f9746615252d257493c098da..28c96cde06fcaf5748062c1d0aa86466e7d821d0 100644 --- a/Framework/Geometry/inc/MantidGeometry/Crystal/HKLGenerator.h +++ b/Framework/Geometry/inc/MantidGeometry/Crystal/HKLGenerator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Crystal/IPeak.h b/Framework/Geometry/inc/MantidGeometry/Crystal/IPeak.h index 06a9d44125832377ee8b90815d3dd9ea363884c0..ad826366bfa7b846f0e9462bb23e5dda9619f948 100644 --- a/Framework/Geometry/inc/MantidGeometry/Crystal/IPeak.h +++ b/Framework/Geometry/inc/MantidGeometry/Crystal/IPeak.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Crystal/IndexingUtils.h b/Framework/Geometry/inc/MantidGeometry/Crystal/IndexingUtils.h index db2f6f8369031248e713e7f4671c0d7d8c90daf1..1bdbb3d855840e9e54265edeab1f352779bd3967 100644 --- a/Framework/Geometry/inc/MantidGeometry/Crystal/IndexingUtils.h +++ b/Framework/Geometry/inc/MantidGeometry/Crystal/IndexingUtils.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /* File: Indexing_Utils.h */ @@ -238,8 +238,8 @@ public: /// Choose the direction in a list of directions, that is most nearly /// perpendicular to planes with the specified spacing in reciprocal space. static int SelectDirection(Kernel::V3D &best_direction, - const std::vector<Kernel::V3D> q_vectors, - const std::vector<Kernel::V3D> direction_list, + const std::vector<Kernel::V3D> &q_vectors, + const std::vector<Kernel::V3D> &direction_list, double plane_spacing, double required_tolerance); /// Get the lattice parameters for the specified orientation matrix diff --git a/Framework/Geometry/inc/MantidGeometry/Crystal/IsotropicAtomBraggScatterer.h b/Framework/Geometry/inc/MantidGeometry/Crystal/IsotropicAtomBraggScatterer.h index e4201f67d8ba4f754ddf93c3f2bb9eb38328763f..5c10a31ad12a7e181d4daf9adca7789dfb7b971a 100644 --- a/Framework/Geometry/inc/MantidGeometry/Crystal/IsotropicAtomBraggScatterer.h +++ b/Framework/Geometry/inc/MantidGeometry/Crystal/IsotropicAtomBraggScatterer.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Crystal/MatrixVectorPair.h b/Framework/Geometry/inc/MantidGeometry/Crystal/MatrixVectorPair.h index a4119b7f95312c028b566b8620e176a0475935a1..1fef773ea82a9c86277cf274f43acb84d676d13b 100644 --- a/Framework/Geometry/inc/MantidGeometry/Crystal/MatrixVectorPair.h +++ b/Framework/Geometry/inc/MantidGeometry/Crystal/MatrixVectorPair.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Crystal/MatrixVectorPairParser.h b/Framework/Geometry/inc/MantidGeometry/Crystal/MatrixVectorPairParser.h index 681ba50785722fbea6aa91fb89bc0581e4417593..967228b8737c2bf2b2b50c66133565faa5447fd4 100644 --- a/Framework/Geometry/inc/MantidGeometry/Crystal/MatrixVectorPairParser.h +++ b/Framework/Geometry/inc/MantidGeometry/Crystal/MatrixVectorPairParser.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Crystal/NiggliCell.h b/Framework/Geometry/inc/MantidGeometry/Crystal/NiggliCell.h index 331a3719fdc4181523a445591e4cdd5535bd95de..9e254b90ba1893af7640472153a13b1f878efe67 100644 --- a/Framework/Geometry/inc/MantidGeometry/Crystal/NiggliCell.h +++ b/Framework/Geometry/inc/MantidGeometry/Crystal/NiggliCell.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Crystal/OrientedLattice.h b/Framework/Geometry/inc/MantidGeometry/Crystal/OrientedLattice.h index ee036125206b24046cad105b893647c043b94036..b39fd0944206398502bfea2aec605272e10a7700 100644 --- a/Framework/Geometry/inc/MantidGeometry/Crystal/OrientedLattice.h +++ b/Framework/Geometry/inc/MantidGeometry/Crystal/OrientedLattice.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Crystal/PeakShape.h b/Framework/Geometry/inc/MantidGeometry/Crystal/PeakShape.h index 71da3ee732382c4867d7dddd70e8be38ad457cd6..670a1dd15fb1bc9c70131bf7760afabb7c8e79a0 100644 --- a/Framework/Geometry/inc/MantidGeometry/Crystal/PeakShape.h +++ b/Framework/Geometry/inc/MantidGeometry/Crystal/PeakShape.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Crystal/PeakTransform.h b/Framework/Geometry/inc/MantidGeometry/Crystal/PeakTransform.h index f0f9804670f21480fb387212819ca0d5ea1cb5a8..8be7debd5af19e0dca84621d80032cf72a0897a7 100644 --- a/Framework/Geometry/inc/MantidGeometry/Crystal/PeakTransform.h +++ b/Framework/Geometry/inc/MantidGeometry/Crystal/PeakTransform.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Crystal/PeakTransformFactory.h b/Framework/Geometry/inc/MantidGeometry/Crystal/PeakTransformFactory.h index d4e3191a69f0a286171a172eafdc6407db895c93..e6ceae43d0df035c627fddbda52b3c9874bad476 100644 --- a/Framework/Geometry/inc/MantidGeometry/Crystal/PeakTransformFactory.h +++ b/Framework/Geometry/inc/MantidGeometry/Crystal/PeakTransformFactory.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Crystal/PeakTransformHKL.h b/Framework/Geometry/inc/MantidGeometry/Crystal/PeakTransformHKL.h index 736ee923f430dfefc1cb42b186734fd8f5716ad1..1d7b36f39cfd48389a8b0f533833bf4eae353dd7 100644 --- a/Framework/Geometry/inc/MantidGeometry/Crystal/PeakTransformHKL.h +++ b/Framework/Geometry/inc/MantidGeometry/Crystal/PeakTransformHKL.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Crystal/PeakTransformQLab.h b/Framework/Geometry/inc/MantidGeometry/Crystal/PeakTransformQLab.h index 88d01814312530d8ca67fa6533b17c85dddeb856..909b6912f1365bed4f62507e47e822eebe67bd4e 100644 --- a/Framework/Geometry/inc/MantidGeometry/Crystal/PeakTransformQLab.h +++ b/Framework/Geometry/inc/MantidGeometry/Crystal/PeakTransformQLab.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Crystal/PeakTransformQSample.h b/Framework/Geometry/inc/MantidGeometry/Crystal/PeakTransformQSample.h index 81a2feea26b75bed7045ab41931f7041b7bdc080..4dc69223b2d868d68bd8d0fb5e52b1448a9aa85e 100644 --- a/Framework/Geometry/inc/MantidGeometry/Crystal/PeakTransformQSample.h +++ b/Framework/Geometry/inc/MantidGeometry/Crystal/PeakTransformQSample.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Crystal/PeakTransformSelector.h b/Framework/Geometry/inc/MantidGeometry/Crystal/PeakTransformSelector.h index c927a69916c9f21e335eae21f1f3a6e6147c9ed8..12cfb9f9ecf42dcde44aab5ac24401342f5f7de2 100644 --- a/Framework/Geometry/inc/MantidGeometry/Crystal/PeakTransformSelector.h +++ b/Framework/Geometry/inc/MantidGeometry/Crystal/PeakTransformSelector.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -21,15 +21,15 @@ public: /// Constructor PeakTransformSelector(); /// Register a candidate factory - void registerCandidate(PeakTransformFactory_sptr candidate); + void registerCandidate(const PeakTransformFactory_sptr &candidate); /// Make choice - PeakTransformFactory_sptr makeChoice(const std::string labelX, - const std::string labelY) const; + PeakTransformFactory_sptr makeChoice(const std::string &labelX, + const std::string &labelY) const; /// Make default choice PeakTransformFactory_sptr makeDefaultChoice() const; /// Has a factory capable of the requested transform. - bool hasFactoryForTransform(const std::string labelX, - const std::string labelY) const; + bool hasFactoryForTransform(const std::string &labelX, + const std::string &labelY) const; /// Get the number of registered factories size_t numberRegistered() const; diff --git a/Framework/Geometry/inc/MantidGeometry/Crystal/PointGroup.h b/Framework/Geometry/inc/MantidGeometry/Crystal/PointGroup.h index 0705b53ef095f2b981ba910b7cdf99e2f6ad96d0..7fcbbc694320c6a4553593d1599234adca321463 100644 --- a/Framework/Geometry/inc/MantidGeometry/Crystal/PointGroup.h +++ b/Framework/Geometry/inc/MantidGeometry/Crystal/PointGroup.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Crystal/PointGroupFactory.h b/Framework/Geometry/inc/MantidGeometry/Crystal/PointGroupFactory.h index 9daff821777edea933935493f9af38a41cc91b46..4b786bdf0cf0bb964ab723a2e1e15dd18ad0e9ec 100644 --- a/Framework/Geometry/inc/MantidGeometry/Crystal/PointGroupFactory.h +++ b/Framework/Geometry/inc/MantidGeometry/Crystal/PointGroupFactory.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Crystal/ProductOfCyclicGroups.h b/Framework/Geometry/inc/MantidGeometry/Crystal/ProductOfCyclicGroups.h index 433f3741f9900ffceef1127a4f8c03cdc4e5746a..93e6f0030cb4d4c49b45be08c8b1889a37a4d5ea 100644 --- a/Framework/Geometry/inc/MantidGeometry/Crystal/ProductOfCyclicGroups.h +++ b/Framework/Geometry/inc/MantidGeometry/Crystal/ProductOfCyclicGroups.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Crystal/ReducedCell.h b/Framework/Geometry/inc/MantidGeometry/Crystal/ReducedCell.h index fd10f7a13942de9a79361356b36d2dd19df9277f..889b3046f9f17a76e9457e80f56a5b9706f591eb 100644 --- a/Framework/Geometry/inc/MantidGeometry/Crystal/ReducedCell.h +++ b/Framework/Geometry/inc/MantidGeometry/Crystal/ReducedCell.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Crystal/ReflectionCondition.h b/Framework/Geometry/inc/MantidGeometry/Crystal/ReflectionCondition.h index 4440efa22939bad85ac1e464a81cd64379a1cafd..204341192155dcddbe55cdd66a1dc0b64a203a52 100644 --- a/Framework/Geometry/inc/MantidGeometry/Crystal/ReflectionCondition.h +++ b/Framework/Geometry/inc/MantidGeometry/Crystal/ReflectionCondition.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Crystal/ReflectionGenerator.h b/Framework/Geometry/inc/MantidGeometry/Crystal/ReflectionGenerator.h index b390b1e622cce7871de9185c5e160c043629bac5..e1f62dd93cd1d823ed5f2b718583602fb4e0a9a1 100644 --- a/Framework/Geometry/inc/MantidGeometry/Crystal/ReflectionGenerator.h +++ b/Framework/Geometry/inc/MantidGeometry/Crystal/ReflectionGenerator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -105,12 +105,12 @@ public: std::vector<Kernel::V3D> getHKLs(double dMin, double dMax) const; std::vector<Kernel::V3D> getHKLs(double dMin, double dMax, - HKLFilter_const_sptr reflectionConditionFilter) const; + const HKLFilter_const_sptr &reflectionConditionFilter) const; std::vector<Kernel::V3D> getUniqueHKLs(double dMin, double dMax) const; std::vector<Kernel::V3D> getUniqueHKLs(double dMin, double dMax, - HKLFilter_const_sptr reflectionConditionFilter) const; + const HKLFilter_const_sptr &reflectionConditionFilter) const; std::vector<double> getDValues(const std::vector<Kernel::V3D> &hkls) const; std::vector<double> getFsSquared(const std::vector<Kernel::V3D> &hkls) const; diff --git a/Framework/Geometry/inc/MantidGeometry/Crystal/ScalarUtils.h b/Framework/Geometry/inc/MantidGeometry/Crystal/ScalarUtils.h index 9657bcfd3c507d27d03455abb3538bde23763922..4a4be3ba23e534a1e4d9f17b21161417e07f1d10 100644 --- a/Framework/Geometry/inc/MantidGeometry/Crystal/ScalarUtils.h +++ b/Framework/Geometry/inc/MantidGeometry/Crystal/ScalarUtils.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /* File: Scalar_Utils.h */ diff --git a/Framework/Geometry/inc/MantidGeometry/Crystal/SpaceGroup.h b/Framework/Geometry/inc/MantidGeometry/Crystal/SpaceGroup.h index 80a94f38db8f7ac40ecf05a59e1525434bea09b0..f9bbe72f5ea85de7d68e551dae8c0d10a2bceb8b 100644 --- a/Framework/Geometry/inc/MantidGeometry/Crystal/SpaceGroup.h +++ b/Framework/Geometry/inc/MantidGeometry/Crystal/SpaceGroup.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Crystal/SpaceGroupFactory.h b/Framework/Geometry/inc/MantidGeometry/Crystal/SpaceGroupFactory.h index 2ebd7cf6642f505ca17c64300c14f10874be17b6..d0c4ffcef036fe5cb17149494d5ac4b07938fa50 100644 --- a/Framework/Geometry/inc/MantidGeometry/Crystal/SpaceGroupFactory.h +++ b/Framework/Geometry/inc/MantidGeometry/Crystal/SpaceGroupFactory.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -236,7 +236,7 @@ protected: SpaceGroup_const_sptr getPrototype(const std::string &hmSymbol); void subscribe(const AbstractSpaceGroupGenerator_sptr &generator); SpaceGroup_const_sptr - constructFromPrototype(const SpaceGroup_const_sptr prototype) const; + constructFromPrototype(const SpaceGroup_const_sptr &prototype) const; void fillPointGroupMap(); diff --git a/Framework/Geometry/inc/MantidGeometry/Crystal/StructureFactorCalculator.h b/Framework/Geometry/inc/MantidGeometry/Crystal/StructureFactorCalculator.h index 6af3f26b9c6de948bcbcdcd2147f07ee91653877..20897c4d092234c06ccc71bc75b2a521be55ab80 100644 --- a/Framework/Geometry/inc/MantidGeometry/Crystal/StructureFactorCalculator.h +++ b/Framework/Geometry/inc/MantidGeometry/Crystal/StructureFactorCalculator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Crystal/StructureFactorCalculatorSummation.h b/Framework/Geometry/inc/MantidGeometry/Crystal/StructureFactorCalculatorSummation.h index fa27b0196274a0f6e82bbfc8c5c2405efa698baf..3aecb3efec1c540c23d8262e98a6f92a7ebdf6c9 100644 --- a/Framework/Geometry/inc/MantidGeometry/Crystal/StructureFactorCalculatorSummation.h +++ b/Framework/Geometry/inc/MantidGeometry/Crystal/StructureFactorCalculatorSummation.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Crystal/SymmetryElement.h b/Framework/Geometry/inc/MantidGeometry/Crystal/SymmetryElement.h index 1e99515d891ccb204a80bade4631efe552d446f5..4bf523b047ec70fc2ddc61d2de25abaa49e958f2 100644 --- a/Framework/Geometry/inc/MantidGeometry/Crystal/SymmetryElement.h +++ b/Framework/Geometry/inc/MantidGeometry/Crystal/SymmetryElement.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Crystal/SymmetryElementFactory.h b/Framework/Geometry/inc/MantidGeometry/Crystal/SymmetryElementFactory.h index 3e6020aa522d386012b890502f6309e52a5375a5..e96af66f27c62e9cd5db3732801a920acd2e6a85 100644 --- a/Framework/Geometry/inc/MantidGeometry/Crystal/SymmetryElementFactory.h +++ b/Framework/Geometry/inc/MantidGeometry/Crystal/SymmetryElementFactory.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Crystal/SymmetryOperation.h b/Framework/Geometry/inc/MantidGeometry/Crystal/SymmetryOperation.h index 0c6c039c9104686243aa1e8cf066fe82797045e6..8e592202abe64f5c1319c7051f543f5265203e63 100644 --- a/Framework/Geometry/inc/MantidGeometry/Crystal/SymmetryOperation.h +++ b/Framework/Geometry/inc/MantidGeometry/Crystal/SymmetryOperation.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Crystal/SymmetryOperationFactory.h b/Framework/Geometry/inc/MantidGeometry/Crystal/SymmetryOperationFactory.h index fdd1eee178ec66d7d032302c9aa940660188510f..523d73ef4c733f7ae5d3dc432fe08124c1555b42 100644 --- a/Framework/Geometry/inc/MantidGeometry/Crystal/SymmetryOperationFactory.h +++ b/Framework/Geometry/inc/MantidGeometry/Crystal/SymmetryOperationFactory.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Crystal/SymmetryOperationSymbolParser.h b/Framework/Geometry/inc/MantidGeometry/Crystal/SymmetryOperationSymbolParser.h index 85873b84c34651b99194bddf05ed23e3950a6cbd..13124eb1bee7f782899fc409b8e36d735c04b136 100644 --- a/Framework/Geometry/inc/MantidGeometry/Crystal/SymmetryOperationSymbolParser.h +++ b/Framework/Geometry/inc/MantidGeometry/Crystal/SymmetryOperationSymbolParser.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Crystal/UnitCell.h b/Framework/Geometry/inc/MantidGeometry/Crystal/UnitCell.h index 65628c9b65ec88647ddb38067a92ed8ffc5da64c..c84c586d813e4212fa89432fcb48f75d79c9284f 100644 --- a/Framework/Geometry/inc/MantidGeometry/Crystal/UnitCell.h +++ b/Framework/Geometry/inc/MantidGeometry/Crystal/UnitCell.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Crystal/V3R.h b/Framework/Geometry/inc/MantidGeometry/Crystal/V3R.h index e18d1b06ca3f7563d3b0ce7e8be4cb96d6dc02ab..fbfab7e260ee8480b808fc378d89195181017b32 100644 --- a/Framework/Geometry/inc/MantidGeometry/Crystal/V3R.h +++ b/Framework/Geometry/inc/MantidGeometry/Crystal/V3R.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/DllConfig.h b/Framework/Geometry/inc/MantidGeometry/DllConfig.h index e327e54f7f0f7db8f8a1654bcb27b8c236984574..3635fa16a5adbbea3ccf205149765b9e3fc4eb44 100644 --- a/Framework/Geometry/inc/MantidGeometry/DllConfig.h +++ b/Framework/Geometry/inc/MantidGeometry/DllConfig.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/ICompAssembly.h b/Framework/Geometry/inc/MantidGeometry/ICompAssembly.h index 091c7d033f2e956e1b2d1e8d9b938cbd4730b6a6..3723e018bf93de40b7dcb5a7222cab53bbaf2352 100644 --- a/Framework/Geometry/inc/MantidGeometry/ICompAssembly.h +++ b/Framework/Geometry/inc/MantidGeometry/ICompAssembly.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/IComponent.h b/Framework/Geometry/inc/MantidGeometry/IComponent.h index 227bad24012d6a94610c1b1910c75f64a86582c8..16dace0705bd60399466690427bf5e33ca8b1c28 100644 --- a/Framework/Geometry/inc/MantidGeometry/IComponent.h +++ b/Framework/Geometry/inc/MantidGeometry/IComponent.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/IDTypes.h b/Framework/Geometry/inc/MantidGeometry/IDTypes.h index ec14172bbefb73eb7f5e6af793733f04f8c29875..261e1a6b1576f70fb85bb7cb4ad5a8347e7b7c19 100644 --- a/Framework/Geometry/inc/MantidGeometry/IDTypes.h +++ b/Framework/Geometry/inc/MantidGeometry/IDTypes.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once //------------------------------------------------------------------------------ diff --git a/Framework/Geometry/inc/MantidGeometry/IDetector.h b/Framework/Geometry/inc/MantidGeometry/IDetector.h index 05786226a4b812e754f1da5bc2870a231bdb98f8..d3bcabbb6aae0d99733031510e747452c37daa3c 100644 --- a/Framework/Geometry/inc/MantidGeometry/IDetector.h +++ b/Framework/Geometry/inc/MantidGeometry/IDetector.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/IDetector_fwd.h b/Framework/Geometry/inc/MantidGeometry/IDetector_fwd.h index 7aba4ba4a6c845be365b2cd0351838783163ffd7..4ff03172322596656953500ae81e886ba0bc6c0c 100644 --- a/Framework/Geometry/inc/MantidGeometry/IDetector_fwd.h +++ b/Framework/Geometry/inc/MantidGeometry/IDetector_fwd.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/IObjComponent.h b/Framework/Geometry/inc/MantidGeometry/IObjComponent.h index b60c01dce71c9a589676bab4aa04d9996dd8e10e..42333592150a7db80e77eca913e4bb85fd7b3d2d 100644 --- a/Framework/Geometry/inc/MantidGeometry/IObjComponent.h +++ b/Framework/Geometry/inc/MantidGeometry/IObjComponent.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Instrument.h b/Framework/Geometry/inc/MantidGeometry/Instrument.h index fc15d08504633e4fe7429586805f35fd57261dbd..48fcfc2fc8c0c27c4cf6bc190565e8286b1a4ce0 100644 --- a/Framework/Geometry/inc/MantidGeometry/Instrument.h +++ b/Framework/Geometry/inc/MantidGeometry/Instrument.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -48,8 +48,8 @@ public: /// String description of the type of component std::string type() const override { return "Instrument"; } - Instrument(const boost::shared_ptr<const Instrument> instr, - boost::shared_ptr<ParameterMap> map); + Instrument(const boost::shared_ptr<const Instrument> &instr, + const boost::shared_ptr<ParameterMap> &map); Instrument(); Instrument(const std::string &name); Instrument(const Instrument &); diff --git a/Framework/Geometry/inc/MantidGeometry/Instrument/CompAssembly.h b/Framework/Geometry/inc/MantidGeometry/Instrument/CompAssembly.h index 963f91e1c0eabfd49ebb71ad7437f2381eb54343..0217a7a630b888d0f912f277186a2f60188657d7 100644 --- a/Framework/Geometry/inc/MantidGeometry/Instrument/CompAssembly.h +++ b/Framework/Geometry/inc/MantidGeometry/Instrument/CompAssembly.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidGeometry/DllConfig.h" diff --git a/Framework/Geometry/inc/MantidGeometry/Instrument/Component.h b/Framework/Geometry/inc/MantidGeometry/Instrument/Component.h index a258235dcdb241c679c2f7c9a9eebd6fc309933a..349b8ab7b631bf344fd269418564e4b9065f74c4 100644 --- a/Framework/Geometry/inc/MantidGeometry/Instrument/Component.h +++ b/Framework/Geometry/inc/MantidGeometry/Instrument/Component.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Instrument/ComponentHelper.h b/Framework/Geometry/inc/MantidGeometry/Instrument/ComponentHelper.h index f89242d34b28566d1066f09277d806110a9cfe76..8b7787ffcc0e0827a84557f62bb426ff391237fa 100644 --- a/Framework/Geometry/inc/MantidGeometry/Instrument/ComponentHelper.h +++ b/Framework/Geometry/inc/MantidGeometry/Instrument/ComponentHelper.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Instrument/ComponentInfo.h b/Framework/Geometry/inc/MantidGeometry/Instrument/ComponentInfo.h index 0ac0ae77d4bf22d2e56266836be59637c3e48519..1b0354b68dddcf7a2fe6944c39928ab594de0039 100644 --- a/Framework/Geometry/inc/MantidGeometry/Instrument/ComponentInfo.h +++ b/Framework/Geometry/inc/MantidGeometry/Instrument/ComponentInfo.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Instrument/ComponentInfoBankHelpers.h b/Framework/Geometry/inc/MantidGeometry/Instrument/ComponentInfoBankHelpers.h index fa244b65a053b52f963f1f0d495bdcf49d1e7578..4a86235fbae940a2b5d8a51285a772b5774d68fc 100644 --- a/Framework/Geometry/inc/MantidGeometry/Instrument/ComponentInfoBankHelpers.h +++ b/Framework/Geometry/inc/MantidGeometry/Instrument/ComponentInfoBankHelpers.h @@ -1,3 +1,9 @@ +// Mantid Repository : https://github.com/mantidproject/mantid +// +// Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS +// SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidGeometry/DllConfig.h" diff --git a/Framework/Geometry/inc/MantidGeometry/Instrument/ComponentInfoItem.h b/Framework/Geometry/inc/MantidGeometry/Instrument/ComponentInfoItem.h index 1afa346425c20da237cafcefb0067e272d71a21a..11135206d26cae38e234ee861d3bd2d816238eff 100644 --- a/Framework/Geometry/inc/MantidGeometry/Instrument/ComponentInfoItem.h +++ b/Framework/Geometry/inc/MantidGeometry/Instrument/ComponentInfoItem.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Instrument/ComponentInfoIterator.h b/Framework/Geometry/inc/MantidGeometry/Instrument/ComponentInfoIterator.h index 57ac3b2efb17f020399d72c7377a4bcb33ed7be2..f7a76d37783ba99b041b01fa0606354286722197 100644 --- a/Framework/Geometry/inc/MantidGeometry/Instrument/ComponentInfoIterator.h +++ b/Framework/Geometry/inc/MantidGeometry/Instrument/ComponentInfoIterator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Instrument/ComponentVisitor.h b/Framework/Geometry/inc/MantidGeometry/Instrument/ComponentVisitor.h index 3d72ae4e92583921738fbb96bfd1b5c2cf479a80..d1df8bc7dd1e554ac9cdb547a413026be9a6e67d 100644 --- a/Framework/Geometry/inc/MantidGeometry/Instrument/ComponentVisitor.h +++ b/Framework/Geometry/inc/MantidGeometry/Instrument/ComponentVisitor.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Instrument/Container.h b/Framework/Geometry/inc/MantidGeometry/Instrument/Container.h index 3d6252f3dc4fd68526d2280876157dc9c30d9c76..2611cd607b420694c8d12c0a36729ad1d867aa50 100644 --- a/Framework/Geometry/inc/MantidGeometry/Instrument/Container.h +++ b/Framework/Geometry/inc/MantidGeometry/Instrument/Container.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Instrument/Detector.h b/Framework/Geometry/inc/MantidGeometry/Instrument/Detector.h index 6ad6097b938eb9c50cf69cc6ce4e30a5cc19f97e..640bcd5bc6bcebf2376eb0c01ce6700ca2ebdd96 100644 --- a/Framework/Geometry/inc/MantidGeometry/Instrument/Detector.h +++ b/Framework/Geometry/inc/MantidGeometry/Instrument/Detector.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -34,8 +34,8 @@ public: std::string type() const override { return "DetectorComponent"; } Detector(const std::string &name, int id, IComponent *parent); - Detector(const std::string &name, int id, boost::shared_ptr<IObject> shape, - IComponent *parent); + Detector(const std::string &name, int id, + const boost::shared_ptr<IObject> &shape, IComponent *parent); // functions inherited from IObjectComponent Component *clone() const override { return new Detector(*this); } diff --git a/Framework/Geometry/inc/MantidGeometry/Instrument/DetectorGroup.h b/Framework/Geometry/inc/MantidGeometry/Instrument/DetectorGroup.h index a1902ecc91df66d4522051e7cd6f037bab8694ac..1dcaa928b670281591db005cbca3944f692c04a3 100644 --- a/Framework/Geometry/inc/MantidGeometry/Instrument/DetectorGroup.h +++ b/Framework/Geometry/inc/MantidGeometry/Instrument/DetectorGroup.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -30,7 +30,7 @@ public: DetectorGroup(); DetectorGroup(const std::vector<IDetector_const_sptr> &dets); - void addDetector(IDetector_const_sptr det); + void addDetector(const IDetector_const_sptr &det); // IDetector methods IDetector *cloneParameterized(const ParameterMap *) const override { diff --git a/Framework/Geometry/inc/MantidGeometry/Instrument/DetectorInfo.h b/Framework/Geometry/inc/MantidGeometry/Instrument/DetectorInfo.h index a5ddee6c290c22cbd9dd140f26f4683bebdb90a0..34b94e1540f475c77fae4d202b95c2534df87960 100644 --- a/Framework/Geometry/inc/MantidGeometry/Instrument/DetectorInfo.h +++ b/Framework/Geometry/inc/MantidGeometry/Instrument/DetectorInfo.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Instrument/DetectorInfoItem.h b/Framework/Geometry/inc/MantidGeometry/Instrument/DetectorInfoItem.h index 43c0b41b9a9b7cea33e557a8a6ba1bc401d82797..cb46fe6808ec9cd4060fa52d0bee952486b1634a 100644 --- a/Framework/Geometry/inc/MantidGeometry/Instrument/DetectorInfoItem.h +++ b/Framework/Geometry/inc/MantidGeometry/Instrument/DetectorInfoItem.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Instrument/DetectorInfoIterator.h b/Framework/Geometry/inc/MantidGeometry/Instrument/DetectorInfoIterator.h index 55ef41ace236dbb5f53225b6b8ceb8c7fe758f8c..0d10363e37af0e703d8b64eef4db41a43831be67 100644 --- a/Framework/Geometry/inc/MantidGeometry/Instrument/DetectorInfoIterator.h +++ b/Framework/Geometry/inc/MantidGeometry/Instrument/DetectorInfoIterator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Instrument/FitParameter.h b/Framework/Geometry/inc/MantidGeometry/Instrument/FitParameter.h index cb3b115f84e92575f02370c884c8a0186956262f..c078ea0739fc37c115f790d1ca4779deab781a2f 100644 --- a/Framework/Geometry/inc/MantidGeometry/Instrument/FitParameter.h +++ b/Framework/Geometry/inc/MantidGeometry/Instrument/FitParameter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Instrument/Goniometer.h b/Framework/Geometry/inc/MantidGeometry/Instrument/Goniometer.h index 7a673cfcef7cd865bf609bf2acfb99f7cfb7267a..e09c1b7301e6ba95ea4f81b8f1150747d972a45f 100644 --- a/Framework/Geometry/inc/MantidGeometry/Instrument/Goniometer.h +++ b/Framework/Geometry/inc/MantidGeometry/Instrument/Goniometer.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -11,6 +11,7 @@ #include "MantidKernel/V3D.h" #include <nexus/NeXusFile.hpp> #include <string> +#include <utility> namespace Mantid { namespace Geometry { @@ -43,8 +44,8 @@ struct GoniometerAxis { /// Constructor GoniometerAxis(std::string initname, Kernel::V3D initrotationaxis, double initangle, int initsense, int initangleunit) - : name(initname), rotationaxis(initrotationaxis), angle(initangle), - sense(initsense), angleunit(initangleunit) {} + : name(std::move(initname)), rotationaxis(initrotationaxis), + angle(initangle), sense(initsense), angleunit(initangleunit) {} GoniometerAxis() : name(""), rotationaxis(), angle(0.), sense(0), angleunit(0) {} @@ -57,7 +58,7 @@ public: // Default constructor Goniometer(); // Constructor from a rotation matrix - Goniometer(Kernel::DblMatrix rot); + Goniometer(const Kernel::DblMatrix &rot); // Default destructor virtual ~Goniometer() = default; // Return rotation matrix @@ -67,11 +68,12 @@ public: // Return information about axes std::string axesInfo(); // Add axis to goniometer - void pushAxis(std::string name, double axisx, double axisy, double axisz, - double angle = 0., int sense = CCW, int angUnit = angDegrees); + void pushAxis(const std::string &name, double axisx, double axisy, + double axisz, double angle = 0., int sense = CCW, + int angUnit = angDegrees); // Set rotation angle for an axis in the units the angle is set (default -- // degrees) - void setRotationAngle(std::string name, double value); + void setRotationAngle(const std::string &name, double value); // Set rotation angle for an axis in the units the angle is set (default -- // degrees) void setRotationAngle(size_t axisnumber, double value); @@ -83,13 +85,13 @@ public: // Get axis object const GoniometerAxis &getAxis(size_t axisnumber) const; // Get axis object - const GoniometerAxis &getAxis(std::string axisname) const; + const GoniometerAxis &getAxis(const std::string &axisname) const; // Return the number of axes size_t getNumberAxes() const; // Make a default universal goniometer void makeUniversalGoniometer(); // Return Euler angles acording to a convention - std::vector<double> getEulerAngles(std::string convention = "YZX"); + std::vector<double> getEulerAngles(const std::string &convention = "YZX"); void saveNexus(::NeXus::File *file, const std::string &group) const; void loadNexus(::NeXus::File *file, const std::string &group); diff --git a/Framework/Geometry/inc/MantidGeometry/Instrument/GridDetector.h b/Framework/Geometry/inc/MantidGeometry/Instrument/GridDetector.h index 27dc78cf4e59e1bdb772eaa3b60d5e446fe3de44..b86748b804dee9ba2a564961bda9b0cf7d111470 100644 --- a/Framework/Geometry/inc/MantidGeometry/Instrument/GridDetector.h +++ b/Framework/Geometry/inc/MantidGeometry/Instrument/GridDetector.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidGeometry/DllConfig.h" diff --git a/Framework/Geometry/inc/MantidGeometry/Instrument/GridDetectorPixel.h b/Framework/Geometry/inc/MantidGeometry/Instrument/GridDetectorPixel.h index 16f3d63b4aa3546ead468ce79bc9796fca1a1a1b..6d638a04a11c62e990f3c7f62725fcdc8540e09f 100644 --- a/Framework/Geometry/inc/MantidGeometry/Instrument/GridDetectorPixel.h +++ b/Framework/Geometry/inc/MantidGeometry/Instrument/GridDetectorPixel.h @@ -1,3 +1,9 @@ +// Mantid Repository : https://github.com/mantidproject/mantid +// +// Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS +// SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidGeometry/IComponent.h" @@ -19,27 +25,6 @@ The position of the pixel is calculated on the fly from the row/column/plane of the pixel and the size of the parent (which is parametrized). @date 2018-09-28 - -Copyright © 2018 ISIS Rutherford Appleton Laboratory, NScD Oak Ridge -National Laboratory & European Spallation Source - -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 GridDetectorPixel : public Detector { friend class GridDetector; @@ -49,7 +34,7 @@ public: virtual std::string type() const override { return "GridDetectorPixel"; } GridDetectorPixel(const std::string &name, int id, - boost::shared_ptr<IObject> shape, IComponent *parent, + const boost::shared_ptr<IObject> &shape, IComponent *parent, const GridDetector *panel, size_t col, size_t row, size_t layer); diff --git a/Framework/Geometry/inc/MantidGeometry/Instrument/IDFObject.h b/Framework/Geometry/inc/MantidGeometry/Instrument/IDFObject.h index d8656cb18b12bd2d4537fff23c137571a039e6f6..943d877084fa9cfd642d9413b72408becad6ff16 100644 --- a/Framework/Geometry/inc/MantidGeometry/Instrument/IDFObject.h +++ b/Framework/Geometry/inc/MantidGeometry/Instrument/IDFObject.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Instrument/InfoIteratorBase.h b/Framework/Geometry/inc/MantidGeometry/Instrument/InfoIteratorBase.h index a8e414043d0de1bf28debde206d330d05e962ff1..cd9a6e4e81fa5986c0eda7565527a124a3ff8d03 100644 --- a/Framework/Geometry/inc/MantidGeometry/Instrument/InfoIteratorBase.h +++ b/Framework/Geometry/inc/MantidGeometry/Instrument/InfoIteratorBase.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Instrument/InstrumentDefinitionParser.h b/Framework/Geometry/inc/MantidGeometry/Instrument/InstrumentDefinitionParser.h index 8c2a48f2cb8fa7fc3ad777f97eaf1b343414ee01..216f9883eab3dfa57c560a4ff11dac9b1db65fa8 100644 --- a/Framework/Geometry/inc/MantidGeometry/Instrument/InstrumentDefinitionParser.h +++ b/Framework/Geometry/inc/MantidGeometry/Instrument/InstrumentDefinitionParser.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -47,8 +47,8 @@ public: InstrumentDefinitionParser(const std::string &filename, const std::string &instName, const std::string &xmlText); - InstrumentDefinitionParser(const IDFObject_const_sptr xmlFile, - const IDFObject_const_sptr expectedCacheFile, + InstrumentDefinitionParser(const IDFObject_const_sptr &xmlFile, + const IDFObject_const_sptr &expectedCacheFile, const std::string &instName, const std::string &xmlText); ~InstrumentDefinitionParser() = default; @@ -153,7 +153,7 @@ private: const Poco::XML::Element *pCompElem, IdList &idList); /// Return true if assembly, false if not assembly and throws exception if /// string not in assembly - bool isAssembly(std::string) const; + bool isAssembly(const std::string &) const; /// Add XML element to parent assuming the element contains no other component /// elements @@ -263,7 +263,7 @@ private: Poco::XML::Element *pRootElem); /// Check IdList - void checkIdListExistsAndDefinesEnoughIDs(IdList idList, + void checkIdListExistsAndDefinesEnoughIDs(const IdList &idList, Poco::XML::Element *pElem, const std::string &filename) const; @@ -290,7 +290,7 @@ public: // for testing private: /// Reads from a cache file. - void applyCache(IDFObject_const_sptr cacheToApply); + void applyCache(const IDFObject_const_sptr &cacheToApply); /// Write out a cache file. CachingOption writeAndApplyCache(IDFObject_const_sptr firstChoiceCache, diff --git a/Framework/Geometry/inc/MantidGeometry/Instrument/InstrumentVisitor.h b/Framework/Geometry/inc/MantidGeometry/Instrument/InstrumentVisitor.h index 211efca7b122329afaa2ed29a49058840b208bc6..2fafa9c33d25dafdbed7fa350cf7f3aaa8cd5afa 100644 --- a/Framework/Geometry/inc/MantidGeometry/Instrument/InstrumentVisitor.h +++ b/Framework/Geometry/inc/MantidGeometry/Instrument/InstrumentVisitor.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Instrument/ObjCompAssembly.h b/Framework/Geometry/inc/MantidGeometry/Instrument/ObjCompAssembly.h index ab39a271b7044a7ce737e7f199bc73425c8cd61d..dfd9bb6879a3d8b21c021c0dee54246e761870a7 100644 --- a/Framework/Geometry/inc/MantidGeometry/Instrument/ObjCompAssembly.h +++ b/Framework/Geometry/inc/MantidGeometry/Instrument/ObjCompAssembly.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidGeometry/DllConfig.h" diff --git a/Framework/Geometry/inc/MantidGeometry/Instrument/ObjComponent.h b/Framework/Geometry/inc/MantidGeometry/Instrument/ObjComponent.h index d68c808bc150b5b4d53428badd51a9c54db86bdb..c8f300659a9b15eded87a3960ebbf3b26a06ddd0 100644 --- a/Framework/Geometry/inc/MantidGeometry/Instrument/ObjComponent.h +++ b/Framework/Geometry/inc/MantidGeometry/Instrument/ObjComponent.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Instrument/ParComponentFactory.h b/Framework/Geometry/inc/MantidGeometry/Instrument/ParComponentFactory.h index 7ffbde96fff9640658375f9a92866e9b123993fe..572eba65c9037f634364935e9770935bc93504bc 100644 --- a/Framework/Geometry/inc/MantidGeometry/Instrument/ParComponentFactory.h +++ b/Framework/Geometry/inc/MantidGeometry/Instrument/ParComponentFactory.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once //------------------------------------------------------------------------------ @@ -44,7 +44,8 @@ public: /// Create a parameterized component from the given base component and /// ParameterMap static boost::shared_ptr<IComponent> - create(boost::shared_ptr<const IComponent> base, const ParameterMap *map); + create(const boost::shared_ptr<const IComponent> &base, + const ParameterMap *map); }; } // Namespace Geometry diff --git a/Framework/Geometry/inc/MantidGeometry/Instrument/Parameter.h b/Framework/Geometry/inc/MantidGeometry/Instrument/Parameter.h index fbf60f640a41c3b7e252118a16b7f00401f79aa9..1e6731063010f328939e119eb2bd89a363775ba1 100644 --- a/Framework/Geometry/inc/MantidGeometry/Instrument/Parameter.h +++ b/Framework/Geometry/inc/MantidGeometry/Instrument/Parameter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Instrument/ParameterFactory.h b/Framework/Geometry/inc/MantidGeometry/Instrument/ParameterFactory.h index 76419226e1089232edce496d19c0969b7abac083..a5e7d23297dec1a6aa380d523ffa075d5fb92b78 100644 --- a/Framework/Geometry/inc/MantidGeometry/Instrument/ParameterFactory.h +++ b/Framework/Geometry/inc/MantidGeometry/Instrument/ParameterFactory.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Instrument/ParameterMap.h b/Framework/Geometry/inc/MantidGeometry/Instrument/ParameterMap.h index 9eac249730b3b585cd39449ed106967c1c520379..c89bae375b5ead74cc4ebb6d752fd1f90628c324 100644 --- a/Framework/Geometry/inc/MantidGeometry/Instrument/ParameterMap.h +++ b/Framework/Geometry/inc/MantidGeometry/Instrument/ParameterMap.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Instrument/RectangularDetector.h b/Framework/Geometry/inc/MantidGeometry/Instrument/RectangularDetector.h index 7b9cde4e821f65fc2aae9d62ada1f99d5adbb82d..3582bf332eee432531531ba1bd4933d2e6f96e8e 100644 --- a/Framework/Geometry/inc/MantidGeometry/Instrument/RectangularDetector.h +++ b/Framework/Geometry/inc/MantidGeometry/Instrument/RectangularDetector.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidGeometry/DllConfig.h" diff --git a/Framework/Geometry/inc/MantidGeometry/Instrument/ReferenceFrame.h b/Framework/Geometry/inc/MantidGeometry/Instrument/ReferenceFrame.h index 913ac506d58ece241b34acdeff4135b93ed8591e..e0e57a2ea3aa2ae976eb43158b69b6c60a5277dd 100644 --- a/Framework/Geometry/inc/MantidGeometry/Instrument/ReferenceFrame.h +++ b/Framework/Geometry/inc/MantidGeometry/Instrument/ReferenceFrame.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Instrument/SampleEnvironment.h b/Framework/Geometry/inc/MantidGeometry/Instrument/SampleEnvironment.h index 9a67b6209206904ef87c077e383fd4d484d722b5..e813f64165f1af3013386a4b71487501ba56a4c9 100644 --- a/Framework/Geometry/inc/MantidGeometry/Instrument/SampleEnvironment.h +++ b/Framework/Geometry/inc/MantidGeometry/Instrument/SampleEnvironment.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -25,7 +25,7 @@ class Track; */ class MANTID_GEOMETRY_DLL SampleEnvironment { public: - SampleEnvironment(std::string name, Container_const_sptr getContainer); + SampleEnvironment(std::string name, const Container_const_sptr &getContainer); /// @return The name of kit inline const std::string name() const { return m_name; } diff --git a/Framework/Geometry/inc/MantidGeometry/Instrument/StructuredDetector.h b/Framework/Geometry/inc/MantidGeometry/Instrument/StructuredDetector.h index 3a0d697a6e4bfa8f5b4714eeec270412696159eb..f0b26633ea20f0db385d207e2637fc4454fcebb3 100644 --- a/Framework/Geometry/inc/MantidGeometry/Instrument/StructuredDetector.h +++ b/Framework/Geometry/inc/MantidGeometry/Instrument/StructuredDetector.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Instrument/XMLInstrumentParameter.h b/Framework/Geometry/inc/MantidGeometry/Instrument/XMLInstrumentParameter.h index 7f45f7bfb0fba78756b74a5736d4e8e017f4229c..df2e66d42bd3756b65a312eafd80aa434200ee94 100644 --- a/Framework/Geometry/inc/MantidGeometry/Instrument/XMLInstrumentParameter.h +++ b/Framework/Geometry/inc/MantidGeometry/Instrument/XMLInstrumentParameter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Instrument_fwd.h b/Framework/Geometry/inc/MantidGeometry/Instrument_fwd.h index b7a2784a7df3e572f25fe949995dd293b7a4214e..d76a9b15e17a5c2ef2ea78e08159c626d50c6654 100644 --- a/Framework/Geometry/inc/MantidGeometry/Instrument_fwd.h +++ b/Framework/Geometry/inc/MantidGeometry/Instrument_fwd.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/MDGeometry/CompositeImplicitFunction.h b/Framework/Geometry/inc/MantidGeometry/MDGeometry/CompositeImplicitFunction.h index 2a3ee239ea0003817e7b6e88940afb3c8a67956f..8d40acfdbfe4bae85382bd8b1f9212d252794244 100644 --- a/Framework/Geometry/inc/MantidGeometry/MDGeometry/CompositeImplicitFunction.h +++ b/Framework/Geometry/inc/MantidGeometry/MDGeometry/CompositeImplicitFunction.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -38,8 +38,8 @@ public: using MDImplicitFunction::isPointContained; //----------------------------------------------------------------- - bool - addFunction(Mantid::Geometry::MDImplicitFunction_sptr constituentFunction); + bool addFunction( + const Mantid::Geometry::MDImplicitFunction_sptr &constituentFunction); std::string getName() const override; std::string toXMLString() const override; int getNFunctions() const; diff --git a/Framework/Geometry/inc/MantidGeometry/MDGeometry/GeneralFrame.h b/Framework/Geometry/inc/MantidGeometry/MDGeometry/GeneralFrame.h index 885b80b8169be055ef963b1b50514d55995c1324..deba28d4f86ea08f2dd87e78541b3a552d249ec8 100644 --- a/Framework/Geometry/inc/MantidGeometry/MDGeometry/GeneralFrame.h +++ b/Framework/Geometry/inc/MantidGeometry/MDGeometry/GeneralFrame.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/MDGeometry/HKL.h b/Framework/Geometry/inc/MantidGeometry/MDGeometry/HKL.h index 344c3f51dfcccc811fb678e857790b9d6a52fd51..a48db672077294d2221a15534dfdd58dc262c778 100644 --- a/Framework/Geometry/inc/MantidGeometry/MDGeometry/HKL.h +++ b/Framework/Geometry/inc/MantidGeometry/MDGeometry/HKL.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/MDGeometry/IMDDimension.h b/Framework/Geometry/inc/MantidGeometry/MDGeometry/IMDDimension.h index d2bd6cea02698dad25b3ad9bea67a43854de73bb..a38e7ddf53721ecc1804980b330d298f2c8618a8 100644 --- a/Framework/Geometry/inc/MantidGeometry/MDGeometry/IMDDimension.h +++ b/Framework/Geometry/inc/MantidGeometry/MDGeometry/IMDDimension.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/MDGeometry/IMDDimensionFactory.h b/Framework/Geometry/inc/MantidGeometry/MDGeometry/IMDDimensionFactory.h index 8065ba5807a11d23f6f448494f201c0976fb324e..94534f30949053507ecb3ada326844179f09f5cf 100644 --- a/Framework/Geometry/inc/MantidGeometry/MDGeometry/IMDDimensionFactory.h +++ b/Framework/Geometry/inc/MantidGeometry/MDGeometry/IMDDimensionFactory.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/MDGeometry/MDBoxImplicitFunction.h b/Framework/Geometry/inc/MantidGeometry/MDGeometry/MDBoxImplicitFunction.h index 32a25289a8d5cdb3ed51629d33e8368314002508..7e142555c171d064d0c8beb7b0d4bcb688b346f5 100644 --- a/Framework/Geometry/inc/MantidGeometry/MDGeometry/MDBoxImplicitFunction.h +++ b/Framework/Geometry/inc/MantidGeometry/MDGeometry/MDBoxImplicitFunction.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/MDGeometry/MDDimensionExtents.h b/Framework/Geometry/inc/MantidGeometry/MDGeometry/MDDimensionExtents.h index a8b5546051efbc3c24632ee2fbfa10c0d40afe06..51fac78169eb613ea06462b1927550e927642cbb 100644 --- a/Framework/Geometry/inc/MantidGeometry/MDGeometry/MDDimensionExtents.h +++ b/Framework/Geometry/inc/MantidGeometry/MDGeometry/MDDimensionExtents.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/MDGeometry/MDFrame.h b/Framework/Geometry/inc/MantidGeometry/MDGeometry/MDFrame.h index aaff38f5df0c254980b463cdc1ddd66603b7aa0b..67f8cace4c36445d52ca30d7023f3f6b16c79ebe 100644 --- a/Framework/Geometry/inc/MantidGeometry/MDGeometry/MDFrame.h +++ b/Framework/Geometry/inc/MantidGeometry/MDGeometry/MDFrame.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/MDGeometry/MDFrameFactory.h b/Framework/Geometry/inc/MantidGeometry/MDGeometry/MDFrameFactory.h index 10f55050e6fc09d186aac16bdaa0331efc120fdc..db7bce1e98dd2cbff6dd7e151bc7281ebcf0fcec 100644 --- a/Framework/Geometry/inc/MantidGeometry/MDGeometry/MDFrameFactory.h +++ b/Framework/Geometry/inc/MantidGeometry/MDGeometry/MDFrameFactory.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/MDGeometry/MDGeometryXMLBuilder.h b/Framework/Geometry/inc/MantidGeometry/MDGeometry/MDGeometryXMLBuilder.h index 309041e0366cf2fcf407ac7c788590ffa6cb0310..e5a4a0f408b5fc8f1e91cdc22f2cdbee4de9107c 100644 --- a/Framework/Geometry/inc/MantidGeometry/MDGeometry/MDGeometryXMLBuilder.h +++ b/Framework/Geometry/inc/MantidGeometry/MDGeometry/MDGeometryXMLBuilder.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -41,19 +41,19 @@ public: bool addOrdinaryDimension(IMDDimension_const_sptr dimensionToAdd) const; /// Add many ordinary dimensions. - void addManyOrdinaryDimensions(VecIMDDimension_sptr manyDims) const; + void addManyOrdinaryDimensions(const VecIMDDimension_sptr &manyDims) const; /// Add x dimension. - bool addXDimension(IMDDimension_const_sptr dimension) const; + bool addXDimension(const IMDDimension_const_sptr &dimension) const; /// Add y dimension. - bool addYDimension(IMDDimension_const_sptr dimension) const; + bool addYDimension(const IMDDimension_const_sptr &dimension) const; /// Add z dimension. - bool addZDimension(IMDDimension_const_sptr dimension) const; + bool addZDimension(const IMDDimension_const_sptr &dimension) const; /// Add t dimension. - bool addTDimension(IMDDimension_const_sptr dimension) const; + bool addTDimension(const IMDDimension_const_sptr &dimension) const; /// Copy constructor MDGeometryBuilderXML(const MDGeometryBuilderXML &); diff --git a/Framework/Geometry/inc/MantidGeometry/MDGeometry/MDGeometryXMLDefinitions.h b/Framework/Geometry/inc/MantidGeometry/MDGeometry/MDGeometryXMLDefinitions.h index 247bc0560690eccfde06bfb1ba71049729f20824..9dbf55d69b0be104717919f35322f1bb925295f4 100644 --- a/Framework/Geometry/inc/MantidGeometry/MDGeometry/MDGeometryXMLDefinitions.h +++ b/Framework/Geometry/inc/MantidGeometry/MDGeometry/MDGeometryXMLDefinitions.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/MDGeometry/MDGeometryXMLParser.h b/Framework/Geometry/inc/MantidGeometry/MDGeometry/MDGeometryXMLParser.h index 54b645384b27eb25827bdc2ef40acb327621a8a2..5ee60ef9f817acd0b40598af9841912d848bd86e 100644 --- a/Framework/Geometry/inc/MantidGeometry/MDGeometry/MDGeometryXMLParser.h +++ b/Framework/Geometry/inc/MantidGeometry/MDGeometry/MDGeometryXMLParser.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -78,13 +78,13 @@ public: bool hasTDimension() const; - bool isXDimension(Mantid::Geometry::IMDDimension_sptr) const; + bool isXDimension(const Mantid::Geometry::IMDDimension_sptr &) const; - bool isYDimension(Mantid::Geometry::IMDDimension_sptr) const; + bool isYDimension(const Mantid::Geometry::IMDDimension_sptr &) const; - bool isZDimension(Mantid::Geometry::IMDDimension_sptr) const; + bool isZDimension(const Mantid::Geometry::IMDDimension_sptr &) const; - bool isTDimension(Mantid::Geometry::IMDDimension_sptr) const; + bool isTDimension(const Mantid::Geometry::IMDDimension_sptr &) const; void SetRootNodeCheck(std::string elementName); diff --git a/Framework/Geometry/inc/MantidGeometry/MDGeometry/MDHistoDimension.h b/Framework/Geometry/inc/MantidGeometry/MDGeometry/MDHistoDimension.h index e83d8ee5d9a41aaf51b6a7ea5c06ca3c90422884..9db0adde02d2d60f43ca766c73858cb53c9b77a2 100644 --- a/Framework/Geometry/inc/MantidGeometry/MDGeometry/MDHistoDimension.h +++ b/Framework/Geometry/inc/MantidGeometry/MDGeometry/MDHistoDimension.h @@ -1,11 +1,13 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once +#include <utility> + #include "MantidGeometry/DllConfig.h" #include "MantidGeometry/MDGeometry/IMDDimension.h" #include "MantidGeometry/MDGeometry/MDFrame.h" @@ -38,8 +40,8 @@ public: */ MDHistoDimension(std::string name, std::string ID, const MDFrame &frame, coord_t min, coord_t max, size_t numBins) - : m_name(name), m_dimensionId(ID), m_frame(frame.clone()), m_min(min), - m_max(max), m_numBins(numBins), + : m_name(std::move(name)), m_dimensionId(std::move(ID)), + m_frame(frame.clone()), m_min(min), m_max(max), m_numBins(numBins), m_binWidth((max - min) / static_cast<coord_t>(numBins)) { if (max < min) { throw std::invalid_argument("Error making MDHistoDimension. Cannot have " diff --git a/Framework/Geometry/inc/MantidGeometry/MDGeometry/MDHistoDimensionBuilder.h b/Framework/Geometry/inc/MantidGeometry/MDGeometry/MDHistoDimensionBuilder.h index e5437d5d67a9ed34c46135eb1455c3e4240ccea2..7443fdb7b7d6415374b8f73f4db5fcdc714fdacb 100644 --- a/Framework/Geometry/inc/MantidGeometry/MDGeometry/MDHistoDimensionBuilder.h +++ b/Framework/Geometry/inc/MantidGeometry/MDGeometry/MDHistoDimensionBuilder.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -50,7 +50,7 @@ public: } MDHistoDimensionBuilder(); - void setName(std::string name); + void setName(const std::string &name); void setId(std::string id); void setUnits(const Kernel::UnitLabel &units); void setMin(double min); diff --git a/Framework/Geometry/inc/MantidGeometry/MDGeometry/MDImplicitFunction.h b/Framework/Geometry/inc/MantidGeometry/MDGeometry/MDImplicitFunction.h index 99364bd0effc0867f3694e459c7921d144177df4..cfab71c939ecb721253e124e531b9333852025a3 100644 --- a/Framework/Geometry/inc/MantidGeometry/MDGeometry/MDImplicitFunction.h +++ b/Framework/Geometry/inc/MantidGeometry/MDGeometry/MDImplicitFunction.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/MDGeometry/MDPlane.h b/Framework/Geometry/inc/MantidGeometry/MDGeometry/MDPlane.h index db0ea8c5f5b18d1210153e3708eb1a057bd74e67..331744d169e47c9ef7a7604c134c6f7ce551ff51 100644 --- a/Framework/Geometry/inc/MantidGeometry/MDGeometry/MDPlane.h +++ b/Framework/Geometry/inc/MantidGeometry/MDGeometry/MDPlane.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/MDGeometry/MDPlaneImplicitFunction.h b/Framework/Geometry/inc/MantidGeometry/MDGeometry/MDPlaneImplicitFunction.h index b2c0af05f37bb693f4bbef164bb4754d1004210a..3117e225c923e8103c825f76c18288296a3041f4 100644 --- a/Framework/Geometry/inc/MantidGeometry/MDGeometry/MDPlaneImplicitFunction.h +++ b/Framework/Geometry/inc/MantidGeometry/MDGeometry/MDPlaneImplicitFunction.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/MDGeometry/MDTypes.h b/Framework/Geometry/inc/MantidGeometry/MDGeometry/MDTypes.h index 26416c5c60932fe0009e5f20eeb980be5db6a046..73e9ddfaa382c8dfa7ee04f76bf859f80584d3ee 100644 --- a/Framework/Geometry/inc/MantidGeometry/MDGeometry/MDTypes.h +++ b/Framework/Geometry/inc/MantidGeometry/MDGeometry/MDTypes.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/MDGeometry/MDWorkspaceConstants.h b/Framework/Geometry/inc/MantidGeometry/MDGeometry/MDWorkspaceConstants.h index 69ea05eb4537180e985a75a2efc6348f8cdc51ee..eb92b273446bda614f94a162b1c527f50cb84142 100644 --- a/Framework/Geometry/inc/MantidGeometry/MDGeometry/MDWorkspaceConstants.h +++ b/Framework/Geometry/inc/MantidGeometry/MDGeometry/MDWorkspaceConstants.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once // diff --git a/Framework/Geometry/inc/MantidGeometry/MDGeometry/NullImplicitFunction.h b/Framework/Geometry/inc/MantidGeometry/MDGeometry/NullImplicitFunction.h index f65cb0e39b31f36acc2b01f0ee5ac16c27c36bcc..6de43a1de63d95ff46973774f307c198aef32998 100644 --- a/Framework/Geometry/inc/MantidGeometry/MDGeometry/NullImplicitFunction.h +++ b/Framework/Geometry/inc/MantidGeometry/MDGeometry/NullImplicitFunction.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/MDGeometry/QLab.h b/Framework/Geometry/inc/MantidGeometry/MDGeometry/QLab.h index d4d1627a0205d87fbff01793a3d137363a67ff89..f592438c445f5ef87534a1bbe4f50a5944b03bc9 100644 --- a/Framework/Geometry/inc/MantidGeometry/MDGeometry/QLab.h +++ b/Framework/Geometry/inc/MantidGeometry/MDGeometry/QLab.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/MDGeometry/QSample.h b/Framework/Geometry/inc/MantidGeometry/MDGeometry/QSample.h index 508fbd2efc711bf16143353e5443a52a055d67d0..b5d65d46c56257df2d151998e62ff357f4f268fa 100644 --- a/Framework/Geometry/inc/MantidGeometry/MDGeometry/QSample.h +++ b/Framework/Geometry/inc/MantidGeometry/MDGeometry/QSample.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/MDGeometry/UnknownFrame.h b/Framework/Geometry/inc/MantidGeometry/MDGeometry/UnknownFrame.h index 25f7567a7214e2e3f616a93190aad66b66d4d2c5..02648f07b19c6009ce8350b84d37de5c642e5656 100644 --- a/Framework/Geometry/inc/MantidGeometry/MDGeometry/UnknownFrame.h +++ b/Framework/Geometry/inc/MantidGeometry/MDGeometry/UnknownFrame.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Math/Acomp.h b/Framework/Geometry/inc/MantidGeometry/Math/Acomp.h index b64e49dc03ea7c636d54c192da9cd47954f253b8..0b8fe3112997b63c142f5e886e77153ae4dc260d 100644 --- a/Framework/Geometry/inc/MantidGeometry/Math/Acomp.h +++ b/Framework/Geometry/inc/MantidGeometry/Math/Acomp.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Math/Algebra.h b/Framework/Geometry/inc/MantidGeometry/Math/Algebra.h index 34521da00fbe09ccb8c2320466f7e85538b52c61..bb4d6672d1bb9376f0529d616c58e2915bf80254 100644 --- a/Framework/Geometry/inc/MantidGeometry/Math/Algebra.h +++ b/Framework/Geometry/inc/MantidGeometry/Math/Algebra.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Math/BnId.h b/Framework/Geometry/inc/MantidGeometry/Math/BnId.h index f751dd8424a602131645a81592a34d8723a7e455..d530af6145d20c8f0e7aa281453f60a18f6e1321 100644 --- a/Framework/Geometry/inc/MantidGeometry/Math/BnId.h +++ b/Framework/Geometry/inc/MantidGeometry/Math/BnId.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Math/ConvexPolygon.h b/Framework/Geometry/inc/MantidGeometry/Math/ConvexPolygon.h index 0c0b38c10a3a8faff6020527ccf249ef6e56c9f4..1bba9b07e8fe2efd68afec480b8ca77ab6124c8b 100644 --- a/Framework/Geometry/inc/MantidGeometry/Math/ConvexPolygon.h +++ b/Framework/Geometry/inc/MantidGeometry/Math/ConvexPolygon.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Math/MapSupport.h b/Framework/Geometry/inc/MantidGeometry/Math/MapSupport.h index 663d089fddd16f78bc1ed6f7fe90369380e5cc26..c4d86f03548f9cde8707c1580c57b24bba141924 100644 --- a/Framework/Geometry/inc/MantidGeometry/Math/MapSupport.h +++ b/Framework/Geometry/inc/MantidGeometry/Math/MapSupport.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Math/PolyBase.h b/Framework/Geometry/inc/MantidGeometry/Math/PolyBase.h index 926ab9599891603b0f71d2ee40a0fa0824f517c0..997e9f2450f1593157c3944eceb0fc7870cf9441 100644 --- a/Framework/Geometry/inc/MantidGeometry/Math/PolyBase.h +++ b/Framework/Geometry/inc/MantidGeometry/Math/PolyBase.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Math/PolygonEdge.h b/Framework/Geometry/inc/MantidGeometry/Math/PolygonEdge.h index d995effc3e925ab04afdac729c684fb31cec2ab1..04ea979e9f7190795da98668c037275328de8d54 100644 --- a/Framework/Geometry/inc/MantidGeometry/Math/PolygonEdge.h +++ b/Framework/Geometry/inc/MantidGeometry/Math/PolygonEdge.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Math/PolygonIntersection.h b/Framework/Geometry/inc/MantidGeometry/Math/PolygonIntersection.h index 85291acc0d50142a0c412879362ac885bec02b4d..a859adadca3cda3fb46a46c8c44d6a9e3152e71c 100644 --- a/Framework/Geometry/inc/MantidGeometry/Math/PolygonIntersection.h +++ b/Framework/Geometry/inc/MantidGeometry/Math/PolygonIntersection.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Math/Quadrilateral.h b/Framework/Geometry/inc/MantidGeometry/Math/Quadrilateral.h index 988abe8ab91855da7fa1cdc0cf83871525e5515f..65b7adee37ef09a674847e5ca77dbb8ad7276402 100644 --- a/Framework/Geometry/inc/MantidGeometry/Math/Quadrilateral.h +++ b/Framework/Geometry/inc/MantidGeometry/Math/Quadrilateral.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Math/RotCounter.h b/Framework/Geometry/inc/MantidGeometry/Math/RotCounter.h index ffb043dc3230a3c1077c64b8c3a21a28ad32d857..10797ac299701a306c440614687c163bd15446d3 100644 --- a/Framework/Geometry/inc/MantidGeometry/Math/RotCounter.h +++ b/Framework/Geometry/inc/MantidGeometry/Math/RotCounter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Math/Triple.h b/Framework/Geometry/inc/MantidGeometry/Math/Triple.h index 326366cc2fabd9047999048b242f3d48e46fc718..d9679c3451ca2369a0e1e2c90a690bc0af2f741f 100644 --- a/Framework/Geometry/inc/MantidGeometry/Math/Triple.h +++ b/Framework/Geometry/inc/MantidGeometry/Math/Triple.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidGeometry/DllConfig.h" diff --git a/Framework/Geometry/inc/MantidGeometry/Math/mathSupport.h b/Framework/Geometry/inc/MantidGeometry/Math/mathSupport.h index 89a04da2db2656503cc25f841c3e0fbae07f561b..85ad28cb0c20ad276d5a0d78c74d123a3323dfd9 100644 --- a/Framework/Geometry/inc/MantidGeometry/Math/mathSupport.h +++ b/Framework/Geometry/inc/MantidGeometry/Math/mathSupport.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Objects/BoundingBox.h b/Framework/Geometry/inc/MantidGeometry/Objects/BoundingBox.h index 80fece8e8158d31aa24b7fe34297bcd9a1e55b5c..f435d7e3f4f7a4723ff7cb492304863e0cab6ca9 100644 --- a/Framework/Geometry/inc/MantidGeometry/Objects/BoundingBox.h +++ b/Framework/Geometry/inc/MantidGeometry/Objects/BoundingBox.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Objects/CSGObject.h b/Framework/Geometry/inc/MantidGeometry/Objects/CSGObject.h index 4aa9b136885c4b2da8dd13d7064dd8195df4e244..31e0e3af432d6431bf7ac8ad50ee8e28bc0b6747 100644 --- a/Framework/Geometry/inc/MantidGeometry/Objects/CSGObject.h +++ b/Framework/Geometry/inc/MantidGeometry/Objects/CSGObject.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -179,7 +179,7 @@ public: // Get Geometry Handler boost::shared_ptr<GeometryHandler> getGeometryHandler() const override; /// Set Geometry Handler - void setGeometryHandler(boost::shared_ptr<GeometryHandler> h); + void setGeometryHandler(const boost::shared_ptr<GeometryHandler> &h); /// set vtkGeometryCache writer void setVtkGeometryCacheWriter(boost::shared_ptr<vtkGeometryCacheWriter>); diff --git a/Framework/Geometry/inc/MantidGeometry/Objects/IObject.h b/Framework/Geometry/inc/MantidGeometry/Objects/IObject.h index df11cc6bbebde545ea4712a9c967e8c6623847a0..37624b5291284e7bbf534ea93b9581db1a7fa149 100644 --- a/Framework/Geometry/inc/MantidGeometry/Objects/IObject.h +++ b/Framework/Geometry/inc/MantidGeometry/Objects/IObject.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Objects/InstrumentRayTracer.h b/Framework/Geometry/inc/MantidGeometry/Objects/InstrumentRayTracer.h index 967bdc1e6731db682d91081a9a88fd5099849d3a..cf18fcbf732cf33786c22cd125fa59c2b36a1b8b 100644 --- a/Framework/Geometry/inc/MantidGeometry/Objects/InstrumentRayTracer.h +++ b/Framework/Geometry/inc/MantidGeometry/Objects/InstrumentRayTracer.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Objects/MeshObject.h b/Framework/Geometry/inc/MantidGeometry/Objects/MeshObject.h index 7f6a3bc3adc1d908b093e8fc29b30865357b8ab4..1fd45dfea1bbc325ac5d736dbc8f96e5673c6bd4 100644 --- a/Framework/Geometry/inc/MantidGeometry/Objects/MeshObject.h +++ b/Framework/Geometry/inc/MantidGeometry/Objects/MeshObject.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -51,7 +51,7 @@ public: /// Constructor MeshObject(const std::vector<uint32_t> &faces, const std::vector<Kernel::V3D> &vertices, - const Kernel::Material material); + const Kernel::Material &material); /// Constructor MeshObject(std::vector<uint32_t> &&faces, std::vector<Kernel::V3D> &&vertices, const Kernel::Material &&material); @@ -126,7 +126,7 @@ public: // Get Geometry Handler boost::shared_ptr<GeometryHandler> getGeometryHandler() const override; /// Set Geometry Handler - void setGeometryHandler(boost::shared_ptr<GeometryHandler> h); + void setGeometryHandler(const boost::shared_ptr<GeometryHandler> &h); detail::ShapeInfo::GeometryShape shape() const override; const detail::ShapeInfo &shapeInfo() const override; diff --git a/Framework/Geometry/inc/MantidGeometry/Objects/MeshObject2D.h b/Framework/Geometry/inc/MantidGeometry/Objects/MeshObject2D.h index 8084e866219fd47e88d2cf2b34450d2d22b1da4c..7a5fe4bc65d2870c8e001e17d156a4f05a66b35f 100644 --- a/Framework/Geometry/inc/MantidGeometry/Objects/MeshObject2D.h +++ b/Framework/Geometry/inc/MantidGeometry/Objects/MeshObject2D.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Objects/MeshObjectCommon.h b/Framework/Geometry/inc/MantidGeometry/Objects/MeshObjectCommon.h index 751fbd627b7d198bb71f7e883de4998f8d60b90d..649e5f9d6ec42404c4d94684cd24f1fb73931f94 100644 --- a/Framework/Geometry/inc/MantidGeometry/Objects/MeshObjectCommon.h +++ b/Framework/Geometry/inc/MantidGeometry/Objects/MeshObjectCommon.h @@ -1,3 +1,9 @@ +// Mantid Repository : https://github.com/mantidproject/mantid +// +// Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS +// SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidGeometry/DllConfig.h" @@ -9,28 +15,7 @@ namespace Mantid { namespace Geometry { class BoundingBox; /** MeshObjectCommon : Performs functions common to 3D and 2D closed meshes - - Copyright © 2018 ISIS Rutherford Appleton Laboratory, NScD Oak Ridge - National Laboratory & European Spallation Source - - 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> -*/ + */ namespace MeshObjectCommon { MANTID_GEOMETRY_DLL std::vector<double> diff --git a/Framework/Geometry/inc/MantidGeometry/Objects/Rules.h b/Framework/Geometry/inc/MantidGeometry/Objects/Rules.h index 372b13231529223a02f12281b4648d521b9ca670..7b424efd222420ab9072267c1cedb0a10d1b83da 100644 --- a/Framework/Geometry/inc/MantidGeometry/Objects/Rules.h +++ b/Framework/Geometry/inc/MantidGeometry/Objects/Rules.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Objects/ShapeFactory.h b/Framework/Geometry/inc/MantidGeometry/Objects/ShapeFactory.h index 8df997d97a73cd9bfb9cc8b3e6bd480ec235dfdf..8fdf815bcaf0b25d4709071ec14d2e3b5b2fe1b0 100644 --- a/Framework/Geometry/inc/MantidGeometry/Objects/ShapeFactory.h +++ b/Framework/Geometry/inc/MantidGeometry/Objects/ShapeFactory.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Objects/Track.h b/Framework/Geometry/inc/MantidGeometry/Objects/Track.h index 32d1bde99c60b00ffbffa8afe20d5cc8bf15fc2d..4cc7519d51854c0972527fad15fcef00b3348cdc 100644 --- a/Framework/Geometry/inc/MantidGeometry/Objects/Track.h +++ b/Framework/Geometry/inc/MantidGeometry/Objects/Track.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -14,6 +14,9 @@ #include "MantidGeometry/Objects/IObject.h" #include "MantidGeometry/Surfaces/Line.h" #include "MantidKernel/Tolerance.h" + +#include <boost/container/small_vector.hpp> + #include <iosfwd> #include <list> @@ -141,8 +144,8 @@ struct IntersectionPoint { */ class MANTID_GEOMETRY_DLL Track { public: - using LType = std::vector<Link>; - using PType = std::vector<IntersectionPoint>; + using LType = boost::container::small_vector<Link, 5>; + using PType = boost::container::small_vector<IntersectionPoint, 5>; public: /// Default constructor @@ -160,7 +163,6 @@ public: void removeCojoins(); /// Construct links between added points void buildLink(); - /// Set a starting point and direction void reset(const Kernel::V3D &startPoint, const Kernel::V3D &direction); /// Clear the current set of intersection results diff --git a/Framework/Geometry/inc/MantidGeometry/PrecompiledHeader.h b/Framework/Geometry/inc/MantidGeometry/PrecompiledHeader.h index 8ea75d6e774e1b3c155b119ef8feda784b5910ac..f07a4986c982e1b674864192664e1f8fdc5ba882 100644 --- a/Framework/Geometry/inc/MantidGeometry/PrecompiledHeader.h +++ b/Framework/Geometry/inc/MantidGeometry/PrecompiledHeader.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/RandomPoint.h b/Framework/Geometry/inc/MantidGeometry/RandomPoint.h index 13e8b5df2e6b183db4e7840d7289b9e54fa4d091..2507e30aba74401d3411c5771b50765e94fcfa76 100644 --- a/Framework/Geometry/inc/MantidGeometry/RandomPoint.h +++ b/Framework/Geometry/inc/MantidGeometry/RandomPoint.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Rasterize.h b/Framework/Geometry/inc/MantidGeometry/Rasterize.h index 90b0e9a76882d0738c7f9eb9d4251bc3321ea83e..d31f9ad3bbab63c0d8a8d15f42d06361fed52b31 100644 --- a/Framework/Geometry/inc/MantidGeometry/Rasterize.h +++ b/Framework/Geometry/inc/MantidGeometry/Rasterize.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Rendering/GeometryHandler.h b/Framework/Geometry/inc/MantidGeometry/Rendering/GeometryHandler.h index 81d4f922d3b4f56e1b6dc16911f1313925618c30..33b28379aab1ebe207310f9947ab52cf9d850064 100644 --- a/Framework/Geometry/inc/MantidGeometry/Rendering/GeometryHandler.h +++ b/Framework/Geometry/inc/MantidGeometry/Rendering/GeometryHandler.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -76,9 +76,9 @@ protected: nullptr; ///< ObjComponent that uses this geometry handler CSGObject *m_csgObj = nullptr; ///< Object that uses this geometry handler public: - GeometryHandler(IObjComponent *comp); ///< Constructor - GeometryHandler(boost::shared_ptr<CSGObject> obj); ///< Constructor - GeometryHandler(CSGObject *obj); ///< Constructor + GeometryHandler(IObjComponent *comp); ///< Constructor + GeometryHandler(const boost::shared_ptr<CSGObject> &obj); ///< Constructor + GeometryHandler(CSGObject *obj); ///< Constructor GeometryHandler(const MeshObject &obj); GeometryHandler(const MeshObject2D &obj); GeometryHandler(const GeometryHandler &handler); diff --git a/Framework/Geometry/inc/MantidGeometry/Rendering/GeometryTriangulator.h b/Framework/Geometry/inc/MantidGeometry/Rendering/GeometryTriangulator.h index a60c85199f9b580432b48db0fe59b51c08532d5c..911a796fd276fce3a9a9bf9ff06a79708f5b29c3 100644 --- a/Framework/Geometry/inc/MantidGeometry/Rendering/GeometryTriangulator.h +++ b/Framework/Geometry/inc/MantidGeometry/Rendering/GeometryTriangulator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Rendering/OpenGL_Headers.h b/Framework/Geometry/inc/MantidGeometry/Rendering/OpenGL_Headers.h index 693f431d27aef5cb140ad117146461ecdedaf431..3ed0e467a3b4bc5305eadf58873a1ad4e6b85c58 100644 --- a/Framework/Geometry/inc/MantidGeometry/Rendering/OpenGL_Headers.h +++ b/Framework/Geometry/inc/MantidGeometry/Rendering/OpenGL_Headers.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Rendering/RenderingHelpers.h b/Framework/Geometry/inc/MantidGeometry/Rendering/RenderingHelpers.h index 3140a3cdcaccfc4c562fac11ff2016ca636a5351..ade0810556bf237cdce02c36ee71b7a74305f861 100644 --- a/Framework/Geometry/inc/MantidGeometry/Rendering/RenderingHelpers.h +++ b/Framework/Geometry/inc/MantidGeometry/Rendering/RenderingHelpers.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Rendering/RenderingMesh.h b/Framework/Geometry/inc/MantidGeometry/Rendering/RenderingMesh.h index 61c7cc07d14739b7a2e2723e98ff38790aa26bf9..85fbb0c9c9e349aa74a6b6ae6142e0791d6ffd2d 100644 --- a/Framework/Geometry/inc/MantidGeometry/Rendering/RenderingMesh.h +++ b/Framework/Geometry/inc/MantidGeometry/Rendering/RenderingMesh.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Rendering/ShapeInfo.h b/Framework/Geometry/inc/MantidGeometry/Rendering/ShapeInfo.h index 1133720fa812ef03cb897dc579410da104101e19..1ed6ad01d2af4af871f0a85d20e32a7f1e4d38f2 100644 --- a/Framework/Geometry/inc/MantidGeometry/Rendering/ShapeInfo.h +++ b/Framework/Geometry/inc/MantidGeometry/Rendering/ShapeInfo.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Rendering/vtkGeometryCacheReader.h b/Framework/Geometry/inc/MantidGeometry/Rendering/vtkGeometryCacheReader.h index f47ae079dcfc10f555c089b4e45c6866d12ff811..7cee8e07227fc51c0ed7d23e6cb3b2b49c89d06e 100644 --- a/Framework/Geometry/inc/MantidGeometry/Rendering/vtkGeometryCacheReader.h +++ b/Framework/Geometry/inc/MantidGeometry/Rendering/vtkGeometryCacheReader.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -37,7 +37,7 @@ private: std::string mFileName; ///< The file name // Private Methods void Init(); - Poco::XML::Element *getElementByObjectName(std::string name); + Poco::XML::Element *getElementByObjectName(const std::string &name); void readPoints(Poco::XML::Element *pEle, int noOfPoints, std::vector<double> &points); void readTriangles(Poco::XML::Element *pEle, int noOfTriangles, diff --git a/Framework/Geometry/inc/MantidGeometry/Rendering/vtkGeometryCacheWriter.h b/Framework/Geometry/inc/MantidGeometry/Rendering/vtkGeometryCacheWriter.h index 475b6fb480d25b0a972a650b0e72b20b65539172..1ee046a2a890e1aaa5147ac82f5bb0ec3fe6d49a 100644 --- a/Framework/Geometry/inc/MantidGeometry/Rendering/vtkGeometryCacheWriter.h +++ b/Framework/Geometry/inc/MantidGeometry/Rendering/vtkGeometryCacheWriter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Surfaces/BaseVisit.h b/Framework/Geometry/inc/MantidGeometry/Surfaces/BaseVisit.h index 5ffbb4c294c8937a8545f89dd6105e951e9d730e..d3375a04269489aab0c8aa5c504e7708c8e5c458 100644 --- a/Framework/Geometry/inc/MantidGeometry/Surfaces/BaseVisit.h +++ b/Framework/Geometry/inc/MantidGeometry/Surfaces/BaseVisit.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Surfaces/Cone.h b/Framework/Geometry/inc/MantidGeometry/Surfaces/Cone.h index aa67657b958b16499febcf3f3c6f64208c687b27..67d248ba7ee1e629e1c4699fdde19555541c12b2 100644 --- a/Framework/Geometry/inc/MantidGeometry/Surfaces/Cone.h +++ b/Framework/Geometry/inc/MantidGeometry/Surfaces/Cone.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Surfaces/Cylinder.h b/Framework/Geometry/inc/MantidGeometry/Surfaces/Cylinder.h index 9743d0f72b716cecfd2c1990c70231e87e24c624..98b59c3cbfaf9e067975e9343e3fb85a493c876b 100644 --- a/Framework/Geometry/inc/MantidGeometry/Surfaces/Cylinder.h +++ b/Framework/Geometry/inc/MantidGeometry/Surfaces/Cylinder.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Surfaces/General.h b/Framework/Geometry/inc/MantidGeometry/Surfaces/General.h index a63d9dc44b1b585eb63b565b2f2da60ca997bf5e..a7ad1a992662982638562695538f4faed7e141c8 100644 --- a/Framework/Geometry/inc/MantidGeometry/Surfaces/General.h +++ b/Framework/Geometry/inc/MantidGeometry/Surfaces/General.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Surfaces/Line.h b/Framework/Geometry/inc/MantidGeometry/Surfaces/Line.h index 692e5020c89c04318b3235a0935dbab4de990bf2..2c8d861dccc3a5e1b178de508a880159ce67d15f 100644 --- a/Framework/Geometry/inc/MantidGeometry/Surfaces/Line.h +++ b/Framework/Geometry/inc/MantidGeometry/Surfaces/Line.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Surfaces/LineIntersectVisit.h b/Framework/Geometry/inc/MantidGeometry/Surfaces/LineIntersectVisit.h index 3cc6fd207fbb9c27f03fc12bc26c91406b6eeea2..e743f971486117c8bbfb38939c8b85df2debdf8e 100644 --- a/Framework/Geometry/inc/MantidGeometry/Surfaces/LineIntersectVisit.h +++ b/Framework/Geometry/inc/MantidGeometry/Surfaces/LineIntersectVisit.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Surfaces/Plane.h b/Framework/Geometry/inc/MantidGeometry/Surfaces/Plane.h index 8901da7a3f963f33071936f0387cd075ec638bf4..f6065189e059adb50cb65d0e6cbf0eec4aa3ec89 100644 --- a/Framework/Geometry/inc/MantidGeometry/Surfaces/Plane.h +++ b/Framework/Geometry/inc/MantidGeometry/Surfaces/Plane.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Surfaces/Quadratic.h b/Framework/Geometry/inc/MantidGeometry/Surfaces/Quadratic.h index a0f97aa798b459bda4a91de44afe4fd84c0ab851..a1a3b638cdb9ba9301e1b3d60c2b2a4042a588e8 100644 --- a/Framework/Geometry/inc/MantidGeometry/Surfaces/Quadratic.h +++ b/Framework/Geometry/inc/MantidGeometry/Surfaces/Quadratic.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Surfaces/Sphere.h b/Framework/Geometry/inc/MantidGeometry/Surfaces/Sphere.h index 9c3487b8f84d57bf5cda3de401efcc80cfafbd84..0425c8fcc45f55f57c37c0e4001c6f103ae20375 100644 --- a/Framework/Geometry/inc/MantidGeometry/Surfaces/Sphere.h +++ b/Framework/Geometry/inc/MantidGeometry/Surfaces/Sphere.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Surfaces/Surface.h b/Framework/Geometry/inc/MantidGeometry/Surfaces/Surface.h index bf8d79b4cea38125a932f6c900ae25a3cd79c760..8cc5eca4023a541ed1536503beabefaaa6a58044 100644 --- a/Framework/Geometry/inc/MantidGeometry/Surfaces/Surface.h +++ b/Framework/Geometry/inc/MantidGeometry/Surfaces/Surface.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Surfaces/SurfaceFactory.h b/Framework/Geometry/inc/MantidGeometry/Surfaces/SurfaceFactory.h index 951d1ea7486842c4b27338ce6598986a24ab9bd4..9e39ff568632337cef0eecaa24d63d2c39d27be7 100644 --- a/Framework/Geometry/inc/MantidGeometry/Surfaces/SurfaceFactory.h +++ b/Framework/Geometry/inc/MantidGeometry/Surfaces/SurfaceFactory.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/Surfaces/Torus.h b/Framework/Geometry/inc/MantidGeometry/Surfaces/Torus.h index 990b3c46b3a72b263250097741ffa1b5c0a701f6..730fce4ac5fce7ac86341d1e0354ca28f575a207 100644 --- a/Framework/Geometry/inc/MantidGeometry/Surfaces/Torus.h +++ b/Framework/Geometry/inc/MantidGeometry/Surfaces/Torus.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/inc/MantidGeometry/muParser_Silent.h b/Framework/Geometry/inc/MantidGeometry/muParser_Silent.h index 7406372447fad60e387bfaff12126bd906d8bdce..2553972c9596ab78c4cd1557fed1c24d09571fed 100644 --- a/Framework/Geometry/inc/MantidGeometry/muParser_Silent.h +++ b/Framework/Geometry/inc/MantidGeometry/muParser_Silent.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /** diff --git a/Framework/Geometry/src/ComponentParser.cpp b/Framework/Geometry/src/ComponentParser.cpp index 9548736b871bc829d432b380006c71dccb8f051d..ec510c84ad177ed1dfbf253be2863231b8919942 100644 --- a/Framework/Geometry/src/ComponentParser.cpp +++ b/Framework/Geometry/src/ComponentParser.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/ComponentParser.h" diff --git a/Framework/Geometry/src/Crystal/BasicHKLFilters.cpp b/Framework/Geometry/src/Crystal/BasicHKLFilters.cpp index 82af6afde2f8febba33d0fc35828617ca7ab300d..5a82d7581aa2174e3382f836bfbe6655efa9b972 100644 --- a/Framework/Geometry/src/Crystal/BasicHKLFilters.cpp +++ b/Framework/Geometry/src/Crystal/BasicHKLFilters.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Crystal/BasicHKLFilters.h" diff --git a/Framework/Geometry/src/Crystal/BraggScatterer.cpp b/Framework/Geometry/src/Crystal/BraggScatterer.cpp index 0bb610595e0c53633739bf9189ebd6293e5a10ae..6a90ff5ed68f77da4006e5df37ab5685db12edb8 100644 --- a/Framework/Geometry/src/Crystal/BraggScatterer.cpp +++ b/Framework/Geometry/src/Crystal/BraggScatterer.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Crystal/BraggScatterer.h" diff --git a/Framework/Geometry/src/Crystal/BraggScattererFactory.cpp b/Framework/Geometry/src/Crystal/BraggScattererFactory.cpp index 5d7d8335cee0bdea15eb88579920ddc961e04929..827badd4ba0c1d10a878bfce7b5cfe383c88a950 100644 --- a/Framework/Geometry/src/Crystal/BraggScattererFactory.cpp +++ b/Framework/Geometry/src/Crystal/BraggScattererFactory.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Crystal/BraggScattererFactory.h" #include "MantidKernel/LibraryManager.h" diff --git a/Framework/Geometry/src/Crystal/BraggScattererInCrystalStructure.cpp b/Framework/Geometry/src/Crystal/BraggScattererInCrystalStructure.cpp index 80eb5ed12c4b8ee89a37c49ff7242718090f0be6..f1ebf230ca1cb2728745fe5fb1109948203a1c9c 100644 --- a/Framework/Geometry/src/Crystal/BraggScattererInCrystalStructure.cpp +++ b/Framework/Geometry/src/Crystal/BraggScattererInCrystalStructure.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Crystal/BraggScattererInCrystalStructure.h" #include <stdexcept> diff --git a/Framework/Geometry/src/Crystal/CenteringGroup.cpp b/Framework/Geometry/src/Crystal/CenteringGroup.cpp index 3a8d33eb9deeeb917c51828623a270f64970ba2d..abfeae5f91af8f0ee6ca3a62ce347be03b61243f 100644 --- a/Framework/Geometry/src/Crystal/CenteringGroup.cpp +++ b/Framework/Geometry/src/Crystal/CenteringGroup.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Crystal/CenteringGroup.h" #include "MantidGeometry/Crystal/SymmetryOperationFactory.h" diff --git a/Framework/Geometry/src/Crystal/CompositeBraggScatterer.cpp b/Framework/Geometry/src/Crystal/CompositeBraggScatterer.cpp index 6d130dc118989e48604380ec0c903cd94cc8ff9a..14b540c140e140130aba59e5df29510607136b63 100644 --- a/Framework/Geometry/src/Crystal/CompositeBraggScatterer.cpp +++ b/Framework/Geometry/src/Crystal/CompositeBraggScatterer.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Crystal/CompositeBraggScatterer.h" #include "MantidGeometry/Crystal/BraggScattererFactory.h" diff --git a/Framework/Geometry/src/Crystal/ConventionalCell.cpp b/Framework/Geometry/src/Crystal/ConventionalCell.cpp index deef178aa3f30732a935a21461234e868dff4224..2ca101dd0e5fc86f7d9c203bff7e0115bd0c9992 100644 --- a/Framework/Geometry/src/Crystal/ConventionalCell.cpp +++ b/Framework/Geometry/src/Crystal/ConventionalCell.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /* File: ConventionalCell.cpp */ diff --git a/Framework/Geometry/src/Crystal/CrystalStructure.cpp b/Framework/Geometry/src/Crystal/CrystalStructure.cpp index c1fd3338236677f3e6754a6dfbd0ac9a336506bb..5c8d8be3359ab2fed5e22d6510f1370cd641959f 100644 --- a/Framework/Geometry/src/Crystal/CrystalStructure.cpp +++ b/Framework/Geometry/src/Crystal/CrystalStructure.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Crystal/CrystalStructure.h" #include <algorithm> diff --git a/Framework/Geometry/src/Crystal/CyclicGroup.cpp b/Framework/Geometry/src/Crystal/CyclicGroup.cpp index 34d8a9ace1659f8d59a696c49e7df66fb2f66476..7b83588b5a99e48eff2cb19a8835ab6012de60a8 100644 --- a/Framework/Geometry/src/Crystal/CyclicGroup.cpp +++ b/Framework/Geometry/src/Crystal/CyclicGroup.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Crystal/CyclicGroup.h" #include "MantidGeometry/Crystal/SymmetryOperationFactory.h" diff --git a/Framework/Geometry/src/Crystal/EdgePixel.cpp b/Framework/Geometry/src/Crystal/EdgePixel.cpp index 8fe5a20af77182e036e40cb3ab14649026a5aaaa..807ef1678c116ff466d5e19cc62091f90d9f1a94 100644 --- a/Framework/Geometry/src/Crystal/EdgePixel.cpp +++ b/Framework/Geometry/src/Crystal/EdgePixel.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Crystal/EdgePixel.h" #include "MantidGeometry/Instrument/Component.h" @@ -20,8 +20,8 @@ namespace Geometry { @param Edge Number of edge points for each bank @return True if peak is on edge */ -bool edgePixel(Mantid::Geometry::Instrument_const_sptr inst, - std::string bankName, int col, int row, int Edge) { +bool edgePixel(const Mantid::Geometry::Instrument_const_sptr &inst, + const std::string &bankName, int col, int row, int Edge) { if (bankName == "None") return false; boost::shared_ptr<const Geometry::IComponent> parent = diff --git a/Framework/Geometry/src/Crystal/Group.cpp b/Framework/Geometry/src/Crystal/Group.cpp index c632e8e6457e481fa26678dd976319874edeada7..d0cbf2f55de38326dfef71e5f24958cf31e214bf 100644 --- a/Framework/Geometry/src/Crystal/Group.cpp +++ b/Framework/Geometry/src/Crystal/Group.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Crystal/Group.h" #include "MantidGeometry/Crystal/SymmetryOperationFactory.h" diff --git a/Framework/Geometry/src/Crystal/GroupTransformation.cpp b/Framework/Geometry/src/Crystal/GroupTransformation.cpp index 7b30ed63b084e6834f5b18a96d65fddb68d5ed8c..a2cdd0c0b208c9a9d810d9c0aea1a67625fae8cb 100644 --- a/Framework/Geometry/src/Crystal/GroupTransformation.cpp +++ b/Framework/Geometry/src/Crystal/GroupTransformation.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Crystal/GroupTransformation.h" #include "MantidGeometry/Crystal/MatrixVectorPairParser.h" diff --git a/Framework/Geometry/src/Crystal/HKLFilter.cpp b/Framework/Geometry/src/Crystal/HKLFilter.cpp index 897b2d1e274ee9005598ba96222658415e3efbe0..74b765ea8f252d2c980fee28b76099350b507dbc 100644 --- a/Framework/Geometry/src/Crystal/HKLFilter.cpp +++ b/Framework/Geometry/src/Crystal/HKLFilter.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Crystal/HKLFilter.h" #include <boost/make_shared.hpp> diff --git a/Framework/Geometry/src/Crystal/HKLFilterWavelength.cpp b/Framework/Geometry/src/Crystal/HKLFilterWavelength.cpp index 31a7e3e3d629f128c62065a820dc59f4903b4319..8c76f0f82136bd9868c379926f1a8846d69d4a99 100644 --- a/Framework/Geometry/src/Crystal/HKLFilterWavelength.cpp +++ b/Framework/Geometry/src/Crystal/HKLFilterWavelength.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Crystal/HKLFilterWavelength.h" #include <sstream> diff --git a/Framework/Geometry/src/Crystal/HKLGenerator.cpp b/Framework/Geometry/src/Crystal/HKLGenerator.cpp index a2ecaf65c213f78261a10c12a7eea1181b6f5a9d..05f20fb419f0b3acfce3a41209fd6dd8dde3b475 100644 --- a/Framework/Geometry/src/Crystal/HKLGenerator.cpp +++ b/Framework/Geometry/src/Crystal/HKLGenerator.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Crystal/HKLGenerator.h" diff --git a/Framework/Geometry/src/Crystal/IndexingUtils.cpp b/Framework/Geometry/src/Crystal/IndexingUtils.cpp index de6612f3ef4eb17281dae33b922737b076743deb..ba096aaa319b5a61edeaaa00d3153e26efb3b4bd 100644 --- a/Framework/Geometry/src/Crystal/IndexingUtils.cpp +++ b/Framework/Geometry/src/Crystal/IndexingUtils.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Crystal/IndexingUtils.h" #include "MantidGeometry/Crystal/NiggliCell.h" @@ -2854,8 +2854,8 @@ std::vector<V3D> IndexingUtils::MakeCircleDirections(int n_steps, specified. */ int IndexingUtils::SelectDirection(V3D &best_direction, - const std::vector<V3D> q_vectors, - const std::vector<V3D> direction_list, + const std::vector<V3D> &q_vectors, + const std::vector<V3D> &direction_list, double plane_spacing, double required_tolerance) { if (q_vectors.empty()) { diff --git a/Framework/Geometry/src/Crystal/IsotropicAtomBraggScatterer.cpp b/Framework/Geometry/src/Crystal/IsotropicAtomBraggScatterer.cpp index 9f55e2d77029a1c97c92eb6f5fa799d1a0e1a986..b4d3ce14c188a191332d09b8d9ead259338fc586 100644 --- a/Framework/Geometry/src/Crystal/IsotropicAtomBraggScatterer.cpp +++ b/Framework/Geometry/src/Crystal/IsotropicAtomBraggScatterer.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Crystal/IsotropicAtomBraggScatterer.h" #include "MantidKernel/Atom.h" diff --git a/Framework/Geometry/src/Crystal/NiggliCell.cpp b/Framework/Geometry/src/Crystal/NiggliCell.cpp index 4aa713e6253ca907977cf877d71133f70a2bd201..cbe14c49da52a0540b79452264c296df4674aab4 100644 --- a/Framework/Geometry/src/Crystal/NiggliCell.cpp +++ b/Framework/Geometry/src/Crystal/NiggliCell.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Crystal/NiggliCell.h" #include "MantidGeometry/Crystal/OrientedLattice.h" diff --git a/Framework/Geometry/src/Crystal/OrientedLattice.cpp b/Framework/Geometry/src/Crystal/OrientedLattice.cpp index 23c82130c750f9abd69598f9e79da428a02e203d..dae0f1c61d6fa37e297c4f1772a42190b735c925 100644 --- a/Framework/Geometry/src/Crystal/OrientedLattice.cpp +++ b/Framework/Geometry/src/Crystal/OrientedLattice.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Crystal/OrientedLattice.h" #include "MantidKernel/Exception.h" diff --git a/Framework/Geometry/src/Crystal/PeakTransform.cpp b/Framework/Geometry/src/Crystal/PeakTransform.cpp index 0b8603a74eeeb2a65646cebc1ff61ae32a42f493..53fe15522ef879695f25eef7e188e7fbad245ac2 100644 --- a/Framework/Geometry/src/Crystal/PeakTransform.cpp +++ b/Framework/Geometry/src/Crystal/PeakTransform.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Crystal/PeakTransform.h" diff --git a/Framework/Geometry/src/Crystal/PeakTransformHKL.cpp b/Framework/Geometry/src/Crystal/PeakTransformHKL.cpp index 4f4ea241eb041a8f39a4dde70a929d77eb346346..3e233fe5f289531e789b0ff5d0c5c163dd02df95 100644 --- a/Framework/Geometry/src/Crystal/PeakTransformHKL.cpp +++ b/Framework/Geometry/src/Crystal/PeakTransformHKL.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Crystal/PeakTransformHKL.h" #include <boost/make_shared.hpp> diff --git a/Framework/Geometry/src/Crystal/PeakTransformQLab.cpp b/Framework/Geometry/src/Crystal/PeakTransformQLab.cpp index e5882d6d4f8dc90fff5c8a3fc622e642dd4ca545..1cd8f75917559c89e700e194c2ad409d1efedb94 100644 --- a/Framework/Geometry/src/Crystal/PeakTransformQLab.cpp +++ b/Framework/Geometry/src/Crystal/PeakTransformQLab.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Crystal/PeakTransformQLab.h" #include <boost/make_shared.hpp> diff --git a/Framework/Geometry/src/Crystal/PeakTransformQSample.cpp b/Framework/Geometry/src/Crystal/PeakTransformQSample.cpp index 9690f4afd23188427df4f54625081e87e90eb79a..ca46d6f1e42b3e644f4c0636ad526c6cf42929c1 100644 --- a/Framework/Geometry/src/Crystal/PeakTransformQSample.cpp +++ b/Framework/Geometry/src/Crystal/PeakTransformQSample.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Crystal/PeakTransformQSample.h" #include <boost/make_shared.hpp> diff --git a/Framework/Geometry/src/Crystal/PeakTransformSelector.cpp b/Framework/Geometry/src/Crystal/PeakTransformSelector.cpp index b617f8590657038668f897542f93cf3e86625c8c..4eb89198f83c1b61d38384b3dfb9e2131864486b 100644 --- a/Framework/Geometry/src/Crystal/PeakTransformSelector.cpp +++ b/Framework/Geometry/src/Crystal/PeakTransformSelector.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Crystal/PeakTransformSelector.h" #include <stdexcept> @@ -17,7 +17,7 @@ Register a peak transform factory as a candidate. @param candidate : candidate peak transform factory */ void PeakTransformSelector::registerCandidate( - PeakTransformFactory_sptr candidate) { + const PeakTransformFactory_sptr &candidate) { m_candidateFactories.insert(candidate); } @@ -62,8 +62,8 @@ Make a choice for the peak transform factory. @return selected factory */ PeakTransformFactory_sptr -PeakTransformSelector::makeChoice(const std::string labelX, - const std::string labelY) const { +PeakTransformSelector::makeChoice(const std::string &labelX, + const std::string &labelY) const { if (labelX.empty()) { throw std::invalid_argument("labelX is empty"); } @@ -102,7 +102,7 @@ transformation. @return TRUE only if such a factory is available. */ bool PeakTransformSelector::hasFactoryForTransform( - const std::string labelX, const std::string labelY) const { + const std::string &labelX, const std::string &labelY) const { bool hasFactoryForTransform = true; try { this->makeChoice(labelX, labelY); diff --git a/Framework/Geometry/src/Crystal/PointGroup.cpp b/Framework/Geometry/src/Crystal/PointGroup.cpp index cad94aad5c74d036f5a9edc9b1909715d876a9d5..e1660e5db2f794f695b33a63d1ce1be27f63bf30 100644 --- a/Framework/Geometry/src/Crystal/PointGroup.cpp +++ b/Framework/Geometry/src/Crystal/PointGroup.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Crystal/PointGroup.h" #include "MantidKernel/System.h" diff --git a/Framework/Geometry/src/Crystal/PointGroupFactory.cpp b/Framework/Geometry/src/Crystal/PointGroupFactory.cpp index 1ac29008371db555e1c22b1296a73278e8859535..0e52e17dafde4b595f8026270128793785755edf 100644 --- a/Framework/Geometry/src/Crystal/PointGroupFactory.cpp +++ b/Framework/Geometry/src/Crystal/PointGroupFactory.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Crystal/PointGroupFactory.h" #include "MantidGeometry/Crystal/SpaceGroup.h" diff --git a/Framework/Geometry/src/Crystal/ProductOfCyclicGroups.cpp b/Framework/Geometry/src/Crystal/ProductOfCyclicGroups.cpp index e34964bcd158a1c674c594e7d3dd77bcf9300181..ef07c080b88136790a4de16ef32ff022f7870f45 100644 --- a/Framework/Geometry/src/Crystal/ProductOfCyclicGroups.cpp +++ b/Framework/Geometry/src/Crystal/ProductOfCyclicGroups.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Crystal/ProductOfCyclicGroups.h" diff --git a/Framework/Geometry/src/Crystal/ReducedCell.cpp b/Framework/Geometry/src/Crystal/ReducedCell.cpp index 7ffa34427e554f9649bb746cf4c548d74a523559..56850be70bc0668845da58a5d9e1b7edae000b7c 100644 --- a/Framework/Geometry/src/Crystal/ReducedCell.cpp +++ b/Framework/Geometry/src/Crystal/ReducedCell.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /* File: ReducedCell.cpp */ diff --git a/Framework/Geometry/src/Crystal/ReflectionCondition.cpp b/Framework/Geometry/src/Crystal/ReflectionCondition.cpp index de45d4bbfc991d971ccf55c0fe75a64990b86de9..cb379714eff6b822e986d927766cfcc8eaf052f7 100644 --- a/Framework/Geometry/src/Crystal/ReflectionCondition.cpp +++ b/Framework/Geometry/src/Crystal/ReflectionCondition.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Crystal/ReflectionCondition.h" #include <algorithm> diff --git a/Framework/Geometry/src/Crystal/ReflectionGenerator.cpp b/Framework/Geometry/src/Crystal/ReflectionGenerator.cpp index cb496eb7b7a02381e7f00c94fc4ef40f640cfb23..39446f2ddda5bde7b67115c135bdb0c2795d5456 100644 --- a/Framework/Geometry/src/Crystal/ReflectionGenerator.cpp +++ b/Framework/Geometry/src/Crystal/ReflectionGenerator.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Crystal/ReflectionGenerator.h" #include "MantidGeometry/Crystal/BasicHKLFilters.h" @@ -76,7 +76,7 @@ std::vector<V3D> ReflectionGenerator::getHKLs(double dMin, double dMax) const { /// filter. If the pointer is null, it's ignored. std::vector<Kernel::V3D> ReflectionGenerator::getHKLs( double dMin, double dMax, - HKLFilter_const_sptr reflectionConditionFilter) const { + const HKLFilter_const_sptr &reflectionConditionFilter) const { HKLGenerator generator(m_crystalStructure.cell(), dMin); HKLFilter_const_sptr filter = getDRangeFilter(dMin, dMax); @@ -103,7 +103,7 @@ std::vector<V3D> ReflectionGenerator::getUniqueHKLs(double dMin, /// d-limits using the specified reflection condition filter. std::vector<V3D> ReflectionGenerator::getUniqueHKLs( double dMin, double dMax, - HKLFilter_const_sptr reflectionConditionFilter) const { + const HKLFilter_const_sptr &reflectionConditionFilter) const { HKLGenerator generator(m_crystalStructure.cell(), dMin); HKLFilter_const_sptr filter = getDRangeFilter(dMin, dMax); diff --git a/Framework/Geometry/src/Crystal/ScalarUtils.cpp b/Framework/Geometry/src/Crystal/ScalarUtils.cpp index 967506cb6144c93d4af8295289fec9ccb654d025..3aed02d3e59c9a77bbd96f21e96a31a2e4467068 100644 --- a/Framework/Geometry/src/Crystal/ScalarUtils.cpp +++ b/Framework/Geometry/src/Crystal/ScalarUtils.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /* File: ScalarUtils.cpp */ diff --git a/Framework/Geometry/src/Crystal/SpaceGroup.cpp b/Framework/Geometry/src/Crystal/SpaceGroup.cpp index fe66031d8a80a674580467a870ff64839202be15..a0407ae7aaf72089c5ef54f447245be0c17c5435 100644 --- a/Framework/Geometry/src/Crystal/SpaceGroup.cpp +++ b/Framework/Geometry/src/Crystal/SpaceGroup.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Crystal/SpaceGroup.h" #include "MantidGeometry/Crystal/PointGroupFactory.h" diff --git a/Framework/Geometry/src/Crystal/SpaceGroupFactory.cpp b/Framework/Geometry/src/Crystal/SpaceGroupFactory.cpp index bed1ee7352db121b63ec4393d36571a472929615..6d6e4bfd014e79b37e2e26165092984d7e716585 100644 --- a/Framework/Geometry/src/Crystal/SpaceGroupFactory.cpp +++ b/Framework/Geometry/src/Crystal/SpaceGroupFactory.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Crystal/SpaceGroupFactory.h" #include "MantidGeometry/Crystal/SymmetryOperationSymbolParser.h" @@ -405,7 +405,7 @@ std::string SpaceGroupFactoryImpl::getTransformedSymbolOrthorhombic( /// Returns a copy-constructed instance of the supplied space group prototype /// object. SpaceGroup_const_sptr SpaceGroupFactoryImpl::constructFromPrototype( - const SpaceGroup_const_sptr prototype) const { + const SpaceGroup_const_sptr &prototype) const { return boost::make_shared<const SpaceGroup>(*prototype); } diff --git a/Framework/Geometry/src/Crystal/StructureFactorCalculator.cpp b/Framework/Geometry/src/Crystal/StructureFactorCalculator.cpp index 777a4df11da610f880182fc07b1e22b07654279e..ee7385d1bd800d5029a8d284cfd45eb5e750c870 100644 --- a/Framework/Geometry/src/Crystal/StructureFactorCalculator.cpp +++ b/Framework/Geometry/src/Crystal/StructureFactorCalculator.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Crystal/StructureFactorCalculator.h" diff --git a/Framework/Geometry/src/Crystal/StructureFactorCalculatorSummation.cpp b/Framework/Geometry/src/Crystal/StructureFactorCalculatorSummation.cpp index 58cdf39d18da9963df9dd4b2e22649aa3dc6f933..ef894475a97425e129b9d601c733d96806055c42 100644 --- a/Framework/Geometry/src/Crystal/StructureFactorCalculatorSummation.cpp +++ b/Framework/Geometry/src/Crystal/StructureFactorCalculatorSummation.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Crystal/StructureFactorCalculatorSummation.h" #include "MantidGeometry/Crystal/BraggScattererInCrystalStructure.h" diff --git a/Framework/Geometry/src/Crystal/SymmetryElement.cpp b/Framework/Geometry/src/Crystal/SymmetryElement.cpp index 03d212cb63903e1a6af680d200097f641177f1ae..19a44853d40f735069c08b740443259df947a1b5 100644 --- a/Framework/Geometry/src/Crystal/SymmetryElement.cpp +++ b/Framework/Geometry/src/Crystal/SymmetryElement.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Crystal/SymmetryElement.h" #include "MantidGeometry/Crystal/SymmetryOperationFactory.h" diff --git a/Framework/Geometry/src/Crystal/SymmetryElementFactory.cpp b/Framework/Geometry/src/Crystal/SymmetryElementFactory.cpp index d6079244c57a0c917205e28864c6e6f7aef748da..fffa58957433ba5621edaa42296ed89a3a49d0ce 100644 --- a/Framework/Geometry/src/Crystal/SymmetryElementFactory.cpp +++ b/Framework/Geometry/src/Crystal/SymmetryElementFactory.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Crystal/SymmetryElementFactory.h" #include <boost/math/special_functions/round.hpp> diff --git a/Framework/Geometry/src/Crystal/SymmetryOperation.cpp b/Framework/Geometry/src/Crystal/SymmetryOperation.cpp index 2e74926f0be3664b263ff810e4920ed8ee917384..a6bc0e2e554fa523c0d0b88a50597d34915b2422 100644 --- a/Framework/Geometry/src/Crystal/SymmetryOperation.cpp +++ b/Framework/Geometry/src/Crystal/SymmetryOperation.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Crystal/SymmetryOperation.h" #include "MantidGeometry/Crystal/SymmetryOperationSymbolParser.h" diff --git a/Framework/Geometry/src/Crystal/SymmetryOperationFactory.cpp b/Framework/Geometry/src/Crystal/SymmetryOperationFactory.cpp index c9fbec8328f32584dc00bba7798141b9f64a5fcd..1e4e8c19780ab975d12c49e3f2b7ca92beecf860 100644 --- a/Framework/Geometry/src/Crystal/SymmetryOperationFactory.cpp +++ b/Framework/Geometry/src/Crystal/SymmetryOperationFactory.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Crystal/SymmetryOperationFactory.h" #include "MantidKernel/Exception.h" diff --git a/Framework/Geometry/src/Crystal/SymmetryOperationSymbolParser.cpp b/Framework/Geometry/src/Crystal/SymmetryOperationSymbolParser.cpp index f87308c82e53873d42bc52d040cab1fed5cfd18b..2dd89eebc65bfdbc9cc99a090a390a5c05237ffa 100644 --- a/Framework/Geometry/src/Crystal/SymmetryOperationSymbolParser.cpp +++ b/Framework/Geometry/src/Crystal/SymmetryOperationSymbolParser.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Crystal/SymmetryOperationSymbolParser.h" diff --git a/Framework/Geometry/src/Crystal/UnitCell.cpp b/Framework/Geometry/src/Crystal/UnitCell.cpp index 56ac4001d50ad51a56912bdd2f76f5252d9e371e..c1e93394240a49e0c26a7adba44a90872f319673 100644 --- a/Framework/Geometry/src/Crystal/UnitCell.cpp +++ b/Framework/Geometry/src/Crystal/UnitCell.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Crystal/UnitCell.h" #include "MantidKernel/Matrix.h" diff --git a/Framework/Geometry/src/Crystal/V3R.cpp b/Framework/Geometry/src/Crystal/V3R.cpp index 9924cea8cd16d4ddc5e115e7c85a6b392f3fc2f2..f05a9f85d54f18fce73c363375b43128f679df25 100644 --- a/Framework/Geometry/src/Crystal/V3R.cpp +++ b/Framework/Geometry/src/Crystal/V3R.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Crystal/V3R.h" namespace Mantid { diff --git a/Framework/Geometry/src/IObjComponent.cpp b/Framework/Geometry/src/IObjComponent.cpp index fc7e22159abd37f914cc4f58386cde25a7935d32..5e9505645bd02ba70ae55b1f87d584a7d82d83fb 100644 --- a/Framework/Geometry/src/IObjComponent.cpp +++ b/Framework/Geometry/src/IObjComponent.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/Geometry/src/Instrument.cpp b/Framework/Geometry/src/Instrument.cpp index 9068d133340f54d1e3685a370b31313b703cc1e3..0b79e7780a543f5d9b3b23fb69f99fa65bd5ba81 100644 --- a/Framework/Geometry/src/Instrument.cpp +++ b/Framework/Geometry/src/Instrument.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Instrument.h" #include "MantidBeamline/ComponentInfo.h" @@ -24,6 +24,7 @@ #include <boost/make_shared.hpp> #include <nexus/NeXusFile.hpp> #include <queue> +#include <utility> using namespace Mantid::Kernel; using Mantid::Kernel::Exception::InstrumentDefinitionError; @@ -59,8 +60,8 @@ Instrument::Instrument(const std::string &name) * @param instr :: instrument for parameter inclusion * @param map :: parameter map to include */ -Instrument::Instrument(const boost::shared_ptr<const Instrument> instr, - boost::shared_ptr<ParameterMap> map) +Instrument::Instrument(const boost::shared_ptr<const Instrument> &instr, + const boost::shared_ptr<ParameterMap> &map) : CompAssembly(instr.get(), map.get()), m_sourceCache(instr->m_sourceCache), m_sampleCache(instr->m_sampleCache), m_defaultView(instr->m_defaultView), m_defaultViewAxis(instr->m_defaultViewAxis), m_instr(instr), @@ -1037,7 +1038,7 @@ Setter for the reference frame. @param frame : reference frame object to use. */ void Instrument::setReferenceFrame(boost::shared_ptr<ReferenceFrame> frame) { - m_referenceFrame = frame; + m_referenceFrame = std::move(frame); } /** diff --git a/Framework/Geometry/src/Instrument/CompAssembly.cpp b/Framework/Geometry/src/Instrument/CompAssembly.cpp index 35bca9aece06b2749e16abf14ab4934b15aea48c..2ac5862792e40bd28df5fc5fbd7f6168f7a5d95e 100644 --- a/Framework/Geometry/src/Instrument/CompAssembly.cpp +++ b/Framework/Geometry/src/Instrument/CompAssembly.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Instrument/CompAssembly.h" #include "MantidGeometry/IObjComponent.h" diff --git a/Framework/Geometry/src/Instrument/Component.cpp b/Framework/Geometry/src/Instrument/Component.cpp index ec8697f6193ad67eebfdad41a4c10be09cda8563..50500bfe039e723e06861ec1b50a13a48c50bc25 100644 --- a/Framework/Geometry/src/Instrument/Component.cpp +++ b/Framework/Geometry/src/Instrument/Component.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Instrument/Component.h" #include "MantidGeometry/IComponent.h" diff --git a/Framework/Geometry/src/Instrument/ComponentHelper.cpp b/Framework/Geometry/src/Instrument/ComponentHelper.cpp index e7586d2ab209c3066760cd517a56c63d0819bdca..8c37398ad1736c77ea1c2ae1c8169df52dae2ef1 100644 --- a/Framework/Geometry/src/Instrument/ComponentHelper.cpp +++ b/Framework/Geometry/src/Instrument/ComponentHelper.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Instrument/ComponentHelper.h" #include "MantidGeometry/IComponent.h" diff --git a/Framework/Geometry/src/Instrument/ComponentInfo.cpp b/Framework/Geometry/src/Instrument/ComponentInfo.cpp index b33d2a9b449d29ebc9400d1d61bed12f4134eb03..139d49531b6e7a1e2592df9ae31351eec96dd201 100644 --- a/Framework/Geometry/src/Instrument/ComponentInfo.cpp +++ b/Framework/Geometry/src/Instrument/ComponentInfo.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Instrument/ComponentInfo.h" #include "MantidBeamline/ComponentInfo.h" diff --git a/Framework/Geometry/src/Instrument/ComponentInfoBankHelpers.cpp b/Framework/Geometry/src/Instrument/ComponentInfoBankHelpers.cpp index 81ecec5e32cb08b2ba3069e846f66b5ae31d16f6..df21c4ba915652f1bd7528631e5536dc02c55bd9 100644 --- a/Framework/Geometry/src/Instrument/ComponentInfoBankHelpers.cpp +++ b/Framework/Geometry/src/Instrument/ComponentInfoBankHelpers.cpp @@ -1,3 +1,9 @@ +// Mantid Repository : https://github.com/mantidproject/mantid +// +// Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS +// SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Instrument/ComponentInfoBankHelpers.h" #include "MantidBeamline/ComponentType.h" #include "MantidGeometry/Instrument/ComponentInfo.h" diff --git a/Framework/Geometry/src/Instrument/ComponentInfoIterator.cpp b/Framework/Geometry/src/Instrument/ComponentInfoIterator.cpp index 6f836773d1a5ecea63d909ff291c8e7b872c0006..42fd82d41820030a9cbd29d1b399aa6e094010bc 100644 --- a/Framework/Geometry/src/Instrument/ComponentInfoIterator.cpp +++ b/Framework/Geometry/src/Instrument/ComponentInfoIterator.cpp @@ -1,3 +1,9 @@ +// Mantid Repository : https://github.com/mantidproject/mantid +// +// Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS +// SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Instrument/ComponentInfoIterator.h" namespace Mantid { diff --git a/Framework/Geometry/src/Instrument/Container.cpp b/Framework/Geometry/src/Instrument/Container.cpp index bd988c014e7ec4ad10543112ceecd6f4e02c369a..85a74621aa406dc6262761619d47ee501407063d 100644 --- a/Framework/Geometry/src/Instrument/Container.cpp +++ b/Framework/Geometry/src/Instrument/Container.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Instrument/Container.h" #include "MantidGeometry/Objects/CSGObject.h" @@ -16,6 +16,7 @@ #include "Poco/SAX/InputSource.h" #include "Poco/SAX/SAXException.h" #include <boost/make_shared.hpp> +#include <utility> namespace Mantid { namespace Geometry { @@ -55,7 +56,7 @@ void updateTreeValues(Poco::XML::Element *root, //------------------------------------------------------------------------------ Container::Container() : m_shape(boost::make_shared<CSGObject>()) {} -Container::Container(IObject_sptr shape) : m_shape(shape) {} +Container::Container(IObject_sptr shape) : m_shape(std::move(shape)) {} Container::Container(const Container &container) : m_shape(IObject_sptr(container.m_shape->clone())), diff --git a/Framework/Geometry/src/Instrument/Detector.cpp b/Framework/Geometry/src/Instrument/Detector.cpp index 66ceaab1ec8994cc8a22c2fc80bcc567f960e072..377b462a2763bab2e5ff1a92a71d5f0b0ba2463e 100644 --- a/Framework/Geometry/src/Instrument/Detector.cpp +++ b/Framework/Geometry/src/Instrument/Detector.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Instrument/Detector.h" #include "MantidBeamline/DetectorInfo.h" @@ -45,7 +45,7 @@ Detector::Detector(const std::string &name, int id, IComponent *parent) * @param parent :: The parent component */ Detector::Detector(const std::string &name, int id, - boost::shared_ptr<IObject> shape, IComponent *parent) + const boost::shared_ptr<IObject> &shape, IComponent *parent) : IDetector(), ObjComponent(name, shape, parent), m_id(id) {} /** Gets the detector id diff --git a/Framework/Geometry/src/Instrument/DetectorGroup.cpp b/Framework/Geometry/src/Instrument/DetectorGroup.cpp index 74c79baaeb2481b6841add62b78bf9d6b6722f10..11d099398512065632201a4459ada11fa9d4b765 100644 --- a/Framework/Geometry/src/Instrument/DetectorGroup.cpp +++ b/Framework/Geometry/src/Instrument/DetectorGroup.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Instrument/DetectorGroup.h" #include "MantidGeometry/Instrument/ComponentVisitor.h" @@ -49,7 +49,7 @@ DetectorGroup::DetectorGroup(const std::vector<IDetector_const_sptr> &dets) /** Add a detector to the collection * @param det :: A pointer to the detector to add */ -void DetectorGroup::addDetector(IDetector_const_sptr det) { +void DetectorGroup::addDetector(const IDetector_const_sptr &det) { // the topology of the group become undefined and needs recalculation if new // detector has been added to the group group_topology = undef; diff --git a/Framework/Geometry/src/Instrument/DetectorInfo.cpp b/Framework/Geometry/src/Instrument/DetectorInfo.cpp index 82310bcef19ef256cf0c4d9cf77a37bcad23759f..992682287becb3c0531d0bb1809873b1172d5861 100644 --- a/Framework/Geometry/src/Instrument/DetectorInfo.cpp +++ b/Framework/Geometry/src/Instrument/DetectorInfo.cpp @@ -1,13 +1,15 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + -#include "MantidGeometry/Instrument/DetectorInfo.h" +#include <utility> + #include "MantidBeamline/DetectorInfo.h" #include "MantidGeometry/Instrument.h" #include "MantidGeometry/Instrument/Detector.h" +#include "MantidGeometry/Instrument/DetectorInfo.h" #include "MantidGeometry/Instrument/DetectorInfoIterator.h" #include "MantidGeometry/Instrument/ReferenceFrame.h" #include "MantidKernel/EigenConversionHelpers.h" @@ -27,8 +29,10 @@ DetectorInfo::DetectorInfo( boost::shared_ptr<const std::vector<detid_t>> detectorIds, boost::shared_ptr<const std::unordered_map<detid_t, size_t>> detIdToIndexMap) - : m_detectorInfo(std::move(detectorInfo)), m_instrument(instrument), - m_detectorIDs(detectorIds), m_detIDToIndex(detIdToIndexMap), + : m_detectorInfo(std::move(detectorInfo)), + m_instrument(std::move(instrument)), + m_detectorIDs(std::move(detectorIds)), + m_detIDToIndex(std::move(detIdToIndexMap)), m_lastDetector(PARALLEL_GET_MAX_THREADS), m_lastIndex(PARALLEL_GET_MAX_THREADS, -1) { diff --git a/Framework/Geometry/src/Instrument/FitParameter.cpp b/Framework/Geometry/src/Instrument/FitParameter.cpp index 66b090e45d49de077291834bc1a2c877484e6ed8..e2aa8e66daaa24f45d59d119235842744b9fb717 100644 --- a/Framework/Geometry/src/Instrument/FitParameter.cpp +++ b/Framework/Geometry/src/Instrument/FitParameter.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/Geometry/src/Instrument/Goniometer.cpp b/Framework/Geometry/src/Instrument/Goniometer.cpp index 4fcfe2ad72c9739e6701b62c29d18b280a803fed..e2dd92bd4764f54b2ec037d0586a12a739f0c9fe 100644 --- a/Framework/Geometry/src/Instrument/Goniometer.cpp +++ b/Framework/Geometry/src/Instrument/Goniometer.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Instrument/Goniometer.h" #include "MantidKernel/ConfigService.h" @@ -14,6 +14,8 @@ #include <sstream> #include <stdexcept> #include <string> +#include <utility> + #include <vector> using namespace Mantid::Kernel; @@ -64,7 +66,7 @@ Goniometer::Goniometer() : R(3, 3, true), initFromR(false) {} /// Constructor from a rotation matrix /// @param rot :: DblMatrix matrix that is going to be the internal rotation /// matrix of the goniometer. Cannot push additional axes -Goniometer::Goniometer(DblMatrix rot) { +Goniometer::Goniometer(const DblMatrix &rot) { DblMatrix ide(3, 3), rtr(3, 3); rtr = rot.Tprime() * rot; ide.identityMatrix(); @@ -83,7 +85,7 @@ const Kernel::DblMatrix &Goniometer::getR() const { return R; } /// @param rot :: DblMatrix matrix that is going to be the internal rotation /// matrix of the goniometer. void Goniometer::setR(Kernel::DblMatrix rot) { - R = rot; + R = std::move(rot); initFromR = true; } @@ -129,7 +131,7 @@ std::string Goniometer::axesInfo() { @param sense :: rotation sense (CW or CCW), CCW by default @param angUnit :: units for angle of type#AngleUnit, angDegrees by default */ -void Goniometer::pushAxis(std::string name, double axisx, double axisy, +void Goniometer::pushAxis(const std::string &name, double axisx, double axisy, double axisz, double angle, int sense, int angUnit) { if (initFromR) { throw std::runtime_error( @@ -160,7 +162,7 @@ void Goniometer::pushAxis(std::string name, double axisx, double axisy, @param name :: GoniometerAxis name @param value :: value in the units that the axis is set */ -void Goniometer::setRotationAngle(std::string name, double value) { +void Goniometer::setRotationAngle(const std::string &name, double value) { bool changed = false; std::vector<GoniometerAxis>::iterator it; for (it = motors.begin(); it < motors.end(); ++it) { @@ -255,7 +257,7 @@ const GoniometerAxis &Goniometer::getAxis(size_t axisnumber) const { /// Get GoniometerAxis object using motor name /// @param axisname :: axis name -const GoniometerAxis &Goniometer::getAxis(std::string axisname) const { +const GoniometerAxis &Goniometer::getAxis(const std::string &axisname) const { for (auto it = motors.begin(); it < motors.end(); ++it) { if (axisname == it->name) { return (*it); @@ -288,7 +290,7 @@ void Goniometer::makeUniversalGoniometer() { * @param convention :: the convention used to calculate Euler Angles. The * UniversalGoniometer is YZY, a triple axis goniometer at HFIR is YZX */ -std::vector<double> Goniometer::getEulerAngles(std::string convention) { +std::vector<double> Goniometer::getEulerAngles(const std::string &convention) { return Quat(getR()).getEulerAngles(convention); } diff --git a/Framework/Geometry/src/Instrument/GridDetector.cpp b/Framework/Geometry/src/Instrument/GridDetector.cpp index 5f681d484bbcdab9aafd08a1b3e2afa998e74e7c..6acabcbfc1c8b972b2eb500cc69bbb03c40b4d55 100644 --- a/Framework/Geometry/src/Instrument/GridDetector.cpp +++ b/Framework/Geometry/src/Instrument/GridDetector.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Instrument/GridDetector.h" #include "MantidGeometry/Instrument/ComponentInfo.h" @@ -23,6 +23,7 @@ #include <boost/regex.hpp> #include <ostream> #include <stdexcept> +#include <utility> namespace Mantid { namespace Geometry { @@ -548,7 +549,7 @@ void GridDetector::initializeValues(boost::shared_ptr<IObject> shape, m_xstep = xstep; m_ystep = ystep; m_zstep = zstep; - m_shape = shape; + m_shape = std::move(shape); /// IDs start here m_idstart = idstart; @@ -609,9 +610,9 @@ void GridDetector::initialize(boost::shared_ptr<IObject> shape, int xpixels, throw std::runtime_error("GridDetector::initialize() called for a " "parametrized GridDetector"); - initializeValues(shape, xpixels, xstart, xstep, ypixels, ystart, ystep, - zpixels, zstart, zstep, idstart, idFillOrder, idstepbyrow, - idstep); + initializeValues(std::move(shape), xpixels, xstart, xstep, ypixels, ystart, + ystep, zpixels, zstart, zstep, idstart, idFillOrder, + idstepbyrow, idstep); std::string name = this->getName(); int minDetId = idstart, maxDetId = idstart; diff --git a/Framework/Geometry/src/Instrument/GridDetectorPixel.cpp b/Framework/Geometry/src/Instrument/GridDetectorPixel.cpp index 7643e0cd85aee37de9fa3b068fb697c36f1c8a8a..0f1f8ac41be4f08f3e04b3311b724cf2244bf54d 100644 --- a/Framework/Geometry/src/Instrument/GridDetectorPixel.cpp +++ b/Framework/Geometry/src/Instrument/GridDetectorPixel.cpp @@ -1,11 +1,13 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + -#include "MantidGeometry/Instrument/GridDetectorPixel.h" +#include <utility> + #include "MantidGeometry/Instrument/GridDetector.h" +#include "MantidGeometry/Instrument/GridDetectorPixel.h" #include "MantidKernel/System.h" #include "MantidKernel/V3D.h" @@ -36,12 +38,12 @@ GridDetectorPixel::GridDetectorPixel(const GridDetectorPixel *base, * @param layer :: layer of the pixel in the panel */ GridDetectorPixel::GridDetectorPixel(const std::string &name, int id, - boost::shared_ptr<IObject> shape, + const boost::shared_ptr<IObject> &shape, IComponent *parent, const GridDetector *panel, size_t col, size_t row, size_t layer) - : Detector(name, id, shape, parent), m_panel(panel), m_col(col), m_row(row), - m_layer(layer) { + : Detector(name, id, std::move(shape), parent), m_panel(panel), m_col(col), + m_row(row), m_layer(layer) { if (!m_panel) throw std::runtime_error("GridDetectorPixel::ctor(): pixel " + name + " has no valid GridDetector parent."); diff --git a/Framework/Geometry/src/Instrument/IDFObject.cpp b/Framework/Geometry/src/Instrument/IDFObject.cpp index 753d76bb7a1febb71931ffc62a30d3a88ca3f9b9..fb6eeefa93ba8f2f358ec9b80c7cc03f222cbdab 100644 --- a/Framework/Geometry/src/Instrument/IDFObject.cpp +++ b/Framework/Geometry/src/Instrument/IDFObject.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Instrument/IDFObject.h" #include "MantidKernel/ChecksumHelper.h" diff --git a/Framework/Geometry/src/Instrument/InstrumentDefinitionParser.cpp b/Framework/Geometry/src/Instrument/InstrumentDefinitionParser.cpp index 477d232e6a4dcc6a08a81c3dec1e1befd8a8aff6..cce5e6cb36fd924e67a59339dd0c1008bfac9eed 100644 --- a/Framework/Geometry/src/Instrument/InstrumentDefinitionParser.cpp +++ b/Framework/Geometry/src/Instrument/InstrumentDefinitionParser.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include <fstream> #include <sstream> @@ -39,6 +39,7 @@ #include <boost/make_shared.hpp> #include <boost/regex.hpp> #include <unordered_set> +#include <utility> using namespace Mantid; using namespace Mantid::Kernel; @@ -95,8 +96,8 @@ InstrumentDefinitionParser::InstrumentDefinitionParser( * @param xmlText :: XML contents of IDF */ InstrumentDefinitionParser::InstrumentDefinitionParser( - const IDFObject_const_sptr xmlFile, - const IDFObject_const_sptr expectedCacheFile, const std::string &instName, + const IDFObject_const_sptr &xmlFile, + const IDFObject_const_sptr &expectedCacheFile, const std::string &instName, const std::string &xmlText) : m_xmlFile(boost::make_shared<NullIDFObject>()), m_cacheFile(boost::make_shared<NullIDFObject>()), m_pDoc(nullptr), @@ -414,7 +415,7 @@ void InstrumentDefinitionParser::checkComponentContainsLocationElement( * @param filename :: Name of the IDF, for exception message */ void InstrumentDefinitionParser::checkIdListExistsAndDefinesEnoughIDs( - IdList idList, Element *pElem, const std::string &filename) const { + const IdList &idList, Element *pElem, const std::string &filename) const { if (idList.counted != static_cast<int>(idList.vec.size())) { std::stringstream ss1, ss2; ss1 << idList.vec.size(); @@ -1990,7 +1991,7 @@ void InstrumentDefinitionParser::populateIdList(Poco::XML::Element *pE, * @throw InstrumentDefinitionError Thrown if type not defined in XML *definition */ -bool InstrumentDefinitionParser::isAssembly(std::string type) const { +bool InstrumentDefinitionParser::isAssembly(const std::string &type) const { const std::string filename = m_xmlFile->getFileFullPathStr(); auto it = isTypeAssembly.find(type); @@ -2580,7 +2581,8 @@ void InstrumentDefinitionParser::setComponentLinks( Apply the cache. @param cacheToApply : Cache file object to use the the geometries. */ -void InstrumentDefinitionParser::applyCache(IDFObject_const_sptr cacheToApply) { +void InstrumentDefinitionParser::applyCache( + const IDFObject_const_sptr &cacheToApply) { const std::string cacheFullPath = cacheToApply->getFileFullPathStr(); g_log.information("Loading geometry cache from " + cacheFullPath); // create a vtk reader @@ -2605,14 +2607,14 @@ Write the cache file from the IDF file and apply it. InstrumentDefinitionParser::CachingOption InstrumentDefinitionParser::writeAndApplyCache( IDFObject_const_sptr firstChoiceCache, IDFObject_const_sptr fallBackCache) { - IDFObject_const_sptr usedCache = firstChoiceCache; + IDFObject_const_sptr usedCache = std::move(firstChoiceCache); auto cachingOption = WroteGeomCache; g_log.notice("Geometry cache is not available"); try { Poco::File dir = usedCache->getParentDirectory(); if (dir.path().empty() || !dir.exists() || !dir.canWrite()) { - usedCache = fallBackCache; + usedCache = std::move(fallBackCache); cachingOption = WroteCacheTemp; g_log.information() << "Geometrycache directory is read only, writing cache " diff --git a/Framework/Geometry/src/Instrument/InstrumentVisitor.cpp b/Framework/Geometry/src/Instrument/InstrumentVisitor.cpp index a16535d6f20a74ef0e5cf56f9362d904a2708d51..32bf6e0de32451d23b36fd4ee63f0e2239858668 100644 --- a/Framework/Geometry/src/Instrument/InstrumentVisitor.cpp +++ b/Framework/Geometry/src/Instrument/InstrumentVisitor.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Instrument/InstrumentVisitor.h" #include "MantidBeamline/ComponentInfo.h" diff --git a/Framework/Geometry/src/Instrument/ObjCompAssembly.cpp b/Framework/Geometry/src/Instrument/ObjCompAssembly.cpp index d99c3198f278d379d33790ca0f54ffd5e739d741..13c327d53751caf48d17ca4777d730936b53c6b5 100644 --- a/Framework/Geometry/src/Instrument/ObjCompAssembly.cpp +++ b/Framework/Geometry/src/Instrument/ObjCompAssembly.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Instrument/ObjCompAssembly.h" #include "MantidGeometry/Instrument/ComponentVisitor.h" @@ -16,6 +16,7 @@ #include <algorithm> #include <ostream> #include <stdexcept> +#include <utility> namespace { Mantid::Kernel::Logger g_log("ObjCompAssembly"); @@ -408,12 +409,12 @@ boost::shared_ptr<IObject> ObjCompAssembly::createOutline() { // find the 'moments of inertia' of the assembly double Ixx = 0, Iyy = 0, Izz = 0, Ixy = 0, Ixz = 0, Iyz = 0; V3D Cmass; // 'center of mass' of the assembly - for (const_comp_it it = group.begin(); it != group.end(); it++) { + for (const_comp_it it = group.begin(); it != group.end(); ++it) { V3D p = (**it).getRelativePos(); Cmass += p; } Cmass /= nelements(); - for (const_comp_it it = group.begin(); it != group.end(); it++) { + for (const_comp_it it = group.begin(); it != group.end(); ++it) { V3D p = (**it).getRelativePos(); double x = p.X() - Cmass.X(), x2 = x * x; double y = p.Y() - Cmass.Y(), y2 = y * y; @@ -475,7 +476,7 @@ boost::shared_ptr<IObject> ObjCompAssembly::createOutline() { // positive displacements are positive numbers and negative ones are negative double hxn = 0, hyn = 0, hzn = 0; double hxp = 0, hyp = 0, hzp = 0; - for (const_comp_it it = group.begin(); it != group.end(); it++) { + for (const_comp_it it = group.begin(); it != group.end(); ++it) { // displacement vector of a detector V3D p = (**it).getRelativePos() - Cmass; // its projection on the vx axis @@ -609,7 +610,7 @@ boost::shared_ptr<IObject> ObjCompAssembly::createOutline() { * @param obj :: The outline shape created previously fith createOutline() */ void ObjCompAssembly::setOutline(boost::shared_ptr<const IObject> obj) { - m_shape = obj; + m_shape = std::move(obj); } /** Print information about elements in the assembly to a stream diff --git a/Framework/Geometry/src/Instrument/ObjComponent.cpp b/Framework/Geometry/src/Instrument/ObjComponent.cpp index 126a2f38aa80d0d38233da911fa028aed3ea45d6..f24ae4316de4c441f280d236d9a3cf7e9f81aed2 100644 --- a/Framework/Geometry/src/Instrument/ObjComponent.cpp +++ b/Framework/Geometry/src/Instrument/ObjComponent.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Instrument/ObjComponent.h" #include "MantidGeometry/Instrument/ComponentInfo.h" @@ -15,6 +15,7 @@ #include "MantidKernel/Exception.h" #include "MantidKernel/Material.h" #include <cfloat> +#include <utility> namespace Mantid { namespace Geometry { @@ -44,7 +45,7 @@ ObjComponent::ObjComponent(const std::string &name, IComponent *parent) ObjComponent::ObjComponent(const std::string &name, boost::shared_ptr<const IObject> shape, IComponent *parent) - : IObjComponent(), Component(name, parent), m_shape(shape) {} + : IObjComponent(), Component(name, parent), m_shape(std::move(shape)) {} /** Return the shape of the component */ @@ -65,7 +66,7 @@ void ObjComponent::setShape(boost::shared_ptr<const IObject> newShape) { throw std::runtime_error("ObjComponent::setShape - Cannot change the shape " "of a parameterized object"); else - m_shape = newShape; + m_shape = std::move(newShape); } /** diff --git a/Framework/Geometry/src/Instrument/ParComponentFactory.cpp b/Framework/Geometry/src/Instrument/ParComponentFactory.cpp index a295a1052b4fb06dbbe8698d3536a52ef6b6c86f..c37cc266ef74152829bf44cd9c8fd2d39e2053fb 100644 --- a/Framework/Geometry/src/Instrument/ParComponentFactory.cpp +++ b/Framework/Geometry/src/Instrument/ParComponentFactory.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Instrument/ParComponentFactory.h" #include "MantidGeometry/Instrument.h" @@ -58,7 +58,7 @@ ParComponentFactory::createInstrument(boost::shared_ptr<const Instrument> base, * @returns A pointer to a parameterized component */ IComponent_sptr -ParComponentFactory::create(boost::shared_ptr<const IComponent> base, +ParComponentFactory::create(const boost::shared_ptr<const IComponent> &base, const ParameterMap *map) { boost::shared_ptr<const IDetector> det_sptr = boost::dynamic_pointer_cast<const IDetector>(base); diff --git a/Framework/Geometry/src/Instrument/Parameter.cpp b/Framework/Geometry/src/Instrument/Parameter.cpp index f284b020945422e59b470965a25daeb5cbf4e827..dbd8046d8300a69b3ca377a3b8090fa0c06c6160 100644 --- a/Framework/Geometry/src/Instrument/Parameter.cpp +++ b/Framework/Geometry/src/Instrument/Parameter.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Instrument/Parameter.h" #include "MantidGeometry/Instrument/FitParameter.h" diff --git a/Framework/Geometry/src/Instrument/ParameterMap.cpp b/Framework/Geometry/src/Instrument/ParameterMap.cpp index de57aa0d6612f2ea91049a7cfb5f89ec01922606..79d129c098d07e3c90630cc41f6e5d819f477a3e 100644 --- a/Framework/Geometry/src/Instrument/ParameterMap.cpp +++ b/Framework/Geometry/src/Instrument/ParameterMap.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Instrument/ParameterMap.h" #include "MantidGeometry/IDetector.h" diff --git a/Framework/Geometry/src/Instrument/RectangularDetector.cpp b/Framework/Geometry/src/Instrument/RectangularDetector.cpp index 84ad758d41c0649afc30599abfa9c7240cad446c..03359db991e8be4f8957b51cb4af0b8738a76609 100644 --- a/Framework/Geometry/src/Instrument/RectangularDetector.cpp +++ b/Framework/Geometry/src/Instrument/RectangularDetector.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Instrument/RectangularDetector.h" #include "MantidGeometry/Instrument/ComponentInfo.h" @@ -22,6 +22,7 @@ #include <boost/regex.hpp> #include <ostream> #include <stdexcept> +#include <utility> namespace { /** @@ -180,8 +181,8 @@ void RectangularDetector::initialize(boost::shared_ptr<IObject> shape, int idstepbyrow, int idstep) { GridDetector::initialize( - shape, xpixels, xstart, xstep, ypixels, ystart, ystep, 0, 0, 0, idstart, - idfillbyfirst_y ? "yxz" : "xyz", idstepbyrow, idstep); + std::move(shape), xpixels, xstart, xstep, ypixels, ystart, ystep, 0, 0, 0, + idstart, idfillbyfirst_y ? "yxz" : "xyz", idstepbyrow, idstep); } //------------------------------------------------------------------------------------------------ diff --git a/Framework/Geometry/src/Instrument/ReferenceFrame.cpp b/Framework/Geometry/src/Instrument/ReferenceFrame.cpp index b636ecd3642e5c26cfa1c1c8a677bdd95eac0e61..af7eb48230e26317df67c99f0355772d7128c0ce 100644 --- a/Framework/Geometry/src/Instrument/ReferenceFrame.cpp +++ b/Framework/Geometry/src/Instrument/ReferenceFrame.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Instrument/ReferenceFrame.h" #include <stdexcept> diff --git a/Framework/Geometry/src/Instrument/SampleEnvironment.cpp b/Framework/Geometry/src/Instrument/SampleEnvironment.cpp index c88d0b96d65386ff4c85b7f594df5ea59628c767..4684a6319e196f5216bb3e2ae43279659c2c19e4 100644 --- a/Framework/Geometry/src/Instrument/SampleEnvironment.cpp +++ b/Framework/Geometry/src/Instrument/SampleEnvironment.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //------------------------------------------------------------------------------ // Includes @@ -29,7 +29,7 @@ using Kernel::V3D; * @param container The object that represents the can */ SampleEnvironment::SampleEnvironment(std::string name, - Container_const_sptr container) + const Container_const_sptr &container) : m_name(std::move(name)), m_components(1, container) {} const IObject &SampleEnvironment::getComponent(const size_t index) const { diff --git a/Framework/Geometry/src/Instrument/StructuredDetector.cpp b/Framework/Geometry/src/Instrument/StructuredDetector.cpp index 43150e03b9c7924c80f56bce3bffb54778305008..c6e5591e6e4bfadb2dca267bf2abc69940416524 100644 --- a/Framework/Geometry/src/Instrument/StructuredDetector.cpp +++ b/Framework/Geometry/src/Instrument/StructuredDetector.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Instrument/StructuredDetector.h" #include "MantidGeometry/Instrument/ComponentInfo.h" diff --git a/Framework/Geometry/src/Instrument/XMLInstrumentParameter.cpp b/Framework/Geometry/src/Instrument/XMLInstrumentParameter.cpp index 08d66b607d057196479e3ff712f781136057afad..ce2c5a1337bea7635be934c635d2ea0f2f1aaff0 100644 --- a/Framework/Geometry/src/Instrument/XMLInstrumentParameter.cpp +++ b/Framework/Geometry/src/Instrument/XMLInstrumentParameter.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/Geometry/src/MDGeometry/CompositeImplicitFunction.cpp b/Framework/Geometry/src/MDGeometry/CompositeImplicitFunction.cpp index cbdec42f8beffb01010c9a92f4a5d0011aea6828..154f5adbb2b1b977bb510dca339ddd72b27f6b0f 100644 --- a/Framework/Geometry/src/MDGeometry/CompositeImplicitFunction.cpp +++ b/Framework/Geometry/src/MDGeometry/CompositeImplicitFunction.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include <sstream> @@ -23,7 +23,7 @@ namespace Mantid { namespace Geometry { bool CompositeImplicitFunction::addFunction( - Mantid::Geometry::MDImplicitFunction_sptr constituentFunction) { + const Mantid::Geometry::MDImplicitFunction_sptr &constituentFunction) { bool bSuccess = false; if (constituentFunction.get() != nullptr) { this->m_Functions.emplace_back(constituentFunction); diff --git a/Framework/Geometry/src/MDGeometry/GeneralFrame.cpp b/Framework/Geometry/src/MDGeometry/GeneralFrame.cpp index 7c7af0590b0f0ce06cb281af5bda89d79c366d66..0a6c828a6e4b39a5d6fd0bd221b08d49b7bfb98d 100644 --- a/Framework/Geometry/src/MDGeometry/GeneralFrame.cpp +++ b/Framework/Geometry/src/MDGeometry/GeneralFrame.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/MDGeometry/GeneralFrame.h" diff --git a/Framework/Geometry/src/MDGeometry/HKL.cpp b/Framework/Geometry/src/MDGeometry/HKL.cpp index cb22c640ec14eb500d8ebbfb381e2ebb63a9e489..ed3c218889c63d18a2a2b840006cec2f2e343086 100644 --- a/Framework/Geometry/src/MDGeometry/HKL.cpp +++ b/Framework/Geometry/src/MDGeometry/HKL.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/MDGeometry/HKL.h" #include <stdexcept> diff --git a/Framework/Geometry/src/MDGeometry/IMDDimension.cpp b/Framework/Geometry/src/MDGeometry/IMDDimension.cpp index fa333a4160729dd237e67592aab768d858eceaa3..1f4ae5cd6b5658dcf032925636e510563e46adbf 100644 --- a/Framework/Geometry/src/MDGeometry/IMDDimension.cpp +++ b/Framework/Geometry/src/MDGeometry/IMDDimension.cpp @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - /** The class discribes one dimension of multidimensional dataset representing an ortogonal dimension and linear axis. * diff --git a/Framework/Geometry/src/MDGeometry/IMDDimensionFactory.cpp b/Framework/Geometry/src/MDGeometry/IMDDimensionFactory.cpp index e83843e53752e83a525efad3fd575ce4c413056c..964fb1764c4180dd6d1fa0b471fac5977a0aed7f 100644 --- a/Framework/Geometry/src/MDGeometry/IMDDimensionFactory.cpp +++ b/Framework/Geometry/src/MDGeometry/IMDDimensionFactory.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/MDGeometry/IMDDimensionFactory.h" #include "MantidGeometry/MDGeometry/MDFrameFactory.h" diff --git a/Framework/Geometry/src/MDGeometry/MDBoxImplicitFunction.cpp b/Framework/Geometry/src/MDGeometry/MDBoxImplicitFunction.cpp index 7431ec32b9b114b6a65d8e91a9f64cc011f86bda..ef0865b539b15f89fb4611f05954c8e04fabe0ab 100644 --- a/Framework/Geometry/src/MDGeometry/MDBoxImplicitFunction.cpp +++ b/Framework/Geometry/src/MDGeometry/MDBoxImplicitFunction.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/MDGeometry/MDBoxImplicitFunction.h" #include "MantidGeometry/MDGeometry/MDPlane.h" diff --git a/Framework/Geometry/src/MDGeometry/MDFrameFactory.cpp b/Framework/Geometry/src/MDGeometry/MDFrameFactory.cpp index 334c9ecf41906365d614c568b81082f3ea075b43..85c0015e848061773141a60cec2650c42af69d30 100644 --- a/Framework/Geometry/src/MDGeometry/MDFrameFactory.cpp +++ b/Framework/Geometry/src/MDGeometry/MDFrameFactory.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/MDGeometry/MDFrameFactory.h" #include "MantidGeometry/MDGeometry/MDFrame.h" diff --git a/Framework/Geometry/src/MDGeometry/MDGeometryXMLBuilder.cpp b/Framework/Geometry/src/MDGeometry/MDGeometryXMLBuilder.cpp index d3969aa0349a8c4959e1019481efdfa7875fb4c4..85b59c805d944f4fbb032e2c14ad320eb9d07fa9 100644 --- a/Framework/Geometry/src/MDGeometry/MDGeometryXMLBuilder.cpp +++ b/Framework/Geometry/src/MDGeometry/MDGeometryXMLBuilder.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include <sstream> @@ -53,7 +53,7 @@ bool MDGeometryBuilderXML<CheckDimensionPolicy>::addOrdinaryDimension( */ template <typename CheckDimensionPolicy> void MDGeometryBuilderXML<CheckDimensionPolicy>::addManyOrdinaryDimensions( - VecIMDDimension_sptr manyDims) const { + const VecIMDDimension_sptr &manyDims) const { for (auto &manyDim : manyDims) { addOrdinaryDimension(manyDim); } @@ -106,7 +106,7 @@ void MDGeometryBuilderXML<CheckDimensionPolicy>::applyPolicyChecking( */ template <typename CheckDimensionPolicy> bool MDGeometryBuilderXML<CheckDimensionPolicy>::addXDimension( - IMDDimension_const_sptr dimension) const { + const IMDDimension_const_sptr &dimension) const { bool bAdded = false; if (dimension) { @@ -126,7 +126,7 @@ bool MDGeometryBuilderXML<CheckDimensionPolicy>::addXDimension( */ template <typename CheckDimensionPolicy> bool MDGeometryBuilderXML<CheckDimensionPolicy>::addYDimension( - IMDDimension_const_sptr dimension) const { + const IMDDimension_const_sptr &dimension) const { bool bAdded = false; if (dimension) { @@ -146,7 +146,7 @@ bool MDGeometryBuilderXML<CheckDimensionPolicy>::addYDimension( */ template <typename CheckDimensionPolicy> bool MDGeometryBuilderXML<CheckDimensionPolicy>::addZDimension( - IMDDimension_const_sptr dimension) const { + const IMDDimension_const_sptr &dimension) const { bool bAdded = false; if (dimension) { applyPolicyChecking(*dimension); @@ -165,7 +165,7 @@ bool MDGeometryBuilderXML<CheckDimensionPolicy>::addZDimension( */ template <typename CheckDimensionPolicy> bool MDGeometryBuilderXML<CheckDimensionPolicy>::addTDimension( - IMDDimension_const_sptr dimension) const { + const IMDDimension_const_sptr &dimension) const { bool bAdded = false; if (dimension) { diff --git a/Framework/Geometry/src/MDGeometry/MDGeometryXMLParser.cpp b/Framework/Geometry/src/MDGeometry/MDGeometryXMLParser.cpp index 492cfc19693939ac82e05ebb1568af0e0848b919..26735df1cc4775edc651bc091452840547f0be7f 100644 --- a/Framework/Geometry/src/MDGeometry/MDGeometryXMLParser.cpp +++ b/Framework/Geometry/src/MDGeometry/MDGeometryXMLParser.cpp @@ -1,10 +1,11 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include <algorithm> +#include <utility> #include "MantidGeometry/MDGeometry/IMDDimensionFactory.h" #include "MantidGeometry/MDGeometry/MDGeometryXMLDefinitions.h" @@ -23,14 +24,14 @@ struct findID { const std::string m_id; explicit findID(const std::string &id) : m_id(id) {} - bool operator()(const Mantid::Geometry::IMDDimension_sptr obj) const { + bool operator()(const Mantid::Geometry::IMDDimension_sptr &obj) const { return m_id == obj->getDimensionId(); } }; /// Helper unary comparison type for finding non-integrated dimensions. struct findIntegrated { - bool operator()(const Mantid::Geometry::IMDDimension_sptr obj) const { + bool operator()(const Mantid::Geometry::IMDDimension_sptr &obj) const { return obj->getIsIntegrated(); } }; @@ -307,7 +308,7 @@ Setter for the root element. "Dimensions" unless xml snippet passed in directly, in which case do not set. */ void MDGeometryXMLParser::SetRootNodeCheck(std::string elementName) { - m_rootNodeName = elementName; + m_rootNodeName = std::move(elementName); } /** @@ -346,7 +347,7 @@ Determines whether query dimension is the x dimension. @return true if matches. */ bool MDGeometryXMLParser::isXDimension( - Mantid::Geometry::IMDDimension_sptr candidate) const { + const Mantid::Geometry::IMDDimension_sptr &candidate) const { validate(); bool bResult = false; if (hasXDimension()) { @@ -363,7 +364,7 @@ Determines whether query dimension is the y dimension. @return true if matches. */ bool MDGeometryXMLParser::isYDimension( - Mantid::Geometry::IMDDimension_sptr candidate) const { + const Mantid::Geometry::IMDDimension_sptr &candidate) const { validate(); bool bResult = false; if (hasYDimension()) { @@ -380,7 +381,7 @@ Determines whether query dimension is the z dimension. @return true if matches. */ bool MDGeometryXMLParser::isZDimension( - Mantid::Geometry::IMDDimension_sptr candidate) const { + const Mantid::Geometry::IMDDimension_sptr &candidate) const { validate(); bool bResult = false; if (hasZDimension()) { @@ -397,7 +398,7 @@ Determines whether query dimension is the t dimension. @return true if matches. */ bool MDGeometryXMLParser::isTDimension( - Mantid::Geometry::IMDDimension_sptr candidate) const { + const Mantid::Geometry::IMDDimension_sptr &candidate) const { validate(); bool bResult = false; if (hasTDimension()) { diff --git a/Framework/Geometry/src/MDGeometry/MDHistoDimension.cpp b/Framework/Geometry/src/MDGeometry/MDHistoDimension.cpp index 5a96013aafdb0d85e0dfebe7d1ac81bc085173c5..24ee1238f283de2df0ab927e5bc8703519cf7207 100644 --- a/Framework/Geometry/src/MDGeometry/MDHistoDimension.cpp +++ b/Framework/Geometry/src/MDGeometry/MDHistoDimension.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/MDGeometry/MDHistoDimension.h" #include <sstream> diff --git a/Framework/Geometry/src/MDGeometry/MDHistoDimensionBuilder.cpp b/Framework/Geometry/src/MDGeometry/MDHistoDimensionBuilder.cpp index 4fd1d37235840750a1cf6c24afb9711564e24cae..83d19054edb293f9a1b0f618089f24d5819326cb 100644 --- a/Framework/Geometry/src/MDGeometry/MDHistoDimensionBuilder.cpp +++ b/Framework/Geometry/src/MDGeometry/MDHistoDimensionBuilder.cpp @@ -1,11 +1,13 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + -#include "MantidGeometry/MDGeometry/MDHistoDimensionBuilder.h" +#include <utility> + #include "MantidGeometry/MDGeometry/MDFrameFactory.h" +#include "MantidGeometry/MDGeometry/MDHistoDimensionBuilder.h" #include "MantidKernel/Strings.h" #include "MantidKernel/UnitLabelTypes.h" @@ -21,7 +23,7 @@ MDHistoDimensionBuilder::MDHistoDimensionBuilder() Setter for the dimension name @param name : friendly name of dimension */ -void MDHistoDimensionBuilder::setName(std::string name) { +void MDHistoDimensionBuilder::setName(const std::string &name) { // String any spaces m_name = Kernel::Strings::strip(name); } @@ -30,7 +32,7 @@ void MDHistoDimensionBuilder::setName(std::string name) { Setter for the dimension id @param id : id of the dimension */ -void MDHistoDimensionBuilder::setId(std::string id) { m_id = id; } +void MDHistoDimensionBuilder::setId(std::string id) { m_id = std::move(id); } /* Setter for the dimension units @@ -69,7 +71,7 @@ void MDHistoDimensionBuilder::setNumBins(size_t nbins) { m_nbins = nbins; } * @param frameName: the frame name */ void MDHistoDimensionBuilder::setFrameName(std::string frameName) { - m_frameName = frameName; + m_frameName = std::move(frameName); } /* diff --git a/Framework/Geometry/src/MDGeometry/MDImplicitFunction.cpp b/Framework/Geometry/src/MDGeometry/MDImplicitFunction.cpp index e2ce983b2ce2441fe42354ab66974923b44f295a..561f1f96bc4166c1b151af920040097cfd146874 100644 --- a/Framework/Geometry/src/MDGeometry/MDImplicitFunction.cpp +++ b/Framework/Geometry/src/MDGeometry/MDImplicitFunction.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/MDGeometry/MDImplicitFunction.h" #include "MantidKernel/System.h" diff --git a/Framework/Geometry/src/MDGeometry/MDPlane.cpp b/Framework/Geometry/src/MDGeometry/MDPlane.cpp index 3ae78e34079de494b8764773bc266dbec7e54741..1072e3dcc8da74d6e910499db8918a00a80e336f 100644 --- a/Framework/Geometry/src/MDGeometry/MDPlane.cpp +++ b/Framework/Geometry/src/MDGeometry/MDPlane.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/MDGeometry/MDPlane.h" #include "MantidKernel/Matrix.h" diff --git a/Framework/Geometry/src/MDGeometry/MDPlaneImplicitFunction.cpp b/Framework/Geometry/src/MDGeometry/MDPlaneImplicitFunction.cpp index 13cf2f0bd80f47b1db41d9a9e4a8ec5590b993db..a43d113337849174c76080b60742d08dc112d6d5 100644 --- a/Framework/Geometry/src/MDGeometry/MDPlaneImplicitFunction.cpp +++ b/Framework/Geometry/src/MDGeometry/MDPlaneImplicitFunction.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include <limits> #include <sstream> diff --git a/Framework/Geometry/src/MDGeometry/NullImplicitFunction.cpp b/Framework/Geometry/src/MDGeometry/NullImplicitFunction.cpp index 6745850bca5f32fec42a7a091f8de7cfee0e0499..294c02bdc315f20f2d141bdb678d2286f4c72313 100644 --- a/Framework/Geometry/src/MDGeometry/NullImplicitFunction.cpp +++ b/Framework/Geometry/src/MDGeometry/NullImplicitFunction.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/MDGeometry/NullImplicitFunction.h" diff --git a/Framework/Geometry/src/MDGeometry/QLab.cpp b/Framework/Geometry/src/MDGeometry/QLab.cpp index 0281f8fd63c641e98087e384b3b296e1f8477b7f..a21709d2379834e7293c5fae0a3af977afe0c103 100644 --- a/Framework/Geometry/src/MDGeometry/QLab.cpp +++ b/Framework/Geometry/src/MDGeometry/QLab.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/MDGeometry/QLab.h" #include "MantidGeometry/MDGeometry/MDFrame.h" diff --git a/Framework/Geometry/src/MDGeometry/QSample.cpp b/Framework/Geometry/src/MDGeometry/QSample.cpp index 36f8605c1c20f4ac497905562ba5608caf5357c0..8d2c4e309d4c8093589374253a1b27b891769e03 100644 --- a/Framework/Geometry/src/MDGeometry/QSample.cpp +++ b/Framework/Geometry/src/MDGeometry/QSample.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/MDGeometry/QSample.h" #include "MantidKernel/MDUnit.h" diff --git a/Framework/Geometry/src/MDGeometry/UnknownFrame.cpp b/Framework/Geometry/src/MDGeometry/UnknownFrame.cpp index a86ef999628a697197028ffe2b6a71f41106980c..4701ffb1bbc4b81c9f0f73719618c1b0a596cc44 100644 --- a/Framework/Geometry/src/MDGeometry/UnknownFrame.cpp +++ b/Framework/Geometry/src/MDGeometry/UnknownFrame.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/MDGeometry/UnknownFrame.h" diff --git a/Framework/Geometry/src/Math/Acomp.cpp b/Framework/Geometry/src/Math/Acomp.cpp index f21385e396e72ce4a165999cc7033d4f7d9a7f53..11ae54de9a6d4ae38cb13e65c97296e99a9f2021 100644 --- a/Framework/Geometry/src/Math/Acomp.cpp +++ b/Framework/Geometry/src/Math/Acomp.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Math/Acomp.h" #include "MantidGeometry/Math/RotCounter.h" diff --git a/Framework/Geometry/src/Math/Algebra.cpp b/Framework/Geometry/src/Math/Algebra.cpp index 6cf4e3c752e9161efcb6a04a289189587cb83a81..94ffd8bac208ee124c7b427dbf5b559286e273b0 100644 --- a/Framework/Geometry/src/Math/Algebra.cpp +++ b/Framework/Geometry/src/Math/Algebra.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include <algorithm> #include <cmath> diff --git a/Framework/Geometry/src/Math/BnId.cpp b/Framework/Geometry/src/Math/BnId.cpp index f9a901804d17a544596cd3a7774950086b0d6f73..f37b9a36adcc2f66d78e427cec37cfe5920400d7 100644 --- a/Framework/Geometry/src/Math/BnId.cpp +++ b/Framework/Geometry/src/Math/BnId.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include <algorithm> #include <cmath> diff --git a/Framework/Geometry/src/Math/ConvexPolygon.cpp b/Framework/Geometry/src/Math/ConvexPolygon.cpp index e94d1cf6a510aa5b0baf1745c94576ef92fe3946..fcb06e884cb50cf02cf27d3c0d421c16212d164c 100644 --- a/Framework/Geometry/src/Math/ConvexPolygon.cpp +++ b/Framework/Geometry/src/Math/ConvexPolygon.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //----------------------------------------------------------------------------- // Includes diff --git a/Framework/Geometry/src/Math/ConvexPolygonIterator.cpp b/Framework/Geometry/src/Math/ConvexPolygonIterator.cpp index d9885c43f9b98e60f4226eae757e88064487b151..badb24b375235348f2c5636e1e2a94f0049ec3b2 100644 --- a/Framework/Geometry/src/Math/ConvexPolygonIterator.cpp +++ b/Framework/Geometry/src/Math/ConvexPolygonIterator.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //----------------------------------------------------------------------------- // Includes diff --git a/Framework/Geometry/src/Math/PolyBase.cpp b/Framework/Geometry/src/Math/PolyBase.cpp index 0f529798e2b66ca2060a16b433e33abf4ced7b4f..c431d656f53b4d8449ae1500300c7fd7b7582d15 100644 --- a/Framework/Geometry/src/Math/PolyBase.cpp +++ b/Framework/Geometry/src/Math/PolyBase.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include <algorithm> #include <cmath> diff --git a/Framework/Geometry/src/Math/PolygonEdge.cpp b/Framework/Geometry/src/Math/PolygonEdge.cpp index 917da1d9f1756c20e994fdcd60ff840664623cca..e72afe70eeb96b64b07664105061094723df65fc 100644 --- a/Framework/Geometry/src/Math/PolygonEdge.cpp +++ b/Framework/Geometry/src/Math/PolygonEdge.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //----------------------------------------------------------------------------- // Includes diff --git a/Framework/Geometry/src/Math/PolygonIntersection.cpp b/Framework/Geometry/src/Math/PolygonIntersection.cpp index 87b538e64d19ce651b0c2f6166b76867ac006a55..cb71158a028b5c46480933ff6bfa0f1ba2fdf905 100644 --- a/Framework/Geometry/src/Math/PolygonIntersection.cpp +++ b/Framework/Geometry/src/Math/PolygonIntersection.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //------------------------------------------------------------------------------ // Includes diff --git a/Framework/Geometry/src/Math/Quadrilateral.cpp b/Framework/Geometry/src/Math/Quadrilateral.cpp index 55b94d5de7afcb573a2f673a8a231be92e90490f..780a5661117d764bfec8b411a660dde25970e254 100644 --- a/Framework/Geometry/src/Math/Quadrilateral.cpp +++ b/Framework/Geometry/src/Math/Quadrilateral.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //----------------------------------------------------------------------------- // Includes diff --git a/Framework/Geometry/src/Math/RotCounter.cpp b/Framework/Geometry/src/Math/RotCounter.cpp index f9fe439c24c3f86357b3f3998e73c5297aca03aa..8e9f61c13012cec77105d29c8160450c4e789207 100644 --- a/Framework/Geometry/src/Math/RotCounter.cpp +++ b/Framework/Geometry/src/Math/RotCounter.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Math/RotCounter.h" #include <algorithm> diff --git a/Framework/Geometry/src/Math/Triple.cpp b/Framework/Geometry/src/Math/Triple.cpp index b1243d06b3a358265184c6058790c6437b1cdc4f..ae3a93b954033882274c674d90b6a4aafada0d08 100644 --- a/Framework/Geometry/src/Math/Triple.cpp +++ b/Framework/Geometry/src/Math/Triple.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Math/Triple.h" #include <string> diff --git a/Framework/Geometry/src/Math/mathSupport.cpp b/Framework/Geometry/src/Math/mathSupport.cpp index 246d33e0ee3fc6d9b50f5ae65305a0183cf67696..ae727855e298a1d7c28f9487b9ad46fec07b5576 100644 --- a/Framework/Geometry/src/Math/mathSupport.cpp +++ b/Framework/Geometry/src/Math/mathSupport.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include <algorithm> #include <cmath> diff --git a/Framework/Geometry/src/Objects/BoundingBox.cpp b/Framework/Geometry/src/Objects/BoundingBox.cpp index 069fca716c772b5490bfc2352eaf093a0af2d381..4e4e8ff60e6a01220d00719b60d27125d9d3f7f3 100644 --- a/Framework/Geometry/src/Objects/BoundingBox.cpp +++ b/Framework/Geometry/src/Objects/BoundingBox.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //--------------------------------------------------------- // Includes diff --git a/Framework/Geometry/src/Objects/CSGObject.cpp b/Framework/Geometry/src/Objects/CSGObject.cpp index 4afe79d3c8f990fa7d808d62e8121f2cfebc33f9..bc955a76162d900785d4b338872565fbb29ece9e 100644 --- a/Framework/Geometry/src/Objects/CSGObject.cpp +++ b/Framework/Geometry/src/Objects/CSGObject.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Objects/CSGObject.h" @@ -38,6 +38,7 @@ #include <deque> #include <random> #include <stack> +#include <utility> using namespace Mantid::Geometry; using namespace Mantid::Kernel; @@ -1593,6 +1594,7 @@ double CSGObject::singleShotMonteCarloVolume(const int shotSize, const auto threadCount = PARALLEL_NUMBER_OF_THREADS; const auto currentThreadNum = PARALLEL_THREAD_NUMBER; size_t blocksize = shotSize / threadCount; + // cppcheck-suppress knownConditionTrueFalse if (currentThreadNum == threadCount - 1) { // Last thread may have to do threadCount extra iterations in // the worst case. @@ -2113,7 +2115,8 @@ int CSGObject::searchForObject(Kernel::V3D &point) const { * Set the geometry handler for Object * @param[in] h is pointer to the geometry handler. */ -void CSGObject::setGeometryHandler(boost::shared_ptr<GeometryHandler> h) { +void CSGObject::setGeometryHandler( + const boost::shared_ptr<GeometryHandler> &h) { if (h) m_handler = h; } @@ -2145,7 +2148,7 @@ void CSGObject::initDraw() const { */ void CSGObject::setVtkGeometryCacheWriter( boost::shared_ptr<vtkGeometryCacheWriter> writer) { - vtkCacheWriter = writer; + vtkCacheWriter = std::move(writer); updateGeometryHandler(); } @@ -2154,7 +2157,7 @@ void CSGObject::setVtkGeometryCacheWriter( */ void CSGObject::setVtkGeometryCacheReader( boost::shared_ptr<vtkGeometryCacheReader> reader) { - vtkCacheReader = reader; + vtkCacheReader = std::move(reader); updateGeometryHandler(); } diff --git a/Framework/Geometry/src/Objects/InstrumentRayTracer.cpp b/Framework/Geometry/src/Objects/InstrumentRayTracer.cpp index 6ca78303c4193d72ace965caed792d4a9016b530..772ca27da44dff1e9afc9eb4db8e16a9db500745 100644 --- a/Framework/Geometry/src/Objects/InstrumentRayTracer.cpp +++ b/Framework/Geometry/src/Objects/InstrumentRayTracer.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //------------------------------------------------------------- // Includes @@ -15,6 +15,7 @@ #include "MantidKernel/V3D.h" #include <deque> #include <iterator> +#include <utility> namespace Mantid { namespace Geometry { @@ -33,7 +34,7 @@ using Kernel::V3D; * have a defined source. */ InstrumentRayTracer::InstrumentRayTracer(Instrument_const_sptr instrument) - : m_instrument(instrument) { + : m_instrument(std::move(instrument)) { if (!m_instrument) { std::ostringstream lexer; lexer << "Cannot create a InstrumentRayTracer, invalid instrument given. " diff --git a/Framework/Geometry/src/Objects/MeshObject.cpp b/Framework/Geometry/src/Objects/MeshObject.cpp index abedda8718c96d0db23496a2fe0d884d759e7bac..a17fadbd16358fe937714b82c0ad2cdb8317d932 100644 --- a/Framework/Geometry/src/Objects/MeshObject.cpp +++ b/Framework/Geometry/src/Objects/MeshObject.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Objects/MeshObject.h" #include "MantidGeometry/Objects/MeshObjectCommon.h" @@ -21,7 +21,7 @@ namespace Geometry { MeshObject::MeshObject(const std::vector<uint32_t> &faces, const std::vector<Kernel::V3D> &vertices, - const Kernel::Material material) + const Kernel::Material &material) : m_boundingBox(), m_id("MeshObject"), m_triangles(faces), m_vertices(vertices), m_material(material) { @@ -453,7 +453,8 @@ bool MeshObject::searchForObject(Kernel::V3D &point) const { * @param[in] h is pointer to the geometry handler. don't delete this pointer in * the calling function. */ -void MeshObject::setGeometryHandler(boost::shared_ptr<GeometryHandler> h) { +void MeshObject::setGeometryHandler( + const boost::shared_ptr<GeometryHandler> &h) { if (h == nullptr) return; m_handler = h; diff --git a/Framework/Geometry/src/Objects/MeshObject2D.cpp b/Framework/Geometry/src/Objects/MeshObject2D.cpp index c2cbd43b1a9b31c749b10808496c8308e1512586..69d1747c830b844f87f40ebe46cc865a2049cd12 100644 --- a/Framework/Geometry/src/Objects/MeshObject2D.cpp +++ b/Framework/Geometry/src/Objects/MeshObject2D.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Objects/MeshObject2D.h" #include "MantidGeometry/Objects/IObject.h" diff --git a/Framework/Geometry/src/Objects/MeshObjectCommon.cpp b/Framework/Geometry/src/Objects/MeshObjectCommon.cpp index 5bde11630cd31008e6a3f7d07d9595a5b38872b1..c00fc167e05c7c7c4b316844c497f465c84b5da7 100644 --- a/Framework/Geometry/src/Objects/MeshObjectCommon.cpp +++ b/Framework/Geometry/src/Objects/MeshObjectCommon.cpp @@ -1,3 +1,9 @@ +// Mantid Repository : https://github.com/mantidproject/mantid +// +// Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS +// SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Objects/MeshObjectCommon.h" #include "MantidGeometry/Objects/BoundingBox.h" #include <limits> diff --git a/Framework/Geometry/src/Objects/RuleItems.cpp b/Framework/Geometry/src/Objects/RuleItems.cpp index 06c5043472d715a4f9b850f81ca9a0922c0d9f3f..1135d1bd2cdaaa8710711e7ad2657c7bf1e515c2 100644 --- a/Framework/Geometry/src/Objects/RuleItems.cpp +++ b/Framework/Geometry/src/Objects/RuleItems.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include <algorithm> #include <cfloat> diff --git a/Framework/Geometry/src/Objects/Rules.cpp b/Framework/Geometry/src/Objects/Rules.cpp index 8a12a0f3ee5b1dd32ff05b7c272c62df7b1e993d..6e236101dddbda4ac48e6b98d1fcc2fe5baaeb9d 100644 --- a/Framework/Geometry/src/Objects/Rules.cpp +++ b/Framework/Geometry/src/Objects/Rules.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include <algorithm> #include <cmath> diff --git a/Framework/Geometry/src/Objects/ShapeFactory.cpp b/Framework/Geometry/src/Objects/ShapeFactory.cpp index 1e4f0db88acea741895d845ff890cc1a45332107..5b5a9de2fc99471eaf586700bec91590a8bc398b 100644 --- a/Framework/Geometry/src/Objects/ShapeFactory.cpp +++ b/Framework/Geometry/src/Objects/ShapeFactory.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/Geometry/src/Objects/Track.cpp b/Framework/Geometry/src/Objects/Track.cpp index e9c983685f65d4b433141b9ddaeb89b7e5f98bd1..09b3f8be093ccaa0d7de1ca4d15280ee6c6a4d0a 100644 --- a/Framework/Geometry/src/Objects/Track.cpp +++ b/Framework/Geometry/src/Objects/Track.cpp @@ -1,14 +1,15 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Objects/Track.h" #include "MantidGeometry/Surfaces/Surface.h" #include "MantidKernel/Matrix.h" #include "MantidKernel/Tolerance.h" #include "MantidKernel/V3D.h" +#include <boost/iterator/distance.hpp> #include <algorithm> #include <cmath> @@ -77,7 +78,7 @@ int Track::nonComplete() const { while (bc != m_links.end()) { if ((ac->exitPoint).distance(bc->entryPoint) > Tolerance) { - return (static_cast<int>(distance(m_links.begin(), bc)) + 1); + return (static_cast<int>(boost::distance(m_links.begin(), bc)) + 1); } ++ac; ++bc; diff --git a/Framework/Geometry/src/RandomPoint.cpp b/Framework/Geometry/src/RandomPoint.cpp index b6963147c0c382895cefb2e887bdb1e82ab80df8..a7f62340ec134ae8358cec03aa2c10b0c93c698b 100644 --- a/Framework/Geometry/src/RandomPoint.cpp +++ b/Framework/Geometry/src/RandomPoint.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/RandomPoint.h" #include "MantidGeometry/Objects/IObject.h" diff --git a/Framework/Geometry/src/Rasterize.cpp b/Framework/Geometry/src/Rasterize.cpp index 296b26068eb73399cf63681814ed22eb82c47d63..9a21d39de74352e685946a5a84b6796918f2778e 100644 --- a/Framework/Geometry/src/Rasterize.cpp +++ b/Framework/Geometry/src/Rasterize.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Rasterize.h" #include "MantidGeometry/Objects/CSGObject.h" diff --git a/Framework/Geometry/src/Rendering/GeometryHandler.cpp b/Framework/Geometry/src/Rendering/GeometryHandler.cpp index f6b2a46df5a6508b9fd9f0637a00ad3580c30e36..d0a8d079e3530cd843a2695a578d2a1e276b11f6 100644 --- a/Framework/Geometry/src/Rendering/GeometryHandler.cpp +++ b/Framework/Geometry/src/Rendering/GeometryHandler.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Rendering/GeometryHandler.h" #include "MantidGeometry/Instrument/RectangularDetector.h" @@ -19,7 +19,7 @@ namespace Geometry { GeometryHandler::GeometryHandler(IObjComponent *comp) : m_objComp(comp) {} -GeometryHandler::GeometryHandler(boost::shared_ptr<CSGObject> obj) +GeometryHandler::GeometryHandler(const boost::shared_ptr<CSGObject> &obj) : m_triangulator(new detail::GeometryTriangulator(obj.get())), m_csgObj(obj.get()) {} diff --git a/Framework/Geometry/src/Rendering/GeometryTriangulator.cpp b/Framework/Geometry/src/Rendering/GeometryTriangulator.cpp index 61ff62956e03d18c4f0a7e9cf963af706326e20e..8d4ea35ed71ce9edf470e98a7139eb48eb9db526 100644 --- a/Framework/Geometry/src/Rendering/GeometryTriangulator.cpp +++ b/Framework/Geometry/src/Rendering/GeometryTriangulator.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Rendering/GeometryTriangulator.h" #include "MantidGeometry/Objects/CSGObject.h" diff --git a/Framework/Geometry/src/Rendering/RenderingHelpersOpenGL.cpp b/Framework/Geometry/src/Rendering/RenderingHelpersOpenGL.cpp index c6404e67b6ef95b731adff9d12ab9a7c5417753a..3fb3589a1f3907ea68c1469a253fd71d3464e85e 100644 --- a/Framework/Geometry/src/Rendering/RenderingHelpersOpenGL.cpp +++ b/Framework/Geometry/src/Rendering/RenderingHelpersOpenGL.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/IObjComponent.h" #include "MantidGeometry/Instrument/ComponentInfo.h" diff --git a/Framework/Geometry/src/Rendering/RenderingHelpersThrowing.cpp b/Framework/Geometry/src/Rendering/RenderingHelpersThrowing.cpp index 88eb67047d45b4c9a184675146c16c930df76ce4..c5e07bb9a8b65c80b0ae040955938d02cf22c16f 100644 --- a/Framework/Geometry/src/Rendering/RenderingHelpersThrowing.cpp +++ b/Framework/Geometry/src/Rendering/RenderingHelpersThrowing.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Rendering/RenderingHelpers.h" #include <stdexcept> diff --git a/Framework/Geometry/src/Rendering/ShapeInfo.cpp b/Framework/Geometry/src/Rendering/ShapeInfo.cpp index 6f71faee28a83fea4ca2fb45c3fc3a5be818c421..6296dafb609775b91487e47b6e9c9220fda39356 100644 --- a/Framework/Geometry/src/Rendering/ShapeInfo.cpp +++ b/Framework/Geometry/src/Rendering/ShapeInfo.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Rendering/ShapeInfo.h" #include "MantidKernel/Tolerance.h" diff --git a/Framework/Geometry/src/Rendering/vtkGeometryCacheReader.cpp b/Framework/Geometry/src/Rendering/vtkGeometryCacheReader.cpp index 1a5a5514963e8baf179974482e1fdbc44619da88..627d711b01a94318736b5ada4ab1eb65c8e22c0b 100644 --- a/Framework/Geometry/src/Rendering/vtkGeometryCacheReader.cpp +++ b/Framework/Geometry/src/Rendering/vtkGeometryCacheReader.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include <Poco/DOM/AutoPtr.h> #include <Poco/DOM/DOMParser.h> @@ -13,6 +13,8 @@ #include <Poco/Exception.h> #include <Poco/SAX/InputSource.h> +#include <utility> + #include "MantidGeometry/Objects/CSGObject.h" #include "MantidGeometry/Rendering/GeometryHandler.h" #include "MantidGeometry/Rendering/vtkGeometryCacheReader.h" @@ -33,7 +35,7 @@ Kernel::Logger g_log("vtkGeometryCacheReader"); * Constructor */ vtkGeometryCacheReader::vtkGeometryCacheReader(std::string filename) { - mFileName = filename; + mFileName = std::move(filename); mDoc = nullptr; Init(); } @@ -104,7 +106,7 @@ void vtkGeometryCacheReader::readCacheForObject(IObject *obj) { * Get the Element by using the object name */ Poco::XML::Element * -vtkGeometryCacheReader::getElementByObjectName(std::string name) { +vtkGeometryCacheReader::getElementByObjectName(const std::string &name) { Element *pRoot = mDoc->documentElement(); if (pRoot == nullptr || pRoot->nodeName() != "VTKFile") return nullptr; diff --git a/Framework/Geometry/src/Rendering/vtkGeometryCacheWriter.cpp b/Framework/Geometry/src/Rendering/vtkGeometryCacheWriter.cpp index 3488c978e6ab51102393631f87552a58d13e6b39..c3a6460587cba7b76fb971cd01e306f707ef3455 100644 --- a/Framework/Geometry/src/Rendering/vtkGeometryCacheWriter.cpp +++ b/Framework/Geometry/src/Rendering/vtkGeometryCacheWriter.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Rendering/vtkGeometryCacheWriter.h" @@ -22,6 +22,7 @@ #include <fstream> #include <sstream> +#include <utility> using Poco::XML::AutoPtr; using Poco::XML::Document; @@ -41,7 +42,7 @@ Kernel::Logger g_log("vtkGeometryCacheWriter"); * Constructor */ vtkGeometryCacheWriter::vtkGeometryCacheWriter(std::string filename) { - mFileName = filename; + mFileName = std::move(filename); mDoc = new Document(); Init(); diff --git a/Framework/Geometry/src/Surfaces/Cone.cpp b/Framework/Geometry/src/Surfaces/Cone.cpp index c915d28955d811fb91d1817dd5f1193483e37522..230ff44765286c252baba304c05d56ee9a5aad24 100644 --- a/Framework/Geometry/src/Surfaces/Cone.cpp +++ b/Framework/Geometry/src/Surfaces/Cone.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include <algorithm> #include <cmath> diff --git a/Framework/Geometry/src/Surfaces/Cylinder.cpp b/Framework/Geometry/src/Surfaces/Cylinder.cpp index da369b2769ef65f58e25e9acd08d343f01d7bc62..4af129d03253b1e45b0f7379c92891c4dcfdd022 100644 --- a/Framework/Geometry/src/Surfaces/Cylinder.cpp +++ b/Framework/Geometry/src/Surfaces/Cylinder.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Surfaces/Cylinder.h" #include "MantidKernel/Logger.h" diff --git a/Framework/Geometry/src/Surfaces/General.cpp b/Framework/Geometry/src/Surfaces/General.cpp index 3e7fb2f56d537f48faabc7984168f21f0d9ec50a..0451f370fc58e9f07defa102e4cafbf7e1fea975 100644 --- a/Framework/Geometry/src/Surfaces/General.cpp +++ b/Framework/Geometry/src/Surfaces/General.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Surfaces/General.h" #include "MantidKernel/Strings.h" diff --git a/Framework/Geometry/src/Surfaces/Line.cpp b/Framework/Geometry/src/Surfaces/Line.cpp index 294f9fc44014c0dbd346852617e3a1d7eb853fb4..94d6c33022d4f653601c1c1d9b9a32206370d9b4 100644 --- a/Framework/Geometry/src/Surfaces/Line.cpp +++ b/Framework/Geometry/src/Surfaces/Line.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Surfaces/Line.h" #include "MantidGeometry/Math/mathSupport.h" diff --git a/Framework/Geometry/src/Surfaces/LineIntersectVisit.cpp b/Framework/Geometry/src/Surfaces/LineIntersectVisit.cpp index 16bf817fa13e6f3baa3f196542721d62100809b6..f07a773e39ad4f9a2519323335ed814120810d8a 100644 --- a/Framework/Geometry/src/Surfaces/LineIntersectVisit.cpp +++ b/Framework/Geometry/src/Surfaces/LineIntersectVisit.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Surfaces/LineIntersectVisit.h" #include "MantidGeometry/Surfaces/Cone.h" diff --git a/Framework/Geometry/src/Surfaces/Plane.cpp b/Framework/Geometry/src/Surfaces/Plane.cpp index 2244fc064510d88f9b3b44ebb61226eab828d3b9..a602d92feb72710ae02d82c98c3a1a0f4dfb167d 100644 --- a/Framework/Geometry/src/Surfaces/Plane.cpp +++ b/Framework/Geometry/src/Surfaces/Plane.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Surfaces/Plane.h" #include "MantidKernel/Exception.h" diff --git a/Framework/Geometry/src/Surfaces/Quadratic.cpp b/Framework/Geometry/src/Surfaces/Quadratic.cpp index 7f697460620fcd7b3c1c9d9caaec93dc6bcb574c..75ca36d667bb86af3d79ec9329cb6fb4fb54c36c 100644 --- a/Framework/Geometry/src/Surfaces/Quadratic.cpp +++ b/Framework/Geometry/src/Surfaces/Quadratic.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include <algorithm> #include <boost/multi_array.hpp> diff --git a/Framework/Geometry/src/Surfaces/Sphere.cpp b/Framework/Geometry/src/Surfaces/Sphere.cpp index cc2a791aa18208d320bc718e6fcd3212b06122bc..68758b73d324c56bd26a0ee62a45d7cc752b811a 100644 --- a/Framework/Geometry/src/Surfaces/Sphere.cpp +++ b/Framework/Geometry/src/Surfaces/Sphere.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Surfaces/Sphere.h" #include "MantidKernel/Strings.h" diff --git a/Framework/Geometry/src/Surfaces/Surface.cpp b/Framework/Geometry/src/Surfaces/Surface.cpp index 5c218eee2341131d39315e3dfa4e025c3decf234..f885c9274587553de2b1c5984106c90cf3089df9 100644 --- a/Framework/Geometry/src/Surfaces/Surface.cpp +++ b/Framework/Geometry/src/Surfaces/Surface.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include <algorithm> #include <complex> diff --git a/Framework/Geometry/src/Surfaces/SurfaceFactory.cpp b/Framework/Geometry/src/Surfaces/SurfaceFactory.cpp index 014b70f5a7916ae3ce10314be685bf06652c0450..0d3acfee96f868857c0663f40bf756a22054e164 100644 --- a/Framework/Geometry/src/Surfaces/SurfaceFactory.cpp +++ b/Framework/Geometry/src/Surfaces/SurfaceFactory.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include <algorithm> #include <cmath> diff --git a/Framework/Geometry/src/Surfaces/Torus.cpp b/Framework/Geometry/src/Surfaces/Torus.cpp index 3cdeeafe2675fb9d656b8c5f5e24be2506c00a06..6ae70328920e3ea662c73bf55eacf43fd45d319f 100644 --- a/Framework/Geometry/src/Surfaces/Torus.cpp +++ b/Framework/Geometry/src/Surfaces/Torus.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include <algorithm> #include <cmath> diff --git a/Framework/Geometry/test/AcompTest.h b/Framework/Geometry/test/AcompTest.h index c980a2cb64e2cf23ddde93f7b607443d970e57c4..b604dd3793d6aaaf64e5972c8c15fcae189d4096 100644 --- a/Framework/Geometry/test/AcompTest.h +++ b/Framework/Geometry/test/AcompTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidGeometry/Math/Acomp.h" diff --git a/Framework/Geometry/test/AlgebraTest.h b/Framework/Geometry/test/AlgebraTest.h index 79854ab916143f607767821ee72865bcbb3e9f03..772497793ff8e685677403151362916a01a7e6ee 100644 --- a/Framework/Geometry/test/AlgebraTest.h +++ b/Framework/Geometry/test/AlgebraTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/BasicHKLFiltersTest.h b/Framework/Geometry/test/BasicHKLFiltersTest.h index 0f2aa7d3764877104906e73ae7dc2f7d0b708640..060ce1aac4e82064e6f38a53e4389b0ecc0ef97c 100644 --- a/Framework/Geometry/test/BasicHKLFiltersTest.h +++ b/Framework/Geometry/test/BasicHKLFiltersTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/BnIdTest.h b/Framework/Geometry/test/BnIdTest.h index 0c93578f0b7e9009f4728714f535f8e6d5f2090c..b69d220e03be1e2b709294a8777fa24f241c5993 100644 --- a/Framework/Geometry/test/BnIdTest.h +++ b/Framework/Geometry/test/BnIdTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidGeometry/Math/BnId.h" diff --git a/Framework/Geometry/test/BoundingBoxTest.h b/Framework/Geometry/test/BoundingBoxTest.h index ddaec0758ac272d911168f7b43e4c6bab0e69507..55b460e26654733040a5ab3a51823a8ef3aa0291 100644 --- a/Framework/Geometry/test/BoundingBoxTest.h +++ b/Framework/Geometry/test/BoundingBoxTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/BraggScattererFactoryTest.h b/Framework/Geometry/test/BraggScattererFactoryTest.h index 14b97afa92ea710fabb26cce66c67fad2349ea16..0571bd2ece994791ff6d301c7712007884ab8e88 100644 --- a/Framework/Geometry/test/BraggScattererFactoryTest.h +++ b/Framework/Geometry/test/BraggScattererFactoryTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/BraggScattererInCrystalStructureTest.h b/Framework/Geometry/test/BraggScattererInCrystalStructureTest.h index 7707ae6d9bcc6da157969314500e7cdfce2f107f..c74389f3ef17bb3cc78bd8c9c8f9d79afd868e1a 100644 --- a/Framework/Geometry/test/BraggScattererInCrystalStructureTest.h +++ b/Framework/Geometry/test/BraggScattererInCrystalStructureTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/BraggScattererTest.h b/Framework/Geometry/test/BraggScattererTest.h index bcf2cadd61de16ece848011282716426deb35ffc..e96702edf3cc1c1c30b778f8de31f15049e8456e 100644 --- a/Framework/Geometry/test/BraggScattererTest.h +++ b/Framework/Geometry/test/BraggScattererTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/CMakeLists.txt b/Framework/Geometry/test/CMakeLists.txt index 9c2f5e681b2b6000ccd073e693931904bb946389..fea5b6993217f8bc08a368e66862ad7c9ba8bdb8 100644 --- a/Framework/Geometry/test/CMakeLists.txt +++ b/Framework/Geometry/test/CMakeLists.txt @@ -1,8 +1,7 @@ if(CXXTEST_FOUND) include_directories(SYSTEM ${CXXTEST_INCLUDE_DIR} - ${GMOCK_INCLUDE_DIR} - ${GTEST_INCLUDE_DIR}) +) # This is required to pick up ComponentCreationHelper, which is the only # TestHelpers class that may be used by Geometry tests (as it does not depend @@ -30,8 +29,8 @@ if(CXXTEST_FOUND) ${GSL_LIBRARIES} ${Boost_LIBRARIES} ${POCO_LIBRARIES} - ${GMOCK_LIBRARIES} - ${GTEST_LIBRARIES}) + gmock +) add_dependencies(FrameworkTests GeometryTest) # Add to the 'FrameworkTests' group in VS diff --git a/Framework/Geometry/test/CSGObjectTest.h b/Framework/Geometry/test/CSGObjectTest.h index ac8b8631830be1e0e810beaac3428851d14d4bf8..2f9da83d6f4fa427ba12f1271aa19d6f84debc05 100644 --- a/Framework/Geometry/test/CSGObjectTest.h +++ b/Framework/Geometry/test/CSGObjectTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -416,7 +416,7 @@ public: TS_ASSERT_EQUALS(index, expectedResults.size()); } - void checkTrackIntercept(IObject_sptr obj, Track &track, + void checkTrackIntercept(const IObject_sptr &obj, Track &track, const std::vector<Link> &expectedResults) { int unitCount = obj->interceptSurface(track); TS_ASSERT_EQUALS(unitCount, expectedResults.size()); diff --git a/Framework/Geometry/test/CenteringGroupTest.h b/Framework/Geometry/test/CenteringGroupTest.h index a7b13c027b8ce3c02750931eb951bea7705c89d8..85958538d01188a9a8bd27c88589a0ccd857c141 100644 --- a/Framework/Geometry/test/CenteringGroupTest.h +++ b/Framework/Geometry/test/CenteringGroupTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/CompAssemblyTest.h b/Framework/Geometry/test/CompAssemblyTest.h index 0063a17ed11492c94947d8f142a1a466330e5f13..16eb4ad288bf120fd8d33735791e54b3c1da6283 100644 --- a/Framework/Geometry/test/CompAssemblyTest.h +++ b/Framework/Geometry/test/CompAssemblyTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/ComponentInfoBankHelpersTest.h b/Framework/Geometry/test/ComponentInfoBankHelpersTest.h index dab16a4df31e8f69b5b10ab475e081862c122753..660e86f3e9393f8704b5a1a6ccb92b545400a43c 100644 --- a/Framework/Geometry/test/ComponentInfoBankHelpersTest.h +++ b/Framework/Geometry/test/ComponentInfoBankHelpersTest.h @@ -1,3 +1,9 @@ +// Mantid Repository : https://github.com/mantidproject/mantid +// +// Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS +// SPDX - License - Identifier: GPL - 3.0 + #pragma once #include <cxxtest/TestSuite.h> diff --git a/Framework/Geometry/test/ComponentInfoIteratorTest.h b/Framework/Geometry/test/ComponentInfoIteratorTest.h index ed7913d9f97088b2f3f0a116e36664c1da132e01..0acf09f566643f63b81263ea28ae23e92d2a5b10 100644 --- a/Framework/Geometry/test/ComponentInfoIteratorTest.h +++ b/Framework/Geometry/test/ComponentInfoIteratorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/ComponentInfoTest.h b/Framework/Geometry/test/ComponentInfoTest.h index 489412d7c374c5a7fc0f43d9fa818c20716aba7f..3d0b1f5bb561388571cf42c7033fb640220b5cc7 100644 --- a/Framework/Geometry/test/ComponentInfoTest.h +++ b/Framework/Geometry/test/ComponentInfoTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/ComponentParserTest.h b/Framework/Geometry/test/ComponentParserTest.h index 8b68dcaa07f520326b753e3032fe61f8f8e10660..2595010b02d64ff2e79a90137c62fa1d2a74e4ab 100644 --- a/Framework/Geometry/test/ComponentParserTest.h +++ b/Framework/Geometry/test/ComponentParserTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/ComponentTest.h b/Framework/Geometry/test/ComponentTest.h index d9143c72f12ccd58aae12d3ac72fb71cf5524e98..881aabd1ea88f536e95cccd9613ec0cb42523bba 100644 --- a/Framework/Geometry/test/ComponentTest.h +++ b/Framework/Geometry/test/ComponentTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/CompositeBraggScattererTest.h b/Framework/Geometry/test/CompositeBraggScattererTest.h index 665fcba39ebeb7fb3c8191cfe42f245aa471b67f..5536a93f3a9b983deeae6ba7e2460d201bfb520a 100644 --- a/Framework/Geometry/test/CompositeBraggScattererTest.h +++ b/Framework/Geometry/test/CompositeBraggScattererTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/CompositeImplicitFunctionTest.h b/Framework/Geometry/test/CompositeImplicitFunctionTest.h index ffa2ee0fc3ba69b7cab5f64e1abba8faa5fe0082..5b31badc99c149f13019732c719387321770ddf6 100644 --- a/Framework/Geometry/test/CompositeImplicitFunctionTest.h +++ b/Framework/Geometry/test/CompositeImplicitFunctionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/ConeTest.h b/Framework/Geometry/test/ConeTest.h index 0930bbf2f5171778ee4143f0c4954e973b3d3b41..426fdbaaa41813c68931348af96caef4403dd21f 100644 --- a/Framework/Geometry/test/ConeTest.h +++ b/Framework/Geometry/test/ConeTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/ContainerTest.h b/Framework/Geometry/test/ContainerTest.h index 681412b540ecc01466b46bdf251c20d97b25036a..75c2b51211ab2adbfebd391ccb4b940d25c9c2f6 100644 --- a/Framework/Geometry/test/ContainerTest.h +++ b/Framework/Geometry/test/ContainerTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/ConventionalCellTest.h b/Framework/Geometry/test/ConventionalCellTest.h index 93c7a92b72376ef7bc2e30708504b71a34d1518e..bcf860effa165580a0a9657c1aef06e8ad4c3cea 100644 --- a/Framework/Geometry/test/ConventionalCellTest.h +++ b/Framework/Geometry/test/ConventionalCellTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/ConvexPolygonIteratorTest.h b/Framework/Geometry/test/ConvexPolygonIteratorTest.h index d53cba7c7756f056d888fe7d03deaf93839cf746..35575fae6247766b2572a062dc94bc2761dd3d79 100644 --- a/Framework/Geometry/test/ConvexPolygonIteratorTest.h +++ b/Framework/Geometry/test/ConvexPolygonIteratorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/ConvexPolygonTest.h b/Framework/Geometry/test/ConvexPolygonTest.h index a289d237e0770cc75c91832fac242d6de911a526..99a876ec513b77f9742eb81c8e17552766d7fcbd 100644 --- a/Framework/Geometry/test/ConvexPolygonTest.h +++ b/Framework/Geometry/test/ConvexPolygonTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/CrystalStructureTest.h b/Framework/Geometry/test/CrystalStructureTest.h index f5cde1a0f46b4a910f4cfbc02e9b0c451b98588e..e395af0936f96598756edf6db9d9e9c4058fe7a0 100644 --- a/Framework/Geometry/test/CrystalStructureTest.h +++ b/Framework/Geometry/test/CrystalStructureTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/CyclicGroupTest.h b/Framework/Geometry/test/CyclicGroupTest.h index c830e8bc0ef56358b02b28c9c7ed74bc2bef0f2c..322a9cedc291a87c6ab52af1e1a50a4ff02f0d1e 100644 --- a/Framework/Geometry/test/CyclicGroupTest.h +++ b/Framework/Geometry/test/CyclicGroupTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/CylinderTest.h b/Framework/Geometry/test/CylinderTest.h index 3890afb4aa2513454c6499b7a93e07360de414b0..8e6b73659efce63368f320380cd60ef48b61c77d 100644 --- a/Framework/Geometry/test/CylinderTest.h +++ b/Framework/Geometry/test/CylinderTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/DetectorGroupTest.h b/Framework/Geometry/test/DetectorGroupTest.h index c9c1c7b9d7bc456f4399e31383fc65239226a3b8..315821834ac548e3f14c23de14414d4180ac1144 100644 --- a/Framework/Geometry/test/DetectorGroupTest.h +++ b/Framework/Geometry/test/DetectorGroupTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/DetectorInfoIteratorTest.h b/Framework/Geometry/test/DetectorInfoIteratorTest.h index 7a1d0afd08be7da815b6b8dca4a3e53ae3490b52..40346fc90579f58a42d1e4d34f367121a09108f4 100644 --- a/Framework/Geometry/test/DetectorInfoIteratorTest.h +++ b/Framework/Geometry/test/DetectorInfoIteratorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/DetectorTest.h b/Framework/Geometry/test/DetectorTest.h index 0a37f9807b0ba6017afd2c771d0866063c21dec6..0a348b14dfcae30523863813977dd602104cca2f 100644 --- a/Framework/Geometry/test/DetectorTest.h +++ b/Framework/Geometry/test/DetectorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/FitParameterTest.h b/Framework/Geometry/test/FitParameterTest.h index 9281bff2256a4d186665874ec20cbb54950ba286..0fe0b76a5bb473ae9e81850058d7851e2f748c80 100644 --- a/Framework/Geometry/test/FitParameterTest.h +++ b/Framework/Geometry/test/FitParameterTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/GeneralFrameTest.h b/Framework/Geometry/test/GeneralFrameTest.h index 32eb12180b60e8ba2df6af9edc3856c256fbc649..1389918e3637f2d2c3a9090e3b5fe7fb1278362d 100644 --- a/Framework/Geometry/test/GeneralFrameTest.h +++ b/Framework/Geometry/test/GeneralFrameTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/GeneralTest.h b/Framework/Geometry/test/GeneralTest.h index 44b2f8aeb26405e0eac68fbd6b3e5289edcff547..a9f7c0773bfecaa96a1463e882b1d6d9e6f07c93 100644 --- a/Framework/Geometry/test/GeneralTest.h +++ b/Framework/Geometry/test/GeneralTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/GoniometerTest.h b/Framework/Geometry/test/GoniometerTest.h index bec6b4e14f4b5c1f42ffda9a201fab4a6b88454a..3059f0495ddf205bda8d0f344b50e3083c46251a 100644 --- a/Framework/Geometry/test/GoniometerTest.h +++ b/Framework/Geometry/test/GoniometerTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/GridDetectorPixelTest.h b/Framework/Geometry/test/GridDetectorPixelTest.h index 83198fdb5f155b5a3c12181ae93f77999d87d863..35c72ec84a576c92bb8e69f27ae3dbd4afff0481 100644 --- a/Framework/Geometry/test/GridDetectorPixelTest.h +++ b/Framework/Geometry/test/GridDetectorPixelTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/GridDetectorTest.h b/Framework/Geometry/test/GridDetectorTest.h index b3ba1c65e85a93365298ee58d422b5902478eb6d..c7f62a801606dc789da68203910c90ff091621c1 100644 --- a/Framework/Geometry/test/GridDetectorTest.h +++ b/Framework/Geometry/test/GridDetectorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/GroupTest.h b/Framework/Geometry/test/GroupTest.h index 81f78997ff7337adacdca16b1d5ed35e16289b57..576228a81e3ee74eb9801bad10c330814dec2c94 100644 --- a/Framework/Geometry/test/GroupTest.h +++ b/Framework/Geometry/test/GroupTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/GroupTransformationTest.h b/Framework/Geometry/test/GroupTransformationTest.h index c7d909af4ee4d2b288796adca79518c7627ebb9e..a380f4d804f04bfb7211702e6c93f11b755bb716 100644 --- a/Framework/Geometry/test/GroupTransformationTest.h +++ b/Framework/Geometry/test/GroupTransformationTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/HKLFilterTest.h b/Framework/Geometry/test/HKLFilterTest.h index ca8a7c2966791dd98df2af48d24381cfbb705795..5c29be52e41d45c5e32f6c6d75e2d5234d325031 100644 --- a/Framework/Geometry/test/HKLFilterTest.h +++ b/Framework/Geometry/test/HKLFilterTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/HKLFilterWavelengthTest.h b/Framework/Geometry/test/HKLFilterWavelengthTest.h index 562aead837cf6b367bc7381297a4223647702e4f..05a427cfae92cc9335b2b9ea0a8232b63ff5bef4 100644 --- a/Framework/Geometry/test/HKLFilterWavelengthTest.h +++ b/Framework/Geometry/test/HKLFilterWavelengthTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/HKLGeneratorTest.h b/Framework/Geometry/test/HKLGeneratorTest.h index 0aaedc56ae54224084421841a38cd4105647dcc7..6e60fa886fe189a84c5df0f7e4cd7390f20907ca 100644 --- a/Framework/Geometry/test/HKLGeneratorTest.h +++ b/Framework/Geometry/test/HKLGeneratorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/HKLTest.h b/Framework/Geometry/test/HKLTest.h index c17508e4ec4b7401cbfba3b93d8b887fb31392b1..e9b1bb6c520d27557b2944f77a71a9d083280033 100644 --- a/Framework/Geometry/test/HKLTest.h +++ b/Framework/Geometry/test/HKLTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/IDFObjectTest.h b/Framework/Geometry/test/IDFObjectTest.h index 72e6cf5975897062ca9e5b576302aba9267fa36f..58f8eeb58f8ee59e03d205002718f9b63a674cc0 100644 --- a/Framework/Geometry/test/IDFObjectTest.h +++ b/Framework/Geometry/test/IDFObjectTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/IMDDimensionFactoryTest.h b/Framework/Geometry/test/IMDDimensionFactoryTest.h index 1bc1d38586d00cba1c9edbe95d49c748ed9d2474..55b28042d60b32a656e1d6b8ddf9572d1a67dfea 100644 --- a/Framework/Geometry/test/IMDDimensionFactoryTest.h +++ b/Framework/Geometry/test/IMDDimensionFactoryTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/IMDDimensionTest.h b/Framework/Geometry/test/IMDDimensionTest.h index 0f5561e9875bf053c8635ffdd5d8906de7931d13..be72416ef92cc94261a66ec825d31289f3885cda 100644 --- a/Framework/Geometry/test/IMDDimensionTest.h +++ b/Framework/Geometry/test/IMDDimensionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/IndexingUtilsTest.h b/Framework/Geometry/test/IndexingUtilsTest.h index a7b80f12db72153c0ea00e177f536e17db376851..25f07e272c40f8fc9161fceb373e4246f2592a4d 100644 --- a/Framework/Geometry/test/IndexingUtilsTest.h +++ b/Framework/Geometry/test/IndexingUtilsTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -14,6 +14,8 @@ #include "MantidKernel/V3D.h" #include <cxxtest/TestSuite.h> +#include <utility> + using namespace Mantid::Geometry; using Mantid::Kernel::Matrix; using Mantid::Kernel::V3D; @@ -55,7 +57,7 @@ public: static void ShowLatticeParameters(Matrix<double> UB) { Matrix<double> UB_inv(3, 3, false); - UB_inv = UB; + UB_inv = std::move(UB); UB_inv.Invert(); V3D a_dir(UB_inv[0][0], UB_inv[0][1], UB_inv[0][2]); V3D b_dir(UB_inv[1][0], UB_inv[1][1], UB_inv[1][2]); @@ -73,7 +75,8 @@ public: std::cout << "-------------------------------------------\n"; } - static void ShowIndexingStats(Matrix<double> UB, std::vector<V3D> q_vectors, + static void ShowIndexingStats(const Matrix<double> &UB, + const std::vector<V3D> &q_vectors, double required_tolerance) { std::vector<V3D> miller_indices; std::vector<V3D> indexed_qs; diff --git a/Framework/Geometry/test/InstrumentDefinitionParserTest.h b/Framework/Geometry/test/InstrumentDefinitionParserTest.h index 0a9c204b85d0d2997e2e74aba515e4d474fd5aed..8ad15d693e80d6e5da58352386904821ddb140f8 100644 --- a/Framework/Geometry/test/InstrumentDefinitionParserTest.h +++ b/Framework/Geometry/test/InstrumentDefinitionParserTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -34,7 +34,7 @@ private: /// Mock Type to act as IDF files. class MockIDFObject : public Mantid::Geometry::IDFObject { public: - MockIDFObject(const std::string fileName) + MockIDFObject(const std::string &fileName) : Mantid::Geometry::IDFObject(fileName) {} MOCK_CONST_METHOD0(exists, bool()); }; @@ -42,7 +42,7 @@ private: /// Mock Type to act as IDF files. class MockIDFObjectWithParentDirectory : public Mantid::Geometry::IDFObject { public: - MockIDFObjectWithParentDirectory(const std::string fileName) + MockIDFObjectWithParentDirectory(const std::string &fileName) : Mantid::Geometry::IDFObject(fileName) {} MOCK_CONST_METHOD0(exists, bool()); MOCK_CONST_METHOD0(getParentDirectory, const Poco::Path()); @@ -54,7 +54,7 @@ private: */ struct IDFEnvironment { IDFEnvironment(const ScopedFile &idf, const ScopedFile &vtp, - const std::string xmlText, const std::string instName) + const std::string &xmlText, const std::string &instName) : _idf(idf), _vtp(vtp), _xmlText(xmlText), _instName(instName){}; ScopedFile _idf; @@ -980,8 +980,8 @@ public: TS_ASSERT_DELTA(instr->getDetector(5)->getPos().Z(), 3.0, 1.0E-8); } - void checkDetectorRot(IDetector_const_sptr det, double deg, double axisx, - double axisy, double axisz) { + void checkDetectorRot(const IDetector_const_sptr &det, double deg, + double axisx, double axisy, double axisz) { double detDeg, detAxisX, detAxisY, detAxisZ; det->getRotation().getAngleAxis(detDeg, detAxisX, detAxisY, detAxisZ); diff --git a/Framework/Geometry/test/InstrumentRayTracerTest.h b/Framework/Geometry/test/InstrumentRayTracerTest.h index a5f12df793abc38fb0e828a15ca1e023c3673e92..5fea17192a9d1a068741874f5539f4543170bf77 100644 --- a/Framework/Geometry/test/InstrumentRayTracerTest.h +++ b/Framework/Geometry/test/InstrumentRayTracerTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -163,8 +163,9 @@ public: * @param expectX :: expected x index, -1 if off * @param expectY :: expected y index, -1 if off */ - void doTestRectangularDetector(std::string message, Instrument_sptr inst, - V3D testDir, int expectX, int expectY) { + void doTestRectangularDetector(const std::string &message, + const Instrument_sptr &inst, V3D testDir, + int expectX, int expectY) { InstrumentRayTracer tracker(inst); testDir.normalize(); tracker.traceFromSample(testDir); diff --git a/Framework/Geometry/test/InstrumentTest.h b/Framework/Geometry/test/InstrumentTest.h index 43faf0c7b245bad1b85fa11a161610bbe6833cab..cc73f98dbb5129b6d2d4ab2592cfd1fa10e2cd30 100644 --- a/Framework/Geometry/test/InstrumentTest.h +++ b/Framework/Geometry/test/InstrumentTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/InstrumentVisitorTest.h b/Framework/Geometry/test/InstrumentVisitorTest.h index 6f0e958c55b957af656dca55de3c9ebb45fd3a8a..1b4ffb875ff1640bb4dc80d543a4b226ac36dbac 100644 --- a/Framework/Geometry/test/InstrumentVisitorTest.h +++ b/Framework/Geometry/test/InstrumentVisitorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/IsotropicAtomBraggScattererTest.h b/Framework/Geometry/test/IsotropicAtomBraggScattererTest.h index 3871cf4348e38ce8ce48d70dd6030cb76bd78606..3f40fef258aca08a0cab6ec889bc9de4a0966c71 100644 --- a/Framework/Geometry/test/IsotropicAtomBraggScattererTest.h +++ b/Framework/Geometry/test/IsotropicAtomBraggScattererTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/LineIntersectVisitTest.h b/Framework/Geometry/test/LineIntersectVisitTest.h index ecbdde86f1df5fbfe2f05d38b21af7cd28bcfe1f..1e5ae8054472cc4ee5991c96534ae653afbd9f53 100644 --- a/Framework/Geometry/test/LineIntersectVisitTest.h +++ b/Framework/Geometry/test/LineIntersectVisitTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/LineTest.h b/Framework/Geometry/test/LineTest.h index 96570f9d8f0c10ba766f072bbd387d62300ae562..4a676b36f8797160aa9b6696e86a0206b2d1af71 100644 --- a/Framework/Geometry/test/LineTest.h +++ b/Framework/Geometry/test/LineTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidGeometry/Surfaces/Cylinder.h" diff --git a/Framework/Geometry/test/MDBoxImplicitFunctionTest.h b/Framework/Geometry/test/MDBoxImplicitFunctionTest.h index c01fea584d7517fe54e5b8c51ae3aa8430715767..6d30faa3b665b3e34b8eaf0442000eaa6340bbec 100644 --- a/Framework/Geometry/test/MDBoxImplicitFunctionTest.h +++ b/Framework/Geometry/test/MDBoxImplicitFunctionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -106,7 +106,6 @@ public: // The box to test. const coord_t boxMin = 1.1f; const coord_t boxMax = 1.9f; - std::vector<coord_t> boxVertexes; std::vector<Extent> extents; // extent extents.emplace_back(Extent(boxMin, boxMax)); diff --git a/Framework/Geometry/test/MDFrameFactoryTest.h b/Framework/Geometry/test/MDFrameFactoryTest.h index c6d3290f9b3335b2feb4ed1cfbd21f36ed71a533..df54395aba97478ca901f3b56a3d2a95718a79a5 100644 --- a/Framework/Geometry/test/MDFrameFactoryTest.h +++ b/Framework/Geometry/test/MDFrameFactoryTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/MDGeometryXMLBuilderTest.h b/Framework/Geometry/test/MDGeometryXMLBuilderTest.h index 817633ead8c3b592902567506913544179a3b50d..3d9b618a4f5206f7552631c3a94b46a597d2434f 100644 --- a/Framework/Geometry/test/MDGeometryXMLBuilderTest.h +++ b/Framework/Geometry/test/MDGeometryXMLBuilderTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/MDGeometryXMLParserTest.h b/Framework/Geometry/test/MDGeometryXMLParserTest.h index d6ca516df69e5d0c1d1186f174daecbd38995e4f..477a0728558ccce9046a148b58f83df24468d331 100644 --- a/Framework/Geometry/test/MDGeometryXMLParserTest.h +++ b/Framework/Geometry/test/MDGeometryXMLParserTest.h @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #pragma once #include "MantidGeometry/MDGeometry/MDGeometryXMLParser.h" diff --git a/Framework/Geometry/test/MDHistoDimensionBuilderTest.h b/Framework/Geometry/test/MDHistoDimensionBuilderTest.h index e2cc22ef5d0c9bc0981017c0829fdba26726b57f..8dbada177f6094747b41cadc18958ccf2b16a8cd 100644 --- a/Framework/Geometry/test/MDHistoDimensionBuilderTest.h +++ b/Framework/Geometry/test/MDHistoDimensionBuilderTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/MDHistoDimensionTest.h b/Framework/Geometry/test/MDHistoDimensionTest.h index 63fae00cf2bc0786d8548d8213263f453ffd7396..fdec9c6ef9f152251d25ba4c199d4d370ba4cc1b 100644 --- a/Framework/Geometry/test/MDHistoDimensionTest.h +++ b/Framework/Geometry/test/MDHistoDimensionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/MDImplicitFunctionTest.h b/Framework/Geometry/test/MDImplicitFunctionTest.h index 6a6a8d7197a95abffe5813da47eace8e3586fb94..6ad7f6890a509df981c566ec93c0a77ea932fced 100644 --- a/Framework/Geometry/test/MDImplicitFunctionTest.h +++ b/Framework/Geometry/test/MDImplicitFunctionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/MDPlaneImplicitFunctionTest.h b/Framework/Geometry/test/MDPlaneImplicitFunctionTest.h index 26bde04506737dbe78a434de630882523996ebd9..03d07d8fecc66b3fc5723cb2cf308b3b90a73071 100644 --- a/Framework/Geometry/test/MDPlaneImplicitFunctionTest.h +++ b/Framework/Geometry/test/MDPlaneImplicitFunctionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/MDPlaneTest.h b/Framework/Geometry/test/MDPlaneTest.h index 257f489bf436ec9b981044d475266548d4579320..536e22ea076c49fc4df1b1860609e667b00c5f6a 100644 --- a/Framework/Geometry/test/MDPlaneTest.h +++ b/Framework/Geometry/test/MDPlaneTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/MapSupportTest.h b/Framework/Geometry/test/MapSupportTest.h index b16902cb3e05d5cbda14b4f0a10b24d24879645e..89e6b3dbdca391cc305a2ed411be6e88a45ed70e 100644 --- a/Framework/Geometry/test/MapSupportTest.h +++ b/Framework/Geometry/test/MapSupportTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidGeometry/Math/MapSupport.h" diff --git a/Framework/Geometry/test/MathSupportTest.h b/Framework/Geometry/test/MathSupportTest.h index d42f42adabe85cc3b40b76a57b2b23d692e9fe47..0a16cda11f27e9af9ac25c54897e1f4bfa488e55 100644 --- a/Framework/Geometry/test/MathSupportTest.h +++ b/Framework/Geometry/test/MathSupportTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/MatrixVectorPairParserTest.h b/Framework/Geometry/test/MatrixVectorPairParserTest.h index 59c0fc00dc661112a1d2b06e2d12e299c1d32a7c..29185faf55e31c1c81140701c695d1630005ea38 100644 --- a/Framework/Geometry/test/MatrixVectorPairParserTest.h +++ b/Framework/Geometry/test/MatrixVectorPairParserTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/MatrixVectorPairTest.h b/Framework/Geometry/test/MatrixVectorPairTest.h index 7af7c82f7b42298541c44668668a91deca7dba89..cdf019abceac61cf399c18a2a9dc73c1e749ff5b 100644 --- a/Framework/Geometry/test/MatrixVectorPairTest.h +++ b/Framework/Geometry/test/MatrixVectorPairTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/MeshObject2DTest.h b/Framework/Geometry/test/MeshObject2DTest.h index b54adb38e7f21583dd1748bf80eba9ee4d9d6acf..ac27d6189cbd54af4eed037e3baf6e2ab5baf5ae 100644 --- a/Framework/Geometry/test/MeshObject2DTest.h +++ b/Framework/Geometry/test/MeshObject2DTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/MeshObjectCommonTest.h b/Framework/Geometry/test/MeshObjectCommonTest.h index d03b9a63807c007285da6e18b067afa882e42006..ebb6563b9fea9456b385260306ec0b48ad3f2ec0 100644 --- a/Framework/Geometry/test/MeshObjectCommonTest.h +++ b/Framework/Geometry/test/MeshObjectCommonTest.h @@ -1,3 +1,9 @@ +// Mantid Repository : https://github.com/mantidproject/mantid +// +// Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS +// SPDX - License - Identifier: GPL - 3.0 + #pragma once #include <cxxtest/TestSuite.h> diff --git a/Framework/Geometry/test/MeshObjectTest.h b/Framework/Geometry/test/MeshObjectTest.h index 266a7bf8fdca3c374813c6e3f95de291bc347df6..52214f6453faa92445d50739ddf9e1f1c6ceb153 100644 --- a/Framework/Geometry/test/MeshObjectTest.h +++ b/Framework/Geometry/test/MeshObjectTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/MockObjects.h b/Framework/Geometry/test/MockObjects.h index d7d742dbf67f4b2d0473903d90bf99f848c48a17..a23259d05f84b7b39c1ea9a6bd03d5b88fa95140 100644 --- a/Framework/Geometry/test/MockObjects.h +++ b/Framework/Geometry/test/MockObjects.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /* * MockObjects.h diff --git a/Framework/Geometry/test/MockRNG.h b/Framework/Geometry/test/MockRNG.h index 9a06fa28ebfdb534025a2bd0d3658597c650f847..36459d363c019ec00c2b1b6155c7e69db2e4fa72 100644 --- a/Framework/Geometry/test/MockRNG.h +++ b/Framework/Geometry/test/MockRNG.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/NiggliCellTest.h b/Framework/Geometry/test/NiggliCellTest.h index 58b0222b565ba638c88c230dcfd359b3eb3c8924..67a52b6d9c3b5974f921d9e57f144af40d7aafda 100644 --- a/Framework/Geometry/test/NiggliCellTest.h +++ b/Framework/Geometry/test/NiggliCellTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/NullImplicitFunctionTest.h b/Framework/Geometry/test/NullImplicitFunctionTest.h index f6655f33e44a180bfc936a2013d3aaf93b46e100..fc9e3233a58ee7c31b92921e52ac85bbaf21a85e 100644 --- a/Framework/Geometry/test/NullImplicitFunctionTest.h +++ b/Framework/Geometry/test/NullImplicitFunctionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/ObjCompAssemblyTest.h b/Framework/Geometry/test/ObjCompAssemblyTest.h index ee93afc62108346bbc80a4c7ec7038910b8ffadc..2eee89cfd5c65ce7f677fa814b96ca10f2e7cafa 100644 --- a/Framework/Geometry/test/ObjCompAssemblyTest.h +++ b/Framework/Geometry/test/ObjCompAssemblyTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/ObjComponentTest.h b/Framework/Geometry/test/ObjComponentTest.h index 9426b47add22bf75eac55e94998d9b8dc1369916..1ab284c59c1ebb154176b5120d2d61aa1ecdc3cd 100644 --- a/Framework/Geometry/test/ObjComponentTest.h +++ b/Framework/Geometry/test/ObjComponentTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/OrientedLatticeTest.h b/Framework/Geometry/test/OrientedLatticeTest.h index e05dae46707f34bda62bcc7b6ab80dc4165efefc..b1f9379f2ea05d3c5c8971a4039c94a37428768a 100644 --- a/Framework/Geometry/test/OrientedLatticeTest.h +++ b/Framework/Geometry/test/OrientedLatticeTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/ParCompAssemblyTest.h b/Framework/Geometry/test/ParCompAssemblyTest.h index 375f567bc6b234c35f21844091261a3d888fcfc3..e005f2ace173602c0e8cee0c0bfbcfdb41f95d12 100644 --- a/Framework/Geometry/test/ParCompAssemblyTest.h +++ b/Framework/Geometry/test/ParCompAssemblyTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/ParComponentFactoryTest.h b/Framework/Geometry/test/ParComponentFactoryTest.h index 964599dca2ba2860c1633de7a700650207ab19cf..2eb8068ddcaf9ea7cacb8f0a5cfbac62c9966b53 100644 --- a/Framework/Geometry/test/ParComponentFactoryTest.h +++ b/Framework/Geometry/test/ParComponentFactoryTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/ParDetectorTest.h b/Framework/Geometry/test/ParDetectorTest.h index 3a90cbb00d42896389f30e4b0edbca9e8db6e457..7ab98aae8dc1500e32c94a293b936c4e6191262a 100644 --- a/Framework/Geometry/test/ParDetectorTest.h +++ b/Framework/Geometry/test/ParDetectorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/ParInstrumentTest.h b/Framework/Geometry/test/ParInstrumentTest.h index 035fb7b821b7180dd2bb15d7e6bab299500ed333..785ed268d596eb5cc939124deb2225de796eaf31 100644 --- a/Framework/Geometry/test/ParInstrumentTest.h +++ b/Framework/Geometry/test/ParInstrumentTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/ParObjCompAssemblyTest.h b/Framework/Geometry/test/ParObjCompAssemblyTest.h index cebb427960ade049a62a50f67888e1ca4e8482e2..ac5ce91b2477d802c158dc7699b349ff8eff985e 100644 --- a/Framework/Geometry/test/ParObjCompAssemblyTest.h +++ b/Framework/Geometry/test/ParObjCompAssemblyTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/ParObjComponentTest.h b/Framework/Geometry/test/ParObjComponentTest.h index d52a23b49502f123e222eb8ab66a819c2e7ab292..288baeb344d401b6d4bbf805053a162e5d3e603c 100644 --- a/Framework/Geometry/test/ParObjComponentTest.h +++ b/Framework/Geometry/test/ParObjComponentTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/ParameterMapTest.h b/Framework/Geometry/test/ParameterMapTest.h index 85effd1906fb1ba5099e039676560e299609cc29..2eb47cb4892ea67f6d74d4420a10802840ebb78d 100644 --- a/Framework/Geometry/test/ParameterMapTest.h +++ b/Framework/Geometry/test/ParameterMapTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/ParametrizedComponentTest.h b/Framework/Geometry/test/ParametrizedComponentTest.h index 840407957f4d7a7b6dd11565408a3aa6838e343a..73b20eea64bbbfe945f0cbcdbfec9e44aefdada1 100644 --- a/Framework/Geometry/test/ParametrizedComponentTest.h +++ b/Framework/Geometry/test/ParametrizedComponentTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/PeakTransformHKLTest.h b/Framework/Geometry/test/PeakTransformHKLTest.h index 314bd2f254b4680eca50a7699d790e3892a50066..ae123cb5e41a992fb343183087a7c67624d9f3bb 100644 --- a/Framework/Geometry/test/PeakTransformHKLTest.h +++ b/Framework/Geometry/test/PeakTransformHKLTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/PeakTransformQLabTest.h b/Framework/Geometry/test/PeakTransformQLabTest.h index 3afdc1dca7e8bb7b9774872f52bd27104290b4a3..9b8d60eb2825648997c2fdb654c87d2da63d81ef 100644 --- a/Framework/Geometry/test/PeakTransformQLabTest.h +++ b/Framework/Geometry/test/PeakTransformQLabTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/PeakTransformQSampleTest.h b/Framework/Geometry/test/PeakTransformQSampleTest.h index ae520f5880e38e3a53c5e1070c85dc576fa7ae5b..8d2d7ad05df106ed18d5c066f74bef7bc8242589 100644 --- a/Framework/Geometry/test/PeakTransformQSampleTest.h +++ b/Framework/Geometry/test/PeakTransformQSampleTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/PeakTransformSelectorTest.h b/Framework/Geometry/test/PeakTransformSelectorTest.h index e844270b88ff72570f31dc4685f643b9530c5c51..72a9147c4b4f4f9b58936364a2e41aa41ab24c1c 100644 --- a/Framework/Geometry/test/PeakTransformSelectorTest.h +++ b/Framework/Geometry/test/PeakTransformSelectorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/PlaneTest.h b/Framework/Geometry/test/PlaneTest.h index 528778083b2999fc5c8000139470169b521d3608..6ba1a595f95b9a365b569ad77292470b8ee5f844 100644 --- a/Framework/Geometry/test/PlaneTest.h +++ b/Framework/Geometry/test/PlaneTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/PointGroupFactoryTest.h b/Framework/Geometry/test/PointGroupFactoryTest.h index e077212d7eb46ac5f5d4f60587ff7a9f249eddbe..7778f326424f77ba06ca32c631b4759e31cfe0ff 100644 --- a/Framework/Geometry/test/PointGroupFactoryTest.h +++ b/Framework/Geometry/test/PointGroupFactoryTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/PointGroupTest.h b/Framework/Geometry/test/PointGroupTest.h index ffa669cea282506642ca808e432a1fc2c6c2430a..8917d739944fba93d201102945ff10078964ec72 100644 --- a/Framework/Geometry/test/PointGroupTest.h +++ b/Framework/Geometry/test/PointGroupTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -22,7 +22,7 @@ using namespace Mantid::Geometry; class PointGroupTest : public CxxTest::TestSuite { public: - void check_point_group(std::string name, V3D hkl, size_t numEquiv, + void check_point_group(const std::string &name, V3D hkl, size_t numEquiv, V3D *equiv) { PointGroup_sptr testedPointGroup = PointGroupFactory::Instance().createPointGroup(name); diff --git a/Framework/Geometry/test/PolyTest.h b/Framework/Geometry/test/PolyTest.h index 22253fb0a6670eee72cbe0650c1314b4c813c4b2..05488f99ff71326406b560d1ea9909471883ce5b 100644 --- a/Framework/Geometry/test/PolyTest.h +++ b/Framework/Geometry/test/PolyTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/PolygonEdgeTest.h b/Framework/Geometry/test/PolygonEdgeTest.h index db89de113729161a3c7b6afabc8fe5b4a8d0364a..32a794a6e8efb15ef908aa89b7d08d6628384c7a 100644 --- a/Framework/Geometry/test/PolygonEdgeTest.h +++ b/Framework/Geometry/test/PolygonEdgeTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/PolygonIntersectionTest.h b/Framework/Geometry/test/PolygonIntersectionTest.h index 4ad561a33398c3f770bfc7d3cc9f38fd7325f58a..c7f55cb004096081d250181ab31739c37bffe179 100644 --- a/Framework/Geometry/test/PolygonIntersectionTest.h +++ b/Framework/Geometry/test/PolygonIntersectionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidGeometry/Math/ConvexPolygon.h" diff --git a/Framework/Geometry/test/PrecompiledHeader.h b/Framework/Geometry/test/PrecompiledHeader.h index 2938ffd0a3e091e68eeb75289179e3af4211b5a3..e6fdf6551cbda585cc789772079a0760cddd669b 100644 --- a/Framework/Geometry/test/PrecompiledHeader.h +++ b/Framework/Geometry/test/PrecompiledHeader.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/ProductOfCyclicGroupsTest.h b/Framework/Geometry/test/ProductOfCyclicGroupsTest.h index 665028eb37b4b6da330384dbe7ce2c688c436419..e371a052ae1ae21e4c310124393be2593bbbad61 100644 --- a/Framework/Geometry/test/ProductOfCyclicGroupsTest.h +++ b/Framework/Geometry/test/ProductOfCyclicGroupsTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/QLabTest.h b/Framework/Geometry/test/QLabTest.h index c0eeb158a9db80bd024bbadf462bba425869b5c4..e1f5f435f45e9bd9b36fae332f6dbfef9650ac46 100644 --- a/Framework/Geometry/test/QLabTest.h +++ b/Framework/Geometry/test/QLabTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/QSampleTest.h b/Framework/Geometry/test/QSampleTest.h index 3cf6c4247165657e0aa2be54dba250bdf18c4cbe..ee4a7cac9e861af7c7e0c66c8ae4032ef131b8cb 100644 --- a/Framework/Geometry/test/QSampleTest.h +++ b/Framework/Geometry/test/QSampleTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/QuadrilateralTest.h b/Framework/Geometry/test/QuadrilateralTest.h index 736d288abb3b576c371d6ada9bc94741f327e98b..bc04536908977123aeac171c2e64a13509f3e0d5 100644 --- a/Framework/Geometry/test/QuadrilateralTest.h +++ b/Framework/Geometry/test/QuadrilateralTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/RandomPointTest.h b/Framework/Geometry/test/RandomPointTest.h index a94c0cc00d556cadd96eac88619037e2285d88c8..0ae11605af5e5447361fb823d6da2eeea392cb90 100644 --- a/Framework/Geometry/test/RandomPointTest.h +++ b/Framework/Geometry/test/RandomPointTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/RasterizeTest.h b/Framework/Geometry/test/RasterizeTest.h index 9a1c6c12688f6ca783ea5ebe56d328c366cc2f94..f9c7eddde1ecca63023a228d0cbf041ddaa89d28 100644 --- a/Framework/Geometry/test/RasterizeTest.h +++ b/Framework/Geometry/test/RasterizeTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/RectangularDetectorTest.h b/Framework/Geometry/test/RectangularDetectorTest.h index 46e3c72a4f737a1cb61e0e14d77e1e27bdc7042f..d3fe6c4d07c21af944ef435085a5e24427533e4e 100644 --- a/Framework/Geometry/test/RectangularDetectorTest.h +++ b/Framework/Geometry/test/RectangularDetectorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/ReducedCellTest.h b/Framework/Geometry/test/ReducedCellTest.h index 113f559620885f174d522bfef4b9de4e020b1feb..2895eae913546b4d95e9889a3d1e847234df3014 100644 --- a/Framework/Geometry/test/ReducedCellTest.h +++ b/Framework/Geometry/test/ReducedCellTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/ReferenceFrameTest.h b/Framework/Geometry/test/ReferenceFrameTest.h index 82d82a3a3c7c1cf6fb5b646173ad57040bf16fa0..bffa1824a8391879a89042af240cdcccc3c8df8a 100644 --- a/Framework/Geometry/test/ReferenceFrameTest.h +++ b/Framework/Geometry/test/ReferenceFrameTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/ReflectionConditionTest.h b/Framework/Geometry/test/ReflectionConditionTest.h index 4a51275c6f967256a215d1278d1a65c59ae9c7ae..06bac5769e80339a3620c78e225c1bd5bc3a1ff4 100644 --- a/Framework/Geometry/test/ReflectionConditionTest.h +++ b/Framework/Geometry/test/ReflectionConditionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/ReflectionGeneratorTest.h b/Framework/Geometry/test/ReflectionGeneratorTest.h index 65ee7b39ff8c89c6a897e9928cf7e673ff5cfff1..00c4c1528a2e81577dc4bb042466c9e0ed6d14aa 100644 --- a/Framework/Geometry/test/ReflectionGeneratorTest.h +++ b/Framework/Geometry/test/ReflectionGeneratorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/RotCounterTest.h b/Framework/Geometry/test/RotCounterTest.h index 8c6adc81cf4aedda0c9f353edb70126cb1341aab..b675d002e9ac216510d2ef2aebc258599c556296 100644 --- a/Framework/Geometry/test/RotCounterTest.h +++ b/Framework/Geometry/test/RotCounterTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidGeometry/Math/RotCounter.h" diff --git a/Framework/Geometry/test/RulesBoolValueTest.h b/Framework/Geometry/test/RulesBoolValueTest.h index 1605119cac9d98bfb195f34779074ada75faf85e..0ade2dd38119fcbc14852bb4b79d2c1ad4a2396e 100644 --- a/Framework/Geometry/test/RulesBoolValueTest.h +++ b/Framework/Geometry/test/RulesBoolValueTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidGeometry/Objects/CSGObject.h" diff --git a/Framework/Geometry/test/RulesCompGrpTest.h b/Framework/Geometry/test/RulesCompGrpTest.h index 1448fde76a32f77e9f8227f176cd5538c5d64089..309a958190271aec6e781bc6c48e692037cef48b 100644 --- a/Framework/Geometry/test/RulesCompGrpTest.h +++ b/Framework/Geometry/test/RulesCompGrpTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidKernel/Logger.h" diff --git a/Framework/Geometry/test/RulesCompObjTest.h b/Framework/Geometry/test/RulesCompObjTest.h index 46934f3368f3af204b7b7625f32c6628112e95c5..8a4d8db7f58bcc146e91fee0db4b48ff7ec7ab5f 100644 --- a/Framework/Geometry/test/RulesCompObjTest.h +++ b/Framework/Geometry/test/RulesCompObjTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidGeometry/Objects/CSGObject.h" diff --git a/Framework/Geometry/test/RulesIntersectionTest.h b/Framework/Geometry/test/RulesIntersectionTest.h index e79433f64a080e968854ea8c29e291328816a0af..658ebfe3b77f920f25b62d95dbaab1e3a2a94a7b 100644 --- a/Framework/Geometry/test/RulesIntersectionTest.h +++ b/Framework/Geometry/test/RulesIntersectionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidGeometry/Objects/CSGObject.h" diff --git a/Framework/Geometry/test/RulesSurfPointTest.h b/Framework/Geometry/test/RulesSurfPointTest.h index 67005dee4bd02010246d0b63114012abcec1d697..d83877ddbd783ff6ee2eba98a2538d2215985288 100644 --- a/Framework/Geometry/test/RulesSurfPointTest.h +++ b/Framework/Geometry/test/RulesSurfPointTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidGeometry/Objects/CSGObject.h" diff --git a/Framework/Geometry/test/RulesTest.h b/Framework/Geometry/test/RulesTest.h index e90fd540c1ce70fcdaf7d8e7fda978b7e7576d77..4451c0d3d3a136e49b64787099910ad73fd49633 100644 --- a/Framework/Geometry/test/RulesTest.h +++ b/Framework/Geometry/test/RulesTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidGeometry/Objects/CSGObject.h" diff --git a/Framework/Geometry/test/RulesUnionTest.h b/Framework/Geometry/test/RulesUnionTest.h index ce2d056621e07476cd927203f0e513cdaea94960..da5b0044e59c36069fcef57f3e641a92388946e2 100644 --- a/Framework/Geometry/test/RulesUnionTest.h +++ b/Framework/Geometry/test/RulesUnionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidGeometry/Objects/CSGObject.h" diff --git a/Framework/Geometry/test/SampleEnvironmentTest.h b/Framework/Geometry/test/SampleEnvironmentTest.h index 5b6481f1fc3db120651d78f79f90a916a8136808..bfa51f6f6e452d152e027ecb1241dde0ef8b3b25 100644 --- a/Framework/Geometry/test/SampleEnvironmentTest.h +++ b/Framework/Geometry/test/SampleEnvironmentTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/ScalarUtilsTest.h b/Framework/Geometry/test/ScalarUtilsTest.h index f652587527897e857cbfbd21b0778d50f667f2b1..f9e0cd0dface9de5127c442605e9ac1d472fa3a1 100644 --- a/Framework/Geometry/test/ScalarUtilsTest.h +++ b/Framework/Geometry/test/ScalarUtilsTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/ShapeFactoryTest.h b/Framework/Geometry/test/ShapeFactoryTest.h index 89c254a13ab569d66d2b0601b0e7750a18eb7556..5d6fe1e5c283238eba302b45db9b24aac9fda8bb 100644 --- a/Framework/Geometry/test/ShapeFactoryTest.h +++ b/Framework/Geometry/test/ShapeFactoryTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -636,7 +636,7 @@ public: TS_ASSERT(!shape_sptr->isValid(V3D(0.0, 0.0, 1))); } - boost::shared_ptr<CSGObject> getObject(std::string xmlShape) { + boost::shared_ptr<CSGObject> getObject(const std::string &xmlShape) { std::string shapeXML = "<type name=\"userShape\"> " + xmlShape + " </type>"; // Set up the DOM parser and parse xml string diff --git a/Framework/Geometry/test/ShapeInfoTest.h b/Framework/Geometry/test/ShapeInfoTest.h index 166d1bf99edca7b0e17e8f6effb341f2d71aad9d..e812ff7d4c61215d357abed12e9a5d5dadc48654 100644 --- a/Framework/Geometry/test/ShapeInfoTest.h +++ b/Framework/Geometry/test/ShapeInfoTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Rendering/ShapeInfo.h" #include "MantidKernel/V3D.h" diff --git a/Framework/Geometry/test/SpaceGroupFactoryTest.h b/Framework/Geometry/test/SpaceGroupFactoryTest.h index db86a95a89f4f809b9430ba0473550e83b6a15a9..7f6b1e8fd765dfd9c241cf532c8aed0bc619827a 100644 --- a/Framework/Geometry/test/SpaceGroupFactoryTest.h +++ b/Framework/Geometry/test/SpaceGroupFactoryTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/SpaceGroupTest.h b/Framework/Geometry/test/SpaceGroupTest.h index 25b5ff2960856b9e8ef969d807ee4ab21cf903d9..1f4ae0445f5242564acf59d585d044952c89030a 100644 --- a/Framework/Geometry/test/SpaceGroupTest.h +++ b/Framework/Geometry/test/SpaceGroupTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/SphereTest.h b/Framework/Geometry/test/SphereTest.h index 90474c32facdfcb32e5b6ae170d2dc2c43a1adc3..e3523b795d53203b79aa7678ca2f312b511e66fa 100644 --- a/Framework/Geometry/test/SphereTest.h +++ b/Framework/Geometry/test/SphereTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/StructureFactorCalculatorSummationTest.h b/Framework/Geometry/test/StructureFactorCalculatorSummationTest.h index 1c55d1da9b60e274654a41a6c8e76db98ede2367..4020571019f58f78ce000b21322aa25ca26377b3 100644 --- a/Framework/Geometry/test/StructureFactorCalculatorSummationTest.h +++ b/Framework/Geometry/test/StructureFactorCalculatorSummationTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/StructureFactorCalculatorTest.h b/Framework/Geometry/test/StructureFactorCalculatorTest.h index ef1658d4aab732239036df8aa061f41999f04a56..9d572f086c6ec4b1b780269a485ea6047989ee0c 100644 --- a/Framework/Geometry/test/StructureFactorCalculatorTest.h +++ b/Framework/Geometry/test/StructureFactorCalculatorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/StructuredDetectorTest.h b/Framework/Geometry/test/StructuredDetectorTest.h index 9b73c739d256ec18a929898d2da40e9ab163bdb4..7c8bb8b3942ff43d85a00a2ab4c7da7b4b9f7d91 100644 --- a/Framework/Geometry/test/StructuredDetectorTest.h +++ b/Framework/Geometry/test/StructuredDetectorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/SurfaceFactoryTest.h b/Framework/Geometry/test/SurfaceFactoryTest.h index ed919775353e116edf644a9876abd13a138e4b0f..e756fca757be48432d93888369512a2ccdce6b8e 100644 --- a/Framework/Geometry/test/SurfaceFactoryTest.h +++ b/Framework/Geometry/test/SurfaceFactoryTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/SurfaceTest.h b/Framework/Geometry/test/SurfaceTest.h index 0f257f9cd4106bea1d364ec079d817b2306add9e..87cfe592d3abf73c853e8e0a002df49f2dd2b819 100644 --- a/Framework/Geometry/test/SurfaceTest.h +++ b/Framework/Geometry/test/SurfaceTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/SymmetryElementFactoryTest.h b/Framework/Geometry/test/SymmetryElementFactoryTest.h index dd5032c359016d01e80c0dd16d98f2c822de1255..9ed136e7f3d3143885a87841110b8c5327872aad 100644 --- a/Framework/Geometry/test/SymmetryElementFactoryTest.h +++ b/Framework/Geometry/test/SymmetryElementFactoryTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/SymmetryElementTest.h b/Framework/Geometry/test/SymmetryElementTest.h index 241e11a15311d8126c3d4840781e336f43cbbf2a..ca05cecc089341d0db04213e3b4b47ef1cd6354b 100644 --- a/Framework/Geometry/test/SymmetryElementTest.h +++ b/Framework/Geometry/test/SymmetryElementTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/SymmetryOperationFactoryTest.h b/Framework/Geometry/test/SymmetryOperationFactoryTest.h index 780772fc8407b80403eb7e7d56915b5cc44a2f9e..7870c98befc1d0a054bd9c084a7acfe938189a92 100644 --- a/Framework/Geometry/test/SymmetryOperationFactoryTest.h +++ b/Framework/Geometry/test/SymmetryOperationFactoryTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/SymmetryOperationSymbolParserTest.h b/Framework/Geometry/test/SymmetryOperationSymbolParserTest.h index 4a66e00fee970fe29551b2b01ea58a74542cbba8..a4faa9a6e0a2938e7548659992786b1ac3029469 100644 --- a/Framework/Geometry/test/SymmetryOperationSymbolParserTest.h +++ b/Framework/Geometry/test/SymmetryOperationSymbolParserTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/SymmetryOperationTest.h b/Framework/Geometry/test/SymmetryOperationTest.h index a4799432c67383a30b5087a0fdcf2764b3eb4dd6..0aa798fca3ccc57e5ab6d76c1ffbf06e05eb7b7f 100644 --- a/Framework/Geometry/test/SymmetryOperationTest.h +++ b/Framework/Geometry/test/SymmetryOperationTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/TorusTest.h b/Framework/Geometry/test/TorusTest.h index 235d307c76fb04fe0b2ccbf9ec18bcbe2968589b..f035f87702f00547347d602634dc1356d762738b 100644 --- a/Framework/Geometry/test/TorusTest.h +++ b/Framework/Geometry/test/TorusTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/TrackTest.h b/Framework/Geometry/test/TrackTest.h index c0a0740a988475ed954c3d376754f7b97d18b0ae..1da21cf3636ddb271a46c0cae30b7e3f401368c8 100644 --- a/Framework/Geometry/test/TrackTest.h +++ b/Framework/Geometry/test/TrackTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/TripleTest.h b/Framework/Geometry/test/TripleTest.h index 6a0378afbd8e93d2673c927591fa9ea3105971ec..d865a31ba7ecda489140a97269ddbbc57789c292 100644 --- a/Framework/Geometry/test/TripleTest.h +++ b/Framework/Geometry/test/TripleTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/UnitCellTest.h b/Framework/Geometry/test/UnitCellTest.h index e847892c8a3abb9e059c2eddbb0b1ddf6ab47af2..45f02dd43b70d34f8f6545ab9973fe294bdc71ce 100644 --- a/Framework/Geometry/test/UnitCellTest.h +++ b/Framework/Geometry/test/UnitCellTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/V3RTest.h b/Framework/Geometry/test/V3RTest.h index 99956e23fe2d413de0d119060fdb0fd1aa319c78..f48e51ea0224821c423dbf6f5c24fb09213433e7 100644 --- a/Framework/Geometry/test/V3RTest.h +++ b/Framework/Geometry/test/V3RTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Geometry/test/XMLInstrumentParameterTest.h b/Framework/Geometry/test/XMLInstrumentParameterTest.h index 5fd1bca81306062f5d5a4b4595aa886d3b2fe2fd..6f4241a19e0cbee7c0b29163e0627bc6ad6d8914 100644 --- a/Framework/Geometry/test/XMLInstrumentParameterTest.h +++ b/Framework/Geometry/test/XMLInstrumentParameterTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/HistogramData/inc/MantidHistogramData/Addable.h b/Framework/HistogramData/inc/MantidHistogramData/Addable.h index c355c020313778af19804a68bc2969adfc8ff349..ce1a6147038ddd5aeb0f5b0fa668a6363efad80f 100644 --- a/Framework/HistogramData/inc/MantidHistogramData/Addable.h +++ b/Framework/HistogramData/inc/MantidHistogramData/Addable.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/HistogramData/inc/MantidHistogramData/BinEdges.h b/Framework/HistogramData/inc/MantidHistogramData/BinEdges.h index 3b108f8050348ffd453f53d443ab1b1aa072de78..d26b1039a6783c3fc265ca5d669521ab263ee707 100644 --- a/Framework/HistogramData/inc/MantidHistogramData/BinEdges.h +++ b/Framework/HistogramData/inc/MantidHistogramData/BinEdges.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/HistogramData/inc/MantidHistogramData/CountStandardDeviations.h b/Framework/HistogramData/inc/MantidHistogramData/CountStandardDeviations.h index 599b1b700b39afb6205d18f25b725257f1b05317..dd10c4ec23b97c681d2980ba6681e34046fed669 100644 --- a/Framework/HistogramData/inc/MantidHistogramData/CountStandardDeviations.h +++ b/Framework/HistogramData/inc/MantidHistogramData/CountStandardDeviations.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/HistogramData/inc/MantidHistogramData/CountVariances.h b/Framework/HistogramData/inc/MantidHistogramData/CountVariances.h index 72f0251f73105abc9d85b16ec1a3edb6ee16cab5..5a9212e391b112c3619804a0e88ac836b990a53a 100644 --- a/Framework/HistogramData/inc/MantidHistogramData/CountVariances.h +++ b/Framework/HistogramData/inc/MantidHistogramData/CountVariances.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/HistogramData/inc/MantidHistogramData/Counts.h b/Framework/HistogramData/inc/MantidHistogramData/Counts.h index 8d67672ba472c622cac7b28ce4f1da36026ae3ea..80c5b67ede239655fbd1865df1ae7ecfe92d7ff4 100644 --- a/Framework/HistogramData/inc/MantidHistogramData/Counts.h +++ b/Framework/HistogramData/inc/MantidHistogramData/Counts.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/HistogramData/inc/MantidHistogramData/EValidation.h b/Framework/HistogramData/inc/MantidHistogramData/EValidation.h index 74581e74356a0076981705417de18e0cf4aded21..dc569189712682c7dc8accd0d9878051092220b3 100644 --- a/Framework/HistogramData/inc/MantidHistogramData/EValidation.h +++ b/Framework/HistogramData/inc/MantidHistogramData/EValidation.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/HistogramData/inc/MantidHistogramData/EstimatePolynomial.h b/Framework/HistogramData/inc/MantidHistogramData/EstimatePolynomial.h index c43b601e704a6bd88d2e24c53f63a29fee6f9d92..a40a4045397e1b13451629b62d8255658e15dbb4 100644 --- a/Framework/HistogramData/inc/MantidHistogramData/EstimatePolynomial.h +++ b/Framework/HistogramData/inc/MantidHistogramData/EstimatePolynomial.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/HistogramData/inc/MantidHistogramData/Exception.h b/Framework/HistogramData/inc/MantidHistogramData/Exception.h index d134b251c8a0a68dd429866a3129b5a07cd56266..3ca0f33f72017854853ad8130bb775f5a9d103f9 100644 --- a/Framework/HistogramData/inc/MantidHistogramData/Exception.h +++ b/Framework/HistogramData/inc/MantidHistogramData/Exception.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidHistogramData/DllConfig.h" #include <stdexcept> diff --git a/Framework/HistogramData/inc/MantidHistogramData/FixedLengthVector.h b/Framework/HistogramData/inc/MantidHistogramData/FixedLengthVector.h index 63e0ceffd3ad96709e40514e5e075d37aa7217a4..eedd4ee64b80f3b26f0cdb36519a386311bdc8fe 100644 --- a/Framework/HistogramData/inc/MantidHistogramData/FixedLengthVector.h +++ b/Framework/HistogramData/inc/MantidHistogramData/FixedLengthVector.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/HistogramData/inc/MantidHistogramData/Frequencies.h b/Framework/HistogramData/inc/MantidHistogramData/Frequencies.h index 59240347e70df2a8fd8e4c99e29b2b6341ea6d20..6d4b3c0a95033ce36e99f822b4d640167bf2df46 100644 --- a/Framework/HistogramData/inc/MantidHistogramData/Frequencies.h +++ b/Framework/HistogramData/inc/MantidHistogramData/Frequencies.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/HistogramData/inc/MantidHistogramData/FrequencyStandardDeviations.h b/Framework/HistogramData/inc/MantidHistogramData/FrequencyStandardDeviations.h index 596b923eac5d1db671a1f9ac8c43f3f8cd124b43..3344befef1f88d4cd88587d67cfcbd08fe06ff43 100644 --- a/Framework/HistogramData/inc/MantidHistogramData/FrequencyStandardDeviations.h +++ b/Framework/HistogramData/inc/MantidHistogramData/FrequencyStandardDeviations.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/HistogramData/inc/MantidHistogramData/FrequencyVariances.h b/Framework/HistogramData/inc/MantidHistogramData/FrequencyVariances.h index 2e1c62edcfe9391a529d1c43a08fedee0c906762..d77cdfe61bfb162872036fdc810f6fb602b72362 100644 --- a/Framework/HistogramData/inc/MantidHistogramData/FrequencyVariances.h +++ b/Framework/HistogramData/inc/MantidHistogramData/FrequencyVariances.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/HistogramData/inc/MantidHistogramData/Histogram.h b/Framework/HistogramData/inc/MantidHistogramData/Histogram.h index 8554e6d11471292481fa93256dfb8193b40194cf..8e35c8985086344e4e8171de23988d4feff4c673 100644 --- a/Framework/HistogramData/inc/MantidHistogramData/Histogram.h +++ b/Framework/HistogramData/inc/MantidHistogramData/Histogram.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/HistogramData/inc/MantidHistogramData/HistogramBuilder.h b/Framework/HistogramData/inc/MantidHistogramData/HistogramBuilder.h index 9cc23fe5fdafa027d1068cc75728bc5acb427369..1637e2d95153528a0ef157f28555450b05196cb4 100644 --- a/Framework/HistogramData/inc/MantidHistogramData/HistogramBuilder.h +++ b/Framework/HistogramData/inc/MantidHistogramData/HistogramBuilder.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/HistogramData/inc/MantidHistogramData/HistogramDx.h b/Framework/HistogramData/inc/MantidHistogramData/HistogramDx.h index 9b117d4a6190423c9c3d24b0bf04d18395daec2c..a6eec5f4b7832d7b2f2ac267525e1e14003b1ef9 100644 --- a/Framework/HistogramData/inc/MantidHistogramData/HistogramDx.h +++ b/Framework/HistogramData/inc/MantidHistogramData/HistogramDx.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/HistogramData/inc/MantidHistogramData/HistogramE.h b/Framework/HistogramData/inc/MantidHistogramData/HistogramE.h index d1009616f36d43fe2f50f43feb0936f1fc6019d1..76135d908e70afe8b47cb32f1abdc1ee292358e5 100644 --- a/Framework/HistogramData/inc/MantidHistogramData/HistogramE.h +++ b/Framework/HistogramData/inc/MantidHistogramData/HistogramE.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/HistogramData/inc/MantidHistogramData/HistogramItem.h b/Framework/HistogramData/inc/MantidHistogramData/HistogramItem.h index c101ed474e66aa6cb947557ff6d3b31a9d055b02..e972f441c823e8809c1339afaf61359b53663a2a 100644 --- a/Framework/HistogramData/inc/MantidHistogramData/HistogramItem.h +++ b/Framework/HistogramData/inc/MantidHistogramData/HistogramItem.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/HistogramData/inc/MantidHistogramData/HistogramIterator.h b/Framework/HistogramData/inc/MantidHistogramData/HistogramIterator.h index b8709e83277d750da36796682be357c91b07424e..775a6a7198a7a19320b301dc6a427e03366e3e09 100644 --- a/Framework/HistogramData/inc/MantidHistogramData/HistogramIterator.h +++ b/Framework/HistogramData/inc/MantidHistogramData/HistogramIterator.h @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #pragma once #include "MantidHistogramData/DllConfig.h" diff --git a/Framework/HistogramData/inc/MantidHistogramData/HistogramMath.h b/Framework/HistogramData/inc/MantidHistogramData/HistogramMath.h index 58bf32d9659c236fb5d0abc50c5e6cfb9cf93c87..f62aa60313b9c3cda04ebd51e642c6f648eb836b 100644 --- a/Framework/HistogramData/inc/MantidHistogramData/HistogramMath.h +++ b/Framework/HistogramData/inc/MantidHistogramData/HistogramMath.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/HistogramData/inc/MantidHistogramData/HistogramX.h b/Framework/HistogramData/inc/MantidHistogramData/HistogramX.h index 6f1aa7e605aeb8fa5833e8ec08981d402a72a1a6..e24a8fc1da552794bf4b53b125b4357f580aa2df 100644 --- a/Framework/HistogramData/inc/MantidHistogramData/HistogramX.h +++ b/Framework/HistogramData/inc/MantidHistogramData/HistogramX.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/HistogramData/inc/MantidHistogramData/HistogramY.h b/Framework/HistogramData/inc/MantidHistogramData/HistogramY.h index b6970f6964cce73b5977b6ea197f9449235f3c20..4e46cd6c2574e7206cf118b2d9b6e7a1509952ad 100644 --- a/Framework/HistogramData/inc/MantidHistogramData/HistogramY.h +++ b/Framework/HistogramData/inc/MantidHistogramData/HistogramY.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/HistogramData/inc/MantidHistogramData/Interpolate.h b/Framework/HistogramData/inc/MantidHistogramData/Interpolate.h index 590d444d10de1f8791111c88c8dbfae3ddecf95f..4dd7fb95c2a4701d8542a80597a9ccee919b218e 100644 --- a/Framework/HistogramData/inc/MantidHistogramData/Interpolate.h +++ b/Framework/HistogramData/inc/MantidHistogramData/Interpolate.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/HistogramData/inc/MantidHistogramData/Iterable.h b/Framework/HistogramData/inc/MantidHistogramData/Iterable.h index 0cd58af4d64d6f66dbbb3842252eee1a6a12038f..bc7eef1a15ddb1798827abceba4af7803356ab1a 100644 --- a/Framework/HistogramData/inc/MantidHistogramData/Iterable.h +++ b/Framework/HistogramData/inc/MantidHistogramData/Iterable.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/HistogramData/inc/MantidHistogramData/LinearGenerator.h b/Framework/HistogramData/inc/MantidHistogramData/LinearGenerator.h index d942a28c027affc1259d5c419c827d92abef6dc7..520fece3636903f0b72473b799aff8823afe7d4e 100644 --- a/Framework/HistogramData/inc/MantidHistogramData/LinearGenerator.h +++ b/Framework/HistogramData/inc/MantidHistogramData/LinearGenerator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/HistogramData/inc/MantidHistogramData/LogarithmicGenerator.h b/Framework/HistogramData/inc/MantidHistogramData/LogarithmicGenerator.h index 3e1ded18e304bab4776c8306f4572f2c7b061eba..5be7c89230273d8f660dc2c155ffcdeaa654be0a 100644 --- a/Framework/HistogramData/inc/MantidHistogramData/LogarithmicGenerator.h +++ b/Framework/HistogramData/inc/MantidHistogramData/LogarithmicGenerator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/HistogramData/inc/MantidHistogramData/Multipliable.h b/Framework/HistogramData/inc/MantidHistogramData/Multipliable.h index 7532fb456a9a3b329fc0abf618be0fa69903f6e3..859bf3a801c1ca11eed95792da46ed73d8f7ea8d 100644 --- a/Framework/HistogramData/inc/MantidHistogramData/Multipliable.h +++ b/Framework/HistogramData/inc/MantidHistogramData/Multipliable.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/HistogramData/inc/MantidHistogramData/Offsetable.h b/Framework/HistogramData/inc/MantidHistogramData/Offsetable.h index b1efee69402ddca4cdf497a9151917412d3d30bd..e0d2dac91bf8449d626f77f434d3e21046dd115c 100644 --- a/Framework/HistogramData/inc/MantidHistogramData/Offsetable.h +++ b/Framework/HistogramData/inc/MantidHistogramData/Offsetable.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/HistogramData/inc/MantidHistogramData/PointStandardDeviations.h b/Framework/HistogramData/inc/MantidHistogramData/PointStandardDeviations.h index 6768e1dc1d468c7c9c1ad02b733c461eff30c8ed..d6f9223a9601dda5450e93872bc56516c95dce0e 100644 --- a/Framework/HistogramData/inc/MantidHistogramData/PointStandardDeviations.h +++ b/Framework/HistogramData/inc/MantidHistogramData/PointStandardDeviations.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/HistogramData/inc/MantidHistogramData/PointVariances.h b/Framework/HistogramData/inc/MantidHistogramData/PointVariances.h index a5bfd5508dbdc3564815f5cb379b3a4ffdf420ab..b6b6231c12fabf4e29d8827e5c8a0bd350631abf 100644 --- a/Framework/HistogramData/inc/MantidHistogramData/PointVariances.h +++ b/Framework/HistogramData/inc/MantidHistogramData/PointVariances.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/HistogramData/inc/MantidHistogramData/Points.h b/Framework/HistogramData/inc/MantidHistogramData/Points.h index a563bdf013750c03625e4682a548dc50c071e263..294b1517c4c52e672a405c0c90a43f06ace1ce2e 100644 --- a/Framework/HistogramData/inc/MantidHistogramData/Points.h +++ b/Framework/HistogramData/inc/MantidHistogramData/Points.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/HistogramData/inc/MantidHistogramData/QuadraticGenerator.h b/Framework/HistogramData/inc/MantidHistogramData/QuadraticGenerator.h index cf9990060c5e30e709f62d6d1e4101afd4210be9..0544b0447f0b4caf9a5a3671ecf85c42d5d84e1d 100644 --- a/Framework/HistogramData/inc/MantidHistogramData/QuadraticGenerator.h +++ b/Framework/HistogramData/inc/MantidHistogramData/QuadraticGenerator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/HistogramData/inc/MantidHistogramData/Rebin.h b/Framework/HistogramData/inc/MantidHistogramData/Rebin.h index 21ede8022855c49b76fb13da7f4cddeab51705b3..b24608d93e27422f10df2cb3547b9e46c6a66c48 100644 --- a/Framework/HistogramData/inc/MantidHistogramData/Rebin.h +++ b/Framework/HistogramData/inc/MantidHistogramData/Rebin.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/HistogramData/inc/MantidHistogramData/Scalable.h b/Framework/HistogramData/inc/MantidHistogramData/Scalable.h index 891b595475de577ae29d3f1c00d03623eb10b3c1..c900f060f748ebf4533fa8bc5af732eb91035256 100644 --- a/Framework/HistogramData/inc/MantidHistogramData/Scalable.h +++ b/Framework/HistogramData/inc/MantidHistogramData/Scalable.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/HistogramData/inc/MantidHistogramData/Slice.h b/Framework/HistogramData/inc/MantidHistogramData/Slice.h index 6cdacdde04a9432003786cba9f49826c5f85dac1..9377550993c3f4f888d5a54da533d639f93363d3 100644 --- a/Framework/HistogramData/inc/MantidHistogramData/Slice.h +++ b/Framework/HistogramData/inc/MantidHistogramData/Slice.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/HistogramData/inc/MantidHistogramData/StandardDeviationVectorOf.h b/Framework/HistogramData/inc/MantidHistogramData/StandardDeviationVectorOf.h index 3e9bc271b362e3745cb2c1c5aa81d71f6b41b333..66918bcdf96d50ffdcce1029160f4a41bcf88e82 100644 --- a/Framework/HistogramData/inc/MantidHistogramData/StandardDeviationVectorOf.h +++ b/Framework/HistogramData/inc/MantidHistogramData/StandardDeviationVectorOf.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/HistogramData/inc/MantidHistogramData/Validation.h b/Framework/HistogramData/inc/MantidHistogramData/Validation.h index 6e30ef8bd07bbaa8851acfab6ce21458f86fef4d..4bca073c6bf06b979defc5ee4ff229ac4f8cb259 100644 --- a/Framework/HistogramData/inc/MantidHistogramData/Validation.h +++ b/Framework/HistogramData/inc/MantidHistogramData/Validation.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/HistogramData/inc/MantidHistogramData/VarianceVectorOf.h b/Framework/HistogramData/inc/MantidHistogramData/VarianceVectorOf.h index 0c85b386c267d7689d25ccb49ad8d98a7786270f..cd1e4188dc0cdf0f5bd204e67e9f36767cf367b4 100644 --- a/Framework/HistogramData/inc/MantidHistogramData/VarianceVectorOf.h +++ b/Framework/HistogramData/inc/MantidHistogramData/VarianceVectorOf.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/HistogramData/inc/MantidHistogramData/VectorOf.h b/Framework/HistogramData/inc/MantidHistogramData/VectorOf.h index 80178c0a011fe293e15bd7dfa958d0d68572aa0b..241552ff4e8d57d170a42023e208ce1ece64b3cb 100644 --- a/Framework/HistogramData/inc/MantidHistogramData/VectorOf.h +++ b/Framework/HistogramData/inc/MantidHistogramData/VectorOf.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/HistogramData/inc/MantidHistogramData/XValidation.h b/Framework/HistogramData/inc/MantidHistogramData/XValidation.h index 814cbee5cd8be3372fe951c7e4a4da3e5aabddba..1ed0ed413e235799902617b8611a7895d98f1034 100644 --- a/Framework/HistogramData/inc/MantidHistogramData/XValidation.h +++ b/Framework/HistogramData/inc/MantidHistogramData/XValidation.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/HistogramData/inc/MantidHistogramData/YValidation.h b/Framework/HistogramData/inc/MantidHistogramData/YValidation.h index 9c3a94eb8a217bfe3bbd1aa2121c1427d3d40abb..329090bcdb19fd0f0cadb9350aa580ad25e94921 100644 --- a/Framework/HistogramData/inc/MantidHistogramData/YValidation.h +++ b/Framework/HistogramData/inc/MantidHistogramData/YValidation.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/HistogramData/src/BinEdges.cpp b/Framework/HistogramData/src/BinEdges.cpp index b6f36e567d97d1d4baddc36b96e344c497dc6daa..2c8fbe9980cfaa1c2c66b744843b479cf1026ab0 100644 --- a/Framework/HistogramData/src/BinEdges.cpp +++ b/Framework/HistogramData/src/BinEdges.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidHistogramData/BinEdges.h" #include "MantidHistogramData/Points.h" diff --git a/Framework/HistogramData/src/CountStandardDeviations.cpp b/Framework/HistogramData/src/CountStandardDeviations.cpp index 1e7176b294ffbaf53d37938e446d1dad7b281177..a4649516542d5712740b71328812a2591108fe4e 100644 --- a/Framework/HistogramData/src/CountStandardDeviations.cpp +++ b/Framework/HistogramData/src/CountStandardDeviations.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidHistogramData/CountStandardDeviations.h" #include "MantidHistogramData/BinEdges.h" diff --git a/Framework/HistogramData/src/CountVariances.cpp b/Framework/HistogramData/src/CountVariances.cpp index 49758778303135155eaf814d414a47de927cf5ab..b60dbae6e3b20c46c77f6ec24b0c16cd4e7d75ab 100644 --- a/Framework/HistogramData/src/CountVariances.cpp +++ b/Framework/HistogramData/src/CountVariances.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidHistogramData/CountVariances.h" #include "MantidHistogramData/BinEdges.h" diff --git a/Framework/HistogramData/src/Counts.cpp b/Framework/HistogramData/src/Counts.cpp index e3de5ea135cf570aefe874e0f4c1ea27792b9db9..de37042eca9c78096aa2bc74544cdaa51161a694 100644 --- a/Framework/HistogramData/src/Counts.cpp +++ b/Framework/HistogramData/src/Counts.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidHistogramData/Counts.h" #include "MantidHistogramData/BinEdges.h" diff --git a/Framework/HistogramData/src/EstimatePolynomial.cpp b/Framework/HistogramData/src/EstimatePolynomial.cpp index 5ba28646af6b83a890f66954d267b3ce1f27fada..db90c4e74362779f4515547b0c14585c16e10cfe 100644 --- a/Framework/HistogramData/src/EstimatePolynomial.cpp +++ b/Framework/HistogramData/src/EstimatePolynomial.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidHistogramData/EstimatePolynomial.h" #include "MantidHistogramData/HistogramY.h" diff --git a/Framework/HistogramData/src/Exception.cpp b/Framework/HistogramData/src/Exception.cpp index e6876d13e84dbe929e1e99432a6f7c7d15d42be1..8346c6bf4d98c83c156c5d9307b4fa31a6937df5 100644 --- a/Framework/HistogramData/src/Exception.cpp +++ b/Framework/HistogramData/src/Exception.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidHistogramData/Exception.h" diff --git a/Framework/HistogramData/src/Frequencies.cpp b/Framework/HistogramData/src/Frequencies.cpp index 85589542c7431dfdaad4b263732a7c48cb9a6870..72bb27d31a105d9776000b87bb4d58d9bee78495 100644 --- a/Framework/HistogramData/src/Frequencies.cpp +++ b/Framework/HistogramData/src/Frequencies.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidHistogramData/Frequencies.h" #include "MantidHistogramData/BinEdges.h" diff --git a/Framework/HistogramData/src/FrequencyStandardDeviations.cpp b/Framework/HistogramData/src/FrequencyStandardDeviations.cpp index 19111c895d887d024dde83169e9dd20e762d29e5..3a31c0fdc17b3674e1b7292b108953e46be4bcf1 100644 --- a/Framework/HistogramData/src/FrequencyStandardDeviations.cpp +++ b/Framework/HistogramData/src/FrequencyStandardDeviations.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidHistogramData/FrequencyStandardDeviations.h" #include "MantidHistogramData/BinEdges.h" diff --git a/Framework/HistogramData/src/FrequencyVariances.cpp b/Framework/HistogramData/src/FrequencyVariances.cpp index 6908cf326f3ea72c26c626b25f4d3122f2e8d652..6fbce4a84d2bb5b9f85de922281ceddf9828f1b9 100644 --- a/Framework/HistogramData/src/FrequencyVariances.cpp +++ b/Framework/HistogramData/src/FrequencyVariances.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidHistogramData/FrequencyVariances.h" #include "MantidHistogramData/BinEdges.h" diff --git a/Framework/HistogramData/src/Histogram.cpp b/Framework/HistogramData/src/Histogram.cpp index 1edcd981ed06e64a6b85a8e802414a02f834efbf..709ac6eb2af7fd22b3585d54fb990217548fb16e 100644 --- a/Framework/HistogramData/src/Histogram.cpp +++ b/Framework/HistogramData/src/Histogram.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidHistogramData/Histogram.h" #include "MantidHistogramData/HistogramIterator.h" diff --git a/Framework/HistogramData/src/HistogramBuilder.cpp b/Framework/HistogramData/src/HistogramBuilder.cpp index f38c18f01a8f948248620ea6da930444ecd131c5..cf38481c83626401032cce3007604fe79ab6d25c 100644 --- a/Framework/HistogramData/src/HistogramBuilder.cpp +++ b/Framework/HistogramData/src/HistogramBuilder.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidHistogramData/HistogramBuilder.h" diff --git a/Framework/HistogramData/src/HistogramMath.cpp b/Framework/HistogramData/src/HistogramMath.cpp index cb4bc0d2bfd25e3777446308bb84e787c320f7e1..a9daee5d26f1d4952ed32202a45380c4c7c2a67b 100644 --- a/Framework/HistogramData/src/HistogramMath.cpp +++ b/Framework/HistogramData/src/HistogramMath.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidHistogramData/HistogramMath.h" #include "MantidHistogramData/Histogram.h" diff --git a/Framework/HistogramData/src/Interpolate.cpp b/Framework/HistogramData/src/Interpolate.cpp index 32652764d64a44dca12d3d8446b1a7b5a7eeaced..461aff83e0ca778dda06846ab80eae60ca51e21d 100644 --- a/Framework/HistogramData/src/Interpolate.cpp +++ b/Framework/HistogramData/src/Interpolate.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidHistogramData/Interpolate.h" #include "MantidHistogramData/Histogram.h" diff --git a/Framework/HistogramData/src/Points.cpp b/Framework/HistogramData/src/Points.cpp index f7594249288236273c9e76f7ac7d94523e928126..ea57c68a1508ebf8e607d99cafbca12705937358 100644 --- a/Framework/HistogramData/src/Points.cpp +++ b/Framework/HistogramData/src/Points.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidHistogramData/Points.h" #include "MantidHistogramData/BinEdges.h" diff --git a/Framework/HistogramData/src/Rebin.cpp b/Framework/HistogramData/src/Rebin.cpp index 2872999bf3481658203ec76d40e2107a7d028e5d..d24f4d7064496b6d416d9428b83c71e0dfc90700 100644 --- a/Framework/HistogramData/src/Rebin.cpp +++ b/Framework/HistogramData/src/Rebin.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidHistogramData/Rebin.h" #include "MantidHistogramData/BinEdges.h" diff --git a/Framework/HistogramData/src/Slice.cpp b/Framework/HistogramData/src/Slice.cpp index 54a6aa53058adf17280fb1840c4d0bd56cce75f9..b193bc53b826fe54b7ad7c44381fb085bf4eae70 100644 --- a/Framework/HistogramData/src/Slice.cpp +++ b/Framework/HistogramData/src/Slice.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidHistogramData/Slice.h" diff --git a/Framework/HistogramData/test/AddableTest.h b/Framework/HistogramData/test/AddableTest.h index 11658b05611936be97a72553c0ef66205f5d7556..9448a65dc299df5ee46d470623aa5379ed860058 100644 --- a/Framework/HistogramData/test/AddableTest.h +++ b/Framework/HistogramData/test/AddableTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/HistogramData/test/BinEdgesTest.h b/Framework/HistogramData/test/BinEdgesTest.h index 67c8cb4d1d62374840a4fbae679e8695b9653c91..0f57999697e427f2d55ca75ce19e04c9c511518c 100644 --- a/Framework/HistogramData/test/BinEdgesTest.h +++ b/Framework/HistogramData/test/BinEdgesTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/HistogramData/test/CMakeLists.txt b/Framework/HistogramData/test/CMakeLists.txt index 9958761e00d2b1493d588c6f4aa10f6f99b29bdc..3f91b79d8e41eb5354e0e03b7a9e65cbff363126 100644 --- a/Framework/HistogramData/test/CMakeLists.txt +++ b/Framework/HistogramData/test/CMakeLists.txt @@ -1,8 +1,6 @@ if(CXXTEST_FOUND) include_directories(SYSTEM ${CXXTEST_INCLUDE_DIR} - ${GMOCK_INCLUDE_DIR} - ${GTEST_INCLUDE_DIR} ../../TestHelpers/inc) cxxtest_add_test(HistogramDataTest ${TEST_FILES} ${GMOCK_TEST_FILES}) @@ -13,8 +11,8 @@ if(CXXTEST_FOUND) ${TCMALLOC_LIBRARIES_LINKTIME} HistogramData ${Boost_LIBRARIES} - ${GMOCK_LIBRARIES} - ${GTEST_LIBRARIES}) + gmock +) add_dependencies(FrameworkTests HistogramDataTest) # Add to the 'FrameworkTests' group in VS diff --git a/Framework/HistogramData/test/CountStandardDeviationsTest.h b/Framework/HistogramData/test/CountStandardDeviationsTest.h index 93d4b645866baddcda06e7a1308d5a64271d1ce3..4da236676c4c2888e762ab7493f56aeeed1b16ac 100644 --- a/Framework/HistogramData/test/CountStandardDeviationsTest.h +++ b/Framework/HistogramData/test/CountStandardDeviationsTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -94,7 +94,6 @@ public: const BinEdges edges{1.0, 2.0}; auto old_ptr = &frequencies[0]; const CountStandardDeviations counts(std::move(frequencies), edges); - TS_ASSERT(!frequencies); TS_ASSERT_EQUALS(&counts[0], old_ptr); } @@ -104,8 +103,6 @@ public: const BinEdges edges{1.0, 2.0}; auto old_ptr = &frequencies[0]; const CountStandardDeviations counts(std::move(frequencies), edges); - // Moved from frequencies... - TS_ASSERT(!frequencies); // ... but made a copy of data, since "copy" also held a reference. TS_ASSERT_DIFFERS(&counts[0], old_ptr); } @@ -127,7 +124,6 @@ public: // This implicitly constructs FrequencyStandardDeviations first, so there is // a two-step move going on! const CountStandardDeviations counts(std::move(frequencies), edges); - TS_ASSERT(!frequencies); TS_ASSERT_EQUALS(&counts[0], old_ptr); } }; diff --git a/Framework/HistogramData/test/CountVariancesTest.h b/Framework/HistogramData/test/CountVariancesTest.h index cd309aef7fff160460da4dc09bbe559d177ad323..1ee331c55109a2c6a40e37ffb36d27d28aa44e83 100644 --- a/Framework/HistogramData/test/CountVariancesTest.h +++ b/Framework/HistogramData/test/CountVariancesTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -101,7 +101,6 @@ public: const BinEdges edges{1.0, 2.0}; auto old_ptr = &frequencies[0]; const CountVariances counts(std::move(frequencies), edges); - TS_ASSERT(!frequencies); TS_ASSERT_EQUALS(&counts[0], old_ptr); } @@ -111,8 +110,6 @@ public: const BinEdges edges{1.0, 2.0}; auto old_ptr = &frequencies[0]; const CountVariances counts(std::move(frequencies), edges); - // Moved from frequencies... - TS_ASSERT(!frequencies); // ... but made a copy of data, since "copy" also held a reference. TS_ASSERT_DIFFERS(&counts[0], old_ptr); } @@ -134,7 +131,6 @@ public: // This implicitly constructs FrequencyVariances first, so there is a // two-step move going on! const CountVariances counts(std::move(frequencies), edges); - TS_ASSERT(!frequencies); TS_ASSERT_EQUALS(&counts[0], old_ptr); } }; diff --git a/Framework/HistogramData/test/CountsTest.h b/Framework/HistogramData/test/CountsTest.h index ec1227f3f8021ba51ab035a4241009a49052add5..49725b67d754d84891064760d61f8ff99b1b1144 100644 --- a/Framework/HistogramData/test/CountsTest.h +++ b/Framework/HistogramData/test/CountsTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -97,7 +97,6 @@ public: const BinEdges edges{1.0, 2.0}; auto old_ptr = &frequencies[0]; const Counts counts(std::move(frequencies), edges); - TS_ASSERT(!frequencies); TS_ASSERT_EQUALS(&counts[0], old_ptr); } @@ -107,8 +106,6 @@ public: const BinEdges edges{1.0, 2.0}; auto old_ptr = &frequencies[0]; const Counts counts(std::move(frequencies), edges); - // Moved from frequencies... - TS_ASSERT(!frequencies); // ... but made a copy of data, since "copy" also held a reference. TS_ASSERT_DIFFERS(&counts[0], old_ptr); } diff --git a/Framework/HistogramData/test/EValidationTest.h b/Framework/HistogramData/test/EValidationTest.h index 82ae67df9b22d9b3177ff6b4cd30be9fe66efba9..9818a78fc82ec89831d28693dfac13cca6ff325c 100644 --- a/Framework/HistogramData/test/EValidationTest.h +++ b/Framework/HistogramData/test/EValidationTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/HistogramData/test/EstimatePolynomialTest.h b/Framework/HistogramData/test/EstimatePolynomialTest.h index 85e53f3f0f1a2b282ba4d17c24646547503c72a7..67b716797b09de3a0d857d23918c1c39a1eb28ec 100644 --- a/Framework/HistogramData/test/EstimatePolynomialTest.h +++ b/Framework/HistogramData/test/EstimatePolynomialTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/HistogramData/test/FixedLengthVectorTest.h b/Framework/HistogramData/test/FixedLengthVectorTest.h index d8db24200186fc2228f459e7046e4da2dd588e62..265100317db403a86a8cbbfcd8fdb772e17b9b02 100644 --- a/Framework/HistogramData/test/FixedLengthVectorTest.h +++ b/Framework/HistogramData/test/FixedLengthVectorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/HistogramData/test/FrequenciesTest.h b/Framework/HistogramData/test/FrequenciesTest.h index 26736cbc696dbd9c28fb4758c21ae2ddda85d2c0..1eb1b105bddb4a5f8ac56457ea1f7fd568331377 100644 --- a/Framework/HistogramData/test/FrequenciesTest.h +++ b/Framework/HistogramData/test/FrequenciesTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -97,7 +97,6 @@ public: const BinEdges edges{1.0, 2.0}; auto old_ptr = &counts[0]; const Frequencies frequencies(std::move(counts), edges); - TS_ASSERT(!counts); TS_ASSERT_EQUALS(&frequencies[0], old_ptr); } @@ -107,8 +106,6 @@ public: const BinEdges edges{1.0, 2.0}; auto old_ptr = &counts[0]; const Frequencies frequencies(std::move(counts), edges); - // Moved from counts... - TS_ASSERT(!counts); // ... but made a copy of data, since "copy" also held a reference. TS_ASSERT_DIFFERS(&frequencies[0], old_ptr); } diff --git a/Framework/HistogramData/test/FrequencyStandardDeviationsTest.h b/Framework/HistogramData/test/FrequencyStandardDeviationsTest.h index c9f346ba129e6b5260f28d57f8de243287cf9f92..1a1d96b4ee0a01f54d2fdc88c60a51c9f83eba13 100644 --- a/Framework/HistogramData/test/FrequencyStandardDeviationsTest.h +++ b/Framework/HistogramData/test/FrequencyStandardDeviationsTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/HistogramData/test/FrequencyVariancesTest.h b/Framework/HistogramData/test/FrequencyVariancesTest.h index 87315ad2fe6904c17b93255c02bcfab0bc25abc7..cabf615d4746d78df244300195cf2bd624f9b3c2 100644 --- a/Framework/HistogramData/test/FrequencyVariancesTest.h +++ b/Framework/HistogramData/test/FrequencyVariancesTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -104,7 +104,6 @@ public: const BinEdges edges{1.0, 2.0}; auto old_ptr = &counts[0]; const FrequencyVariances frequencies(std::move(counts), edges); - TS_ASSERT(!counts); TS_ASSERT_EQUALS(&frequencies[0], old_ptr); } @@ -114,8 +113,6 @@ public: const BinEdges edges{1.0, 2.0}; auto old_ptr = &counts[0]; const FrequencyVariances frequencies(std::move(counts), edges); - // Moved from counts... - TS_ASSERT(!counts); // ... but made a copy of data, since "copy" also held a reference. TS_ASSERT_DIFFERS(&frequencies[0], old_ptr); } @@ -137,7 +134,6 @@ public: // This implicitly constructs CountVariances first, so there is a // two-step move going on! const FrequencyVariances frequencies(std::move(counts), edges); - TS_ASSERT(!counts); TS_ASSERT_EQUALS(&frequencies[0], old_ptr); } }; diff --git a/Framework/HistogramData/test/HistogramBuilderTest.h b/Framework/HistogramData/test/HistogramBuilderTest.h index 0bce27e55b2192a1517661425b8fd16ad273b9ab..855fa8da8e412095098d67b965f80dc731d217a3 100644 --- a/Framework/HistogramData/test/HistogramBuilderTest.h +++ b/Framework/HistogramData/test/HistogramBuilderTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/HistogramData/test/HistogramDxTest.h b/Framework/HistogramData/test/HistogramDxTest.h index c53d123467aeb440c7f2803e800785688eaf3f03..a7869d8ca36add846b968256a4efd9ffe8e88c0a 100644 --- a/Framework/HistogramData/test/HistogramDxTest.h +++ b/Framework/HistogramData/test/HistogramDxTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/HistogramData/test/HistogramETest.h b/Framework/HistogramData/test/HistogramETest.h index 05a9a07c854ed06cc8918831eacac879d792e1b3..c664cde228af5aa2fa5aefca819c365209fe3238 100644 --- a/Framework/HistogramData/test/HistogramETest.h +++ b/Framework/HistogramData/test/HistogramETest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/HistogramData/test/HistogramIteratorTest.h b/Framework/HistogramData/test/HistogramIteratorTest.h index 6c3ba3043d9ffc42c48a421ff24f3e14da151b48..19d8f96ddc8791a84572abd18d361ad003d97028 100644 --- a/Framework/HistogramData/test/HistogramIteratorTest.h +++ b/Framework/HistogramData/test/HistogramIteratorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/HistogramData/test/HistogramMathTest.h b/Framework/HistogramData/test/HistogramMathTest.h index 33a5ed78be19b62f2f9e0529d13402321dc5af11..42c71bd72e1fff6892699ecb82561c069cfbeb88 100644 --- a/Framework/HistogramData/test/HistogramMathTest.h +++ b/Framework/HistogramData/test/HistogramMathTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/HistogramData/test/HistogramTest.h b/Framework/HistogramData/test/HistogramTest.h index 6b8486af028f0ae665313d630b3a8bf60b76ad84..9267d437a31550ae267bcb3cf615e8be108c3377 100644 --- a/Framework/HistogramData/test/HistogramTest.h +++ b/Framework/HistogramData/test/HistogramTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/HistogramData/test/HistogramXTest.h b/Framework/HistogramData/test/HistogramXTest.h index dd8df608bb42e13d0e8a0f30ad145bdcfce5b755..5ceb8572b8175babfd6473419469424ef489c291 100644 --- a/Framework/HistogramData/test/HistogramXTest.h +++ b/Framework/HistogramData/test/HistogramXTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/HistogramData/test/HistogramYTest.h b/Framework/HistogramData/test/HistogramYTest.h index bf53a3ad3f82273388be8e1ac796656f1fc1796a..a6b26510863307b5209488ae0597e30b20d3e2ed 100644 --- a/Framework/HistogramData/test/HistogramYTest.h +++ b/Framework/HistogramData/test/HistogramYTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/HistogramData/test/InterpolateTest.h b/Framework/HistogramData/test/InterpolateTest.h index a71c19e543d1d9a656be86a6796bdc924f9b7c4a..a96d79a659d2fcdeb10a7f29a0a7d6a453b870f6 100644 --- a/Framework/HistogramData/test/InterpolateTest.h +++ b/Framework/HistogramData/test/InterpolateTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/HistogramData/test/IterableTest.h b/Framework/HistogramData/test/IterableTest.h index 63190b48c3a2d5fa7d0b04af775dea59b0950616..85d1a7a73240fb19277e07f815841dd8ba662df0 100644 --- a/Framework/HistogramData/test/IterableTest.h +++ b/Framework/HistogramData/test/IterableTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/HistogramData/test/LinearGeneratorTest.h b/Framework/HistogramData/test/LinearGeneratorTest.h index c5b67ee8013b88d1cbeaae8ff64aaaa4b055f791..f556856c3c974ca5eec8882fe9a284f8dbe4a6a8 100644 --- a/Framework/HistogramData/test/LinearGeneratorTest.h +++ b/Framework/HistogramData/test/LinearGeneratorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/HistogramData/test/LogarithmicGeneratorTest.h b/Framework/HistogramData/test/LogarithmicGeneratorTest.h index 10ff49081bbcef4042689c6ef2d26b196bc7d92d..8c8108f9e6a3e16a0ecd5cf28853cbe7d7dee300 100644 --- a/Framework/HistogramData/test/LogarithmicGeneratorTest.h +++ b/Framework/HistogramData/test/LogarithmicGeneratorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/HistogramData/test/MultipliableTest.h b/Framework/HistogramData/test/MultipliableTest.h index ddce5c508ff5adb434157c6ef82fd725b211e9af..ed33624f3cc97ef596f8cd9468ef0ddb9ffc4780 100644 --- a/Framework/HistogramData/test/MultipliableTest.h +++ b/Framework/HistogramData/test/MultipliableTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/HistogramData/test/OffsetableTest.h b/Framework/HistogramData/test/OffsetableTest.h index 17567e2b05f4eb86cb352c0b6fe5e28d20a80613..b40ef88b8a58288c00638de87b697bd614e4916d 100644 --- a/Framework/HistogramData/test/OffsetableTest.h +++ b/Framework/HistogramData/test/OffsetableTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/HistogramData/test/PointStandardDeviationsTest.h b/Framework/HistogramData/test/PointStandardDeviationsTest.h index 99db286984df5520fce2aee96b563c1599413693..7aa0fb874026e10a8ef44de6d8e1423305fb6f47 100644 --- a/Framework/HistogramData/test/PointStandardDeviationsTest.h +++ b/Framework/HistogramData/test/PointStandardDeviationsTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/HistogramData/test/PointVariancesTest.h b/Framework/HistogramData/test/PointVariancesTest.h index 34fc7bc4f772544dd443ccb81d13dd62b3cb2afa..523472a2cb57e5c66e710c8b5dd6a718e3910de5 100644 --- a/Framework/HistogramData/test/PointVariancesTest.h +++ b/Framework/HistogramData/test/PointVariancesTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/HistogramData/test/PointsTest.h b/Framework/HistogramData/test/PointsTest.h index ca393559c378681794bf2e07d60bc38bfd2bdf5a..7cd0a56775be0a7ea2e5eb3560e77948021d841c 100644 --- a/Framework/HistogramData/test/PointsTest.h +++ b/Framework/HistogramData/test/PointsTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/HistogramData/test/QuadraticGeneratorTest.h b/Framework/HistogramData/test/QuadraticGeneratorTest.h index 48fb96a39c85b53fb0037f300a4a89e663b88718..063e6463cd60b62e884e19fb331a19c1cc5cad4b 100644 --- a/Framework/HistogramData/test/QuadraticGeneratorTest.h +++ b/Framework/HistogramData/test/QuadraticGeneratorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/HistogramData/test/RebinTest.h b/Framework/HistogramData/test/RebinTest.h index 26d2dd12184675e42e70a3178b103aa72f682253..88742b6c2015f2e956702ea26bf1811a5bb6b99c 100644 --- a/Framework/HistogramData/test/RebinTest.h +++ b/Framework/HistogramData/test/RebinTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/HistogramData/test/ScalableTest.h b/Framework/HistogramData/test/ScalableTest.h index cdf808217961ec49543b3bc96c7d41bbb19a0078..0ca129970f2779fae03e83488c42a18b24e4c361 100644 --- a/Framework/HistogramData/test/ScalableTest.h +++ b/Framework/HistogramData/test/ScalableTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/HistogramData/test/SliceTest.h b/Framework/HistogramData/test/SliceTest.h index 7968714e5b755432856e6d091d734a4810315198..af2f179965cbd35a45a666e9419e3e34c5ebcd7b 100644 --- a/Framework/HistogramData/test/SliceTest.h +++ b/Framework/HistogramData/test/SliceTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/HistogramData/test/StandardDeviationVectorOfTest.h b/Framework/HistogramData/test/StandardDeviationVectorOfTest.h index e1e445671f52365f5e9485350f64bb32f0e091a3..113209ffb93d70d3744fae9eac2c20b8bdd6c953 100644 --- a/Framework/HistogramData/test/StandardDeviationVectorOfTest.h +++ b/Framework/HistogramData/test/StandardDeviationVectorOfTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -74,7 +74,6 @@ public: VariancesTester variances{1.0, 4.0}; auto old_ptr = &variances[0]; StandardDeviationVectorOfTester sigmas(std::move(variances)); - TS_ASSERT(!variances); TS_ASSERT_EQUALS(&sigmas[0], old_ptr); TS_ASSERT_EQUALS(sigmas[0], 1.0); TS_ASSERT_EQUALS(sigmas[1], 2.0); @@ -93,7 +92,6 @@ public: auto old_ptr = &variances[0]; StandardDeviationVectorOfTester sigmas{}; sigmas = std::move(variances); - TS_ASSERT(!variances); TS_ASSERT_EQUALS(&sigmas[0], old_ptr); TS_ASSERT_EQUALS(sigmas[0], 1.0); TS_ASSERT_EQUALS(sigmas[1], 2.0); diff --git a/Framework/HistogramData/test/VarianceVectorOfTest.h b/Framework/HistogramData/test/VarianceVectorOfTest.h index 6bd830092326f36bda8bd34b55330b8400f0120a..2c58a64f541ba310f5591b327b97653b1e16db30 100644 --- a/Framework/HistogramData/test/VarianceVectorOfTest.h +++ b/Framework/HistogramData/test/VarianceVectorOfTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -70,7 +70,6 @@ public: SigmasTester sigmas{1.0, 2.0}; auto old_ptr = &sigmas[0]; VarianceVectorOfTester variances(std::move(sigmas)); - TS_ASSERT(!sigmas); TS_ASSERT_EQUALS(&variances[0], old_ptr); TS_ASSERT_EQUALS(variances[0], 1.0); TS_ASSERT_EQUALS(variances[1], 4.0); @@ -89,7 +88,6 @@ public: auto old_ptr = &sigmas[0]; VarianceVectorOfTester variances{}; variances = std::move(sigmas); - TS_ASSERT(!sigmas); TS_ASSERT_EQUALS(&variances[0], old_ptr); TS_ASSERT_EQUALS(variances[0], 1.0); TS_ASSERT_EQUALS(variances[1], 4.0); diff --git a/Framework/HistogramData/test/VectorOfTest.h b/Framework/HistogramData/test/VectorOfTest.h index ddf230ea0f04d31e1d2c7e45f1d17087bba770bc..f38e4d64c540d051b4ef59699534be748bb6e87c 100644 --- a/Framework/HistogramData/test/VectorOfTest.h +++ b/Framework/HistogramData/test/VectorOfTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -100,7 +100,6 @@ public: TS_ASSERT_EQUALS(src.size(), 2); TS_ASSERT(src); const VectorOfTester dest(std::move(src)); - TS_ASSERT(!src); TS_ASSERT_EQUALS(dest[0], 0.1); TS_ASSERT_EQUALS(dest[1], 0.1); } @@ -108,7 +107,6 @@ public: void test_move_from_null_constructor() { VectorOfTester src{}; const VectorOfTester dest(std::move(src)); - TS_ASSERT(!src); TS_ASSERT(!dest); } @@ -160,7 +158,6 @@ public: TS_ASSERT_EQUALS(dest[0], 0.0); TS_ASSERT(src); dest = std::move(src); - TS_ASSERT(!src); TS_ASSERT_EQUALS(dest[0], 0.1); TS_ASSERT_EQUALS(dest[1], 0.1); } @@ -169,7 +166,6 @@ public: VectorOfTester src{}; VectorOfTester dest(1); dest = std::move(src); - TS_ASSERT(!src); TS_ASSERT(!dest); } diff --git a/Framework/HistogramData/test/XValidationTest.h b/Framework/HistogramData/test/XValidationTest.h index 48f8024669f27dbda608c45e9ba1adc4b2d5cc12..e4dc27294e121b17069a4194e86b4a078bba50a3 100644 --- a/Framework/HistogramData/test/XValidationTest.h +++ b/Framework/HistogramData/test/XValidationTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/HistogramData/test/YValidationTest.h b/Framework/HistogramData/test/YValidationTest.h index fb51a5510b0103a4a2c3df42a7965e90f2d87e23..b01ce316622dea514253b1fa76ede098f7897ab4 100644 --- a/Framework/HistogramData/test/YValidationTest.h +++ b/Framework/HistogramData/test/YValidationTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/ICat/inc/MantidICat/CatalogAlgorithmHelper.h b/Framework/ICat/inc/MantidICat/CatalogAlgorithmHelper.h index aef08166f8a2c67c743520052368f42d29f81fd2..81d82db70101d55b44ff62abca9bce72189ce3fb 100644 --- a/Framework/ICat/inc/MantidICat/CatalogAlgorithmHelper.h +++ b/Framework/ICat/inc/MantidICat/CatalogAlgorithmHelper.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/ICat/inc/MantidICat/CatalogDownloadDataFiles.h b/Framework/ICat/inc/MantidICat/CatalogDownloadDataFiles.h index ae14754bc2a21e6ef92bc6f8243aeb6b333740ff..05e832007d1af48b85d5ba47593a5f3014b1a9d4 100644 --- a/Framework/ICat/inc/MantidICat/CatalogDownloadDataFiles.h +++ b/Framework/ICat/inc/MantidICat/CatalogDownloadDataFiles.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/ICat/inc/MantidICat/CatalogGetDataFiles.h b/Framework/ICat/inc/MantidICat/CatalogGetDataFiles.h index 20c65ccfc96c2f9cb6b172a5b6bbd590ba9db168..2a4e25edb5783c959d7aa6ecf45284f467c63581 100644 --- a/Framework/ICat/inc/MantidICat/CatalogGetDataFiles.h +++ b/Framework/ICat/inc/MantidICat/CatalogGetDataFiles.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/ICat/inc/MantidICat/CatalogGetDataSets.h b/Framework/ICat/inc/MantidICat/CatalogGetDataSets.h index bbe9850eee7d7c2e8dca7cdf98f5d8308ec16115..15220d07d685a279a6ed6107dc8977bbc5d964e5 100644 --- a/Framework/ICat/inc/MantidICat/CatalogGetDataSets.h +++ b/Framework/ICat/inc/MantidICat/CatalogGetDataSets.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/ICat/inc/MantidICat/CatalogKeepAlive.h b/Framework/ICat/inc/MantidICat/CatalogKeepAlive.h index fefcd02040bc37a4e981cb4dec521c1a7dc10c75..dbf0d2110f8404ecdfe939fd9b7e18dc54f42804 100644 --- a/Framework/ICat/inc/MantidICat/CatalogKeepAlive.h +++ b/Framework/ICat/inc/MantidICat/CatalogKeepAlive.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/ICat/inc/MantidICat/CatalogListInstruments.h b/Framework/ICat/inc/MantidICat/CatalogListInstruments.h index a4641cccc3d4d1f4e77e0e34d7fdcddfe4e674ce..26c9395024f1ff04c5c39e12f1bdd6b82371401e 100644 --- a/Framework/ICat/inc/MantidICat/CatalogListInstruments.h +++ b/Framework/ICat/inc/MantidICat/CatalogListInstruments.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/ICat/inc/MantidICat/CatalogListInvestigationTypes.h b/Framework/ICat/inc/MantidICat/CatalogListInvestigationTypes.h index 87abcffaf819ec75ccd07911c139214f61b55c36..01ab0fd6dec2a559ec9e28f82ca8ca1fcaf25838 100644 --- a/Framework/ICat/inc/MantidICat/CatalogListInvestigationTypes.h +++ b/Framework/ICat/inc/MantidICat/CatalogListInvestigationTypes.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/ICat/inc/MantidICat/CatalogLogin.h b/Framework/ICat/inc/MantidICat/CatalogLogin.h index b4235bede99588b6006b5da1cecd4e6094df64e8..d5f8be5fa84b9e62cbb5dc28a80d8341510c7bc4 100644 --- a/Framework/ICat/inc/MantidICat/CatalogLogin.h +++ b/Framework/ICat/inc/MantidICat/CatalogLogin.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/ICat/inc/MantidICat/CatalogLogout.h b/Framework/ICat/inc/MantidICat/CatalogLogout.h index 40b835f7e15bd8587e4ded1148c132906127f247..78bcacaa4007ede9b7a43f57a7121bc603ab64e5 100644 --- a/Framework/ICat/inc/MantidICat/CatalogLogout.h +++ b/Framework/ICat/inc/MantidICat/CatalogLogout.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/ICat/inc/MantidICat/CatalogMyDataSearch.h b/Framework/ICat/inc/MantidICat/CatalogMyDataSearch.h index 4950f0f0fd96c312ff0318df906483bbaff91151..c7c1aa246b73546a79d75dad88c34b64f94f3b2c 100644 --- a/Framework/ICat/inc/MantidICat/CatalogMyDataSearch.h +++ b/Framework/ICat/inc/MantidICat/CatalogMyDataSearch.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/ICat/inc/MantidICat/CatalogPublish.h b/Framework/ICat/inc/MantidICat/CatalogPublish.h index 6cfd0496038a58eae78fc28a75bd99a7be6bf297..33d8305289a3b8305174aff4c34a3d82d2fae954 100644 --- a/Framework/ICat/inc/MantidICat/CatalogPublish.h +++ b/Framework/ICat/inc/MantidICat/CatalogPublish.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/ICat/inc/MantidICat/CatalogSearch.h b/Framework/ICat/inc/MantidICat/CatalogSearch.h index f0c345490ce1a167eedf16895d72284a4a00683b..51e905e7a54cb3f8998fd09f76faa0dde18a5161 100644 --- a/Framework/ICat/inc/MantidICat/CatalogSearch.h +++ b/Framework/ICat/inc/MantidICat/CatalogSearch.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/ICat/inc/MantidICat/CatalogSearchParam.h b/Framework/ICat/inc/MantidICat/CatalogSearchParam.h index 865d3c799b6127fb75931d245aa4b723debbe157..12f2ccf0a30fc10804a25b642e545d338da4dcb5 100644 --- a/Framework/ICat/inc/MantidICat/CatalogSearchParam.h +++ b/Framework/ICat/inc/MantidICat/CatalogSearchParam.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/ICat/inc/MantidICat/GSoap/soapserializersH.h b/Framework/ICat/inc/MantidICat/GSoap/soapserializersH.h index e9ae51968590a36ce0be24a571a4c94933298f0a..d64ebde022c15e6474ff7946e7916ced6b2a964d 100644 --- a/Framework/ICat/inc/MantidICat/GSoap/soapserializersH.h +++ b/Framework/ICat/inc/MantidICat/GSoap/soapserializersH.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /* soapserializersH.h Generated by gSOAP 2.8.15 from soapserializers.h diff --git a/Framework/ICat/inc/MantidICat/GSoap/soapserializersStub.h b/Framework/ICat/inc/MantidICat/GSoap/soapserializersStub.h index 8840dcbd363a0d1d8d5425aff0ab0b476cad0fef..a4e44478ac129fe8ddc875878fa23b5bf27c68a8 100644 --- a/Framework/ICat/inc/MantidICat/GSoap/soapserializersStub.h +++ b/Framework/ICat/inc/MantidICat/GSoap/soapserializersStub.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /* soapserializersStub.h Generated by gSOAP 2.8.15 from soapserializers.h diff --git a/Framework/ICat/inc/MantidICat/GSoap/stdsoap2.h b/Framework/ICat/inc/MantidICat/GSoap/stdsoap2.h index c0c790e3d70a52501728406071b15894211323ab..1af3cc6863f4baa409545dc0d9d5f369899e5b3e 100644 --- a/Framework/ICat/inc/MantidICat/GSoap/stdsoap2.h +++ b/Framework/ICat/inc/MantidICat/GSoap/stdsoap2.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2000 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /* stdsoap2.h 2.8.15 diff --git a/Framework/ICat/inc/MantidICat/ICat3/ICat3Catalog.h b/Framework/ICat/inc/MantidICat/ICat3/ICat3Catalog.h index 11d616a528db79fc97f1819768ccbfb7f4b0a727..2eab280a04c6eeb3986e3eb32802f7c647f6f70c 100644 --- a/Framework/ICat/inc/MantidICat/ICat3/ICat3Catalog.h +++ b/Framework/ICat/inc/MantidICat/ICat3/ICat3Catalog.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/ICat/inc/MantidICat/ICat3/ICat3ErrorHandling.h b/Framework/ICat/inc/MantidICat/ICat3/ICat3ErrorHandling.h index 4b7a066224347bd95749c0cc1a4956d284ce916e..e4f8325f32161a8cb914e9cceaf7651517e826d8 100644 --- a/Framework/ICat/inc/MantidICat/ICat3/ICat3ErrorHandling.h +++ b/Framework/ICat/inc/MantidICat/ICat3/ICat3ErrorHandling.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/ICat/inc/MantidICat/ICat3/ICat3Helper.h b/Framework/ICat/inc/MantidICat/ICat3/ICat3Helper.h index 6c4a587632526067afb1af0a9eea260e2aa0f3a7..66b379805cddf08ea574bedad5f6704835bef07e 100644 --- a/Framework/ICat/inc/MantidICat/ICat3/ICat3Helper.h +++ b/Framework/ICat/inc/MantidICat/ICat3/ICat3Helper.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/ICat/inc/MantidICat/ICat4/ICat4Catalog.h b/Framework/ICat/inc/MantidICat/ICat4/ICat4Catalog.h index 593274dd2858af22ed3cc3df8f23b10b839552de..b0e5ac59b1e0141b8f07ab7aa184325b4f68c525 100644 --- a/Framework/ICat/inc/MantidICat/ICat4/ICat4Catalog.h +++ b/Framework/ICat/inc/MantidICat/ICat4/ICat4Catalog.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/ICat/inc/MantidICat/PrecompiledHeader.h b/Framework/ICat/inc/MantidICat/PrecompiledHeader.h index 3397af4475af76f13fe22c7f4e0fc77b5d789e30..f9023a95d9021d30ef7c11983486412602dcd7bb 100644 --- a/Framework/ICat/inc/MantidICat/PrecompiledHeader.h +++ b/Framework/ICat/inc/MantidICat/PrecompiledHeader.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/ICat/src/CatalogAlgorithmHelper.cpp b/Framework/ICat/src/CatalogAlgorithmHelper.cpp index dd0630d8d2f40faa12863f16c1242b17b0320b97..f374737af6a4c45428ea52d53f190f70ebe62864 100644 --- a/Framework/ICat/src/CatalogAlgorithmHelper.cpp +++ b/Framework/ICat/src/CatalogAlgorithmHelper.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidICat/CatalogAlgorithmHelper.h" diff --git a/Framework/ICat/src/CatalogDownloadDataFiles.cpp b/Framework/ICat/src/CatalogDownloadDataFiles.cpp index 847c3b6977436d2f862b5a3bc2cf16a901ca40bb..25b044713a7d64392cf1336c5c088fb6e327b035 100644 --- a/Framework/ICat/src/CatalogDownloadDataFiles.cpp +++ b/Framework/ICat/src/CatalogDownloadDataFiles.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidICat/CatalogDownloadDataFiles.h" #include "MantidAPI/CatalogManager.h" diff --git a/Framework/ICat/src/CatalogGetDataFiles.cpp b/Framework/ICat/src/CatalogGetDataFiles.cpp index dd6973fecc631f75d5cb0341a417db66279bcdc4..30748bf2316c9f0359816fa4f844829d405eb933 100644 --- a/Framework/ICat/src/CatalogGetDataFiles.cpp +++ b/Framework/ICat/src/CatalogGetDataFiles.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidICat/CatalogGetDataFiles.h" #include "MantidAPI/CatalogManager.h" diff --git a/Framework/ICat/src/CatalogGetDataSets.cpp b/Framework/ICat/src/CatalogGetDataSets.cpp index 92aebec28e6899f7eef3eea2b81aa09230b7201c..374333e2fe66174722bbd314b4a2fbfd7c5ec4e8 100644 --- a/Framework/ICat/src/CatalogGetDataSets.cpp +++ b/Framework/ICat/src/CatalogGetDataSets.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidICat/CatalogGetDataSets.h" #include "MantidAPI/CatalogManager.h" diff --git a/Framework/ICat/src/CatalogKeepAlive.cpp b/Framework/ICat/src/CatalogKeepAlive.cpp index 2cf6bdfae97e9f4e181d2f5bb03a93fab548508f..d69ea5750b333922375d37384a5769ecf2cf02c9 100644 --- a/Framework/ICat/src/CatalogKeepAlive.cpp +++ b/Framework/ICat/src/CatalogKeepAlive.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidICat/CatalogKeepAlive.h" #include "MantidAPI/CatalogManager.h" diff --git a/Framework/ICat/src/CatalogListInstruments.cpp b/Framework/ICat/src/CatalogListInstruments.cpp index 2bb1001e20732027bd7b2f5068c446158404b259..18898d46f765fd08b3f2f970fdba832f3e53c60c 100644 --- a/Framework/ICat/src/CatalogListInstruments.cpp +++ b/Framework/ICat/src/CatalogListInstruments.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidICat/CatalogListInstruments.h" #include "MantidAPI/CatalogManager.h" diff --git a/Framework/ICat/src/CatalogListInvestigationTypes.cpp b/Framework/ICat/src/CatalogListInvestigationTypes.cpp index a29e3697cc8cb7adee6de594a6375a82d9bbfbbb..ba906ffc3fe7b872336d462f4d7f52d4b1fe0549 100644 --- a/Framework/ICat/src/CatalogListInvestigationTypes.cpp +++ b/Framework/ICat/src/CatalogListInvestigationTypes.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidICat/CatalogListInvestigationTypes.h" #include "MantidAPI/CatalogManager.h" diff --git a/Framework/ICat/src/CatalogLogin.cpp b/Framework/ICat/src/CatalogLogin.cpp index ede870496038c650454efd40e6f2f9def8f3d915..d40247dda008c5d46a99962ee2a0cc7deb62cb73 100644 --- a/Framework/ICat/src/CatalogLogin.cpp +++ b/Framework/ICat/src/CatalogLogin.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidICat/CatalogLogin.h" #include "MantidAPI/AlgorithmManager.h" diff --git a/Framework/ICat/src/CatalogLogout.cpp b/Framework/ICat/src/CatalogLogout.cpp index e78fc11ef6e413f20fbffa20dcbe9e59be3b01e9..b50be1a5aae5a494b9e6d17a0fe5c2474084d68f 100644 --- a/Framework/ICat/src/CatalogLogout.cpp +++ b/Framework/ICat/src/CatalogLogout.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidICat/CatalogLogout.h" #include "MantidAPI/AlgorithmManager.h" diff --git a/Framework/ICat/src/CatalogMyDataSearch.cpp b/Framework/ICat/src/CatalogMyDataSearch.cpp index af35cad14875328ec951cc3d3eb444347eb7f845..3b03d13341a2f7b96be4638e1765160c801e2e7a 100644 --- a/Framework/ICat/src/CatalogMyDataSearch.cpp +++ b/Framework/ICat/src/CatalogMyDataSearch.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidICat/CatalogMyDataSearch.h" #include "MantidAPI/CatalogManager.h" diff --git a/Framework/ICat/src/CatalogPublish.cpp b/Framework/ICat/src/CatalogPublish.cpp index d0ba3f7f39e3db76dd47a503908040482e12ad19..397e8bcd1feefd321b3c5f20e6b42aa79ca996a5 100644 --- a/Framework/ICat/src/CatalogPublish.cpp +++ b/Framework/ICat/src/CatalogPublish.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidICat/CatalogPublish.h" #include "MantidICat/CatalogAlgorithmHelper.h" diff --git a/Framework/ICat/src/CatalogSearch.cpp b/Framework/ICat/src/CatalogSearch.cpp index 451682ac324cbc292811d3b73262a021f19f4d37..3d67dfb94d7ffe8f7843cb556666eb9a6c2f1806 100644 --- a/Framework/ICat/src/CatalogSearch.cpp +++ b/Framework/ICat/src/CatalogSearch.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #if GCC_VERSION >= 40800 // 4.8.0 GNU_DIAG_OFF("literal-suffix") diff --git a/Framework/ICat/src/CatalogSearchParam.cpp b/Framework/ICat/src/CatalogSearchParam.cpp index 61b3f48e0748c33ed40564328ec1688ddbbf775d..a799b6963e73af98754a1e9c927e94e59f7b023b 100644 --- a/Framework/ICat/src/CatalogSearchParam.cpp +++ b/Framework/ICat/src/CatalogSearchParam.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidICat/CatalogSearchParam.h" #include "MantidKernel/DateAndTime.h" diff --git a/Framework/ICat/src/GSoap.cpp b/Framework/ICat/src/GSoap.cpp index bef8d71d407ac819e32168d458be735b5445faf3..6f03b80dde3e91c0a63d9a8353404c7584fadadf 100644 --- a/Framework/ICat/src/GSoap.cpp +++ b/Framework/ICat/src/GSoap.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/WarningSuppressions.h" //------------------------------------------------------------------------------ diff --git a/Framework/ICat/src/GSoap/soapserializersC.cpp b/Framework/ICat/src/GSoap/soapserializersC.cpp index a1da8f088fb513a9e6f8aca60ffe6c6f6f261905..88733d79e74db30769c634b75f387fb9d9513f09 100644 --- a/Framework/ICat/src/GSoap/soapserializersC.cpp +++ b/Framework/ICat/src/GSoap/soapserializersC.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /* soapserializersC.cpp Generated by gSOAP 2.8.15 from soapserializers.h diff --git a/Framework/ICat/src/GSoap/stdsoap2.cpp b/Framework/ICat/src/GSoap/stdsoap2.cpp index 916119df4d201b96a5489d2e67f8184ec24bb31b..92038b1b418f24d8aaf5d8e41a354b35ac46bb6a 100644 --- a/Framework/ICat/src/GSoap/stdsoap2.cpp +++ b/Framework/ICat/src/GSoap/stdsoap2.cpp @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2000 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #include "MantidKernel/WarningSuppressions.h" // ignore warnings in gSOAP // Long-term solution is to use gSOAP as an external library or external diff --git a/Framework/ICat/src/ICat3/ICat3Catalog.cpp b/Framework/ICat/src/ICat3/ICat3Catalog.cpp index afd176d9aa4c637caa6734a59bdd42a3963b6302..0828b911ae0c731c3c89346442d2fe00e64af16a 100644 --- a/Framework/ICat/src/ICat3/ICat3Catalog.cpp +++ b/Framework/ICat/src/ICat3/ICat3Catalog.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidICat/ICat3/ICat3Catalog.h" #include "MantidAPI/AnalysisDataService.h" diff --git a/Framework/ICat/src/ICat3/ICat3ErrorHandling.cpp b/Framework/ICat/src/ICat3/ICat3ErrorHandling.cpp index 63f51dec8ba52fcd4d5a4a327d16679e9cbccc4d..8c4cc491abcbc99d8005abf76957e5b8195b5674 100644 --- a/Framework/ICat/src/ICat3/ICat3ErrorHandling.cpp +++ b/Framework/ICat/src/ICat3/ICat3ErrorHandling.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidICat/ICat3/ICat3ErrorHandling.h" #include "MantidICat/ICat3/GSoapGenerated/ICat3ICATPortBindingProxy.h" diff --git a/Framework/ICat/src/ICat3/ICat3GSoapGenerated.cpp b/Framework/ICat/src/ICat3/ICat3GSoapGenerated.cpp index 492f905c988164bfd1e2d030244bf1a0bf42c571..75b7a7ac9629f060edb7b6190e3a3609e7859aad 100644 --- a/Framework/ICat/src/ICat3/ICat3GSoapGenerated.cpp +++ b/Framework/ICat/src/ICat3/ICat3GSoapGenerated.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/WarningSuppressions.h" //------------------------------------------------------------------------------ diff --git a/Framework/ICat/src/ICat3/ICat3Helper.cpp b/Framework/ICat/src/ICat3/ICat3Helper.cpp index 01b69613d0a1d8851a5b782367e73e87e5247321..36fd74c0bdc080ec6621ae310e83ddd5b1669ad6 100644 --- a/Framework/ICat/src/ICat3/ICat3Helper.cpp +++ b/Framework/ICat/src/ICat3/ICat3Helper.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + // WorkspaceFactory include must be first otherwise you get a bizarre // Poco-related compilation error on Windows diff --git a/Framework/ICat/src/ICat4/ICat4Catalog.cpp b/Framework/ICat/src/ICat4/ICat4Catalog.cpp index 8711fc15284d58768c0d14b1c862552bdd153b24..baf14af9cfee7395918b2bf1378203520fcfcdd8 100644 --- a/Framework/ICat/src/ICat4/ICat4Catalog.cpp +++ b/Framework/ICat/src/ICat4/ICat4Catalog.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidICat/ICat4/ICat4Catalog.h" #include "MantidAPI/CatalogFactory.h" diff --git a/Framework/ICat/src/ICat4/ICat4GSoapGenerated.cpp b/Framework/ICat/src/ICat4/ICat4GSoapGenerated.cpp index 5c5c6fe461dd6e189aff39d92cad1c1a60b0d1ed..91c0a7426a1a3b9e46e0ccf7ee8d963f234bb5b7 100644 --- a/Framework/ICat/src/ICat4/ICat4GSoapGenerated.cpp +++ b/Framework/ICat/src/ICat4/ICat4GSoapGenerated.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/WarningSuppressions.h" //------------------------------------------------------------------------------ diff --git a/Framework/ICat/test/CatalogDownloadDataFilesTest.h b/Framework/ICat/test/CatalogDownloadDataFilesTest.h index 21614be2d43ca455bc68924a52007a31733b9650..04b249bd6ee34effe7fde56955337a045ced68d9 100644 --- a/Framework/ICat/test/CatalogDownloadDataFilesTest.h +++ b/Framework/ICat/test/CatalogDownloadDataFilesTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/ICat/test/CatalogGetDataFilesTest.h b/Framework/ICat/test/CatalogGetDataFilesTest.h index 6ab536d8e44b841dd8ef3c36b68901424ee81f1a..52c00378563d8ecbd94aaf8e5bde73abeb307d94 100644 --- a/Framework/ICat/test/CatalogGetDataFilesTest.h +++ b/Framework/ICat/test/CatalogGetDataFilesTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/ICat/test/CatalogGetDataSetsTest.h b/Framework/ICat/test/CatalogGetDataSetsTest.h index ef47c98ff413af63e03477ea412d1689ed29dfa1..66a7decfdd3d0f16210d1bb2bc30df2eb212e45b 100644 --- a/Framework/ICat/test/CatalogGetDataSetsTest.h +++ b/Framework/ICat/test/CatalogGetDataSetsTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/ICat/test/CatalogListInstrumentsTest.h b/Framework/ICat/test/CatalogListInstrumentsTest.h index 8764bdc55bed785d0c21ba5b6ae01ddbb5335b3f..307f93eca8e77c82892d24132b6c5f46f261dbd6 100644 --- a/Framework/ICat/test/CatalogListInstrumentsTest.h +++ b/Framework/ICat/test/CatalogListInstrumentsTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/ICat/test/CatalogListInvestigationTypesTest.h b/Framework/ICat/test/CatalogListInvestigationTypesTest.h index dcc568a85d2c83d2ff4ac8d146034882ed9fa27c..1ee863c7a7e62995df478ab5b326097fd59b6262 100644 --- a/Framework/ICat/test/CatalogListInvestigationTypesTest.h +++ b/Framework/ICat/test/CatalogListInvestigationTypesTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/ICat/test/CatalogLoginTest.h b/Framework/ICat/test/CatalogLoginTest.h index 907322afbccd7d96486c6ebf4a34fafe9e7be770..0d7c50fa13e2be67c286feba7ed30da5ad866735 100644 --- a/Framework/ICat/test/CatalogLoginTest.h +++ b/Framework/ICat/test/CatalogLoginTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/ICat/test/CatalogMyDataSearchTest.h b/Framework/ICat/test/CatalogMyDataSearchTest.h index 71a6e890d7bf33bccc8243ea98862dc41eb116ed..d8e68213e9ced18ab521b33480fd6098554495ad 100644 --- a/Framework/ICat/test/CatalogMyDataSearchTest.h +++ b/Framework/ICat/test/CatalogMyDataSearchTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/ICat/test/CatalogSearchTest.h b/Framework/ICat/test/CatalogSearchTest.h index 7f6b7c7882176171b4243016dba5bc36969b3559..54b80e7d6a5fd0989bb6d125330c462407ebbf2f 100644 --- a/Framework/ICat/test/CatalogSearchTest.h +++ b/Framework/ICat/test/CatalogSearchTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -121,16 +121,9 @@ public: if (!searchobj.isInitialized()) searchobj.initialize(); - std::string errorMsg = "Invalid value for property StartDate (string) " - "sssss" - ": Invalid Date:date format must be DD/MM/YYYY"; TS_ASSERT_THROWS(searchobj.setPropertyValue("StartDate", "sssss"), const std::invalid_argument &); - - errorMsg = "Invalid value for property EndDate (string) " - "aaaaa" - ": Invalid Date:date format must be DD/MM/YYYY"; TS_ASSERT_THROWS(searchobj.setPropertyValue("EndDate", "aaaaa"), const std::invalid_argument &); @@ -146,17 +139,8 @@ public: if (!searchobj.isInitialized()) searchobj.initialize(); - std::string errorMsg = "Invalid value for property StartDate (string) " - "39/22/2009" - ": Invalid Date:Day part of the Date parameter must " - "be between 1 and 31"; TS_ASSERT_THROWS(searchobj.setPropertyValue("StartDate", "39/22/2009"), const std::invalid_argument &); - - errorMsg = "Invalid value for property EndDate (string) " - "1/22/2009" - ": Invalid Date:Month part of the Date parameter must be " - "between 1 and 12"; TS_ASSERT_THROWS(searchobj.setPropertyValue("EndDate", "1/22/2009"), const std::invalid_argument &); diff --git a/Framework/ICat/test/CompositeCatalogTest.h b/Framework/ICat/test/CompositeCatalogTest.h index cd49928c22d000452a5474167d7546fd97bd9dbf..fcdcca885ddd22bedc167daffd7c01dca7342873 100644 --- a/Framework/ICat/test/CompositeCatalogTest.h +++ b/Framework/ICat/test/CompositeCatalogTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/ICat/test/ICatTestHelper.cpp b/Framework/ICat/test/ICatTestHelper.cpp index 67cb7830531c765494600a273a525eff58a99af2..5a7f5205acf9793f94bdc5e4d7b5c0ff9be15ddf 100644 --- a/Framework/ICat/test/ICatTestHelper.cpp +++ b/Framework/ICat/test/ICatTestHelper.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "ICatTestHelper.h" #include "MantidKernel/Logger.h" diff --git a/Framework/ICat/test/ICatTestHelper.h b/Framework/ICat/test/ICatTestHelper.h index 78c5c5e4b8301621f1fb8ab9155c783843e3f28b..09cd34e697e3ff1da1380467ac68d077b5df3b65 100644 --- a/Framework/ICat/test/ICatTestHelper.h +++ b/Framework/ICat/test/ICatTestHelper.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/ICat/test/PrecompiledHeader.h b/Framework/ICat/test/PrecompiledHeader.h index 2938ffd0a3e091e68eeb75289179e3af4211b5a3..e6fdf6551cbda585cc789772079a0760cddd669b 100644 --- a/Framework/ICat/test/PrecompiledHeader.h +++ b/Framework/ICat/test/PrecompiledHeader.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Indexing/inc/MantidIndexing/Conversion.h b/Framework/Indexing/inc/MantidIndexing/Conversion.h index 2c7d876f08c8dfa2a96d711c825e9de8a01783c7..8e5ff0a9188c27c11f967739cfa15536cd031f9a 100644 --- a/Framework/Indexing/inc/MantidIndexing/Conversion.h +++ b/Framework/Indexing/inc/MantidIndexing/Conversion.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Indexing/inc/MantidIndexing/DetectorID.h b/Framework/Indexing/inc/MantidIndexing/DetectorID.h index 241fc93caa66d6b1d7fa344e8ebaff0bafa6ce2f..c7ea2de603dfe3906bd0ce2c0639ab4baf2eea0a 100644 --- a/Framework/Indexing/inc/MantidIndexing/DetectorID.h +++ b/Framework/Indexing/inc/MantidIndexing/DetectorID.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Indexing/inc/MantidIndexing/Extract.h b/Framework/Indexing/inc/MantidIndexing/Extract.h index 0a85f8f31127e4c90c3480eb6aa74a193ae50c81..90af83af67f79f33f9e89711e91a28348b30c4c3 100644 --- a/Framework/Indexing/inc/MantidIndexing/Extract.h +++ b/Framework/Indexing/inc/MantidIndexing/Extract.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Indexing/inc/MantidIndexing/GlobalSpectrumIndex.h b/Framework/Indexing/inc/MantidIndexing/GlobalSpectrumIndex.h index d93352e3cc7407319d0eb9f1d54d2ef32a78deaa..c48dd21661a69438a2b5832c4522973051611879 100644 --- a/Framework/Indexing/inc/MantidIndexing/GlobalSpectrumIndex.h +++ b/Framework/Indexing/inc/MantidIndexing/GlobalSpectrumIndex.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Indexing/inc/MantidIndexing/Group.h b/Framework/Indexing/inc/MantidIndexing/Group.h index a5e92c063883bea44bf0bd6ee6c641cc8a8eb1ce..1e72afadc6904994479de516382c0f371dd90d2f 100644 --- a/Framework/Indexing/inc/MantidIndexing/Group.h +++ b/Framework/Indexing/inc/MantidIndexing/Group.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Indexing/inc/MantidIndexing/IndexInfo.h b/Framework/Indexing/inc/MantidIndexing/IndexInfo.h index 413bddf84dafdb4be72444bc592a5763077568f2..42392f70f58ab9f75f4d135c871c8f8290d6bbae 100644 --- a/Framework/Indexing/inc/MantidIndexing/IndexInfo.h +++ b/Framework/Indexing/inc/MantidIndexing/IndexInfo.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -87,8 +87,9 @@ public: void setSpectrumDefinitions(std::vector<SpectrumDefinition> spectrumDefinitions); - void setSpectrumDefinitions( - Kernel::cow_ptr<std::vector<SpectrumDefinition>> spectrumDefinitions); + void + setSpectrumDefinitions(const Kernel::cow_ptr<std::vector<SpectrumDefinition>> + &spectrumDefinitions); const Kernel::cow_ptr<std::vector<SpectrumDefinition>> & spectrumDefinitions() const; diff --git a/Framework/Indexing/inc/MantidIndexing/IndexSet.h b/Framework/Indexing/inc/MantidIndexing/IndexSet.h index 23f9b60029ca689702b70dbc4e4bec50606cc49f..232b9fe9b07a96c1321ec29d835464de716a870c 100644 --- a/Framework/Indexing/inc/MantidIndexing/IndexSet.h +++ b/Framework/Indexing/inc/MantidIndexing/IndexSet.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Indexing/inc/MantidIndexing/IndexType.h b/Framework/Indexing/inc/MantidIndexing/IndexType.h index dc3af359636297429370b96a5ba2527350f47503..7256da53ca46c94393db09d1550f8622c3cfefa0 100644 --- a/Framework/Indexing/inc/MantidIndexing/IndexType.h +++ b/Framework/Indexing/inc/MantidIndexing/IndexType.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Indexing/inc/MantidIndexing/LegacyConversion.h b/Framework/Indexing/inc/MantidIndexing/LegacyConversion.h index e3ed994176eca57e9ddb36ecb15458170c8754ce..03e5171fc1d5e098560cf32389ff4a9499946b8c 100644 --- a/Framework/Indexing/inc/MantidIndexing/LegacyConversion.h +++ b/Framework/Indexing/inc/MantidIndexing/LegacyConversion.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Indexing/inc/MantidIndexing/PartitionIndex.h b/Framework/Indexing/inc/MantidIndexing/PartitionIndex.h index 0f05ba844ca73d9beab23b09c14fdb79fe8b9fad..cb1d18090814313551629d89cee6f080c19e1b84 100644 --- a/Framework/Indexing/inc/MantidIndexing/PartitionIndex.h +++ b/Framework/Indexing/inc/MantidIndexing/PartitionIndex.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Indexing/inc/MantidIndexing/Partitioner.h b/Framework/Indexing/inc/MantidIndexing/Partitioner.h index 06461cd03ce154d772c67d77d4abda1835971ac9..09bce20d1d3671a5f64580785e7eaddabf39e0fe 100644 --- a/Framework/Indexing/inc/MantidIndexing/Partitioner.h +++ b/Framework/Indexing/inc/MantidIndexing/Partitioner.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Indexing/inc/MantidIndexing/RoundRobinPartitioner.h b/Framework/Indexing/inc/MantidIndexing/RoundRobinPartitioner.h index 812a9a2813ce4f2a1e58fe21f5cc250568c05c76..30fc99b1d73d6dffe6c46a6dd5d1f850cf89c0a6 100644 --- a/Framework/Indexing/inc/MantidIndexing/RoundRobinPartitioner.h +++ b/Framework/Indexing/inc/MantidIndexing/RoundRobinPartitioner.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Indexing/inc/MantidIndexing/Scatter.h b/Framework/Indexing/inc/MantidIndexing/Scatter.h index e6d6c2d27ced0cb69ff700d209706452f08cb4f9..b18b1d36bf6ed905a42928559fd5cb3e758d2d71 100644 --- a/Framework/Indexing/inc/MantidIndexing/Scatter.h +++ b/Framework/Indexing/inc/MantidIndexing/Scatter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Indexing/inc/MantidIndexing/SpectrumIndexSet.h b/Framework/Indexing/inc/MantidIndexing/SpectrumIndexSet.h index 3a0d11e864c0ab2daa8d59a1e052dbb11482ca80..9d30e6b3111841bc39e2343111a07ee26a410b7b 100644 --- a/Framework/Indexing/inc/MantidIndexing/SpectrumIndexSet.h +++ b/Framework/Indexing/inc/MantidIndexing/SpectrumIndexSet.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Indexing/inc/MantidIndexing/SpectrumNumber.h b/Framework/Indexing/inc/MantidIndexing/SpectrumNumber.h index 3e3c815b4384c61446049734b0d07fd4c50de20c..220fd5d4e465add1fec30eb72a2bf253280ec0ef 100644 --- a/Framework/Indexing/inc/MantidIndexing/SpectrumNumber.h +++ b/Framework/Indexing/inc/MantidIndexing/SpectrumNumber.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Indexing/inc/MantidIndexing/SpectrumNumberTranslator.h b/Framework/Indexing/inc/MantidIndexing/SpectrumNumberTranslator.h index 8f3e4df2fbf30fdd5393b8eb32736e21bd277818..b419760022326de7cf60ee93e7ce20c5c0cade30 100644 --- a/Framework/Indexing/inc/MantidIndexing/SpectrumNumberTranslator.h +++ b/Framework/Indexing/inc/MantidIndexing/SpectrumNumberTranslator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Indexing/src/Extract.cpp b/Framework/Indexing/src/Extract.cpp index f9302b8dd8c4bf373dcc3937c213828d859c4f26..68dea58d898aa9a230f332a2fda9c138bd6cc8f0 100644 --- a/Framework/Indexing/src/Extract.cpp +++ b/Framework/Indexing/src/Extract.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidIndexing/Extract.h" #include "MantidIndexing/IndexInfo.h" diff --git a/Framework/Indexing/src/Group.cpp b/Framework/Indexing/src/Group.cpp index dee22e54d521dfe796f5d1cf1e3c6475069f076c..f0dd73ca45ed75301f592341594c09c17c6c90b9 100644 --- a/Framework/Indexing/src/Group.cpp +++ b/Framework/Indexing/src/Group.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidIndexing/Group.h" #include "MantidIndexing/IndexInfo.h" diff --git a/Framework/Indexing/src/IndexInfo.cpp b/Framework/Indexing/src/IndexInfo.cpp index 166612fb16fba97c9eb65ef539c0d8af7d45c209..eb8e07adf815bd47741ea7d6b817bc82d6ddd70a 100644 --- a/Framework/Indexing/src/IndexInfo.cpp +++ b/Framework/Indexing/src/IndexInfo.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidIndexing/IndexInfo.h" #include "MantidIndexing/RoundRobinPartitioner.h" @@ -174,7 +174,8 @@ void IndexInfo::setSpectrumDefinitions( * indices. Validation requires access to the instrument and thus cannot be done * internally in IndexInfo, i.e., spectrum definitions must be set by hand. */ void IndexInfo::setSpectrumDefinitions( - Kernel::cow_ptr<std::vector<SpectrumDefinition>> spectrumDefinitions) { + const Kernel::cow_ptr<std::vector<SpectrumDefinition>> + &spectrumDefinitions) { if (!spectrumDefinitions || (size() != spectrumDefinitions->size())) throw std::runtime_error( "IndexInfo: Size mismatch when setting new spectrum definitions"); diff --git a/Framework/Indexing/src/LegacyConversion.cpp b/Framework/Indexing/src/LegacyConversion.cpp index 1678be778e267824387a3f18f6fe2bbf94dff358..4c445a83573ecfff969553efc74938dd5daed57a 100644 --- a/Framework/Indexing/src/LegacyConversion.cpp +++ b/Framework/Indexing/src/LegacyConversion.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidIndexing/LegacyConversion.h" diff --git a/Framework/Indexing/src/Partitioner.cpp b/Framework/Indexing/src/Partitioner.cpp index f44741530fec15def78e741eb88a8776a0eb189c..10bd29ad5fc840c9b2bf92455b9f24c513ddb712 100644 --- a/Framework/Indexing/src/Partitioner.cpp +++ b/Framework/Indexing/src/Partitioner.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidIndexing/Partitioner.h" diff --git a/Framework/Indexing/src/RoundRobinPartitioner.cpp b/Framework/Indexing/src/RoundRobinPartitioner.cpp index bbacef421945f8f48e4ee5523879c2c11412699f..557e1327c568f548fcf58b53aa34dcf7f564b777 100644 --- a/Framework/Indexing/src/RoundRobinPartitioner.cpp +++ b/Framework/Indexing/src/RoundRobinPartitioner.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidIndexing/RoundRobinPartitioner.h" diff --git a/Framework/Indexing/src/Scatter.cpp b/Framework/Indexing/src/Scatter.cpp index 629477499d41b98798779c9c8bd8646b7596cfd8..6ac0ff4aa28a79d3c935e749fae88ebd7f98dbdf 100644 --- a/Framework/Indexing/src/Scatter.cpp +++ b/Framework/Indexing/src/Scatter.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidIndexing/Scatter.h" #include "MantidIndexing/GlobalSpectrumIndex.h" diff --git a/Framework/Indexing/src/SpectrumNumberTranslator.cpp b/Framework/Indexing/src/SpectrumNumberTranslator.cpp index 6413a91ce3a726ae77e3b73ce258c2d97e52dbfc..1c24c9322332f4b7baf78a1fba8668a0b54a9e98 100644 --- a/Framework/Indexing/src/SpectrumNumberTranslator.cpp +++ b/Framework/Indexing/src/SpectrumNumberTranslator.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidIndexing/SpectrumNumberTranslator.h" diff --git a/Framework/Indexing/test/CMakeLists.txt b/Framework/Indexing/test/CMakeLists.txt index 0a532c7583c9f80649763b534078b54b89385218..08c013a3d01c064fbb74bed71d9ee651b5ed8e97 100644 --- a/Framework/Indexing/test/CMakeLists.txt +++ b/Framework/Indexing/test/CMakeLists.txt @@ -1,8 +1,7 @@ if(CXXTEST_FOUND) include_directories(SYSTEM ${CXXTEST_INCLUDE_DIR} - ${GMOCK_INCLUDE_DIR} - ${GTEST_INCLUDE_DIR}) +) include_directories(../../TestHelpers/inc) # This variable is used within the cxxtest_add_test macro to build these # helper classes into the test executable. It will go out of scope at the end @@ -16,8 +15,8 @@ if(CXXTEST_FOUND) ${MANTIDLIBS} Indexing Parallel - ${GMOCK_LIBRARIES} - ${GTEST_LIBRARIES}) + gmock +) add_dependencies(FrameworkTests IndexingTest) # Add to the 'FrameworkTests' group in VS diff --git a/Framework/Indexing/test/ConversionTest.h b/Framework/Indexing/test/ConversionTest.h index 9914dfcff5751f737e1adea43b0610384cdf80d5..4a048e99b2a08a0b0d30f8cf46329449dda720dc 100644 --- a/Framework/Indexing/test/ConversionTest.h +++ b/Framework/Indexing/test/ConversionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Indexing/test/DetectorIDTest.h b/Framework/Indexing/test/DetectorIDTest.h index 092cf8b5e2adaa299ddbfc234236eef513d02436..8a12da044786308a094ee55dd17fdb2ca8304893 100644 --- a/Framework/Indexing/test/DetectorIDTest.h +++ b/Framework/Indexing/test/DetectorIDTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Indexing/test/ExtractTest.h b/Framework/Indexing/test/ExtractTest.h index 3c7cf92e345fff9a0917f1a8cabfe445c43c0231..a503a2c5b6de1ee97ddf40353ab7a31423bd2c67 100644 --- a/Framework/Indexing/test/ExtractTest.h +++ b/Framework/Indexing/test/ExtractTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Indexing/test/GlobalSpectrumIndexTest.h b/Framework/Indexing/test/GlobalSpectrumIndexTest.h index e682c69e74ef054a4f635f50609ed399a779a078..e67dec45e3c6ebdf1e216de4fe51038751e9566c 100644 --- a/Framework/Indexing/test/GlobalSpectrumIndexTest.h +++ b/Framework/Indexing/test/GlobalSpectrumIndexTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Indexing/test/GroupTest.h b/Framework/Indexing/test/GroupTest.h index 4ca5fae5bd4d8e769cb803b9ad5a2afa45992f7d..6131f9deff52a5d579b79d89c640dedefe18efb0 100644 --- a/Framework/Indexing/test/GroupTest.h +++ b/Framework/Indexing/test/GroupTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Indexing/test/IndexInfoTest.h b/Framework/Indexing/test/IndexInfoTest.h index c291e83aa72f7f34cdc8ce1a4c3f3cdde9ec3c9e..fe3d219a815d29143a6c2d26119e150036ecfdd0 100644 --- a/Framework/Indexing/test/IndexInfoTest.h +++ b/Framework/Indexing/test/IndexInfoTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Indexing/test/IndexSetTest.h b/Framework/Indexing/test/IndexSetTest.h index 19b80336ea3fd45246ef2ba60bfadd8979c673ed..decc38f1b3c179dbeb880a5f73e6c7cb3d1c45bc 100644 --- a/Framework/Indexing/test/IndexSetTest.h +++ b/Framework/Indexing/test/IndexSetTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Indexing/test/IndexTypeTest.h b/Framework/Indexing/test/IndexTypeTest.h index a3837eab65ade9205fbd47dc42d9d318087f7f02..4ec2ca90f35dfba91c8f81924b6575fc496a3004 100644 --- a/Framework/Indexing/test/IndexTypeTest.h +++ b/Framework/Indexing/test/IndexTypeTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Indexing/test/LegacyConversionTest.h b/Framework/Indexing/test/LegacyConversionTest.h index 6b68b5b232a52355f8b9284568a4382e12d121d8..68f1762a2bcc7903b1ef3f931cbfc956d4dfe2d9 100644 --- a/Framework/Indexing/test/LegacyConversionTest.h +++ b/Framework/Indexing/test/LegacyConversionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Indexing/test/PartitionIndexTest.h b/Framework/Indexing/test/PartitionIndexTest.h index 67ba5154496941f6e60911ad2939eb4ca07e5d49..da867fd52fdea76f9703540fc68562e5eba92cf4 100644 --- a/Framework/Indexing/test/PartitionIndexTest.h +++ b/Framework/Indexing/test/PartitionIndexTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Indexing/test/PartitionerTest.h b/Framework/Indexing/test/PartitionerTest.h index 0e7a17bd5674fbf89ad4d9f48f7dd6bab5634b02..f64f74c41ae7c3061f5349ccf4225a03eb806b71 100644 --- a/Framework/Indexing/test/PartitionerTest.h +++ b/Framework/Indexing/test/PartitionerTest.h @@ -1,13 +1,15 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include <cxxtest/TestSuite.h> +#include <utility> + #include "MantidIndexing/Partitioner.h" using namespace Mantid; @@ -23,7 +25,8 @@ public: PartitionerHelper(int numberOfPartitions, const PartitionIndex partition, const MonitorStrategy monitorStrategy, std::vector<GlobalSpectrumIndex> monitors) - : Partitioner(numberOfPartitions, partition, monitorStrategy, monitors) {} + : Partitioner(numberOfPartitions, partition, monitorStrategy, + std::move(monitors)) {} private: PartitionIndex doIndexOf(const GlobalSpectrumIndex) const override { diff --git a/Framework/Indexing/test/RoundRobinPartitionerTest.h b/Framework/Indexing/test/RoundRobinPartitionerTest.h index 7b5c262b30b5d83f2c0349639abf25905950829e..94077085b35314bd57f90d6bd21df95fc5e1a6a4 100644 --- a/Framework/Indexing/test/RoundRobinPartitionerTest.h +++ b/Framework/Indexing/test/RoundRobinPartitionerTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Indexing/test/ScatterTest.h b/Framework/Indexing/test/ScatterTest.h index 280eef715f6cf6bbd3501d07d51a814294ff04ed..f9aa138815f1f6478ba212a0ed1c7feb8859f18f 100644 --- a/Framework/Indexing/test/ScatterTest.h +++ b/Framework/Indexing/test/ScatterTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Indexing/test/SpectrumIndexSetTest.h b/Framework/Indexing/test/SpectrumIndexSetTest.h index b346a6f50e8324c54834212943ef299aae5f2e58..97f3745a0ffa8b2edc453b8df290e54d99415a51 100644 --- a/Framework/Indexing/test/SpectrumIndexSetTest.h +++ b/Framework/Indexing/test/SpectrumIndexSetTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Indexing/test/SpectrumNumberTest.h b/Framework/Indexing/test/SpectrumNumberTest.h index 74a0055eb2c8e61f923361dca310bc0b5d1d2b2c..e7b5e13802e45889eb18677d71281b965d25d505 100644 --- a/Framework/Indexing/test/SpectrumNumberTest.h +++ b/Framework/Indexing/test/SpectrumNumberTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Indexing/test/SpectrumNumberTranslatorTest.h b/Framework/Indexing/test/SpectrumNumberTranslatorTest.h index ec2118b961dab23016f3c1de7105b2acaba97dbb..cb78e4fd9a9f175ea1850ad1c9b91d9444a19bb6 100644 --- a/Framework/Indexing/test/SpectrumNumberTranslatorTest.h +++ b/Framework/Indexing/test/SpectrumNumberTranslatorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/CMakeLists.txt b/Framework/Kernel/CMakeLists.txt index 923641b2c1871f70d1318dcab7e2ec1e76710790..634b2facf0751b8b2592bbdc0cd04cbff3a4d9fa 100644 --- a/Framework/Kernel/CMakeLists.txt +++ b/Framework/Kernel/CMakeLists.txt @@ -494,7 +494,7 @@ target_include_directories(Kernel SYSTEM PUBLIC ${Boost_INCLUDE_DIRS} ${POCO_INCLUDE_DIRS} ${JSONCPP_INCLUDE_DIR} PRIVATE ${NEXUS_INCLUDE_DIR} ${GSL_INCLUDE_DIR} - ${OPENSSL_INCLUDE_DIR} ${SPAN_INCLUDE_DIR}) + ${OPENSSL_INCLUDE_DIR}) if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") set_target_properties(Kernel PROPERTIES INSTALL_RPATH "@loader_path/../MacOS;@loader_path/../Frameworks") @@ -522,7 +522,9 @@ target_link_libraries(Kernel ${TCMALLOC_LIBRARIES_LINKTIME} ${GSL_LIBRARIES} ${MANTIDLIBS} - ${NETWORK_LIBRARIES}) + ${NETWORK_LIBRARIES} + span + ) if(WIN32) target_link_libraries(Kernel LINK_PRIVATE Psapi.lib) # For memory usage # queries diff --git a/Framework/Kernel/inc/MantidKernel/ArrayBoundedValidator.h b/Framework/Kernel/inc/MantidKernel/ArrayBoundedValidator.h index cfec1b32149ca0bc25cc45f395b82735ec9862df..077d54907bd85907e65f3f3ac3e1983d16fbe3f5 100644 --- a/Framework/Kernel/inc/MantidKernel/ArrayBoundedValidator.h +++ b/Framework/Kernel/inc/MantidKernel/ArrayBoundedValidator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/ArrayLengthValidator.h b/Framework/Kernel/inc/MantidKernel/ArrayLengthValidator.h index ebba64928685d99e5457c353c4b7574a4362d695..8c0c8cb0f93e306476f7b8e8517b6cf1cc5d1db7 100644 --- a/Framework/Kernel/inc/MantidKernel/ArrayLengthValidator.h +++ b/Framework/Kernel/inc/MantidKernel/ArrayLengthValidator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/ArrayOrderedPairsValidator.h b/Framework/Kernel/inc/MantidKernel/ArrayOrderedPairsValidator.h index 34609e99512d5d1e82c97201c8e9b8bac9f1def9..db360bbec8d3cee996806a77cb95849687bf0339 100644 --- a/Framework/Kernel/inc/MantidKernel/ArrayOrderedPairsValidator.h +++ b/Framework/Kernel/inc/MantidKernel/ArrayOrderedPairsValidator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/ArrayProperty.h b/Framework/Kernel/inc/MantidKernel/ArrayProperty.h index fe7832a5a0b20e3eb751418d49082c9fbfe94760..1dff3f72ca932500b88bdc6b0870b53912451654 100644 --- a/Framework/Kernel/inc/MantidKernel/ArrayProperty.h +++ b/Framework/Kernel/inc/MantidKernel/ArrayProperty.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -28,16 +28,18 @@ namespace Kernel { template <typename T> class DLLExport ArrayProperty : public PropertyWithValue<std::vector<T>> { public: - ArrayProperty(std::string name, std::vector<T> vec, - IValidator_sptr validator = IValidator_sptr(new NullValidator), + ArrayProperty( + const std::string &name, std::vector<T> vec, + const IValidator_sptr &validator = IValidator_sptr(new NullValidator), + const unsigned int direction = Direction::Input); + ArrayProperty(const std::string &name, const IValidator_sptr &validator, const unsigned int direction = Direction::Input); - ArrayProperty(std::string name, IValidator_sptr validator, - const unsigned int direction = Direction::Input); - ArrayProperty(std::string name, - const unsigned int direction = Direction::Input); - ArrayProperty(std::string name, const std::string &values, - IValidator_sptr validator = IValidator_sptr(new NullValidator), + ArrayProperty(const std::string &name, const unsigned int direction = Direction::Input); + ArrayProperty( + const std::string &name, const std::string &values, + const IValidator_sptr &validator = IValidator_sptr(new NullValidator), + const unsigned int direction = Direction::Input); ArrayProperty<T> *clone() const override; diff --git a/Framework/Kernel/inc/MantidKernel/Atom.h b/Framework/Kernel/inc/MantidKernel/Atom.h index 1312f7446ee2696f40a5fdeba0b2a3061b9a7d73..43a557378af6a207e6f99f98c4234248fb992e59 100644 --- a/Framework/Kernel/inc/MantidKernel/Atom.h +++ b/Framework/Kernel/inc/MantidKernel/Atom.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/BinFinder.h b/Framework/Kernel/inc/MantidKernel/BinFinder.h index 2e6e880538f9abba0c77eb02c0c96a8703657810..5aa6915754da2b340ca3a6028c85ffb24fb3595b 100644 --- a/Framework/Kernel/inc/MantidKernel/BinFinder.h +++ b/Framework/Kernel/inc/MantidKernel/BinFinder.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/BinaryFile.h b/Framework/Kernel/inc/MantidKernel/BinaryFile.h index 9137fa2f68eb33e249ee8f82fbc412c04aa76d48..b42914f7bb4ccb0585bad55ad3b461f2fafba545 100644 --- a/Framework/Kernel/inc/MantidKernel/BinaryFile.h +++ b/Framework/Kernel/inc/MantidKernel/BinaryFile.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/BinaryStreamReader.h b/Framework/Kernel/inc/MantidKernel/BinaryStreamReader.h index 847569d990f64db0e7683ce9c2d16f22230b917e..1c26d8fc95dfa6f56165c493946f4e5a3a6a8fd9 100644 --- a/Framework/Kernel/inc/MantidKernel/BinaryStreamReader.h +++ b/Framework/Kernel/inc/MantidKernel/BinaryStreamReader.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once //------------------------------------------------------------------------------ diff --git a/Framework/Kernel/inc/MantidKernel/BinaryStreamWriter.h b/Framework/Kernel/inc/MantidKernel/BinaryStreamWriter.h index 19cf8440e2a8f4be6ade2283e2a64ae65df1cfda..fc4ec42cc710b6cf63da4cb199abfa081d95f446 100644 --- a/Framework/Kernel/inc/MantidKernel/BinaryStreamWriter.h +++ b/Framework/Kernel/inc/MantidKernel/BinaryStreamWriter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once //------------------------------------------------------------------------------ diff --git a/Framework/Kernel/inc/MantidKernel/BoundedValidator.h b/Framework/Kernel/inc/MantidKernel/BoundedValidator.h index 1ce7f6af94320548703e290afbbf801264f44491..92e86638a5bece110c530bea78663e557a2f03bf 100644 --- a/Framework/Kernel/inc/MantidKernel/BoundedValidator.h +++ b/Framework/Kernel/inc/MantidKernel/BoundedValidator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/CPUTimer.h b/Framework/Kernel/inc/MantidKernel/CPUTimer.h index 03560c19d1f1ccb84ff8075911e5830e9d486143..fcd6e6703fb61ab810d9fdb54009fe3a8ff7b3e5 100644 --- a/Framework/Kernel/inc/MantidKernel/CPUTimer.h +++ b/Framework/Kernel/inc/MantidKernel/CPUTimer.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/Cache.h b/Framework/Kernel/inc/MantidKernel/Cache.h index 8678c193d50f9e31c6a3e763bf56d95801087632..868ed920c7a70125ccc19e93b2aba7804e2621a1 100644 --- a/Framework/Kernel/inc/MantidKernel/Cache.h +++ b/Framework/Kernel/inc/MantidKernel/Cache.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/CaseInsensitiveMap.h b/Framework/Kernel/inc/MantidKernel/CaseInsensitiveMap.h index d0f02fd9c5b98c20e9a931aeb7aa2a0ac6fb37ad..1dd9e3e8b082095bf840d68b071f30bcd4bd4cd5 100644 --- a/Framework/Kernel/inc/MantidKernel/CaseInsensitiveMap.h +++ b/Framework/Kernel/inc/MantidKernel/CaseInsensitiveMap.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/CatalogInfo.h b/Framework/Kernel/inc/MantidKernel/CatalogInfo.h index 812b3f7baa32dd56ef26f9c1b80d8be5a50b3371..c598c4e45c8a159e4a258d789de848d8b685b372 100644 --- a/Framework/Kernel/inc/MantidKernel/CatalogInfo.h +++ b/Framework/Kernel/inc/MantidKernel/CatalogInfo.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/Chainable.h b/Framework/Kernel/inc/MantidKernel/Chainable.h index 584ab9c6ee2c0e3fe69be2be3f321dffd39d0801..bec6ce9a26fc8164f4b0feadb63c047219a4e993 100644 --- a/Framework/Kernel/inc/MantidKernel/Chainable.h +++ b/Framework/Kernel/inc/MantidKernel/Chainable.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/ChainableFactory.h b/Framework/Kernel/inc/MantidKernel/ChainableFactory.h index 559d4593ac94afd92c7f6dc5ccb1e181011b14c8..1b355866ca9dfb97d13bb394f7acb7b8cd94c56b 100644 --- a/Framework/Kernel/inc/MantidKernel/ChainableFactory.h +++ b/Framework/Kernel/inc/MantidKernel/ChainableFactory.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/ChecksumHelper.h b/Framework/Kernel/inc/MantidKernel/ChecksumHelper.h index 0bbf0eb40da30e70062353d75f50a391ba49c36c..c892492a83c5ab95f1aa81b10b4459db7f566159 100644 --- a/Framework/Kernel/inc/MantidKernel/ChecksumHelper.h +++ b/Framework/Kernel/inc/MantidKernel/ChecksumHelper.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/CompositeValidator.h b/Framework/Kernel/inc/MantidKernel/CompositeValidator.h index 8ede2c19a4f2999982d20cced42cab74bf84ccbd..539762d4fe4c590b7189bc57b03804d58069f4bd 100644 --- a/Framework/Kernel/inc/MantidKernel/CompositeValidator.h +++ b/Framework/Kernel/inc/MantidKernel/CompositeValidator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -41,7 +41,7 @@ public: /// Clones this and the children into a new Validator IValidator_sptr clone() const override; /// Adds a validator to the group of validators to check - void add(IValidator_sptr child); + void add(const IValidator_sptr &child); /// Add a validator based on a template type. Useful for validators that need /// no arguments template <typename T> void add() { this->add(boost::make_shared<T>()); } diff --git a/Framework/Kernel/inc/MantidKernel/ComputeResourceInfo.h b/Framework/Kernel/inc/MantidKernel/ComputeResourceInfo.h index d11f73f1a1d3236290879c49618635f527fa3449..e87af3f7aa84daa14dcac1952dfb60edc397a147 100644 --- a/Framework/Kernel/inc/MantidKernel/ComputeResourceInfo.h +++ b/Framework/Kernel/inc/MantidKernel/ComputeResourceInfo.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/ConfigObserver.h b/Framework/Kernel/inc/MantidKernel/ConfigObserver.h index f11597f00f6d2274376ccb3f8984093382ec4450..2b7b6c83bded0479026c9a3c4ac79f131e1b25e3 100644 --- a/Framework/Kernel/inc/MantidKernel/ConfigObserver.h +++ b/Framework/Kernel/inc/MantidKernel/ConfigObserver.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "ConfigService.h" diff --git a/Framework/Kernel/inc/MantidKernel/ConfigPropertyObserver.h b/Framework/Kernel/inc/MantidKernel/ConfigPropertyObserver.h index 1fda11589d57597627d51564d899a5339770d2ed..3901e8269be1e854029fd57faa5c1daf37ae066c 100644 --- a/Framework/Kernel/inc/MantidKernel/ConfigPropertyObserver.h +++ b/Framework/Kernel/inc/MantidKernel/ConfigPropertyObserver.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "ConfigObserver.h" diff --git a/Framework/Kernel/inc/MantidKernel/ConfigService.h b/Framework/Kernel/inc/MantidKernel/ConfigService.h index 51dd8b0f1595e88b708db0808488e1d19f9214ab..d874805ab8691d0fbbd5b5ec1a6d6a6614fd64d8 100644 --- a/Framework/Kernel/inc/MantidKernel/ConfigService.h +++ b/Framework/Kernel/inc/MantidKernel/ConfigService.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/DataItem.h b/Framework/Kernel/inc/MantidKernel/DataItem.h index 81d3801b468beabcf320a40be811728c81f258e6..32d9f54c744ae5456fedce986c5ee75561bf6d95 100644 --- a/Framework/Kernel/inc/MantidKernel/DataItem.h +++ b/Framework/Kernel/inc/MantidKernel/DataItem.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/DataService.h b/Framework/Kernel/inc/MantidKernel/DataService.h index 9fd929a190dcc023db0a311444fbf6ecb9f6604a..3ea27ba2529758eb059d8fcf9f29b4f8a2751beb 100644 --- a/Framework/Kernel/inc/MantidKernel/DataService.h +++ b/Framework/Kernel/inc/MantidKernel/DataService.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/DateAndTime.h b/Framework/Kernel/inc/MantidKernel/DateAndTime.h index f6945e8074025dcc9b4c9938cf2f01b61c9e6b2f..9a40c066b857e72f147784a95a69abf71d842300 100644 --- a/Framework/Kernel/inc/MantidKernel/DateAndTime.h +++ b/Framework/Kernel/inc/MantidKernel/DateAndTime.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/DateAndTimeHelpers.h b/Framework/Kernel/inc/MantidKernel/DateAndTimeHelpers.h index 846fcc2fca549909f95d3761adf5385c32eb9a8c..18f51990b7847c728d4bb726c72adefbc56d229d 100644 --- a/Framework/Kernel/inc/MantidKernel/DateAndTimeHelpers.h +++ b/Framework/Kernel/inc/MantidKernel/DateAndTimeHelpers.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/DateTimeValidator.h b/Framework/Kernel/inc/MantidKernel/DateTimeValidator.h index f9fbdc3616388fdc45a81d992753159710cf205d..3752d0c257487280e0193e804c2ae07f0a81546d 100644 --- a/Framework/Kernel/inc/MantidKernel/DateTimeValidator.h +++ b/Framework/Kernel/inc/MantidKernel/DateTimeValidator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/DateValidator.h b/Framework/Kernel/inc/MantidKernel/DateValidator.h index ad9f8f8ad016ea721268d28e76bc3c09a6399f57..9ae0f9194e1dd424fbc93c2990848a1e9353f68e 100644 --- a/Framework/Kernel/inc/MantidKernel/DateValidator.h +++ b/Framework/Kernel/inc/MantidKernel/DateValidator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/DeltaEMode.h b/Framework/Kernel/inc/MantidKernel/DeltaEMode.h index 614454b68875f13917cf4a9a773a02b21f499dc5..47c81e14897c3eb282f44498875b22305e0d385f 100644 --- a/Framework/Kernel/inc/MantidKernel/DeltaEMode.h +++ b/Framework/Kernel/inc/MantidKernel/DeltaEMode.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/Diffraction.h b/Framework/Kernel/inc/MantidKernel/Diffraction.h index ce2826cdf7787c7cb6fbb75f55436c16f3190466..a75c1f0e910896d0bb35e1fe91d0b513bcfd3e04 100644 --- a/Framework/Kernel/inc/MantidKernel/Diffraction.h +++ b/Framework/Kernel/inc/MantidKernel/Diffraction.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/DirectoryValidator.h b/Framework/Kernel/inc/MantidKernel/DirectoryValidator.h index d4abfb7c114a847aa6333325f5a938170d1ab7a6..7310af1ce6d0d9c2667c270b6399ee013f84e30d 100644 --- a/Framework/Kernel/inc/MantidKernel/DirectoryValidator.h +++ b/Framework/Kernel/inc/MantidKernel/DirectoryValidator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/DiskBuffer.h b/Framework/Kernel/inc/MantidKernel/DiskBuffer.h index 9ceb90d00ff123a0c1c7fd0a1ce9c137f574e844..419f4f4477c45ede5e61f11540816f77e404afbb 100644 --- a/Framework/Kernel/inc/MantidKernel/DiskBuffer.h +++ b/Framework/Kernel/inc/MantidKernel/DiskBuffer.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/DllConfig.h b/Framework/Kernel/inc/MantidKernel/DllConfig.h index 50f181a490ba82e1d830542fbb0afe7c347f8256..14c3fb0743dbd586c6a4e6ff0914b047b904cee6 100644 --- a/Framework/Kernel/inc/MantidKernel/DllConfig.h +++ b/Framework/Kernel/inc/MantidKernel/DllConfig.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/DllOpen.h b/Framework/Kernel/inc/MantidKernel/DllOpen.h index 48c8ef4b38a755c9ea7578a9fd11cbb6fa98c734..eaaee62b7963a74e0ef335213dff6a2462f16322 100644 --- a/Framework/Kernel/inc/MantidKernel/DllOpen.h +++ b/Framework/Kernel/inc/MantidKernel/DllOpen.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/DocumentationHeader.h b/Framework/Kernel/inc/MantidKernel/DocumentationHeader.h index 23e9cdfb61781f5ae4a1ff7330716e8cb4d3f1e0..bf2586272035956c92f81e1cf0ef7bf917097857 100644 --- a/Framework/Kernel/inc/MantidKernel/DocumentationHeader.h +++ b/Framework/Kernel/inc/MantidKernel/DocumentationHeader.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/DynamicFactory.h b/Framework/Kernel/inc/MantidKernel/DynamicFactory.h index 4b4b587f58690ee1f572b52e5e90095f6dbe4360..b1159fc3438faa1b7c87495b64524fe3c2574181 100644 --- a/Framework/Kernel/inc/MantidKernel/DynamicFactory.h +++ b/Framework/Kernel/inc/MantidKernel/DynamicFactory.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/EigenConversionHelpers.h b/Framework/Kernel/inc/MantidKernel/EigenConversionHelpers.h index 27d8d766950d6af292705805f6796635f0222b74..a334fe5d929edf44c736f75984158a124ce143c4 100644 --- a/Framework/Kernel/inc/MantidKernel/EigenConversionHelpers.h +++ b/Framework/Kernel/inc/MantidKernel/EigenConversionHelpers.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/EmptyValues.h b/Framework/Kernel/inc/MantidKernel/EmptyValues.h index 6af182cf92982a6158f293091a8cde4f2a9ea746..dafaf87e4b82c62c080cde4cdd13fc4e22d7aceb 100644 --- a/Framework/Kernel/inc/MantidKernel/EmptyValues.h +++ b/Framework/Kernel/inc/MantidKernel/EmptyValues.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/EnabledWhenProperty.h b/Framework/Kernel/inc/MantidKernel/EnabledWhenProperty.h index afc040eb48918cc5f824a1b86d2fbe89078e3c8b..963aac8d6fa299081c29cfe968b3ae8aac497836 100644 --- a/Framework/Kernel/inc/MantidKernel/EnabledWhenProperty.h +++ b/Framework/Kernel/inc/MantidKernel/EnabledWhenProperty.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/EnvironmentHistory.h b/Framework/Kernel/inc/MantidKernel/EnvironmentHistory.h index 2777f48ec4ee16d8c2f20e0fb64ac7e47201c7a1..8fa53aa6bb5a9b68568bf86bb184bff444b38cf4 100644 --- a/Framework/Kernel/inc/MantidKernel/EnvironmentHistory.h +++ b/Framework/Kernel/inc/MantidKernel/EnvironmentHistory.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/EqualBinsChecker.h b/Framework/Kernel/inc/MantidKernel/EqualBinsChecker.h index 0a77ecfcad1f0ceff44161a8ca0388c045f1cee3..945bead3eaef2d5ab507027e724b6d64fef9d5e3 100644 --- a/Framework/Kernel/inc/MantidKernel/EqualBinsChecker.h +++ b/Framework/Kernel/inc/MantidKernel/EqualBinsChecker.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/ErrorReporter.h b/Framework/Kernel/inc/MantidKernel/ErrorReporter.h index cbd3351e21484aaed965ff072126912718fe3e0e..40369730102dfeafec1707ae3cb34e6973d81f31 100644 --- a/Framework/Kernel/inc/MantidKernel/ErrorReporter.h +++ b/Framework/Kernel/inc/MantidKernel/ErrorReporter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -21,16 +21,21 @@ namespace Kernel { class MANTID_KERNEL_DLL ErrorReporter { public: /// Constructor - ErrorReporter(std::string application, Types::Core::time_duration startTime, - std::string exitCode, bool share); + ErrorReporter(const std::string &application, + const Types::Core::time_duration &startTime, + const std::string &exitCode, bool share); /// Constructor - ErrorReporter(std::string application, Types::Core::time_duration startTime, - std::string exitCode, bool share, std::string name, - std::string email, std::string textBox); + ErrorReporter(const std::string &application, + const Types::Core::time_duration &startTime, + const std::string &exitCode, bool share, + const std::string &name, const std::string &email, + const std::string &textBox); /// Constructor - ErrorReporter(std::string application, Types::Core::time_duration startTime, - std::string exitCode, bool share, std::string name, - std::string email, std::string textBox, std::string stacktrace); + ErrorReporter(const std::string &application, + const Types::Core::time_duration &startTime, + const std::string &exitCode, bool share, + const std::string &name, const std::string &email, + const std::string &textBox, const std::string &stacktrace); /// Sends an error report int sendErrorReport(); diff --git a/Framework/Kernel/inc/MantidKernel/Exception.h b/Framework/Kernel/inc/MantidKernel/Exception.h index 8d7de3f1058f93a366082080a24ea31fba75d1cf..c814282e60ea57ed3b1901d213849c738bd202fb 100644 --- a/Framework/Kernel/inc/MantidKernel/Exception.h +++ b/Framework/Kernel/inc/MantidKernel/Exception.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/FacilityInfo.h b/Framework/Kernel/inc/MantidKernel/FacilityInfo.h index fad7dc81db7276edb49857a174150f51ddedcfb3..d7f3761f6339fe19858c2dfe41417411c92fb117 100644 --- a/Framework/Kernel/inc/MantidKernel/FacilityInfo.h +++ b/Framework/Kernel/inc/MantidKernel/FacilityInfo.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/Fast_Exponential.h b/Framework/Kernel/inc/MantidKernel/Fast_Exponential.h index 0cdf9751537fadb2030ddefee65b8b7e024fc912..0274fe57a91b38cac846fb18847efb4641c35b56 100644 --- a/Framework/Kernel/inc/MantidKernel/Fast_Exponential.h +++ b/Framework/Kernel/inc/MantidKernel/Fast_Exponential.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/FileDescriptor.h b/Framework/Kernel/inc/MantidKernel/FileDescriptor.h index a6ed1bd79ed7f06f37b6e75da90e6d410a1dcfcc..33740ec059fd51dc79c4b60133f7e66246199cec 100644 --- a/Framework/Kernel/inc/MantidKernel/FileDescriptor.h +++ b/Framework/Kernel/inc/MantidKernel/FileDescriptor.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/FileValidator.h b/Framework/Kernel/inc/MantidKernel/FileValidator.h index 40c23981b9fa326c0fcf3ab4c1125e596cfe4267..f648adeecefe7d53a532e54da643f9567507514e 100644 --- a/Framework/Kernel/inc/MantidKernel/FileValidator.h +++ b/Framework/Kernel/inc/MantidKernel/FileValidator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/FilteredTimeSeriesProperty.h b/Framework/Kernel/inc/MantidKernel/FilteredTimeSeriesProperty.h index f8162136db1677df6a4f043b4840913c6d589930..247b86caa4798b9b2d99c527c5174e488290eb8f 100644 --- a/Framework/Kernel/inc/MantidKernel/FilteredTimeSeriesProperty.h +++ b/Framework/Kernel/inc/MantidKernel/FilteredTimeSeriesProperty.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/FloatingPointComparison.h b/Framework/Kernel/inc/MantidKernel/FloatingPointComparison.h index ce6ab78dfed6d230ed5ed532e0e8e73c0f8f645f..72810f09bb0acb2aff5d414c7b940bceecac6e31 100644 --- a/Framework/Kernel/inc/MantidKernel/FloatingPointComparison.h +++ b/Framework/Kernel/inc/MantidKernel/FloatingPointComparison.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/FreeBlock.h b/Framework/Kernel/inc/MantidKernel/FreeBlock.h index e937dffaa7b080354031b9ea093f11f2b57df17a..2f7a859e7e82e03bb2e2c687ab8d1adc61d42aab 100644 --- a/Framework/Kernel/inc/MantidKernel/FreeBlock.h +++ b/Framework/Kernel/inc/MantidKernel/FreeBlock.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/FunctionTask.h b/Framework/Kernel/inc/MantidKernel/FunctionTask.h index 8975c93051fa79b4cc2c4653577a0983e741abc3..6d0d2a849faa75e0d55f913ba0b953d1a485ff7e 100644 --- a/Framework/Kernel/inc/MantidKernel/FunctionTask.h +++ b/Framework/Kernel/inc/MantidKernel/FunctionTask.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -13,6 +13,8 @@ #ifndef Q_MOC_RUN #include <boost/function.hpp> +#include <utility> + #endif namespace Mantid { @@ -61,7 +63,7 @@ public: * @param cost :: computational cost */ FunctionTask(std::function<void()> func, double cost = 1.0) - : Task(cost), m_voidFunc(func) {} + : Task(cost), m_voidFunc(std::move(func)) {} //--------------------------------------------------------------------------------------------- /** Main method that performs the work for the task. */ diff --git a/Framework/Kernel/inc/MantidKernel/GitHubApiHelper.h.in b/Framework/Kernel/inc/MantidKernel/GitHubApiHelper.h.in index 9a1384a2f8616d09ff4318cebf0555b8802be262..aa3a30e578df7ee413113fd10e23db1f9cf5193e 100644 --- a/Framework/Kernel/inc/MantidKernel/GitHubApiHelper.h.in +++ b/Framework/Kernel/inc/MantidKernel/GitHubApiHelper.h.in @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/Glob.h b/Framework/Kernel/inc/MantidKernel/Glob.h index 870a908ce46b383aa5e20655283266d6b21730b7..5d831997dc9f1fb3d25cfec9fb1b3f52d40165c9 100644 --- a/Framework/Kernel/inc/MantidKernel/Glob.h +++ b/Framework/Kernel/inc/MantidKernel/Glob.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/ICatalogInfo.h b/Framework/Kernel/inc/MantidKernel/ICatalogInfo.h index 23aa12258994cccef07c66421afce950ea3d31e5..7ec3541662d3983a5b785329480b48d08d46d1b0 100644 --- a/Framework/Kernel/inc/MantidKernel/ICatalogInfo.h +++ b/Framework/Kernel/inc/MantidKernel/ICatalogInfo.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/INode.h b/Framework/Kernel/inc/MantidKernel/INode.h index ed44ebcf5a83c642a39a5331a2d391b699b83d59..5212655f56cfec3a5e59a978de8b374c0851dae5 100644 --- a/Framework/Kernel/inc/MantidKernel/INode.h +++ b/Framework/Kernel/inc/MantidKernel/INode.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/IPropertyManager.h b/Framework/Kernel/inc/MantidKernel/IPropertyManager.h index b7e1089c00f08e5bff7d68d24c1501836bc3d6ad..84a2cdf9e24ff286c4617711f0f3fcf76f0b8a65 100644 --- a/Framework/Kernel/inc/MantidKernel/IPropertyManager.h +++ b/Framework/Kernel/inc/MantidKernel/IPropertyManager.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/IPropertySettings.h b/Framework/Kernel/inc/MantidKernel/IPropertySettings.h index 250574e35547697c377b0e8e83b32a7686e846c8..788b11ffbfc6961660276b2cae22a0aff5f4aa94 100644 --- a/Framework/Kernel/inc/MantidKernel/IPropertySettings.h +++ b/Framework/Kernel/inc/MantidKernel/IPropertySettings.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/ISaveable.h b/Framework/Kernel/inc/MantidKernel/ISaveable.h index 4b45a284851328b680c8c35ce777da0b521636e3..f2924c30bb24524396939109fd16b8abb952b1a7 100644 --- a/Framework/Kernel/inc/MantidKernel/ISaveable.h +++ b/Framework/Kernel/inc/MantidKernel/ISaveable.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/ITimeSeriesProperty.h b/Framework/Kernel/inc/MantidKernel/ITimeSeriesProperty.h index d7bf44bac003f51e7633ce6fb00427c2be61725d..08f5c58b9646388b10dec75b43b1c03c45a01bb8 100644 --- a/Framework/Kernel/inc/MantidKernel/ITimeSeriesProperty.h +++ b/Framework/Kernel/inc/MantidKernel/ITimeSeriesProperty.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/IValidator.h b/Framework/Kernel/inc/MantidKernel/IValidator.h index 9e2108a043af3a7d4807e29c12584d7237b6e2cb..e013b74634e24e6303881673416bf53508d21818 100644 --- a/Framework/Kernel/inc/MantidKernel/IValidator.h +++ b/Framework/Kernel/inc/MantidKernel/IValidator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/IndexSet.h b/Framework/Kernel/inc/MantidKernel/IndexSet.h index 5dac14c2f294f6fa5e2361b1e6e43ff66949f213..461ffc193b020f0efb1ecf296876ff135c37c56e 100644 --- a/Framework/Kernel/inc/MantidKernel/IndexSet.h +++ b/Framework/Kernel/inc/MantidKernel/IndexSet.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -27,7 +27,7 @@ class MANTID_KERNEL_DLL IndexSet { public: IndexSet(size_t fullRange); IndexSet(int64_t min, int64_t max, size_t fullRange); - IndexSet(const std::vector<size_t> indices, size_t fullRange); + IndexSet(const std::vector<size_t> &indices, size_t fullRange); /// Returns the size of the set. size_t size() const { return m_size; } diff --git a/Framework/Kernel/inc/MantidKernel/Instantiator.h b/Framework/Kernel/inc/MantidKernel/Instantiator.h index 5ecce08a0450763b8d2dd8cdec02bb4dfd182bca..6c10fd5e8ec1b7dc0d0f58a5e1a0b7f5144f712c 100644 --- a/Framework/Kernel/inc/MantidKernel/Instantiator.h +++ b/Framework/Kernel/inc/MantidKernel/Instantiator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/InstrumentInfo.h b/Framework/Kernel/inc/MantidKernel/InstrumentInfo.h index 3c982650d51be7272813a6e4540bfaebdca921de..269dcf7b1331efac1aa12b48acc6a3b5b7cabacc 100644 --- a/Framework/Kernel/inc/MantidKernel/InstrumentInfo.h +++ b/Framework/Kernel/inc/MantidKernel/InstrumentInfo.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/InternetHelper.h b/Framework/Kernel/inc/MantidKernel/InternetHelper.h index 7716b02678378f45c36c5191d92cf981bca37b92..0d53214b6841ebd5f9cb4d6d291f38380df7aa00 100644 --- a/Framework/Kernel/inc/MantidKernel/InternetHelper.h +++ b/Framework/Kernel/inc/MantidKernel/InternetHelper.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/Interpolation.h b/Framework/Kernel/inc/MantidKernel/Interpolation.h index 753a9ca5d70a61a8e78036b93bb45a89ddf81e21..e22547703ebc4f6468ac336a070d6032c50c35b1 100644 --- a/Framework/Kernel/inc/MantidKernel/Interpolation.h +++ b/Framework/Kernel/inc/MantidKernel/Interpolation.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/InvisibleProperty.h b/Framework/Kernel/inc/MantidKernel/InvisibleProperty.h index 4060ef0faee7b5c5d181ef9c0e243fda9f694362..fdc4c3a8b33e90f1508469158fe5c3187e4ecbab 100644 --- a/Framework/Kernel/inc/MantidKernel/InvisibleProperty.h +++ b/Framework/Kernel/inc/MantidKernel/InvisibleProperty.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/LibraryManager.h b/Framework/Kernel/inc/MantidKernel/LibraryManager.h index 450194d3497149f946049c6eaeeb4bcd6b394e9e..5dcc8d064654be7ae540884372a934c275456f7b 100644 --- a/Framework/Kernel/inc/MantidKernel/LibraryManager.h +++ b/Framework/Kernel/inc/MantidKernel/LibraryManager.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/LibraryWrapper.h b/Framework/Kernel/inc/MantidKernel/LibraryWrapper.h index 286f00dbb10fcb3d3bca76b8ef24f10c3dd00212..101ecf6656274a45c6f4e3ff4dd9cb1e53e4a26d 100644 --- a/Framework/Kernel/inc/MantidKernel/LibraryWrapper.h +++ b/Framework/Kernel/inc/MantidKernel/LibraryWrapper.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/ListValidator.h b/Framework/Kernel/inc/MantidKernel/ListValidator.h index 4087dd04b0333c9bf52d50e65a792e423be5348c..1497b9644e003d03f94a5161a96ec81317d93179 100644 --- a/Framework/Kernel/inc/MantidKernel/ListValidator.h +++ b/Framework/Kernel/inc/MantidKernel/ListValidator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/LiveListenerInfo.h b/Framework/Kernel/inc/MantidKernel/LiveListenerInfo.h index ea825cd54ee6e81f3a7d7f36f5d72e8640a7be1c..a2d86328bd89731c6e176b26eac9a910654d331b 100644 --- a/Framework/Kernel/inc/MantidKernel/LiveListenerInfo.h +++ b/Framework/Kernel/inc/MantidKernel/LiveListenerInfo.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/LogFilter.h b/Framework/Kernel/inc/MantidKernel/LogFilter.h index 7fa44e69bdfb60664ae3efa20223308f4833c478..f93b69c34c1377250189861542973c54a7d8d8f8 100644 --- a/Framework/Kernel/inc/MantidKernel/LogFilter.h +++ b/Framework/Kernel/inc/MantidKernel/LogFilter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/LogParser.h b/Framework/Kernel/inc/MantidKernel/LogParser.h index 40e956864a0f721cff321c5c437eeee79b7b19e9..e32dcff709b60ae64da5d31237320e17938744a9 100644 --- a/Framework/Kernel/inc/MantidKernel/LogParser.h +++ b/Framework/Kernel/inc/MantidKernel/LogParser.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/Logger.h b/Framework/Kernel/inc/MantidKernel/Logger.h index 5f3e4c96a8b2a19c5c2fa662f404c5dc1eda2959..00a72f9da2cfa9d48831f094391114a2f59b2940 100644 --- a/Framework/Kernel/inc/MantidKernel/Logger.h +++ b/Framework/Kernel/inc/MantidKernel/Logger.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/MDAxisValidator.h b/Framework/Kernel/inc/MantidKernel/MDAxisValidator.h index 041dc3720cac39d906d8878da357ade2e68ecea3..d86c7379b2a50768d37df33ef142d8c42ef41d6e 100644 --- a/Framework/Kernel/inc/MantidKernel/MDAxisValidator.h +++ b/Framework/Kernel/inc/MantidKernel/MDAxisValidator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/MDUnit.h b/Framework/Kernel/inc/MantidKernel/MDUnit.h index 47ad7a893cb570f5f03d869b58215c33f366ef82..b0ee882bbe661293ce38655754d8a8a7562bc061 100644 --- a/Framework/Kernel/inc/MantidKernel/MDUnit.h +++ b/Framework/Kernel/inc/MantidKernel/MDUnit.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/MDUnitFactory.h b/Framework/Kernel/inc/MantidKernel/MDUnitFactory.h index 2c2baad3aaea8fdc2d0f042072aaa928ba8f4e97..5d9c4da1d0d27a3627368d28486ec9782f98d68c 100644 --- a/Framework/Kernel/inc/MantidKernel/MDUnitFactory.h +++ b/Framework/Kernel/inc/MantidKernel/MDUnitFactory.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/MRUList.h b/Framework/Kernel/inc/MantidKernel/MRUList.h index 4e03b7294ba5444c6488a43a807a63dd3d882f74..243fb01ccca3b728360ec13d989d20bc849ca3b6 100644 --- a/Framework/Kernel/inc/MantidKernel/MRUList.h +++ b/Framework/Kernel/inc/MantidKernel/MRUList.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/MagneticIon.h b/Framework/Kernel/inc/MantidKernel/MagneticIon.h index 0bca56a9294db20d9dfe4f275e016c5947511989..5e3aaac3663305f59684bc8a2897b668251125b8 100644 --- a/Framework/Kernel/inc/MantidKernel/MagneticIon.h +++ b/Framework/Kernel/inc/MantidKernel/MagneticIon.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/MandatoryValidator.h b/Framework/Kernel/inc/MantidKernel/MandatoryValidator.h index 37ce83994d563a9e46f7985c8bb2bf5dc7564185..5811260763a8139cb3d0a288fe498bbaaa8a26ed 100644 --- a/Framework/Kernel/inc/MantidKernel/MandatoryValidator.h +++ b/Framework/Kernel/inc/MantidKernel/MandatoryValidator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/MantidVersion.h b/Framework/Kernel/inc/MantidKernel/MantidVersion.h index 5fd636774f578c866b15d06523f4a585c4ddc992..1bc3f38d96fd58ef5b232647034190da963cad5c 100644 --- a/Framework/Kernel/inc/MantidKernel/MantidVersion.h +++ b/Framework/Kernel/inc/MantidKernel/MantidVersion.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/MaskedProperty.h b/Framework/Kernel/inc/MantidKernel/MaskedProperty.h index feab9fb08953a79ef9667c1f8d96c0260eb92dd5..b64a0cfb602f932bb12d687a0fac8e814d5c96dc 100644 --- a/Framework/Kernel/inc/MantidKernel/MaskedProperty.h +++ b/Framework/Kernel/inc/MantidKernel/MaskedProperty.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -28,9 +28,10 @@ template <typename TYPE = std::string> class MaskedProperty : public Kernel::PropertyWithValue<TYPE> { public: /// Constructor with a validator - MaskedProperty(const std::string &name, TYPE defaultvalue, - IValidator_sptr validator = IValidator_sptr(new NullValidator), - const unsigned int direction = Direction::Input); + MaskedProperty( + const std::string &name, TYPE defaultvalue, + const IValidator_sptr &validator = IValidator_sptr(new NullValidator), + const unsigned int direction = Direction::Input); /// Constructor with a validator without validation MaskedProperty(const std::string &name, const TYPE &defaultvalue, const unsigned int direction); diff --git a/Framework/Kernel/inc/MantidKernel/Material.h b/Framework/Kernel/inc/MantidKernel/Material.h index cecca5bf7f9a3619d207d0014a917e3e32fd466f..f6e2702f76ced95cb5a7e22a52885d988130c6b9 100644 --- a/Framework/Kernel/inc/MantidKernel/Material.h +++ b/Framework/Kernel/inc/MantidKernel/Material.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -58,7 +58,8 @@ public: using ChemicalFormula = std::vector<FormulaUnit>; - static ChemicalFormula parseChemicalFormula(const std::string chemicalSymbol); + static ChemicalFormula + parseChemicalFormula(const std::string &chemicalSymbol); /// Default constructor. Required for other parts of the code to /// function correctly. The material is considered "empty" diff --git a/Framework/Kernel/inc/MantidKernel/MaterialBuilder.h b/Framework/Kernel/inc/MantidKernel/MaterialBuilder.h index 1c32c9c30115f096192b6229a979a7118edad451..9a4cb2e654207d0910951e66851aa927cc066ccd 100644 --- a/Framework/Kernel/inc/MantidKernel/MaterialBuilder.h +++ b/Framework/Kernel/inc/MantidKernel/MaterialBuilder.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/MaterialXMLParser.h b/Framework/Kernel/inc/MantidKernel/MaterialXMLParser.h index f2b7c10c1dbe75edf64ce9f94a6aa9052ebfefee..aca27293b2c277cbeae00573ae7d34b8590d11de 100644 --- a/Framework/Kernel/inc/MantidKernel/MaterialXMLParser.h +++ b/Framework/Kernel/inc/MantidKernel/MaterialXMLParser.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/Math/ChebyshevPolyFit.h b/Framework/Kernel/inc/MantidKernel/Math/ChebyshevPolyFit.h index 66bf4c9a26a80391308a23757e41397248cbef3d..005ba8b1f7eeee6d47f5433c3e641702a5c47ff4 100644 --- a/Framework/Kernel/inc/MantidKernel/Math/ChebyshevPolyFit.h +++ b/Framework/Kernel/inc/MantidKernel/Math/ChebyshevPolyFit.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/Math/Distributions/ChebyshevPolynomial.h b/Framework/Kernel/inc/MantidKernel/Math/Distributions/ChebyshevPolynomial.h index 3db443994fb2b190740b7ff1867d5e3e0da15773..cef3eb71150ad4a758aba4869ef0e4358ffd1172 100644 --- a/Framework/Kernel/inc/MantidKernel/Math/Distributions/ChebyshevPolynomial.h +++ b/Framework/Kernel/inc/MantidKernel/Math/Distributions/ChebyshevPolynomial.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/Math/Distributions/ChebyshevSeries.h b/Framework/Kernel/inc/MantidKernel/Math/Distributions/ChebyshevSeries.h index 4629ffd5a7aacf389e6b9c141e1ec6d25f7666fe..0623272b47537f52fa492c9b40c20344a956273d 100644 --- a/Framework/Kernel/inc/MantidKernel/Math/Distributions/ChebyshevSeries.h +++ b/Framework/Kernel/inc/MantidKernel/Math/Distributions/ChebyshevSeries.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/Math/Optimization/SLSQPMinimizer.h b/Framework/Kernel/inc/MantidKernel/Math/Optimization/SLSQPMinimizer.h index 40971d3bc13d898f78984917b583d43eb333d93a..7a4ffa7692a2cbb6858808d75074b29f67d40d34 100644 --- a/Framework/Kernel/inc/MantidKernel/Math/Optimization/SLSQPMinimizer.h +++ b/Framework/Kernel/inc/MantidKernel/Math/Optimization/SLSQPMinimizer.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/Matrix.h b/Framework/Kernel/inc/MantidKernel/Matrix.h index 05de6f42292fc70605691b3a25a61f36df7beafb..28093fb45dc027f6bbfcefee38703637e7c168f4 100644 --- a/Framework/Kernel/inc/MantidKernel/Matrix.h +++ b/Framework/Kernel/inc/MantidKernel/Matrix.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/MatrixProperty.h b/Framework/Kernel/inc/MantidKernel/MatrixProperty.h index 2656fe8b34abff930047ad2abbbe509eeac07bff..d840b9e35efa871e9c042907b98fd260089cd302 100644 --- a/Framework/Kernel/inc/MantidKernel/MatrixProperty.h +++ b/Framework/Kernel/inc/MantidKernel/MatrixProperty.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -23,9 +23,10 @@ class MatrixProperty : public PropertyWithValue<Matrix<TYPE>> { public: /// Constructor - MatrixProperty(const std::string &propName, - IValidator_sptr validator = IValidator_sptr(new NullValidator), - unsigned int direction = Direction::Input); + MatrixProperty( + const std::string &propName, + const IValidator_sptr &validator = IValidator_sptr(new NullValidator), + unsigned int direction = Direction::Input); /// Copy constructor MatrixProperty(const MatrixProperty &rhs); // Unhide base class members (at minimum, avoids Intel compiler warning) diff --git a/Framework/Kernel/inc/MantidKernel/Memory.h b/Framework/Kernel/inc/MantidKernel/Memory.h index 8e6d98c07a0eb20be801d16baa5bff49a9cfeb9d..7e1a94399e1661cbb54286210f0d5aac879919c5 100644 --- a/Framework/Kernel/inc/MantidKernel/Memory.h +++ b/Framework/Kernel/inc/MantidKernel/Memory.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/MersenneTwister.h b/Framework/Kernel/inc/MantidKernel/MersenneTwister.h index 1217df7ca428e56982108eebc4e2678ff62f766d..5c560e3a379f185374f9c645121997a0764d3021 100644 --- a/Framework/Kernel/inc/MantidKernel/MersenneTwister.h +++ b/Framework/Kernel/inc/MantidKernel/MersenneTwister.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/MultiFileNameParser.h b/Framework/Kernel/inc/MantidKernel/MultiFileNameParser.h index 74be41f6d53fa7e45c99d3daaf2820f0ad1e078e..e74da3293f4afafe5e9eda71df1304cffb7d289a 100644 --- a/Framework/Kernel/inc/MantidKernel/MultiFileNameParser.h +++ b/Framework/Kernel/inc/MantidKernel/MultiFileNameParser.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/MultiFileValidator.h b/Framework/Kernel/inc/MantidKernel/MultiFileValidator.h index 9781f37456e53a01ed77160ec94f150c2397a3ab..349464da4f423a88b26322fc0cd8fbe26c71f6f0 100644 --- a/Framework/Kernel/inc/MantidKernel/MultiFileValidator.h +++ b/Framework/Kernel/inc/MantidKernel/MultiFileValidator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/MultiThreaded.h b/Framework/Kernel/inc/MantidKernel/MultiThreaded.h index 21c847cefe14669c4bf9c9828baa82898e2586ad..a57632dbe830e836abecae0816a62d9a25285875 100644 --- a/Framework/Kernel/inc/MantidKernel/MultiThreaded.h +++ b/Framework/Kernel/inc/MantidKernel/MultiThreaded.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/NDPseudoRandomNumberGenerator.h b/Framework/Kernel/inc/MantidKernel/NDPseudoRandomNumberGenerator.h index c25319bdf6f936d0a797fc4897dd8cd16a64f5fd..7cd998ab0b90fdc368f24b0a0b485531ee15ded6 100644 --- a/Framework/Kernel/inc/MantidKernel/NDPseudoRandomNumberGenerator.h +++ b/Framework/Kernel/inc/MantidKernel/NDPseudoRandomNumberGenerator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/NDRandomNumberGenerator.h b/Framework/Kernel/inc/MantidKernel/NDRandomNumberGenerator.h index 366c21f921286f4a1ed40cf0c520290f8735090e..7655604512d30e82abead6daa467811c5aaad7b8 100644 --- a/Framework/Kernel/inc/MantidKernel/NDRandomNumberGenerator.h +++ b/Framework/Kernel/inc/MantidKernel/NDRandomNumberGenerator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/NearestNeighbours.h b/Framework/Kernel/inc/MantidKernel/NearestNeighbours.h index a67c020321d0f08838a085ff858e5dce658ccbc7..b8a3c2f3375f997237eadc428b71d582834f7a51 100644 --- a/Framework/Kernel/inc/MantidKernel/NearestNeighbours.h +++ b/Framework/Kernel/inc/MantidKernel/NearestNeighbours.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/NetworkProxy.h b/Framework/Kernel/inc/MantidKernel/NetworkProxy.h index ce7b55dd28d119a94f4224c6593a4f0c49cb3be1..d3e4ad80a1fb34f81159958d2ba714bb3b489bf1 100644 --- a/Framework/Kernel/inc/MantidKernel/NetworkProxy.h +++ b/Framework/Kernel/inc/MantidKernel/NetworkProxy.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/NeutronAtom.h b/Framework/Kernel/inc/MantidKernel/NeutronAtom.h index b85ce97063a71a6968e2917ea46cf2483bbf5f42..930f326bceca3a0f9f2a8e6ebf148888c65dc2a7 100644 --- a/Framework/Kernel/inc/MantidKernel/NeutronAtom.h +++ b/Framework/Kernel/inc/MantidKernel/NeutronAtom.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/NexusDescriptor.h b/Framework/Kernel/inc/MantidKernel/NexusDescriptor.h index a58ea0c36c2865c131a83ba7ab0fe2b24e994939..40830564ed2a0472a5985e4b2a295b7669b02728 100644 --- a/Framework/Kernel/inc/MantidKernel/NexusDescriptor.h +++ b/Framework/Kernel/inc/MantidKernel/NexusDescriptor.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/NullValidator.h b/Framework/Kernel/inc/MantidKernel/NullValidator.h index c44fbe0f49e872caa01e0029513a605640aa9525..f8614ad408b10f9d00940498d95c3a92c901866b 100644 --- a/Framework/Kernel/inc/MantidKernel/NullValidator.h +++ b/Framework/Kernel/inc/MantidKernel/NullValidator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/OptionalBool.h b/Framework/Kernel/inc/MantidKernel/OptionalBool.h index 6ae3643a174729cf6639284d156272fa25409038..3188ac5097c4d54ca8fa5e749bf7baf908f6d0a1 100644 --- a/Framework/Kernel/inc/MantidKernel/OptionalBool.h +++ b/Framework/Kernel/inc/MantidKernel/OptionalBool.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/ParaViewVersion.h b/Framework/Kernel/inc/MantidKernel/ParaViewVersion.h index 74f31700ba909066f1c81e1745588d95c23b6e3c..0343cbe8deee3ea03b776893c38c158e141f76fe 100644 --- a/Framework/Kernel/inc/MantidKernel/ParaViewVersion.h +++ b/Framework/Kernel/inc/MantidKernel/ParaViewVersion.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/PhysicalConstants.h b/Framework/Kernel/inc/MantidKernel/PhysicalConstants.h index a7a23be643b039598e7e8af9f88c128cf4d19a66..88e08b0387238ac87847cca19a053198bcd8c5c3 100644 --- a/Framework/Kernel/inc/MantidKernel/PhysicalConstants.h +++ b/Framework/Kernel/inc/MantidKernel/PhysicalConstants.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/PocoVersion.h.in b/Framework/Kernel/inc/MantidKernel/PocoVersion.h.in index a38aa1859206dcad1f47921e04e61688b5c0a0aa..766a65b80d93c6a8f1b7a9d94ad87db7a1ccb5be 100644 --- a/Framework/Kernel/inc/MantidKernel/PocoVersion.h.in +++ b/Framework/Kernel/inc/MantidKernel/PocoVersion.h.in @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/PrecompiledHeader.h b/Framework/Kernel/inc/MantidKernel/PrecompiledHeader.h index 130209d1919f6e11a40e541c424a4b0445c69a8d..7fd158630ba50526d1baf2383900e5575f3252d4 100644 --- a/Framework/Kernel/inc/MantidKernel/PrecompiledHeader.h +++ b/Framework/Kernel/inc/MantidKernel/PrecompiledHeader.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/ProgressBase.h b/Framework/Kernel/inc/MantidKernel/ProgressBase.h index 6bd788f28b52f8b3dbccda73297960be1aac8da8..5e82ca36473ba9acd0cf76098baf5e0cc83a287d 100644 --- a/Framework/Kernel/inc/MantidKernel/ProgressBase.h +++ b/Framework/Kernel/inc/MantidKernel/ProgressBase.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/Property.h b/Framework/Kernel/inc/MantidKernel/Property.h index 13c601faf788bde8d947953121beb44568e44960..e876eddb39406c9a0026ee2058dbf51fa6b00984 100644 --- a/Framework/Kernel/inc/MantidKernel/Property.h +++ b/Framework/Kernel/inc/MantidKernel/Property.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/PropertyHelper.h b/Framework/Kernel/inc/MantidKernel/PropertyHelper.h index bebd0dc1e2e9ccb42ac3af736afa77ee58942090..0596e4e7b6a623860aedfeb6ac88bbba4f090ff1 100644 --- a/Framework/Kernel/inc/MantidKernel/PropertyHelper.h +++ b/Framework/Kernel/inc/MantidKernel/PropertyHelper.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/PropertyHistory.h b/Framework/Kernel/inc/MantidKernel/PropertyHistory.h index bf21d6f9d230e6839f367e53e849f6534c303388..27f55cef58fb55a35decb300c8e10cb789682e8b 100644 --- a/Framework/Kernel/inc/MantidKernel/PropertyHistory.h +++ b/Framework/Kernel/inc/MantidKernel/PropertyHistory.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/PropertyManager.h b/Framework/Kernel/inc/MantidKernel/PropertyManager.h index b7d4c451c0ccc5d9d2455e4e17e4f6f4f5e88b2b..3314b5d9253e6ef7eaac07e84d48baafcb654b64 100644 --- a/Framework/Kernel/inc/MantidKernel/PropertyManager.h +++ b/Framework/Kernel/inc/MantidKernel/PropertyManager.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/PropertyManagerDataService.h b/Framework/Kernel/inc/MantidKernel/PropertyManagerDataService.h index f4ddf8f162aa1d061ab679a25b7a81150f5c9fb0..e9a164f9eb1f7c5a4925f0a024aab11b9fa00d8e 100644 --- a/Framework/Kernel/inc/MantidKernel/PropertyManagerDataService.h +++ b/Framework/Kernel/inc/MantidKernel/PropertyManagerDataService.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/PropertyManagerOwner.h b/Framework/Kernel/inc/MantidKernel/PropertyManagerOwner.h index e6073af8edc9a24b09670e2e7fccd9519fbb2105..6717abcc771193d456a5970b07f03941ef69e643 100644 --- a/Framework/Kernel/inc/MantidKernel/PropertyManagerOwner.h +++ b/Framework/Kernel/inc/MantidKernel/PropertyManagerOwner.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/PropertyManagerProperty.h b/Framework/Kernel/inc/MantidKernel/PropertyManagerProperty.h index 8971f3e22776ff3c6cc6d33eec54b4bee556037b..6cc3e84d621d44eebba57ca9068ac1d76ad72e4c 100644 --- a/Framework/Kernel/inc/MantidKernel/PropertyManagerProperty.h +++ b/Framework/Kernel/inc/MantidKernel/PropertyManagerProperty.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/PropertyManager_fwd.h b/Framework/Kernel/inc/MantidKernel/PropertyManager_fwd.h index 0616c83cba9a0552988e15dd700655c2d01d3d17..431d34e6ec6c31535029c51477318e1befeafb37 100644 --- a/Framework/Kernel/inc/MantidKernel/PropertyManager_fwd.h +++ b/Framework/Kernel/inc/MantidKernel/PropertyManager_fwd.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/PropertyNexus.h b/Framework/Kernel/inc/MantidKernel/PropertyNexus.h index bdb99f445c64c00076998f6ee2f8d2e538f4ed27..50f3c0b5cf1ef9a30ceb150374933555cce7b2a2 100644 --- a/Framework/Kernel/inc/MantidKernel/PropertyNexus.h +++ b/Framework/Kernel/inc/MantidKernel/PropertyNexus.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/PropertyWithValue.h b/Framework/Kernel/inc/MantidKernel/PropertyWithValue.h index 6463e02ae5c1a44a085f859f7551cc62b9510dff..5a2dc17558165abbccb4cb3c08a8acbed7a493b2 100644 --- a/Framework/Kernel/inc/MantidKernel/PropertyWithValue.h +++ b/Framework/Kernel/inc/MantidKernel/PropertyWithValue.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -37,12 +37,12 @@ namespace Kernel { template <typename TYPE> class DLLExport PropertyWithValue : public Property { public: PropertyWithValue( - std::string name, TYPE defaultValue, + const std::string &name, TYPE defaultValue, IValidator_sptr validator = IValidator_sptr(new NullValidator), const unsigned int direction = Direction::Input); - PropertyWithValue(std::string name, TYPE defaultValue, + PropertyWithValue(const std::string &name, TYPE defaultValue, const unsigned int direction); - PropertyWithValue(std::string name, TYPE defaultValue, + PropertyWithValue(const std::string &name, TYPE defaultValue, const std::string &defaultValueStr, IValidator_sptr validator, const unsigned int direction); PropertyWithValue(const PropertyWithValue<TYPE> &right); diff --git a/Framework/Kernel/inc/MantidKernel/PropertyWithValue.tcc b/Framework/Kernel/inc/MantidKernel/PropertyWithValue.tcc index 5737cb220ab420510815b5ad7e1d2d3297a03e27..1d2befbb731cbbae61e1058f732020a6e2578e33 100644 --- a/Framework/Kernel/inc/MantidKernel/PropertyWithValue.tcc +++ b/Framework/Kernel/inc/MantidKernel/PropertyWithValue.tcc @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/PropertyWithValue.h" @@ -42,7 +42,8 @@ namespace Kernel { * or Direction::InOut (Input & Output) property */ template <typename TYPE> -PropertyWithValue<TYPE>::PropertyWithValue(std::string name, TYPE defaultValue, +PropertyWithValue<TYPE>::PropertyWithValue(const std::string &name, + TYPE defaultValue, IValidator_sptr validator, unsigned int direction) : Property(std::move(name), typeid(TYPE), direction), m_value(defaultValue), @@ -56,7 +57,8 @@ PropertyWithValue<TYPE>::PropertyWithValue(std::string name, TYPE defaultValue, * or Direction::InOut (Input & Output) property */ template <typename TYPE> -PropertyWithValue<TYPE>::PropertyWithValue(std::string name, TYPE defaultValue, +PropertyWithValue<TYPE>::PropertyWithValue(const std::string &name, + TYPE defaultValue, unsigned int direction) : Property(std::move(name), typeid(TYPE), direction), m_value(defaultValue), m_initialValue(std::move(defaultValue)), @@ -77,7 +79,8 @@ PropertyWithValue<TYPE>::PropertyWithValue(std::string name, TYPE defaultValue, * or Direction::InOut (Input & Output) property */ template <typename TYPE> -PropertyWithValue<TYPE>::PropertyWithValue(std::string name, TYPE defaultValue, +PropertyWithValue<TYPE>::PropertyWithValue(const std::string &name, + TYPE defaultValue, const std::string &defaultValueStr, IValidator_sptr validator, unsigned int direction) diff --git a/Framework/Kernel/inc/MantidKernel/PropertyWithValueJSON.h b/Framework/Kernel/inc/MantidKernel/PropertyWithValueJSON.h index eecfe6ec6f205ad2d4467c7d744114f3895bbc65..9b89aaec62de711df693c0aba3517d52f2bb511b 100644 --- a/Framework/Kernel/inc/MantidKernel/PropertyWithValueJSON.h +++ b/Framework/Kernel/inc/MantidKernel/PropertyWithValueJSON.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/ProxyInfo.h b/Framework/Kernel/inc/MantidKernel/ProxyInfo.h index dcbda927744385ff28ceb50c0b48c969712ffa94..2714a9182b9b9f5a50756981298e60c871e5de90 100644 --- a/Framework/Kernel/inc/MantidKernel/ProxyInfo.h +++ b/Framework/Kernel/inc/MantidKernel/ProxyInfo.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/PseudoRandomNumberGenerator.h b/Framework/Kernel/inc/MantidKernel/PseudoRandomNumberGenerator.h index 11f3baae277492b6a016c3ac48944052bb831ae8..818f2cda682dcf807dd699080946a136448cdadf 100644 --- a/Framework/Kernel/inc/MantidKernel/PseudoRandomNumberGenerator.h +++ b/Framework/Kernel/inc/MantidKernel/PseudoRandomNumberGenerator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/QuasiRandomNumberSequence.h b/Framework/Kernel/inc/MantidKernel/QuasiRandomNumberSequence.h index 03eeb493e3ea57623a40e451032a764adb91129d..d962c439552717e384be6ddb7fbe72bbdadff59c 100644 --- a/Framework/Kernel/inc/MantidKernel/QuasiRandomNumberSequence.h +++ b/Framework/Kernel/inc/MantidKernel/QuasiRandomNumberSequence.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/Quat.h b/Framework/Kernel/inc/MantidKernel/Quat.h index 33b9fc63d29f09d94ec01ac994a577c64cd029ff..f168006d5fd3439faec535e5e52ee187af45fad5 100644 --- a/Framework/Kernel/inc/MantidKernel/Quat.h +++ b/Framework/Kernel/inc/MantidKernel/Quat.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/ReadLock.h b/Framework/Kernel/inc/MantidKernel/ReadLock.h index c46d01bf3c7b4d9dbe1ef4a85f571f024eda0d93..27efdebd5fd65aa46bcc0cba76d1a72af2c5c74f 100644 --- a/Framework/Kernel/inc/MantidKernel/ReadLock.h +++ b/Framework/Kernel/inc/MantidKernel/ReadLock.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/RebinParamsValidator.h b/Framework/Kernel/inc/MantidKernel/RebinParamsValidator.h index 6911160a0e3df9a04bb06cdc3e886fada5e4d6d2..4cc6647deab4e9f943cd38acca1a4beb0e1574ff 100644 --- a/Framework/Kernel/inc/MantidKernel/RebinParamsValidator.h +++ b/Framework/Kernel/inc/MantidKernel/RebinParamsValidator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/RegexStrings.h b/Framework/Kernel/inc/MantidKernel/RegexStrings.h index 63de2da7c4f2a401aa0e0cd4befce732c973e239..6cb267e653f9d138bccc41b21b6ac4a6f66b4668 100644 --- a/Framework/Kernel/inc/MantidKernel/RegexStrings.h +++ b/Framework/Kernel/inc/MantidKernel/RegexStrings.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/RegistrationHelper.h b/Framework/Kernel/inc/MantidKernel/RegistrationHelper.h index 331a364d7f8fcf76d5b78ddb20a58c54c9c443bc..a04206e99a183a226e85c232b0f5e1f554b0b08b 100644 --- a/Framework/Kernel/inc/MantidKernel/RegistrationHelper.h +++ b/Framework/Kernel/inc/MantidKernel/RegistrationHelper.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/RemoteJobManager.h b/Framework/Kernel/inc/MantidKernel/RemoteJobManager.h index 2de8a3fb36b21b7c69669df442cba43ee8308add..175350eef35d7c3f6629ba28a6bbd8979bec287e 100644 --- a/Framework/Kernel/inc/MantidKernel/RemoteJobManager.h +++ b/Framework/Kernel/inc/MantidKernel/RemoteJobManager.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -70,11 +70,13 @@ public: private: // Wraps up some of the boilerplate code needed to execute HTTP GET and POST // requests - void initGetRequest(Poco::Net::HTTPRequest &req, std::string extraPath, - std::string queryString); - void initPostRequest(Poco::Net::HTTPRequest &req, std::string extraPath); + void initGetRequest(Poco::Net::HTTPRequest &req, const std::string &extraPath, + const std::string &queryString); + void initPostRequest(Poco::Net::HTTPRequest &req, + const std::string &extraPath); void initHTTPRequest(Poco::Net::HTTPRequest &req, const std::string &method, - std::string extraPath, std::string queryString = ""); + const std::string &extraPath, + const std::string &queryString = ""); std::string m_displayName; std::string diff --git a/Framework/Kernel/inc/MantidKernel/SimpleJSON.h b/Framework/Kernel/inc/MantidKernel/SimpleJSON.h index 3a4da7894758ca6f87abceccf93bfe64c2ed4c26..c5c47243d17bf1f660a58105e7ca98c9ae78d2b5 100644 --- a/Framework/Kernel/inc/MantidKernel/SimpleJSON.h +++ b/Framework/Kernel/inc/MantidKernel/SimpleJSON.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /******************************************************************* A cross-platform JSON parser that uses nothing more than C++ and diff --git a/Framework/Kernel/inc/MantidKernel/SingletonHolder.h b/Framework/Kernel/inc/MantidKernel/SingletonHolder.h index 51ffda22895f82578c9253cd9752cbc2edf0c509..84b793dbe82e059a192f4ba00d0bb0e0e2742d0a 100644 --- a/Framework/Kernel/inc/MantidKernel/SingletonHolder.h +++ b/Framework/Kernel/inc/MantidKernel/SingletonHolder.h @@ -35,7 +35,7 @@ using SingletonDeleterFn = std::function<void()>; /// Register the given deleter function to be called /// at exit -MANTID_KERNEL_DLL void deleteOnExit(SingletonDeleterFn func); +MANTID_KERNEL_DLL void deleteOnExit(const SingletonDeleterFn &func); /// Manage the lifetime of a class intended to be a singleton template <typename T> class SingletonHolder { diff --git a/Framework/Kernel/inc/MantidKernel/SobolSequence.h b/Framework/Kernel/inc/MantidKernel/SobolSequence.h index 29dca66c68258a20b6e4c17219b4a3cb250cd953..9bdb5ef6722a62da585ad63021db7fa922e329d5 100644 --- a/Framework/Kernel/inc/MantidKernel/SobolSequence.h +++ b/Framework/Kernel/inc/MantidKernel/SobolSequence.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/SpecialCoordinateSystem.h b/Framework/Kernel/inc/MantidKernel/SpecialCoordinateSystem.h index a5bae38eef410d78caf18a816298a8ce6b304ab3..218c2201859abd7dfa2d336b46c047d4b8f87fe7 100644 --- a/Framework/Kernel/inc/MantidKernel/SpecialCoordinateSystem.h +++ b/Framework/Kernel/inc/MantidKernel/SpecialCoordinateSystem.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/StartsWithValidator.h b/Framework/Kernel/inc/MantidKernel/StartsWithValidator.h index d2493636617109c10efc3754eb27e9038e3b8acf..5d2c09a59f0eeddc879e3eabe2ccf784b6c6e7f1 100644 --- a/Framework/Kernel/inc/MantidKernel/StartsWithValidator.h +++ b/Framework/Kernel/inc/MantidKernel/StartsWithValidator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/Statistics.h b/Framework/Kernel/inc/MantidKernel/Statistics.h index 49b4538486e9dde0d476cf9004ff4aa4af2a664f..b8334c127e5f5ddcca3f8f2f8d30105f39feb69c 100644 --- a/Framework/Kernel/inc/MantidKernel/Statistics.h +++ b/Framework/Kernel/inc/MantidKernel/Statistics.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/StdoutChannel.h b/Framework/Kernel/inc/MantidKernel/StdoutChannel.h index e50c9cbeceb6dd9e19c28b4804356827dfb2829c..d9473f99d86c554976c83eccfbdeb399de1a123b 100644 --- a/Framework/Kernel/inc/MantidKernel/StdoutChannel.h +++ b/Framework/Kernel/inc/MantidKernel/StdoutChannel.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + // // StdoutChannel.h diff --git a/Framework/Kernel/inc/MantidKernel/StringContainsValidator.h b/Framework/Kernel/inc/MantidKernel/StringContainsValidator.h index 96ef1be52a5805ebc5b669c9fad3a4d6ca56394e..325eb5fc4fc8096c22b89211a00ecd77b4346f61 100644 --- a/Framework/Kernel/inc/MantidKernel/StringContainsValidator.h +++ b/Framework/Kernel/inc/MantidKernel/StringContainsValidator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/StringTokenizer.h b/Framework/Kernel/inc/MantidKernel/StringTokenizer.h index d7b2dae03061bd47be19a401ab0e715db267dd4a..6cba38624cc6f30798c9fdc0b938680955fb9fc3 100644 --- a/Framework/Kernel/inc/MantidKernel/StringTokenizer.h +++ b/Framework/Kernel/inc/MantidKernel/StringTokenizer.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/Strings.h b/Framework/Kernel/inc/MantidKernel/Strings.h index ec78735d1476a92a98d1907241b797b8080ac281..be2ce2e44e74724e32315eaca37a95a27e41ae41 100644 --- a/Framework/Kernel/inc/MantidKernel/Strings.h +++ b/Framework/Kernel/inc/MantidKernel/Strings.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/System.h b/Framework/Kernel/inc/MantidKernel/System.h index 98a89858b11b81c8aeb20a761d0cbfbec39bd8cc..5ff5cb9b9e18369063650189e8b3ff73ddcb807f 100644 --- a/Framework/Kernel/inc/MantidKernel/System.h +++ b/Framework/Kernel/inc/MantidKernel/System.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/Task.h b/Framework/Kernel/inc/MantidKernel/Task.h index eaaebaee98941b0e29e87ad914464e320dfd6f1e..d2bca2f0e42684cbf5a50bb70bff7aa000112a06 100644 --- a/Framework/Kernel/inc/MantidKernel/Task.h +++ b/Framework/Kernel/inc/MantidKernel/Task.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/ThreadPool.h b/Framework/Kernel/inc/MantidKernel/ThreadPool.h index b6c308dc24e77864128264455851cd1dce8cb364..2e60c564fe0323a1ff58f2d64428f3fe0ffdb203 100644 --- a/Framework/Kernel/inc/MantidKernel/ThreadPool.h +++ b/Framework/Kernel/inc/MantidKernel/ThreadPool.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -42,7 +42,7 @@ public: void start(double waitSec = 0.0); - void schedule(std::shared_ptr<Task> task, bool start = false); + void schedule(const std::shared_ptr<Task> &task, bool start = false); void joinAll(); diff --git a/Framework/Kernel/inc/MantidKernel/ThreadPoolRunnable.h b/Framework/Kernel/inc/MantidKernel/ThreadPoolRunnable.h index fc610a2d8de616510bdad5eb9a8985d753481d2b..3a7aa7e6315d70ad27a2266026523ec03d115686 100644 --- a/Framework/Kernel/inc/MantidKernel/ThreadPoolRunnable.h +++ b/Framework/Kernel/inc/MantidKernel/ThreadPoolRunnable.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/ThreadSafeLogStream.h b/Framework/Kernel/inc/MantidKernel/ThreadSafeLogStream.h index bb55e3c00f1d89bb64a9bc9e967bbac575532538..7a782556ba2fa8667bee8d6412722c1ec331a318 100644 --- a/Framework/Kernel/inc/MantidKernel/ThreadSafeLogStream.h +++ b/Framework/Kernel/inc/MantidKernel/ThreadSafeLogStream.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/ThreadScheduler.h b/Framework/Kernel/inc/MantidKernel/ThreadScheduler.h index 1c69c0cb4d0356d4e8128308b4c72b82ddda33c9..88915c00d60ab070e79aec0080cb7e3914882010 100644 --- a/Framework/Kernel/inc/MantidKernel/ThreadScheduler.h +++ b/Framework/Kernel/inc/MantidKernel/ThreadScheduler.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/ThreadSchedulerMutexes.h b/Framework/Kernel/inc/MantidKernel/ThreadSchedulerMutexes.h index 55552a776c423c3ae4fa3017a385a4452230d010..4c834431a772bc5721be20edcbf5940e3d14c41b 100644 --- a/Framework/Kernel/inc/MantidKernel/ThreadSchedulerMutexes.h +++ b/Framework/Kernel/inc/MantidKernel/ThreadSchedulerMutexes.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/TimeSeriesProperty.h b/Framework/Kernel/inc/MantidKernel/TimeSeriesProperty.h index 122c2c915dd3a3a72ce2ba50fce7a447e5a70cd5..63192464d06201c463afd46f9ec916a15b645952 100644 --- a/Framework/Kernel/inc/MantidKernel/TimeSeriesProperty.h +++ b/Framework/Kernel/inc/MantidKernel/TimeSeriesProperty.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/TimeSplitter.h b/Framework/Kernel/inc/MantidKernel/TimeSplitter.h index 9c5b4b5f5aa750388a779f8625a3bf9d686a5fa4..92a52ed05c8b605127995ab74f398cfa9ed8b329 100644 --- a/Framework/Kernel/inc/MantidKernel/TimeSplitter.h +++ b/Framework/Kernel/inc/MantidKernel/TimeSplitter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/Timer.h b/Framework/Kernel/inc/MantidKernel/Timer.h index b77614668649bfb34b2ac6c6b7b3e2f53c0b6e70..276517818cc2d90eb8125bd85e2e080a798e837d 100644 --- a/Framework/Kernel/inc/MantidKernel/Timer.h +++ b/Framework/Kernel/inc/MantidKernel/Timer.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/Tolerance.h b/Framework/Kernel/inc/MantidKernel/Tolerance.h index a946786da8e040b26f09f5e3d7b647c2684e3370..a9680bb1bdcae25c6235170ed41a00b0f2e068de 100644 --- a/Framework/Kernel/inc/MantidKernel/Tolerance.h +++ b/Framework/Kernel/inc/MantidKernel/Tolerance.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/TopicInfo.h b/Framework/Kernel/inc/MantidKernel/TopicInfo.h index 0085b71d9d91e9d03348b6523b322c8e36366f14..2438bdb638f6e1b593de3f9bb11535900840c091 100644 --- a/Framework/Kernel/inc/MantidKernel/TopicInfo.h +++ b/Framework/Kernel/inc/MantidKernel/TopicInfo.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/TypedValidator.h b/Framework/Kernel/inc/MantidKernel/TypedValidator.h index b8711a1da61c6618102ab4482f772970c1da7818..78fce7ca635c4f0642ec7856b497f1501fda079d 100644 --- a/Framework/Kernel/inc/MantidKernel/TypedValidator.h +++ b/Framework/Kernel/inc/MantidKernel/TypedValidator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once //---------------------------------------------------------------------- diff --git a/Framework/Kernel/inc/MantidKernel/Unit.h b/Framework/Kernel/inc/MantidKernel/Unit.h index d475f6889ae8c55340361269afc8fcb1f68c3098..2d0a7201d86ce4af713a4c511d5fdc7d5c526b68 100644 --- a/Framework/Kernel/inc/MantidKernel/Unit.h +++ b/Framework/Kernel/inc/MantidKernel/Unit.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -10,6 +10,8 @@ // Includes //---------------------------------------------------------------------- #include "MantidKernel/UnitLabel.h" +#include <utility> + #include <vector> #ifndef Q_MOC_RUN #include <boost/shared_ptr.hpp> @@ -684,13 +686,14 @@ private: //================================================================================================= -MANTID_KERNEL_DLL double timeConversionValue(std::string input_unit, - std::string output_unit); +MANTID_KERNEL_DLL double timeConversionValue(const std::string &input_unit, + const std::string &output_unit); template <typename T> -void timeConversionVector(std::vector<T> &vec, std::string input_unit, - std::string output_unit) { - double factor = timeConversionValue(input_unit, output_unit); +void timeConversionVector(std::vector<T> &vec, const std::string &input_unit, + const std::string &output_unit) { + double factor = + timeConversionValue(std::move(input_unit), std::move(output_unit)); if (factor != 1.0) std::transform(vec.begin(), vec.end(), vec.begin(), [factor](T x) -> T { return x * static_cast<T>(factor); }); diff --git a/Framework/Kernel/inc/MantidKernel/UnitConversion.h b/Framework/Kernel/inc/MantidKernel/UnitConversion.h index 0f99aa63508d74641d6e5a2d4093b6ed059f66c0..327c4f8bdb53af2dfb6fe7cf83c5f42fefa18b13 100644 --- a/Framework/Kernel/inc/MantidKernel/UnitConversion.h +++ b/Framework/Kernel/inc/MantidKernel/UnitConversion.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/UnitFactory.h b/Framework/Kernel/inc/MantidKernel/UnitFactory.h index f59e2d8178feb850ca2a9add119e99c7eb773339..bcffe854aba67f30e727e0fa98591ca33df47f2c 100644 --- a/Framework/Kernel/inc/MantidKernel/UnitFactory.h +++ b/Framework/Kernel/inc/MantidKernel/UnitFactory.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/UnitLabel.h b/Framework/Kernel/inc/MantidKernel/UnitLabel.h index fc02005ceefe93b3d32682f1a64bd2e78ef6afb7..1664a4c52d0a895959db97edeaa4b09e6c671262 100644 --- a/Framework/Kernel/inc/MantidKernel/UnitLabel.h +++ b/Framework/Kernel/inc/MantidKernel/UnitLabel.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once /** diff --git a/Framework/Kernel/inc/MantidKernel/UnitLabelTypes.h b/Framework/Kernel/inc/MantidKernel/UnitLabelTypes.h index 9f4fc5fc1079ea5afacbc9d6a9e7bd382c1fee56..b9a341b6089704d06af706d2b61181853e512474 100644 --- a/Framework/Kernel/inc/MantidKernel/UnitLabelTypes.h +++ b/Framework/Kernel/inc/MantidKernel/UnitLabelTypes.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/UsageService.h b/Framework/Kernel/inc/MantidKernel/UsageService.h index f4e524aacd64f2f3f3c187622748c96fbdf50bd3..10c9fc7136549ccd471bb17dda94acc64294c7c0 100644 --- a/Framework/Kernel/inc/MantidKernel/UsageService.h +++ b/Framework/Kernel/inc/MantidKernel/UsageService.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/UserCatalogInfo.h b/Framework/Kernel/inc/MantidKernel/UserCatalogInfo.h index 00858f6b4fb77ac5cc463326806d4c95d16cc2ec..5b2f259e393293c1bbf75bbead93a91023afc878 100644 --- a/Framework/Kernel/inc/MantidKernel/UserCatalogInfo.h +++ b/Framework/Kernel/inc/MantidKernel/UserCatalogInfo.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -24,14 +24,14 @@ public: template <typename T> CatalogConfigService *makeCatalogConfigServiceAdapter( - const T &adaptee, const std::string key = "icatDownload.mountPoint") { + const T &adaptee, const std::string &key = "icatDownload.mountPoint") { class Adapter : public CatalogConfigService { private: const T &m_adaptee; std::string m_key; public: - Adapter(const T &adaptee, const std::string key) + Adapter(const T &adaptee, const std::string &key) : m_adaptee(adaptee), m_key(key) {} OptionalPath preferredMountPoint() const override { auto const mountPoint = m_adaptee.getString(m_key); diff --git a/Framework/Kernel/inc/MantidKernel/UserStringParser.h b/Framework/Kernel/inc/MantidKernel/UserStringParser.h index 58ecb9ca4d5276b8e1435c6e93d00300202bf385..6350a06ec0b4f3763879f61b7f8ec65e0195d79b 100644 --- a/Framework/Kernel/inc/MantidKernel/UserStringParser.h +++ b/Framework/Kernel/inc/MantidKernel/UserStringParser.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/Utils.h b/Framework/Kernel/inc/MantidKernel/Utils.h index 6a56974d4aff30b057a84c074dc9d73b74f56d16..dde798e22dca93c9b82ca4706e5c9f37a2fe865d 100644 --- a/Framework/Kernel/inc/MantidKernel/Utils.h +++ b/Framework/Kernel/inc/MantidKernel/Utils.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/V2D.h b/Framework/Kernel/inc/MantidKernel/V2D.h index a6659b5e528df2253f8b93f94353324f059a0d0d..673215b377309ca92dcc61ccb533771b70c43a58 100644 --- a/Framework/Kernel/inc/MantidKernel/V2D.h +++ b/Framework/Kernel/inc/MantidKernel/V2D.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/V3D.h b/Framework/Kernel/inc/MantidKernel/V3D.h index 58de6edb7fcfed8047618152fac65b0ec9d6ce71..c9983438c2c296cbf431bbc9f10a291da570f0e8 100644 --- a/Framework/Kernel/inc/MantidKernel/V3D.h +++ b/Framework/Kernel/inc/MantidKernel/V3D.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/VMD.h b/Framework/Kernel/inc/MantidKernel/VMD.h index b22ea41f0ee3227cfa1d6ae223deb798fdfacce8..76853873cd1554afa18f64916e56e502625dc232 100644 --- a/Framework/Kernel/inc/MantidKernel/VMD.h +++ b/Framework/Kernel/inc/MantidKernel/VMD.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/VectorHelper.h b/Framework/Kernel/inc/MantidKernel/VectorHelper.h index 7530cbad9a916601be77c895b8588aac697d2bbe..3f64c544fd766b177e09f3ff6dfc1dafb550fce9 100644 --- a/Framework/Kernel/inc/MantidKernel/VectorHelper.h +++ b/Framework/Kernel/inc/MantidKernel/VectorHelper.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/VisibleWhenProperty.h b/Framework/Kernel/inc/MantidKernel/VisibleWhenProperty.h index 40b02627f7ddcee63200826a3bb4f0f15fcc14b3..29340d9c51360712a331524aebb3c514590c1548 100644 --- a/Framework/Kernel/inc/MantidKernel/VisibleWhenProperty.h +++ b/Framework/Kernel/inc/MantidKernel/VisibleWhenProperty.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -19,8 +19,8 @@ class DLLExport VisibleWhenProperty : public EnabledWhenProperty { public: /// Constructs a VisibleWhenProperty object which checks the property /// with name given and if it matches the criteria makes it visible - VisibleWhenProperty(std::string otherPropName, ePropertyCriterion when, - std::string value = ""); + VisibleWhenProperty(const std::string &otherPropName, ePropertyCriterion when, + const std::string &value = ""); /// Constructs a VisibleWhenProperty object which copies two /// already constructed VisibleWhenProperty objects and returns the result diff --git a/Framework/Kernel/inc/MantidKernel/WarningSuppressions.h b/Framework/Kernel/inc/MantidKernel/WarningSuppressions.h index fd9a5d3725e3efb0bbc2150bef5442ef65e8b6d9..d5e6b60662adbe0df570f65f4c3bb9bb96b77233 100644 --- a/Framework/Kernel/inc/MantidKernel/WarningSuppressions.h +++ b/Framework/Kernel/inc/MantidKernel/WarningSuppressions.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/WriteLock.h b/Framework/Kernel/inc/MantidKernel/WriteLock.h index 1d571f67a45cc357150ebbe8f8395db077d92bb2..b8fac0804671d1cd57d6a71af084c67a493b70c9 100644 --- a/Framework/Kernel/inc/MantidKernel/WriteLock.h +++ b/Framework/Kernel/inc/MantidKernel/WriteLock.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/XMLInstantiator.h b/Framework/Kernel/inc/MantidKernel/XMLInstantiator.h index 02cd2e50cd3a49b13e6054f229331714a425a520..79d91bd9ed5192ec853f967c39b5320c3c614bda 100644 --- a/Framework/Kernel/inc/MantidKernel/XMLInstantiator.h +++ b/Framework/Kernel/inc/MantidKernel/XMLInstantiator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/cow_ptr.h b/Framework/Kernel/inc/MantidKernel/cow_ptr.h index f92f81b0a7cf3a204dbe4dca5793d9edf65a297a..8a2d423102e527f755dbef8b778858bdb61d8c8f 100644 --- a/Framework/Kernel/inc/MantidKernel/cow_ptr.h +++ b/Framework/Kernel/inc/MantidKernel/cow_ptr.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/make_cow.h b/Framework/Kernel/inc/MantidKernel/make_cow.h index cf4c7d79a8c5ef8b025f41adfa79f4b90184fd25..3d3cc281f6943540004902b734c331fbe5865b56 100644 --- a/Framework/Kernel/inc/MantidKernel/make_cow.h +++ b/Framework/Kernel/inc/MantidKernel/make_cow.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/normal_distribution.h b/Framework/Kernel/inc/MantidKernel/normal_distribution.h index 7c4bd50b4ab5a38451e9c1ae536cd0c97ae0d520..3bbbcda2bb2decd679e58143ac06fd2c69e7e563 100644 --- a/Framework/Kernel/inc/MantidKernel/normal_distribution.h +++ b/Framework/Kernel/inc/MantidKernel/normal_distribution.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/inc/MantidKernel/uniform_int_distribution.h b/Framework/Kernel/inc/MantidKernel/uniform_int_distribution.h index 2fdd3a9af106c903ffe7e71960a4bcd055869108..b247d93d9b35fd79faa50d2466b0445c15ca7497 100644 --- a/Framework/Kernel/inc/MantidKernel/uniform_int_distribution.h +++ b/Framework/Kernel/inc/MantidKernel/uniform_int_distribution.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/src/ANN_complete.cpp b/Framework/Kernel/src/ANN_complete.cpp index db2a8c86776d040216215d1264fea9e61f6f969d..cd25124df9174cded93921b77e2844536a9630ed 100644 --- a/Framework/Kernel/src/ANN_complete.cpp +++ b/Framework/Kernel/src/ANN_complete.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //------------------------------------------------------------------------------ // This is a global 'include' file for the #include "ANN cpp files in order to diff --git a/Framework/Kernel/src/ArrayBoundedValidator.cpp b/Framework/Kernel/src/ArrayBoundedValidator.cpp index d92b75f1eebb94afb20ea364f1aa4b59d7cd91f5..e53e671e5d880f4f99e87a25493cba2a7486d6b6 100644 --- a/Framework/Kernel/src/ArrayBoundedValidator.cpp +++ b/Framework/Kernel/src/ArrayBoundedValidator.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/ArrayBoundedValidator.h" diff --git a/Framework/Kernel/src/ArrayLengthValidator.cpp b/Framework/Kernel/src/ArrayLengthValidator.cpp index e1109bd073d12abd7b10551b4c5cf717f6b19478..4e2c3fa663dd4ccc48cf77edbca9b57f490c5d4f 100644 --- a/Framework/Kernel/src/ArrayLengthValidator.cpp +++ b/Framework/Kernel/src/ArrayLengthValidator.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/ArrayLengthValidator.h" diff --git a/Framework/Kernel/src/ArrayOrderedPairsValidator.cpp b/Framework/Kernel/src/ArrayOrderedPairsValidator.cpp index c52f45d70559897fbe503c19d344cb5aaabb7464..2763c4bf9e4b4eb1b9165ee7550ef43dc42429b8 100644 --- a/Framework/Kernel/src/ArrayOrderedPairsValidator.cpp +++ b/Framework/Kernel/src/ArrayOrderedPairsValidator.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/ArrayOrderedPairsValidator.h" diff --git a/Framework/Kernel/src/ArrayProperty.cpp b/Framework/Kernel/src/ArrayProperty.cpp index 7a637dbe385e997519314c10f85bd7389fc183ec..eea56e12f4e265c5c08455b76bea27226de92659 100644 --- a/Framework/Kernel/src/ArrayProperty.cpp +++ b/Framework/Kernel/src/ArrayProperty.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/ArrayProperty.h" @@ -19,8 +19,8 @@ namespace Kernel { * @param direction :: The direction (Input/Output/InOut) of this property */ template <typename T> -ArrayProperty<T>::ArrayProperty(std::string name, std::vector<T> vec, - IValidator_sptr validator, +ArrayProperty<T>::ArrayProperty(const std::string &name, std::vector<T> vec, + const IValidator_sptr &validator, const unsigned int direction) : PropertyWithValue<std::vector<T>>(std::move(name), std::move(vec), std::move(validator), direction) {} @@ -34,7 +34,8 @@ ArrayProperty<T>::ArrayProperty(std::string name, std::vector<T> vec, */ template <typename T> -ArrayProperty<T>::ArrayProperty(std::string name, IValidator_sptr validator, +ArrayProperty<T>::ArrayProperty(const std::string &name, + const IValidator_sptr &validator, const unsigned int direction) : PropertyWithValue<std::vector<T>>(std::move(name), std::vector<T>(), std::move(validator), direction) {} @@ -47,7 +48,8 @@ ArrayProperty<T>::ArrayProperty(std::string name, IValidator_sptr validator, * @param direction :: The direction (Input/Output/InOut) of this property */ template <typename T> -ArrayProperty<T>::ArrayProperty(std::string name, const unsigned int direction) +ArrayProperty<T>::ArrayProperty(const std::string &name, + const unsigned int direction) : PropertyWithValue<std::vector<T>>(std::move(name), std::vector<T>(), IValidator_sptr(new NullValidator), direction) {} @@ -68,8 +70,9 @@ ArrayProperty<T>::ArrayProperty(std::string name, const unsigned int direction) * the array type */ template <typename T> -ArrayProperty<T>::ArrayProperty(std::string name, const std::string &values, - IValidator_sptr validator, +ArrayProperty<T>::ArrayProperty(const std::string &name, + const std::string &values, + const IValidator_sptr &validator, const unsigned int direction) : PropertyWithValue<std::vector<T>>(std::move(name), std::vector<T>(), values, std::move(validator), diff --git a/Framework/Kernel/src/Atom.cpp b/Framework/Kernel/src/Atom.cpp index f83f349c4617f3b07666c1b90e5f895c94c14457..5e0a100271b620370ca11b88e801dca627e5dc60 100644 --- a/Framework/Kernel/src/Atom.cpp +++ b/Framework/Kernel/src/Atom.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/Atom.h" #include "MantidKernel/NeutronAtom.h" diff --git a/Framework/Kernel/src/BinFinder.cpp b/Framework/Kernel/src/BinFinder.cpp index 05f7abfb9f1b9197a3ccea1bae9eb67bb2519c01..9f7552e1d8bc5b6fa142b7ee5f314b2129bea2b9 100644 --- a/Framework/Kernel/src/BinFinder.cpp +++ b/Framework/Kernel/src/BinFinder.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/BinFinder.h" #include <cmath> diff --git a/Framework/Kernel/src/BinaryStreamReader.cpp b/Framework/Kernel/src/BinaryStreamReader.cpp index f8906cd4292781963fa06045914ff88dcf48e7f9..152c84bb63bbf1e264c08f17cd9327d37166061d 100644 --- a/Framework/Kernel/src/BinaryStreamReader.cpp +++ b/Framework/Kernel/src/BinaryStreamReader.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //------------------------------------------------------------------------------ // Includes diff --git a/Framework/Kernel/src/BinaryStreamWriter.cpp b/Framework/Kernel/src/BinaryStreamWriter.cpp index 9acd5040bc166be96a68dc85ec2faf7862ca6de0..b5b270317cbad1874c7e984113356b4615d5aa8b 100644 --- a/Framework/Kernel/src/BinaryStreamWriter.cpp +++ b/Framework/Kernel/src/BinaryStreamWriter.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //------------------------------------------------------------------------------ // Includes diff --git a/Framework/Kernel/src/CPUTimer.cpp b/Framework/Kernel/src/CPUTimer.cpp index af4e5a0c0d274080537a4a26977ad5918221edf8..cd865bec6e5b9d35c1738385bb686b378c2b003a 100644 --- a/Framework/Kernel/src/CPUTimer.cpp +++ b/Framework/Kernel/src/CPUTimer.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/CPUTimer.h" #include <ctime> diff --git a/Framework/Kernel/src/CatalogInfo.cpp b/Framework/Kernel/src/CatalogInfo.cpp index 1118fcc2d7e8d204f3eb0afa704faaca3a326a33..7803965ba8c275a8c1b88bd33d01f2e94f20a49d 100644 --- a/Framework/Kernel/src/CatalogInfo.cpp +++ b/Framework/Kernel/src/CatalogInfo.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/Kernel/src/ChecksumHelper.cpp b/Framework/Kernel/src/ChecksumHelper.cpp index b863e6cc939bdf79fd447c04d1a7ac6d2554fbfe..7f791697056316a86031418cb67338eb9c4206eb 100644 --- a/Framework/Kernel/src/ChecksumHelper.cpp +++ b/Framework/Kernel/src/ChecksumHelper.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/ChecksumHelper.h" diff --git a/Framework/Kernel/src/CompositeValidator.cpp b/Framework/Kernel/src/CompositeValidator.cpp index 4b333e91493637cedc2cabf78ad4265ded472802..696a684d5efb63554c3b030c413c576c9a52db73 100644 --- a/Framework/Kernel/src/CompositeValidator.cpp +++ b/Framework/Kernel/src/CompositeValidator.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/CompositeValidator.h" #include <sstream> @@ -68,7 +68,7 @@ Kernel::IValidator_sptr CompositeValidator::clone() const { /** Adds a validator to the group of validators to check * @param child :: A pointer to the validator to add */ -void CompositeValidator::add(Kernel::IValidator_sptr child) { +void CompositeValidator::add(const Kernel::IValidator_sptr &child) { m_children.emplace_back(child); } @@ -106,7 +106,7 @@ std::string CompositeValidator::checkAny(const boost::any &value) const { // capture its error message to a stream so we can potentially print it out // to the user if required. const auto checkIfValid = [&errorStream, - &value](const IValidator_sptr validator) { + &value](const IValidator_sptr &validator) { const auto errorMessage = validator->check(value); if (errorMessage.empty()) { return true; diff --git a/Framework/Kernel/src/ComputeResourceInfo.cpp b/Framework/Kernel/src/ComputeResourceInfo.cpp index 1994e1bcacfe3841308955bf68dc9ee0211b8b2f..60f2acecd8bdc3395ff4a446a96fa7afcbe07bc5 100644 --- a/Framework/Kernel/src/ComputeResourceInfo.cpp +++ b/Framework/Kernel/src/ComputeResourceInfo.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/ComputeResourceInfo.h" #include "MantidKernel/Logger.h" diff --git a/Framework/Kernel/src/ConfigObserver.cpp b/Framework/Kernel/src/ConfigObserver.cpp index c287a76c7488ff8e9eee4726fcde900b7bb847c4..0d2d4995de02442e78ce6958bf07a253edb5c90d 100644 --- a/Framework/Kernel/src/ConfigObserver.cpp +++ b/Framework/Kernel/src/ConfigObserver.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/ConfigObserver.h" #include "MantidKernel/ConfigService.h" diff --git a/Framework/Kernel/src/ConfigPropertyObserver.cpp b/Framework/Kernel/src/ConfigPropertyObserver.cpp index 5d2109d739c5f0a6339a0337ef34e59140a7d898..bdbc10bf267edcd76deec24ebdfe70a6bc8648e2 100644 --- a/Framework/Kernel/src/ConfigPropertyObserver.cpp +++ b/Framework/Kernel/src/ConfigPropertyObserver.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/ConfigPropertyObserver.h" #include "MantidKernel/ConfigService.h" diff --git a/Framework/Kernel/src/ConfigService.cpp b/Framework/Kernel/src/ConfigService.cpp index 6da6bb138987257a3c225278c92fd2c8ccb24266..fcd12bc765e9b373f7f570eb25591c7ab2bb5349 100644 --- a/Framework/Kernel/src/ConfigService.cpp +++ b/Framework/Kernel/src/ConfigService.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes @@ -651,8 +651,6 @@ void ConfigServiceImpl::createUserPropertiesFile() const { filestr << "##\n"; filestr << "## GENERAL\n"; filestr << "##\n\n"; - filestr << "## Set the number of algorithm properties to retain\n"; - filestr << "#algorithms.retained=90\n\n"; filestr << "## Set the maximum number of cores used to run algorithms over\n"; filestr << "#MultiThreaded.MaxCores=4\n\n"; diff --git a/Framework/Kernel/src/DataItem.cpp b/Framework/Kernel/src/DataItem.cpp index a15227cdec6d6dafcbc80783d22723b363469166..71415c803f25c9dd698f7ddf4bfbaa9246d7634d 100644 --- a/Framework/Kernel/src/DataItem.cpp +++ b/Framework/Kernel/src/DataItem.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //----------------------------------------------------------------------------- // Includes diff --git a/Framework/Kernel/src/DateAndTime.cpp b/Framework/Kernel/src/DateAndTime.cpp index a06e467f27b191cbe9147061ab3a7c77f1e0f98e..424b00b59bf961a2e1e629ef2185b10beb453bd5 100644 --- a/Framework/Kernel/src/DateAndTime.cpp +++ b/Framework/Kernel/src/DateAndTime.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/DateAndTime.h" diff --git a/Framework/Kernel/src/DateAndTimeHelpers.cpp b/Framework/Kernel/src/DateAndTimeHelpers.cpp index d0073ab5a24e064efc0d606aef98214459a115e8..a278832b0fab82b6b2945514c855155a3663465a 100644 --- a/Framework/Kernel/src/DateAndTimeHelpers.cpp +++ b/Framework/Kernel/src/DateAndTimeHelpers.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/DateAndTimeHelpers.h" #include "MantidKernel/Logger.h" diff --git a/Framework/Kernel/src/DateTimeValidator.cpp b/Framework/Kernel/src/DateTimeValidator.cpp index 5add12b47269859787df29dbab83626974bd7b75..4162daae8e7f708e43e8ffb09957e1d2657f82db 100644 --- a/Framework/Kernel/src/DateTimeValidator.cpp +++ b/Framework/Kernel/src/DateTimeValidator.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/DateTimeValidator.h" #include "MantidKernel/DateAndTimeHelpers.h" diff --git a/Framework/Kernel/src/DateValidator.cpp b/Framework/Kernel/src/DateValidator.cpp index 97971fdb6eb735ce5b4bc1a9ad8f5d4176e018dd..270cf41920137e0a9235f3e435520a52254d6ad7 100644 --- a/Framework/Kernel/src/DateValidator.cpp +++ b/Framework/Kernel/src/DateValidator.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/DateValidator.h" #include <boost/lexical_cast.hpp> diff --git a/Framework/Kernel/src/DeltaEMode.cpp b/Framework/Kernel/src/DeltaEMode.cpp index 4cc538263547c1fa19b6f740756da9f5301a1e03..5d3b95ae50c672f601a8a53799b03dc56cde9227 100644 --- a/Framework/Kernel/src/DeltaEMode.cpp +++ b/Framework/Kernel/src/DeltaEMode.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/DeltaEMode.h" diff --git a/Framework/Kernel/src/Diffraction.cpp b/Framework/Kernel/src/Diffraction.cpp index 8d18974168de4bd52f1cd97aa7fc7cd57025aa25..1c9e4d64d88f5ece2e7ed09f879887d8db9bf1cd 100644 --- a/Framework/Kernel/src/Diffraction.cpp +++ b/Framework/Kernel/src/Diffraction.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/Diffraction.h" #include <algorithm> diff --git a/Framework/Kernel/src/DirectoryValidator.cpp b/Framework/Kernel/src/DirectoryValidator.cpp index 7ab35300557346699835fe7e3ac0f5ef0ed6a0a0..1393eb44a68b67d5a84d30beaa58eac170c210ce 100644 --- a/Framework/Kernel/src/DirectoryValidator.cpp +++ b/Framework/Kernel/src/DirectoryValidator.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/DirectoryValidator.h" #include "MantidKernel/IValidator.h" diff --git a/Framework/Kernel/src/DiskBuffer.cpp b/Framework/Kernel/src/DiskBuffer.cpp index e3098c9edddddc9fd3c11449bb126af6892ef69f..d55486e0e39efb1e126a1b434b3834b40645be95 100644 --- a/Framework/Kernel/src/DiskBuffer.cpp +++ b/Framework/Kernel/src/DiskBuffer.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/DiskBuffer.h" #include "MantidKernel/ISaveable.h" diff --git a/Framework/Kernel/src/DllOpen.cpp b/Framework/Kernel/src/DllOpen.cpp index 25f90f813359806b2d089914ed85c5f3a126a4d4..cd45f2da2ec0484089d9f6da033e99422b92e72b 100644 --- a/Framework/Kernel/src/DllOpen.cpp +++ b/Framework/Kernel/src/DllOpen.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/DllOpen.h" #include "MantidKernel/Logger.h" diff --git a/Framework/Kernel/src/EnabledWhenProperty.cpp b/Framework/Kernel/src/EnabledWhenProperty.cpp index b6525e01595e298577440508cfc2168fc8129147..d9e5b4006cb2fce0ce1b49adbc28cd0b2d362070 100644 --- a/Framework/Kernel/src/EnabledWhenProperty.cpp +++ b/Framework/Kernel/src/EnabledWhenProperty.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/EnabledWhenProperty.h" diff --git a/Framework/Kernel/src/EnvironmentHistory.cpp b/Framework/Kernel/src/EnvironmentHistory.cpp index 3186e31c416c6182452bea4995b927d872a4f161..07761178e70d2f2f671afef1c7fd7a19f29cb7ba 100644 --- a/Framework/Kernel/src/EnvironmentHistory.cpp +++ b/Framework/Kernel/src/EnvironmentHistory.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/Kernel/src/EqualBinsChecker.cpp b/Framework/Kernel/src/EqualBinsChecker.cpp index f1773be493f4fb11b5a5f37ab117d0fa16ed9d97..47129b47dcacdee6de126e4fd7a2945a7eb45fc2 100644 --- a/Framework/Kernel/src/EqualBinsChecker.cpp +++ b/Framework/Kernel/src/EqualBinsChecker.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/EqualBinsChecker.h" #include "MantidKernel/Logger.h" diff --git a/Framework/Kernel/src/ErrorReporter.cpp b/Framework/Kernel/src/ErrorReporter.cpp index 6150d94f0dedb5e9ab0c0ca7de38eb040db4f8fb..a79d5dcd835cc8e8ca724523d9056202b48bcf5f 100644 --- a/Framework/Kernel/src/ErrorReporter.cpp +++ b/Framework/Kernel/src/ErrorReporter.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/ErrorReporter.h" #include "MantidKernel/ChecksumHelper.h" @@ -30,27 +30,27 @@ Logger g_log("ErrorReporter"); // Constructor for ErrorReporter /** Constructor */ -ErrorReporter::ErrorReporter(const std::string application, - const Types::Core::time_duration upTime, - const std::string exitCode, const bool share) +ErrorReporter::ErrorReporter(const std::string &application, + const Types::Core::time_duration &upTime, + const std::string &exitCode, const bool share) : ErrorReporter(application, upTime, exitCode, share, "", "", "", "") {} /** Constructor */ -ErrorReporter::ErrorReporter(const std::string application, - const Types::Core::time_duration upTime, - const std::string exitCode, const bool share, - const std::string name, const std::string email, - const std::string textBox) +ErrorReporter::ErrorReporter(const std::string &application, + const Types::Core::time_duration &upTime, + const std::string &exitCode, const bool share, + const std::string &name, const std::string &email, + const std::string &textBox) : ErrorReporter(application, upTime, exitCode, share, name, email, textBox, "") {} -ErrorReporter::ErrorReporter(const std::string application, - const Types::Core::time_duration upTime, - const std::string exitCode, const bool share, - const std::string name, const std::string email, - const std::string textBox, - const std::string traceback) +ErrorReporter::ErrorReporter(const std::string &application, + const Types::Core::time_duration &upTime, + const std::string &exitCode, const bool share, + const std::string &name, const std::string &email, + const std::string &textBox, + const std::string &traceback) : m_application(application), m_exitCode(exitCode), m_upTime(upTime), m_share(share), m_name(name), m_email(email), m_textbox(textBox), m_stacktrace(traceback) { diff --git a/Framework/Kernel/src/Exception.cpp b/Framework/Kernel/src/Exception.cpp index b8e0b5aa01d211fe2a451123191376bacb0f7074..575b16f515e00a150bd9b2fb0985a4aa949a9c55 100644 --- a/Framework/Kernel/src/Exception.cpp +++ b/Framework/Kernel/src/Exception.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/Exception.h" #include <sstream> diff --git a/Framework/Kernel/src/FacilityInfo.cpp b/Framework/Kernel/src/FacilityInfo.cpp index 92bb281bd9c3497a565c3c2a28d3078dccad385a..57adb566cb2f4871fcf30a25177ca5037aa2f132 100644 --- a/Framework/Kernel/src/FacilityInfo.cpp +++ b/Framework/Kernel/src/FacilityInfo.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/Kernel/src/FileDescriptor.cpp b/Framework/Kernel/src/FileDescriptor.cpp index bb1e6ce7471ce49b82861d94899b4297b7da60f3..b6d1d461c859ae8f02afaf09bfe221d66b5d7726 100644 --- a/Framework/Kernel/src/FileDescriptor.cpp +++ b/Framework/Kernel/src/FileDescriptor.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/FileDescriptor.h" #include "MantidKernel/Strings.h" diff --git a/Framework/Kernel/src/FileValidator.cpp b/Framework/Kernel/src/FileValidator.cpp index 9b4cbf40447a791ad9a44a7d00045e138e2d1b28..47d46953a219933e257dbcb69c839a65a4b03eb4 100644 --- a/Framework/Kernel/src/FileValidator.cpp +++ b/Framework/Kernel/src/FileValidator.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/FileValidator.h" #include "MantidKernel/Logger.h" diff --git a/Framework/Kernel/src/FilteredTimeSeriesProperty.cpp b/Framework/Kernel/src/FilteredTimeSeriesProperty.cpp index 2e454463d837c04411063d917d26c0724996371c..7315189c4d03a84f32cf058a90a4e767c7a7addb 100644 --- a/Framework/Kernel/src/FilteredTimeSeriesProperty.cpp +++ b/Framework/Kernel/src/FilteredTimeSeriesProperty.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/FilteredTimeSeriesProperty.h" #include "MantidKernel/DllConfig.h" diff --git a/Framework/Kernel/src/FloatingPointComparison.cpp b/Framework/Kernel/src/FloatingPointComparison.cpp index 9fda602b2ad7521f262daafc05a4b1ff7f4d42cf..3bf62f85b87e04e59c897f87a22f9e9b608e4ba3 100644 --- a/Framework/Kernel/src/FloatingPointComparison.cpp +++ b/Framework/Kernel/src/FloatingPointComparison.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //----------------------------------------------------------------------------- // Includes diff --git a/Framework/Kernel/src/FreeBlock.cpp b/Framework/Kernel/src/FreeBlock.cpp index 856e14590a8a268e4e20bfc51d687fe2c82c4d50..4cb4b382e37cacd07b179a07b2f66bddce64ca15 100644 --- a/Framework/Kernel/src/FreeBlock.cpp +++ b/Framework/Kernel/src/FreeBlock.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + namespace Mantid { namespace Kernel {} // namespace Kernel diff --git a/Framework/Kernel/src/GitHubApiHelper.cpp b/Framework/Kernel/src/GitHubApiHelper.cpp index 766161771964c9715277e80ac143fb8c75ac8da1..216bd8902a13180eea2620ea41d8b82b7452b4d9 100644 --- a/Framework/Kernel/src/GitHubApiHelper.cpp +++ b/Framework/Kernel/src/GitHubApiHelper.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/GitHubApiHelper.h" #include "MantidKernel/DateAndTime.h" diff --git a/Framework/Kernel/src/Glob.cpp b/Framework/Kernel/src/Glob.cpp index baa86b0b5410e9d77faf1d1c9b9d8920ad2f549c..98b123e86c790d48e7a9034ea29582d67df416a9 100644 --- a/Framework/Kernel/src/Glob.cpp +++ b/Framework/Kernel/src/Glob.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/Glob.h" diff --git a/Framework/Kernel/src/ICatalogInfo.cpp b/Framework/Kernel/src/ICatalogInfo.cpp index c8de68e8b0b4fe5703f1fc3c4af15fbaef28e33f..8507f99faee619b37231e1b4b2adf110bea654dc 100644 --- a/Framework/Kernel/src/ICatalogInfo.cpp +++ b/Framework/Kernel/src/ICatalogInfo.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/ICatalogInfo.h" #include <boost/algorithm/string.hpp> diff --git a/Framework/Kernel/src/IPropertyManager.cpp b/Framework/Kernel/src/IPropertyManager.cpp index 99b2026a1a92861ec409912f9b2887266c23228b..77d2357ddf6db75d44445f454eaffee6479ad3f2 100644 --- a/Framework/Kernel/src/IPropertyManager.cpp +++ b/Framework/Kernel/src/IPropertyManager.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/IPropertyManager.h" #include "MantidKernel/IPropertySettings.h" diff --git a/Framework/Kernel/src/ISaveable.cpp b/Framework/Kernel/src/ISaveable.cpp index c7d3ff7319cb4bd24b8f87804e7c933acd8ed6a7..8e9b2f8d3cec582e7ad986bf9d9f379618054013 100644 --- a/Framework/Kernel/src/ISaveable.cpp +++ b/Framework/Kernel/src/ISaveable.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/ISaveable.h" //#include "MantidKernel/INode.h" diff --git a/Framework/Kernel/src/IndexSet.cpp b/Framework/Kernel/src/IndexSet.cpp index ef3a4bd5fa202a96af5bc67525309047ded07b53..a7842786887f74e977d6e0aa099005667b141045 100644 --- a/Framework/Kernel/src/IndexSet.cpp +++ b/Framework/Kernel/src/IndexSet.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include <set> @@ -30,7 +30,7 @@ IndexSet::IndexSet(int64_t min, int64_t max, size_t fullRange) { /// Constructor for a set containing all specified indices. Range is verified at /// construction time and duplicates are removed. -IndexSet::IndexSet(const std::vector<size_t> indices, size_t fullRange) +IndexSet::IndexSet(const std::vector<size_t> &indices, size_t fullRange) : m_isRange(false) { // We use a set to create unique and ordered indices. std::set<size_t> index_set; diff --git a/Framework/Kernel/src/InstrumentInfo.cpp b/Framework/Kernel/src/InstrumentInfo.cpp index aa7a676a5efb461c527767f031e911234dc4db71..e74670862fa720381aa673607cb858cb17551511 100644 --- a/Framework/Kernel/src/InstrumentInfo.cpp +++ b/Framework/Kernel/src/InstrumentInfo.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/Kernel/src/InternetHelper.cpp b/Framework/Kernel/src/InternetHelper.cpp index cd0e68ae7dbf4a8ed7c67d5637f26a1ee3dfae3d..f0e01831318197db535d648fe7dae53a060a9cfa 100644 --- a/Framework/Kernel/src/InternetHelper.cpp +++ b/Framework/Kernel/src/InternetHelper.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/InternetHelper.h" #include "MantidKernel/ConfigService.h" diff --git a/Framework/Kernel/src/Interpolation.cpp b/Framework/Kernel/src/Interpolation.cpp index 9329474ff4dc65e105c5ee5ac289ab656fb549d0..7786c4c5b1b00028723fd61e385f331a4b0574a9 100644 --- a/Framework/Kernel/src/Interpolation.cpp +++ b/Framework/Kernel/src/Interpolation.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/Interpolation.h" #include "MantidKernel/Logger.h" diff --git a/Framework/Kernel/src/InvisibleProperty.cpp b/Framework/Kernel/src/InvisibleProperty.cpp index f9d1e0a0886de00b478cca4a71d7e8e5a24edaea..b809f2e3b03445993f20fc573bc8d45c6d21895a 100644 --- a/Framework/Kernel/src/InvisibleProperty.cpp +++ b/Framework/Kernel/src/InvisibleProperty.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/InvisibleProperty.h" diff --git a/Framework/Kernel/src/LibraryManager.cpp b/Framework/Kernel/src/LibraryManager.cpp index f4f9abf97e33b9db8f45d33c4ea2b764c25c8543..293396cccc1e8503a72f02630f1766efc2dfbb8c 100644 --- a/Framework/Kernel/src/LibraryManager.cpp +++ b/Framework/Kernel/src/LibraryManager.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/LibraryManager.h" #include "MantidKernel/ConfigService.h" diff --git a/Framework/Kernel/src/LibraryWrapper.cpp b/Framework/Kernel/src/LibraryWrapper.cpp index 37073a441eee12f654409f4642ed2a38f763b47c..1d985ccac9c4abef6334029fb99ced33cd451e4a 100644 --- a/Framework/Kernel/src/LibraryWrapper.cpp +++ b/Framework/Kernel/src/LibraryWrapper.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/LibraryWrapper.h" #include "MantidKernel/DllOpen.h" diff --git a/Framework/Kernel/src/LiveListenerInfo.cpp b/Framework/Kernel/src/LiveListenerInfo.cpp index 29213cc8fde27c4f3560f8bcd3dd323e8665e80b..0a343a267d2870e086609195d80cfc09f81ca28e 100644 --- a/Framework/Kernel/src/LiveListenerInfo.cpp +++ b/Framework/Kernel/src/LiveListenerInfo.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/Kernel/src/LogFilter.cpp b/Framework/Kernel/src/LogFilter.cpp index 66028fd4dd4329e20d67fb5efb88948531429715..834fdc6a03c234ec0045df890aa4d92f3ee4d6d4 100644 --- a/Framework/Kernel/src/LogFilter.cpp +++ b/Framework/Kernel/src/LogFilter.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/LogFilter.h" #include "MantidKernel/TimeSeriesProperty.h" diff --git a/Framework/Kernel/src/LogParser.cpp b/Framework/Kernel/src/LogParser.cpp index 156a1ef55239401dcb0a1c6c4a230677e0b8a0f6..51ce15d42030745faa482b9e1ce1a0c4c10350d3 100644 --- a/Framework/Kernel/src/LogParser.cpp +++ b/Framework/Kernel/src/LogParser.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/Kernel/src/Logger.cpp b/Framework/Kernel/src/Logger.cpp index 3a74222d2ae776b1742ae5a15d0a31cee16fc2ab..5befd145017f499a445219a16786c0aae8105211 100644 --- a/Framework/Kernel/src/Logger.cpp +++ b/Framework/Kernel/src/Logger.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/Logger.h" diff --git a/Framework/Kernel/src/MDAxisValidator.cpp b/Framework/Kernel/src/MDAxisValidator.cpp index 510df899ccc5ee127ec2dbdd2563612a784b37f4..405abb83eef889dba4b7936efebce22dfed17b4d 100644 --- a/Framework/Kernel/src/MDAxisValidator.cpp +++ b/Framework/Kernel/src/MDAxisValidator.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/MDAxisValidator.h" diff --git a/Framework/Kernel/src/MDUnit.cpp b/Framework/Kernel/src/MDUnit.cpp index 231880e331d6bfbe5c2be05b045dff55ea022e31..aa645dc518e4cfdbb1e9eafebd679e268a65f605 100644 --- a/Framework/Kernel/src/MDUnit.cpp +++ b/Framework/Kernel/src/MDUnit.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/MDUnit.h" #include "MantidKernel/UnitLabelTypes.h" diff --git a/Framework/Kernel/src/MDUnitFactory.cpp b/Framework/Kernel/src/MDUnitFactory.cpp index 7e56ed3af48135a3b426df6d18321c6713a57821..1c8750c27dacfdebf096d8ebca5dd8b0a1220c2b 100644 --- a/Framework/Kernel/src/MDUnitFactory.cpp +++ b/Framework/Kernel/src/MDUnitFactory.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/MDUnitFactory.h" #include "MantidKernel/UnitLabelTypes.h" diff --git a/Framework/Kernel/src/MagneticIon.cpp b/Framework/Kernel/src/MagneticIon.cpp index 5db06b68a3f2b790463a9a1ce6bb4cb38b86bc99..9a03d8c79e7a819dc22c5662a32c0ad8470964dd 100644 --- a/Framework/Kernel/src/MagneticIon.cpp +++ b/Framework/Kernel/src/MagneticIon.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/MagneticIon.h" diff --git a/Framework/Kernel/src/MandatoryValidator.cpp b/Framework/Kernel/src/MandatoryValidator.cpp index 784510d86864e3af3248feb7179b4c8daafdd60a..bb5618844fbc8adfbb03dba5c2417ebe9e7b2a5e 100644 --- a/Framework/Kernel/src/MandatoryValidator.cpp +++ b/Framework/Kernel/src/MandatoryValidator.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //------------------------------------------ // Includes diff --git a/Framework/Kernel/src/MantidVersion.cpp.in b/Framework/Kernel/src/MantidVersion.cpp.in index 8311a2d38a8309cae4d68f7266923a47a4e467d5..1df92769ad406d775872a7b7bf15241d95ced93d 100644 --- a/Framework/Kernel/src/MantidVersion.cpp.in +++ b/Framework/Kernel/src/MantidVersion.cpp.in @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/Kernel/src/MaskedProperty.cpp b/Framework/Kernel/src/MaskedProperty.cpp index dcf0307174d7bdd53abc9cea7e6646b3dd26cf28..22e9a7dcdda790e2ba8746e3928e13ce4f768164 100644 --- a/Framework/Kernel/src/MaskedProperty.cpp +++ b/Framework/Kernel/src/MaskedProperty.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/MaskedProperty.h" #include "MantidKernel/PropertyHistory.h" @@ -22,7 +22,7 @@ namespace Kernel { */ template <typename TYPE> MaskedProperty<TYPE>::MaskedProperty(const std::string &name, TYPE defaultvalue, - IValidator_sptr validator, + const IValidator_sptr &validator, const unsigned int direction) : Kernel::PropertyWithValue<TYPE>(name, defaultvalue, validator, direction), m_maskedValue("") { diff --git a/Framework/Kernel/src/Material.cpp b/Framework/Kernel/src/Material.cpp index 563a1e1874a0d700fce240dce3d2094060454e31..89ce8accac7611c3a4425bd9529e1813127fc73d 100644 --- a/Framework/Kernel/src/Material.cpp +++ b/Framework/Kernel/src/Material.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/Material.h" #include "MantidKernel/Atom.h" @@ -610,7 +610,7 @@ getAtomName(const std::string &text) // TODO change to get number after letters } // namespace Material::ChemicalFormula -Material::parseChemicalFormula(const std::string chemicalSymbol) { +Material::parseChemicalFormula(const std::string &chemicalSymbol) { Material::ChemicalFormula CF; tokenizer tokens(chemicalSymbol, " -", diff --git a/Framework/Kernel/src/MaterialBuilder.cpp b/Framework/Kernel/src/MaterialBuilder.cpp index 358e8e2b0c97dd43f77c79c4913e039bdb810eea..68e22aa36f006844539234213fc89933bff11c8b 100644 --- a/Framework/Kernel/src/MaterialBuilder.cpp +++ b/Framework/Kernel/src/MaterialBuilder.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/MaterialBuilder.h" #include "MantidKernel/Atom.h" @@ -19,7 +19,7 @@ using PhysicalConstants::NeutronAtom; namespace Kernel { namespace { -inline bool isEmpty(const boost::optional<double> value) { +inline bool isEmpty(const boost::optional<double> &value) { return !value || value == Mantid::EMPTY_DBL(); } } // namespace diff --git a/Framework/Kernel/src/MaterialXMLParser.cpp b/Framework/Kernel/src/MaterialXMLParser.cpp index 9ef257931f0212d265e637d4a6c5dcd80fbee8e3..f1f822fe70c4b0b66631d4d75be047c21833bcdc 100644 --- a/Framework/Kernel/src/MaterialXMLParser.cpp +++ b/Framework/Kernel/src/MaterialXMLParser.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/MaterialXMLParser.h" #include "MantidKernel/MaterialBuilder.h" diff --git a/Framework/Kernel/src/Math/ChebyshevPolyFit.cpp b/Framework/Kernel/src/Math/ChebyshevPolyFit.cpp index 319203101b3ea43bbe6ad32fd3fa9b74736dd66c..736fa8069eb438b76daa6b4a0aa8ea5d155928af 100644 --- a/Framework/Kernel/src/Math/ChebyshevPolyFit.cpp +++ b/Framework/Kernel/src/Math/ChebyshevPolyFit.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //----------------------------------------------------------------------------- // Includes diff --git a/Framework/Kernel/src/Math/Distributions/ChebyshevPolynomial.cpp b/Framework/Kernel/src/Math/Distributions/ChebyshevPolynomial.cpp index 47320483377368a8b7b2b9a40b5bd99f056df0fb..c7e79a0343ef2128a3397d98fc509f7f6edf669c 100644 --- a/Framework/Kernel/src/Math/Distributions/ChebyshevPolynomial.cpp +++ b/Framework/Kernel/src/Math/Distributions/ChebyshevPolynomial.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //----------------------------------------------------------------------------- // Includes diff --git a/Framework/Kernel/src/Math/Distributions/ChebyshevSeries.cpp b/Framework/Kernel/src/Math/Distributions/ChebyshevSeries.cpp index 2aab098f78e8e7bed321197a181788a34516dea7..432ab733a21e276aa5b06da5d567c534c4be179a 100644 --- a/Framework/Kernel/src/Math/Distributions/ChebyshevSeries.cpp +++ b/Framework/Kernel/src/Math/Distributions/ChebyshevSeries.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //----------------------------------------------------------------------------- // Includes diff --git a/Framework/Kernel/src/Matrix.cpp b/Framework/Kernel/src/Matrix.cpp index 603ad3eefda173e7983d4ff53b789cd211d396cb..94639d1db1d1d4f22637e83af9f174495884799a 100644 --- a/Framework/Kernel/src/Matrix.cpp +++ b/Framework/Kernel/src/Matrix.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/Matrix.h" diff --git a/Framework/Kernel/src/MatrixProperty.cpp b/Framework/Kernel/src/MatrixProperty.cpp index 1e6574ee1acb4ed1efb038057d78027553932de6..3a3cc8bad805a0b48b01467363846e438a338e57 100644 --- a/Framework/Kernel/src/MatrixProperty.cpp +++ b/Framework/Kernel/src/MatrixProperty.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/MatrixProperty.h" #include "MantidKernel/IPropertyManager.h" @@ -22,7 +22,7 @@ namespace Kernel { */ template <typename TYPE> MatrixProperty<TYPE>::MatrixProperty(const std::string &propName, - IValidator_sptr validator, + const IValidator_sptr &validator, unsigned int direction) : PropertyWithValue<HeldType>(propName, HeldType(), validator, direction) {} diff --git a/Framework/Kernel/src/Memory.cpp b/Framework/Kernel/src/Memory.cpp index bef2304a89c21d0ba148f87e046480d3059dc4c4..a41b2b733884ac375ed613c8c6408e88fa3b1a3b 100644 --- a/Framework/Kernel/src/Memory.cpp +++ b/Framework/Kernel/src/Memory.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/Memory.h" #include "MantidKernel/Logger.h" diff --git a/Framework/Kernel/src/MersenneTwister.cpp b/Framework/Kernel/src/MersenneTwister.cpp index 9e287257fe2ab7f4b2780f97d715606aa12f2eec..48fcdb7a172be8c3bf7f2e3a8c5c8f9b967e2f12 100644 --- a/Framework/Kernel/src/MersenneTwister.cpp +++ b/Framework/Kernel/src/MersenneTwister.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //------------------------------------------------------------------------------ // Includes diff --git a/Framework/Kernel/src/MultiFileNameParser.cpp b/Framework/Kernel/src/MultiFileNameParser.cpp index 513a52158fb9c009d76cff3727fd9f23e300e09a..b70fc8a6098fae2ad1588b785853d1b3ce6931ca 100644 --- a/Framework/Kernel/src/MultiFileNameParser.cpp +++ b/Framework/Kernel/src/MultiFileNameParser.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/Kernel/src/MultiFileValidator.cpp b/Framework/Kernel/src/MultiFileValidator.cpp index 06bf5141961f5746566fe3b8e270c17ba89bd064..c6a51f4396774c90028a3f75f04f41828f408c3f 100644 --- a/Framework/Kernel/src/MultiFileValidator.cpp +++ b/Framework/Kernel/src/MultiFileValidator.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/MultiFileValidator.h" #include "MantidKernel/Logger.h" diff --git a/Framework/Kernel/src/NDRandomNumberGenerator.cpp b/Framework/Kernel/src/NDRandomNumberGenerator.cpp index f6ef066216be85f4a337f6d135d8bb9b07e7b70f..f5e99c71402271d623f130b01055c97bf6b7a171 100644 --- a/Framework/Kernel/src/NDRandomNumberGenerator.cpp +++ b/Framework/Kernel/src/NDRandomNumberGenerator.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + // // Includes diff --git a/Framework/Kernel/src/NetworkProxyLinux.cpp b/Framework/Kernel/src/NetworkProxyLinux.cpp index 9e67ba2386ec6e012d57af9ac38ab9d690605e3d..20d68217fcbb26dbd5a7839a703d787d80f76b4d 100644 --- a/Framework/Kernel/src/NetworkProxyLinux.cpp +++ b/Framework/Kernel/src/NetworkProxyLinux.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/NetworkProxy.h" #include <Poco/URI.h> diff --git a/Framework/Kernel/src/NetworkProxyOSX.cpp b/Framework/Kernel/src/NetworkProxyOSX.cpp index e08db7d5664c8bd8ed8b9777a33351270d0c7c8c..267d3c6a40299f7ba11c94f51de25b2971bf711c 100644 --- a/Framework/Kernel/src/NetworkProxyOSX.cpp +++ b/Framework/Kernel/src/NetworkProxyOSX.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + // Compile on OSX only. #if defined(__APPLE__) diff --git a/Framework/Kernel/src/NetworkProxyWin.cpp b/Framework/Kernel/src/NetworkProxyWin.cpp index b04c02cb17419fe9725476c1c5c4f2ecb4968549..eb561569f2a4a236c25e924aefbebb8a74b1a949 100644 --- a/Framework/Kernel/src/NetworkProxyWin.cpp +++ b/Framework/Kernel/src/NetworkProxyWin.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + // Only compile on windows. #if defined(_WIN32) || defined(_WIN64) diff --git a/Framework/Kernel/src/NeutronAtom.cpp b/Framework/Kernel/src/NeutronAtom.cpp index f250bed511b818eca11c2d3655cbe6387ec3235d..94531c818aaa83c7a40bd6c72f4f1e1c5d08e892 100644 --- a/Framework/Kernel/src/NeutronAtom.cpp +++ b/Framework/Kernel/src/NeutronAtom.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //------------------------------------------------------------------------------ // Includes diff --git a/Framework/Kernel/src/NexusDescriptor.cpp b/Framework/Kernel/src/NexusDescriptor.cpp index b56b46e2cd3b2b68fffe4033168674dd3ad4fb7f..a6637d6dc4706844a2c512775e8fc24f49b36262 100644 --- a/Framework/Kernel/src/NexusDescriptor.cpp +++ b/Framework/Kernel/src/NexusDescriptor.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/NexusDescriptor.h" @@ -140,8 +140,6 @@ NexusDescriptor::NexusDescriptor(const std::string &filename) } } -/** - */ NexusDescriptor::~NexusDescriptor() {} /// Returns the name & type of the first entry in the file diff --git a/Framework/Kernel/src/NullValidator.cpp b/Framework/Kernel/src/NullValidator.cpp index ae6245e1ecf5fd0e7eaad9756cd9824d2009b821..8602d8f5c64b2ba03473bd22d74e859f7dff2a92 100644 --- a/Framework/Kernel/src/NullValidator.cpp +++ b/Framework/Kernel/src/NullValidator.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/NullValidator.h" #include <boost/make_shared.hpp> diff --git a/Framework/Kernel/src/OptionalBool.cpp b/Framework/Kernel/src/OptionalBool.cpp index 59352e76206d4636c3f6ef074301f36be6c1bafa..b0f6bf83ec0ebad5d334acf37fc93c30d08e0868 100644 --- a/Framework/Kernel/src/OptionalBool.cpp +++ b/Framework/Kernel/src/OptionalBool.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/OptionalBool.h" #include "MantidKernel/Exception.h" diff --git a/Framework/Kernel/src/ParaViewVersion.cpp.in b/Framework/Kernel/src/ParaViewVersion.cpp.in index 94e539febb424ecb5b87f66666b68b64127e9385..c6cd7150b66bd96132f780f179daa52fe90af5df 100644 --- a/Framework/Kernel/src/ParaViewVersion.cpp.in +++ b/Framework/Kernel/src/ParaViewVersion.cpp.in @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/Kernel/src/ProgressBase.cpp b/Framework/Kernel/src/ProgressBase.cpp index 0e6a574b087d5b523f15f10408cb6020d4e93f51..b4d8083a91872f15138a6732bd7d4c452beefed9 100644 --- a/Framework/Kernel/src/ProgressBase.cpp +++ b/Framework/Kernel/src/ProgressBase.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/ProgressBase.h" #include "MantidKernel/Timer.h" diff --git a/Framework/Kernel/src/Property.cpp b/Framework/Kernel/src/Property.cpp index 938358d8e2b8cc063baf842bfe20b322c02ac7f9..80ce3b41c5a3aac31deb449df213400e6d9efd81 100644 --- a/Framework/Kernel/src/Property.cpp +++ b/Framework/Kernel/src/Property.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/Property.h" diff --git a/Framework/Kernel/src/PropertyHistory.cpp b/Framework/Kernel/src/PropertyHistory.cpp index 588766996a7eb34068b68e75cf00369bbebeedf5..3af52b2b93d6b2a2c3f7103dce697e28b7bc32a0 100644 --- a/Framework/Kernel/src/PropertyHistory.cpp +++ b/Framework/Kernel/src/PropertyHistory.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/Kernel/src/PropertyManager.cpp b/Framework/Kernel/src/PropertyManager.cpp index 1e9f8054687ce5e2b9f0635b0ced373f0db76fb3..fb5da0dddb339f995d210402903af4ad0fdc0177 100644 --- a/Framework/Kernel/src/PropertyManager.cpp +++ b/Framework/Kernel/src/PropertyManager.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/Kernel/src/PropertyManagerDataService.cpp b/Framework/Kernel/src/PropertyManagerDataService.cpp index 93e084b4c779b3056c09628d61a3edc703ab5d93..866fb222e8ff9bbe020f045ae825b84cf3d213ac 100644 --- a/Framework/Kernel/src/PropertyManagerDataService.cpp +++ b/Framework/Kernel/src/PropertyManagerDataService.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/PropertyManagerDataService.h" #include "MantidKernel/PropertyManager.h" diff --git a/Framework/Kernel/src/PropertyManagerOwner.cpp b/Framework/Kernel/src/PropertyManagerOwner.cpp index 1925b05688b6dd4998272aa62a25a41c5dc75a9c..926e24a32187f673997e80f7971bb2dc66dc0687 100644 --- a/Framework/Kernel/src/PropertyManagerOwner.cpp +++ b/Framework/Kernel/src/PropertyManagerOwner.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/Kernel/src/PropertyManagerProperty.cpp b/Framework/Kernel/src/PropertyManagerProperty.cpp index f3dc368cb06f22ce3b9c1643297bd2caa70c9300..4a64560d086ae95da2e8acca22c306af37b760ec 100644 --- a/Framework/Kernel/src/PropertyManagerProperty.cpp +++ b/Framework/Kernel/src/PropertyManagerProperty.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/PropertyManagerProperty.h" #include "MantidKernel/PropertyManager.h" diff --git a/Framework/Kernel/src/PropertyNexus.cpp b/Framework/Kernel/src/PropertyNexus.cpp index 6872c1ed7758944716cc7e8ddf1611674519d9b3..9bf9e7fbd1b9bfcdc39d73e2924415d9cfbc2053 100644 --- a/Framework/Kernel/src/PropertyNexus.cpp +++ b/Framework/Kernel/src/PropertyNexus.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/PropertyNexus.h" diff --git a/Framework/Kernel/src/PropertyWithValue.cpp b/Framework/Kernel/src/PropertyWithValue.cpp index eb1172d7bed782715095f4fccf3d2a4e9c340dad..516de9baebd657407356393fbcef732ebddc639a 100644 --- a/Framework/Kernel/src/PropertyWithValue.cpp +++ b/Framework/Kernel/src/PropertyWithValue.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/PropertyWithValue.h" #include "MantidKernel/Matrix.h" diff --git a/Framework/Kernel/src/PropertyWithValueJSON.cpp b/Framework/Kernel/src/PropertyWithValueJSON.cpp index e85224ce007bfb4b70a2ea7a3df1d135cdf570e5..6e59c34f8ac7900ac761e570c48d19d217ab491a 100644 --- a/Framework/Kernel/src/PropertyWithValueJSON.cpp +++ b/Framework/Kernel/src/PropertyWithValueJSON.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/PropertyWithValueJSON.h" #include "MantidKernel/ArrayProperty.h" diff --git a/Framework/Kernel/src/ProxyInfo.cpp b/Framework/Kernel/src/ProxyInfo.cpp index c8b5928f6a67a4c2b62e5f90fcdee5a44f4857a0..642bd6b6f0168bb16a2c1134782e23425de3cb9f 100644 --- a/Framework/Kernel/src/ProxyInfo.cpp +++ b/Framework/Kernel/src/ProxyInfo.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/ProxyInfo.h" #include <stdexcept> diff --git a/Framework/Kernel/src/PseudoRandomNumberGenerator.cpp b/Framework/Kernel/src/PseudoRandomNumberGenerator.cpp index 984ea97461c4699d26f0c15fda230bcec353f096..875e4ac9142949d9f4c05d885ed15fbe72c100d7 100644 --- a/Framework/Kernel/src/PseudoRandomNumberGenerator.cpp +++ b/Framework/Kernel/src/PseudoRandomNumberGenerator.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //------------------------------------------------------------------- // Includes diff --git a/Framework/Kernel/src/Quat.cpp b/Framework/Kernel/src/Quat.cpp index 4a3b29423a67e6e008569b0bacf8f0415e362899..32b0d8807b3687cf9cb602950b2fab27578ebb95 100644 --- a/Framework/Kernel/src/Quat.cpp +++ b/Framework/Kernel/src/Quat.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/Quat.h" #include "MantidKernel/Logger.h" diff --git a/Framework/Kernel/src/ReadLock.cpp b/Framework/Kernel/src/ReadLock.cpp index 74e8628882e8f1253ae85c810971f71e2140f2eb..7f044b6eea85c19f4cceef37fbd02e53c13accc2 100644 --- a/Framework/Kernel/src/ReadLock.cpp +++ b/Framework/Kernel/src/ReadLock.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/ReadLock.h" #include "MantidKernel/DataItem.h" diff --git a/Framework/Kernel/src/RebinParamsValidator.cpp b/Framework/Kernel/src/RebinParamsValidator.cpp index fe647c08ba39555a4586e1d58999f0883e170b0a..e69d1f837e04163bf0abf09a028f6dea2f0b5ead 100644 --- a/Framework/Kernel/src/RebinParamsValidator.cpp +++ b/Framework/Kernel/src/RebinParamsValidator.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/RebinParamsValidator.h" #include <boost/make_shared.hpp> diff --git a/Framework/Kernel/src/RegexStrings.cpp b/Framework/Kernel/src/RegexStrings.cpp index 14557c67b50cd6182961246aeba2bfd5fb55bb92..72556e1d2dd3dfd6dc2c76eac79a4ee3869a3b8d 100644 --- a/Framework/Kernel/src/RegexStrings.cpp +++ b/Framework/Kernel/src/RegexStrings.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/RegexStrings.h" #include "MantidKernel/Logger.h" diff --git a/Framework/Kernel/src/RemoteJobManager.cpp b/Framework/Kernel/src/RemoteJobManager.cpp index 8967710a1e2f2196e44be7bbd00441cf94ea0daf..bb6e28d9b94fabe2ab5049bb0218e59a31e2e081 100644 --- a/Framework/Kernel/src/RemoteJobManager.cpp +++ b/Framework/Kernel/src/RemoteJobManager.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/RemoteJobManager.h" #include "MantidKernel/Logger.h" @@ -17,6 +17,7 @@ #include <Poco/URI.h> #include <sstream> +#include <utility> namespace Mantid { namespace Kernel { @@ -182,21 +183,22 @@ std::istream &RemoteJobManager::httpPost(const std::string &path, // Wrappers for a lot of the boilerplate code needed to perform an HTTPS GET or // POST void RemoteJobManager::initGetRequest(Poco::Net::HTTPRequest &req, - std::string extraPath, - std::string queryString) { - return initHTTPRequest(req, Poco::Net::HTTPRequest::HTTP_GET, extraPath, - queryString); + const std::string &extraPath, + const std::string &queryString) { + return initHTTPRequest(req, Poco::Net::HTTPRequest::HTTP_GET, + std::move(extraPath), std::move(queryString)); } void RemoteJobManager::initPostRequest(Poco::Net::HTTPRequest &req, - std::string extraPath) { - return initHTTPRequest(req, Poco::Net::HTTPRequest::HTTP_POST, extraPath); + const std::string &extraPath) { + return initHTTPRequest(req, Poco::Net::HTTPRequest::HTTP_POST, + std::move(extraPath)); } void RemoteJobManager::initHTTPRequest(Poco::Net::HTTPRequest &req, const std::string &method, - std::string extraPath, - std::string queryString) { + const std::string &extraPath, + const std::string &queryString) { // Set up the session object if (m_session) { diff --git a/Framework/Kernel/src/SimpleJSON.cpp b/Framework/Kernel/src/SimpleJSON.cpp index 158ca2994fa82dc9175be613868956befd451829..865feffe8d9142937e8b83ce8e1a9ee884d34335 100644 --- a/Framework/Kernel/src/SimpleJSON.cpp +++ b/Framework/Kernel/src/SimpleJSON.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /******************************************************************* A cross-platform JSON parser that uses nothing more than C++ and diff --git a/Framework/Kernel/src/SingletonHolder.cpp b/Framework/Kernel/src/SingletonHolder.cpp index d021a5bcf357b0a8e09023eccc38aeb5af7675ad..8d41da9b4ba715dc9bc1e3868b63f918d7fddf61 100644 --- a/Framework/Kernel/src/SingletonHolder.cpp +++ b/Framework/Kernel/src/SingletonHolder.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/SingletonHolder.h" #include <list> @@ -36,7 +36,7 @@ void cleanupSingletons() { /// functions are added to the start of the list so on deletion it is last in, /// first out /// @param func :: Exit function to call - the singleton destructor function -void deleteOnExit(SingletonDeleterFn func) { +void deleteOnExit(const SingletonDeleterFn &func) { auto &deleters = cleanupList(); if (deleters.empty()) { atexit(&cleanupSingletons); diff --git a/Framework/Kernel/src/SobolSequence.cpp b/Framework/Kernel/src/SobolSequence.cpp index 4508244f05e359926d4b8dd4c6be0c5debdeef06..fd301628616cc1abcf4e0d15a7332b0b07bd3483 100644 --- a/Framework/Kernel/src/SobolSequence.cpp +++ b/Framework/Kernel/src/SobolSequence.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //------------------------------------------------------------------- // Includes diff --git a/Framework/Kernel/src/StartsWithValidator.cpp b/Framework/Kernel/src/StartsWithValidator.cpp index 4e4c9109196d51f28e68d0184dd4daeb4195265f..d13f1531d210884df0f141647dba3e36472b501e 100644 --- a/Framework/Kernel/src/StartsWithValidator.cpp +++ b/Framework/Kernel/src/StartsWithValidator.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/StartsWithValidator.h" #ifndef Q_MOC_RUN diff --git a/Framework/Kernel/src/Statistics.cpp b/Framework/Kernel/src/Statistics.cpp index e6c27efb3506b1f6a74befff78bc8110a33c520c..98d57daa45025680a1fd30374d63095a18557ec7 100644 --- a/Framework/Kernel/src/Statistics.cpp +++ b/Framework/Kernel/src/Statistics.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + // Includes #include "MantidKernel/Statistics.h" diff --git a/Framework/Kernel/src/StdoutChannel.cpp b/Framework/Kernel/src/StdoutChannel.cpp index e8f25caf3a9842a565ba887616b128c820f58578..a060aadbce2bbee8f90dc8984c8ee2a1289ff8d2 100644 --- a/Framework/Kernel/src/StdoutChannel.cpp +++ b/Framework/Kernel/src/StdoutChannel.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/StdoutChannel.h" #include <iostream> diff --git a/Framework/Kernel/src/StringContainsValidator.cpp b/Framework/Kernel/src/StringContainsValidator.cpp index 5ad9726e4f980028b342853716485f84166c5578..fcea80db2b38b71443f2123e3d042d1a20b3ebf1 100644 --- a/Framework/Kernel/src/StringContainsValidator.cpp +++ b/Framework/Kernel/src/StringContainsValidator.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/StringContainsValidator.h" #include <boost/make_shared.hpp> diff --git a/Framework/Kernel/src/StringTokenizer.cpp b/Framework/Kernel/src/StringTokenizer.cpp index 5e469c738f51a1599971ced6c126e8380e7d70e1..f47d7c076158b42736e4fcb54e1b5456530bce1e 100644 --- a/Framework/Kernel/src/StringTokenizer.cpp +++ b/Framework/Kernel/src/StringTokenizer.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/StringTokenizer.h" #include <algorithm> diff --git a/Framework/Kernel/src/Strings.cpp b/Framework/Kernel/src/Strings.cpp index c66eece0660b7ddd893fd27bbb6b1a00bee5a365..59e30eee8bf91e91da742eadb46ccf81e076a235 100644 --- a/Framework/Kernel/src/Strings.cpp +++ b/Framework/Kernel/src/Strings.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/Strings.h" #include "MantidKernel/StringTokenizer.h" diff --git a/Framework/Kernel/src/TestChannel.cpp b/Framework/Kernel/src/TestChannel.cpp index 54741ca25f423230fb1bdcf596cd5e7ea9d96ecb..bce922bec21f99fadb70ed7bd1cb7109b140a682 100644 --- a/Framework/Kernel/src/TestChannel.cpp +++ b/Framework/Kernel/src/TestChannel.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //------------------------------------------------------------------------------ // Includes diff --git a/Framework/Kernel/src/ThreadPool.cpp b/Framework/Kernel/src/ThreadPool.cpp index 07362bce691868815a04e5d05e6f090d92cb1700..3a55ae88c8d81ea87f2296f963103ae586902c01 100644 --- a/Framework/Kernel/src/ThreadPool.cpp +++ b/Framework/Kernel/src/ThreadPool.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes @@ -125,7 +125,7 @@ void ThreadPool::start(double waitSec) { * @param task :: pointer to a Task object to run. * @param start :: start the thread at the same time; default false */ -void ThreadPool::schedule(std::shared_ptr<Task> task, bool start) { +void ThreadPool::schedule(const std::shared_ptr<Task> &task, bool start) { if (task) { m_scheduler->push(task); // Start all the threads if they were not already. diff --git a/Framework/Kernel/src/ThreadPoolRunnable.cpp b/Framework/Kernel/src/ThreadPoolRunnable.cpp index 332673bf5374fefd08d3e48192aa392c7e5c8c1f..252443399f1723e07f0edc9ea85f6f9bd9f99901 100644 --- a/Framework/Kernel/src/ThreadPoolRunnable.cpp +++ b/Framework/Kernel/src/ThreadPoolRunnable.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/ThreadPoolRunnable.h" #include "MantidKernel/ProgressBase.h" diff --git a/Framework/Kernel/src/ThreadSafeLogStream.cpp b/Framework/Kernel/src/ThreadSafeLogStream.cpp index 07c2415c70f1cfd05cc899c3d43bc7caef9360d3..ee142a3f5979573c3fb444e7471baf461481f551 100644 --- a/Framework/Kernel/src/ThreadSafeLogStream.cpp +++ b/Framework/Kernel/src/ThreadSafeLogStream.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //----------------------------------------------- // Includes diff --git a/Framework/Kernel/src/TimeSeriesProperty.cpp b/Framework/Kernel/src/TimeSeriesProperty.cpp index dcd59531bfd0f4e71a480356659bb5c14fbbc869..5ff08929001c60a77d4167e94c4e64c6823ed9a0 100644 --- a/Framework/Kernel/src/TimeSeriesProperty.cpp +++ b/Framework/Kernel/src/TimeSeriesProperty.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/TimeSeriesProperty.h" #include "MantidKernel/EmptyValues.h" diff --git a/Framework/Kernel/src/TimeSplitter.cpp b/Framework/Kernel/src/TimeSplitter.cpp index ccccca9ca15bf5acea797388bebf68c5c22aba23..e66dde2e7a95d8fd98373db68192906f766f8bc7 100644 --- a/Framework/Kernel/src/TimeSplitter.cpp +++ b/Framework/Kernel/src/TimeSplitter.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/TimeSplitter.h" diff --git a/Framework/Kernel/src/Timer.cpp b/Framework/Kernel/src/Timer.cpp index 9a8f17e3dca57413f595ebd2f98fb948a16eb00f..d3ccb79631766441bd5bcbba3b6707c5ff86888d 100644 --- a/Framework/Kernel/src/Timer.cpp +++ b/Framework/Kernel/src/Timer.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/Kernel/src/TopicInfo.cpp b/Framework/Kernel/src/TopicInfo.cpp index 83d2bb7f87b1f098843c6123452797cef8b8feef..938fb1b1bfa5d96762335a69b2a0dfc3dec1bcbd 100644 --- a/Framework/Kernel/src/TopicInfo.cpp +++ b/Framework/Kernel/src/TopicInfo.cpp @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #include "MantidKernel/TopicInfo.h" #include "MantidKernel/InstrumentInfo.h" #include "MantidKernel/Logger.h" diff --git a/Framework/Kernel/src/Unit.cpp b/Framework/Kernel/src/Unit.cpp index e8ec4ea8047cdb2e42c29e7319c0ce2e823d4bc9..41373f2e8edd3561f7168d9a3a64779a829f497d 100644 --- a/Framework/Kernel/src/Unit.cpp +++ b/Framework/Kernel/src/Unit.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes @@ -1291,7 +1291,8 @@ double AtomicDistance::conversionTOFMax() const { // ================================================================================ -double timeConversionValue(std::string input_unit, std::string output_unit) { +double timeConversionValue(const std::string &input_unit, + const std::string &output_unit) { std::map<std::string, double> timesList; double seconds = 1.0e9; double milliseconds = 1.0e-3 * seconds; diff --git a/Framework/Kernel/src/UnitConversion.cpp b/Framework/Kernel/src/UnitConversion.cpp index bc196108a1d43c31d6153bdd166a5584acd1edec..3f9a4694fabd87f43d0d6748ac09a8dc07cb8314 100644 --- a/Framework/Kernel/src/UnitConversion.cpp +++ b/Framework/Kernel/src/UnitConversion.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/UnitConversion.h" #include "MantidKernel/Unit.h" diff --git a/Framework/Kernel/src/UnitLabel.cpp b/Framework/Kernel/src/UnitLabel.cpp index 61018a015ea4536b756dddeecab5efa16ea04a0d..a6480bf8115227c542cca0855819b4f8238af4c6 100644 --- a/Framework/Kernel/src/UnitLabel.cpp +++ b/Framework/Kernel/src/UnitLabel.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/UnitLabel.h" #include <cstring> diff --git a/Framework/Kernel/src/UnitLabelTypes.cpp b/Framework/Kernel/src/UnitLabelTypes.cpp index 50a101ceebc6617ff6276a56448c689d05ed1ce8..6665d8f636d5624ba434758d286f6aa848271279 100644 --- a/Framework/Kernel/src/UnitLabelTypes.cpp +++ b/Framework/Kernel/src/UnitLabelTypes.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/UnitLabelTypes.h" #include "MantidKernel/UnitLabel.h" diff --git a/Framework/Kernel/src/UsageService.cpp b/Framework/Kernel/src/UsageService.cpp index 3de84a525e3fdc1aa278b75b03e579f8377c453d..04e6447274301501be555ab312416de00fbc2821 100644 --- a/Framework/Kernel/src/UsageService.cpp +++ b/Framework/Kernel/src/UsageService.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/UsageService.h" #include "MantidKernel/ChecksumHelper.h" diff --git a/Framework/Kernel/src/UserCatalogInfo.cpp b/Framework/Kernel/src/UserCatalogInfo.cpp index f7dbfe3c10c73f3f83a27f76305a344e5cfc952f..eecc966d62441ddde4277cfc98d0c70caa24181d 100644 --- a/Framework/Kernel/src/UserCatalogInfo.cpp +++ b/Framework/Kernel/src/UserCatalogInfo.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/UserCatalogInfo.h" diff --git a/Framework/Kernel/src/UserStringParser.cpp b/Framework/Kernel/src/UserStringParser.cpp index 6dae4e0a860a22cd039777af9ed1ec7ebf25edb9..66fb0a3e38e743b6b14b9cb2f6b2c6937793153f 100644 --- a/Framework/Kernel/src/UserStringParser.cpp +++ b/Framework/Kernel/src/UserStringParser.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/Kernel/src/Utils.cpp b/Framework/Kernel/src/Utils.cpp index 2226144d0e5efef10819aa6406ecb8c6d5eecba7..4597ece896d8675bcdd52078fd70116736a2eed4 100644 --- a/Framework/Kernel/src/Utils.cpp +++ b/Framework/Kernel/src/Utils.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + namespace Mantid { namespace Kernel { diff --git a/Framework/Kernel/src/V2D.cpp b/Framework/Kernel/src/V2D.cpp index ba0ea82eb5ce53926940e0d67ab4b5eeb0e929e9..d8db70e57bf9cb8b284d0101d571e861874963ae 100644 --- a/Framework/Kernel/src/V2D.cpp +++ b/Framework/Kernel/src/V2D.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/V2D.h" #include "MantidKernel/Exception.h" diff --git a/Framework/Kernel/src/V3D.cpp b/Framework/Kernel/src/V3D.cpp index e178757565335d85eb93638af678930254b8c3e8..d805bd36d5d18ef1e04f1e47a7a78f8c3f42478b 100644 --- a/Framework/Kernel/src/V3D.cpp +++ b/Framework/Kernel/src/V3D.cpp @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #include "MantidKernel/V3D.h" #include "MantidKernel/Matrix.h" #include "MantidKernel/Quat.h" diff --git a/Framework/Kernel/src/VMD.cpp b/Framework/Kernel/src/VMD.cpp index a4f3efd85bf20d83207272730281d47fcdb7690b..748f950a1168c9bc886c42a4bcbaee2eae5f64a6 100644 --- a/Framework/Kernel/src/VMD.cpp +++ b/Framework/Kernel/src/VMD.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/VMD.h" #include "MantidKernel/Matrix.h" diff --git a/Framework/Kernel/src/VectorHelper.cpp b/Framework/Kernel/src/VectorHelper.cpp index ae53d4dfdd1a86bf46e2a5da46262bf063888388..302f88f0fdde5fe88dd7b38746f42f8a191310c2 100644 --- a/Framework/Kernel/src/VectorHelper.cpp +++ b/Framework/Kernel/src/VectorHelper.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include <cmath> #include <stdexcept> diff --git a/Framework/Kernel/src/VisibleWhenProperty.cpp b/Framework/Kernel/src/VisibleWhenProperty.cpp index b0121b557f487c437653d337d4cdfec38c624c58..82adc3a460d1a945def9e28211a6ca913f06874f 100644 --- a/Framework/Kernel/src/VisibleWhenProperty.cpp +++ b/Framework/Kernel/src/VisibleWhenProperty.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/VisibleWhenProperty.h" #include <memory> @@ -16,9 +16,9 @@ namespace Kernel { * @param value :: For the IS_EQUAL_TO or IS_NOT_EQUAL_TO condition, the value * (as string) to check for */ -VisibleWhenProperty::VisibleWhenProperty(std::string otherPropName, +VisibleWhenProperty::VisibleWhenProperty(const std::string &otherPropName, ePropertyCriterion when, - std::string value) + const std::string &value) : EnabledWhenProperty(otherPropName, when, value) {} /** Multiple conditions constructor - takes two VisibleWhenProperty diff --git a/Framework/Kernel/src/WriteLock.cpp b/Framework/Kernel/src/WriteLock.cpp index 8561788717069e5a325abc172c983bca81970e21..337e80b83e04005077fdce211198879911d7cee1 100644 --- a/Framework/Kernel/src/WriteLock.cpp +++ b/Framework/Kernel/src/WriteLock.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/WriteLock.h" #include "MantidKernel/DataItem.h" diff --git a/Framework/Kernel/test/ArrayBoundedValidatorTest.h b/Framework/Kernel/test/ArrayBoundedValidatorTest.h index da262d0a199bafc007d984479a260818683bf78d..ee499b9b36c6349fe9bececd42646975fefc2087 100644 --- a/Framework/Kernel/test/ArrayBoundedValidatorTest.h +++ b/Framework/Kernel/test/ArrayBoundedValidatorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/ArrayLengthValidatorTest.h b/Framework/Kernel/test/ArrayLengthValidatorTest.h index 2ddba80cd7626ee1164fad0e40abe12d6fd48e2d..28feb942ef2399538a66d222377cb7a2c1e94932 100644 --- a/Framework/Kernel/test/ArrayLengthValidatorTest.h +++ b/Framework/Kernel/test/ArrayLengthValidatorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/ArrayOrderedPairsValidatorTest.h b/Framework/Kernel/test/ArrayOrderedPairsValidatorTest.h index e4df9f516e76586c076f19268ac0eae3b8eebb5d..4509617d71caba95a17d702f9bc488d9e8aea0ff 100644 --- a/Framework/Kernel/test/ArrayOrderedPairsValidatorTest.h +++ b/Framework/Kernel/test/ArrayOrderedPairsValidatorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/ArrayPropertyTest.h b/Framework/Kernel/test/ArrayPropertyTest.h index 8b8d2dae900cdd6b65a78511f8ed8e92730cbad6..fb0753671ba8aa1c58a0791802a532b83272ab9d 100644 --- a/Framework/Kernel/test/ArrayPropertyTest.h +++ b/Framework/Kernel/test/ArrayPropertyTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/AtomTest.h b/Framework/Kernel/test/AtomTest.h index 1efbd65ead297cb1d8666fbcd4e571054a01c740..e379c5521eec833d574f92ce7a62087ccd5b76d4 100644 --- a/Framework/Kernel/test/AtomTest.h +++ b/Framework/Kernel/test/AtomTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/BinFinderTest.h b/Framework/Kernel/test/BinFinderTest.h index df22f0cdee90a2283ef45edb76effa7316f0bab8..17143351639f6060c3e34be73b88edc349530c93 100644 --- a/Framework/Kernel/test/BinFinderTest.h +++ b/Framework/Kernel/test/BinFinderTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/BinaryFileTest.h b/Framework/Kernel/test/BinaryFileTest.h index 9b619e041021e1c9c85ea341f7b074183a03a266..9f6440199afa45072cfbb60a4d406f5eb3beb0f2 100644 --- a/Framework/Kernel/test/BinaryFileTest.h +++ b/Framework/Kernel/test/BinaryFileTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -33,7 +33,7 @@ struct DasEvent { }; /** Creates a dummy file with so many bytes */ -static void MakeDummyFile(std::string filename, size_t num_bytes) { +static void MakeDummyFile(const std::string &filename, size_t num_bytes) { std::vector<char> buffer(num_bytes); for (size_t i = 0; i < num_bytes; i++) { // Put 1,2,3 in 32-bit ints diff --git a/Framework/Kernel/test/BinaryStreamReaderTest.h b/Framework/Kernel/test/BinaryStreamReaderTest.h index 7e2333928e70e794824f2d1ae0a01d2753f68bc4..9a854249f62a46a972553d5c49deeb143c52784d 100644 --- a/Framework/Kernel/test/BinaryStreamReaderTest.h +++ b/Framework/Kernel/test/BinaryStreamReaderTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/BinaryStreamWriterTest.h b/Framework/Kernel/test/BinaryStreamWriterTest.h index a5e764a88a02c8641002587c15c9c50ca7c98660..7539ff064a7a339f2ca14ebd90204c26adc2e8c6 100644 --- a/Framework/Kernel/test/BinaryStreamWriterTest.h +++ b/Framework/Kernel/test/BinaryStreamWriterTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/BoundedValidatorTest.h b/Framework/Kernel/test/BoundedValidatorTest.h index bee69ede1e0cb2ce34b72ae8727b25718404ef01..e79e253e2aa41d03e2f87984c22c1a238f87396c 100644 --- a/Framework/Kernel/test/BoundedValidatorTest.h +++ b/Framework/Kernel/test/BoundedValidatorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/CMakeLists.txt b/Framework/Kernel/test/CMakeLists.txt index a01fe11e3e55741ab95e2ce0216cda730f57198d..639691b4e98b9aa4e529667f5148c138de428b90 100644 --- a/Framework/Kernel/test/CMakeLists.txt +++ b/Framework/Kernel/test/CMakeLists.txt @@ -11,8 +11,6 @@ if(CXXTEST_FOUND) cxxtest_add_test(KernelTest ${TEST_FILES}) target_include_directories(KernelTest SYSTEM PRIVATE ${CXXTEST_INCLUDE_DIR} - ${GMOCK_INCLUDE_DIR} - ${GTEST_INCLUDE_DIR} ../../TestHelpers/inc) target_link_libraries(KernelTest PRIVATE @@ -22,8 +20,7 @@ if(CXXTEST_FOUND) ${NEXUS_LIBRARIES} ${Boost_LIBRARIES} ${POCO_LIBRARIES} - ${GMOCK_LIBRARIES} - ${GTEST_LIBRARIES} + gmock ${JSONCPP_LIBRARIES} ${TBB_LIBRARIES} ${TBB_MALLOC_LIBRARIES}) diff --git a/Framework/Kernel/test/CPUTimerTest.h b/Framework/Kernel/test/CPUTimerTest.h index 216db90037ec5cdab93ebd63417371a0cc1b6e9b..96d09d4cb502b90bff63b59ffee38fb01cc35aec 100644 --- a/Framework/Kernel/test/CPUTimerTest.h +++ b/Framework/Kernel/test/CPUTimerTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/CacheTest.h b/Framework/Kernel/test/CacheTest.h index c6eb31374d08389302257a387ab206be7ff6dda0..ca63ecbec12aab2996dcfdd0943f3ace1eda0806 100644 --- a/Framework/Kernel/test/CacheTest.h +++ b/Framework/Kernel/test/CacheTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/CatalogInfoTest.h b/Framework/Kernel/test/CatalogInfoTest.h index 720744101e81f3634ae4d99c6af94e6e5135d9ac..c16511aafd3ecd7b668d4f308d4319c6321601da 100644 --- a/Framework/Kernel/test/CatalogInfoTest.h +++ b/Framework/Kernel/test/CatalogInfoTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/ChebyshevPolyFitTest.h b/Framework/Kernel/test/ChebyshevPolyFitTest.h index e6ef5cbfad7b98f65454035862e36d78afa05310..3e43079b7d020ea888cc6e96c1b8ade61e1dbe33 100644 --- a/Framework/Kernel/test/ChebyshevPolyFitTest.h +++ b/Framework/Kernel/test/ChebyshevPolyFitTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/ChebyshevPolynomialTest.h b/Framework/Kernel/test/ChebyshevPolynomialTest.h index 632b5066ce5e69aadb20e02ecc76de7e09cd71a5..1b90b1d3315322ecb04eb626eaf15653dae610b9 100644 --- a/Framework/Kernel/test/ChebyshevPolynomialTest.h +++ b/Framework/Kernel/test/ChebyshevPolynomialTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/ChebyshevSeriesTest.h b/Framework/Kernel/test/ChebyshevSeriesTest.h index 00380d3388f05e6cf901605ba4774c9dbfb8e129..71cdb69dc63f32318b5831abe77e2af1e0df88af 100644 --- a/Framework/Kernel/test/ChebyshevSeriesTest.h +++ b/Framework/Kernel/test/ChebyshevSeriesTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/ChecksumHelperTest.h b/Framework/Kernel/test/ChecksumHelperTest.h index 2646b9d2aab1a45131ee018919bdeef5178ef788..e9c73c7dbe442b4527399e2b3a6d5f5f34938c45 100644 --- a/Framework/Kernel/test/ChecksumHelperTest.h +++ b/Framework/Kernel/test/ChecksumHelperTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/CompositeValidatorTest.h b/Framework/Kernel/test/CompositeValidatorTest.h index a1cc12aa90416ddd9c61a3315b09ae0f52671f7e..153c3b683412cb7c20e455cc8f6800733769b9fd 100644 --- a/Framework/Kernel/test/CompositeValidatorTest.h +++ b/Framework/Kernel/test/CompositeValidatorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/ComputeResourceInfoTest.h b/Framework/Kernel/test/ComputeResourceInfoTest.h index c734fba9fe12a8f3b64d869f4d5d0715a6fe7806..357955ffde6457e1c7d4203a34c9cb5910c69708 100644 --- a/Framework/Kernel/test/ComputeResourceInfoTest.h +++ b/Framework/Kernel/test/ComputeResourceInfoTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/ConfigObserverTest.h b/Framework/Kernel/test/ConfigObserverTest.h index 33cd99cf272847f15f5be40b9caa1c3c2c43bc3b..e65e4f8b0eb969e40dac1e0d6ab3c4462c90e9fc 100644 --- a/Framework/Kernel/test/ConfigObserverTest.h +++ b/Framework/Kernel/test/ConfigObserverTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/ConfigPropertyObserverTest.h b/Framework/Kernel/test/ConfigPropertyObserverTest.h index 190c3cb85d059422d86572567cd2254c5c0d7c0a..9982dbd761b2a028d362ebf532ce475e1c2c1f2a 100644 --- a/Framework/Kernel/test/ConfigPropertyObserverTest.h +++ b/Framework/Kernel/test/ConfigPropertyObserverTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -15,7 +15,7 @@ using namespace Mantid::Kernel; template <typename Callback> class MockObserver : ConfigPropertyObserver { public: - MockObserver(std::string propertyName, Callback callback) + MockObserver(const std::string &propertyName, Callback callback) : ConfigPropertyObserver(std::move(propertyName)), m_callback(callback) {} protected: @@ -41,8 +41,6 @@ public: ConfigService::Instance().getString("datasearch.directories"); m_defaultSaveDirectory = ConfigService::Instance().getString("defaultsave.directory"); - m_retainedAlgorithms = - ConfigService::Instance().getString("algorithms.retained"); } void tearDown() override { @@ -50,8 +48,6 @@ public: m_searchDirectories); ConfigService::Instance().setString("defaultsave.directory", m_defaultSaveDirectory); - ConfigService::Instance().setString("algorithms.retained", - m_retainedAlgorithms); } void testRecievesCallbackForSearchDirectoryChange() { @@ -96,7 +92,7 @@ public: }); auto callCountB = 0; auto observerB = - makeMockObserver("algorithms.retained", + makeMockObserver("projectRecovery.secondsBetween", [&callCountB](const std::string &newValue, const std::string &prevValue) -> void { UNUSED_ARG(newValue); @@ -105,7 +101,8 @@ public: }); ConfigService::Instance().setString("datasearch.directories", "/dev/null"); - ConfigService::Instance().setString("algorithms.retained", "40"); + ConfigService::Instance().setString("projectRecovery.secondsBetween", + "600"); TS_ASSERT_EQUALS(1, callCountA); TS_ASSERT_EQUALS(1, callCountB); diff --git a/Framework/Kernel/test/ConfigServiceTest.h b/Framework/Kernel/test/ConfigServiceTest.h index 6b1221e23124e156cb6596825f795c6222fb3a91..384476a09cbc3ef59b4fe75bba5527caf10e7485 100644 --- a/Framework/Kernel/test/ConfigServiceTest.h +++ b/Framework/Kernel/test/ConfigServiceTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -329,21 +329,20 @@ public: void TestCustomProperty() { std::string countString = - ConfigService::Instance().getString("algorithms.retained"); - TS_ASSERT_EQUALS(countString, "50"); + ConfigService::Instance().getString("projectRecovery.secondsBetween"); + TS_ASSERT_EQUALS(countString, "60"); } void TestCustomPropertyAsValue() { - // Mantid.legs is defined in the properties script as 6 int value = ConfigService::Instance() - .getValue<int>("algorithms.retained") + .getValue<int>("projectRecovery.secondsBetween") .get_value_or(0); double dblValue = ConfigService::Instance() - .getValue<double>("algorithms.retained") + .getValue<double>("projectRecovery.secondsBetween") .get_value_or(0); - TS_ASSERT_EQUALS(value, 50); - TS_ASSERT_EQUALS(dblValue, 50.0); + TS_ASSERT_EQUALS(value, 60); + TS_ASSERT_EQUALS(dblValue, 60.0); } void TestMissingProperty() { diff --git a/Framework/Kernel/test/CowPtrTest.h b/Framework/Kernel/test/CowPtrTest.h index 80c19f726bda0a055749930750b1b57ca0c782c4..5736a8dee62a2ad73e15066b772ce1b91c2a0e69 100644 --- a/Framework/Kernel/test/CowPtrTest.h +++ b/Framework/Kernel/test/CowPtrTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -10,6 +10,7 @@ #include <boost/make_shared.hpp> #include <boost/shared_ptr.hpp> #include <cxxtest/TestSuite.h> +#include <memory> using namespace Mantid::Kernel; @@ -38,9 +39,8 @@ public: } void testConstructorByPtr() { - - auto *resource = new MyType{2}; - cow_ptr<MyType> cow{resource}; + auto resource = std::make_unique<MyType>(2); + cow_ptr<MyType> cow{resource.release()}; TSM_ASSERT_EQUALS("COW does not hold the expected value", 2, cow->value); } diff --git a/Framework/Kernel/test/DataServiceTest.h b/Framework/Kernel/test/DataServiceTest.h index 3eaab610b57f7420c6bc986e0ca9a6fedfb906e4..a8dde784a234cdf859d40241e4c567009c011255 100644 --- a/Framework/Kernel/test/DataServiceTest.h +++ b/Framework/Kernel/test/DataServiceTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/DateAndTimeHelpersTest.h b/Framework/Kernel/test/DateAndTimeHelpersTest.h index c4aae36c6b22a70107de23a76402d9d3027ce48c..f2d3560542b565360c9a8871a400efa4acd59c96 100644 --- a/Framework/Kernel/test/DateAndTimeHelpersTest.h +++ b/Framework/Kernel/test/DateAndTimeHelpersTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/DateAndTimeTest.h b/Framework/Kernel/test/DateAndTimeTest.h index 64ab9c4bce6a7efb8dd3b59aa4ca48c24b9ebd15..cd254ebcd084b49b68394f1c1392b70b2bd46393 100644 --- a/Framework/Kernel/test/DateAndTimeTest.h +++ b/Framework/Kernel/test/DateAndTimeTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /* * DateAndTimeTest.h diff --git a/Framework/Kernel/test/DateTimeValidatorTest.h b/Framework/Kernel/test/DateTimeValidatorTest.h index 46d99551d79e2c7b1448b6dd6f04860f1ebc30a8..9fe089d3ab4d4f009731c28e34ba4a1015602f4c 100644 --- a/Framework/Kernel/test/DateTimeValidatorTest.h +++ b/Framework/Kernel/test/DateTimeValidatorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/DateValidatorTest.h b/Framework/Kernel/test/DateValidatorTest.h index d07e9009c4f1d02066efe508f1d5809da59ee8aa..1133d8c536a7bab641a20545b5ec16dfb1b3d4da 100644 --- a/Framework/Kernel/test/DateValidatorTest.h +++ b/Framework/Kernel/test/DateValidatorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/DeltaEModeTest.h b/Framework/Kernel/test/DeltaEModeTest.h index be1ad41cec826e8a850b62d24287a17938af1a78..073c829ae490053e2b8122cc0ed82bf527cb2c89 100644 --- a/Framework/Kernel/test/DeltaEModeTest.h +++ b/Framework/Kernel/test/DeltaEModeTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/DiffractionTest.h b/Framework/Kernel/test/DiffractionTest.h index a8d2c51db8ec023c279c8145dd851bf642c6526b..e297bd4c0f3f1a6cea0e5cda20a7ab20ad7d790c 100644 --- a/Framework/Kernel/test/DiffractionTest.h +++ b/Framework/Kernel/test/DiffractionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/DirectoryValidatorTest.h b/Framework/Kernel/test/DirectoryValidatorTest.h index 6f009981b92d2a834c1aed758d40f0705df5c135..27178bcde085762acc731726f6aaa86836bd98fc 100644 --- a/Framework/Kernel/test/DirectoryValidatorTest.h +++ b/Framework/Kernel/test/DirectoryValidatorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/DiskBufferISaveableTest.h b/Framework/Kernel/test/DiskBufferISaveableTest.h index 9b9f3590fb45cc9bfc216c429518a43bcc136b36..17e8161a1997301afee48ec4d6f14e3769f4834e 100644 --- a/Framework/Kernel/test/DiskBufferISaveableTest.h +++ b/Framework/Kernel/test/DiskBufferISaveableTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/DiskBufferTest.h b/Framework/Kernel/test/DiskBufferTest.h index 7262b9c1022613054b1cf23ca86e4f97f597bb1e..12d47d7811bb0812b80ff81a79d1a8dd9046f9d5 100644 --- a/Framework/Kernel/test/DiskBufferTest.h +++ b/Framework/Kernel/test/DiskBufferTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/DllOpenTest.h b/Framework/Kernel/test/DllOpenTest.h index 8d71bf4f5b0f5680e756ad19a59e0281eb474d85..7b37caf67d4bd207d9b58b0c6e003579776ebb4c 100644 --- a/Framework/Kernel/test/DllOpenTest.h +++ b/Framework/Kernel/test/DllOpenTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/DynamicFactoryTest.h b/Framework/Kernel/test/DynamicFactoryTest.h index c7f25b6cee56c945a1bb3f28064f02b13fe9301e..496f3971d325c262eb6ccc71fad87b2784838a98 100644 --- a/Framework/Kernel/test/DynamicFactoryTest.h +++ b/Framework/Kernel/test/DynamicFactoryTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/EigenConversionHelpersTest.h b/Framework/Kernel/test/EigenConversionHelpersTest.h index 175a74ff573ea4593273ff1e1a2f78c3435df310..81a5b92b1c63e1f0c8abe565df2440c30838203d 100644 --- a/Framework/Kernel/test/EigenConversionHelpersTest.h +++ b/Framework/Kernel/test/EigenConversionHelpersTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/EnabledWhenPropertyTest.h b/Framework/Kernel/test/EnabledWhenPropertyTest.h index b979fe8d0ff069bde87ce45eaf33d3f520bc3ecc..ae047fa0f920a4af376f1c5c36306b5ab0d1f65d 100644 --- a/Framework/Kernel/test/EnabledWhenPropertyTest.h +++ b/Framework/Kernel/test/EnabledWhenPropertyTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/EnvironmentHistoryTest.h b/Framework/Kernel/test/EnvironmentHistoryTest.h index 1f7a1b7efdec988df76a123c1f91d3988c743dd0..0efc0bdf3487e37e0f173da0153b03cdd75bf32f 100644 --- a/Framework/Kernel/test/EnvironmentHistoryTest.h +++ b/Framework/Kernel/test/EnvironmentHistoryTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/EqualBinsCheckerTest.h b/Framework/Kernel/test/EqualBinsCheckerTest.h index 0f70e94e60ccefb34a22b7331f8a06bf8a42e50f..1d812556a6ca1adb88045549eb5678585e49d06e 100644 --- a/Framework/Kernel/test/EqualBinsCheckerTest.h +++ b/Framework/Kernel/test/EqualBinsCheckerTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/ErrorReporterTest.h b/Framework/Kernel/test/ErrorReporterTest.h index 869a20e7702aa08f153675e71b6eacdee69277ad..eb8f31f0e1f1d9fecc8fc5237f4202d508a3b6e5 100644 --- a/Framework/Kernel/test/ErrorReporterTest.h +++ b/Framework/Kernel/test/ErrorReporterTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/FacilitiesTest.h b/Framework/Kernel/test/FacilitiesTest.h index 95d46b0681c4176f6c108831c9da75138f67ff72..d99591d1ee56456a54441f3e28f5708484039df5 100644 --- a/Framework/Kernel/test/FacilitiesTest.h +++ b/Framework/Kernel/test/FacilitiesTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/FileDescriptorTest.h b/Framework/Kernel/test/FileDescriptorTest.h index 4e2a44f8e18c5499bc3e3d69de362c0898379247..ba5ddbf03ac49d8d929c6938a8b8bde937507c31 100644 --- a/Framework/Kernel/test/FileDescriptorTest.h +++ b/Framework/Kernel/test/FileDescriptorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/FileValidatorTest.h b/Framework/Kernel/test/FileValidatorTest.h index 380c145a1d2bff6941f81b3bd31d9ccc1c364a73..dcae0c66c8e325774a97e1d9619f45c5dea5143e 100644 --- a/Framework/Kernel/test/FileValidatorTest.h +++ b/Framework/Kernel/test/FileValidatorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/FilteredTimeSeriesPropertyTest.h b/Framework/Kernel/test/FilteredTimeSeriesPropertyTest.h index 819e754ef21f0cf10a3bfb30dc81b064750459be..3d42f3c9d910058d9308bed82291f6112e634016 100644 --- a/Framework/Kernel/test/FilteredTimeSeriesPropertyTest.h +++ b/Framework/Kernel/test/FilteredTimeSeriesPropertyTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/FloatingPointComparisonTest.h b/Framework/Kernel/test/FloatingPointComparisonTest.h index 41b9178dec42ab8aa29b8b0edb5df3b67f3a07d1..58945e3b77c3c638ebca9b57d375876d4fe7c114 100644 --- a/Framework/Kernel/test/FloatingPointComparisonTest.h +++ b/Framework/Kernel/test/FloatingPointComparisonTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/FreeBlockTest.h b/Framework/Kernel/test/FreeBlockTest.h index 8d903fcbed5563bf12f07e9605328fb0adda93d4..bb4f37f4af1df086c08a3b5d5562f27262a888eb 100644 --- a/Framework/Kernel/test/FreeBlockTest.h +++ b/Framework/Kernel/test/FreeBlockTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/FunctionTaskTest.h b/Framework/Kernel/test/FunctionTaskTest.h index 2ce938fd42ed0d3e0186b6aaf7d43dd6a59255c9..8aa72cd8ec13a87da64dd842a3cbafc4d3fffd5a 100644 --- a/Framework/Kernel/test/FunctionTaskTest.h +++ b/Framework/Kernel/test/FunctionTaskTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/GlobTest.h b/Framework/Kernel/test/GlobTest.h index a30bd5bbb5e10a84e64197546e7ab481c1fd8f27..64917eccdcc720f3d2c95768c2198ae69c7ebdf2 100644 --- a/Framework/Kernel/test/GlobTest.h +++ b/Framework/Kernel/test/GlobTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/IPropertySettingsTest.h b/Framework/Kernel/test/IPropertySettingsTest.h index 95bfbd8f3466a8b51c0ee22d0cbc80864ee32db2..c510ffa3ceec84b555d47750f54194a085516fa2 100644 --- a/Framework/Kernel/test/IPropertySettingsTest.h +++ b/Framework/Kernel/test/IPropertySettingsTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/ISaveableTest.h b/Framework/Kernel/test/ISaveableTest.h index 37be4e4ac0298824bada7670d7ebb1cbd151ac91..a85f2511ce128fc22c65044d2fdce6ba638d44e3 100644 --- a/Framework/Kernel/test/ISaveableTest.h +++ b/Framework/Kernel/test/ISaveableTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/IValidatorTest.h b/Framework/Kernel/test/IValidatorTest.h index 5e67e421d3de333c1bab907c6f1687ef1662f3a3..1934c2224b5793522a4f97ece28440eb7c227427 100644 --- a/Framework/Kernel/test/IValidatorTest.h +++ b/Framework/Kernel/test/IValidatorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/IndexSetTest.h b/Framework/Kernel/test/IndexSetTest.h index 378475b5410d9794793e8bab5c965d1edafedd19..653e037d494164bf399755947bc6d6f6aa21e624 100644 --- a/Framework/Kernel/test/IndexSetTest.h +++ b/Framework/Kernel/test/IndexSetTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/InstrumentInfoTest.h b/Framework/Kernel/test/InstrumentInfoTest.h index 8f9efca7bf500f00629bc532738bc9fd1f2a7617..36f123a629146a710082058189f5da317193bcce 100644 --- a/Framework/Kernel/test/InstrumentInfoTest.h +++ b/Framework/Kernel/test/InstrumentInfoTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/InternetHelperTest.h b/Framework/Kernel/test/InternetHelperTest.h index ecced68fccea24c80ccd7a95c6e95de8b763f445..2cd68fe21f10e6d65657218b1429f67a58462998 100644 --- a/Framework/Kernel/test/InternetHelperTest.h +++ b/Framework/Kernel/test/InternetHelperTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/InterpolationTest.h b/Framework/Kernel/test/InterpolationTest.h index d843149eefe50465a3025870aa88adecfe60f6d2..0eb9dabb760bb2a81f428178af28808763e6280e 100644 --- a/Framework/Kernel/test/InterpolationTest.h +++ b/Framework/Kernel/test/InterpolationTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -257,8 +257,8 @@ public: } private: - Interpolation getInitializedInterpolation(std::string xUnit, - std::string yUnit) { + Interpolation getInitializedInterpolation(const std::string &xUnit, + const std::string &yUnit) { Interpolation interpolation; // take values from constructor @@ -316,7 +316,7 @@ private: * It takes a string argument to make it more obvious where the problem is. */ void checkValue(const Interpolation &interpolation, double x, double y, - std::string testedRange) { + const std::string &testedRange) { std::ostringstream errorString; errorString << "Interpolation error " << testedRange; diff --git a/Framework/Kernel/test/InvisiblePropertyTest.h b/Framework/Kernel/test/InvisiblePropertyTest.h index 367beceb8c3aedb10932cca5dfcb3a3ec075fb53..ec0e162698914e5f988e8d9b3eb1df27b48f23b6 100644 --- a/Framework/Kernel/test/InvisiblePropertyTest.h +++ b/Framework/Kernel/test/InvisiblePropertyTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/ListValidatorTest.h b/Framework/Kernel/test/ListValidatorTest.h index c204601ec9e39fa240d74caec6e9f6717f3a77a2..321a2ff7aed74c57354d4bef83953b89dba72423 100644 --- a/Framework/Kernel/test/ListValidatorTest.h +++ b/Framework/Kernel/test/ListValidatorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/LiveListenerInfoTest.h b/Framework/Kernel/test/LiveListenerInfoTest.h index 16ad23da52f960aaadb94ec2988742611623de61..39accc62a771056fb9c48ed953f42d3c75632406 100644 --- a/Framework/Kernel/test/LiveListenerInfoTest.h +++ b/Framework/Kernel/test/LiveListenerInfoTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/LogFilterTest.h b/Framework/Kernel/test/LogFilterTest.h index 5cbcfa8615b0aaf185f8ba9b96c7340fa2fd0167..8006f4ca5a46ba104823be564a4851614686479c 100644 --- a/Framework/Kernel/test/LogFilterTest.h +++ b/Framework/Kernel/test/LogFilterTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/LogParserTest.h b/Framework/Kernel/test/LogParserTest.h index 56f6a367920fac0c6dc3058385910776e642786a..47f6e248f6eb27b6d50948a2afe6c9f78c01672f 100644 --- a/Framework/Kernel/test/LogParserTest.h +++ b/Framework/Kernel/test/LogParserTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -69,10 +69,10 @@ public: const auto &ti_data1 = v->first.to_tm(); TS_ASSERT_EQUALS(ti_data1.tm_hour, 12); TS_ASSERT_EQUALS(ti_data1.tm_min, 22); - v++; - v++; - v++; - v++; + ++v; + ++v; + ++v; + ++v; // time 5 const auto &ti_data5 = v->first.to_tm(); TS_ASSERT_EQUALS(ti_data5.tm_hour, 12); @@ -119,10 +119,10 @@ public: const auto &ti_data1 = v->first.to_tm(); TS_ASSERT_EQUALS(ti_data1.tm_hour, 12); TS_ASSERT_EQUALS(ti_data1.tm_min, 22); - v++; - v++; - v++; - v++; + ++v; + ++v; + ++v; + ++v; // time 5 const auto &ti_data5 = v->first.to_tm(); TS_ASSERT_EQUALS(ti_data5.tm_hour, 12); @@ -156,10 +156,10 @@ public: const auto &ti_data1 = v->first.to_tm(); TS_ASSERT_EQUALS(ti_data1.tm_hour, 12); TS_ASSERT_EQUALS(ti_data1.tm_min, 22); - v++; - v++; - v++; - v++; + ++v; + ++v; + ++v; + ++v; // time 5 const auto &ti_data5 = v->first.to_tm(); TS_ASSERT_EQUALS(ti_data5.tm_hour, 12); @@ -216,9 +216,9 @@ public: const auto &ti_data1 = v->first.to_tm(); TS_ASSERT_EQUALS(ti_data1.tm_hour, 12); TS_ASSERT_EQUALS(ti_data1.tm_min, 22); - v++; - v++; - v++; + ++v; + ++v; + ++v; // time 4 TS_ASSERT_EQUALS(v->second, " line 4"); const auto &ti_data4 = v->first.to_tm(); @@ -381,10 +381,10 @@ public: const auto &ti_data1 = v->first.to_tm(); TS_ASSERT_EQUALS(ti_data1.tm_hour, 12); TS_ASSERT_EQUALS(ti_data1.tm_min, 22); - v++; - v++; - v++; - v++; + ++v; + ++v; + ++v; + ++v; // time 5 // TS_ASSERT(!isNaN(v->second)); // last time diff --git a/Framework/Kernel/test/LoggerTest.h b/Framework/Kernel/test/LoggerTest.h index 107b6aac07f18c42e75ecc57877ad5e03ec4ad84..ca05b272938f71515c88923f79313ad48b5a1bd6 100644 --- a/Framework/Kernel/test/LoggerTest.h +++ b/Framework/Kernel/test/LoggerTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/MDAxisValidatorTest.h b/Framework/Kernel/test/MDAxisValidatorTest.h index 60b459c0c7e1fd9ed9faba144302020e6c0924a4..94589a4d79e6267dc5f0b3d7c73a476baeed67f4 100644 --- a/Framework/Kernel/test/MDAxisValidatorTest.h +++ b/Framework/Kernel/test/MDAxisValidatorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/MDUnitFactoryTest.h b/Framework/Kernel/test/MDUnitFactoryTest.h index a7a6d7c48c4247d9ad707f229d6883423e68fafb..30d0c8e9a8c625dd29fc0797d128a909c799b36b 100644 --- a/Framework/Kernel/test/MDUnitFactoryTest.h +++ b/Framework/Kernel/test/MDUnitFactoryTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/MDUnitTest.h b/Framework/Kernel/test/MDUnitTest.h index 5e5fc463b1f3f7dcffbf4eab0d05d52384513767..4c36f7a39e63e9a7276057d0b91214e4cfcb7505 100644 --- a/Framework/Kernel/test/MDUnitTest.h +++ b/Framework/Kernel/test/MDUnitTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/MRUListTest.h b/Framework/Kernel/test/MRUListTest.h index bc90d5e3039e3571d9a8c12e53d3b19a687fc808..d10ea12b18ae1311cb1daf8ed479463b3466562f 100644 --- a/Framework/Kernel/test/MRUListTest.h +++ b/Framework/Kernel/test/MRUListTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/MagneticIonTest.h b/Framework/Kernel/test/MagneticIonTest.h index b5c4bcc73cd861f69df18a39d3ac0887d044020e..87d596cb17c2848a899438ec617cc25354b75349 100644 --- a/Framework/Kernel/test/MagneticIonTest.h +++ b/Framework/Kernel/test/MagneticIonTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/MakeCowTest.h b/Framework/Kernel/test/MakeCowTest.h index d398bf72b7fa9703ea48a0fcb140908adf80eb26..29d99322edf41be4ba4f736fc8fcf2df9633430a 100644 --- a/Framework/Kernel/test/MakeCowTest.h +++ b/Framework/Kernel/test/MakeCowTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/MandatoryValidatorTest.h b/Framework/Kernel/test/MandatoryValidatorTest.h index eb5457396251c5573d820b51c62986db4aed6fed..437629b541a21a455ccff5ea81e704d0a9db6c17 100644 --- a/Framework/Kernel/test/MandatoryValidatorTest.h +++ b/Framework/Kernel/test/MandatoryValidatorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/MaskedPropertyTest.h b/Framework/Kernel/test/MaskedPropertyTest.h index 9a81baed2824211a2e3168b0f11b0ccbf23b6117..43467c55e12521ee444c5cba6f5a80a85d5d651b 100644 --- a/Framework/Kernel/test/MaskedPropertyTest.h +++ b/Framework/Kernel/test/MaskedPropertyTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/MaterialBuilderTest.h b/Framework/Kernel/test/MaterialBuilderTest.h index 5e44fb539419b01d291738010a9c0ed56b60389c..4e4ec2e0c5d29c18b4afdfc7f162f69ae6a719a5 100644 --- a/Framework/Kernel/test/MaterialBuilderTest.h +++ b/Framework/Kernel/test/MaterialBuilderTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/MaterialTest.h b/Framework/Kernel/test/MaterialTest.h index 77321a0c72120b47dac5c69764ff6f172bfb5626..d17082fa53aa60db7b11110258b83456fe8cbfc3 100644 --- a/Framework/Kernel/test/MaterialTest.h +++ b/Framework/Kernel/test/MaterialTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/MaterialXMLParserTest.h b/Framework/Kernel/test/MaterialXMLParserTest.h index 98ac2f3dee8375b263cfc86d37e309058555c604..d929d55fce586be13211343780fca709e43040e8 100644 --- a/Framework/Kernel/test/MaterialXMLParserTest.h +++ b/Framework/Kernel/test/MaterialXMLParserTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/MatrixPropertyTest.h b/Framework/Kernel/test/MatrixPropertyTest.h index 162399e893d041906cd28202f044cab8e3b17b18..bd54a10e2f96feb920f4b0abafc7985e94fa9aa5 100644 --- a/Framework/Kernel/test/MatrixPropertyTest.h +++ b/Framework/Kernel/test/MatrixPropertyTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once //----------------------------------------------------------------------------- diff --git a/Framework/Kernel/test/MatrixTest.h b/Framework/Kernel/test/MatrixTest.h index 66e48677d52420ca2fab1fcf3ff5d23506630838..86cdea45dff2afc7e2cf6a295056344e248ff525 100644 --- a/Framework/Kernel/test/MatrixTest.h +++ b/Framework/Kernel/test/MatrixTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/MemoryTest.h b/Framework/Kernel/test/MemoryTest.h index fa23112c81b9dd985a8c66938c17f84073c124cf..ca965f8ee562a2e51ac00148b6d03eefb9dae0b2 100644 --- a/Framework/Kernel/test/MemoryTest.h +++ b/Framework/Kernel/test/MemoryTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/MersenneTwisterTest.h b/Framework/Kernel/test/MersenneTwisterTest.h index 4f2b4d4809a1493f0a5ce5c91ce9fb2b2fb032e2..da18132c381733dbbe265506b4f9cce8b71a4474 100644 --- a/Framework/Kernel/test/MersenneTwisterTest.h +++ b/Framework/Kernel/test/MersenneTwisterTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/MultiFileNameParserTest.h b/Framework/Kernel/test/MultiFileNameParserTest.h index 7d8b5a358e889267c57fbe2df18b128245605142..247cec6c822e3103fc133475258a737dd7d47478 100644 --- a/Framework/Kernel/test/MultiFileNameParserTest.h +++ b/Framework/Kernel/test/MultiFileNameParserTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/MultiFileValidatorTest.h b/Framework/Kernel/test/MultiFileValidatorTest.h index 1944932bff8aec844f6e813b541bf2c5e401622e..ab338f73f9ab43d383a51565e83792e3ed1a0231 100644 --- a/Framework/Kernel/test/MultiFileValidatorTest.h +++ b/Framework/Kernel/test/MultiFileValidatorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/MutexTest.h b/Framework/Kernel/test/MutexTest.h index 66dae7abd6b6e51c981cbc1d309525f141245aa9..8e5697c54594475dd9a1cc53227cd7788b73e3ba 100644 --- a/Framework/Kernel/test/MutexTest.h +++ b/Framework/Kernel/test/MutexTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/NDPseudoRandomNumberGeneratorTest.h b/Framework/Kernel/test/NDPseudoRandomNumberGeneratorTest.h index b8efc2fb95e407957b7c32c561101a40d60111fb..f4fc9d1f4b2ea734a92b83d7a0623a9edb9e1393 100644 --- a/Framework/Kernel/test/NDPseudoRandomNumberGeneratorTest.h +++ b/Framework/Kernel/test/NDPseudoRandomNumberGeneratorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/NDRandomNumberGeneratorTest.h b/Framework/Kernel/test/NDRandomNumberGeneratorTest.h index 92734434788bcd8a56b261aaa320410d49711935..2449bc19051a9ddbab0f0d1f9bb60a5f4dab26c2 100644 --- a/Framework/Kernel/test/NDRandomNumberGeneratorTest.h +++ b/Framework/Kernel/test/NDRandomNumberGeneratorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/NearestNeighboursTest.h b/Framework/Kernel/test/NearestNeighboursTest.h index 39e454277ee14e4b1ed7863b0762ebadf69cc5e9..74f1b79e1d13d1c3c7cf49b7cb6af0c7cf2e48ee 100644 --- a/Framework/Kernel/test/NearestNeighboursTest.h +++ b/Framework/Kernel/test/NearestNeighboursTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/NeutronAtomTest.h b/Framework/Kernel/test/NeutronAtomTest.h index d371aed6a02e01ee90b6f32bd7b15de9648f0169..1049b959fc7c0da69e3bd6f923c7cc85e3165588 100644 --- a/Framework/Kernel/test/NeutronAtomTest.h +++ b/Framework/Kernel/test/NeutronAtomTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/NexusDescriptorTest.h b/Framework/Kernel/test/NexusDescriptorTest.h index 8ceb4423a2a0f0ca009496694c48adc4518dacb6..df2104c702c849b2d63aca05fb77514d4bd83439 100644 --- a/Framework/Kernel/test/NexusDescriptorTest.h +++ b/Framework/Kernel/test/NexusDescriptorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/NullValidatorTest.h b/Framework/Kernel/test/NullValidatorTest.h index 7b4fa7cb48d8eae628337aa69012d17f2704ade1..f2cd541e8b245ff3a86f8177d19b3aa8c189a5bd 100644 --- a/Framework/Kernel/test/NullValidatorTest.h +++ b/Framework/Kernel/test/NullValidatorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/OptionalBoolTest.h b/Framework/Kernel/test/OptionalBoolTest.h index 6f7ce677f478f55b6c2b19b91fd29b7cd733483f..6ec9812cfadfa191dc79e9c7903ad1f94001f9ad 100644 --- a/Framework/Kernel/test/OptionalBoolTest.h +++ b/Framework/Kernel/test/OptionalBoolTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/PrecompiledHeader.h b/Framework/Kernel/test/PrecompiledHeader.h index bb085a956dfd85fa2c8fb57780fcda00f98f1c5a..eb7253ee4a6624389e33550ec45e94fec671f0c7 100644 --- a/Framework/Kernel/test/PrecompiledHeader.h +++ b/Framework/Kernel/test/PrecompiledHeader.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/ProgressBaseTest.h b/Framework/Kernel/test/ProgressBaseTest.h index 43135f1c23550e48227d856a6d187ce41ae5ce91..91b7a3a7e0536882002d1ce7ef689b5fd9f14382 100644 --- a/Framework/Kernel/test/ProgressBaseTest.h +++ b/Framework/Kernel/test/ProgressBaseTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/PropertyHistoryTest.h b/Framework/Kernel/test/PropertyHistoryTest.h index a741b0322aaeb7b20940eda9fc28b0eb36535b42..024fbcef3ab7c1884d37725c6417f75c2c57ca3f 100644 --- a/Framework/Kernel/test/PropertyHistoryTest.h +++ b/Framework/Kernel/test/PropertyHistoryTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/PropertyManagerDataServiceTest.h b/Framework/Kernel/test/PropertyManagerDataServiceTest.h index 1fb0ae1bc3d4c7fcf1b19619857ef86bbfd275d1..1a2006056634ae5dc18be674314054cf44087484 100644 --- a/Framework/Kernel/test/PropertyManagerDataServiceTest.h +++ b/Framework/Kernel/test/PropertyManagerDataServiceTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/PropertyManagerPropertyTest.h b/Framework/Kernel/test/PropertyManagerPropertyTest.h index 4e3393199cb604ba229dd9ec23e2e7f2883d2582..34c58f788bb339a86cfd97367223c350a601f459 100644 --- a/Framework/Kernel/test/PropertyManagerPropertyTest.h +++ b/Framework/Kernel/test/PropertyManagerPropertyTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/PropertyManagerTest.h b/Framework/Kernel/test/PropertyManagerTest.h index 9c6f4d9085bec85db833146f09f44ac8dfb85434..b20f36210793a57905352f382e9b71a49c2837c9 100644 --- a/Framework/Kernel/test/PropertyManagerTest.h +++ b/Framework/Kernel/test/PropertyManagerTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/PropertyNexusTest.h b/Framework/Kernel/test/PropertyNexusTest.h index 0a363b610739fa984af6d7edd54b6114bc8c2ca4..f9e675eadecdaff8208a31f1613f8eebcf99d908 100644 --- a/Framework/Kernel/test/PropertyNexusTest.h +++ b/Framework/Kernel/test/PropertyNexusTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/PropertyTest.h b/Framework/Kernel/test/PropertyTest.h index 68bde5ea873828390458f869a06b8da8a0748e00..c304e445bf68f961256a0427b8f02e202e7979cb 100644 --- a/Framework/Kernel/test/PropertyTest.h +++ b/Framework/Kernel/test/PropertyTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/PropertyWithValueJSONTest.h b/Framework/Kernel/test/PropertyWithValueJSONTest.h index d25b48b73bac008b0ab0a340cbdb72bbc54ebb96..7808f41f11d451fc665a5df779b13f4b208a8ac3 100644 --- a/Framework/Kernel/test/PropertyWithValueJSONTest.h +++ b/Framework/Kernel/test/PropertyWithValueJSONTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/PropertyWithValueTest.h b/Framework/Kernel/test/PropertyWithValueTest.h index 67b49235b84ed7decff0208f79faca2f536e8362..7c897a9f1e83f0324bcf932aad2262d41da97a57 100644 --- a/Framework/Kernel/test/PropertyWithValueTest.h +++ b/Framework/Kernel/test/PropertyWithValueTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/ProxyInfoTest.h b/Framework/Kernel/test/ProxyInfoTest.h index 54a7fef66a236d262a27d0220434f700a55492e9..56861c5e9108da80e20478df5fb4c28c60042637 100644 --- a/Framework/Kernel/test/ProxyInfoTest.h +++ b/Framework/Kernel/test/ProxyInfoTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/QuatTest.h b/Framework/Kernel/test/QuatTest.h index 68e52260887b9f248f5018c1df47c3d5aa57480e..2d35e109ff700697e0a577c1e1c39594debcb5cc 100644 --- a/Framework/Kernel/test/QuatTest.h +++ b/Framework/Kernel/test/QuatTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/ReadLockTest.h b/Framework/Kernel/test/ReadLockTest.h index f5a091a3404989855e223f58316cdd6d0a6803af..03c75e32adee5aef09fbe2e45c8b64572f194e07 100644 --- a/Framework/Kernel/test/ReadLockTest.h +++ b/Framework/Kernel/test/ReadLockTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/RebinHistogramTest.h b/Framework/Kernel/test/RebinHistogramTest.h index beb878788726f7b84ab7ed9a4cad01a6de8f2d59..c44d37966ab9f0973cf33513f051cccb3cf06bb6 100644 --- a/Framework/Kernel/test/RebinHistogramTest.h +++ b/Framework/Kernel/test/RebinHistogramTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/RebinParamsValidatorTest.h b/Framework/Kernel/test/RebinParamsValidatorTest.h index 266e7ee766748c3e2ccd006621a60f8595860821..1d066d46c4d7508b6410b9d4191b780394bde31c 100644 --- a/Framework/Kernel/test/RebinParamsValidatorTest.h +++ b/Framework/Kernel/test/RebinParamsValidatorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/RegexStringsTest.h b/Framework/Kernel/test/RegexStringsTest.h index 1257e653ba395b077f1b87b21aa9dd644f44570a..4f3e6c5dbdb971b307fc6bf90c0a37aa0a01324a 100644 --- a/Framework/Kernel/test/RegexStringsTest.h +++ b/Framework/Kernel/test/RegexStringsTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -144,7 +144,6 @@ public: } void testStrFullCut() { - std::vector<double> dblresult; double sgldblResult; std::string input("100.01 101.02 103.04 105.06 Remainder of string"); TS_ASSERT_EQUALS( diff --git a/Framework/Kernel/test/SLSQPMinimizerTest.h b/Framework/Kernel/test/SLSQPMinimizerTest.h index 93c3ade9b1630b6199d9f0a678d0ee9d0c2e5f86..4953b055585512bab0326dfd9f7d93bf2220f80d 100644 --- a/Framework/Kernel/test/SLSQPMinimizerTest.h +++ b/Framework/Kernel/test/SLSQPMinimizerTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/ShrinkToFitTest.h b/Framework/Kernel/test/ShrinkToFitTest.h index 91d486f75332512333149f703047226278db63bb..1d183a6375aeb46825bda1572425eeb9e6c01ff7 100644 --- a/Framework/Kernel/test/ShrinkToFitTest.h +++ b/Framework/Kernel/test/ShrinkToFitTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/SimpleJSONTest.h b/Framework/Kernel/test/SimpleJSONTest.h index 0345fadd8b7b82dc3874a1d640044366aac7e3c3..e4c1e478db2e8b71dea5fa383524e9e351bb1c99 100644 --- a/Framework/Kernel/test/SimpleJSONTest.h +++ b/Framework/Kernel/test/SimpleJSONTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -51,8 +51,6 @@ public: void test_JSONArray() { std::string str = "json failure here"; - std::istringstream input(str); - std::string res; JSONArray ja; TS_ASSERT_THROWS_NOTHING(ja.emplace_back(str)); @@ -64,11 +62,10 @@ public: } void test_JSONObjectWrongStrings() { - std::string str = "json failure here"; - std::istringstream input(str); + std::istringstream input; std::string res; - str = ""; + std::string str = ""; JSONObject jo; TS_ASSERT_THROWS(initFromStream(jo, input), const JSONParseException &); TS_ASSERT_THROWS_NOTHING(jo["no_param"].getValue(res)); diff --git a/Framework/Kernel/test/SobolSequenceTest.h b/Framework/Kernel/test/SobolSequenceTest.h index 0997d0cf9529000171bf2b016150e7af5e413236..83dcd941ccff2e553cad4fb6e55fca4b9427363b 100644 --- a/Framework/Kernel/test/SobolSequenceTest.h +++ b/Framework/Kernel/test/SobolSequenceTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/SpecialCoordinateSystemTest.h b/Framework/Kernel/test/SpecialCoordinateSystemTest.h index ccab3055e8b633edeac32695eb69d06371408bf4..f2d2970d017c278c2a517029cdbd0b4443acb13b 100644 --- a/Framework/Kernel/test/SpecialCoordinateSystemTest.h +++ b/Framework/Kernel/test/SpecialCoordinateSystemTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/StartsWithValidatorTest.h b/Framework/Kernel/test/StartsWithValidatorTest.h index d115241d13e580ab1ad67cf5fb013abe643446d6..03f161066dda2f50d2397d40956e66b7875baa45 100644 --- a/Framework/Kernel/test/StartsWithValidatorTest.h +++ b/Framework/Kernel/test/StartsWithValidatorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/StatisticsTest.h b/Framework/Kernel/test/StatisticsTest.h index d51d4f48a729de847d9e75ba135169bd7a319e05..03802cc4664520b2d39ccbf32acf8bf7bcddc903 100644 --- a/Framework/Kernel/test/StatisticsTest.h +++ b/Framework/Kernel/test/StatisticsTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/StdoutChannelTest.h b/Framework/Kernel/test/StdoutChannelTest.h index 9308f7f6216b03ca122affbad9805df3a0f143dc..076f7fec3523995d22db7cfb8cc7450738e700fd 100644 --- a/Framework/Kernel/test/StdoutChannelTest.h +++ b/Framework/Kernel/test/StdoutChannelTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/StringContainsValidatorTest.h b/Framework/Kernel/test/StringContainsValidatorTest.h index 2d11a4132880b93b90a3430d2b54225d73c719d1..0c7337f285c52a0aa2d74aad292461ff07e8c275 100644 --- a/Framework/Kernel/test/StringContainsValidatorTest.h +++ b/Framework/Kernel/test/StringContainsValidatorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/StringTokenizerTest.h b/Framework/Kernel/test/StringTokenizerTest.h index 452e71bc7bee686e5b40e026c2b41083c89e7d5c..4ccc61aa47e941f4657984c6fe7f19bad034e233 100644 --- a/Framework/Kernel/test/StringTokenizerTest.h +++ b/Framework/Kernel/test/StringTokenizerTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/StringsTest.h b/Framework/Kernel/test/StringsTest.h index 988fea1d8a32b77ce07efbd499366ee965bdbc65..a28b07f1598c75bcbcbda988bb85dca675fc481f 100644 --- a/Framework/Kernel/test/StringsTest.h +++ b/Framework/Kernel/test/StringsTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/TaskTest.h b/Framework/Kernel/test/TaskTest.h index 46b062929b8ea27d69f6fd8321fb48d0f06e62d0..e29c9912d6fe47c1a8c865821da15458cb2bc050 100644 --- a/Framework/Kernel/test/TaskTest.h +++ b/Framework/Kernel/test/TaskTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/ThreadPoolRunnableTest.h b/Framework/Kernel/test/ThreadPoolRunnableTest.h index 19d4639585f9e3ce606a581e8a2e1e908cacd7ed..aca085d16ca542a19fdd9bc7818e8915bb96efc0 100644 --- a/Framework/Kernel/test/ThreadPoolRunnableTest.h +++ b/Framework/Kernel/test/ThreadPoolRunnableTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/ThreadPoolTest.h b/Framework/Kernel/test/ThreadPoolTest.h index c0f973bf675de4c4f82ea5632cc90065169feeab..b73caadf4bcb5297107644fbd015a875500c102f 100644 --- a/Framework/Kernel/test/ThreadPoolTest.h +++ b/Framework/Kernel/test/ThreadPoolTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/ThreadSchedulerMutexesTest.h b/Framework/Kernel/test/ThreadSchedulerMutexesTest.h index a43de116caec9ce8f82055839b84241c37c2849a..d2c7285e9324004ec011c800d0e7e90c0e441e5b 100644 --- a/Framework/Kernel/test/ThreadSchedulerMutexesTest.h +++ b/Framework/Kernel/test/ThreadSchedulerMutexesTest.h @@ -1,14 +1,16 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidKernel/System.h" #include "MantidKernel/Timer.h" #include <boost/make_shared.hpp> +#include <utility> + #include <cxxtest/TestSuite.h> #include "MantidKernel/ThreadSchedulerMutexes.h" @@ -24,7 +26,7 @@ public: class TaskWithMutex : public Task { public: TaskWithMutex(boost::shared_ptr<std::mutex> mutex, double cost) { - m_mutex = mutex; + m_mutex = std::move(mutex); m_cost = cost; } diff --git a/Framework/Kernel/test/ThreadSchedulerTest.h b/Framework/Kernel/test/ThreadSchedulerTest.h index 4e141e44e792b2d6f2f4b274586451b5e985082b..6b06c1097b9f66522e3b6ed7f6d185f13bc53da3 100644 --- a/Framework/Kernel/test/ThreadSchedulerTest.h +++ b/Framework/Kernel/test/ThreadSchedulerTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/TimeSeriesPropertyTest.h b/Framework/Kernel/test/TimeSeriesPropertyTest.h index b1ddbec923279014a9f926102d482e6cc8ae40d2..2b7f3907e6b2e75dd604b443d92b1aee7c0b575b 100644 --- a/Framework/Kernel/test/TimeSeriesPropertyTest.h +++ b/Framework/Kernel/test/TimeSeriesPropertyTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/TimeSplitterTest.h b/Framework/Kernel/test/TimeSplitterTest.h index 21a4fb1984a25b745ce8547e499a512d38ea0f18..c6b71cf8e3393ad6ac21ea319e4b8f9cd171f52a 100644 --- a/Framework/Kernel/test/TimeSplitterTest.h +++ b/Framework/Kernel/test/TimeSplitterTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /* * TimeSplitterTest.h diff --git a/Framework/Kernel/test/TimerTest.h b/Framework/Kernel/test/TimerTest.h index ed6150b09bd1759638fbb4890133d48514a6d6fe..6dab3f65f2373b6ee2712d0eb91a4b0d82ab6b94 100644 --- a/Framework/Kernel/test/TimerTest.h +++ b/Framework/Kernel/test/TimerTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/TopicInfoTest.h b/Framework/Kernel/test/TopicInfoTest.h index 15caa3a3bccf3027c9ad6b08a9bf607a8fb6d5bf..00504a3e72a8c176e74eb898b35cf13deeab50e5 100644 --- a/Framework/Kernel/test/TopicInfoTest.h +++ b/Framework/Kernel/test/TopicInfoTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/TypedValidatorTest.h b/Framework/Kernel/test/TypedValidatorTest.h index af1f4113b1a8f6497f6a6a6b634c4f5975f2e419..2be8724760fa3bfacff1882c0873bc5d70b60c0b 100644 --- a/Framework/Kernel/test/TypedValidatorTest.h +++ b/Framework/Kernel/test/TypedValidatorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -69,7 +69,7 @@ public: private: template <typename HeldType> void checkIsValidReturnsEmptyString( - const Mantid::Kernel::IValidator_sptr valueChecker, + const Mantid::Kernel::IValidator_sptr &valueChecker, const HeldType &value) { std::string error; TS_ASSERT_THROWS_NOTHING(error = valueChecker->isValid(value)); diff --git a/Framework/Kernel/test/UnitConversionTest.h b/Framework/Kernel/test/UnitConversionTest.h index 7f16ef00e39d2a3572ca7df53f0b2d768707644d..1d6e7d5f977a9cb7f90bdbeedbf9afd42ea94355 100644 --- a/Framework/Kernel/test/UnitConversionTest.h +++ b/Framework/Kernel/test/UnitConversionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/UnitFactoryTest.h b/Framework/Kernel/test/UnitFactoryTest.h index 3d4ef0abd4988a92277b6267fa597e75a4dae26d..957f8d39cfbe49e4b95271fbbfb09aad554beb54 100644 --- a/Framework/Kernel/test/UnitFactoryTest.h +++ b/Framework/Kernel/test/UnitFactoryTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/UnitLabelTest.h b/Framework/Kernel/test/UnitLabelTest.h index 2ff9e61b439ebc23e7509e8094b4bb153dc2c413..0b383a9f9847ef0f9f514d74089f94b512529390 100644 --- a/Framework/Kernel/test/UnitLabelTest.h +++ b/Framework/Kernel/test/UnitLabelTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -70,7 +70,7 @@ public: } private: - void doImplicitConversionTest(UnitLabel lbl, std::string expected) { + void doImplicitConversionTest(const UnitLabel &lbl, std::string expected) { TS_ASSERT_EQUALS(expected, lbl.ascii()); const auto &utf8 = lbl.utf8(); TS_ASSERT_EQUALS(std::wstring(expected.begin(), expected.end()), utf8); diff --git a/Framework/Kernel/test/UnitTest.h b/Framework/Kernel/test/UnitTest.h index 17e5dda8552018b8939bc70d5b69a0137ce8db4d..a0bf000969f0186294ad8ee7ed8839dc1e87fb69 100644 --- a/Framework/Kernel/test/UnitTest.h +++ b/Framework/Kernel/test/UnitTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/UsageServiceTest.h b/Framework/Kernel/test/UsageServiceTest.h index 2e035187ec11f85caf36d2afc3383df94656b130..ba3a1d1ffb86d1779b3af3966ac027faa5cd0fb5 100644 --- a/Framework/Kernel/test/UsageServiceTest.h +++ b/Framework/Kernel/test/UsageServiceTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/UserCatalogInfoTest.h b/Framework/Kernel/test/UserCatalogInfoTest.h index 74b2828042bec66f0c590189c1dacc12ce07e5d1..bdb1148a84122ca0c422af697a9b516aa3d1c074 100644 --- a/Framework/Kernel/test/UserCatalogInfoTest.h +++ b/Framework/Kernel/test/UserCatalogInfoTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/UserStringParserTest.h b/Framework/Kernel/test/UserStringParserTest.h index 31679364b59e1d8a825c7f4b4631ba1ea5fa9265..ffc3416b6d116ef8353a68e921234c47bc300df6 100644 --- a/Framework/Kernel/test/UserStringParserTest.h +++ b/Framework/Kernel/test/UserStringParserTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/UtilsTest.h b/Framework/Kernel/test/UtilsTest.h index ee62c59ae6b024ca5938fa9c368a80f3b041a0ad..5a145ec09c6c8719d4aaa098e1b17062ea55dcb3 100644 --- a/Framework/Kernel/test/UtilsTest.h +++ b/Framework/Kernel/test/UtilsTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/V2DTest.h b/Framework/Kernel/test/V2DTest.h index 44edc3f08430a57d3250d7714c8065b988f75324..04f58730ee37f3cb271fc130217612452d4fb0ef 100644 --- a/Framework/Kernel/test/V2DTest.h +++ b/Framework/Kernel/test/V2DTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/V3DTest.h b/Framework/Kernel/test/V3DTest.h index aa7729a4177916518174efcc5307bf9604727beb..47c57f90a2d13847fbb6cf6b5c0291e7a4003554 100644 --- a/Framework/Kernel/test/V3DTest.h +++ b/Framework/Kernel/test/V3DTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/VMDTest.h b/Framework/Kernel/test/VMDTest.h index 811081e335ea9b36951aefb0f55999846f54e2a0..1ceea03b501ebc996be4e0f48b5d2997569364dc 100644 --- a/Framework/Kernel/test/VMDTest.h +++ b/Framework/Kernel/test/VMDTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/VectorHelperTest.h b/Framework/Kernel/test/VectorHelperTest.h index 30092dcec1d16ac46ce060c84fd3b18409caf48a..a525cd67a455c879dabc456eb875d9ca3227e313 100644 --- a/Framework/Kernel/test/VectorHelperTest.h +++ b/Framework/Kernel/test/VectorHelperTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/VisibleWhenPropertyTest.h b/Framework/Kernel/test/VisibleWhenPropertyTest.h index 4babc40197b250883f90837e0581fb8b706e9fc1..757929e3cf1bfe6a0bb0c032be7f28193e7e51eb 100644 --- a/Framework/Kernel/test/VisibleWhenPropertyTest.h +++ b/Framework/Kernel/test/VisibleWhenPropertyTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Kernel/test/WriteLockTest.h b/Framework/Kernel/test/WriteLockTest.h index 7f8d51da0204c8df0e3c2158ee6b1fd08c587076..221cf329b21ccb4d7e6b02ea8a8269b8b7aa6e9c 100644 --- a/Framework/Kernel/test/WriteLockTest.h +++ b/Framework/Kernel/test/WriteLockTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/LiveData/inc/MantidLiveData/ADARA/ADARAPackets.h b/Framework/LiveData/inc/MantidLiveData/ADARA/ADARAPackets.h index fbe9f0cd19a38b446049d8c21f0cf37ee036f867..9c2c5039c4c4a64c91a4942be60b5be0360c0bdf 100644 --- a/Framework/LiveData/inc/MantidLiveData/ADARA/ADARAPackets.h +++ b/Framework/LiveData/inc/MantidLiveData/ADARA/ADARAPackets.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/LiveData/inc/MantidLiveData/Exception.h b/Framework/LiveData/inc/MantidLiveData/Exception.h index 6201c01339b302c8eb4053e06b6741868cfdd043..cb48ec82fb8f260878ddcb19d0fbc7a7a189c672 100644 --- a/Framework/LiveData/inc/MantidLiveData/Exception.h +++ b/Framework/LiveData/inc/MantidLiveData/Exception.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/LiveData/inc/MantidLiveData/FakeEventDataListener.h b/Framework/LiveData/inc/MantidLiveData/FakeEventDataListener.h index 25580388434f9fb9439ef3615be15947392c5bd9..d7b2519a360810ce0ef2be15674645d32f5bb46d 100644 --- a/Framework/LiveData/inc/MantidLiveData/FakeEventDataListener.h +++ b/Framework/LiveData/inc/MantidLiveData/FakeEventDataListener.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/LiveData/inc/MantidLiveData/FileEventDataListener.h b/Framework/LiveData/inc/MantidLiveData/FileEventDataListener.h index 1b4610cff7e193f87844d08f25813b0c71bdd296..623f331304faac295909f91748b69797b3aec5bb 100644 --- a/Framework/LiveData/inc/MantidLiveData/FileEventDataListener.h +++ b/Framework/LiveData/inc/MantidLiveData/FileEventDataListener.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/LiveData/inc/MantidLiveData/ISIS/FakeISISEventDAE.h b/Framework/LiveData/inc/MantidLiveData/ISIS/FakeISISEventDAE.h index f69ecf450dbaf8c7e6b99a791f618c051f55b19b..b9fc877e4491931f0d89b64b69cf651778eebd56 100644 --- a/Framework/LiveData/inc/MantidLiveData/ISIS/FakeISISEventDAE.h +++ b/Framework/LiveData/inc/MantidLiveData/ISIS/FakeISISEventDAE.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/LiveData/inc/MantidLiveData/ISIS/FakeISISHistoDAE.h b/Framework/LiveData/inc/MantidLiveData/ISIS/FakeISISHistoDAE.h index 1c82f0d4a6534de44faec573a1df98f4ff796e9c..9597dc70d5e6f40b3baf03ccaa97fc8b6bc7e26f 100644 --- a/Framework/LiveData/inc/MantidLiveData/ISIS/FakeISISHistoDAE.h +++ b/Framework/LiveData/inc/MantidLiveData/ISIS/FakeISISHistoDAE.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/LiveData/inc/MantidLiveData/ISIS/ISISHistoDataListener.h b/Framework/LiveData/inc/MantidLiveData/ISIS/ISISHistoDataListener.h index f4166f1ad9248ad23801df6823f4c40fb8190d5f..77179fa9b50eb13ae9db68b3e0c672098b92a20f 100644 --- a/Framework/LiveData/inc/MantidLiveData/ISIS/ISISHistoDataListener.h +++ b/Framework/LiveData/inc/MantidLiveData/ISIS/ISISHistoDataListener.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -62,13 +62,14 @@ private: void getIntArray(const std::string &par, std::vector<int> &arr, const size_t dim); void getData(int period, int index, int count, - boost::shared_ptr<API::MatrixWorkspace> workspace, + const boost::shared_ptr<API::MatrixWorkspace> &workspace, size_t workspaceIndex); void calculateIndicesForReading(std::vector<int> &index, std::vector<int> &count); void loadSpectraMap(); - void runLoadInstrument(boost::shared_ptr<API::MatrixWorkspace> localWorkspace, - const std::string &iName); + void runLoadInstrument( + const boost::shared_ptr<API::MatrixWorkspace> &localWorkspace, + const std::string &iName); void loadTimeRegimes(); int getTimeRegimeToLoad() const; bool isPeriodIgnored(int period) const; diff --git a/Framework/LiveData/inc/MantidLiveData/ISIS/ISISLiveEventDataListener.h b/Framework/LiveData/inc/MantidLiveData/ISIS/ISISLiveEventDataListener.h index d632e08f2e37e7f614a8c4c07080f4a485e337ee..2537eb0c7268b44a94ad79019bd8b08d0fb57b54 100644 --- a/Framework/LiveData/inc/MantidLiveData/ISIS/ISISLiveEventDataListener.h +++ b/Framework/LiveData/inc/MantidLiveData/ISIS/ISISLiveEventDataListener.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/LiveData/inc/MantidLiveData/ISIS/TCPEventStreamDefs.h b/Framework/LiveData/inc/MantidLiveData/ISIS/TCPEventStreamDefs.h index ec3e2c6a63c7707d2eccda869cfefeb094687070..7ad7cac4173255fce3793d3496487eae41bd3201 100644 --- a/Framework/LiveData/inc/MantidLiveData/ISIS/TCPEventStreamDefs.h +++ b/Framework/LiveData/inc/MantidLiveData/ISIS/TCPEventStreamDefs.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/LiveData/inc/MantidLiveData/Kafka/IKafkaBroker.h b/Framework/LiveData/inc/MantidLiveData/Kafka/IKafkaBroker.h index 5224cd0526f330946703bdd4e038d9ec22dd707b..5d64cc6d30abba2f240c80ffe7340084431fe9cb 100644 --- a/Framework/LiveData/inc/MantidLiveData/Kafka/IKafkaBroker.h +++ b/Framework/LiveData/inc/MantidLiveData/Kafka/IKafkaBroker.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/LiveData/inc/MantidLiveData/Kafka/IKafkaStreamDecoder.h b/Framework/LiveData/inc/MantidLiveData/Kafka/IKafkaStreamDecoder.h index 53526b8efe93954487e6d31690305b2075dc12e5..461ee24881c351223b95fdcf5ac79fab9f112d91 100644 --- a/Framework/LiveData/inc/MantidLiveData/Kafka/IKafkaStreamDecoder.h +++ b/Framework/LiveData/inc/MantidLiveData/Kafka/IKafkaStreamDecoder.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -35,7 +35,7 @@ public: public: using FnType = std::function<void()>; - Callback(Callback::FnType callback) : m_mutex(), m_callback() { + Callback(const Callback::FnType &callback) : m_mutex(), m_callback() { setFunction(std::move(callback)); } diff --git a/Framework/LiveData/inc/MantidLiveData/Kafka/IKafkaStreamDecoder.tcc b/Framework/LiveData/inc/MantidLiveData/Kafka/IKafkaStreamDecoder.tcc index 2b03a36b0867c97bf12d9b832d8517aff68b2572..8ebac7b6d0e0191f77172efe56f43925c4ad9d54 100644 --- a/Framework/LiveData/inc/MantidLiveData/Kafka/IKafkaStreamDecoder.tcc +++ b/Framework/LiveData/inc/MantidLiveData/Kafka/IKafkaStreamDecoder.tcc @@ -1,3 +1,9 @@ +// Mantid Repository : https://github.com/mantidproject/mantid +// +// Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS +// SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/AlgorithmManager.h" #include "MantidAPI/Workspace.h" #include "MantidAPI/WorkspaceFactory.h" diff --git a/Framework/LiveData/inc/MantidLiveData/Kafka/IKafkaStreamSubscriber.h b/Framework/LiveData/inc/MantidLiveData/Kafka/IKafkaStreamSubscriber.h index 65cae78fb72498317cd697e5701428e6a1aecf91..41d569e605e7b05637ff0a8631380979dd757a91 100644 --- a/Framework/LiveData/inc/MantidLiveData/Kafka/IKafkaStreamSubscriber.h +++ b/Framework/LiveData/inc/MantidLiveData/Kafka/IKafkaStreamSubscriber.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/LiveData/inc/MantidLiveData/Kafka/KafkaBroker.h b/Framework/LiveData/inc/MantidLiveData/Kafka/KafkaBroker.h index 37af94fa1fdaf7050554e6c60f68f20fdb1a8227..707f298bc61b0347930464467a04aa55f84e299b 100644 --- a/Framework/LiveData/inc/MantidLiveData/Kafka/KafkaBroker.h +++ b/Framework/LiveData/inc/MantidLiveData/Kafka/KafkaBroker.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/LiveData/inc/MantidLiveData/Kafka/KafkaEventListener.h b/Framework/LiveData/inc/MantidLiveData/Kafka/KafkaEventListener.h index 773d3f550765df7a15b6a78e0952066cf6b83e91..5f1efc69f87021a74871ef81c99cece8ff7a131a 100644 --- a/Framework/LiveData/inc/MantidLiveData/Kafka/KafkaEventListener.h +++ b/Framework/LiveData/inc/MantidLiveData/Kafka/KafkaEventListener.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once //---------------------------------------------------------------------- diff --git a/Framework/LiveData/inc/MantidLiveData/Kafka/KafkaEventStreamDecoder.h b/Framework/LiveData/inc/MantidLiveData/Kafka/KafkaEventStreamDecoder.h index bc9166bb94a04f15c762c7e5889069ca592faca8..2a293536bf85e4a744f1b7f5d970ceb8b245bee8 100644 --- a/Framework/LiveData/inc/MantidLiveData/Kafka/KafkaEventStreamDecoder.h +++ b/Framework/LiveData/inc/MantidLiveData/Kafka/KafkaEventStreamDecoder.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/LiveData/inc/MantidLiveData/Kafka/KafkaHistoListener.h b/Framework/LiveData/inc/MantidLiveData/Kafka/KafkaHistoListener.h index f7c6b0f0c1538d707b503e63f066f173f757715a..0d4a1896778e5fbaff01e3366aaaf1800424a498 100644 --- a/Framework/LiveData/inc/MantidLiveData/Kafka/KafkaHistoListener.h +++ b/Framework/LiveData/inc/MantidLiveData/Kafka/KafkaHistoListener.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once //---------------------------------------------------------------------- diff --git a/Framework/LiveData/inc/MantidLiveData/Kafka/KafkaHistoStreamDecoder.h b/Framework/LiveData/inc/MantidLiveData/Kafka/KafkaHistoStreamDecoder.h index b21c992a04202dbf74d2504451eb3fb6a81361f9..1be038dc1f462cb197a4dfe1b1fd56c90eb5ec69 100644 --- a/Framework/LiveData/inc/MantidLiveData/Kafka/KafkaHistoStreamDecoder.h +++ b/Framework/LiveData/inc/MantidLiveData/Kafka/KafkaHistoStreamDecoder.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/LiveData/inc/MantidLiveData/Kafka/KafkaTopicSubscriber.h b/Framework/LiveData/inc/MantidLiveData/Kafka/KafkaTopicSubscriber.h index 554d04fe95c45e319d9b7070d8bb84db5accd06c..91917eeda86a0ef6e9e079bd596ebd56216e2380 100644 --- a/Framework/LiveData/inc/MantidLiveData/Kafka/KafkaTopicSubscriber.h +++ b/Framework/LiveData/inc/MantidLiveData/Kafka/KafkaTopicSubscriber.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/LiveData/inc/MantidLiveData/LiveDataAlgorithm.h b/Framework/LiveData/inc/MantidLiveData/LiveDataAlgorithm.h index bbc978fd02c027f4dec18167163f063d01844c17..ff6e16ff354e3feff312260c86191d7354fce962 100644 --- a/Framework/LiveData/inc/MantidLiveData/LiveDataAlgorithm.h +++ b/Framework/LiveData/inc/MantidLiveData/LiveDataAlgorithm.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/LiveData/inc/MantidLiveData/LoadLiveData.h b/Framework/LiveData/inc/MantidLiveData/LoadLiveData.h index d4ef9927e3c53a6a2f95887b941630c984165b6d..67c22d079b2b46bd7708021d1a0ac2f4c15e5b5f 100644 --- a/Framework/LiveData/inc/MantidLiveData/LoadLiveData.h +++ b/Framework/LiveData/inc/MantidLiveData/LoadLiveData.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -42,14 +42,15 @@ private: void runPostProcessing(); void replaceChunk(Mantid::API::Workspace_sptr chunkWS); - void addChunk(Mantid::API::Workspace_sptr chunkWS); - void addMatrixWSChunk(API::Workspace_sptr accumWS, - API::Workspace_sptr chunkWS); + void addChunk(const Mantid::API::Workspace_sptr &chunkWS); + void addMatrixWSChunk(const API::Workspace_sptr &accumWS, + const API::Workspace_sptr &chunkWS); void addMDWSChunk(API::Workspace_sptr &accumWS, const API::Workspace_sptr &chunkWS); - void appendChunk(Mantid::API::Workspace_sptr chunkWS); - API::Workspace_sptr appendMatrixWSChunk(API::Workspace_sptr accumWS, - Mantid::API::Workspace_sptr chunkWS); + void appendChunk(const Mantid::API::Workspace_sptr &chunkWS); + API::Workspace_sptr + appendMatrixWSChunk(API::Workspace_sptr accumWS, + const Mantid::API::Workspace_sptr &chunkWS); void updateDefaultBinBoundaries(API::Workspace *workspace); /// The "accumulation" workspace = after adding, but before post-processing diff --git a/Framework/LiveData/inc/MantidLiveData/MonitorLiveData.h b/Framework/LiveData/inc/MantidLiveData/MonitorLiveData.h index c90bb568f97f5c5c074aa253c6d8dacc2ab211be..40d2e5cb0697355d67f1766069aea6c44b4b2f99 100644 --- a/Framework/LiveData/inc/MantidLiveData/MonitorLiveData.h +++ b/Framework/LiveData/inc/MantidLiveData/MonitorLiveData.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/LiveData/inc/MantidLiveData/PrecompiledHeader.h b/Framework/LiveData/inc/MantidLiveData/PrecompiledHeader.h index 7bbfdd105f077d6e7c3d3d828bb324574b819903..5782f612b0c54c2b946e786301ddfb9b3ac0a5e7 100644 --- a/Framework/LiveData/inc/MantidLiveData/PrecompiledHeader.h +++ b/Framework/LiveData/inc/MantidLiveData/PrecompiledHeader.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/LiveData/inc/MantidLiveData/SNSLiveEventDataListener.h b/Framework/LiveData/inc/MantidLiveData/SNSLiveEventDataListener.h index 24d4dc44806c7961c4c0b423b68686ee22408bac..e6b603c67b25b767325bde90d43d5099fea1f4b4 100644 --- a/Framework/LiveData/inc/MantidLiveData/SNSLiveEventDataListener.h +++ b/Framework/LiveData/inc/MantidLiveData/SNSLiveEventDataListener.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/LiveData/inc/MantidLiveData/StartLiveData.h b/Framework/LiveData/inc/MantidLiveData/StartLiveData.h index 2445616c116046800137b8c36d4bbe2d89beb34e..e4f8c11cc1c6de008d587b298157448aed960a15 100644 --- a/Framework/LiveData/inc/MantidLiveData/StartLiveData.h +++ b/Framework/LiveData/inc/MantidLiveData/StartLiveData.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/LiveData/src/ADARA/ADARAPackets.cpp b/Framework/LiveData/src/ADARA/ADARAPackets.cpp index d2b50ef1a4daf9def72b9a4cc06667db362a3f4c..674fab960eca321b2489591dbf3159ddb1a0fadd 100644 --- a/Framework/LiveData/src/ADARA/ADARAPackets.cpp +++ b/Framework/LiveData/src/ADARA/ADARAPackets.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidLiveData/ADARA/ADARAPackets.h" diff --git a/Framework/LiveData/src/ADARA/ADARAParser.cpp b/Framework/LiveData/src/ADARA/ADARAParser.cpp index cb965f68a465f0e645428a1fa1db25064095adc4..f2deb9271d3a9430c0be44ba494b5be7161364ef 100644 --- a/Framework/LiveData/src/ADARA/ADARAParser.cpp +++ b/Framework/LiveData/src/ADARA/ADARAParser.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include <cstring> #include <sstream> diff --git a/Framework/LiveData/src/FakeEventDataListener.cpp b/Framework/LiveData/src/FakeEventDataListener.cpp index fa9aff51c898f018c1c712bf3059af6f3d973083..48faeaedbe42543c1a794bdbdd6898612f9f2d3c 100644 --- a/Framework/LiveData/src/FakeEventDataListener.cpp +++ b/Framework/LiveData/src/FakeEventDataListener.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidLiveData/FakeEventDataListener.h" #include "MantidAPI/LiveListenerFactory.h" diff --git a/Framework/LiveData/src/FileEventDataListener.cpp b/Framework/LiveData/src/FileEventDataListener.cpp index 732b49930ba56f59f979672ea2b589cf381d6118..d1dbbf4909646ba28ca5f29dd7a6b0d9e1649f44 100644 --- a/Framework/LiveData/src/FileEventDataListener.cpp +++ b/Framework/LiveData/src/FileEventDataListener.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidLiveData/FileEventDataListener.h" #include "MantidAPI/AlgorithmManager.h" diff --git a/Framework/LiveData/src/ISIS/DAE/isisds_command.cpp b/Framework/LiveData/src/ISIS/DAE/isisds_command.cpp index 3ac632ce22bc2cb6f4a5f2157a91c00455eecddc..0a1d994f055b40da16b6730c209c505b265a3bf9 100644 --- a/Framework/LiveData/src/ISIS/DAE/isisds_command.cpp +++ b/Framework/LiveData/src/ISIS/DAE/isisds_command.cpp @@ -86,10 +86,10 @@ typedef struct { /* wait until read len bytes, return <=0 on error */ static int recv_all(SOCKET s, void *buffer, int len, int flags) { auto *cbuffer = reinterpret_cast<char *>(buffer); - int n, ntot; + int ntot; ntot = 0; while (len > 0) { - n = recv(s, cbuffer, len, flags); + int n = recv(s, cbuffer, len, flags); if (n <= 0) { return n; /* error */ } @@ -283,7 +283,7 @@ int isisds_send_command(SOCKET s, const char *command, const void *data, static int isisds_recv_command_helper(SOCKET s, char **command, void **data, ISISDSDataType *type, int dims_array[], int *ndims, int do_alloc) { - int n, len_data, size_in, i; + int n, len_data, i; isisds_command_header_t comm; n = recv_all(s, reinterpret_cast<char *>(&comm), sizeof(comm), 0); if (n != sizeof(comm)) { @@ -308,7 +308,7 @@ static int isisds_recv_command_helper(SOCKET s, char **command, void **data, *data = malloc(len_data + 1); (reinterpret_cast<char *>(*data))[len_data] = '\0'; } else { - size_in = 1; + int size_in = 1; for (i = 0; i < *ndims; i++) { size_in *= dims_array[i]; } diff --git a/Framework/LiveData/src/ISIS/FakeISISEventDAE.cpp b/Framework/LiveData/src/ISIS/FakeISISEventDAE.cpp index 0a56f81c51e6bb6470c53a2ac00d807612ca7cc1..73abf7e03159e7791935b9eedfa5091fd23a4e0e 100644 --- a/Framework/LiveData/src/ISIS/FakeISISEventDAE.cpp +++ b/Framework/LiveData/src/ISIS/FakeISISEventDAE.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes @@ -17,6 +17,8 @@ #include <Poco/Net/StreamSocket.h> #include <Poco/Net/TCPServer.h> +#include <utility> + namespace Mantid { namespace LiveData { // Register the algorithm into the algorithm factory @@ -46,7 +48,8 @@ public: TestServerConnection(const Poco::Net::StreamSocket &soc, int nper, int nspec, int rate, int nevents, boost::shared_ptr<Progress> prog) : Poco::Net::TCPServerConnection(soc), m_nPeriods(nper), - m_nSpectra(nspec), m_Rate(rate), m_nEvents(nevents), m_prog(prog) { + m_nSpectra(nspec), m_Rate(rate), m_nEvents(nevents), + m_prog(std::move(prog)) { m_prog->report(0, "Client Connected"); sendInitialSetup(); } @@ -135,7 +138,8 @@ public: TestServerConnectionFactory(int nper, int nspec, int rate, int nevents, boost::shared_ptr<Progress> prog) : Poco::Net::TCPServerConnectionFactory(), m_nPeriods(nper), - m_nSpectra(nspec), m_Rate(rate), m_nEvents(nevents), m_prog(prog) {} + m_nSpectra(nspec), m_Rate(rate), m_nEvents(nevents), + m_prog(std::move(prog)) {} /** * The factory method. * @param socket :: The socket. diff --git a/Framework/LiveData/src/ISIS/FakeISISHistoDAE.cpp b/Framework/LiveData/src/ISIS/FakeISISHistoDAE.cpp index 989e5e9e1bc1ee32a6e8f65c82b1ea22bd1a092c..6b038c2f744f74dc02729fd982a36a2c0e9daa4f 100644 --- a/Framework/LiveData/src/ISIS/FakeISISHistoDAE.cpp +++ b/Framework/LiveData/src/ISIS/FakeISISHistoDAE.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/LiveData/src/ISIS/ISISHistoDataListener.cpp b/Framework/LiveData/src/ISIS/ISISHistoDataListener.cpp index 383196730e2badcc5775d859c0703eb0e24cf65a..f5b701b2778e5bc43ef17e0d4b83079e856adae8 100644 --- a/Framework/LiveData/src/ISIS/ISISHistoDataListener.cpp +++ b/Framework/LiveData/src/ISIS/ISISHistoDataListener.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidLiveData/ISIS/ISISHistoDataListener.h" #include "MantidAPI/Algorithm.h" @@ -422,7 +422,7 @@ void ISISHistoDataListener::calculateIndicesForReading( * @param workspaceIndex :: index in workspace to store data */ void ISISHistoDataListener::getData(int period, int index, int count, - API::MatrixWorkspace_sptr workspace, + const API::MatrixWorkspace_sptr &workspace, size_t workspaceIndex) { const int numberOfBins = m_numberOfBins[m_timeRegime]; const size_t bufferSize = count * (numberOfBins + 1) * sizeof(int); @@ -466,7 +466,7 @@ void ISISHistoDataListener::loadSpectraMap() { * @param iName :: The instrument name */ void ISISHistoDataListener::runLoadInstrument( - MatrixWorkspace_sptr localWorkspace, const std::string &iName) { + const MatrixWorkspace_sptr &localWorkspace, const std::string &iName) { auto loadInst = API::AlgorithmFactory::Instance().create("LoadInstrument", -1); if (!loadInst) diff --git a/Framework/LiveData/src/ISIS/ISISLiveEventDataListener.cpp b/Framework/LiveData/src/ISIS/ISISLiveEventDataListener.cpp index a847a6aa0312cc50b44035f0f97d0372818fe417..a2dbfdc86002c9a24f45bcb0bbf3f321a8b4f86f 100644 --- a/Framework/LiveData/src/ISIS/ISISLiveEventDataListener.cpp +++ b/Framework/LiveData/src/ISIS/ISISLiveEventDataListener.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidLiveData/ISIS/ISISLiveEventDataListener.h" #include "MantidLiveData/Exception.h" diff --git a/Framework/LiveData/src/ISIS/example.cpp b/Framework/LiveData/src/ISIS/example.cpp index b7014971af3df03776dffbe3d08148bd4f95e8e8..5b4a7f0d78fbf54a4edd59a88c4894f205e088af 100644 --- a/Framework/LiveData/src/ISIS/example.cpp +++ b/Framework/LiveData/src/ISIS/example.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "Poco/Net/ServerSocket.h" #include "Poco/Net/StreamSocket.h" diff --git a/Framework/LiveData/src/Kafka/IKafkaStreamDecoder.cpp b/Framework/LiveData/src/Kafka/IKafkaStreamDecoder.cpp index 96cbfb022c6382027a29ef013e27f8abe4dd3ff4..4f8ac88f0fe38254a78cae4183ffa3f9839ef1a0 100644 --- a/Framework/LiveData/src/Kafka/IKafkaStreamDecoder.cpp +++ b/Framework/LiveData/src/Kafka/IKafkaStreamDecoder.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidLiveData/Kafka/IKafkaStreamDecoder.tcc" #include "MantidAPI/Run.h" @@ -21,6 +21,8 @@ GNU_DIAG_ON("conversion") #include <json/json.h> +#include <utility> + using namespace Mantid::Types; namespace { @@ -54,7 +56,7 @@ IKafkaStreamDecoder::IKafkaStreamDecoder(std::shared_ptr<IKafkaBroker> broker, const std::string &sampleEnvTopic, const std::string &chopperTopic, const std::string &monitorTopic) - : m_broker(broker), m_streamTopic(streamTopic), + : m_broker(std::move(broker)), m_streamTopic(streamTopic), m_runInfoTopic(runInfoTopic), m_spDetTopic(spDetTopic), m_sampleEnvTopic(sampleEnvTopic), m_chopperTopic(chopperTopic), m_monitorTopic(monitorTopic), m_interrupt(false), m_specToIdx(), @@ -227,7 +229,7 @@ void IKafkaStreamDecoder::checkIfAllStopOffsetsReached( bool &checkOffsets) { if (std::all_of(reachedEnd.cbegin(), reachedEnd.cend(), - [](std::pair<std::string, std::vector<bool>> kv) { + [](const std::pair<std::string, std::vector<bool>> &kv) { return std::all_of( kv.second.cbegin(), kv.second.cend(), [](bool partitionEnd) { return partitionEnd; }); diff --git a/Framework/LiveData/src/Kafka/KafkaBroker.cpp b/Framework/LiveData/src/Kafka/KafkaBroker.cpp index b21c7b71316f7536df68764246526b4f32d108ec..574ef98cc5fd2ad991eb74b505bcea2508c462b9 100644 --- a/Framework/LiveData/src/Kafka/KafkaBroker.cpp +++ b/Framework/LiveData/src/Kafka/KafkaBroker.cpp @@ -1,9 +1,11 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + +#include <utility> + #include "MantidLiveData/Kafka/KafkaBroker.h" #include "MantidLiveData/Kafka/KafkaTopicSubscriber.h" @@ -15,7 +17,7 @@ namespace LiveData { * @param address The address of a broker in the form host:port */ KafkaBroker::KafkaBroker(std::string address) - : IKafkaBroker(), m_address(address) {} + : IKafkaBroker(), m_address(std::move(address)) {} /** * Create an object to provide access to a topic stream from this broker diff --git a/Framework/LiveData/src/Kafka/KafkaEventListener.cpp b/Framework/LiveData/src/Kafka/KafkaEventListener.cpp index 32764ef8276551edac7b5c14c2753f4cc8eb78fa..b2bead04d681e305d18959aa26745e39c0664dcb 100644 --- a/Framework/LiveData/src/Kafka/KafkaEventListener.cpp +++ b/Framework/LiveData/src/Kafka/KafkaEventListener.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidLiveData/Kafka/KafkaEventListener.h" #include "MantidAPI/IAlgorithm.h" diff --git a/Framework/LiveData/src/Kafka/KafkaEventStreamDecoder.cpp b/Framework/LiveData/src/Kafka/KafkaEventStreamDecoder.cpp index cc947286a85c7c8f244f22721bc3ae48e2c6035c..6a97ab35a03390685e88641a8a5edac7e36c0645 100644 --- a/Framework/LiveData/src/Kafka/KafkaEventStreamDecoder.cpp +++ b/Framework/LiveData/src/Kafka/KafkaEventStreamDecoder.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidLiveData/Kafka/KafkaEventStreamDecoder.h" #include "MantidAPI/Axis.h" @@ -30,6 +30,8 @@ GNU_DIAG_ON("conversion") #include <chrono> #include <json/json.h> #include <numeric> +#include <utility> + #include <tbb/parallel_sort.h> using namespace Mantid::Types; @@ -120,8 +122,9 @@ KafkaEventStreamDecoder::KafkaEventStreamDecoder( const std::string &runInfoTopic, const std::string &spDetTopic, const std::string &sampleEnvTopic, const std::string &chopperTopic, const std::string &monitorTopic, const std::size_t bufferThreshold) - : IKafkaStreamDecoder(broker, eventTopic, runInfoTopic, spDetTopic, - sampleEnvTopic, chopperTopic, monitorTopic), + : IKafkaStreamDecoder(std::move(broker), eventTopic, runInfoTopic, + spDetTopic, sampleEnvTopic, chopperTopic, + monitorTopic), m_intermediateBufferFlushThreshold(bufferThreshold) { #ifndef _OPENMP g_log.warning() << "Multithreading is not available on your system. This " diff --git a/Framework/LiveData/src/Kafka/KafkaHistoListener.cpp b/Framework/LiveData/src/Kafka/KafkaHistoListener.cpp index 0268feb36e404ee437ba12d321e3d216dad770d8..5188d22db41095a1bf55e283fa3cefec0273fba8 100644 --- a/Framework/LiveData/src/Kafka/KafkaHistoListener.cpp +++ b/Framework/LiveData/src/Kafka/KafkaHistoListener.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidLiveData/Kafka/KafkaHistoListener.h" #include "MantidAPI/IAlgorithm.h" diff --git a/Framework/LiveData/src/Kafka/KafkaHistoStreamDecoder.cpp b/Framework/LiveData/src/Kafka/KafkaHistoStreamDecoder.cpp index cb926855fd8c67ddc3eb7426a908cc3dbce3c628..90398f877667b872eeb9f6ee544cb3c6bd62aea4 100644 --- a/Framework/LiveData/src/Kafka/KafkaHistoStreamDecoder.cpp +++ b/Framework/LiveData/src/Kafka/KafkaHistoStreamDecoder.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidLiveData/Kafka/KafkaHistoStreamDecoder.h" #include "MantidAPI/AlgorithmManager.h" @@ -29,6 +29,8 @@ GNU_DIAG_ON("conversion") #include <json/json.h> +#include <utility> + namespace { const std::string PROTON_CHARGE_PROPERTY = "proton_charge"; const std::string RUN_NUMBER_PROPERTY = "run_number"; @@ -59,8 +61,8 @@ KafkaHistoStreamDecoder::KafkaHistoStreamDecoder( std::shared_ptr<IKafkaBroker> broker, const std::string &histoTopic, const std::string &runInfoTopic, const std::string &spDetTopic, const std::string &sampleEnvTopic, const std::string &chopperTopic) - : IKafkaStreamDecoder(broker, histoTopic, runInfoTopic, spDetTopic, - sampleEnvTopic, chopperTopic, ""), + : IKafkaStreamDecoder(std::move(broker), histoTopic, runInfoTopic, + spDetTopic, sampleEnvTopic, chopperTopic, ""), m_workspace() {} /** diff --git a/Framework/LiveData/src/Kafka/KafkaTopicSubscriber.cpp b/Framework/LiveData/src/Kafka/KafkaTopicSubscriber.cpp index ee2b1a36b4083561d78de4eccb94c70ed6bfa6e8..93d2fba8ed39ef9685be4bbaf46d55b85bc2e9bf 100644 --- a/Framework/LiveData/src/Kafka/KafkaTopicSubscriber.cpp +++ b/Framework/LiveData/src/Kafka/KafkaTopicSubscriber.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidLiveData/Kafka/KafkaTopicSubscriber.h" #include "MantidKernel/Logger.h" @@ -13,6 +13,7 @@ #include <iostream> #include <sstream> #include <thread> +#include <utility> using RdKafka::Conf; using RdKafka::KafkaConsumer; @@ -77,8 +78,8 @@ const std::string KafkaTopicSubscriber::MONITOR_TOPIC_SUFFIX = "_monitors"; KafkaTopicSubscriber::KafkaTopicSubscriber(std::string broker, std::vector<std::string> topics, SubscribeAtOption subscribeOption) - : IKafkaStreamSubscriber(), m_consumer(), m_brokerAddr(broker), - m_topicNames(topics), m_subscribeOption(subscribeOption) {} + : IKafkaStreamSubscriber(), m_consumer(), m_brokerAddr(std::move(broker)), + m_topicNames(std::move(topics)), m_subscribeOption(subscribeOption) {} /// Destructor KafkaTopicSubscriber::~KafkaTopicSubscriber() { diff --git a/Framework/LiveData/src/Kafka/private/Schema/ai34_det_counts_generated.h b/Framework/LiveData/src/Kafka/private/Schema/ai34_det_counts_generated.h index 155bbc15a42424f98a9b868a522b48efefaa8ac9..c2b1d91e02e76af90eb891d3ecd7086b885fc151 100644 --- a/Framework/LiveData/src/Kafka/private/Schema/ai34_det_counts_generated.h +++ b/Framework/LiveData/src/Kafka/private/Schema/ai34_det_counts_generated.h @@ -1,3 +1,9 @@ +// Mantid Repository : https://github.com/mantidproject/mantid +// +// Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS +// SPDX - License - Identifier: GPL - 3.0 + // clang-format off // automatically generated by the FlatBuffers compiler, do not modify diff --git a/Framework/LiveData/src/Kafka/private/Schema/df12_det_spec_map_generated.h b/Framework/LiveData/src/Kafka/private/Schema/df12_det_spec_map_generated.h index 0756ea4a7b351a52fa338d0d9e0968252f85c5e2..bd07233083b769ff4d4d50383ac36d5c94ca7245 100644 --- a/Framework/LiveData/src/Kafka/private/Schema/df12_det_spec_map_generated.h +++ b/Framework/LiveData/src/Kafka/private/Schema/df12_det_spec_map_generated.h @@ -1,3 +1,9 @@ +// Mantid Repository : https://github.com/mantidproject/mantid +// +// Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS +// SPDX - License - Identifier: GPL - 3.0 + // clang-format off // automatically generated by the FlatBuffers compiler, do not modify diff --git a/Framework/LiveData/src/Kafka/private/Schema/dtdb_adc_pulse_debug_generated.h b/Framework/LiveData/src/Kafka/private/Schema/dtdb_adc_pulse_debug_generated.h index ef160b9d01f8e420b9a4acf74d4b234dcfe3442b..0845b02fba682617d7108e0d00df3d76708ceacc 100644 --- a/Framework/LiveData/src/Kafka/private/Schema/dtdb_adc_pulse_debug_generated.h +++ b/Framework/LiveData/src/Kafka/private/Schema/dtdb_adc_pulse_debug_generated.h @@ -1,3 +1,9 @@ +// Mantid Repository : https://github.com/mantidproject/mantid +// +// Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS +// SPDX - License - Identifier: GPL - 3.0 + // clang-format off // automatically generated by the FlatBuffers compiler, do not modify diff --git a/Framework/LiveData/src/Kafka/private/Schema/ev42_events_generated.h b/Framework/LiveData/src/Kafka/private/Schema/ev42_events_generated.h index 9f3d6b611c5b404c92d3e8c3be95587dd0198945..790d327699ab733ea8f2d1f01a5d0b4ab6df044e 100644 --- a/Framework/LiveData/src/Kafka/private/Schema/ev42_events_generated.h +++ b/Framework/LiveData/src/Kafka/private/Schema/ev42_events_generated.h @@ -1,3 +1,9 @@ +// Mantid Repository : https://github.com/mantidproject/mantid +// +// Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS +// SPDX - License - Identifier: GPL - 3.0 + // clang-format off // automatically generated by the FlatBuffers compiler, do not modify diff --git a/Framework/LiveData/src/Kafka/private/Schema/f142_logdata_generated.h b/Framework/LiveData/src/Kafka/private/Schema/f142_logdata_generated.h index e27a36d05d450cd4d6bc2183e57a5750de0f359e..152f35379b257f6b134d6e95d7c1f2f8646322bc 100644 --- a/Framework/LiveData/src/Kafka/private/Schema/f142_logdata_generated.h +++ b/Framework/LiveData/src/Kafka/private/Schema/f142_logdata_generated.h @@ -1,3 +1,9 @@ +// Mantid Repository : https://github.com/mantidproject/mantid +// +// Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS +// SPDX - License - Identifier: GPL - 3.0 + // clang-format off // automatically generated by the FlatBuffers compiler, do not modify diff --git a/Framework/LiveData/src/Kafka/private/Schema/flatbuffers/base.h b/Framework/LiveData/src/Kafka/private/Schema/flatbuffers/base.h index 3e194f3bca41a8a5f5c08df5e6c338705261f4ee..b3e887e956f715130095556bc88387c441db9866 100644 --- a/Framework/LiveData/src/Kafka/private/Schema/flatbuffers/base.h +++ b/Framework/LiveData/src/Kafka/private/Schema/flatbuffers/base.h @@ -1,3 +1,9 @@ +// Mantid Repository : https://github.com/mantidproject/mantid +// +// Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS +// SPDX - License - Identifier: GPL - 3.0 + #pragma once // clang-format off diff --git a/Framework/LiveData/src/Kafka/private/Schema/fwdi_forwarder_internal_generated.h b/Framework/LiveData/src/Kafka/private/Schema/fwdi_forwarder_internal_generated.h index b3768219368b8d4e47aff1b097ce7f423970c95d..26852237cda93d5bc10654b030b160f4bd3514a9 100644 --- a/Framework/LiveData/src/Kafka/private/Schema/fwdi_forwarder_internal_generated.h +++ b/Framework/LiveData/src/Kafka/private/Schema/fwdi_forwarder_internal_generated.h @@ -1,3 +1,9 @@ +// Mantid Repository : https://github.com/mantidproject/mantid +// +// Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS +// SPDX - License - Identifier: GPL - 3.0 + // clang-format off // automatically generated by the FlatBuffers compiler, do not modify diff --git a/Framework/LiveData/src/Kafka/private/Schema/hs00_event_histogram_generated.h b/Framework/LiveData/src/Kafka/private/Schema/hs00_event_histogram_generated.h index 6c493177734a3abaa8dad98f1fd24f8e449a9742..2c50688a6552c4a1b3d53c9bf42ba2bc1400be5a 100644 --- a/Framework/LiveData/src/Kafka/private/Schema/hs00_event_histogram_generated.h +++ b/Framework/LiveData/src/Kafka/private/Schema/hs00_event_histogram_generated.h @@ -1,3 +1,9 @@ +// Mantid Repository : https://github.com/mantidproject/mantid +// +// Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS +// SPDX - License - Identifier: GPL - 3.0 + // clang-format off // automatically generated by the FlatBuffers compiler, do not modify diff --git a/Framework/LiveData/src/Kafka/private/Schema/is84_isis_events_generated.h b/Framework/LiveData/src/Kafka/private/Schema/is84_isis_events_generated.h index df79562d5c0fadbbc1c4f0a07c1c7bf89e9c8a3d..3396516ab0ddb21a54c2ae3b766dc55467b5f040 100644 --- a/Framework/LiveData/src/Kafka/private/Schema/is84_isis_events_generated.h +++ b/Framework/LiveData/src/Kafka/private/Schema/is84_isis_events_generated.h @@ -1,3 +1,9 @@ +// Mantid Repository : https://github.com/mantidproject/mantid +// +// Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS +// SPDX - License - Identifier: GPL - 3.0 + // clang-format off // automatically generated by the FlatBuffers compiler, do not modify diff --git a/Framework/LiveData/src/Kafka/private/Schema/tdct_timestamps_generated.h b/Framework/LiveData/src/Kafka/private/Schema/tdct_timestamps_generated.h index fcdc732224be2be942424753e3b2faa27b06e7e9..f85c8a5245c55dd5d4042b0bf6b68f36fc1c9e91 100644 --- a/Framework/LiveData/src/Kafka/private/Schema/tdct_timestamps_generated.h +++ b/Framework/LiveData/src/Kafka/private/Schema/tdct_timestamps_generated.h @@ -1,3 +1,9 @@ +// Mantid Repository : https://github.com/mantidproject/mantid +// +// Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS +// SPDX - License - Identifier: GPL - 3.0 + // clang-format off // automatically generated by the FlatBuffers compiler, do not modify diff --git a/Framework/LiveData/src/Kafka/private/Schema/y2gw_run_info_generated.h b/Framework/LiveData/src/Kafka/private/Schema/y2gw_run_info_generated.h index 9ddc3e27a75fb17943e4f2446100493b92e751e1..ae099a1b3ed34b4a98db8bd22e6345bc080ed52c 100644 --- a/Framework/LiveData/src/Kafka/private/Schema/y2gw_run_info_generated.h +++ b/Framework/LiveData/src/Kafka/private/Schema/y2gw_run_info_generated.h @@ -1,3 +1,9 @@ +// Mantid Repository : https://github.com/mantidproject/mantid +// +// Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS +// SPDX - License - Identifier: GPL - 3.0 + // clang-format off // automatically generated by the FlatBuffers compiler, do not modify diff --git a/Framework/LiveData/src/LiveDataAlgorithm.cpp b/Framework/LiveData/src/LiveDataAlgorithm.cpp index 09b49a2fb6dff0d3e1cf5e8f84d0cc66ecdf3140..64e8c16429adbf524353604d5b25c35d27339d83 100644 --- a/Framework/LiveData/src/LiveDataAlgorithm.cpp +++ b/Framework/LiveData/src/LiveDataAlgorithm.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidLiveData/LiveDataAlgorithm.h" #include "MantidAPI/AlgorithmManager.h" @@ -17,6 +17,7 @@ #include <boost/algorithm/string/trim.hpp> #include <unordered_set> +#include <utility> using namespace Mantid::Kernel; using namespace Mantid::API; @@ -260,7 +261,7 @@ ILiveListener_sptr LiveDataAlgorithm::createLiveListener(bool connect) { */ void LiveDataAlgorithm::setLiveListener( Mantid::API::ILiveListener_sptr listener) { - m_listener = listener; + m_listener = std::move(listener); } //---------------------------------------------------------------------------------------------- diff --git a/Framework/LiveData/src/LoadLiveData.cpp b/Framework/LiveData/src/LoadLiveData.cpp index dc55aa7b21e2aece6cb61038c8be00d2b0b3d60b..b41ca72a8893d2a359df9640861810c758e99f4c 100644 --- a/Framework/LiveData/src/LoadLiveData.cpp +++ b/Framework/LiveData/src/LoadLiveData.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidLiveData/LoadLiveData.h" #include "MantidAPI/AlgorithmManager.h" @@ -15,6 +15,7 @@ #include "MantidLiveData/Exception.h" #include <boost/algorithm/string.hpp> +#include <utility> #include <Poco/Thread.h> @@ -204,7 +205,7 @@ LoadLiveData::runProcessing(Mantid::API::Workspace_sptr inputWS, Mantid::API::Workspace_sptr LoadLiveData::processChunk(Mantid::API::Workspace_sptr chunkWS) { try { - return runProcessing(chunkWS, false); + return runProcessing(std::move(chunkWS), false); } catch (...) { g_log.error("While processing chunk:"); throw; @@ -232,7 +233,7 @@ void LoadLiveData::runPostProcessing() { * * @param chunkWS :: processed live data chunk workspace */ -void LoadLiveData::addChunk(Mantid::API::Workspace_sptr chunkWS) { +void LoadLiveData::addChunk(const Mantid::API::Workspace_sptr &chunkWS) { // Acquire locks on the workspaces we use WriteLock _lock1(*m_accumWS); ReadLock _lock2(*chunkWS); @@ -273,8 +274,8 @@ void LoadLiveData::addChunk(Mantid::API::Workspace_sptr chunkWS) { * @param accumWS :: accumulation matrix workspace * @param chunkWS :: processed live data chunk matrix workspace */ -void LoadLiveData::addMatrixWSChunk(Workspace_sptr accumWS, - Workspace_sptr chunkWS) { +void LoadLiveData::addMatrixWSChunk(const Workspace_sptr &accumWS, + const Workspace_sptr &chunkWS) { // Handle the addition of the internal monitor workspace, if present auto accumMW = boost::dynamic_pointer_cast<MatrixWorkspace>(accumWS); auto chunkMW = boost::dynamic_pointer_cast<MatrixWorkspace>(chunkWS); @@ -342,7 +343,7 @@ void LoadLiveData::replaceChunk(Mantid::API::Workspace_sptr chunkWS) { auto instrumentWS = m_accumWS; // When the algorithm exits the chunk workspace will be renamed // and overwrite the old one - m_accumWS = chunkWS; + m_accumWS = std::move(chunkWS); // Put the original instrument back. Otherwise geometry changes will not be // persistent copyInstrument(instrumentWS.get(), m_accumWS.get()); @@ -358,7 +359,7 @@ void LoadLiveData::replaceChunk(Mantid::API::Workspace_sptr chunkWS) { * * @param chunkWS :: processed live data chunk workspace */ -void LoadLiveData::appendChunk(Mantid::API::Workspace_sptr chunkWS) { +void LoadLiveData::appendChunk(const Mantid::API::Workspace_sptr &chunkWS) { // ISIS multi-period data come in workspace groups WorkspaceGroup_sptr chunk_gws = boost::dynamic_pointer_cast<WorkspaceGroup>(chunkWS); @@ -400,8 +401,9 @@ void LoadLiveData::appendChunk(Mantid::API::Workspace_sptr chunkWS) { * @param accumWS :: accumulation matrix workspace * @param chunkWS :: processed live data chunk matrix workspace */ -Workspace_sptr LoadLiveData::appendMatrixWSChunk(Workspace_sptr accumWS, - Workspace_sptr chunkWS) { +Workspace_sptr +LoadLiveData::appendMatrixWSChunk(Workspace_sptr accumWS, + const Workspace_sptr &chunkWS) { IAlgorithm_sptr alg; ReadLock _lock1(*accumWS); ReadLock _lock2(*chunkWS); diff --git a/Framework/LiveData/src/MonitorLiveData.cpp b/Framework/LiveData/src/MonitorLiveData.cpp index 8952737675227c7c9408b940aa56e9c98429e949..03d1974a883026bb90c0ebb1c99249f467dc085f 100644 --- a/Framework/LiveData/src/MonitorLiveData.cpp +++ b/Framework/LiveData/src/MonitorLiveData.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidLiveData/MonitorLiveData.h" #include "MantidAPI/AlgorithmManager.h" diff --git a/Framework/LiveData/src/SNSLiveEventDataListener.cpp b/Framework/LiveData/src/SNSLiveEventDataListener.cpp index 7aae2e24f23b6f4462561d000b1546c8927fae3d..7892ca6560b3b14d456b5576b7a8ba958a6fa0af 100644 --- a/Framework/LiveData/src/SNSLiveEventDataListener.cpp +++ b/Framework/LiveData/src/SNSLiveEventDataListener.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include <ctime> #include <exception> diff --git a/Framework/LiveData/src/StartLiveData.cpp b/Framework/LiveData/src/StartLiveData.cpp index 1d8e19b349b6db7f37d106433056befd47d3c779..76aee617550af2b1d60ed603c47f5a392b6701e8 100644 --- a/Framework/LiveData/src/StartLiveData.cpp +++ b/Framework/LiveData/src/StartLiveData.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidLiveData/StartLiveData.h" #include "MantidAPI/AlgorithmManager.h" diff --git a/Framework/LiveData/test/ADARAPacketTest.h b/Framework/LiveData/test/ADARAPacketTest.h index 3fad6ea886552210c8feec08818ec771c00896a0..a72e86d898067832446d73ea1d49dc98e3fb007c 100644 --- a/Framework/LiveData/test/ADARAPacketTest.h +++ b/Framework/LiveData/test/ADARAPacketTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/LiveData/test/ADARAPackets.h b/Framework/LiveData/test/ADARAPackets.h index c1411a7a5458cdbc7c540f448b1278d0969ab57f..754f20a8a17c0f20740b916d2047fdaef96934a8 100644 --- a/Framework/LiveData/test/ADARAPackets.h +++ b/Framework/LiveData/test/ADARAPackets.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/LiveData/test/CMakeLists.txt b/Framework/LiveData/test/CMakeLists.txt index e39adb5f86dc29f1e1e96b61fcb76a9b303780b8..128844df9c65ce1c770d2c0762b826b7fcd38497 100644 --- a/Framework/LiveData/test/CMakeLists.txt +++ b/Framework/LiveData/test/CMakeLists.txt @@ -1,8 +1,7 @@ if(CXXTEST_FOUND) include_directories(SYSTEM ${CXXTEST_INCLUDE_DIR} - ${GMOCK_INCLUDE_DIR} - ${GTEST_INCLUDE_DIR}) +) include_directories(../../TestHelpers/inc) # This variable is used within the cxxtest_add_test macro to build this helper @@ -24,7 +23,7 @@ if(CXXTEST_FOUND) ${TCMALLOC_LIBRARIES_LINKTIME} ${MANTIDLIBS} LiveData - ${GMOCK_LIBRARIES}) + gmock) target_include_directories(LiveDataTest PRIVATE ../src/) add_dependencies(LiveDataTest DataHandling Algorithms MDAlgorithms) add_dependencies(FrameworkTests LiveDataTest) diff --git a/Framework/LiveData/test/FakeEventDataListenerTest.h b/Framework/LiveData/test/FakeEventDataListenerTest.h index fa488d9a96be29472c352aacf073655077ceba91..ef46292e599930110c3df13863a8b468633092d5 100644 --- a/Framework/LiveData/test/FakeEventDataListenerTest.h +++ b/Framework/LiveData/test/FakeEventDataListenerTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/LiveData/test/FileEventDataListenerTest.h b/Framework/LiveData/test/FileEventDataListenerTest.h index b44ef38218514572e10954cd9e8ef4aec4c4aed1..7985fd17901a88fd53b2488df5016f55fa4d87c8 100644 --- a/Framework/LiveData/test/FileEventDataListenerTest.h +++ b/Framework/LiveData/test/FileEventDataListenerTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/LiveData/test/ISISHistoDataListenerTest.h b/Framework/LiveData/test/ISISHistoDataListenerTest.h index d2bf6a1516161f5427c5d9bf6575e92fb5cd927c..e4d0fab1180ec1bb965ee7141b60cb8c1a0d1efb 100644 --- a/Framework/LiveData/test/ISISHistoDataListenerTest.h +++ b/Framework/LiveData/test/ISISHistoDataListenerTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/LiveData/test/KafkaEventStreamDecoderTest.h b/Framework/LiveData/test/KafkaEventStreamDecoderTest.h index 6868ba59a2850896d9a40419f65e115498b57157..a3ca5e72d75be07edb4d483f319e9ec761d6f10d 100644 --- a/Framework/LiveData/test/KafkaEventStreamDecoderTest.h +++ b/Framework/LiveData/test/KafkaEventStreamDecoderTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -19,8 +19,11 @@ #include <Poco/Path.h> #include <condition_variable> +#include <iostream> #include <thread> +using Mantid::LiveData::KafkaEventStreamDecoder; + class KafkaEventStreamDecoderTest : public CxxTest::TestSuite { public: // This pair of boilerplate methods prevent the suite being created statically @@ -512,43 +515,54 @@ private: void startCapturing(Mantid::LiveData::KafkaEventStreamDecoder &decoder, uint8_t maxIterations) { // Register callback to know when a whole loop as been iterated through + m_maxIterations = maxIterations; m_niterations = 0; - auto callback = [this, maxIterations]() { - this->iterationCallback(maxIterations); - }; - decoder.registerIterationEndCb(callback); - decoder.registerErrorCb(callback); + decoder.registerIterationEndCb([this]() { this->iterationCallback(); }); + + decoder.registerErrorCb([this, &decoder]() { errCallback(decoder); }); TS_ASSERT_THROWS_NOTHING(decoder.startCapture()); continueCapturing(decoder, maxIterations); } - void iterationCallback(uint8_t maxIterations) { + void iterationCallback() { std::unique_lock<std::mutex> lock(this->m_callbackMutex); this->m_niterations++; - if (this->m_niterations == maxIterations) { + if (this->m_niterations == m_maxIterations) { lock.unlock(); this->m_callbackCondition.notify_one(); } } - void continueCapturing(Mantid::LiveData::KafkaEventStreamDecoder &decoder, + void errCallback(KafkaEventStreamDecoder &decoder) { + try { + // Get the stored exception by calling extract data again + decoder.extractData(); + } catch (std::exception &e) { + // We could try to port the exception from this child thread to the main + // thread, or just print it here which is significantly easier + std::cerr << "Exception: " << e.what() << "\n"; + // Always keep incrementing so we don't deadlock + iterationCallback(); + } + } + + void continueCapturing(KafkaEventStreamDecoder &decoder, uint8_t maxIterations) { + m_maxIterations = maxIterations; + // Re-register callback with the (potentially) new value of maxIterations - auto callback = [this, maxIterations]() { - this->iterationCallback(maxIterations); - }; - decoder.registerIterationEndCb(callback); - decoder.registerErrorCb(callback); + decoder.registerIterationEndCb([this]() { this->iterationCallback(); }); + decoder.registerErrorCb([this, &decoder]() { errCallback(decoder); }); + { std::unique_lock<std::mutex> lk(m_callbackMutex); - this->m_callbackCondition.wait(lk, [this, maxIterations]() { - return this->m_niterations == maxIterations; - }); + this->m_callbackCondition.wait( + lk, [this]() { return this->m_niterations == m_maxIterations; }); } } - std::unique_ptr<Mantid::LiveData::KafkaEventStreamDecoder> - createTestDecoder(std::shared_ptr<Mantid::LiveData::IKafkaBroker> broker) { + std::unique_ptr<Mantid::LiveData::KafkaEventStreamDecoder> createTestDecoder( + const std::shared_ptr<Mantid::LiveData::IKafkaBroker> &broker) { using namespace Mantid::LiveData; return std::make_unique<KafkaEventStreamDecoder>(broker, "", "", "", "", "", "", 0); @@ -574,8 +588,8 @@ private: void checkWorkspaceEventData( const Mantid::DataObjects::EventWorkspace &eventWksp) { - // A timer-based test and each message contains 6 events so the total should - // be divisible by 6, but not be 0 + // A timer-based test and each message contains 6 events so the total + // should be divisible by 6, but not be 0 TS_ASSERT(eventWksp.getNumberEvents() % 6 == 0); TS_ASSERT(eventWksp.getNumberEvents() != 0); } @@ -597,4 +611,5 @@ private: std::mutex m_callbackMutex; std::condition_variable m_callbackCondition; uint8_t m_niterations = 0; + std::atomic<uint8_t> m_maxIterations = 0; }; diff --git a/Framework/LiveData/test/KafkaHistoStreamDecoderTest.h b/Framework/LiveData/test/KafkaHistoStreamDecoderTest.h index bfe8bb97fec111f58dca8f8f5bc5f2a38d8f9d55..3fc38756533dd776dda7b5c80e6e3bb4a843b739 100644 --- a/Framework/LiveData/test/KafkaHistoStreamDecoderTest.h +++ b/Framework/LiveData/test/KafkaHistoStreamDecoderTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -94,8 +94,8 @@ public: } private: - std::unique_ptr<Mantid::LiveData::KafkaHistoStreamDecoder> - createTestDecoder(std::shared_ptr<Mantid::LiveData::IKafkaBroker> broker) { + std::unique_ptr<Mantid::LiveData::KafkaHistoStreamDecoder> createTestDecoder( + const std::shared_ptr<Mantid::LiveData::IKafkaBroker> &broker) { using namespace Mantid::LiveData; return std::make_unique<KafkaHistoStreamDecoder>(broker, "", "", "", "", ""); diff --git a/Framework/LiveData/test/KafkaTesting.h b/Framework/LiveData/test/KafkaTesting.h index b13d76a6108ba15ad225300fbfb14ae64a241258..85738a1355caaf142623756c1c149f99081460de 100644 --- a/Framework/LiveData/test/KafkaTesting.h +++ b/Framework/LiveData/test/KafkaTesting.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -220,7 +220,7 @@ void fakeReceiveASampleEnvMessage(std::string *buffer) { void fakeReceiveARunStartMessage(std::string *buffer, int32_t runNumber, const std::string &startTime, const std::string &instName, int32_t nPeriods, - std::string nexusStructure = "") { + const std::string &nexusStructure = "") { // Convert date to time_t auto mantidTime = Mantid::Types::Core::DateAndTime(startTime); auto startTimestamp = diff --git a/Framework/LiveData/test/KafkaTopicSubscriberTest.h b/Framework/LiveData/test/KafkaTopicSubscriberTest.h index 4f01924026f7927f20e0da1e7ebb9269da535538..8ddd7229a7e78dada588c0e6b6cc678789f13c06 100644 --- a/Framework/LiveData/test/KafkaTopicSubscriberTest.h +++ b/Framework/LiveData/test/KafkaTopicSubscriberTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/LiveData/test/LiveDataAlgorithmTest.h b/Framework/LiveData/test/LiveDataAlgorithmTest.h index b4f761f06a6e04f51400f241371c28d22db1b705..e965c7e58f8a77a3f4d352d3fe2b83c3208a53de 100644 --- a/Framework/LiveData/test/LiveDataAlgorithmTest.h +++ b/Framework/LiveData/test/LiveDataAlgorithmTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/LiveData/test/LoadLiveDataTest.h b/Framework/LiveData/test/LoadLiveDataTest.h index 7e20e02bbb5593439a56f9cd38fbdda0414a6ad6..146a2afd6e50f01e3e5264c118d570d604bb785d 100644 --- a/Framework/LiveData/test/LoadLiveDataTest.h +++ b/Framework/LiveData/test/LoadLiveDataTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -53,11 +53,13 @@ public: */ template <typename TYPE> boost::shared_ptr<TYPE> - doExec(std::string AccumulationMethod, std::string ProcessingAlgorithm = "", - std::string ProcessingProperties = "", - std::string PostProcessingAlgorithm = "", - std::string PostProcessingProperties = "", bool PreserveEvents = true, - ILiveListener_sptr listener = ILiveListener_sptr(), + doExec(const std::string &AccumulationMethod, + const std::string &ProcessingAlgorithm = "", + const std::string &ProcessingProperties = "", + const std::string &PostProcessingAlgorithm = "", + const std::string &PostProcessingProperties = "", + bool PreserveEvents = true, + const ILiveListener_sptr &listener = ILiveListener_sptr(), bool makeThrow = false) { FacilityHelper::ScopedFacilities loadTESTFacility( "unit_testing/UnitTestFacilities.xml", "TEST"); diff --git a/Framework/LiveData/test/MonitorLiveDataTest.h b/Framework/LiveData/test/MonitorLiveDataTest.h index c1be650ab509aa94bdde42bdd97e45900372a2cb..26575e099c00b333a620511a3456c13d28041caf 100644 --- a/Framework/LiveData/test/MonitorLiveDataTest.h +++ b/Framework/LiveData/test/MonitorLiveDataTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -61,10 +61,10 @@ public: /** Create but don't start a MonitorLiveData thread */ boost::shared_ptr<MonitorLiveData> - makeAlgo(std::string output, std::string accumWS = "", - std::string AccumulationMethod = "Replace", - std::string RunTransitionBehavior = "Restart", - std::string UpdateEvery = "1") { + makeAlgo(const std::string &output, const std::string &accumWS = "", + const std::string &AccumulationMethod = "Replace", + const std::string &RunTransitionBehavior = "Restart", + const std::string &UpdateEvery = "1") { auto alg = boost::dynamic_pointer_cast<MonitorLiveData>( AlgorithmManager::Instance().create("MonitorLiveData", -1, false)); alg->setPropertyValue("Instrument", "TestDataListener"); @@ -167,7 +167,7 @@ public: /** Executes the given algorithm asynchronously, until you reach the given * chunk number. * @return false if test failed*/ - bool runAlgoUntilChunk(boost::shared_ptr<MonitorLiveData> alg1, + bool runAlgoUntilChunk(const boost::shared_ptr<MonitorLiveData> &alg1, size_t stopAtChunk) { Poco::ActiveResult<bool> res1 = alg1->executeAsync(); Poco::Thread::sleep(50); diff --git a/Framework/LiveData/test/SNSLiveEventDataListenerTest.h b/Framework/LiveData/test/SNSLiveEventDataListenerTest.h index 19e08de1481a4b9c56ffc580031dbc2e26a9cee9..fc0f48e11aacc900a086db77c2c3e958cc2f23db 100644 --- a/Framework/LiveData/test/SNSLiveEventDataListenerTest.h +++ b/Framework/LiveData/test/SNSLiveEventDataListenerTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/LiveData/test/StartLiveDataTest.h b/Framework/LiveData/test/StartLiveDataTest.h index 2e4299377f8e2adb9340f2154c915f14103efc3a..431bc8091f819687a6ec6927898a469fd28b1e71 100644 --- a/Framework/LiveData/test/StartLiveDataTest.h +++ b/Framework/LiveData/test/StartLiveDataTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -51,12 +51,12 @@ public: * @param AccumulationMethod :: parameter string * @return the created processed WS */ - EventWorkspace_sptr doExecEvent(std::string AccumulationMethod, - double UpdateEvery, - std::string ProcessingAlgorithm = "", - std::string ProcessingProperties = "", - std::string PostProcessingAlgorithm = "", - std::string PostProcessingProperties = "") { + EventWorkspace_sptr + doExecEvent(const std::string &AccumulationMethod, double UpdateEvery, + const std::string &ProcessingAlgorithm = "", + const std::string &ProcessingProperties = "", + const std::string &PostProcessingAlgorithm = "", + const std::string &PostProcessingProperties = "") { TS_ASSERT_THROWS_NOTHING(alg.initialize()) TS_ASSERT(alg.isInitialized()) TS_ASSERT_THROWS_NOTHING(alg.setPropertyValue("FromNow", "1")); diff --git a/Framework/LiveData/test/TestDataListener.cpp b/Framework/LiveData/test/TestDataListener.cpp index 5bcba73edd3b9bb9da3b7830dc39127fa2ffdd7a..d05e2e395b96da0eca7bdc6f93977c264f8c5b1c 100644 --- a/Framework/LiveData/test/TestDataListener.cpp +++ b/Framework/LiveData/test/TestDataListener.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "TestDataListener.h" #include "MantidAPI/Axis.h" diff --git a/Framework/LiveData/test/TestDataListener.h b/Framework/LiveData/test/TestDataListener.h index 5949fa4ed8163ef964db31d5df6b2f7282546200..83e619e748d6949cd8e7781cd67377b878733a46 100644 --- a/Framework/LiveData/test/TestDataListener.h +++ b/Framework/LiveData/test/TestDataListener.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/LiveData/test/TestGroupDataListener.cpp b/Framework/LiveData/test/TestGroupDataListener.cpp index 80ce9ebed93d4c82787cc8b2ecffe6a47f7ab051..7948fa1ff454820b1383f282e1cf508c7163dffd 100644 --- a/Framework/LiveData/test/TestGroupDataListener.cpp +++ b/Framework/LiveData/test/TestGroupDataListener.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "TestGroupDataListener.h" #include "MantidAPI/AnalysisDataService.h" diff --git a/Framework/LiveData/test/TestGroupDataListener.h b/Framework/LiveData/test/TestGroupDataListener.h index e8d84dcc378feb345d0a69106c1d191f09cee068..3e3d255bf4b9d120cbc35476e79c2eb4e81f1730 100644 --- a/Framework/LiveData/test/TestGroupDataListener.h +++ b/Framework/LiveData/test/TestGroupDataListener.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/AccumulateMD.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/AccumulateMD.h index 27819e5f9e158c11b06360730120891c42447e85..2f6b19abce933c0e037e1da09f0492b48a7248d0 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/AccumulateMD.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/AccumulateMD.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/AndMD.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/AndMD.h index 47e691f813cececa31ce0657ded479fef5bccd33..843b74ce6fe24373ac03dab2a89625d477670a81 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/AndMD.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/AndMD.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/BaseConvertToDiffractionMDWorkspace.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/BaseConvertToDiffractionMDWorkspace.h index ebaf2329193762b2a138d4276eebc8d13919a024..663452a09b5aa50494a8536549c1a1eae27dd9e3 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/BaseConvertToDiffractionMDWorkspace.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/BaseConvertToDiffractionMDWorkspace.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/BinMD.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/BinMD.h index 01e561d9bf5f4918afe80c57a3d0bff94471b2cc..b8525945da7700110e56cc51fd6dad57ca59a0dc 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/BinMD.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/BinMD.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/BinaryOperationMD.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/BinaryOperationMD.h index f1fe98f005676bb53e548764757ec03199a7653a..b46dd26b8197559df0e13e16f407f3f06f659273 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/BinaryOperationMD.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/BinaryOperationMD.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/BooleanBinaryOperationMD.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/BooleanBinaryOperationMD.h index a1634b38c6ccb87d7a3059dda5f46003d2b91dda..7998aaf1690bdd22d4c4d55fe6766696e93684f4 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/BooleanBinaryOperationMD.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/BooleanBinaryOperationMD.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/BoxControllerSettingsAlgorithm.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/BoxControllerSettingsAlgorithm.h index 90ed436d8a9bb6bde557c5a6fa3cc7cb4df94d40..3718367586913c2a561981be922fdb980dbdd451 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/BoxControllerSettingsAlgorithm.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/BoxControllerSettingsAlgorithm.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -31,17 +31,18 @@ protected: int MaxRecursionDepth = 5); /// Set the settings in the given box controller - void setBoxController(Mantid::API::BoxController_sptr bc, - Mantid::Geometry::Instrument_const_sptr instrument); + void + setBoxController(const Mantid::API::BoxController_sptr &bc, + const Mantid::Geometry::Instrument_const_sptr &instrument); /// Set the settings in the given box controller - void setBoxController(Mantid::API::BoxController_sptr bc); + void setBoxController(const Mantid::API::BoxController_sptr &bc); std::string getBoxSettingsGroupName() { return "Box Splitting Settings"; } /// Take the defaults for the box splitting from the instrument parameters. - void - takeDefaultsFromInstrument(Mantid::Geometry::Instrument_const_sptr instrument, - const size_t ndims); + void takeDefaultsFromInstrument( + const Mantid::Geometry::Instrument_const_sptr &instrument, + const size_t ndims); private: }; diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/CalculateCoverageDGS.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/CalculateCoverageDGS.h index da85b9d5d749bc42b19073c2f28f454b71b26fc5..8235e8457ff4a4da1605b95f561d557497a21567 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/CalculateCoverageDGS.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/CalculateCoverageDGS.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/CentroidPeaksMD.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/CentroidPeaksMD.h index ed289d78be3ab9a40888b773082c38c7f0aa4d5e..eb2d5c591cab9bda0797c70ff5575dc09d12194a 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/CentroidPeaksMD.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/CentroidPeaksMD.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/CentroidPeaksMD2.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/CentroidPeaksMD2.h index 3e88f1b6301c94bceff6a1cfc2b5d82f25feb909..9bbd5b5831a14a3673f0a972fd95778ab6791a11 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/CentroidPeaksMD2.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/CentroidPeaksMD2.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ChangeQConvention.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ChangeQConvention.h index 5a1b80e4c36f1930c6f6b6504bbbdbc6b90e0f44..2ce2345718e34d8224fc3802e114c547d0a9db0a 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ChangeQConvention.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ChangeQConvention.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/CloneMDWorkspace.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/CloneMDWorkspace.h index 7f73686ce533544f5031393f06dfe34859b9fd6e..ccce2c3c9796452ba62fc1516d3441d2090460ca 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/CloneMDWorkspace.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/CloneMDWorkspace.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/CompactMD.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/CompactMD.h index be688fabe57ed7d10bc15160da6f93b1b28086fc..11e967304f3bf6623f906d1507ed898e562c30fb 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/CompactMD.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/CompactMD.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -37,10 +37,10 @@ public: /// Algorithm's version for identification int version() const override { return 1; } /// Finding the extents of the first non-zero signals. - void - findFirstNonZeroMinMaxExtents(Mantid::API::IMDHistoWorkspace_sptr inputWs, - std::vector<Mantid::coord_t> &minVec, - std::vector<Mantid::coord_t> &maxVec); + void findFirstNonZeroMinMaxExtents( + const Mantid::API::IMDHistoWorkspace_sptr &inputWs, + std::vector<Mantid::coord_t> &minVec, + std::vector<Mantid::coord_t> &maxVec); }; } // namespace MDAlgorithms } // namespace Mantid diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/CompareMDWorkspaces.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/CompareMDWorkspaces.h index f1f13b40ee0342ad456c3edfdbd0851d88eddbcc..c5baef575669c52f0796c25b40827202c5dab26a 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/CompareMDWorkspaces.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/CompareMDWorkspaces.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -34,10 +34,11 @@ private: void init() override; void exec() override; void doComparison(); - void compareMDGeometry(Mantid::API::IMDWorkspace_sptr ws1, - Mantid::API::IMDWorkspace_sptr ws2); - void compareMDHistoWorkspaces(Mantid::DataObjects::MDHistoWorkspace_sptr ws1, - Mantid::DataObjects::MDHistoWorkspace_sptr ws2); + void compareMDGeometry(const Mantid::API::IMDWorkspace_sptr &ws1, + const Mantid::API::IMDWorkspace_sptr &ws2); + void compareMDHistoWorkspaces( + const Mantid::DataObjects::MDHistoWorkspace_sptr &ws1, + const Mantid::DataObjects::MDHistoWorkspace_sptr &ws2); template <typename MDE, size_t nd> void compareMDWorkspaces( diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvToMDBase.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvToMDBase.h index 5c572c78dd61310dd6f8c7c8b4ea9937f502b331..1da8a50719c23ff713b55615305cc7056d3ad4d0 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvToMDBase.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvToMDBase.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvToMDEventsWS.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvToMDEventsWS.h index 71c1408ed64627019fd3df213568d0f31c65eba9..091491d8f4954953d25b1b667381b93c9ded6505 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvToMDEventsWS.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvToMDEventsWS.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once // diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvToMDEventsWSIndexing.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvToMDEventsWSIndexing.h index 7af435ce28fd3e5e2b581436cb104de6d5f55f2a..ee730531ff42c1465643424d492b0a161ffbbbea 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvToMDEventsWSIndexing.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvToMDEventsWSIndexing.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvToMDHistoWS.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvToMDHistoWS.h index f16b4110b5d08d4cd43853e3d520cbfc72abdb32..2ebcd180abb3424a0871c7ea2f6917b072179642 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvToMDHistoWS.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvToMDHistoWS.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvToMDSelector.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvToMDSelector.h index 74bb317bac8f198c2c8a2d73118fc32a98115bcf..e6711914d6f539927b6f146c590521960b4ed3f5 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvToMDSelector.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvToMDSelector.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -33,7 +33,7 @@ public: /// function which selects the convertor depending on workspace type and /// (possibly, in a future) some workspace properties boost::shared_ptr<ConvToMDBase> - convSelector(API::MatrixWorkspace_sptr inputWS, + convSelector(const API::MatrixWorkspace_sptr &inputWS, boost::shared_ptr<ConvToMDBase> ¤tSolver) const; private: diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvertCWPDMDToSpectra.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvertCWPDMDToSpectra.h index 465b261bfb0c3d542f3fa0093dccc6012fa53dc7..7e18f4bd3123da2fdf510af4a5684f5f44aef83b 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvertCWPDMDToSpectra.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvertCWPDMDToSpectra.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -113,35 +113,37 @@ private: void exec() override; /// Main algorithm to reduce powder diffraction data - API::MatrixWorkspace_sptr reducePowderData( - API::IMDEventWorkspace_const_sptr dataws, - API::IMDEventWorkspace_const_sptr monitorws, const std::string targetunit, - const std::map<int, double> &map_runwavelength, const double xmin, - const double xmax, const double binsize, bool dolinearinterpolation, - const std::vector<detid_t> &vec_excludeddets); + API::MatrixWorkspace_sptr + reducePowderData(const API::IMDEventWorkspace_const_sptr &dataws, + const API::IMDEventWorkspace_const_sptr &monitorws, + const std::string &targetunit, + const std::map<int, double> &map_runwavelength, + const double xmin, const double xmax, const double binsize, + bool dolinearinterpolation, + const std::vector<detid_t> &vec_excludeddets); /// Find the binning boundary according to detectors' positions - void findXBoundary(API::IMDEventWorkspace_const_sptr dataws, + void findXBoundary(const API::IMDEventWorkspace_const_sptr &dataws, const std::string &targetunit, const std::map<int, double> &map_runwavelength, double &xmin, double &xmax); /// Bin signals to its 2theta position - void binMD(API::IMDEventWorkspace_const_sptr mdws, const char &unitbit, + void binMD(const API::IMDEventWorkspace_const_sptr &mdws, const char &unitbit, const std::map<int, double> &map_runlambda, const std::vector<double> &vecx, std::vector<double> &vecy, const std::vector<detid_t> &vec_excludedet); /// Do linear interpolation to zero counts if bin is too small - void linearInterpolation(API::MatrixWorkspace_sptr matrixws, + void linearInterpolation(const API::MatrixWorkspace_sptr &matrixws, const double &infinitesimal); /// Set up sample logs - void setupSampleLogs(API::MatrixWorkspace_sptr matrixws, - API::IMDEventWorkspace_const_sptr inputmdws); + void setupSampleLogs(const API::MatrixWorkspace_sptr &matrixws, + const API::IMDEventWorkspace_const_sptr &inputmdws); /// Scale reduced data - void scaleMatrixWorkspace(API::MatrixWorkspace_sptr matrixws, + void scaleMatrixWorkspace(const API::MatrixWorkspace_sptr &matrixws, const double &scalefactor, const double &infinitesimal); diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvertCWSDExpToMomentum.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvertCWSDExpToMomentum.h index 1bc6e064f6e325c2b5c214a5720473c6ef5dee59..1719bb7fa3fa258e2786b912cb822e4904a94b0e 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvertCWSDExpToMomentum.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvertCWSDExpToMomentum.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -45,7 +45,7 @@ private: void addMDEvents(bool usevirtual); void convertSpiceMatrixToMomentumMDEvents( - API::MatrixWorkspace_sptr dataws, bool usevirtual, + const API::MatrixWorkspace_sptr &dataws, bool usevirtual, const detid_t &startdetid, const int scannumber, const int runnumber, double measuretime, int monitor_counts); @@ -66,7 +66,7 @@ private: void parseDetectorTable(std::vector<Kernel::V3D> &vec_detpos, std::vector<detid_t> &vec_detid); - void setupTransferMatrix(API::MatrixWorkspace_sptr dataws, + void setupTransferMatrix(const API::MatrixWorkspace_sptr &dataws, Kernel::DblMatrix &rotationMatrix); void createVirtualInstrument(); @@ -74,7 +74,7 @@ private: void updateQRange(const std::vector<Mantid::coord_t> &vec_q); /// Remove background from - void removeBackground(API::MatrixWorkspace_sptr dataws); + void removeBackground(const API::MatrixWorkspace_sptr &dataws); API::ITableWorkspace_sptr m_expDataTableWS; API::ITableWorkspace_sptr m_detectorListTableWS; diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvertCWSDMDtoHKL.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvertCWSDMDtoHKL.h index 0c7e700e481e407927b3663a16000ae6474d6584..a627f571672e3c2dddce3964e4c5ab95b1ef9901 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvertCWSDMDtoHKL.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvertCWSDMDtoHKL.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -47,7 +47,7 @@ private: /// Execution code void exec() override; - void exportEvents(API::IMDEventWorkspace_sptr mdws, + void exportEvents(const API::IMDEventWorkspace_sptr &mdws, std::vector<Kernel::V3D> &vec_event_qsample, std::vector<signal_t> &vec_event_signal, std::vector<detid_t> &vec_event_det); @@ -74,7 +74,7 @@ private: void getUBMatrix(); - void getRange(const std::vector<Kernel::V3D> vec_hkl, + void getRange(const std::vector<Kernel::V3D> &vec_hkl, std::vector<double> &extentMins, std::vector<double> &extentMaxs); diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvertHFIRSCDtoMDE.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvertHFIRSCDtoMDE.h index efd195bda9ad3db6c83c2a7ba543dd6237954a6d..0d856a186c0c9b012457d8b28ebc0f0259941ab3 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvertHFIRSCDtoMDE.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvertHFIRSCDtoMDE.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvertMDHistoToMatrixWorkspace.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvertMDHistoToMatrixWorkspace.h index f31d37f20255237e547a28bffc24a703b06c8506..68afa0ffeb07c0aa04823d37b7e47b2a7be7f697 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvertMDHistoToMatrixWorkspace.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvertMDHistoToMatrixWorkspace.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvertSpiceDataToRealSpace.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvertSpiceDataToRealSpace.h index eb58ab2beac9d5faff99233c1db4ec792cbf954c..a38007bceaa5d39de511074a535bfa907c4d976f 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvertSpiceDataToRealSpace.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvertSpiceDataToRealSpace.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -59,8 +59,8 @@ private: /// Parse data table workspace to a vector of matrix workspaces std::vector<API::MatrixWorkspace_sptr> convertToMatrixWorkspace( - DataObjects::TableWorkspace_sptr tablews, - API::MatrixWorkspace_const_sptr parentws, + const DataObjects::TableWorkspace_sptr &tablews, + const API::MatrixWorkspace_const_sptr &parentws, Types::Core::DateAndTime runstart, std::map<std::string, std::vector<double>> &logvecmap, std::vector<Types::Core::DateAndTime> &vectimes); @@ -71,43 +71,42 @@ private: /// Create an MDWorkspace for monitor counts API::IMDEventWorkspace_sptr createMonitorMDWorkspace( - const std::vector<API::MatrixWorkspace_sptr> vec_ws2d, + const std::vector<API::MatrixWorkspace_sptr> &vec_ws2d, const std::vector<double> &vecmonitor); /// Read parameter information from table workspace - void readTableInfo(DataObjects::TableWorkspace_const_sptr tablews, + void readTableInfo(const DataObjects::TableWorkspace_const_sptr &tablews, size_t &ipt, size_t &irotangle, size_t &itime, std::vector<std::pair<size_t, size_t>> &anodelist, std::map<std::string, size_t> &samplenameindexmap); /// Return sample logs - void parseSampleLogs(DataObjects::TableWorkspace_sptr tablews, + void parseSampleLogs(const DataObjects::TableWorkspace_sptr &tablews, const std::map<std::string, size_t> &indexlist, std::map<std::string, std::vector<double>> &logvecmap); /// Load one run (one pt.) to a matrix workspace - API::MatrixWorkspace_sptr - loadRunToMatrixWS(DataObjects::TableWorkspace_sptr tablews, size_t irow, - API::MatrixWorkspace_const_sptr parentws, - Types::Core::DateAndTime runstart, size_t ipt, - size_t irotangle, size_t itime, - const std::vector<std::pair<size_t, size_t>> anodelist, - double &duration); + API::MatrixWorkspace_sptr loadRunToMatrixWS( + const DataObjects::TableWorkspace_sptr &tablews, size_t irow, + const API::MatrixWorkspace_const_sptr &parentws, + Types::Core::DateAndTime runstart, size_t ipt, size_t irotangle, + size_t itime, const std::vector<std::pair<size_t, size_t>> &anodelist, + double &duration); /// Append Experiment Info void - addExperimentInfos(API::IMDEventWorkspace_sptr mdws, - const std::vector<API::MatrixWorkspace_sptr> vec_ws2d); + addExperimentInfos(const API::IMDEventWorkspace_sptr &mdws, + const std::vector<API::MatrixWorkspace_sptr> &vec_ws2d); /// Append sample logs to MD workspace void - appendSampleLogs(API::IMDEventWorkspace_sptr mdws, + appendSampleLogs(const API::IMDEventWorkspace_sptr &mdws, const std::map<std::string, std::vector<double>> &logvecmap, const std::vector<Types::Core::DateAndTime> &vectimes); /// Parse detector efficiency table workspace to map - std::map<detid_t, double> - parseDetectorEfficiencyTable(DataObjects::TableWorkspace_sptr detefftablews); + std::map<detid_t, double> parseDetectorEfficiencyTable( + const DataObjects::TableWorkspace_sptr &detefftablews); /// Apply the detector's efficiency correction to void diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvertToDetectorFaceMD.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvertToDetectorFaceMD.h index bfac3b59c7cc6676063b7ce6943b676526d8048b..92929821e2cb48fe8a447da7e3a2ec119b8af770 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvertToDetectorFaceMD.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvertToDetectorFaceMD.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvertToDiffractionMDWorkspace.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvertToDiffractionMDWorkspace.h index b081806ef941af59e524b0488de4683c12a212d4..c956d370c4287ddd05e7ca0ba91eda4a4c1cdea7 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvertToDiffractionMDWorkspace.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvertToDiffractionMDWorkspace.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvertToDiffractionMDWorkspace2.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvertToDiffractionMDWorkspace2.h index 4477152d1b6a6c88b1282d0f1cbbfac462f967d4..85095c24b4da41ab8c2e9d55f6d1196606296aa1 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvertToDiffractionMDWorkspace2.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvertToDiffractionMDWorkspace2.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvertToDiffractionMDWorkspace3.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvertToDiffractionMDWorkspace3.h index 26a24c6b68a9971cf8b0638c65f2b846c2cf70a1..4a92a64160b204a2f268de39ad204365c96988e1 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvertToDiffractionMDWorkspace3.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvertToDiffractionMDWorkspace3.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvertToMD.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvertToMD.h index 3972503dd53874360892b0a78580ed2464b2d59e..cb19a48fac4f9e3486d7188bd1b6e1305a78ef8e 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvertToMD.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvertToMD.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -60,8 +60,8 @@ private: /// progress reporter boost::scoped_ptr<API::Progress> m_Progress; - void setupFileBackend(std::string filebackPath, - API::IMDEventWorkspace_sptr outputWS); + void setupFileBackend(const std::string &filebackPath, + const API::IMDEventWorkspace_sptr &outputWS); //------------------------------------------------------------------------------------------------------------------------------------------ protected: // for testing, otherwise private: @@ -74,13 +74,13 @@ protected: // for testing, otherwise private: // Workflow helpers: /**Check if target workspace new or existing one and we need to create new * workspace*/ - bool doWeNeedNewTargetWorkspace(API::IMDEventWorkspace_sptr spws); + bool doWeNeedNewTargetWorkspace(const API::IMDEventWorkspace_sptr &spws); /**Create new MD workspace using existing parameters for algorithm */ API::IMDEventWorkspace_sptr createNewMDWorkspace(const MDAlgorithms::MDWSDescription &targWSDescr, const bool filebackend, const std::string &filename); - bool buildTargetWSDescription(API::IMDEventWorkspace_sptr spws, + bool buildTargetWSDescription(const API::IMDEventWorkspace_sptr &spws, const std::string &QModReq, const std::string &dEModReq, const std::vector<std::string> &otherDimNames, @@ -106,7 +106,7 @@ protected: // for testing, otherwise private: std::vector<double> &minVal, std::vector<double> &maxVal); /// Sets up the top level splitting, i.e. of level 0, for the box controller - void setupTopLevelSplitting(Mantid::API::BoxController_sptr bc); + void setupTopLevelSplitting(const Mantid::API::BoxController_sptr &bc); }; } // namespace MDAlgorithms diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvertToMDMinMaxGlobal.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvertToMDMinMaxGlobal.h index 1cc9c260addaeddded3241ca8fde471658f079f5..5ad0430fde14ab7e75ba9ece20ab56be757d3b78 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvertToMDMinMaxGlobal.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvertToMDMinMaxGlobal.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvertToMDMinMaxLocal.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvertToMDMinMaxLocal.h index f243bbb1b4b9cf709dbc7b3de98755a50e9cad97..537077cabb662536e91c1bad2d5924246c919b19 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvertToMDMinMaxLocal.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvertToMDMinMaxLocal.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvertToMDParent.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvertToMDParent.h index 4a2a670b5f60d8625af893e9d361a8c0004cfa48..e8e4017f5c92452c64778b8da9d6e206a4fe72e1 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvertToMDParent.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvertToMDParent.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvertToReflectometryQ.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvertToReflectometryQ.h index 2cf74842f63c3ebe467c6f7c20cecd60ecf5625b..1055f49a71953dc35851de0b7b48cee1ed7225af 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvertToReflectometryQ.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvertToReflectometryQ.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/CreateMD.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/CreateMD.h index c77a1175eae83d3bb231a7e271a2605c84de7c01..7f0eb9c749cb75e7e5c64e4605a3532075b26f2c 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/CreateMD.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/CreateMD.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -43,23 +43,23 @@ private: const std::string &wsname); /// Add a sample log to a workspace - void addSampleLog(Mantid::API::MatrixWorkspace_sptr workspace, + void addSampleLog(const Mantid::API::MatrixWorkspace_sptr &workspace, const std::string &log_name, double log_number); /// Set the goniometer values in a workspace - void setGoniometer(Mantid::API::MatrixWorkspace_sptr workspace); + void setGoniometer(const Mantid::API::MatrixWorkspace_sptr &workspace); /// Set the UB matrix in a workspace - void setUB(Mantid::API::MatrixWorkspace_sptr workspace, double a, double b, - double c, double alpha, double beta, double gamma, + void setUB(const Mantid::API::MatrixWorkspace_sptr &workspace, double a, + double b, double c, double alpha, double beta, double gamma, const std::vector<double> &u, const std::vector<double> &v); /// Convert a workspace to MDWorkspace Mantid::API::IMDEventWorkspace_sptr - convertToMD(Mantid::API::Workspace_sptr workspace, + convertToMD(const Mantid::API::Workspace_sptr &workspace, const std::string &analysis_mode, bool in_place, const std::string &filebackend_filename, const bool filebackend, - Mantid::API::IMDEventWorkspace_sptr out_mdws); + const Mantid::API::IMDEventWorkspace_sptr &out_mdws); /// Merge input workspaces Mantid::API::IMDEventWorkspace_sptr @@ -67,13 +67,13 @@ private: /// Add logs and convert to MDWorkspace for a single run Mantid::API::IMDEventWorkspace_sptr - single_run(Mantid::API::MatrixWorkspace_sptr input_workspace, + single_run(const Mantid::API::MatrixWorkspace_sptr &input_workspace, const std::string &emode, double efix, double psi, double gl, double gs, bool in_place, const std::vector<double> &alatt, const std::vector<double> &angdeg, const std::vector<double> &u, const std::vector<double> &v, const std::string &filebackend_filename, const bool filebackend, - Mantid::API::IMDEventWorkspace_sptr out_mdws); + const Mantid::API::IMDEventWorkspace_sptr &out_mdws); /// Validate the algorithm's input properties std::map<std::string, std::string> validateInputs() override; diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/CreateMDHistoWorkspace.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/CreateMDHistoWorkspace.h index 7b9413f85c73c9b6fce8efc5c61305ad256d71df..06394bb1bdc4e4df72aa7d2b513e48343027768b 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/CreateMDHistoWorkspace.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/CreateMDHistoWorkspace.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/CreateMDWorkspace.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/CreateMDWorkspace.h index 2e968587753540e67b4c5f15a7bd1b4b9c895b03..af76fc6919dee496e8036c77bfb010cfcd869e4e 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/CreateMDWorkspace.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/CreateMDWorkspace.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -57,8 +57,8 @@ private: template <typename MDE, size_t nd> void finish(typename DataObjects::MDEventWorkspace<MDE, nd>::sptr ws); - Mantid::Geometry::MDFrame_uptr createMDFrame(std::string frame, - std::string unit); + Mantid::Geometry::MDFrame_uptr createMDFrame(const std::string &frame, + const std::string &unit); bool checkIfFrameValid(const std::string &frame, const std::vector<std::string> &targetFrames); }; diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/CutMD.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/CutMD.h index aa3ef3a6e86df1db44e2b04d1597d6be698a22a2..7b52787fc1883a49532f38b61b239bdf7392a326 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/CutMD.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/CutMD.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -14,9 +14,9 @@ namespace Mantid { namespace MDAlgorithms { -std::vector<std::string> - DLLExport findOriginalQUnits(Mantid::API::IMDWorkspace_const_sptr inws, - Mantid::Kernel::Logger &logger); +std::vector<std::string> DLLExport +findOriginalQUnits(const Mantid::API::IMDWorkspace_const_sptr &inws, + Mantid::Kernel::Logger &logger); /** CutMD : Slices multidimensional workspaces. diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/DisplayNormalizationSetter.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/DisplayNormalizationSetter.h index 44fbdb16a7a2ef805e21210af331f1c2646f43d9..24e2d7c1b902126c23be415a2378da385e39171b 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/DisplayNormalizationSetter.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/DisplayNormalizationSetter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidAPI/IMDWorkspace.h" @@ -19,7 +19,7 @@ energy-transfer-mode */ class DLLExport DisplayNormalizationSetter { public: - void operator()(Mantid::API::IMDWorkspace_sptr mdWorkspace, + void operator()(const Mantid::API::IMDWorkspace_sptr &mdWorkspace, const Mantid::API::MatrixWorkspace_sptr &underlyingWorkspace, bool isQ = false, const Mantid::Kernel::DeltaEMode::Type &mode = @@ -27,14 +27,14 @@ public: private: void setNormalizationMDEvent( - Mantid::API::IMDWorkspace_sptr mdWorkspace, + const Mantid::API::IMDWorkspace_sptr &mdWorkspace, const Mantid::API::MatrixWorkspace_sptr &underlyingWorkspace, bool isQ = false, const Mantid::Kernel::DeltaEMode::Type &mode = Mantid::Kernel::DeltaEMode::Elastic); void applyNormalizationMDEvent( - Mantid::API::IMDWorkspace_sptr mdWorkspace, + const Mantid::API::IMDWorkspace_sptr &mdWorkspace, Mantid::API::MDNormalization displayNormalization, Mantid::API::MDNormalization displayNormalizationHisto); }; diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/DivideMD.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/DivideMD.h index da6f722f1477ea79e7145fc24699d32dcdb6fa57..63243a09cf69f9441367d92074ccdd6292b12191 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/DivideMD.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/DivideMD.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/DllConfig.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/DllConfig.h index b834d2f25cbe53123bfa638d8ef4d15581258011..4115b02d60b6ecc240483514ba2b673c301bdc72 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/DllConfig.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/DllConfig.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/EqualToMD.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/EqualToMD.h index 519cafa500266ef1f42e7c39aad27523c6cde495..7864049807e6ac09e6018df918f261d941e4368d 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/EqualToMD.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/EqualToMD.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/EvaluateMDFunction.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/EvaluateMDFunction.h index f908a73dfd15e6550d5451304fff0c3cfade794e..2882d23721dece5144a4e48a940b1ff1577c7ed8 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/EvaluateMDFunction.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/EvaluateMDFunction.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ExponentialMD.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ExponentialMD.h index 952108171fcdc06b20b7fc057c847d17053427b6..14b4cd817a6f8ee749a91dab804af15f9bf19bfa 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ExponentialMD.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ExponentialMD.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/FakeMDEventData.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/FakeMDEventData.h index db9a2825809ff714e2674b88455e1966e706af31..e98d83589c7904c8a7a65625c98f3e453a79934b 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/FakeMDEventData.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/FakeMDEventData.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/FindPeaksMD.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/FindPeaksMD.h index 37568acbee891df9e1c728b9a1e5500962af1c89..14cb071885c5bb75b155164c8da7da16548ec0ac 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/FindPeaksMD.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/FindPeaksMD.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -74,7 +74,7 @@ private: template <typename MDE, size_t nd> void findPeaks(typename DataObjects::MDEventWorkspace<MDE, nd>::sptr ws); /// Run find peaks on a histo workspace - void findPeaksHisto(Mantid::DataObjects::MDHistoWorkspace_sptr ws); + void findPeaksHisto(const Mantid::DataObjects::MDHistoWorkspace_sptr &ws); /// Output PeaksWorkspace Mantid::DataObjects::PeaksWorkspace_sptr peakWS; diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/FitMD.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/FitMD.h index ae9939e35570bbcf078a5314f7aa15b0a43f06c7..b8350d48d2f4c14bb7d1b71323e49f8c816fe43e 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/FitMD.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/FitMD.h @@ -1,14 +1,16 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once //---------------------------------------------------------------------- // Includes //---------------------------------------------------------------------- +#include <utility> + #include "MantidAPI/IDomainCreator.h" namespace Mantid { @@ -64,7 +66,7 @@ public: size_t getDomainSize() const override; /// Set the workspace void setWorkspace(boost::shared_ptr<API::IMDWorkspace> IMDWorkspace) { - m_IMDWorkspace = IMDWorkspace; + m_IMDWorkspace = std::move(IMDWorkspace); } /// Set the range void setRange(size_t startIndex, size_t count); @@ -83,8 +85,8 @@ protected: const std::string &outputWorkspacePropertyName); /// Create histo output workspace boost::shared_ptr<API::Workspace> createHistoOutputWorkspace( - const std::string &baseName, API::IFunction_sptr function, - boost::shared_ptr<const API::IMDHistoWorkspace> inputWorkspace, + const std::string &baseName, const API::IFunction_sptr &function, + const boost::shared_ptr<const API::IMDHistoWorkspace> &inputWorkspace, const std::string &outputWorkspacePropertyName); /// Store workspace property name diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/FlippingRatioCorrectionMD.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/FlippingRatioCorrectionMD.h index 217761045bc9547cea40e02fc8b5bed2bb561c0c..e84108a68aaf67ac93060a842d49df27ffc8bc0c 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/FlippingRatioCorrectionMD.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/FlippingRatioCorrectionMD.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/GSLFunctions.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/GSLFunctions.h index 3dafc57249005e4059d4cf3883bc8b1771101da9..4e96825b0b084d3e2fd7564e71cd6223bd1a2330 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/GSLFunctions.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/GSLFunctions.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidAPI/CompositeFunction.h" diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/GetSpiceDataRawCountsFromMD.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/GetSpiceDataRawCountsFromMD.h index 38c49d12b5011e1770225552d2ca980208e56396..aba7a9949d9533cb1d29068e02458f74fbb0c079 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/GetSpiceDataRawCountsFromMD.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/GetSpiceDataRawCountsFromMD.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -47,34 +47,35 @@ private: void exec() override; /// Export all detectors' counts for a run - void exportDetCountsOfRun(API::IMDEventWorkspace_const_sptr datamdws, - API::IMDEventWorkspace_const_sptr monitormdws, - const int runnumber, std::vector<double> &vecX, - std::vector<double> &vecY, std::string &xlabel, - std::string &ylabel, bool donormalize); + void + exportDetCountsOfRun(const API::IMDEventWorkspace_const_sptr &datamdws, + const API::IMDEventWorkspace_const_sptr &monitormdws, + const int runnumber, std::vector<double> &vecX, + std::vector<double> &vecY, std::string &xlabel, + std::string &ylabel, bool donormalize); /// Export a detector's counts accross all runs - void exportIndividualDetCounts(API::IMDEventWorkspace_const_sptr datamdws, - API::IMDEventWorkspace_const_sptr monitormdws, - const int detid, std::vector<double> &vecX, - std::vector<double> &vecY, std::string &xlabel, - std::string &ylabel, const bool &donormalize); + void exportIndividualDetCounts( + const API::IMDEventWorkspace_const_sptr &datamdws, + const API::IMDEventWorkspace_const_sptr &monitormdws, const int detid, + std::vector<double> &vecX, std::vector<double> &vecY, std::string &xlabel, + std::string &ylabel, const bool &donormalize); /// Export sample log values accross all runs - void exportSampleLogValue(API::IMDEventWorkspace_const_sptr datamdws, + void exportSampleLogValue(const API::IMDEventWorkspace_const_sptr &datamdws, const std::string &samplelogname, std::vector<double> &vecX, std::vector<double> &vecY, std::string &xlabel, std::string &ylabel); /// Get detectors' counts - void getDetCounts(API::IMDEventWorkspace_const_sptr mdws, + void getDetCounts(const API::IMDEventWorkspace_const_sptr &mdws, const int &runnumber, const int &detid, std::vector<double> &vecX, std::vector<double> &vecY, bool formX); /// Get sample log values - void getSampleLogValues(API::IMDEventWorkspace_const_sptr mdws, + void getSampleLogValues(const API::IMDEventWorkspace_const_sptr &mdws, const std::string &samplelogname, const int runnumber, std::vector<double> &vecSampleLog); diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/GreaterThanMD.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/GreaterThanMD.h index c66181486dd6f3904d5cd62db6bc0dc0812ea490..cdb7fb610a528dfc293d42e1b4aba1b01a7900ad 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/GreaterThanMD.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/GreaterThanMD.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/IDynamicRebinning.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/IDynamicRebinning.h index d7cadffb578ec7f700b38850ce1f531f4e9664c1..89dc46c493f915a4c03e16b41ee206d07a24d736 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/IDynamicRebinning.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/IDynamicRebinning.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidKernel/Logger.h" diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ImportMDEventWorkspace.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ImportMDEventWorkspace.h index ff4bb932b565ba6728cb610f3e639aa02f299bf0..be1c06227b17de9b212c51c74f227f591542bb27 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ImportMDEventWorkspace.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ImportMDEventWorkspace.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ImportMDHistoWorkspace.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ImportMDHistoWorkspace.h index d17ef7491c8389dc6f956edd73dc7ac7c379e284..f68f6bc2dff69c7b6d4faa3156d03465ea404c59 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ImportMDHistoWorkspace.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ImportMDHistoWorkspace.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ImportMDHistoWorkspaceBase.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ImportMDHistoWorkspaceBase.h index 7496e599971c9c48fd8880ad492d87890eaabe54..c9b16ab41c21634a1d38f5990f0863cd5b71cde3 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ImportMDHistoWorkspaceBase.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ImportMDHistoWorkspaceBase.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -37,8 +37,8 @@ protected: private: // Product of the bins across all dimensions. size_t m_bin_product = 0; - Mantid::Geometry::MDFrame_uptr createMDFrame(std::string frame, - std::string unit); + Mantid::Geometry::MDFrame_uptr createMDFrame(const std::string &frame, + const std::string &unit); bool checkIfFrameValid(const std::string &frame, const std::vector<std::string> &targetFrames); }; diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/Integrate3DEvents.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/Integrate3DEvents.h index 50fb756a533c91528f7393ca0775e91c354ed70a..ef2ddcf9f394819323feb5f47ee9de361485e5dc 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/Integrate3DEvents.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/Integrate3DEvents.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -80,7 +80,7 @@ public: /// Find the net integrated intensity of a peak, using ellipsoidal volumes boost::shared_ptr<const Mantid::Geometry::PeakShape> ellipseIntegrateEvents( - std::vector<Kernel::V3D> E1Vec, Mantid::Kernel::V3D const &peak_q, + const std::vector<Kernel::V3D> &E1Vec, Mantid::Kernel::V3D const &peak_q, bool specify_size, double peak_radius, double back_inner_radius, double back_outer_radius, std::vector<double> &axes_radii, double &inti, double &sigi); @@ -88,7 +88,7 @@ public: /// Find the net integrated intensity of a modulated peak, using ellipsoidal /// volumes boost::shared_ptr<const Mantid::Geometry::PeakShape> - ellipseIntegrateModEvents(std::vector<Kernel::V3D> E1Vec, + ellipseIntegrateModEvents(const std::vector<Kernel::V3D> &E1Vec, Mantid::Kernel::V3D const &peak_q, Mantid::Kernel::V3D const &hkl, Mantid::Kernel::V3D const &mnp, bool specify_size, @@ -176,7 +176,7 @@ private: /// Find the net integrated intensity of a list of Q's using ellipsoids boost::shared_ptr<const Mantid::DataObjects::PeakShapeEllipsoid> ellipseIntegrateEvents( - std::vector<Kernel::V3D> E1Vec, Kernel::V3D const &peak_q, + const std::vector<Kernel::V3D> &E1Vec, Kernel::V3D const &peak_q, std::vector<std::pair<std::pair<double, double>, Mantid::Kernel::V3D>> const &ev_list, std::vector<Mantid::Kernel::V3D> const &directions, @@ -185,7 +185,7 @@ private: std::vector<double> &axes_radii, double &inti, double &sigi); /// Compute if a particular Q falls on the edge of a detector - double detectorQ(std::vector<Kernel::V3D> E1Vec, + double detectorQ(const std::vector<Kernel::V3D> &E1Vec, const Mantid::Kernel::V3D QLabFrame, const std::vector<double> &r); diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/IntegrateEllipsoids.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/IntegrateEllipsoids.h index a21a6831a7b0bd96d0ce68c109a22b62b579b296..ba54418df9fd3ffb01fb0f711981a34c6d8bb4ac 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/IntegrateEllipsoids.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/IntegrateEllipsoids.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -52,8 +52,8 @@ private: /// Calculate if this Q is on a detector void calculateE1(const Geometry::DetectorInfo &detectorInfo); - void runMaskDetectors(Mantid::DataObjects::PeaksWorkspace_sptr peakWS, - std::string property, std::string values); + void runMaskDetectors(const Mantid::DataObjects::PeaksWorkspace_sptr &peakWS, + const std::string &property, const std::string &values); /// save for all detector pixels std::vector<Kernel::V3D> E1Vec; diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/IntegrateEllipsoidsTwoStep.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/IntegrateEllipsoidsTwoStep.h index a397f641ee3a476d46e094959dab16b21a035def..c00e19cc3a8c77862123761b39358d5c22a3d2ca 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/IntegrateEllipsoidsTwoStep.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/IntegrateEllipsoidsTwoStep.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -54,8 +54,8 @@ private: const Kernel::DblMatrix &UBinv, bool hkl_integ); /// Calculate if this Q is on a detector void calculateE1(const Geometry::DetectorInfo &detectorInfo); - void runMaskDetectors(Mantid::DataObjects::PeaksWorkspace_sptr peakWS, - std::string property, std::string values); + void runMaskDetectors(const Mantid::DataObjects::PeaksWorkspace_sptr &peakWS, + const std::string &property, const std::string &values); /// integrate a collection of strong peaks DataObjects::PeaksWorkspace_sptr diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/IntegrateFlux.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/IntegrateFlux.h index 4b79f8b85fb0efb6a312778d627b08a2c35a1162..c52412d7a8b8a72fe1c1606dcca869e557b5cc82 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/IntegrateFlux.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/IntegrateFlux.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/IntegrateMDHistoWorkspace.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/IntegrateMDHistoWorkspace.h index 7be67e23921f6b2d9a5762059c8697733be47915..5e3c4e31d3591d29ac7bc0b9b428eb5a0f3bf26d 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/IntegrateMDHistoWorkspace.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/IntegrateMDHistoWorkspace.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/IntegratePeaksCWSD.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/IntegratePeaksCWSD.h index b9ff6a09efe2e06955469d862407c680684a7904..39f6ce7ae3c9429ae16b16daafb468bef1dbb1ee 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/IntegratePeaksCWSD.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/IntegratePeaksCWSD.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -70,7 +70,7 @@ private: std::map<int, double> getMeasureTime(); std::vector<detid_t> - processMaskWorkspace(DataObjects::MaskWorkspace_const_sptr maskws); + processMaskWorkspace(const DataObjects::MaskWorkspace_const_sptr &maskws); void getPeakInformation(); @@ -82,7 +82,8 @@ private: void normalizePeaksIntensities(); DataObjects::PeaksWorkspace_sptr - createPeakworkspace(Kernel::V3D peakCenter, API::IMDEventWorkspace_sptr mdws); + createPeakworkspace(Kernel::V3D peakCenter, + const API::IMDEventWorkspace_sptr &mdws); /// Input MDEventWorkspace Mantid::API::IMDEventWorkspace_sptr m_inputWS; diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/IntegratePeaksMD.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/IntegratePeaksMD.h index 8dd650cae0ad4e12a8d8a902e9cf89d5cf996bcd..7dd4074e77aafee7ec565d46d0f95732a0a6de68 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/IntegratePeaksMD.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/IntegratePeaksMD.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/IntegratePeaksMD2.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/IntegratePeaksMD2.h index 2f0039ba9b36d45b70b4f03bdc222ed2283cedf2..ce470c860cb4c4a6ffd6c3ee36a2a143589432be 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/IntegratePeaksMD2.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/IntegratePeaksMD2.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -61,14 +61,15 @@ private: /// Calculate if this Q is on a detector void calculateE1(const Geometry::DetectorInfo &detectorInfo); double detectorQ(Mantid::Kernel::V3D QLabFrame, double r); - void runMaskDetectors(Mantid::DataObjects::PeaksWorkspace_sptr peakWS, - std::string property, std::string values); + void runMaskDetectors(const Mantid::DataObjects::PeaksWorkspace_sptr &peakWS, + const std::string &property, const std::string &values); /// save for all detector pixels std::vector<Kernel::V3D> E1Vec; /// Check if peaks overlap - void checkOverlap(int i, Mantid::DataObjects::PeaksWorkspace_sptr peakWS, + void checkOverlap(int i, + const Mantid::DataObjects::PeaksWorkspace_sptr &peakWS, Mantid::Kernel::SpecialCoordinateSystem CoordinatesToUse, double radius); }; diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/IntegratePeaksMDHKL.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/IntegratePeaksMDHKL.h index a44507664d6a028525f80342e29d1ec278de50d7..a6c4ad062a6b2475d1bce138eaf93aaf1e33732b 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/IntegratePeaksMDHKL.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/IntegratePeaksMDHKL.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -60,8 +60,8 @@ private: DataObjects::MDHistoWorkspace_sptr cropHisto(int h, int k, int l, double box, const API::IMDWorkspace_sptr &ws); void integratePeak(const int neighborPts, - DataObjects::MDHistoWorkspace_sptr out, double &intensity, - double &errorSquared); + const DataObjects::MDHistoWorkspace_sptr &out, + double &intensity, double &errorSquared); }; } // namespace MDAlgorithms diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/InvalidParameter.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/InvalidParameter.h index fe9613eb6156899094f2ba71949fc247ef945f6f..416c86aca36a59fb79aee3f5006b478908d31c58 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/InvalidParameter.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/InvalidParameter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/InvalidParameterParser.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/InvalidParameterParser.h index 93bb9cb5c5711d7022211452ae8c461075ce6760..356f3df25dbf20530d72cfcc13d92260e8fa8f72 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/InvalidParameterParser.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/InvalidParameterParser.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/LessThanMD.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/LessThanMD.h index bbe1030e4b68b3a3397e140b515b3edea46b90fb..9b44cf8ac7f5be26f362702e7ad6916b9abb4141 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/LessThanMD.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/LessThanMD.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/LoadDNSSCD.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/LoadDNSSCD.h index ab77d918fb01758e01dd191f36723f959e357405..d67fa614cb781cc4c501170bc77a8492ab63952b 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/LoadDNSSCD.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/LoadDNSSCD.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -10,6 +10,7 @@ #include "MantidAPI/IFileLoader.h" #include "MantidAPI/IMDEventWorkspace_fwd.h" #include "MantidDataObjects/MDEventWorkspace.h" +#include "MantidKernel/FileDescriptor.h" #include "MantidKernel/Matrix.h" #include "MantidKernel/System.h" #include "MantidKernel/V3D.h" @@ -88,13 +89,13 @@ private: Mantid::API::IMDEventWorkspace_sptr m_OutWS; int splitIntoColumns(std::list<std::string> &columns, std::string &str); - void read_data(const std::string fname, + void read_data(const std::string &fname, std::map<std::string, std::string> &str_metadata, std::map<std::string, double> &num_metadata); void fillOutputWorkspace(double wavelength); void fillOutputWorkspaceRaw(double wavelength); API::ITableWorkspace_sptr saveHuber(); - void loadHuber(API::ITableWorkspace_sptr tws); + void loadHuber(const API::ITableWorkspace_sptr &tws); template <class T> void updateProperties(API::Run &run, std::map<std::string, T> &metadata, std::string time); diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/LoadMD.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/LoadMD.h index 3d406829d4954dee29edbab8e917b9fde2064b09..9d421695064819b7b09f82e53cd8602bb15a64d4 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/LoadMD.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/LoadMD.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -10,7 +10,9 @@ #include "MantidAPI/IFileLoader.h" #include "MantidAPI/IMDEventWorkspace_fwd.h" #include "MantidDataObjects/MDEventWorkspace.h" +#include "MantidKernel/NexusDescriptor.h" #include "MantidKernel/System.h" + #include <boost/optional.hpp> #include <boost/scoped_ptr.hpp> @@ -60,8 +62,8 @@ private: void loadExperimentInfos( boost::shared_ptr<Mantid::API::MultipleExperimentInfos> ws); - void loadSlab(std::string name, void *data, - DataObjects::MDHistoWorkspace_sptr ws, + void loadSlab(const std::string &name, void *data, + const DataObjects::MDHistoWorkspace_sptr &ws, NeXus::NXnumtype dataType); void loadHisto(); @@ -78,18 +80,18 @@ private: boost::optional<Mantid::API::MDNormalization> &normalization); /// Load all the affine matricies - void loadAffineMatricies(API::IMDWorkspace_sptr ws); + void loadAffineMatricies(const API::IMDWorkspace_sptr &ws); /// Load a given affine matrix - API::CoordTransform *loadAffineMatrix(std::string entry_name); + API::CoordTransform *loadAffineMatrix(const std::string &entry_name); /// Sets MDFrames for workspaces from legacy files - void setMDFrameOnWorkspaceFromLegacyFile(API::IMDWorkspace_sptr ws); + void setMDFrameOnWorkspaceFromLegacyFile(const API::IMDWorkspace_sptr &ws); /// Checks if a worspace is a certain type of legacy file - void checkForRequiredLegacyFixup(API::IMDWorkspace_sptr ws); + void checkForRequiredLegacyFixup(const API::IMDWorkspace_sptr &ws); /// Negative scaling for Q dimensions - std::vector<double> qDimensions(API::IMDWorkspace_sptr ws); + std::vector<double> qDimensions(const API::IMDWorkspace_sptr &ws); /// Open file handle // clang-format off diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/LoadSQW.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/LoadSQW.h index 03196c745d7a008459a603bc6581d997594b349e..f7726c846c0a792e9dfc0bc81c651d3fb46de3cf 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/LoadSQW.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/LoadSQW.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/LoadSQW2.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/LoadSQW2.h index 5922fe025542b7301d8232ee14450e733ccb33a9..7a95acbba7ed06b91a47b1f23f39303becd58834 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/LoadSQW2.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/LoadSQW2.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -10,7 +10,7 @@ #include "MantidDataObjects/MDEvent.h" #include "MantidDataObjects/MDEventWorkspace.h" #include "MantidKernel/BinaryStreamReader.h" - +#include "MantidKernel/FileDescriptor.h" #include <fstream> namespace Mantid { @@ -63,7 +63,7 @@ private: Geometry::IMDDimension_sptr createEnDimension(float umin, float umax, size_t nbins); void setupBoxController(); - void setupFileBackend(std::string filebackPath); + void setupFileBackend(const std::string &filebackPath); void readPixelDataIntoWorkspace(); void splitAllBoxes(); void warnIfMemoryInsufficient(int64_t npixtot); diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/LogarithmMD.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/LogarithmMD.h index e930b6ade053faaf4d5f94ea816021a8690e8135..0c36afb7dff8925f606d327e2601d2795cdafd33 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/LogarithmMD.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/LogarithmMD.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDEventTreeBuilder.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDEventTreeBuilder.h index 0b6034a8a5e962ddacc3eea188961d4ce8ed5c31..5778c6eba74054cbde7587c9c9c905d50df8eb33 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDEventTreeBuilder.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDEventTreeBuilder.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDEventWSWrapper.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDEventWSWrapper.h index 1ec22231851e7b497eaf76ab772bb386259cddea..80d7fa1e408e71b4d1fe721807601ef1cdead0bf 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDEventWSWrapper.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDEventWSWrapper.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDNorm.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDNorm.h index 75d42cb6762a317c2af237ae246b88b4abf244bd..f0bf7fced21ae1f62163a28caf23263099e7016d 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDNorm.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDNorm.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -34,25 +34,25 @@ private: void exec() override; void validateBinningForTemporaryDataWorkspace( const std::map<std::string, std::string> &, - const Mantid::API::IMDHistoWorkspace_sptr); + const Mantid::API::IMDHistoWorkspace_sptr &); std::map<std::string, std::string> validateInputs() override final; std::string QDimensionName(std::vector<double> projection); std::string QDimensionNameQSample(int i); std::map<std::string, std::string> getBinParameters(); void createNormalizationWS(const DataObjects::MDHistoWorkspace &dataWS); DataObjects::MDHistoWorkspace_sptr - binInputWS(std::vector<Geometry::SymmetryOperation> symmetryOps); + binInputWS(const std::vector<Geometry::SymmetryOperation> &symmetryOps); std::vector<coord_t> getValuesFromOtherDimensions(bool &skipNormalization, uint16_t expInfoIndex = 0) const; void cacheDimensionXValues(); void calculateNormalization(const std::vector<coord_t> &otherValues, - Geometry::SymmetryOperation so, + const Geometry::SymmetryOperation &so, uint16_t expInfoIndex, size_t soIndex); void calculateIntersections(std::vector<std::array<double, 4>> &intersections, const double theta, const double phi, - Kernel::DblMatrix transform, double lowvalue, - double highvalue); + const Kernel::DblMatrix &transform, + double lowvalue, double highvalue); void calcIntegralsForIntersections(const std::vector<double> &xValues, const API::MatrixWorkspace &integrFlux, size_t sp, std::vector<double> &yValues); diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDNormDirectSC.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDNormDirectSC.h index c16850e31b1be197f45084ceafec0a6f7f8a4488..22ebe30ecbacfabb86a409e6ad6958c762f58900 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDNormDirectSC.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDNormDirectSC.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDNormSCD.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDNormSCD.h index 92f7ac88c9cbcd520bbc6125085753adf45fa042..d3c353bde1af2cf94840fb9c66f2f6ef364eb881 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDNormSCD.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDNormSCD.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDTransfAxisNames.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDTransfAxisNames.h index 4a0393859743937c629f0284812bae4b11155f37..753159daa2e067bbafd8809f10735720e349459f 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDTransfAxisNames.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDTransfAxisNames.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once //#include "MantidDataObjects/MDTransfDEHelper.h" diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDTransfFactory.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDTransfFactory.h index 0992ec7b39ad2a7655b9d19359701e1bfd578b30..9d9bd653cbfa004e9b658b23b3cb2b80464bc50b 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDTransfFactory.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDTransfFactory.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDTransfInterface.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDTransfInterface.h index 69273d4b399f4034a1a9bce5d65912c0f6b2bffd..5a78983401316b75266e589710c4a2a6d14c8522 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDTransfInterface.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDTransfInterface.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDTransfModQ.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDTransfModQ.h index 628d9957c5dd557c54ab7a7acb0d87df072c5b22..4367a05f63bfb55c7d0aadf6a12a02ff8c266038 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDTransfModQ.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDTransfModQ.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once // diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDTransfNoQ.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDTransfNoQ.h index 1b6756d99a6509f4c44419d915a523b0654d0e7f..b8352419bc22d404f12ae3826fa8c1588c7a8040 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDTransfNoQ.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDTransfNoQ.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -96,7 +96,7 @@ private: private: // internal helper function which extract one or two axis from input matrix // workspace; - static void getAxes(API::MatrixWorkspace_const_sptr inWS, + static void getAxes(const API::MatrixWorkspace_const_sptr &inWS, API::NumericAxis *&pXAxis, API::NumericAxis *&pYAxis); }; diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDTransfQ3D.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDTransfQ3D.h index 972468d947bc2083d9177a2149a1aee21f72453a..dfe3f285ba6759edf8d10e9cf53275f630473e92 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDTransfQ3D.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDTransfQ3D.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once // diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDWSDescription.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDWSDescription.h index 950e75bb1c37b09e2bb89271c135770713b8c21b..07a7f14a0b7c961903fbe71351966f2d3da13de5 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDWSDescription.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDWSDescription.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -108,7 +108,7 @@ public: // for the time being /// method builds MD Event ws description from a matrix workspace and the /// transformations, requested to be performed on the workspace void buildFromMatrixWS(const API::MatrixWorkspace_sptr &pWS, - const std::string &QMode, const std::string dEMode, + const std::string &QMode, const std::string &dEMode, const std::vector<std::string> &dimPropertyNames = std::vector<std::string>()); @@ -132,12 +132,12 @@ public: // for the time being /** function extracts the coordinates from additional workspace properties and * places them to AddCoord vector for further usage*/ static void - fillAddProperties(Mantid::API::MatrixWorkspace_const_sptr inWS2D, + fillAddProperties(const Mantid::API::MatrixWorkspace_const_sptr &inWS2D, const std::vector<std::string> &dimPropertyNames, std::vector<coord_t> &AddCoord); static boost::shared_ptr<Geometry::OrientedLattice> - getOrientedLattice(Mantid::API::MatrixWorkspace_const_sptr inWS2D); + getOrientedLattice(const Mantid::API::MatrixWorkspace_const_sptr &inWS2D); /// Set the special coordinate system if any. void @@ -145,7 +145,7 @@ public: // for the time being /// @return the special coordinate system if any. Mantid::Kernel::SpecialCoordinateSystem getCoordinateSystem() const; /// Set the md frame - void setFrame(const std::string frameKey); + void setFrame(const std::string &frameKey); /// Retrieve the md frame Geometry::MDFrame_uptr getFrame(size_t d) const; diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDWSTransform.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDWSTransform.h index a6bae1f9f711d1e5a5440befbbd36834e202ad4a..f813fd3555d62e7a1e278996e3c7368d21b352b4 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDWSTransform.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDWSTransform.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MaskMD.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MaskMD.h index 990811a72b059e674597fa1c88917249a8122845..0367661a61917f4d4825510a831f359dcaeac74b 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MaskMD.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MaskMD.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MergeMD.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MergeMD.h index ca86aa738a8fda600be271bd1ab5aa8653d2d260..0b7af55f45fe9a2b6de1b4287e4e80a8e8815031 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MergeMD.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MergeMD.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MergeMDFiles.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MergeMDFiles.h index 8c68e99be0d068937869d21c3d151a39d59a9453..ab2023ee4f0098a46e66f77c35ab6161c47a68d4 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MergeMDFiles.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MergeMDFiles.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -54,7 +54,7 @@ private: void loadBoxData(); - void doExecByCloning(Mantid::API::IMDEventWorkspace_sptr ws, + void doExecByCloning(const Mantid::API::IMDEventWorkspace_sptr &ws, const std::string &outputFile); void finalizeOutput(const std::string &outputFile); diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MinusMD.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MinusMD.h index 9a911d2cfd75484688bb9fce9e3aeecc19d41c64..c47d3991822696b1e17e7f85edd541bd6e02eb77 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MinusMD.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MinusMD.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MultiplyMD.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MultiplyMD.h index 3f95d65bc2d16af8447eb80121045de98d5d5c52..27db0f79ffdefe13b2f2e073e0ce9d3f00ceeb36 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MultiplyMD.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MultiplyMD.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/NotMD.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/NotMD.h index d21636475e76cb827b5628a7f4e0ac9d5fbc7b68..508fc5acd32142e878d2610297c94399bfb74212 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/NotMD.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/NotMD.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/OneStepMDEW.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/OneStepMDEW.h index a09aad777e63d7222ad97981e4b35546d688ab26..eeb052133d5505116e284c69261292cbb0473733 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/OneStepMDEW.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/OneStepMDEW.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/OrMD.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/OrMD.h index 1300c2a9cf4171670b72f4be3cbf1558c3d790c0..2bcbd49cc55db8c0295d66a73ad27618d6057ae5 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/OrMD.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/OrMD.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/PlusMD.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/PlusMD.h index eabb4f8fc6b6372689ab90bc317e7706bd693036..672ff2abfd99c10a19212787f8c29345d5decd03 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/PlusMD.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/PlusMD.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/PowerMD.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/PowerMD.h index 2376742d8afc1faf982093a7894373956e98eaf8..4264b6f2bb68631eac44a06bcef42f8bad8c9691 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/PowerMD.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/PowerMD.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/PrecompiledHeader.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/PrecompiledHeader.h index cdc3d2898a82cbbdc3e3a06d6b92cdd7237dadf8..af1d696e079767f3cb805aa614f4413a10646a8a 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/PrecompiledHeader.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/PrecompiledHeader.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/PreprocessDetectorsToMD.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/PreprocessDetectorsToMD.h index 19a50360b74c1a4ec9cf8a83c2ce1fee726b7e9c..9a44dcd6a0ab8854d1409bb2596e51bc86bb617e 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/PreprocessDetectorsToMD.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/PreprocessDetectorsToMD.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -66,7 +66,8 @@ protected: // for testing // build a table workspace corresponding to the input matrix workspace boost::shared_ptr<DataObjects::TableWorkspace> createTableWorkspace(const API::MatrixWorkspace_const_sptr &inputWS); - bool isDetInfoLost(Mantid::API::MatrixWorkspace_const_sptr inWS2D) const; + bool + isDetInfoLost(const Mantid::API::MatrixWorkspace_const_sptr &inWS2D) const; // helper function to get efixed if it is there or not; double getEi(const API::MatrixWorkspace_const_sptr &inputWS) const; }; diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/QueryMDWorkspace.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/QueryMDWorkspace.h index 3146f6da730d60deb018ac9dd298e600f5042c0f..a1ac86abed571aa9370f63e814edee54bd2c4abd 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/QueryMDWorkspace.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/QueryMDWorkspace.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/RecalculateTrajectoriesExtents.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/RecalculateTrajectoriesExtents.h index 609eed5af220b9f6235205d043c53fd3f060c626..0512daf372cd0dba9894841b454adaca6990c981 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/RecalculateTrajectoriesExtents.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/RecalculateTrajectoriesExtents.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ReflectometryTransformKiKf.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ReflectometryTransformKiKf.h index 524bc4b598e3ebc63ac264653048afc7c3a26947..ca0b2bbf8bc5c80821ed4745704041a82b89110d 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ReflectometryTransformKiKf.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ReflectometryTransformKiKf.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ReflectometryTransformP.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ReflectometryTransformP.h index 0ee7273dc451dc0e7db64da64108719adeba60cb..3f50c08f22b5a1e98e1962dd865f95643b01bac5 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ReflectometryTransformP.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ReflectometryTransformP.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ReflectometryTransformQxQz.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ReflectometryTransformQxQz.h index 355123328bd6a31ee0b4ddeacf3c5ef5b94681bc..a72ebb08fbc37d8d57fbd2974e743e558b0d8be4 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ReflectometryTransformQxQz.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ReflectometryTransformQxQz.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ReplicateMD.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ReplicateMD.h index 01279d8b01bf24e901df4ee04c43e3ccb37d2658..eb0402c706c8ddffc5a07a8f4008ad22a2f87a11 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ReplicateMD.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ReplicateMD.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/SaveIsawQvector.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/SaveIsawQvector.h index 45f9af5f57835212752e085ca81f4ee0979273a4..a72107429aa7ddb145eb1781a058f3358b31df09 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/SaveIsawQvector.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/SaveIsawQvector.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -32,7 +32,7 @@ private: MDWSDescription m_targWSDescr; - void initTargetWSDescr(DataObjects::EventWorkspace_sptr wksp); + void initTargetWSDescr(const DataObjects::EventWorkspace_sptr &wksp); }; } // namespace MDAlgorithms diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/SaveMD.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/SaveMD.h index 60d03ee2e9be85e4aee19a5e07ad4712c0b1b527..d621277f40c1708de49c2ad00a88c7430e1cdee5 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/SaveMD.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/SaveMD.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -46,7 +46,7 @@ private: void doSaveEvents(typename DataObjects::MDEventWorkspace<MDE, nd>::sptr ws); /// Save the MDHistoWorkspace. - void doSaveHisto(Mantid::DataObjects::MDHistoWorkspace_sptr ws); + void doSaveHisto(const Mantid::DataObjects::MDHistoWorkspace_sptr &ws); /// Save all the affine matricies void saveAffineTransformMatricies(::NeXus::File *const file, diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/SaveMD2.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/SaveMD2.h index ab92cba92c3397387c28a9b1f12b36d7cc3742a1..efe1f6204b0c02863c4d2dcc84582f930a5deefa 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/SaveMD2.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/SaveMD2.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -42,7 +42,7 @@ private: void exec() override; /// Save the MDHistoWorkspace. - void doSaveHisto(Mantid::DataObjects::MDHistoWorkspace_sptr ws); + void doSaveHisto(const Mantid::DataObjects::MDHistoWorkspace_sptr &ws); /// Save a generic matrix template <typename T> diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/SaveZODS.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/SaveZODS.h index 639e04a9ce2575f5af3edd78820cd499cc21fb75..a6cb2b643f29aeccea8f13107e2d52125f47453d 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/SaveZODS.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/SaveZODS.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/SetMDFrame.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/SetMDFrame.h index 7db98137a6311dd9c18ad8d2c892b1574d7b8a9c..54898d7f7122730c5d0154aa75bc5e19f90a00ea 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/SetMDFrame.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/SetMDFrame.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/SetMDUsingMask.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/SetMDUsingMask.h index 9feab151ea701bdd9583811ae82cf40944f90c1e..5f79e080f7b4fd983ee6988552f7eca1cda5adcd 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/SetMDUsingMask.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/SetMDUsingMask.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/SliceMD.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/SliceMD.h index bc52816f07a9b909891b8e0077f023d7416eb31f..62580d8e594ee1c553442db745e62bdc12570a5f 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/SliceMD.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/SliceMD.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/SlicingAlgorithm.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/SlicingAlgorithm.h index 4f31f2918065e8efb721534629dc019618517d89..91be6c61ac581933090312db5dd5de6780e898d2 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/SlicingAlgorithm.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/SlicingAlgorithm.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -136,8 +136,8 @@ protected: private: Mantid::Geometry::MDFrame_uptr - createMDFrameForNonAxisAligned(std::string units, - Mantid::Kernel::VMD basisVector) const; + createMDFrameForNonAxisAligned(const std::string &units, + const Mantid::Kernel::VMD &basisVector) const; std::vector<Mantid::Kernel::VMD> getOldBasis(size_t dimension) const; bool isProjectingOnFrame(const Mantid::Kernel::VMD &oldVector, const Mantid::Kernel::VMD &basisVector) const; @@ -146,7 +146,7 @@ private: const std::vector<Mantid::Kernel::VMD> &oldBasis) const; Mantid::Geometry::MDFrame_uptr extractMDFrameForNonAxisAligned(std::vector<size_t> indicesWithProjection, - std::string units) const; + const std::string &units) const; void setTargetUnits(Mantid::Geometry::MDFrame_uptr &frame, const std::string &units) const; }; diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/SmoothMD.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/SmoothMD.h index b344e03409c04097dc5116d610cb635a8d828db1..05e2f54c788045868c526a9fed1ed53daa3320e5 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/SmoothMD.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/SmoothMD.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -37,13 +37,13 @@ public: std::map<std::string, std::string> validateInputs() override; boost::shared_ptr<Mantid::API::IMDHistoWorkspace> hatSmooth( - boost::shared_ptr<const Mantid::API::IMDHistoWorkspace> toSmooth, + const boost::shared_ptr<const Mantid::API::IMDHistoWorkspace> &toSmooth, const std::vector<double> &widthVector, boost::optional<boost::shared_ptr<const Mantid::API::IMDHistoWorkspace>> weightingWS); boost::shared_ptr<Mantid::API::IMDHistoWorkspace> gaussianSmooth( - boost::shared_ptr<const Mantid::API::IMDHistoWorkspace> toSmooth, + const boost::shared_ptr<const Mantid::API::IMDHistoWorkspace> &toSmooth, const std::vector<double> &widthVector, boost::optional<boost::shared_ptr<const Mantid::API::IMDHistoWorkspace>> weightingWS); diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ThresholdMD.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ThresholdMD.h index e660b5dbb8cbb091c20588d2b02fe16bfcb87eca..e552c2750e126684bdc96a253268215985d431e6 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ThresholdMD.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ThresholdMD.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/Topology.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/Topology.h index e0a6b55d67f799588d54aaa40fdc2d9be3ac2cc6..60415462c32cc62a30c6bf2d8814a6a2c8b6bd7f 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/Topology.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/Topology.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/TransformMD.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/TransformMD.h index 156d96209e6c134ef7aa67f15cb24b64201611d4..814ffac344e7cab405298b9f32e7008481dd13bc 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/TransformMD.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/TransformMD.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/TransposeMD.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/TransposeMD.h index 8af6cd642ece627ac0bd6c202ea82bc313db8ebb..f0d186924b294277949570bb8f206c21139ed128 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/TransposeMD.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/TransposeMD.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/UnaryOperationMD.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/UnaryOperationMD.h index 8946a1626bdecaa482d3a31f3dc7d19f00f1fae5..1d71e49d49f15af61613343998ac518ab6d1e9b2 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/UnaryOperationMD.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/UnaryOperationMD.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/UnitsConversionHelper.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/UnitsConversionHelper.h index 6dae2b1e908692890f258b1533980371ac77e19b..9418deb7f6e7829396517b0c8f1737b5cced438d 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/UnitsConversionHelper.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/UnitsConversionHelper.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/UserFunctionMD.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/UserFunctionMD.h index ce61c2b79b2b49c708d49276d1fc03075ff63e62..f8a6c7f7222710f19d035b0ff877cb7bf211a99f 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/UserFunctionMD.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/UserFunctionMD.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/Vector3DParameter.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/Vector3DParameter.h index b47afefa65ad03bbb55af0ba77852180514f3a1d..a764ca072e9b873e6aa2aa79a2c99a540ae30552 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/Vector3DParameter.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/Vector3DParameter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/Vector3DParameterParser.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/Vector3DParameterParser.h index 4c1abeefdaab950af7910016c958fd5ac529fe72..dd64cf3ae9095573407b3e4bc8403ddfe45fa95c 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/Vector3DParameterParser.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/Vector3DParameterParser.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/WeightedMeanMD.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/WeightedMeanMD.h index a6281e7fac7b178ee6264ac3ee54135d1c460d48..d1a33543a4a27ca58fca3f4d9be3b94d6ffe9039 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/WeightedMeanMD.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/WeightedMeanMD.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/XorMD.h b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/XorMD.h index 493e931e37be7873c6ddfc49cb45486ccf654d35..5acc376ab95af304b7979f1d609e9d1c8b655fce 100644 --- a/Framework/MDAlgorithms/inc/MantidMDAlgorithms/XorMD.h +++ b/Framework/MDAlgorithms/inc/MantidMDAlgorithms/XorMD.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/rebinninginfoschema.h b/Framework/MDAlgorithms/rebinninginfoschema.h index a9ce23a82fe81da79bcfcde8197361644bc18e32..fa70d94fccc4e1b3eb3c10c3c76ed99c22364439 100644 --- a/Framework/MDAlgorithms/rebinninginfoschema.h +++ b/Framework/MDAlgorithms/rebinninginfoschema.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 +  #pragma once diff --git a/Framework/MDAlgorithms/src/AccumulateMD.cpp b/Framework/MDAlgorithms/src/AccumulateMD.cpp index 84a76dcfcb80c874ae39399c1611c0feefb91f07..4b8574467e4d2c478101b34f6d9db748bee42a4a 100644 --- a/Framework/MDAlgorithms/src/AccumulateMD.cpp +++ b/Framework/MDAlgorithms/src/AccumulateMD.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/AccumulateMD.h" #include "MantidAPI/AnalysisDataService.h" diff --git a/Framework/MDAlgorithms/src/AndMD.cpp b/Framework/MDAlgorithms/src/AndMD.cpp index 231ca77b017f73310ea197d286f1d56b09caaf19..2c96a9d94335cf9eac293745664c117d3c5189af 100644 --- a/Framework/MDAlgorithms/src/AndMD.cpp +++ b/Framework/MDAlgorithms/src/AndMD.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/AndMD.h" diff --git a/Framework/MDAlgorithms/src/BaseConvertToDiffractionMDWorkspace.cpp b/Framework/MDAlgorithms/src/BaseConvertToDiffractionMDWorkspace.cpp index 10ad73dad7dca0cf1b2ad3369248de4f93f8c5be..e154ad91b3cdbb928bbd5ec48777e5ecc291aadc 100644 --- a/Framework/MDAlgorithms/src/BaseConvertToDiffractionMDWorkspace.cpp +++ b/Framework/MDAlgorithms/src/BaseConvertToDiffractionMDWorkspace.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/BaseConvertToDiffractionMDWorkspace.h" diff --git a/Framework/MDAlgorithms/src/BinMD.cpp b/Framework/MDAlgorithms/src/BinMD.cpp index dfc5539770cd43cb1aac49e153021b7959070016..43ae3bd682e335d17d49a330ee68c883c5fe20da 100644 --- a/Framework/MDAlgorithms/src/BinMD.cpp +++ b/Framework/MDAlgorithms/src/BinMD.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/BinMD.h" #include "MantidAPI/ImplicitFunctionFactory.h" diff --git a/Framework/MDAlgorithms/src/BinaryOperationMD.cpp b/Framework/MDAlgorithms/src/BinaryOperationMD.cpp index 7d334663d265c936a6598ea129dcba63afc6b89b..5d2a58d56a7ffaf4f75adb2c72908a738b8f38d7 100644 --- a/Framework/MDAlgorithms/src/BinaryOperationMD.cpp +++ b/Framework/MDAlgorithms/src/BinaryOperationMD.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/BinaryOperationMD.h" #include "MantidAPI/IMDEventWorkspace.h" diff --git a/Framework/MDAlgorithms/src/BooleanBinaryOperationMD.cpp b/Framework/MDAlgorithms/src/BooleanBinaryOperationMD.cpp index 353e5479345ff53bcb19623a85ccd663cdf75149..785995cc802f38ab376b12bb31ca947aed764821 100644 --- a/Framework/MDAlgorithms/src/BooleanBinaryOperationMD.cpp +++ b/Framework/MDAlgorithms/src/BooleanBinaryOperationMD.cpp @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #include "MantidMDAlgorithms/BooleanBinaryOperationMD.h" #include "MantidKernel/System.h" diff --git a/Framework/MDAlgorithms/src/BoxControllerSettingsAlgorithm.cpp b/Framework/MDAlgorithms/src/BoxControllerSettingsAlgorithm.cpp index 88339e3d205d2cb4d9793998459e23ef02102aa9..84d0e2bc6fee59ce53546312d7b527ca4138eb73 100644 --- a/Framework/MDAlgorithms/src/BoxControllerSettingsAlgorithm.cpp +++ b/Framework/MDAlgorithms/src/BoxControllerSettingsAlgorithm.cpp @@ -1,15 +1,17 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + -#include "MantidMDAlgorithms/BoxControllerSettingsAlgorithm.h" +#include <utility> + #include "MantidKernel/ArrayProperty.h" #include "MantidKernel/BoundedValidator.h" #include "MantidKernel/StringTokenizer.h" #include "MantidKernel/Strings.h" #include "MantidKernel/System.h" +#include "MantidMDAlgorithms/BoxControllerSettingsAlgorithm.h" using namespace Mantid::Kernel; using namespace Mantid::API; @@ -75,7 +77,8 @@ void BoxControllerSettingsAlgorithm::initBoxControllerProps( * @param ndims : Number of dimensions in output workspace. */ void BoxControllerSettingsAlgorithm::takeDefaultsFromInstrument( - Mantid::Geometry::Instrument_const_sptr instrument, const size_t ndims) { + const Mantid::Geometry::Instrument_const_sptr &instrument, + const size_t ndims) { const std::string splitThresholdName = "SplitThreshold"; const std::string splitIntoName = "SplitInto"; const std::string maxRecursionDepthName = "MaxRecursionDepth"; @@ -117,10 +120,11 @@ void BoxControllerSettingsAlgorithm::takeDefaultsFromInstrument( * @param instrument :: instrument to read parameters from. */ void BoxControllerSettingsAlgorithm::setBoxController( - BoxController_sptr bc, Mantid::Geometry::Instrument_const_sptr instrument) { + const BoxController_sptr &bc, + const Mantid::Geometry::Instrument_const_sptr &instrument) { size_t nd = bc->getNDims(); - takeDefaultsFromInstrument(instrument, nd); + takeDefaultsFromInstrument(std::move(instrument), nd); setBoxController(bc); } @@ -131,7 +135,8 @@ void BoxControllerSettingsAlgorithm::setBoxController( * * @param bc :: box controller to modify */ -void BoxControllerSettingsAlgorithm::setBoxController(BoxController_sptr bc) { +void BoxControllerSettingsAlgorithm::setBoxController( + const BoxController_sptr &bc) { size_t nd = bc->getNDims(); int val; diff --git a/Framework/MDAlgorithms/src/CalculateCoverageDGS.cpp b/Framework/MDAlgorithms/src/CalculateCoverageDGS.cpp index 0f0e0978f018fed7ddf84f4bee55250d88184ab1..c89b928ee3500405215ba20e453beac65e176c8f 100644 --- a/Framework/MDAlgorithms/src/CalculateCoverageDGS.cpp +++ b/Framework/MDAlgorithms/src/CalculateCoverageDGS.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/CalculateCoverageDGS.h" #include "MantidAPI/InstrumentValidator.h" diff --git a/Framework/MDAlgorithms/src/CentroidPeaksMD.cpp b/Framework/MDAlgorithms/src/CentroidPeaksMD.cpp index 4007dc05ec88a74135528c4d922c38403d264dbe..aad9859ac9650747c2d7ddedc2f3e3004a7f7eb9 100644 --- a/Framework/MDAlgorithms/src/CentroidPeaksMD.cpp +++ b/Framework/MDAlgorithms/src/CentroidPeaksMD.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/CentroidPeaksMD.h" #include "MantidAPI/IMDEventWorkspace.h" diff --git a/Framework/MDAlgorithms/src/CentroidPeaksMD2.cpp b/Framework/MDAlgorithms/src/CentroidPeaksMD2.cpp index 9ade46217cb486cec63fcb46f30e4dd99feb5065..1f3723e78d40457f0bc2de07c1bb4fe089ce08ba 100644 --- a/Framework/MDAlgorithms/src/CentroidPeaksMD2.cpp +++ b/Framework/MDAlgorithms/src/CentroidPeaksMD2.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/CentroidPeaksMD2.h" #include "MantidAPI/IMDEventWorkspace.h" diff --git a/Framework/MDAlgorithms/src/ChangeQConvention.cpp b/Framework/MDAlgorithms/src/ChangeQConvention.cpp index 05ebe066fd1b181a394763ee7febf213e58b3e49..8265af2ba6ba3c9cde53dcb79a5feb78a86dcef2 100644 --- a/Framework/MDAlgorithms/src/ChangeQConvention.cpp +++ b/Framework/MDAlgorithms/src/ChangeQConvention.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/ChangeQConvention.h" #include "MantidAPI/CoordTransform.h" diff --git a/Framework/MDAlgorithms/src/CloneMDWorkspace.cpp b/Framework/MDAlgorithms/src/CloneMDWorkspace.cpp index 525266da5ed43a2e017f521be33dd1d56c04baa9..3eccf224f6bbb740af5b72840de3411bf2d68409 100644 --- a/Framework/MDAlgorithms/src/CloneMDWorkspace.cpp +++ b/Framework/MDAlgorithms/src/CloneMDWorkspace.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/CloneMDWorkspace.h" #include "MantidAPI/FileProperty.h" diff --git a/Framework/MDAlgorithms/src/CompactMD.cpp b/Framework/MDAlgorithms/src/CompactMD.cpp index 0a59434dccbd086598202a6150a971f45c9f9300..8c158a00c83ed09765dc91e0a2a97493f4832c82 100644 --- a/Framework/MDAlgorithms/src/CompactMD.cpp +++ b/Framework/MDAlgorithms/src/CompactMD.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/CompactMD.h" #include "MantidAPI/IMDIterator.h" @@ -30,7 +30,7 @@ namespace { std::vector<std::string> createPBinStringVector(std::vector<Mantid::coord_t> minVector, std::vector<Mantid::coord_t> maxVector, - IMDHistoWorkspace_sptr inputWs) { + const IMDHistoWorkspace_sptr &inputWs) { size_t numDims = inputWs->getNumDims(); std::vector<std::string> pBinStrVector; for (size_t iter = 0; iter < numDims; iter++) { @@ -65,7 +65,7 @@ DECLARE_ALGORITHM(CompactMD) */ void CompactMD::findFirstNonZeroMinMaxExtents( - IMDHistoWorkspace_sptr inputWs, std::vector<Mantid::coord_t> &minVec, + const IMDHistoWorkspace_sptr &inputWs, std::vector<Mantid::coord_t> &minVec, std::vector<Mantid::coord_t> &maxVec) { auto ws_iter = inputWs->createIterator(); do { diff --git a/Framework/MDAlgorithms/src/CompareMDWorkspaces.cpp b/Framework/MDAlgorithms/src/CompareMDWorkspaces.cpp index 8e6d0395eadb99c58dff475547fcbaa553a47ea7..77411b5561360c3e6110934ad298442f991a3eb0 100644 --- a/Framework/MDAlgorithms/src/CompareMDWorkspaces.cpp +++ b/Framework/MDAlgorithms/src/CompareMDWorkspaces.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/CompareMDWorkspaces.h" #include "MantidAPI/IMDEventWorkspace.h" @@ -130,7 +130,8 @@ void CompareMDWorkspaces::compareTol(T a, T b, const std::string &message) { /** Compare the dimensions etc. of two MDWorkspaces */ void CompareMDWorkspaces::compareMDGeometry( - Mantid::API::IMDWorkspace_sptr ws1, Mantid::API::IMDWorkspace_sptr ws2) { + const Mantid::API::IMDWorkspace_sptr &ws1, + const Mantid::API::IMDWorkspace_sptr &ws2) { compare(ws1->getNumDims(), ws2->getNumDims(), "Workspaces have a different number of dimensions"); for (size_t d = 0; d < ws1->getNumDims(); d++) { @@ -156,8 +157,8 @@ void CompareMDWorkspaces::compareMDGeometry( /** Compare the dimensions etc. of two MDWorkspaces */ void CompareMDWorkspaces::compareMDHistoWorkspaces( - Mantid::DataObjects::MDHistoWorkspace_sptr ws1, - Mantid::DataObjects::MDHistoWorkspace_sptr ws2) { + const Mantid::DataObjects::MDHistoWorkspace_sptr &ws1, + const Mantid::DataObjects::MDHistoWorkspace_sptr &ws2) { compare(ws1->getNumDims(), ws2->getNumDims(), "Workspaces have a different number of dimensions"); compare(ws1->getNPoints(), ws2->getNPoints(), diff --git a/Framework/MDAlgorithms/src/ConvToMDBase.cpp b/Framework/MDAlgorithms/src/ConvToMDBase.cpp index c74e2956eb5f04ccae21dbfdf3cb3e20755a225e..78eec7938d9af774a1ddc5cf5b41de704a1ac2f4 100644 --- a/Framework/MDAlgorithms/src/ConvToMDBase.cpp +++ b/Framework/MDAlgorithms/src/ConvToMDBase.cpp @@ -1,12 +1,14 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + -#include "MantidMDAlgorithms/ConvToMDBase.h" +#include <utility> + #include "MantidAPI/MatrixWorkspace.h" #include "MantidAPI/Run.h" +#include "MantidMDAlgorithms/ConvToMDBase.h" namespace Mantid { namespace MDAlgorithms { @@ -46,7 +48,7 @@ size_t ConvToMDBase::initialize( m_detID = WSD.m_PreprDetTable->getColVector<int>("DetectorID"); // set up output MD workspace wrapper - m_OutWSWrapper = inWSWrapper; + m_OutWSWrapper = std::move(inWSWrapper); // get the index which identify the run the source workspace came from. // This index will mark the workspace' events for diffetent worksapces to // combine diff --git a/Framework/MDAlgorithms/src/ConvToMDEventsWS.cpp b/Framework/MDAlgorithms/src/ConvToMDEventsWS.cpp index 9e853bbbabeebc15858e1305846e1d7d7f6e7301..e4948431eab713d5153072f38be071c9443aeb5b 100644 --- a/Framework/MDAlgorithms/src/ConvToMDEventsWS.cpp +++ b/Framework/MDAlgorithms/src/ConvToMDEventsWS.cpp @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #include "MantidMDAlgorithms/ConvToMDEventsWS.h" #include "MantidMDAlgorithms/UnitsConversionHelper.h" diff --git a/Framework/MDAlgorithms/src/ConvToMDEventsWSIndexing.cpp b/Framework/MDAlgorithms/src/ConvToMDEventsWSIndexing.cpp index f8e1905b050a0531320c2bb193e891a4390c2a84..82c872426a9a462c873bf3b20d4ea6652444b431 100644 --- a/Framework/MDAlgorithms/src/ConvToMDEventsWSIndexing.cpp +++ b/Framework/MDAlgorithms/src/ConvToMDEventsWSIndexing.cpp @@ -1,3 +1,9 @@ +// Mantid Repository : https://github.com/mantidproject/mantid +// +// Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS +// SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/ConvToMDEventsWSIndexing.h" namespace Mantid { diff --git a/Framework/MDAlgorithms/src/ConvToMDHistoWS.cpp b/Framework/MDAlgorithms/src/ConvToMDHistoWS.cpp index e00047b5c20bf9d8c7987b4b25a74ccf866a9643..5db29cb89eec80f3d408828591011ab99b0144cf 100644 --- a/Framework/MDAlgorithms/src/ConvToMDHistoWS.cpp +++ b/Framework/MDAlgorithms/src/ConvToMDHistoWS.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/ConvToMDHistoWS.h" diff --git a/Framework/MDAlgorithms/src/ConvToMDSelector.cpp b/Framework/MDAlgorithms/src/ConvToMDSelector.cpp index d8064fb6480026957c6128771b39ef92b2ecbe02..049b9296600bfaeb5677b56795681615398ad882 100644 --- a/Framework/MDAlgorithms/src/ConvToMDSelector.cpp +++ b/Framework/MDAlgorithms/src/ConvToMDSelector.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/ConvToMDSelector.h" @@ -33,7 +33,7 @@ initiated) *@returns shared pointer to new solver, which corresponds to the workspace */ boost::shared_ptr<ConvToMDBase> ConvToMDSelector::convSelector( - API::MatrixWorkspace_sptr inputWS, + const API::MatrixWorkspace_sptr &inputWS, boost::shared_ptr<ConvToMDBase> ¤tSolver) const { // identify what kind of workspace we expect to process wsType inputWSType = Undefined; diff --git a/Framework/MDAlgorithms/src/ConvertCWPDMDToSpectra.cpp b/Framework/MDAlgorithms/src/ConvertCWPDMDToSpectra.cpp index c63dd0a2a6c085bbf30416c43ed381b54748a35e..c917989601202c49bb9825226423d72ddd5b6d21 100644 --- a/Framework/MDAlgorithms/src/ConvertCWPDMDToSpectra.cpp +++ b/Framework/MDAlgorithms/src/ConvertCWPDMDToSpectra.cpp @@ -1,9 +1,11 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + +#include <utility> + #include "MantidMDAlgorithms/ConvertCWPDMDToSpectra.h" #include "MantidAPI/Axis.h" @@ -208,8 +210,9 @@ void ConvertCWPDMDToSpectra::exec() { * @return */ API::MatrixWorkspace_sptr ConvertCWPDMDToSpectra::reducePowderData( - API::IMDEventWorkspace_const_sptr dataws, - IMDEventWorkspace_const_sptr monitorws, const std::string targetunit, + const API::IMDEventWorkspace_const_sptr &dataws, + const IMDEventWorkspace_const_sptr &monitorws, + const std::string &targetunit, const std::map<int, double> &map_runwavelength, const double xmin, const double xmax, const double binsize, bool dolinearinterpolation, const std::vector<detid_t> &vec_excludeddets) { @@ -259,7 +262,8 @@ API::MatrixWorkspace_sptr ConvertCWPDMDToSpectra::reducePowderData( unitchar = 'q'; binMD(dataws, unitchar, map_runwavelength, vecx, vecy, vec_excludeddets); - binMD(monitorws, unitchar, map_runwavelength, vecx, vecm, vec_excludeddets); + binMD(std::move(monitorws), unitchar, map_runwavelength, vecx, vecm, + vec_excludeddets); // Normalize by division double maxmonitorcounts = 0; @@ -317,7 +321,8 @@ API::MatrixWorkspace_sptr ConvertCWPDMDToSpectra::reducePowderData( * @param xmax :: (output) upper binning boundary */ void ConvertCWPDMDToSpectra::findXBoundary( - API::IMDEventWorkspace_const_sptr dataws, const std::string &targetunit, + const API::IMDEventWorkspace_const_sptr &dataws, + const std::string &targetunit, const std::map<int, double> &map_runwavelength, double &xmin, double &xmax) { // Go through all instruments @@ -425,12 +430,10 @@ void ConvertCWPDMDToSpectra::findXBoundary( * @param vecy * @param vec_excludedet */ -void ConvertCWPDMDToSpectra::binMD(API::IMDEventWorkspace_const_sptr mdws, - const char &unitbit, - const std::map<int, double> &map_runlambda, - const std::vector<double> &vecx, - std::vector<double> &vecy, - const std::vector<detid_t> &vec_excludedet) { +void ConvertCWPDMDToSpectra::binMD( + const API::IMDEventWorkspace_const_sptr &mdws, const char &unitbit, + const std::map<int, double> &map_runlambda, const std::vector<double> &vecx, + std::vector<double> &vecy, const std::vector<detid_t> &vec_excludedet) { // Check whether MD workspace has proper instrument and experiment Info if (mdws->getNumExperimentInfo() == 0) throw std::runtime_error( @@ -599,7 +602,7 @@ void ConvertCWPDMDToSpectra::binMD(API::IMDEventWorkspace_const_sptr mdws, * @param infinitesimal */ void ConvertCWPDMDToSpectra::linearInterpolation( - API::MatrixWorkspace_sptr matrixws, const double &infinitesimal) { + const API::MatrixWorkspace_sptr &matrixws, const double &infinitesimal) { g_log.debug() << "Number of spectrum = " << matrixws->getNumberHistograms() << " Infinitesimal = " << infinitesimal << "\n"; size_t numspec = matrixws->getNumberHistograms(); @@ -670,8 +673,8 @@ void ConvertCWPDMDToSpectra::linearInterpolation( * @param inputmdws */ void ConvertCWPDMDToSpectra::setupSampleLogs( - API::MatrixWorkspace_sptr matrixws, - API::IMDEventWorkspace_const_sptr inputmdws) { + const API::MatrixWorkspace_sptr &matrixws, + const API::IMDEventWorkspace_const_sptr &inputmdws) { // get hold of the last experiment info from md workspace to copy over auto lastindex = static_cast<uint16_t>(inputmdws->getNumExperimentInfo() - 1); ExperimentInfo_const_sptr lastexpinfo = @@ -696,7 +699,7 @@ void ConvertCWPDMDToSpectra::setupSampleLogs( * @param infinitesimal */ void ConvertCWPDMDToSpectra::scaleMatrixWorkspace( - API::MatrixWorkspace_sptr matrixws, const double &scalefactor, + const API::MatrixWorkspace_sptr &matrixws, const double &scalefactor, const double &infinitesimal) { size_t numspec = matrixws->getNumberHistograms(); for (size_t iws = 0; iws < numspec; ++iws) { diff --git a/Framework/MDAlgorithms/src/ConvertCWSDExpToMomentum.cpp b/Framework/MDAlgorithms/src/ConvertCWSDExpToMomentum.cpp index 9a48695d87ae9f01539b1d8af3d3d495fa2c6b7f..88b8e36f26e7264b2bcf0c235d1e2ff619276992 100644 --- a/Framework/MDAlgorithms/src/ConvertCWSDExpToMomentum.cpp +++ b/Framework/MDAlgorithms/src/ConvertCWSDExpToMomentum.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/ConvertCWSDExpToMomentum.h" #include "MantidAPI/ExperimentInfo.h" @@ -342,7 +342,8 @@ void ConvertCWSDExpToMomentum::addMDEvents(bool usevirtual) { * Q-sample */ void ConvertCWSDExpToMomentum::setupTransferMatrix( - API::MatrixWorkspace_sptr dataws, Kernel::DblMatrix &rotationMatrix) { + const API::MatrixWorkspace_sptr &dataws, + Kernel::DblMatrix &rotationMatrix) { // Check sample logs if (!dataws->run().hasProperty("_omega") || !dataws->run().hasProperty("_chi") || !dataws->run().hasProperty("_phi")) @@ -384,9 +385,9 @@ void ConvertCWSDExpToMomentum::setupTransferMatrix( * workspace */ void ConvertCWSDExpToMomentum::convertSpiceMatrixToMomentumMDEvents( - MatrixWorkspace_sptr dataws, bool usevirtual, const detid_t &startdetid, - const int scannumber, const int runnumber, double measuretime, - int monitor_counts) { + const MatrixWorkspace_sptr &dataws, bool usevirtual, + const detid_t &startdetid, const int scannumber, const int runnumber, + double measuretime, int monitor_counts) { // Create transformation matrix from which the transformation is Kernel::DblMatrix rotationMatrix; setupTransferMatrix(dataws, rotationMatrix); @@ -696,7 +697,7 @@ void ConvertCWSDExpToMomentum::updateQRange( * @param dataws */ void ConvertCWSDExpToMomentum::removeBackground( - API::MatrixWorkspace_sptr dataws) { + const API::MatrixWorkspace_sptr &dataws) { if (dataws->getNumberHistograms() != m_backgroundWS->getNumberHistograms()) throw std::runtime_error("Impossible to have this situation"); diff --git a/Framework/MDAlgorithms/src/ConvertCWSDMDtoHKL.cpp b/Framework/MDAlgorithms/src/ConvertCWSDMDtoHKL.cpp index 9714b968cde6f355ed823f4c8b5f93149e9733e4..ee6693b9c76bf319b3fe5761d26dfbd829c4e8ae 100644 --- a/Framework/MDAlgorithms/src/ConvertCWSDMDtoHKL.cpp +++ b/Framework/MDAlgorithms/src/ConvertCWSDMDtoHKL.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/ConvertCWSDMDtoHKL.h" @@ -169,7 +169,8 @@ void ConvertCWSDMDtoHKL::getUBMatrix() { * number of detectors */ void ConvertCWSDMDtoHKL::exportEvents( - IMDEventWorkspace_sptr mdws, std::vector<Kernel::V3D> &vec_event_qsample, + const IMDEventWorkspace_sptr &mdws, + std::vector<Kernel::V3D> &vec_event_qsample, std::vector<signal_t> &vec_event_signal, std::vector<detid_t> &vec_event_det) { // Set the size of the output vectors @@ -373,7 +374,7 @@ API::IMDEventWorkspace_sptr ConvertCWSDMDtoHKL::createHKLMDWorkspace( return mdws; } -void ConvertCWSDMDtoHKL::getRange(const std::vector<Kernel::V3D> vec_hkl, +void ConvertCWSDMDtoHKL::getRange(const std::vector<Kernel::V3D> &vec_hkl, std::vector<double> &extentMins, std::vector<double> &extentMaxs) { assert(extentMins.size() == 3); diff --git a/Framework/MDAlgorithms/src/ConvertHFIRSCDtoMDE.cpp b/Framework/MDAlgorithms/src/ConvertHFIRSCDtoMDE.cpp index ffed865f6bc9f1562017647179e7660285fab410..d2893e7b46c5752840380c46897244aa6da8d9e6 100644 --- a/Framework/MDAlgorithms/src/ConvertHFIRSCDtoMDE.cpp +++ b/Framework/MDAlgorithms/src/ConvertHFIRSCDtoMDE.cpp @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #include "MantidMDAlgorithms/ConvertHFIRSCDtoMDE.h" #include "MantidAPI/IMDEventWorkspace.h" #include "MantidAPI/IMDHistoWorkspace.h" diff --git a/Framework/MDAlgorithms/src/ConvertMDHistoToMatrixWorkspace.cpp b/Framework/MDAlgorithms/src/ConvertMDHistoToMatrixWorkspace.cpp index d66730dfa1fd45d2cd7456cc5e925a09dc2959b5..4400c2878b3d11a24674008c93ceea20136bb75f 100644 --- a/Framework/MDAlgorithms/src/ConvertMDHistoToMatrixWorkspace.cpp +++ b/Framework/MDAlgorithms/src/ConvertMDHistoToMatrixWorkspace.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/MDAlgorithms/src/ConvertSpiceDataToRealSpace.cpp b/Framework/MDAlgorithms/src/ConvertSpiceDataToRealSpace.cpp index ee91ec218113dd5bf6b40310f8528c1bdab1ce8a..0d55347e1e56cee9acd4b0f55d689703de215232 100644 --- a/Framework/MDAlgorithms/src/ConvertSpiceDataToRealSpace.cpp +++ b/Framework/MDAlgorithms/src/ConvertSpiceDataToRealSpace.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/ConvertSpiceDataToRealSpace.h" @@ -209,8 +209,9 @@ void ConvertSpiceDataToRealSpace::exec() { */ std::vector<MatrixWorkspace_sptr> ConvertSpiceDataToRealSpace::convertToMatrixWorkspace( - DataObjects::TableWorkspace_sptr tablews, - API::MatrixWorkspace_const_sptr parentws, Types::Core::DateAndTime runstart, + const DataObjects::TableWorkspace_sptr &tablews, + const API::MatrixWorkspace_const_sptr &parentws, + Types::Core::DateAndTime runstart, std::map<std::string, std::vector<double>> &logvecmap, std::vector<Types::Core::DateAndTime> &vectimes) { // Get table workspace's column information @@ -249,7 +250,7 @@ ConvertSpiceDataToRealSpace::convertToMatrixWorkspace( * @param logvecmap */ void ConvertSpiceDataToRealSpace::parseSampleLogs( - DataObjects::TableWorkspace_sptr tablews, + const DataObjects::TableWorkspace_sptr &tablews, const std::map<std::string, size_t> &indexlist, std::map<std::string, std::vector<double>> &logvecmap) { size_t numrows = tablews->rowCount(); @@ -287,10 +288,11 @@ void ConvertSpiceDataToRealSpace::parseSampleLogs( * @return */ MatrixWorkspace_sptr ConvertSpiceDataToRealSpace::loadRunToMatrixWS( - DataObjects::TableWorkspace_sptr tablews, size_t irow, - MatrixWorkspace_const_sptr parentws, Types::Core::DateAndTime runstart, - size_t ipt, size_t irotangle, size_t itime, - const std::vector<std::pair<size_t, size_t>> anodelist, double &duration) { + const DataObjects::TableWorkspace_sptr &tablews, size_t irow, + const MatrixWorkspace_const_sptr &parentws, + Types::Core::DateAndTime runstart, size_t ipt, size_t irotangle, + size_t itime, const std::vector<std::pair<size_t, size_t>> &anodelist, + double &duration) { // New workspace from parent workspace MatrixWorkspace_sptr tempws = WorkspaceFactory::Instance().create(parentws, m_numSpec, 2, 1); @@ -367,7 +369,7 @@ MatrixWorkspace_sptr ConvertSpiceDataToRealSpace::loadRunToMatrixWS( * @param samplenameindexmap */ void ConvertSpiceDataToRealSpace::readTableInfo( - TableWorkspace_const_sptr tablews, size_t &ipt, size_t &irotangle, + const TableWorkspace_const_sptr &tablews, size_t &ipt, size_t &irotangle, size_t &itime, std::vector<std::pair<size_t, size_t>> &anodelist, std::map<std::string, size_t> &samplenameindexmap) { @@ -439,7 +441,7 @@ void ConvertSpiceDataToRealSpace::readTableInfo( * @param vectimes */ void ConvertSpiceDataToRealSpace::appendSampleLogs( - IMDEventWorkspace_sptr mdws, + const IMDEventWorkspace_sptr &mdws, const std::map<std::string, std::vector<double>> &logvecmap, const std::vector<Types::Core::DateAndTime> &vectimes) { // Check! @@ -524,8 +526,8 @@ void ConvertSpiceDataToRealSpace::appendSampleLogs( * @param vec_ws2d */ void ConvertSpiceDataToRealSpace::addExperimentInfos( - API::IMDEventWorkspace_sptr mdws, - const std::vector<API::MatrixWorkspace_sptr> vec_ws2d) { + const API::IMDEventWorkspace_sptr &mdws, + const std::vector<API::MatrixWorkspace_sptr> &vec_ws2d) { // Add N experiment info as there are N measurment points for (const auto &ws2d : vec_ws2d) { // Create an ExperimentInfo object @@ -633,7 +635,7 @@ IMDEventWorkspace_sptr ConvertSpiceDataToRealSpace::createDataMDWorkspace( * @return */ IMDEventWorkspace_sptr ConvertSpiceDataToRealSpace::createMonitorMDWorkspace( - const std::vector<MatrixWorkspace_sptr> vec_ws2d, + const std::vector<MatrixWorkspace_sptr> &vec_ws2d, const std::vector<double> &vecmonitor) { // Create a target output workspace. IMDEventWorkspace_sptr outWs = @@ -710,7 +712,7 @@ IMDEventWorkspace_sptr ConvertSpiceDataToRealSpace::createMonitorMDWorkspace( */ std::map<detid_t, double> ConvertSpiceDataToRealSpace::parseDetectorEfficiencyTable( - DataObjects::TableWorkspace_sptr detefftablews) { + const DataObjects::TableWorkspace_sptr &detefftablews) { std::map<detid_t, double> deteffmap; // check table workspace diff --git a/Framework/MDAlgorithms/src/ConvertToDetectorFaceMD.cpp b/Framework/MDAlgorithms/src/ConvertToDetectorFaceMD.cpp index 4856027e75c1079b1b37fdf52d11904b8a72c2b0..defff001fbdfb3230cbddb88fe7c02be0f05b1df 100644 --- a/Framework/MDAlgorithms/src/ConvertToDetectorFaceMD.cpp +++ b/Framework/MDAlgorithms/src/ConvertToDetectorFaceMD.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/ConvertToDetectorFaceMD.h" #include "MantidAPI/Axis.h" diff --git a/Framework/MDAlgorithms/src/ConvertToDiffractionMDWorkspace.cpp b/Framework/MDAlgorithms/src/ConvertToDiffractionMDWorkspace.cpp index d36a604b965ba0c3dd17bb60b6412c6c741473c3..9c397ebdf1e184017c27d29fdeab92cf88409893 100644 --- a/Framework/MDAlgorithms/src/ConvertToDiffractionMDWorkspace.cpp +++ b/Framework/MDAlgorithms/src/ConvertToDiffractionMDWorkspace.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/ConvertToDiffractionMDWorkspace.h" diff --git a/Framework/MDAlgorithms/src/ConvertToDiffractionMDWorkspace2.cpp b/Framework/MDAlgorithms/src/ConvertToDiffractionMDWorkspace2.cpp index bcfa563f9f02cf06aba97dffd6178869a1c9cc0f..07d9dec311474f766b220f11e0cd67b25a02731e 100644 --- a/Framework/MDAlgorithms/src/ConvertToDiffractionMDWorkspace2.cpp +++ b/Framework/MDAlgorithms/src/ConvertToDiffractionMDWorkspace2.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/ConvertToDiffractionMDWorkspace2.h" diff --git a/Framework/MDAlgorithms/src/ConvertToDiffractionMDWorkspace3.cpp b/Framework/MDAlgorithms/src/ConvertToDiffractionMDWorkspace3.cpp index 64c504a55f27b9b642a6b49084412d5818f04180..140d32a272f5a8db4a5a4f3907e3bd2ac487f466 100644 --- a/Framework/MDAlgorithms/src/ConvertToDiffractionMDWorkspace3.cpp +++ b/Framework/MDAlgorithms/src/ConvertToDiffractionMDWorkspace3.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/ConvertToDiffractionMDWorkspace3.h" diff --git a/Framework/MDAlgorithms/src/ConvertToMD.cpp b/Framework/MDAlgorithms/src/ConvertToMD.cpp index 0a016c7c3a5992c5a5885c5e702fbdebe19e3fed..9c0530b042e66e6756272ad300c87e5c320c0f7a 100644 --- a/Framework/MDAlgorithms/src/ConvertToMD.cpp +++ b/Framework/MDAlgorithms/src/ConvertToMD.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/ConvertToMD.h" @@ -445,7 +445,7 @@ is ignored in any other case together and used to describe selected transformation. */ bool ConvertToMD::buildTargetWSDescription( - API::IMDEventWorkspace_sptr spws, const std::string &QModReq, + const API::IMDEventWorkspace_sptr &spws, const std::string &QModReq, const std::string &dEModReq, const std::vector<std::string> &otherDimNames, std::vector<double> &dimMin, std::vector<double> &dimMax, const std::string &QFrame, const std::string &convertTo_, @@ -604,7 +604,8 @@ ConvertToMD::createNewMDWorkspace(const MDWSDescription &targWSDescr, * the first level. * @param bc A pointer to the box controller. */ -void ConvertToMD::setupTopLevelSplitting(Mantid::API::BoxController_sptr bc) { +void ConvertToMD::setupTopLevelSplitting( + const Mantid::API::BoxController_sptr &bc) { const size_t topLevelSplitSetting = 50; const size_t dimCutoff = 4; @@ -625,7 +626,8 @@ void ConvertToMD::setupTopLevelSplitting(Mantid::API::BoxController_sptr bc) { * *@returns true if one needs to create new workspace and false otherwise */ -bool ConvertToMD::doWeNeedNewTargetWorkspace(API::IMDEventWorkspace_sptr spws) { +bool ConvertToMD::doWeNeedNewTargetWorkspace( + const API::IMDEventWorkspace_sptr &spws) { bool createNewWs(false); if (!spws) { @@ -762,7 +764,8 @@ void ConvertToMD::findMinMax( * @param outputWS :: Workspace on which to set the file back end */ void ConvertToMD::setupFileBackend( - std::string filebackPath, Mantid::API::IMDEventWorkspace_sptr outputWS) { + const std::string &filebackPath, + const Mantid::API::IMDEventWorkspace_sptr &outputWS) { using DataObjects::BoxControllerNeXusIO; auto savemd = this->createChildAlgorithm("SaveMD", 0.01, 0.05, true); savemd->setProperty("InputWorkspace", outputWS); diff --git a/Framework/MDAlgorithms/src/ConvertToMDMinMaxGlobal.cpp b/Framework/MDAlgorithms/src/ConvertToMDMinMaxGlobal.cpp index 684402aac211ba8e00fda1e04b9f17288ef9d27d..f792019f4aea868728d3f394c8dfa50e986c68b4 100644 --- a/Framework/MDAlgorithms/src/ConvertToMDMinMaxGlobal.cpp +++ b/Framework/MDAlgorithms/src/ConvertToMDMinMaxGlobal.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/ConvertToMDMinMaxGlobal.h" diff --git a/Framework/MDAlgorithms/src/ConvertToMDMinMaxLocal.cpp b/Framework/MDAlgorithms/src/ConvertToMDMinMaxLocal.cpp index fcbd992f6332bf0b055ec035d721ec96b0065b3d..d8d52e71a428a884cd546e1639b8306d55d845e6 100644 --- a/Framework/MDAlgorithms/src/ConvertToMDMinMaxLocal.cpp +++ b/Framework/MDAlgorithms/src/ConvertToMDMinMaxLocal.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/ConvertToMDMinMaxLocal.h" diff --git a/Framework/MDAlgorithms/src/ConvertToMDParent.cpp b/Framework/MDAlgorithms/src/ConvertToMDParent.cpp index 99948947acfe8777cd4ca40fe4eda18ede68eb48..4ba0ff3d0e82e6e42f986a5f47977b6267dbcfce 100644 --- a/Framework/MDAlgorithms/src/ConvertToMDParent.cpp +++ b/Framework/MDAlgorithms/src/ConvertToMDParent.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/ConvertToMDParent.h" diff --git a/Framework/MDAlgorithms/src/ConvertToReflectometryQ.cpp b/Framework/MDAlgorithms/src/ConvertToReflectometryQ.cpp index c3b4401fb50653218017c64be64232f3558455e0..556551412635b6290e0c80ad3228f056267f7d54 100644 --- a/Framework/MDAlgorithms/src/ConvertToReflectometryQ.cpp +++ b/Framework/MDAlgorithms/src/ConvertToReflectometryQ.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/ConvertToReflectometryQ.h" @@ -75,7 +75,8 @@ Check that the input workspace is of the correct type. @throw: runtime_error if the units do not appear to be correct/compatible with the algorithm. */ -void checkInputWorkspace(Mantid::API::MatrixWorkspace_const_sptr inputWs) { +void checkInputWorkspace( + const Mantid::API::MatrixWorkspace_const_sptr &inputWs) { auto spectraAxis = inputWs->getAxis(1); const std::string label = spectraAxis->unit()->label(); const std::string expectedLabel = "degrees"; @@ -148,7 +149,7 @@ Get the value of theta from the logs @return : theta found in the logs @throw: runtime_errror if 'stheta' was not found. */ -double getThetaFromLogs(MatrixWorkspace_sptr inputWs) { +double getThetaFromLogs(const MatrixWorkspace_sptr &inputWs) { double theta = -1.; const Mantid::API::Run &run = inputWs->run(); diff --git a/Framework/MDAlgorithms/src/CreateMD.cpp b/Framework/MDAlgorithms/src/CreateMD.cpp index 5792649ce6ec53795cca67274abd98815aae51ae..ff6410e56557ed621bf9de955df891ae17fe87ba 100644 --- a/Framework/MDAlgorithms/src/CreateMD.cpp +++ b/Framework/MDAlgorithms/src/CreateMD.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/CreateMD.h" #include "MantidAPI/AnalysisDataService.h" @@ -15,6 +15,8 @@ #include "MantidKernel/MandatoryValidator.h" #include <Poco/Path.h> +#include <utility> + using namespace Mantid::Kernel; using namespace Mantid::API; using namespace Mantid::DataObjects; @@ -308,7 +310,7 @@ Mantid::API::Workspace_sptr CreateMD::loadWs(const std::string &filename, * @param log_name :: the name of the log * @param log_number :: the value to record in the log */ -void CreateMD::addSampleLog(Mantid::API::MatrixWorkspace_sptr workspace, +void CreateMD::addSampleLog(const Mantid::API::MatrixWorkspace_sptr &workspace, const std::string &log_name, double log_number) { Algorithm_sptr log_alg = createChildAlgorithm("AddSampleLog"); @@ -327,7 +329,8 @@ void CreateMD::addSampleLog(Mantid::API::MatrixWorkspace_sptr workspace, * * @param workspace :: the workspace to set the goniometer values in */ -void CreateMD::setGoniometer(Mantid::API::MatrixWorkspace_sptr workspace) { +void CreateMD::setGoniometer( + const Mantid::API::MatrixWorkspace_sptr &workspace) { Algorithm_sptr log_alg = createChildAlgorithm("SetGoniometer"); if (!workspace->run().getProperty("gl")) { std::ostringstream temp_ss; @@ -356,8 +359,8 @@ void CreateMD::setGoniometer(Mantid::API::MatrixWorkspace_sptr workspace) { * @param u :: lattice vector parallel to incident neutron beam * @param v :: lattice vector perpendicular to u in the horizontal plane */ -void CreateMD::setUB(Mantid::API::MatrixWorkspace_sptr workspace, double a, - double b, double c, double alpha, double beta, +void CreateMD::setUB(const Mantid::API::MatrixWorkspace_sptr &workspace, + double a, double b, double c, double alpha, double beta, double gamma, const std::vector<double> &u, const std::vector<double> &v) { Algorithm_sptr set_ub_alg = createChildAlgorithm("SetUB"); @@ -383,10 +386,12 @@ void CreateMD::setUB(Mantid::API::MatrixWorkspace_sptr workspace, double a, * @out_mdws :: output workspace to use if merge step is carried out * @returns the output converted workspace */ -Mantid::API::IMDEventWorkspace_sptr CreateMD::convertToMD( - Mantid::API::Workspace_sptr workspace, const std::string &analysis_mode, - bool in_place, const std::string &filebackend_filename, - const bool filebackend, Mantid::API::IMDEventWorkspace_sptr out_mdws) { +Mantid::API::IMDEventWorkspace_sptr +CreateMD::convertToMD(const Mantid::API::Workspace_sptr &workspace, + const std::string &analysis_mode, bool in_place, + const std::string &filebackend_filename, + const bool filebackend, + const Mantid::API::IMDEventWorkspace_sptr &out_mdws) { Algorithm_sptr min_max_alg = createChildAlgorithm("ConvertToMDMinMaxGlobal"); min_max_alg->setProperty("InputWorkspace", workspace); min_max_alg->setProperty("QDimensions", "Q3D"); @@ -462,12 +467,13 @@ CreateMD::merge_runs(const std::vector<std::string> &to_merge) { * @param out_mdws :output workspace to use if merge step is carried out */ Mantid::API::IMDEventWorkspace_sptr CreateMD::single_run( - Mantid::API::MatrixWorkspace_sptr input_workspace, const std::string &emode, - double efix, double psi, double gl, double gs, bool in_place, - const std::vector<double> &alatt, const std::vector<double> &angdeg, - const std::vector<double> &u, const std::vector<double> &v, - const std::string &filebackend_filename, const bool filebackend, - Mantid::API::IMDEventWorkspace_sptr out_mdws) { + const Mantid::API::MatrixWorkspace_sptr &input_workspace, + const std::string &emode, double efix, double psi, double gl, double gs, + bool in_place, const std::vector<double> &alatt, + const std::vector<double> &angdeg, const std::vector<double> &u, + const std::vector<double> &v, const std::string &filebackend_filename, + const bool filebackend, + const Mantid::API::IMDEventWorkspace_sptr &out_mdws) { std::vector<std::vector<double>> ub_params{alatt, angdeg, u, v}; @@ -493,7 +499,7 @@ Mantid::API::IMDEventWorkspace_sptr CreateMD::single_run( setGoniometer(input_workspace); return convertToMD(input_workspace, emode, in_place, filebackend_filename, - filebackend, out_mdws); + filebackend, std::move(out_mdws)); } } diff --git a/Framework/MDAlgorithms/src/CreateMDHistoWorkspace.cpp b/Framework/MDAlgorithms/src/CreateMDHistoWorkspace.cpp index 1e36bee4b00be9e3b9c26c149cd0c4bcbdd0f741..5b6bcd56e82192ab845af0ee86c6afcb2666c5ca 100644 --- a/Framework/MDAlgorithms/src/CreateMDHistoWorkspace.cpp +++ b/Framework/MDAlgorithms/src/CreateMDHistoWorkspace.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/CreateMDHistoWorkspace.h" #include "MantidKernel/ArrayProperty.h" diff --git a/Framework/MDAlgorithms/src/CreateMDWorkspace.cpp b/Framework/MDAlgorithms/src/CreateMDWorkspace.cpp index 1f618833df0501ae02e1081c9a5fc76c4cfa276f..bbaaa2c2a426eb167a30633b8a84b5d0137be3d0 100644 --- a/Framework/MDAlgorithms/src/CreateMDWorkspace.cpp +++ b/Framework/MDAlgorithms/src/CreateMDWorkspace.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/CreateMDWorkspace.h" #include "MantidAPI/FileProperty.h" @@ -243,8 +243,8 @@ void CreateMDWorkspace::exec() { setProperty("OutputWorkspace", boost::dynamic_pointer_cast<Workspace>(out)); } -MDFrame_uptr CreateMDWorkspace::createMDFrame(std::string frame, - std::string unit) { +MDFrame_uptr CreateMDWorkspace::createMDFrame(const std::string &frame, + const std::string &unit) { auto frameFactory = makeMDFrameFactoryChain(); MDFrameArgument frameArg(frame, unit); return frameFactory->create(frameArg); diff --git a/Framework/MDAlgorithms/src/CutMD.cpp b/Framework/MDAlgorithms/src/CutMD.cpp index 8c10c5425908dc2b019e8cdd3edb1006dee3a2c6..0e0c56601b78157f4c8e083c895baef658026a67 100644 --- a/Framework/MDAlgorithms/src/CutMD.cpp +++ b/Framework/MDAlgorithms/src/CutMD.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/CutMD.h" #include "MantidAPI/IMDEventWorkspace.h" @@ -31,7 +31,7 @@ namespace { // Typedef to simplify function signatures using MinMax = std::pair<double, double>; -MinMax getDimensionExtents(IMDEventWorkspace_sptr ws, size_t index) { +MinMax getDimensionExtents(const IMDEventWorkspace_sptr &ws, size_t index) { if (!ws) throw std::runtime_error( "Invalid workspace passed to getDimensionExtents."); @@ -50,7 +50,7 @@ std::string numToStringWithPrecision(const double num) { DblMatrix scaleProjection(const DblMatrix &inMatrix, const std::vector<std::string> &inUnits, std::vector<std::string> &outUnits, - IMDEventWorkspace_sptr inWS) { + const IMDEventWorkspace_sptr &inWS) { DblMatrix ret(inMatrix); // Check if we actually need to do anything if (std::equal(inUnits.begin(), inUnits.end(), outUnits.begin())) @@ -209,7 +209,7 @@ Determine the original q units. Assumes first 3 dimensions by index are r,l,d @param logger : logging object @return vector of markers */ -std::vector<std::string> findOriginalQUnits(IMDWorkspace_const_sptr inws, +std::vector<std::string> findOriginalQUnits(const IMDWorkspace_const_sptr &inws, Mantid::Kernel::Logger &logger) { std::vector<std::string> unitMarkers(3); for (size_t i = 0; i < inws->getNumDims() && i < 3; ++i) { diff --git a/Framework/MDAlgorithms/src/DisplayNormalizationSetter.cpp b/Framework/MDAlgorithms/src/DisplayNormalizationSetter.cpp index 5140f73bc8b95fd4706a9fef6bb10a5086f1093d..1d89a09fbf476b1f3fea00d81b5c1047f9cb7d4c 100644 --- a/Framework/MDAlgorithms/src/DisplayNormalizationSetter.cpp +++ b/Framework/MDAlgorithms/src/DisplayNormalizationSetter.cpp @@ -1,13 +1,15 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + -#include "MantidMDAlgorithms/DisplayNormalizationSetter.h" +#include <utility> + #include "MantidAPI/IMDEventWorkspace.h" #include "MantidAPI/MatrixWorkspace.h" #include "MantidDataObjects/EventWorkspace.h" +#include "MantidMDAlgorithms/DisplayNormalizationSetter.h" namespace Mantid { namespace MDAlgorithms { @@ -21,7 +23,7 @@ namespace MDAlgorithms { * @param mode: the energy transfer mode */ void DisplayNormalizationSetter:: -operator()(Mantid::API::IMDWorkspace_sptr mdWorkspace, +operator()(const Mantid::API::IMDWorkspace_sptr &mdWorkspace, const Mantid::API::MatrixWorkspace_sptr &underlyingWorkspace, bool isQ, const Mantid::Kernel::DeltaEMode::Type &mode) { if (boost::dynamic_pointer_cast<Mantid::API::IMDEventWorkspace>( @@ -42,7 +44,7 @@ operator()(Mantid::API::IMDWorkspace_sptr mdWorkspace, * @param mode: the energy transfer mode */ void DisplayNormalizationSetter::setNormalizationMDEvent( - Mantid::API::IMDWorkspace_sptr mdWorkspace, + const Mantid::API::IMDWorkspace_sptr &mdWorkspace, const Mantid::API::MatrixWorkspace_sptr &underlyingWorkspace, bool isQ, const Mantid::Kernel::DeltaEMode::Type &mode) { @@ -73,7 +75,7 @@ void DisplayNormalizationSetter::setNormalizationMDEvent( Mantid::API::MDNormalization::NumEventsNormalization; } - applyNormalizationMDEvent(mdWorkspace, displayNormalization, + applyNormalizationMDEvent(std::move(mdWorkspace), displayNormalization, displayNormalizationHisto); } @@ -86,7 +88,7 @@ void DisplayNormalizationSetter::setNormalizationMDEvent( * MDHisto workspaces */ void DisplayNormalizationSetter::applyNormalizationMDEvent( - Mantid::API::IMDWorkspace_sptr mdWorkspace, + const Mantid::API::IMDWorkspace_sptr &mdWorkspace, Mantid::API::MDNormalization displayNormalization, Mantid::API::MDNormalization displayNormalizationHisto) { auto ws = diff --git a/Framework/MDAlgorithms/src/DivideMD.cpp b/Framework/MDAlgorithms/src/DivideMD.cpp index 25486d802a3de38850588611a696d575e142b65d..e98b2472ba0dd4bff912f0d3d0778ef277fcc444 100644 --- a/Framework/MDAlgorithms/src/DivideMD.cpp +++ b/Framework/MDAlgorithms/src/DivideMD.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/DivideMD.h" #include "MantidDataObjects/MDBox.h" diff --git a/Framework/MDAlgorithms/src/EqualToMD.cpp b/Framework/MDAlgorithms/src/EqualToMD.cpp index e213ea179e64402285bb090d3184cb4c519fc1bd..7a45de2032dac71283ad92d118ef0e4ae513a367 100644 --- a/Framework/MDAlgorithms/src/EqualToMD.cpp +++ b/Framework/MDAlgorithms/src/EqualToMD.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/EqualToMD.h" #include "MantidKernel/System.h" diff --git a/Framework/MDAlgorithms/src/EvaluateMDFunction.cpp b/Framework/MDAlgorithms/src/EvaluateMDFunction.cpp index 9be89662a6ebf1e1b264aab4e17df7f6c8ac1449..460b085e12a4fb1baadd36651ced72f35d2992d6 100644 --- a/Framework/MDAlgorithms/src/EvaluateMDFunction.cpp +++ b/Framework/MDAlgorithms/src/EvaluateMDFunction.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/EvaluateMDFunction.h" #include "MantidAPI/AlgorithmManager.h" diff --git a/Framework/MDAlgorithms/src/ExponentialMD.cpp b/Framework/MDAlgorithms/src/ExponentialMD.cpp index f85ee6f39902c4c7dced2e1dd0e1c3c14959546d..b849e7db2ae08e376ae685783deedfc16287b3b4 100644 --- a/Framework/MDAlgorithms/src/ExponentialMD.cpp +++ b/Framework/MDAlgorithms/src/ExponentialMD.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/ExponentialMD.h" #include "MantidKernel/System.h" diff --git a/Framework/MDAlgorithms/src/FakeMDEventData.cpp b/Framework/MDAlgorithms/src/FakeMDEventData.cpp index 44df1b42f49f445b4188a3c2728fc6b564c21d72..ce5f730909f28cf8ca7b796976fe97a4fa288c26 100644 --- a/Framework/MDAlgorithms/src/FakeMDEventData.cpp +++ b/Framework/MDAlgorithms/src/FakeMDEventData.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------------------------------- // Includes diff --git a/Framework/MDAlgorithms/src/FindPeaksMD.cpp b/Framework/MDAlgorithms/src/FindPeaksMD.cpp index 03a2c307bfa606f444123c484dc056a57fefe95c..eb8992ca9d5cdc0046e0a6daa621c979b08d5d6d 100644 --- a/Framework/MDAlgorithms/src/FindPeaksMD.cpp +++ b/Framework/MDAlgorithms/src/FindPeaksMD.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/FindPeaksMD.h" #include "MantidAPI/Run.h" @@ -586,7 +586,7 @@ void FindPeaksMD::findPeaks(typename MDEventWorkspace<MDE, nd>::sptr ws) { * @param ws :: MDHistoWorkspace */ void FindPeaksMD::findPeaksHisto( - Mantid::DataObjects::MDHistoWorkspace_sptr ws) { + const Mantid::DataObjects::MDHistoWorkspace_sptr &ws) { size_t nd = ws->getNumDims(); if (nd < 3) throw std::invalid_argument("Workspace must have at least 3 dimensions."); diff --git a/Framework/MDAlgorithms/src/FitMD.cpp b/Framework/MDAlgorithms/src/FitMD.cpp index b24fbaf3a7e2d8aa219e028c508cd7e06fa2e733..fe289f2f494377274e389388f2fda1d4e946246a 100644 --- a/Framework/MDAlgorithms/src/FitMD.cpp +++ b/Framework/MDAlgorithms/src/FitMD.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/FitMD.h" @@ -269,8 +269,8 @@ boost::shared_ptr<API::Workspace> FitMD::createEventOutputWorkspace( * @param outputWorkspacePropertyName :: The property name */ boost::shared_ptr<API::Workspace> FitMD::createHistoOutputWorkspace( - const std::string &baseName, API::IFunction_sptr function, - API::IMDHistoWorkspace_const_sptr inputWorkspace, + const std::string &baseName, const API::IFunction_sptr &function, + const API::IMDHistoWorkspace_const_sptr &inputWorkspace, const std::string &outputWorkspacePropertyName) { // have to cast const away to be able to pass the workspace to the algorithm API::IMDHistoWorkspace_sptr nonConstInputWS = diff --git a/Framework/MDAlgorithms/src/FlippingRatioCorrectionMD.cpp b/Framework/MDAlgorithms/src/FlippingRatioCorrectionMD.cpp index 52551be1606f516cebc2ffd0459c92df45bb2694..05bae0e0b927ed7879d85e24edfacdf2eabc1aae 100644 --- a/Framework/MDAlgorithms/src/FlippingRatioCorrectionMD.cpp +++ b/Framework/MDAlgorithms/src/FlippingRatioCorrectionMD.cpp @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #include "MantidMDAlgorithms/FlippingRatioCorrectionMD.h" #include "MantidAPI/IMDEventWorkspace.h" #include "MantidAPI/Run.h" diff --git a/Framework/MDAlgorithms/src/GetSpiceDataRawCountsFromMD.cpp b/Framework/MDAlgorithms/src/GetSpiceDataRawCountsFromMD.cpp index eb0529551e8c5c1efe9c3225c020f19e114a60a0..b82ab214b1b360fdd5a1147abf0d2407ac5c6c92 100644 --- a/Framework/MDAlgorithms/src/GetSpiceDataRawCountsFromMD.cpp +++ b/Framework/MDAlgorithms/src/GetSpiceDataRawCountsFromMD.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/GetSpiceDataRawCountsFromMD.h" @@ -17,6 +17,7 @@ #include "MantidKernel/ListValidator.h" #include <algorithm> +#include <utility> namespace Mantid { namespace MDAlgorithms { @@ -147,15 +148,16 @@ void GetSpiceDataRawCountsFromMD::exec() { * @param donormalize */ void GetSpiceDataRawCountsFromMD::exportDetCountsOfRun( - API::IMDEventWorkspace_const_sptr datamdws, - API::IMDEventWorkspace_const_sptr monitormdws, const int runnumber, + const API::IMDEventWorkspace_const_sptr &datamdws, + const API::IMDEventWorkspace_const_sptr &monitormdws, const int runnumber, std::vector<double> &vecX, std::vector<double> &vecY, std::string &xlabel, std::string &ylabel, bool donormalize) { // Get detector counts std::vector<double> vec2theta; std::vector<double> vecDetCounts; int detid = -1; - getDetCounts(datamdws, runnumber, detid, vec2theta, vecDetCounts, true); + getDetCounts(std::move(datamdws), runnumber, detid, vec2theta, vecDetCounts, + true); if (vec2theta.size() != vecDetCounts.size()) throw std::runtime_error( "Logic error! Vector of 2theta must have same size as " @@ -166,8 +168,8 @@ void GetSpiceDataRawCountsFromMD::exportDetCountsOfRun( std::vector<double> vecMonitorCounts; // Normalize if required if (donormalize) { - getDetCounts(monitormdws, runnumber, detid, vec2thetaMon, vecMonitorCounts, - false); + getDetCounts(std::move(monitormdws), runnumber, detid, vec2thetaMon, + vecMonitorCounts, false); // check if (vecDetCounts.size() != vecMonitorCounts.size()) throw std::runtime_error( @@ -218,8 +220,8 @@ void GetSpiceDataRawCountsFromMD::exportDetCountsOfRun( * @param donormalize */ void GetSpiceDataRawCountsFromMD::exportIndividualDetCounts( - API::IMDEventWorkspace_const_sptr datamdws, - API::IMDEventWorkspace_const_sptr monitormdws, const int detid, + const API::IMDEventWorkspace_const_sptr &datamdws, + const API::IMDEventWorkspace_const_sptr &monitormdws, const int detid, std::vector<double> &vecX, std::vector<double> &vecY, std::string &xlabel, std::string &ylabel, const bool &donormalize) { // Get detector counts @@ -246,8 +248,8 @@ void GetSpiceDataRawCountsFromMD::exportIndividualDetCounts( // FIXME - Consider refactoring in future // Normalize if required if (donormalize) { - getDetCounts(monitormdws, runnumber, detid, vec2thetaMon, vecMonitorCounts, - false); + getDetCounts(std::move(monitormdws), runnumber, detid, vec2thetaMon, + vecMonitorCounts, false); if (vecDetCounts.size() != vecMonitorCounts.size()) throw std::runtime_error( "Number of detectors' counts' is different from that of " @@ -296,7 +298,7 @@ void GetSpiceDataRawCountsFromMD::exportIndividualDetCounts( * @param ylabel */ void GetSpiceDataRawCountsFromMD::exportSampleLogValue( - API::IMDEventWorkspace_const_sptr datamdws, + const API::IMDEventWorkspace_const_sptr &datamdws, const std::string &samplelogname, std::vector<double> &vecX, std::vector<double> &vecY, std::string &xlabel, std::string &ylabel) { // prepare @@ -349,7 +351,7 @@ void GetSpiceDataRawCountsFromMD::exportSampleLogValue( * @param formX :: flag to set up vecX */ void GetSpiceDataRawCountsFromMD::getDetCounts( - API::IMDEventWorkspace_const_sptr mdws, const int &runnumber, + const API::IMDEventWorkspace_const_sptr &mdws, const int &runnumber, const int &detid, std::vector<double> &vecX, std::vector<double> &vecY, bool formX) { // Get sample and source position @@ -441,7 +443,7 @@ void GetSpiceDataRawCountsFromMD::getDetCounts( * @param vecSampleLog */ void GetSpiceDataRawCountsFromMD::getSampleLogValues( - IMDEventWorkspace_const_sptr mdws, const std::string &samplelogname, + const IMDEventWorkspace_const_sptr &mdws, const std::string &samplelogname, const int runnumber, std::vector<double> &vecSampleLog) { // Clear input vecSampleLog.clear(); diff --git a/Framework/MDAlgorithms/src/GreaterThanMD.cpp b/Framework/MDAlgorithms/src/GreaterThanMD.cpp index 0da279aad8c6f3a980091e842ef2a1ed2cd7ead0..0c0cf48d1bf84d525ebe18afbf3aa2c877581978 100644 --- a/Framework/MDAlgorithms/src/GreaterThanMD.cpp +++ b/Framework/MDAlgorithms/src/GreaterThanMD.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/GreaterThanMD.h" #include "MantidKernel/System.h" diff --git a/Framework/MDAlgorithms/src/IDynamicRebinning.cpp b/Framework/MDAlgorithms/src/IDynamicRebinning.cpp index 20e541adbb51dc16a56155492efdff8fc5be66f9..112f9edb491c01e192bd0f446d68e44db6b80a31 100644 --- a/Framework/MDAlgorithms/src/IDynamicRebinning.cpp +++ b/Framework/MDAlgorithms/src/IDynamicRebinning.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/IDynamicRebinning.h" diff --git a/Framework/MDAlgorithms/src/ImportMDEventWorkspace.cpp b/Framework/MDAlgorithms/src/ImportMDEventWorkspace.cpp index ccacf9d358aa596349c8b343bcee2092f74e1601..a67ecd14a159cd141b3833ca9cd31a9d2eb705d3 100644 --- a/Framework/MDAlgorithms/src/ImportMDEventWorkspace.cpp +++ b/Framework/MDAlgorithms/src/ImportMDEventWorkspace.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/ImportMDEventWorkspace.h" diff --git a/Framework/MDAlgorithms/src/ImportMDHistoWorkspace.cpp b/Framework/MDAlgorithms/src/ImportMDHistoWorkspace.cpp index 7e2564453c11d8129a7ec3faf1c67e9985f2560b..021ef94c0a8cbe65b3addba78b5bd62cebdb2b3e 100644 --- a/Framework/MDAlgorithms/src/ImportMDHistoWorkspace.cpp +++ b/Framework/MDAlgorithms/src/ImportMDHistoWorkspace.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/ImportMDHistoWorkspace.h" #include "MantidAPI/FileProperty.h" diff --git a/Framework/MDAlgorithms/src/ImportMDHistoWorkspaceBase.cpp b/Framework/MDAlgorithms/src/ImportMDHistoWorkspaceBase.cpp index 4fc1dd4b563ee9009ec26098e8e18cc4a931fcaf..53ae75ebfbbfdb582bd83e70310a4dec7ddb8224 100644 --- a/Framework/MDAlgorithms/src/ImportMDHistoWorkspaceBase.cpp +++ b/Framework/MDAlgorithms/src/ImportMDHistoWorkspaceBase.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/ImportMDHistoWorkspaceBase.h" @@ -145,8 +145,9 @@ MDHistoWorkspace_sptr ImportMDHistoWorkspaceBase::createEmptyOutputWorkspace() { * @param unit: the selected unit * @returns a unique pointer to an MDFrame */ -MDFrame_uptr ImportMDHistoWorkspaceBase::createMDFrame(std::string frame, - std::string unit) { +MDFrame_uptr +ImportMDHistoWorkspaceBase::createMDFrame(const std::string &frame, + const std::string &unit) { auto frameFactory = makeMDFrameFactoryChain(); MDFrameArgument frameArg(frame, unit); return frameFactory->create(frameArg); diff --git a/Framework/MDAlgorithms/src/Integrate3DEvents.cpp b/Framework/MDAlgorithms/src/Integrate3DEvents.cpp index 38f34201be14208db0c7689580f2d8abd5cc0aec..b7fa3fe54a4e7fb407c5bb7fc30db005a982bfa5 100644 --- a/Framework/MDAlgorithms/src/Integrate3DEvents.cpp +++ b/Framework/MDAlgorithms/src/Integrate3DEvents.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/Integrate3DEvents.h" #include "MantidDataObjects/NoShape.h" @@ -18,6 +18,8 @@ extern "C" { #include <cstdio> +#include <utility> + #include <gsl/gsl_eigen.h> #include <gsl/gsl_matrix.h> #include <gsl/gsl_vector.h> @@ -447,7 +449,7 @@ bool Integrate3DEvents::correctForDetectorEdges( */ Mantid::Geometry::PeakShape_const_sptr Integrate3DEvents::ellipseIntegrateEvents( - std::vector<V3D> E1Vec, V3D const &peak_q, bool specify_size, + const std::vector<V3D> &E1Vec, V3D const &peak_q, bool specify_size, double peak_radius, double back_inner_radius, double back_outer_radius, std::vector<double> &axes_radii, double &inti, double &sigi) { inti = 0.0; // default values, in case something @@ -494,18 +496,18 @@ Integrate3DEvents::ellipseIntegrateEvents( return boost::make_shared<NoShape>(); // ellipsoids will be zero. } - return ellipseIntegrateEvents(E1Vec, peak_q, some_events, eigen_vectors, - sigmas, specify_size, peak_radius, - back_inner_radius, back_outer_radius, - axes_radii, inti, sigi); + return ellipseIntegrateEvents(std::move(E1Vec), peak_q, some_events, + eigen_vectors, sigmas, specify_size, + peak_radius, back_inner_radius, + back_outer_radius, axes_radii, inti, sigi); } Mantid::Geometry::PeakShape_const_sptr Integrate3DEvents::ellipseIntegrateModEvents( - std::vector<V3D> E1Vec, V3D const &peak_q, V3D const &hkl, V3D const &mnp, - bool specify_size, double peak_radius, double back_inner_radius, - double back_outer_radius, std::vector<double> &axes_radii, double &inti, - double &sigi) { + const std::vector<V3D> &E1Vec, V3D const &peak_q, V3D const &hkl, + V3D const &mnp, bool specify_size, double peak_radius, + double back_inner_radius, double back_outer_radius, + std::vector<double> &axes_radii, double &inti, double &sigi) { inti = 0.0; // default values, in case something sigi = 0.0; // is wrong with the peak. @@ -555,10 +557,10 @@ Integrate3DEvents::ellipseIntegrateModEvents( return boost::make_shared<NoShape>(); // ellipsoids will be zero. } - return ellipseIntegrateEvents(E1Vec, peak_q, some_events, eigen_vectors, - sigmas, specify_size, peak_radius, - back_inner_radius, back_outer_radius, - axes_radii, inti, sigi); + return ellipseIntegrateEvents(std::move(E1Vec), peak_q, some_events, + eigen_vectors, sigmas, specify_size, + peak_radius, back_inner_radius, + back_outer_radius, axes_radii, inti, sigi); } /** * Calculate the number of events in an ellipsoid centered at 0,0,0 with @@ -1107,7 +1109,7 @@ void Integrate3DEvents::addModEvent( * */ PeakShapeEllipsoid_const_sptr Integrate3DEvents::ellipseIntegrateEvents( - std::vector<V3D> E1Vec, V3D const &peak_q, + const std::vector<V3D> &E1Vec, V3D const &peak_q, std::vector<std::pair<std::pair<double, double>, Mantid::Kernel::V3D>> const &ev_list, std::vector<V3D> const &directions, std::vector<double> const &sigmas, @@ -1212,7 +1214,8 @@ PeakShapeEllipsoid_const_sptr Integrate3DEvents::ellipseIntegrateEvents( * @param QLabFrame: The Peak center. * @param r: Peak radius. */ -double Integrate3DEvents::detectorQ(std::vector<V3D> E1Vec, const V3D QLabFrame, +double Integrate3DEvents::detectorQ(const std::vector<V3D> &E1Vec, + const V3D QLabFrame, const std::vector<double> &r) { double quot = 1.0; for (auto &E1 : E1Vec) { diff --git a/Framework/MDAlgorithms/src/IntegrateEllipsoids.cpp b/Framework/MDAlgorithms/src/IntegrateEllipsoids.cpp index ed049f7dac573fc625664926908cc37362829daf..e11aaaad9fef17eb5767838cd800669c86492abc 100644 --- a/Framework/MDAlgorithms/src/IntegrateEllipsoids.cpp +++ b/Framework/MDAlgorithms/src/IntegrateEllipsoids.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/IntegrateEllipsoids.h" #include "MantidAPI/AnalysisDataService.h" @@ -746,8 +746,8 @@ void IntegrateEllipsoids::calculateE1( } void IntegrateEllipsoids::runMaskDetectors( - Mantid::DataObjects::PeaksWorkspace_sptr peakWS, std::string property, - std::string values) { + const Mantid::DataObjects::PeaksWorkspace_sptr &peakWS, + const std::string &property, const std::string &values) { IAlgorithm_sptr alg = createChildAlgorithm("MaskBTP"); alg->setProperty<Workspace_sptr>("Workspace", peakWS); alg->setProperty(property, values); diff --git a/Framework/MDAlgorithms/src/IntegrateEllipsoidsTwoStep.cpp b/Framework/MDAlgorithms/src/IntegrateEllipsoidsTwoStep.cpp index 88fcf9b563fb2bdfc5f7ca2e1c27f474fb5f21b1..0d5a049faa3a8cd77717a32f07c686d82f6f41e2 100644 --- a/Framework/MDAlgorithms/src/IntegrateEllipsoidsTwoStep.cpp +++ b/Framework/MDAlgorithms/src/IntegrateEllipsoidsTwoStep.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/IntegrateEllipsoidsTwoStep.h" @@ -559,8 +559,8 @@ void IntegrateEllipsoidsTwoStep::calculateE1( } void IntegrateEllipsoidsTwoStep::runMaskDetectors( - Mantid::DataObjects::PeaksWorkspace_sptr peakWS, std::string property, - std::string values) { + const Mantid::DataObjects::PeaksWorkspace_sptr &peakWS, + const std::string &property, const std::string &values) { IAlgorithm_sptr alg = createChildAlgorithm("MaskBTP"); alg->setProperty<Workspace_sptr>("Workspace", peakWS); alg->setProperty(property, values); diff --git a/Framework/MDAlgorithms/src/IntegrateFlux.cpp b/Framework/MDAlgorithms/src/IntegrateFlux.cpp index f3c845fef3684513d96b3b7f7651d62362594e86..731b9a1f989cb7142926cba10979efa69b421a1a 100644 --- a/Framework/MDAlgorithms/src/IntegrateFlux.cpp +++ b/Framework/MDAlgorithms/src/IntegrateFlux.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/IntegrateFlux.h" #include "MantidAPI/MatrixWorkspace.h" diff --git a/Framework/MDAlgorithms/src/IntegrateMDHistoWorkspace.cpp b/Framework/MDAlgorithms/src/IntegrateMDHistoWorkspace.cpp index 21c50200fde3d2a68f9b9f3b8d96a3d606c4e9b1..3e9924c29a75130b1d421355f0d6fc43c701c70c 100644 --- a/Framework/MDAlgorithms/src/IntegrateMDHistoWorkspace.cpp +++ b/Framework/MDAlgorithms/src/IntegrateMDHistoWorkspace.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/IntegrateMDHistoWorkspace.h" #include "MantidKernel/ArrayProperty.h" diff --git a/Framework/MDAlgorithms/src/IntegratePeaksCWSD.cpp b/Framework/MDAlgorithms/src/IntegratePeaksCWSD.cpp index 0aebc019e8b616a63f410ff970c3682aa2d47d9e..df0ce5a5a9495f70f2f84a99ad995a02bd2f43c0 100644 --- a/Framework/MDAlgorithms/src/IntegratePeaksCWSD.cpp +++ b/Framework/MDAlgorithms/src/IntegratePeaksCWSD.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/IntegratePeaksCWSD.h" #include "MantidAPI/IMDEventWorkspace.h" @@ -368,7 +368,7 @@ void IntegratePeaksCWSD::simplePeakIntegration( * @param maskws */ std::vector<detid_t> IntegratePeaksCWSD::processMaskWorkspace( - DataObjects::MaskWorkspace_const_sptr maskws) { + const DataObjects::MaskWorkspace_const_sptr &maskws) { std::vector<detid_t> vecMaskedDetID; // Add the detector IDs of all masked detector to a vector @@ -452,9 +452,8 @@ DataObjects::PeaksWorkspace_sptr IntegratePeaksCWSD::createOutputs() { * @param mdws :: source MDEventWorkspace where the run numbers come from * @return */ -DataObjects::PeaksWorkspace_sptr -IntegratePeaksCWSD::createPeakworkspace(Kernel::V3D peakCenter, - API::IMDEventWorkspace_sptr mdws) { +DataObjects::PeaksWorkspace_sptr IntegratePeaksCWSD::createPeakworkspace( + Kernel::V3D peakCenter, const API::IMDEventWorkspace_sptr &mdws) { g_log.notice("Create peak workspace for output ... ..."); // new peak workspace DataObjects::PeaksWorkspace_sptr peakws = diff --git a/Framework/MDAlgorithms/src/IntegratePeaksMD.cpp b/Framework/MDAlgorithms/src/IntegratePeaksMD.cpp index 8fbe7f6137e64b8eacd137d64df582da057d3887..6b1dcd493d45c481371cb188e1dd9691422b1b94 100644 --- a/Framework/MDAlgorithms/src/IntegratePeaksMD.cpp +++ b/Framework/MDAlgorithms/src/IntegratePeaksMD.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/IntegratePeaksMD.h" #include "MantidAPI/AnalysisDataService.h" diff --git a/Framework/MDAlgorithms/src/IntegratePeaksMD2.cpp b/Framework/MDAlgorithms/src/IntegratePeaksMD2.cpp index 915edea01a3a330104e32efb4089da0a1fb7fb20..5f856905e9dc43d0996d9f6083deff0225e4c4b0 100644 --- a/Framework/MDAlgorithms/src/IntegratePeaksMD2.cpp +++ b/Framework/MDAlgorithms/src/IntegratePeaksMD2.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/IntegratePeaksMD2.h" #include "MantidAPI/AnalysisDataService.h" @@ -721,8 +721,8 @@ double IntegratePeaksMD2::detectorQ(Mantid::Kernel::V3D QLabFrame, double r) { } void IntegratePeaksMD2::runMaskDetectors( - Mantid::DataObjects::PeaksWorkspace_sptr peakWS, std::string property, - std::string values) { + const Mantid::DataObjects::PeaksWorkspace_sptr &peakWS, + const std::string &property, const std::string &values) { // For CORELLI do not count as edge if next to another detector bank if (property == "Tube" && peakWS->getInstrument()->getName() == "CORELLI") { IAlgorithm_sptr alg = createChildAlgorithm("MaskBTP"); @@ -750,7 +750,7 @@ void IntegratePeaksMD2::runMaskDetectors( } void IntegratePeaksMD2::checkOverlap( - int i, Mantid::DataObjects::PeaksWorkspace_sptr peakWS, + int i, const Mantid::DataObjects::PeaksWorkspace_sptr &peakWS, Mantid::Kernel::SpecialCoordinateSystem CoordinatesToUse, double radius) { // Get a direct ref to that peak. IPeak &p1 = peakWS->getPeak(i); diff --git a/Framework/MDAlgorithms/src/IntegratePeaksMDHKL.cpp b/Framework/MDAlgorithms/src/IntegratePeaksMDHKL.cpp index 0d5face27563263ba58f0603b9a6c724a47d08e7..777e53bc68cd6e54dd41cc3c548e720a56d4ba3d 100644 --- a/Framework/MDAlgorithms/src/IntegratePeaksMDHKL.cpp +++ b/Framework/MDAlgorithms/src/IntegratePeaksMDHKL.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/IntegratePeaksMDHKL.h" #include "MantidAPI/CommonBinsValidator.h" @@ -195,7 +195,7 @@ IntegratePeaksMDHKL::normalize(int h, int k, int l, double box, int gridPts, } void IntegratePeaksMDHKL::integratePeak(const int neighborPts, - MDHistoWorkspace_sptr out, + const MDHistoWorkspace_sptr &out, double &intensity, double &errorSquared) { std::vector<int> gridPts; diff --git a/Framework/MDAlgorithms/src/InvalidParameter.cpp b/Framework/MDAlgorithms/src/InvalidParameter.cpp index be8890729faf9315dfe527b02f91857286b4ad35..3865fbed263b4e3d62b32f92e847f2e3272ee8af 100644 --- a/Framework/MDAlgorithms/src/InvalidParameter.cpp +++ b/Framework/MDAlgorithms/src/InvalidParameter.cpp @@ -1,16 +1,19 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + +#include <utility> + #include "MantidMDAlgorithms/InvalidParameter.h" namespace Mantid { namespace MDAlgorithms { InvalidParameter::InvalidParameter() {} -InvalidParameter::InvalidParameter(std::string value) : m_value(value) {} +InvalidParameter::InvalidParameter(std::string value) + : m_value(std::move(value)) {} std::string InvalidParameter::getName() const { return parameterName(); } diff --git a/Framework/MDAlgorithms/src/InvalidParameterParser.cpp b/Framework/MDAlgorithms/src/InvalidParameterParser.cpp index b4e95199204506b8526db5e5e682f3c982b0c975..f27ec3ef84c79591b19d48db49e1fa61cc5062de 100644 --- a/Framework/MDAlgorithms/src/InvalidParameterParser.cpp +++ b/Framework/MDAlgorithms/src/InvalidParameterParser.cpp @@ -1,12 +1,13 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/InvalidParameterParser.h" #include "MantidAPI/ImplicitFunctionParameterParserFactory.h" #include <boost/algorithm/string.hpp> +#include <utility> namespace Mantid { namespace MDAlgorithms { @@ -23,7 +24,7 @@ InvalidParameterParser::createParameter(Poco::XML::Element *parameterElement) { InvalidParameter * InvalidParameterParser::parseInvalidParameter(std::string value) { - return new InvalidParameter(value); + return new InvalidParameter(std::move(value)); } void InvalidParameterParser::setSuccessorParser( diff --git a/Framework/MDAlgorithms/src/LessThanMD.cpp b/Framework/MDAlgorithms/src/LessThanMD.cpp index d946d00357dcf9e6a0157ebb749181e40628c146..ebdf4fffd11f8ca506b8adf103c341f78668ff37 100644 --- a/Framework/MDAlgorithms/src/LessThanMD.cpp +++ b/Framework/MDAlgorithms/src/LessThanMD.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/LessThanMD.h" #include "MantidKernel/System.h" diff --git a/Framework/MDAlgorithms/src/LoadDNSSCD.cpp b/Framework/MDAlgorithms/src/LoadDNSSCD.cpp index cfecfb07e7832f43e41e39a787e1884b251a04df..4dc8143a57dc15d0543e61a23fec1b3533cff30d 100644 --- a/Framework/MDAlgorithms/src/LoadDNSSCD.cpp +++ b/Framework/MDAlgorithms/src/LoadDNSSCD.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/LoadDNSSCD.h" #include "MantidAPI/ExperimentInfo.h" @@ -240,7 +240,7 @@ void LoadDNSSCD::init() { /** Read Huber angles from a given table workspace. */ -void LoadDNSSCD::loadHuber(ITableWorkspace_sptr tws) { +void LoadDNSSCD::loadHuber(const ITableWorkspace_sptr &tws) { ColumnVector<double> huber = tws->getVector("Huber(degrees)"); // set huber[0] for each run in m_data for (auto &ds : m_data) { @@ -789,7 +789,7 @@ void LoadDNSSCD::fillOutputWorkspaceRaw(double wavelength) { setProperty("NormalizationWorkspace", normWS); } -void LoadDNSSCD::read_data(const std::string fname, +void LoadDNSSCD::read_data(const std::string &fname, std::map<std::string, std::string> &str_metadata, std::map<std::string, double> &num_metadata) { std::ifstream file(fname); diff --git a/Framework/MDAlgorithms/src/LoadMD.cpp b/Framework/MDAlgorithms/src/LoadMD.cpp index 411c544628231859cb717fdd2f630f57d4dd2533..0ebd94bfad8540fcc52ebfe0fefc3ff11720c3c3 100644 --- a/Framework/MDAlgorithms/src/LoadMD.cpp +++ b/Framework/MDAlgorithms/src/LoadMD.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/LoadMD.h" #include "MantidAPI/ExperimentInfo.h" @@ -275,7 +275,8 @@ void LoadMD::exec() { * @param ws * @param dataType */ -void LoadMD::loadSlab(std::string name, void *data, MDHistoWorkspace_sptr ws, +void LoadMD::loadSlab(const std::string &name, void *data, + const MDHistoWorkspace_sptr &ws, NeXus::NXnumtype dataType) { m_file->openData(name); if (m_file->getInfo().type != dataType) @@ -634,7 +635,7 @@ void LoadMD::doLoad(typename MDEventWorkspace<MDE, nd>::sptr ws) { * appropriate coordinate transform and set those on the workspace. * @param ws : workspace to set the coordinate transforms on */ -void LoadMD::loadAffineMatricies(IMDWorkspace_sptr ws) { +void LoadMD::loadAffineMatricies(const IMDWorkspace_sptr &ws) { std::map<std::string, std::string> entries; m_file->getEntries(entries); @@ -655,7 +656,7 @@ void LoadMD::loadAffineMatricies(IMDWorkspace_sptr ws) { * @param entry_name : the entry point in the NeXus file to read * @return the coordinate transform object */ -CoordTransform *LoadMD::loadAffineMatrix(std::string entry_name) { +CoordTransform *LoadMD::loadAffineMatrix(const std::string &entry_name) { m_file->openData(entry_name); std::vector<coord_t> vec; m_file->getData<coord_t>(vec); @@ -686,7 +687,8 @@ CoordTransform *LoadMD::loadAffineMatrix(std::string entry_name) { * Set MDFrames for workspaces from legacy files * @param ws:: poitner to the workspace which needs to be corrected */ -void LoadMD::setMDFrameOnWorkspaceFromLegacyFile(API::IMDWorkspace_sptr ws) { +void LoadMD::setMDFrameOnWorkspaceFromLegacyFile( + const API::IMDWorkspace_sptr &ws) { g_log.information() << "LoadMD: Encountered a legacy file which has a mismatch between " @@ -761,7 +763,7 @@ void LoadMD::setMDFrameOnWorkspaceFromLegacyFile(API::IMDWorkspace_sptr ws) { * where * all MDFrames were stored as MDFrames */ -void LoadMD::checkForRequiredLegacyFixup(API::IMDWorkspace_sptr ws) { +void LoadMD::checkForRequiredLegacyFixup(const API::IMDWorkspace_sptr &ws) { // Check if the special coordinate is not none auto isQBasedSpecialCoordinateSystem = true; if (m_coordSystem == Mantid::Kernel::SpecialCoordinateSystem::None) { @@ -787,7 +789,7 @@ void LoadMD::checkForRequiredLegacyFixup(API::IMDWorkspace_sptr ws) { /** * Find scaling for Q dimensions */ -std::vector<double> LoadMD::qDimensions(API::IMDWorkspace_sptr ws) { +std::vector<double> LoadMD::qDimensions(const API::IMDWorkspace_sptr &ws) { std::vector<double> scaling(m_numDims); for (size_t d = 0; d < m_numDims; d++) { std::string dimd = ws->getDimension(d)->getName(); diff --git a/Framework/MDAlgorithms/src/LoadSQW.cpp b/Framework/MDAlgorithms/src/LoadSQW.cpp index 4f8e61ceb3cb91e08462a781a0b7ec72d297e373..8cdf70ef0d89bb57badc7eb9ec673bc93da51d28 100644 --- a/Framework/MDAlgorithms/src/LoadSQW.cpp +++ b/Framework/MDAlgorithms/src/LoadSQW.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/LoadSQW.h" #include "MantidAPI/FileProperty.h" diff --git a/Framework/MDAlgorithms/src/LoadSQW2.cpp b/Framework/MDAlgorithms/src/LoadSQW2.cpp index 3ca3d6ebd88ae82451536c503c29f4f888b83125..df4856bb6c8183e3129f893cac554baa89e02ee0 100644 --- a/Framework/MDAlgorithms/src/LoadSQW2.cpp +++ b/Framework/MDAlgorithms/src/LoadSQW2.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/LoadSQW2.h" #include "MantidMDAlgorithms/MDWSTransform.h" @@ -595,7 +595,7 @@ void LoadSQW2::setupBoxController() { * box controller has already been initialized * @param filebackPath Path to the file used for backend storage */ -void LoadSQW2::setupFileBackend(std::string filebackPath) { +void LoadSQW2::setupFileBackend(const std::string &filebackPath) { using DataObjects::BoxControllerNeXusIO; auto savemd = this->createChildAlgorithm("SaveMD", 0.01, 0.05, true); savemd->setProperty("InputWorkspace", m_outputWS); diff --git a/Framework/MDAlgorithms/src/LogarithmMD.cpp b/Framework/MDAlgorithms/src/LogarithmMD.cpp index 4a4c89963b6b50f2410bbfd35f39942346145d34..7c43a5984415ffce12b297681772687ff517448b 100644 --- a/Framework/MDAlgorithms/src/LogarithmMD.cpp +++ b/Framework/MDAlgorithms/src/LogarithmMD.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/LogarithmMD.h" #include "MantidKernel/System.h" diff --git a/Framework/MDAlgorithms/src/MDEventWSWrapper.cpp b/Framework/MDAlgorithms/src/MDEventWSWrapper.cpp index d164c53e10df71ce482c3191cc45f9e6eade9922..0df5201068fc3f2547d3de872b1d8f28c34f8cea 100644 --- a/Framework/MDAlgorithms/src/MDEventWSWrapper.cpp +++ b/Framework/MDAlgorithms/src/MDEventWSWrapper.cpp @@ -1,11 +1,13 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + -#include "MantidMDAlgorithms/MDEventWSWrapper.h" +#include <utility> + #include "MantidGeometry/MDGeometry/MDTypes.h" +#include "MantidMDAlgorithms/MDEventWSWrapper.h" namespace Mantid { namespace MDAlgorithms { @@ -127,7 +129,6 @@ void MDEventWSWrapper::addMDDataND<0>(float * /*unused*/, uint16_t * /*unused*/, "to 0-dimensional workspace")); } -/***/ template <size_t nd> void MDEventWSWrapper::splitBoxList() { auto *const pWs = dynamic_cast< DataObjects::MDEventWorkspace<DataObjects::MDEvent<nd>, nd> *>( @@ -203,7 +204,7 @@ MDEventWSWrapper::createEmptyMDWS(const MDWSDescription &WSD) { /// set up existing workspace pointer as internal pointer for the class to /// perform proper MD operations on this workspace void MDEventWSWrapper::setMDWS(API::IMDEventWorkspace_sptr spWS) { - m_Workspace = spWS; + m_Workspace = std::move(spWS); m_NDimensions = m_Workspace->getNumDims(); } diff --git a/Framework/MDAlgorithms/src/MDNorm.cpp b/Framework/MDAlgorithms/src/MDNorm.cpp index 44e17c6971223581b36f3eba4ad4f655be04f2cc..e2ba944696455f95a4c84eb72699e1bfc5d92d0c 100644 --- a/Framework/MDAlgorithms/src/MDNorm.cpp +++ b/Framework/MDAlgorithms/src/MDNorm.cpp @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #include "MantidMDAlgorithms/MDNorm.h" #include "MantidAPI/CommonBinsValidator.h" #include "MantidAPI/IMDEventWorkspace.h" @@ -747,7 +746,7 @@ void MDNorm::createNormalizationWS( */ void MDNorm::validateBinningForTemporaryDataWorkspace( const std::map<std::string, std::string> ¶meters, - const Mantid::API::IMDHistoWorkspace_sptr tempDataWS) { + const Mantid::API::IMDHistoWorkspace_sptr &tempDataWS) { // parse the paramters map and get extents from tempDataWS const std::string numBinsStr = parameters.at("OutputBins"); @@ -922,8 +921,8 @@ void MDNorm::validateBinningForTemporaryDataWorkspace( * All slicing algorithm properties are passed along * @return MDHistoWorkspace as a result of the binning */ -DataObjects::MDHistoWorkspace_sptr -MDNorm::binInputWS(std::vector<Geometry::SymmetryOperation> symmetryOps) { +DataObjects::MDHistoWorkspace_sptr MDNorm::binInputWS( + const std::vector<Geometry::SymmetryOperation> &symmetryOps) { Mantid::API::IMDHistoWorkspace_sptr tempDataWS = this->getProperty("TemporaryDataWorkspace"); Mantid::API::Workspace_sptr outputWS; @@ -1143,7 +1142,7 @@ void MDNorm::cacheDimensionXValues() { * @param soIndex - the index of symmetry operation (for progress purposes) */ void MDNorm::calculateNormalization(const std::vector<coord_t> &otherValues, - Geometry::SymmetryOperation so, + const Geometry::SymmetryOperation &so, uint16_t expInfoIndex, size_t soIndex) { const auto ¤tExptInfo = *(m_inputWS->getExperimentInfo(expInfoIndex)); std::vector<double> lowValues, highValues; @@ -1331,7 +1330,7 @@ m_accumulate = true; */ void MDNorm::calculateIntersections( std::vector<std::array<double, 4>> &intersections, const double theta, - const double phi, Kernel::DblMatrix transform, double lowvalue, + const double phi, const Kernel::DblMatrix &transform, double lowvalue, double highvalue) { V3D qout(sin(theta) * cos(phi), sin(theta) * sin(phi), cos(theta)), qin(0., 0., 1); diff --git a/Framework/MDAlgorithms/src/MDNormDirectSC.cpp b/Framework/MDAlgorithms/src/MDNormDirectSC.cpp index 6d589fc3c09784cae697dcc236221c96b18993cb..9b4db70c567fc9e0c2288d2ea0dc7b16fcfee57a 100644 --- a/Framework/MDAlgorithms/src/MDNormDirectSC.cpp +++ b/Framework/MDAlgorithms/src/MDNormDirectSC.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/MDNormDirectSC.h" diff --git a/Framework/MDAlgorithms/src/MDNormSCD.cpp b/Framework/MDAlgorithms/src/MDNormSCD.cpp index 6472c722160e7f5e2d513d00ec4cda1b1adcfc45..fed7861523796961d9c7e71e5377f8c5d8e402a6 100644 --- a/Framework/MDAlgorithms/src/MDNormSCD.cpp +++ b/Framework/MDAlgorithms/src/MDNormSCD.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/MDNormSCD.h" diff --git a/Framework/MDAlgorithms/src/MDTransfAxisNames.cpp b/Framework/MDAlgorithms/src/MDTransfAxisNames.cpp index e6c81b4e468a05ce6294d72b49c370ec178ec846..f43d5c12c446de9c20349cbac2551013035dee53 100644 --- a/Framework/MDAlgorithms/src/MDTransfAxisNames.cpp +++ b/Framework/MDAlgorithms/src/MDTransfAxisNames.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/MDTransfAxisNames.h" #include <boost/format.hpp> diff --git a/Framework/MDAlgorithms/src/MDTransfFactory.cpp b/Framework/MDAlgorithms/src/MDTransfFactory.cpp index 7e9bd521c13961e1b7a72a55b83b7c976a004a64..928b40b77106fac66c21d019894797bd5f2f045e 100644 --- a/Framework/MDAlgorithms/src/MDTransfFactory.cpp +++ b/Framework/MDAlgorithms/src/MDTransfFactory.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/MDTransfFactory.h" diff --git a/Framework/MDAlgorithms/src/MDTransfModQ.cpp b/Framework/MDAlgorithms/src/MDTransfModQ.cpp index 855559c1f6523d083647359044380c222217a6fa..286e993288047cffacb129496a9b7ffda29d9e5a 100644 --- a/Framework/MDAlgorithms/src/MDTransfModQ.cpp +++ b/Framework/MDAlgorithms/src/MDTransfModQ.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/MDTransfModQ.h" #include "MantidKernel/RegistrationHelper.h" diff --git a/Framework/MDAlgorithms/src/MDTransfNoQ.cpp b/Framework/MDAlgorithms/src/MDTransfNoQ.cpp index 45ebf6e603086a1cee44a3e949d2fc5388090f93..146d8188cbc1ab39a473259bff72114f90f1491b 100644 --- a/Framework/MDAlgorithms/src/MDTransfNoQ.cpp +++ b/Framework/MDAlgorithms/src/MDTransfNoQ.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/MDTransfNoQ.h" #include "MantidKernel/Unit.h" @@ -119,7 +119,7 @@ MDTransfNoQ::getNMatrixDimensions(Kernel::DeltaEMode::Type mode, } // internal helper function which extract one or two axis from input matrix // workspace; -void MDTransfNoQ::getAxes(API::MatrixWorkspace_const_sptr inWS, +void MDTransfNoQ::getAxes(const API::MatrixWorkspace_const_sptr &inWS, API::NumericAxis *&pXAxis, API::NumericAxis *&pYAxis) { // get the X axis of input workspace, it has to be there; if not axis throws diff --git a/Framework/MDAlgorithms/src/MDTransfQ3D.cpp b/Framework/MDAlgorithms/src/MDTransfQ3D.cpp index 124fb981074c5a5cd3b2419547f0231b831c3562..fb1495d64dff1d167cbc4c3729cedbdea1363945 100644 --- a/Framework/MDAlgorithms/src/MDTransfQ3D.cpp +++ b/Framework/MDAlgorithms/src/MDTransfQ3D.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/MDTransfQ3D.h" #include "MantidKernel/ConfigService.h" diff --git a/Framework/MDAlgorithms/src/MDWSDescription.cpp b/Framework/MDAlgorithms/src/MDWSDescription.cpp index e4be123225d102c842b10acf9cdacf1bc273e9e1..aecd160aff605199cdce500ebb3ca9b46d49a6cb 100644 --- a/Framework/MDAlgorithms/src/MDWSDescription.cpp +++ b/Framework/MDAlgorithms/src/MDWSDescription.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/MDWSDescription.h" @@ -20,6 +20,7 @@ #include "MantidMDAlgorithms/MDTransfFactory.h" #include <boost/lexical_cast.hpp> +#include <utility> namespace Mantid { namespace MDAlgorithms { @@ -67,7 +68,7 @@ which will be used as dimensions. */ void MDWSDescription::buildFromMatrixWS( const API::MatrixWorkspace_sptr &pWS, const std::string &QMode, - const std::string dEMode, + const std::string &dEMode, const std::vector<std::string> &dimPropertyNames) { m_InWS = pWS; // fill additional dimensions values, defined by workspace properties; @@ -125,7 +126,7 @@ void MDWSDescription::buildFromMatrixWS( } void MDWSDescription::setWS(API::MatrixWorkspace_sptr otherMatrixWS) { - m_InWS = otherMatrixWS; + m_InWS = std::move(otherMatrixWS); } /// Method checks if input workspace has defined goniometer bool MDWSDescription::hasGoniometer() const { @@ -349,7 +350,7 @@ std::string MDWSDescription::getEModeStr() const { *properties) for current multidimensional event */ void MDWSDescription::fillAddProperties( - Mantid::API::MatrixWorkspace_const_sptr inWS2D, + const Mantid::API::MatrixWorkspace_const_sptr &inWS2D, const std::vector<std::string> &dimPropertyNames, std::vector<coord_t> &AddCoord) { size_t nDimPropNames = dimPropertyNames.size(); @@ -400,7 +401,7 @@ void MDWSDescription::checkMinMaxNdimConsistent( /** function retrieves copy of the oriented lattice from the workspace */ boost::shared_ptr<Geometry::OrientedLattice> MDWSDescription::getOrientedLattice( - Mantid::API::MatrixWorkspace_const_sptr inWS2D) { + const Mantid::API::MatrixWorkspace_const_sptr &inWS2D) { // try to get the WS oriented lattice boost::shared_ptr<Geometry::OrientedLattice> orl; if (inWS2D->sample().hasOrientedLattice()) @@ -432,7 +433,7 @@ Geometry::MDFrame_uptr MDWSDescription::getFrame(size_t d) const { * Sets the frame. * @param frameKey : Frame key desired. */ -void MDWSDescription::setFrame(const std::string frameKey) { +void MDWSDescription::setFrame(const std::string &frameKey) { m_frameKey = frameKey; } diff --git a/Framework/MDAlgorithms/src/MDWSTransform.cpp b/Framework/MDAlgorithms/src/MDWSTransform.cpp index c9301b47d56ffdcd85c174b766a0b26db6e574fc..f296c28974aeb909615db596d40264434b9f6c87 100644 --- a/Framework/MDAlgorithms/src/MDWSTransform.cpp +++ b/Framework/MDAlgorithms/src/MDWSTransform.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/MDWSTransform.h" diff --git a/Framework/MDAlgorithms/src/MaskMD.cpp b/Framework/MDAlgorithms/src/MaskMD.cpp index a448986a6edbda5f73e900d296f4d4c20cf9277d..7dd1249f4dcee998233373b53e6040d9507a8ada 100644 --- a/Framework/MDAlgorithms/src/MaskMD.cpp +++ b/Framework/MDAlgorithms/src/MaskMD.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/MaskMD.h" #include "MantidAPI/IMDWorkspace.h" @@ -116,7 +116,7 @@ workspace. @throws runtime_error if the requested dimension is unknown either by id, or by name in the workspace. */ -size_t tryFetchDimensionIndex(Mantid::API::IMDWorkspace_sptr ws, +size_t tryFetchDimensionIndex(const Mantid::API::IMDWorkspace_sptr &ws, const std::string &candidateNameOrId) { size_t dimWorkspaceIndex; try { diff --git a/Framework/MDAlgorithms/src/MergeMD.cpp b/Framework/MDAlgorithms/src/MergeMD.cpp index df05e02041b66616b8879943b88989d9c63f6350..168cb6ca9847ec07f607d6948843e512ef0be367 100644 --- a/Framework/MDAlgorithms/src/MergeMD.cpp +++ b/Framework/MDAlgorithms/src/MergeMD.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/MergeMD.h" #include "MantidAPI/WorkspaceGroup.h" diff --git a/Framework/MDAlgorithms/src/MergeMDFiles.cpp b/Framework/MDAlgorithms/src/MergeMDFiles.cpp index 11ee745bf04543fffe46710fe38768eb4ab35901..74c9a3836f7994d2cf37439275d6603971317acd 100644 --- a/Framework/MDAlgorithms/src/MergeMDFiles.cpp +++ b/Framework/MDAlgorithms/src/MergeMDFiles.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/MergeMDFiles.h" #include "MantidAPI/FileProperty.h" @@ -197,8 +197,9 @@ uint64_t MergeMDFiles::loadEventsFromSubBoxes(API::IMDNode *TargetBox) { * @param outputFile :: the name of the output file where file-based workspace *should be saved */ -void MergeMDFiles::doExecByCloning(Mantid::API::IMDEventWorkspace_sptr ws, - const std::string &outputFile) { +void MergeMDFiles::doExecByCloning( + const Mantid::API::IMDEventWorkspace_sptr &ws, + const std::string &outputFile) { m_OutIWS = ws; m_MDEventType = ws->getEventTypeName(); diff --git a/Framework/MDAlgorithms/src/MinusMD.cpp b/Framework/MDAlgorithms/src/MinusMD.cpp index bd8f14b6f8a5328f37adda8f765c728c83a075a4..f5120d95a9b098ab72831871e786fdc23e525256 100644 --- a/Framework/MDAlgorithms/src/MinusMD.cpp +++ b/Framework/MDAlgorithms/src/MinusMD.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/MinusMD.h" #include "MantidDataObjects/MDBox.h" diff --git a/Framework/MDAlgorithms/src/MultiplyMD.cpp b/Framework/MDAlgorithms/src/MultiplyMD.cpp index 2971bb4ff60bc5198994f8428dbdd06ad4b5e7a2..a6c858e55d1239f514dcdbefa895782853d13258 100644 --- a/Framework/MDAlgorithms/src/MultiplyMD.cpp +++ b/Framework/MDAlgorithms/src/MultiplyMD.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/MultiplyMD.h" #include "MantidDataObjects/MDBox.h" diff --git a/Framework/MDAlgorithms/src/NotMD.cpp b/Framework/MDAlgorithms/src/NotMD.cpp index 966777f3e0adb0c7bb1f37820de1b70227896b47..92ac4bc65c1d430a950bd6d14c25a578e019594d 100644 --- a/Framework/MDAlgorithms/src/NotMD.cpp +++ b/Framework/MDAlgorithms/src/NotMD.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/NotMD.h" #include "MantidKernel/System.h" diff --git a/Framework/MDAlgorithms/src/OneStepMDEW.cpp b/Framework/MDAlgorithms/src/OneStepMDEW.cpp index 1d75b779a8441e0338689888dd6e1ab27416af07..b0783d707385486e9d1aabb399441ee801f91978 100644 --- a/Framework/MDAlgorithms/src/OneStepMDEW.cpp +++ b/Framework/MDAlgorithms/src/OneStepMDEW.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/OneStepMDEW.h" #include "MantidAPI/FileProperty.h" diff --git a/Framework/MDAlgorithms/src/OrMD.cpp b/Framework/MDAlgorithms/src/OrMD.cpp index 6f6e7da628efc279cb214a297a6430e028986f2d..402ae4c91aa13e8307f21773aeff2dbe724c8ca7 100644 --- a/Framework/MDAlgorithms/src/OrMD.cpp +++ b/Framework/MDAlgorithms/src/OrMD.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/OrMD.h" #include "MantidKernel/System.h" diff --git a/Framework/MDAlgorithms/src/PlusMD.cpp b/Framework/MDAlgorithms/src/PlusMD.cpp index d64d88da8f66d045dd1eaf486a5c75e2dc0cedb6..7317a28c96fcb4864d155aa81181526a947a5e25 100644 --- a/Framework/MDAlgorithms/src/PlusMD.cpp +++ b/Framework/MDAlgorithms/src/PlusMD.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/PlusMD.h" #include "MantidAPI/IMDEventWorkspace.h" diff --git a/Framework/MDAlgorithms/src/PowerMD.cpp b/Framework/MDAlgorithms/src/PowerMD.cpp index 3bde8731ab542d9edbd658a9a869f9c3a5df6a28..fc1d1bb9421eae247f5efb6d49f1dc636a6568ed 100644 --- a/Framework/MDAlgorithms/src/PowerMD.cpp +++ b/Framework/MDAlgorithms/src/PowerMD.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/PowerMD.h" #include "MantidKernel/System.h" diff --git a/Framework/MDAlgorithms/src/PreprocessDetectorsToMD.cpp b/Framework/MDAlgorithms/src/PreprocessDetectorsToMD.cpp index 7b447668462a60a587feeed77d73beb50cb2e2da..e8d6dc38f3b9d68ecf3d3eff61860130977fc7aa 100644 --- a/Framework/MDAlgorithms/src/PreprocessDetectorsToMD.cpp +++ b/Framework/MDAlgorithms/src/PreprocessDetectorsToMD.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/PreprocessDetectorsToMD.h" #include "MantidAPI/AnalysisDataService.h" @@ -399,7 +399,7 @@ void PreprocessDetectorsToMD::buildFakeDetectorsPositions( /// function checks if source workspace still has information about detectors. /// Some ws (like rebinned one) do not have this information any more. bool PreprocessDetectorsToMD::isDetInfoLost( - Mantid::API::MatrixWorkspace_const_sptr inWS2D) const { + const Mantid::API::MatrixWorkspace_const_sptr &inWS2D) const { auto pYAxis = dynamic_cast<API::NumericAxis *>(inWS2D->getAxis(1)); // if this is numeric axis, then the detector's information has been lost: return pYAxis != nullptr; diff --git a/Framework/MDAlgorithms/src/QueryMDWorkspace.cpp b/Framework/MDAlgorithms/src/QueryMDWorkspace.cpp index 1f06a5d5ff66037762a5919c3ecfbe2c3a3815b3..b157503abb32a23500dcbd3d82de0048685352f4 100644 --- a/Framework/MDAlgorithms/src/QueryMDWorkspace.cpp +++ b/Framework/MDAlgorithms/src/QueryMDWorkspace.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/QueryMDWorkspace.h" diff --git a/Framework/MDAlgorithms/src/RecalculateTrajectoriesExtents.cpp b/Framework/MDAlgorithms/src/RecalculateTrajectoriesExtents.cpp index b817f5dbc7cadb456bb71cc6e6639ffe7124a0d2..8f187de05181e39e141565a50d388634688a841c 100644 --- a/Framework/MDAlgorithms/src/RecalculateTrajectoriesExtents.cpp +++ b/Framework/MDAlgorithms/src/RecalculateTrajectoriesExtents.cpp @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #include "MantidMDAlgorithms/RecalculateTrajectoriesExtents.h" #include "MantidAPI/IMDEventWorkspace.h" #include "MantidAPI/Run.h" diff --git a/Framework/MDAlgorithms/src/ReflectometryTransformKiKf.cpp b/Framework/MDAlgorithms/src/ReflectometryTransformKiKf.cpp index e4c883457df3241c0938af6e78f4260e5428e5ed..ddc17c38eb3ecb8ece4bd763fcac997bd9cd0ce5 100644 --- a/Framework/MDAlgorithms/src/ReflectometryTransformKiKf.cpp +++ b/Framework/MDAlgorithms/src/ReflectometryTransformKiKf.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/ReflectometryTransformKiKf.h" diff --git a/Framework/MDAlgorithms/src/ReflectometryTransformP.cpp b/Framework/MDAlgorithms/src/ReflectometryTransformP.cpp index f4f5ba9917bdda5f0b5cd9a7647502f7a831b845..101913250d483415f529cd405499a40fb0ca1d10 100644 --- a/Framework/MDAlgorithms/src/ReflectometryTransformP.cpp +++ b/Framework/MDAlgorithms/src/ReflectometryTransformP.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/ReflectometryTransformP.h" using namespace Mantid::DataObjects; diff --git a/Framework/MDAlgorithms/src/ReflectometryTransformQxQz.cpp b/Framework/MDAlgorithms/src/ReflectometryTransformQxQz.cpp index ec1b68e03fae715ee86cde15825f7672cbc190bd..02e0ae7db0874f51b0fc0fbedd791314a846bf8c 100644 --- a/Framework/MDAlgorithms/src/ReflectometryTransformQxQz.cpp +++ b/Framework/MDAlgorithms/src/ReflectometryTransformQxQz.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/ReflectometryTransformQxQz.h" diff --git a/Framework/MDAlgorithms/src/ReplicateMD.cpp b/Framework/MDAlgorithms/src/ReplicateMD.cpp index 61baa812ae2e74c1d56118fc4bcff508a4e0d9ea..0d42d0167dce8ff740dbe06f9f920de65ea6b1c6 100644 --- a/Framework/MDAlgorithms/src/ReplicateMD.cpp +++ b/Framework/MDAlgorithms/src/ReplicateMD.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/ReplicateMD.h" #include "MantidAPI/FrameworkManager.h" diff --git a/Framework/MDAlgorithms/src/SaveIsawQvector.cpp b/Framework/MDAlgorithms/src/SaveIsawQvector.cpp index 15f5a8b4e568ade2a4434ee1107eb2627ed4d6a8..a4a5fb82ab42e821964b280690ce77f0445bb029 100644 --- a/Framework/MDAlgorithms/src/SaveIsawQvector.cpp +++ b/Framework/MDAlgorithms/src/SaveIsawQvector.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/SaveIsawQvector.h" @@ -194,7 +194,7 @@ void SaveIsawQvector::exec() { * * @param wksp The workspace to get information from. */ -void SaveIsawQvector::initTargetWSDescr(EventWorkspace_sptr wksp) { +void SaveIsawQvector::initTargetWSDescr(const EventWorkspace_sptr &wksp) { m_targWSDescr.setMinMax(std::vector<double>(3, -2000.), std::vector<double>(3, 2000.)); m_targWSDescr.buildFromMatrixWS(wksp, Q3D, ELASTIC); diff --git a/Framework/MDAlgorithms/src/SaveMD.cpp b/Framework/MDAlgorithms/src/SaveMD.cpp index 422bf81f4d0462e12bbad7bf2bf22c4002fccec8..8f9fd29e434b3aa011b508ad4c33f7ed974d128c 100644 --- a/Framework/MDAlgorithms/src/SaveMD.cpp +++ b/Framework/MDAlgorithms/src/SaveMD.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/SaveMD.h" #include "MantidAPI/CoordTransform.h" @@ -33,7 +33,7 @@ namespace { template <typename MDE, size_t nd> void prepareUpdate(MDBoxFlatTree &BoxFlatStruct, BoxController *bc, typename MDEventWorkspace<MDE, nd>::sptr ws, - std::string filename) { + const std::string &filename) { // remove all boxes from the DiskBuffer. DB will calculate boxes positions // on HDD. bc->getFileIO()->flushCache(); @@ -236,7 +236,7 @@ void SaveMD::doSaveEvents(typename MDEventWorkspace<MDE, nd>::sptr ws) { * * @param ws :: MDHistoWorkspace to save */ -void SaveMD::doSaveHisto(Mantid::DataObjects::MDHistoWorkspace_sptr ws) { +void SaveMD::doSaveHisto(const Mantid::DataObjects::MDHistoWorkspace_sptr &ws) { std::string filename = getPropertyValue("Filename"); // Erase the file if it exists diff --git a/Framework/MDAlgorithms/src/SaveMD2.cpp b/Framework/MDAlgorithms/src/SaveMD2.cpp index 7b50c62f8f50a5eacd9a0b5819cd69a6a0486eeb..1bafc3309dd899b8ea6688ebeba50b639568d4d0 100644 --- a/Framework/MDAlgorithms/src/SaveMD2.cpp +++ b/Framework/MDAlgorithms/src/SaveMD2.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/SaveMD2.h" #include "MantidAPI/CoordTransform.h" @@ -88,7 +88,8 @@ void SaveMD2::init() { * * @param ws :: MDHistoWorkspace to save */ -void SaveMD2::doSaveHisto(Mantid::DataObjects::MDHistoWorkspace_sptr ws) { +void SaveMD2::doSaveHisto( + const Mantid::DataObjects::MDHistoWorkspace_sptr &ws) { std::string filename = getPropertyValue("Filename"); // Erase the file if it exists diff --git a/Framework/MDAlgorithms/src/SaveZODS.cpp b/Framework/MDAlgorithms/src/SaveZODS.cpp index 2e23f43045da4689913ef86de718de64633d323b..6d773aec75db2dfda6ed2fd4aa0f724f6f0734c2 100644 --- a/Framework/MDAlgorithms/src/SaveZODS.cpp +++ b/Framework/MDAlgorithms/src/SaveZODS.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/SaveZODS.h" #include "MantidAPI/FileProperty.h" diff --git a/Framework/MDAlgorithms/src/SetMDFrame.cpp b/Framework/MDAlgorithms/src/SetMDFrame.cpp index 33d34669d1a9a754ac922e7b1073f4a304acfef0..394e3f32a512439614f93121a929b712f16524c2 100644 --- a/Framework/MDAlgorithms/src/SetMDFrame.cpp +++ b/Framework/MDAlgorithms/src/SetMDFrame.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/SetMDFrame.h" #include "MantidAPI/IMDEventWorkspace.h" diff --git a/Framework/MDAlgorithms/src/SetMDUsingMask.cpp b/Framework/MDAlgorithms/src/SetMDUsingMask.cpp index b5888181e6d3cb8368718836bcb338286303c736..ae839c99aa4ab1ae107479c64f3edb6fc0ccb611 100644 --- a/Framework/MDAlgorithms/src/SetMDUsingMask.cpp +++ b/Framework/MDAlgorithms/src/SetMDUsingMask.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/SetMDUsingMask.h" #include "MantidAPI/IMDHistoWorkspace.h" diff --git a/Framework/MDAlgorithms/src/SliceMD.cpp b/Framework/MDAlgorithms/src/SliceMD.cpp index 29b1129fd1d97e783f1c5262493adf6cd29a60ca..b72caacc6b60044b7f007e74c05c0b00e157193c 100644 --- a/Framework/MDAlgorithms/src/SliceMD.cpp +++ b/Framework/MDAlgorithms/src/SliceMD.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/SliceMD.h" #include "MantidAPI/FileProperty.h" diff --git a/Framework/MDAlgorithms/src/SlicingAlgorithm.cpp b/Framework/MDAlgorithms/src/SlicingAlgorithm.cpp index f8d4c2c5c9b2678c4f9750e847e8f9ea2f0bdb56..d8b8a17c5b6b876dae4b2734be177b210104ac89 100644 --- a/Framework/MDAlgorithms/src/SlicingAlgorithm.cpp +++ b/Framework/MDAlgorithms/src/SlicingAlgorithm.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/SlicingAlgorithm.h" #include "MantidAPI/Run.h" @@ -19,6 +19,7 @@ #include "MantidKernel/VisibleWhenProperty.h" #include <boost/regex.hpp> +#include <utility> using namespace Mantid::Kernel; using namespace Mantid::API; @@ -903,7 +904,7 @@ SlicingAlgorithm::getImplicitFunctionForChunk(const size_t *const chunkMin, * @returns the unique pointer */ Mantid::Geometry::MDFrame_uptr SlicingAlgorithm::createMDFrameForNonAxisAligned( - std::string units, Mantid::Kernel::VMD basisVector) const { + const std::string &units, const Mantid::Kernel::VMD &basisVector) const { // Get set of basis vectors auto oldBasis = getOldBasis(m_inWS->getNumDims()); @@ -911,7 +912,8 @@ Mantid::Geometry::MDFrame_uptr SlicingAlgorithm::createMDFrameForNonAxisAligned( auto indicesWithProjection = getIndicesWithProjection(basisVector, oldBasis); // Extract MDFrame - return extractMDFrameForNonAxisAligned(indicesWithProjection, units); + return extractMDFrameForNonAxisAligned(indicesWithProjection, + std::move(units)); } std::vector<Mantid::Kernel::VMD> @@ -964,7 +966,7 @@ std::vector<size_t> SlicingAlgorithm::getIndicesWithProjection( */ Mantid::Geometry::MDFrame_uptr SlicingAlgorithm::extractMDFrameForNonAxisAligned( - std::vector<size_t> indicesWithProjection, std::string units) const { + std::vector<size_t> indicesWithProjection, const std::string &units) const { if (indicesWithProjection.empty()) { g_log.warning() << "Slicing Algorithm: Chosen vector does not " "project on any vector of the old basis."; diff --git a/Framework/MDAlgorithms/src/SmoothMD.cpp b/Framework/MDAlgorithms/src/SmoothMD.cpp index f31fc9b04f891d3bf311500b824666471a38bc78..e7409a0de4cf588389c63592844925a61dd64c4f 100644 --- a/Framework/MDAlgorithms/src/SmoothMD.cpp +++ b/Framework/MDAlgorithms/src/SmoothMD.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/SmoothMD.h" #include "MantidAPI/FrameworkManager.h" @@ -175,7 +175,7 @@ const std::string SmoothMD::summary() const { * @return Smoothed MDHistoWorkspace */ IMDHistoWorkspace_sptr -SmoothMD::hatSmooth(IMDHistoWorkspace_const_sptr toSmooth, +SmoothMD::hatSmooth(const IMDHistoWorkspace_const_sptr &toSmooth, const WidthVector &widthVector, OptionalIMDHistoWorkspace_const_sptr weightingWS) { @@ -278,7 +278,7 @@ SmoothMD::hatSmooth(IMDHistoWorkspace_const_sptr toSmooth, * @return Smoothed MDHistoWorkspace */ IMDHistoWorkspace_sptr -SmoothMD::gaussianSmooth(IMDHistoWorkspace_const_sptr toSmooth, +SmoothMD::gaussianSmooth(const IMDHistoWorkspace_const_sptr &toSmooth, const WidthVector &widthVector, OptionalIMDHistoWorkspace_const_sptr weightingWS) { diff --git a/Framework/MDAlgorithms/src/ThresholdMD.cpp b/Framework/MDAlgorithms/src/ThresholdMD.cpp index 79dae015e69b07575917e189309beb835d83b76a..ba2c83b3a754914e575900bba972db46b2114cc4 100644 --- a/Framework/MDAlgorithms/src/ThresholdMD.cpp +++ b/Framework/MDAlgorithms/src/ThresholdMD.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/ThresholdMD.h" #include "MantidAPI/Progress.h" diff --git a/Framework/MDAlgorithms/src/TransformMD.cpp b/Framework/MDAlgorithms/src/TransformMD.cpp index e3a59c07c2bb00d8096157692c8cff9fabe51984..f7d506ffae1a1fbdc3a89da3f21322320a4e30fc 100644 --- a/Framework/MDAlgorithms/src/TransformMD.cpp +++ b/Framework/MDAlgorithms/src/TransformMD.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/TransformMD.h" #include "MantidAPI/AnalysisDataService.h" diff --git a/Framework/MDAlgorithms/src/TransposeMD.cpp b/Framework/MDAlgorithms/src/TransposeMD.cpp index 6a47c554ad35d23a1ecdfede5bedfad793955100..2cefbdca0fd3b14b81902f16ffc71beb47a5ace1 100644 --- a/Framework/MDAlgorithms/src/TransposeMD.cpp +++ b/Framework/MDAlgorithms/src/TransposeMD.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/TransposeMD.h" #include "MantidAPI/FrameworkManager.h" diff --git a/Framework/MDAlgorithms/src/UnaryOperationMD.cpp b/Framework/MDAlgorithms/src/UnaryOperationMD.cpp index 0c89966729145adb4575eb80b1f2030dd091b162..02ad5d5f2512a7d444364e77e38babaed3819238 100644 --- a/Framework/MDAlgorithms/src/UnaryOperationMD.cpp +++ b/Framework/MDAlgorithms/src/UnaryOperationMD.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/UnaryOperationMD.h" #include "MantidAPI/IMDEventWorkspace.h" diff --git a/Framework/MDAlgorithms/src/UnitsConversionHelper.cpp b/Framework/MDAlgorithms/src/UnitsConversionHelper.cpp index ff22c6bef5b559bea8165118694103c602adc2c2..a327a4b6223f0108c065695c566aac0b91ec46a6 100644 --- a/Framework/MDAlgorithms/src/UnitsConversionHelper.cpp +++ b/Framework/MDAlgorithms/src/UnitsConversionHelper.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/UnitsConversionHelper.h" #include "MantidAPI/NumericAxis.h" diff --git a/Framework/MDAlgorithms/src/UserFunctionMD.cpp b/Framework/MDAlgorithms/src/UserFunctionMD.cpp index ee800c1f4ff922983801d00d4ecccd168abff143..478c2a2b5a9d43107c3026d8177ee7709a1f6897 100644 --- a/Framework/MDAlgorithms/src/UserFunctionMD.cpp +++ b/Framework/MDAlgorithms/src/UserFunctionMD.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/MDAlgorithms/src/WeightedMeanMD.cpp b/Framework/MDAlgorithms/src/WeightedMeanMD.cpp index 79a971c4e4961e2a806ba52b031b4e49f86483bd..de5f429c34a04a30657949850c1fdf363eed02d2 100644 --- a/Framework/MDAlgorithms/src/WeightedMeanMD.cpp +++ b/Framework/MDAlgorithms/src/WeightedMeanMD.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/WeightedMeanMD.h" #include "MantidDataObjects/MDHistoWorkspaceIterator.h" diff --git a/Framework/MDAlgorithms/src/XorMD.cpp b/Framework/MDAlgorithms/src/XorMD.cpp index b1230a84a0f9a24faad6b681ce685d1e819844ea..bd43a847b3b2cb9d8d4d0ceeeddec3540cec3314 100644 --- a/Framework/MDAlgorithms/src/XorMD.cpp +++ b/Framework/MDAlgorithms/src/XorMD.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/XorMD.h" #include "MantidKernel/System.h" diff --git a/Framework/MDAlgorithms/test/AccumulateMDTest.h b/Framework/MDAlgorithms/test/AccumulateMDTest.h index 4fe6ad8982b799e8babd818182755208bde0e161..680b28ad2bcef0f00270e090afe6135a8413709f 100644 --- a/Framework/MDAlgorithms/test/AccumulateMDTest.h +++ b/Framework/MDAlgorithms/test/AccumulateMDTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/test/AndMDTest.h b/Framework/MDAlgorithms/test/AndMDTest.h index f2357c40b7b12e1516d0fe65c1a7da7ed9f5f321..dea9cb02752f5032992bd77e4c3cf6d2d22ebd25 100644 --- a/Framework/MDAlgorithms/test/AndMDTest.h +++ b/Framework/MDAlgorithms/test/AndMDTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/test/BinMDTest.h b/Framework/MDAlgorithms/test/BinMDTest.h index ab663f6e6b0f59de3f4dda71e439e8994a28096e..4cf15306a9217b3ca62227049d7d9ab7372cfb5a 100644 --- a/Framework/MDAlgorithms/test/BinMDTest.h +++ b/Framework/MDAlgorithms/test/BinMDTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -26,6 +26,7 @@ #include "MantidTestHelpers/MDEventsTestHelper.h" #include <cmath> +#include <utility> #include <cxxtest/TestSuite.h> @@ -132,8 +133,9 @@ public: AnalysisDataService::Instance().addOrReplace("BinMDTest_ws", in_ws); execute_bin(functionXML, name1, name2, name3, name4, expected_signal, - expected_numBins, IterateEvents, numEventsPerBox, expectBasisX, - expectBasisY, expectBasisZ, in_ws); + expected_numBins, IterateEvents, numEventsPerBox, + std::move(expectBasisX), std::move(expectBasisY), + std::move(expectBasisZ), in_ws); } MDHistoWorkspace_sptr @@ -142,7 +144,7 @@ public: const std::string &name4, const double expected_signal, const size_t expected_numBins, bool IterateEvents, size_t numEventsPerBox, VMD expectBasisX, VMD expectBasisY, - VMD expectBasisZ, IMDEventWorkspace_sptr in_ws) { + VMD expectBasisZ, const IMDEventWorkspace_sptr &in_ws) { BinMD alg; TS_ASSERT_THROWS_NOTHING(alg.initialize()) TS_ASSERT(alg.isInitialized()) @@ -584,9 +586,9 @@ public: * @param origWS :: both should have this as its originalWorkspace * @return binned2 shared pointer */ - MDHistoWorkspace_sptr do_compare_histo(std::string binned1Name, - std::string binned2Name, - std::string origWS) { + MDHistoWorkspace_sptr do_compare_histo(const std::string &binned1Name, + const std::string &binned2Name, + const std::string &origWS) { MDHistoWorkspace_sptr binned1 = AnalysisDataService::Instance().retrieveWS<MDHistoWorkspace>( binned1Name); @@ -1078,7 +1080,7 @@ public: return outWSName; } - std::string saveWorkspace(IMDEventWorkspace_sptr in_ws) { + std::string saveWorkspace(const IMDEventWorkspace_sptr &in_ws) { SaveMD2 saver; saver.setChild(true); saver.setRethrows(true); @@ -1128,7 +1130,7 @@ public: AnalysisDataService::Instance().remove("BinMDTest_ws"); } - void do_test(std::string binParams, bool IterateEvents) { + void do_test(const std::string &binParams, bool IterateEvents) { BinMD alg; TS_ASSERT_THROWS_NOTHING(alg.initialize()) TS_ASSERT(alg.isInitialized()) diff --git a/Framework/MDAlgorithms/test/BinaryOperationMDTest.h b/Framework/MDAlgorithms/test/BinaryOperationMDTest.h index bd661f816a61bfd838da5bb0320bf13535a7d273..8b21a38ab82953901622057481deb8bec75cd720 100644 --- a/Framework/MDAlgorithms/test/BinaryOperationMDTest.h +++ b/Framework/MDAlgorithms/test/BinaryOperationMDTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -95,8 +95,9 @@ public: } /// Run the mock algorithm - void doTest(MockBinaryOperationMD &alg, std::string lhs, std::string rhs, - std::string outName, bool succeeds = true) { + void doTest(MockBinaryOperationMD &alg, const std::string &lhs, + const std::string &rhs, const std::string &outName, + bool succeeds = true) { out.reset(); TS_ASSERT_THROWS_NOTHING(alg.initialize()) TS_ASSERT(alg.isInitialized()) diff --git a/Framework/MDAlgorithms/test/BooleanBinaryOperationMDTest.h b/Framework/MDAlgorithms/test/BooleanBinaryOperationMDTest.h index a4a79e3735222e69dd63a06abf35d4eb68cf3eeb..713c0045173cf1d01f6b71de6474e84e21e0c4ea 100644 --- a/Framework/MDAlgorithms/test/BooleanBinaryOperationMDTest.h +++ b/Framework/MDAlgorithms/test/BooleanBinaryOperationMDTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/test/BoxControllerSettingsAlgorithmTest.h b/Framework/MDAlgorithms/test/BoxControllerSettingsAlgorithmTest.h index c9196ca3ba5add4e6d9cc13fe47526007f025121..135c89af5537ffb88f9ff5121a82123670c944f1 100644 --- a/Framework/MDAlgorithms/test/BoxControllerSettingsAlgorithmTest.h +++ b/Framework/MDAlgorithms/test/BoxControllerSettingsAlgorithmTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -14,6 +14,7 @@ #include "MantidTestHelpers/WorkspaceCreationHelper.h" #include <boost/format.hpp> +#include <utility> #include <cxxtest/TestSuite.h> @@ -47,8 +48,9 @@ private: Helper function. Runs LoadParameterAlg, to get an instrument parameter definition from a file onto a workspace. */ - void apply_instrument_parameter_file_to_workspace(MatrixWorkspace_sptr ws, - const ScopedFile &file) { + void + apply_instrument_parameter_file_to_workspace(const MatrixWorkspace_sptr &ws, + const ScopedFile &file) { // Load the Instrument Parameter file over the existing test workspace + // instrument. using DataHandling::LoadParameterFile; @@ -119,9 +121,9 @@ public: TS_ASSERT_EQUALS(bc->getMaxDepth(), 34); } - void doTest(BoxController_sptr bc, std::string SplitInto = "", - std::string SplitThreshold = "", - std::string MaxRecursionDepth = "") { + void doTest(const BoxController_sptr &bc, const std::string &SplitInto = "", + const std::string &SplitThreshold = "", + const std::string &MaxRecursionDepth = "") { BoxControllerSettingsAlgorithmImpl alg; alg.initBoxControllerProps(); if (!SplitInto.empty()) @@ -130,7 +132,7 @@ public: alg.setPropertyValue("SplitThreshold", SplitThreshold); if (!MaxRecursionDepth.empty()) alg.setPropertyValue("MaxRecursionDepth", MaxRecursionDepth); - alg.setBoxController(bc); + alg.setBoxController(std::move(bc)); } void test_SplitInto() { diff --git a/Framework/MDAlgorithms/test/CMakeLists.txt b/Framework/MDAlgorithms/test/CMakeLists.txt index f5a433c4e90e71d26218cbcda3939f74156fc9b8..9240689a359f95cf5cc6416bd9e740ae2d6098d9 100644 --- a/Framework/MDAlgorithms/test/CMakeLists.txt +++ b/Framework/MDAlgorithms/test/CMakeLists.txt @@ -1,8 +1,6 @@ if(CXXTEST_FOUND) include_directories(SYSTEM ${CXXTEST_INCLUDE_DIR} - ${GMOCK_INCLUDE_DIR} - ${GTEST_INCLUDE_DIR} ${HDF5_INCLUDE_DIRS}) include_directories(../../TestHelpers/inc ../../DataHandling/inc @@ -31,8 +29,7 @@ if(CXXTEST_FOUND) MDAlgorithms Nexus ${MUPARSER_LIBRARIES} - ${GMOCK_LIBRARIES} - ${GTEST_LIBRARIES} + gmock ${NEXUS_LIBRARIES} ${HDF5_LIBRARIES}) diff --git a/Framework/MDAlgorithms/test/CalculateCoverageDGSTest.h b/Framework/MDAlgorithms/test/CalculateCoverageDGSTest.h index a63ece561cf716c251fca023d5103c3f45cfdff8..ce5d6a89e02bf3b7b1f92daa6a7feba063ddf5cb 100644 --- a/Framework/MDAlgorithms/test/CalculateCoverageDGSTest.h +++ b/Framework/MDAlgorithms/test/CalculateCoverageDGSTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/test/CentroidPeaksMD2Test.h b/Framework/MDAlgorithms/test/CentroidPeaksMD2Test.h index 705da5a821cd226aefce114141dac2b447bc271a..843b77ece157848917fbf4f6cc3311c216b3cd31 100644 --- a/Framework/MDAlgorithms/test/CentroidPeaksMD2Test.h +++ b/Framework/MDAlgorithms/test/CentroidPeaksMD2Test.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -43,7 +43,7 @@ public: //------------------------------------------------------------------------------- /** Create the (blank) MDEW */ - static void createMDEW(std::string CoordinatesToUse) { + static void createMDEW(const std::string &CoordinatesToUse) { // ---- Start with empty MDEW ---- std::string frames; if (CoordinatesToUse == "Q (lab frame)") { @@ -98,9 +98,10 @@ public: //------------------------------------------------------------------------------- /** Run the CentroidPeaksMD2 with the given peak radius param */ - void doRun(V3D startPos, double PeakRadius, double binCount, - V3D expectedResult, std::string message, - std::string OutputWorkspace = "CentroidPeaksMD2Test_Peaks") { + void + doRun(V3D startPos, double PeakRadius, double binCount, V3D expectedResult, + const std::string &message, + const std::string &OutputWorkspace = "CentroidPeaksMD2Test_Peaks") { // Make a fake instrument - doesn't matter, we won't use it really Instrument_sptr inst = ComponentCreationHelper::createTestInstrumentCylindrical(5); diff --git a/Framework/MDAlgorithms/test/CentroidPeaksMDTest.h b/Framework/MDAlgorithms/test/CentroidPeaksMDTest.h index 81ad55ad17661dca9913a7997d930692a9b16f35..2694382ce73feeee3cbd088e3240e8bc265bcce9 100644 --- a/Framework/MDAlgorithms/test/CentroidPeaksMDTest.h +++ b/Framework/MDAlgorithms/test/CentroidPeaksMDTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -43,7 +43,7 @@ public: //------------------------------------------------------------------------------- /** Create the (blank) MDEW */ - static void createMDEW(std::string CoordinatesToUse) { + static void createMDEW(const std::string &CoordinatesToUse) { // ---- Start with empty MDEW ---- std::string frames; if (CoordinatesToUse == "Q (lab frame)") { @@ -100,8 +100,8 @@ public: //------------------------------------------------------------------------------- /** Run the CentroidPeaksMD with the given peak radius param */ void doRun(V3D startPos, double PeakRadius, V3D expectedResult, - std::string message, - std::string OutputWorkspace = "CentroidPeaksMDTest_Peaks") { + const std::string &message, + const std::string &OutputWorkspace = "CentroidPeaksMDTest_Peaks") { // Make a fake instrument - doesn't matter, we won't use it really Instrument_sptr inst = ComponentCreationHelper::createTestInstrumentCylindrical(5); diff --git a/Framework/MDAlgorithms/test/ChangeQConventionTest.h b/Framework/MDAlgorithms/test/ChangeQConventionTest.h index 06523655e14943b32f21366109059cd2f8bf6ac1..bfdd65aee93ef853b79a598b2c8749691ed26f56 100644 --- a/Framework/MDAlgorithms/test/ChangeQConventionTest.h +++ b/Framework/MDAlgorithms/test/ChangeQConventionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/test/CloneMDWorkspaceTest.h b/Framework/MDAlgorithms/test/CloneMDWorkspaceTest.h index 1711e5f411985f75cf5b157d6e06d9b033dce813..3c5cc4d73d683ea7794f9e9e6eb3e4f94f329fcb 100644 --- a/Framework/MDAlgorithms/test/CloneMDWorkspaceTest.h +++ b/Framework/MDAlgorithms/test/CloneMDWorkspaceTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -45,7 +45,7 @@ public: do_test(true, "CloneMDWorkspaceTest_ws_custom_cloned_name2.nxs", true); } - void do_test(bool fileBacked, std::string Filename = "", + void do_test(bool fileBacked, const std::string &Filename = "", bool file_needs_updating = false) { // Name of the output workspace. std::string outWSName("CloneMDWorkspaceTest_OutputWS"); @@ -117,7 +117,7 @@ public: } /** Clone a workspace and check that the clone matches */ - void do_test_MDHisto(MDHistoWorkspace_sptr ws1) { + void do_test_MDHisto(const MDHistoWorkspace_sptr &ws1) { // Name of the output workspace. std::string outWSName("CloneMDWorkspaceTest_OutputWS"); // Add the input workspace diff --git a/Framework/MDAlgorithms/test/CompactMDTest.h b/Framework/MDAlgorithms/test/CompactMDTest.h index 37df6ef4de2b65dfbbc635e9d851bf932176f22d..a7dc8c4abd684f262ded30d0fff176a31438d766 100644 --- a/Framework/MDAlgorithms/test/CompactMDTest.h +++ b/Framework/MDAlgorithms/test/CompactMDTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include <cxxtest/TestSuite.h> diff --git a/Framework/MDAlgorithms/test/CompareMDWorkspacesTest.h b/Framework/MDAlgorithms/test/CompareMDWorkspacesTest.h index 5df65f535d81faefcfb6b393cc2c576c082de3ed..a876e49842b42e483de1b14a84c2b78f83bcdb2a 100644 --- a/Framework/MDAlgorithms/test/CompareMDWorkspacesTest.h +++ b/Framework/MDAlgorithms/test/CompareMDWorkspacesTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -31,9 +31,9 @@ public: TS_ASSERT(alg.isInitialized()) } - void doTest(std::string ws1, std::string ws2, - std::string resultExpected = "Success!", bool CheckEvents = true, - bool IgnoreDifferentID = false) { + void doTest(const std::string &ws1, const std::string &ws2, + const std::string &resultExpected = "Success!", + bool CheckEvents = true, bool IgnoreDifferentID = false) { CompareMDWorkspaces alg; TS_ASSERT_THROWS_NOTHING(alg.initialize()) diff --git a/Framework/MDAlgorithms/test/CompositeBuilderTest.h b/Framework/MDAlgorithms/test/CompositeBuilderTest.h index 781fe8cdc5c748b29fc61735c7d2eb272ef20d7b..f84db40d03713ae6044483ad133a8c84412df74e 100644 --- a/Framework/MDAlgorithms/test/CompositeBuilderTest.h +++ b/Framework/MDAlgorithms/test/CompositeBuilderTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/test/CompositeImplicitFunctionParserTest.h b/Framework/MDAlgorithms/test/CompositeImplicitFunctionParserTest.h index a0a147e62769dac591c23ef6b0efa84394d95220..7f37ade51cf90f83a820971e5e6fb94342097e32 100644 --- a/Framework/MDAlgorithms/test/CompositeImplicitFunctionParserTest.h +++ b/Framework/MDAlgorithms/test/CompositeImplicitFunctionParserTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/test/ConvToMDEventsWSIndexingTest.h b/Framework/MDAlgorithms/test/ConvToMDEventsWSIndexingTest.h index 996634e26c18eefa35dbf16b348d800f76e874e5..43225b92aa660a9e66f0e7e0520950cbd2b2a7cd 100644 --- a/Framework/MDAlgorithms/test/ConvToMDEventsWSIndexingTest.h +++ b/Framework/MDAlgorithms/test/ConvToMDEventsWSIndexingTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/test/ConvertCWPDMDToSpectraTest.h b/Framework/MDAlgorithms/test/ConvertCWPDMDToSpectraTest.h index 1b334521a5db3bcd792d7ab3cb70de4583052c8b..e26e48b1e0e5c16891c1a0715fc31ac7b07d1e73 100644 --- a/Framework/MDAlgorithms/test/ConvertCWPDMDToSpectraTest.h +++ b/Framework/MDAlgorithms/test/ConvertCWPDMDToSpectraTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/test/ConvertCWSDExpToMomentumTest.h b/Framework/MDAlgorithms/test/ConvertCWSDExpToMomentumTest.h index 09cce3346fdd8b1d5a60b07695acf1baf168bdd1..6f99eaf2dce0bd60a46196e3999b1480deca6bbf 100644 --- a/Framework/MDAlgorithms/test/ConvertCWSDExpToMomentumTest.h +++ b/Framework/MDAlgorithms/test/ConvertCWSDExpToMomentumTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/test/ConvertCWSDMDtoHKLTest.h b/Framework/MDAlgorithms/test/ConvertCWSDMDtoHKLTest.h index 850d19b82c2e577b3f24ad1cf4e35aad1f76ab83..abedc1dddeb11afc4bcfc518d0155a82255c98bd 100644 --- a/Framework/MDAlgorithms/test/ConvertCWSDMDtoHKLTest.h +++ b/Framework/MDAlgorithms/test/ConvertCWSDMDtoHKLTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/test/ConvertEventsToMDTest.h b/Framework/MDAlgorithms/test/ConvertEventsToMDTest.h index 80b0daa41351811779cd122721f1d1a33cf4bb3d..0a58302e551484683b901209df7934c49af49fee 100644 --- a/Framework/MDAlgorithms/test/ConvertEventsToMDTest.h +++ b/Framework/MDAlgorithms/test/ConvertEventsToMDTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/test/ConvertHFIRSCDtoMDETest.h b/Framework/MDAlgorithms/test/ConvertHFIRSCDtoMDETest.h index cc3e0f9f9816a490e9eab9e32fae4d1c19c64dc5..b53393ccdcdea70d957cc0917226cc71b477414f 100644 --- a/Framework/MDAlgorithms/test/ConvertHFIRSCDtoMDETest.h +++ b/Framework/MDAlgorithms/test/ConvertHFIRSCDtoMDETest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/test/ConvertMDHistoToMatrixWorkspaceTest.h b/Framework/MDAlgorithms/test/ConvertMDHistoToMatrixWorkspaceTest.h index f51ef558f4c81bab396049e31bcf9939e7e5437e..7c0be85bdeea19286409315dac0f9665a5baffbd 100644 --- a/Framework/MDAlgorithms/test/ConvertMDHistoToMatrixWorkspaceTest.h +++ b/Framework/MDAlgorithms/test/ConvertMDHistoToMatrixWorkspaceTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /* * ConvertMDHistoToMatrixWorkspaceTest.h diff --git a/Framework/MDAlgorithms/test/ConvertSpiceDataToRealSpaceTest.h b/Framework/MDAlgorithms/test/ConvertSpiceDataToRealSpaceTest.h index 97e8dbd0c6743c2e00c07e9114b7503440a37f0c..136d69f909532bd70232e2603117327f6a5c677d 100644 --- a/Framework/MDAlgorithms/test/ConvertSpiceDataToRealSpaceTest.h +++ b/Framework/MDAlgorithms/test/ConvertSpiceDataToRealSpaceTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/test/ConvertToDetectorFaceMDTest.h b/Framework/MDAlgorithms/test/ConvertToDetectorFaceMDTest.h index 09b62588d1ae94dbf1a49ea0649649dba3696b23..b24ee72cae295fdfd5a6f7ca8e26fc446c82b179 100644 --- a/Framework/MDAlgorithms/test/ConvertToDetectorFaceMDTest.h +++ b/Framework/MDAlgorithms/test/ConvertToDetectorFaceMDTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/test/ConvertToDiffractionMDWorkspace2Test.h b/Framework/MDAlgorithms/test/ConvertToDiffractionMDWorkspace2Test.h index 2f8ff7ae63ea2f547eb24ec38c639a216d28be98..7c320b1ac995374ce4defca96e793233f6663406 100644 --- a/Framework/MDAlgorithms/test/ConvertToDiffractionMDWorkspace2Test.h +++ b/Framework/MDAlgorithms/test/ConvertToDiffractionMDWorkspace2Test.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/test/ConvertToDiffractionMDWorkspace3Test.h b/Framework/MDAlgorithms/test/ConvertToDiffractionMDWorkspace3Test.h index 8cf7b2b85829a6e4ca5902900036404538feb325..0fd5afc3f9debdb3a49884b0e96ade9d5ea1e32b 100644 --- a/Framework/MDAlgorithms/test/ConvertToDiffractionMDWorkspace3Test.h +++ b/Framework/MDAlgorithms/test/ConvertToDiffractionMDWorkspace3Test.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/test/ConvertToDiffractionMDWorkspaceTest.h b/Framework/MDAlgorithms/test/ConvertToDiffractionMDWorkspaceTest.h index 5f5945da446d6a11df643e50ed1a07e7d0b96675..3e2d163fa2c5dafc7f1934df9c9175693d8b3996 100644 --- a/Framework/MDAlgorithms/test/ConvertToDiffractionMDWorkspaceTest.h +++ b/Framework/MDAlgorithms/test/ConvertToDiffractionMDWorkspaceTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/test/ConvertToMDComponentsTest.h b/Framework/MDAlgorithms/test/ConvertToMDComponentsTest.h index 6ecb4297d02b749922d8fca530f4818720ec9ff1..e6bb76af1e6cea369664ecaa0448f070970afa35 100644 --- a/Framework/MDAlgorithms/test/ConvertToMDComponentsTest.h +++ b/Framework/MDAlgorithms/test/ConvertToMDComponentsTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once // tests for different parts of ConvertToMD exec functions @@ -18,6 +18,8 @@ #include <cxxtest/TestSuite.h> +#include <utility> + using namespace Mantid; using namespace Mantid::Kernel; using namespace Mantid::API; @@ -26,23 +28,22 @@ using namespace Mantid::MDAlgorithms; class Convert2MDComponentsTestHelper : public ConvertToMD { public: - TableWorkspace_const_sptr - preprocessDetectorsPositions(Mantid::API::MatrixWorkspace_const_sptr InWS2D, - const std::string dEModeRequested = "Direct", - bool updateMasks = true) { + TableWorkspace_const_sptr preprocessDetectorsPositions( + const Mantid::API::MatrixWorkspace_const_sptr &InWS2D, + const std::string &dEModeRequested = "Direct", bool updateMasks = true) { std::string OutWSName(this->getProperty("PreprocDetectorsWS")); return ConvertToMD::preprocessDetectorsPositions(InWS2D, dEModeRequested, updateMasks, OutWSName); } void setSourceWS(Mantid::API::MatrixWorkspace_sptr InWS2D) { - this->m_InWS2D = InWS2D; + this->m_InWS2D = std::move(InWS2D); // and create the class, which will deal with the target workspace if (!this->m_OutWSWrapper) this->m_OutWSWrapper = boost::shared_ptr<MDAlgorithms::MDEventWSWrapper>( new MDAlgorithms::MDEventWSWrapper()); } Convert2MDComponentsTestHelper() { ConvertToMD::initialize(); } - bool buildTargetWSDescription(API::IMDEventWorkspace_sptr spws, + bool buildTargetWSDescription(const API::IMDEventWorkspace_sptr &spws, const std::string &Q_mod_req, const std::string &dEModeRequested, const std::vector<std::string> &other_dim_names, @@ -52,8 +53,8 @@ public: std::vector<double> dimMin = this->getProperty("MinValues"); std::vector<double> dimMax = this->getProperty("MaxValues"); return ConvertToMD::buildTargetWSDescription( - spws, Q_mod_req, dEModeRequested, other_dim_names, dimMin, dimMax, - QFrame, convert_to_, targWSDescr); + std::move(spws), Q_mod_req, dEModeRequested, other_dim_names, dimMin, + dimMax, QFrame, convert_to_, targWSDescr); } void copyMetaData(API::IMDEventWorkspace_sptr mdEventWS) const { ConvertToMD::copyMetaData(mdEventWS); diff --git a/Framework/MDAlgorithms/test/ConvertToMDMinMaxGlobalTest.h b/Framework/MDAlgorithms/test/ConvertToMDMinMaxGlobalTest.h index 8b3520afc63d83140e00c75c63d0f3cee01b4ca4..db1d008c76a26bb29513da25d62e3489616654de 100644 --- a/Framework/MDAlgorithms/test/ConvertToMDMinMaxGlobalTest.h +++ b/Framework/MDAlgorithms/test/ConvertToMDMinMaxGlobalTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/test/ConvertToMDMinMaxLocalTest.h b/Framework/MDAlgorithms/test/ConvertToMDMinMaxLocalTest.h index 980f1d54ecab07e9d6060f3b27c093055fcc10c2..c47febe342092f3bada4a5cc9d79bc8f107ec2ff 100644 --- a/Framework/MDAlgorithms/test/ConvertToMDMinMaxLocalTest.h +++ b/Framework/MDAlgorithms/test/ConvertToMDMinMaxLocalTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/test/ConvertToMDTest.h b/Framework/MDAlgorithms/test/ConvertToMDTest.h index fa3222073f2a92a00c61e504049d9166852c600d..014f131a4cc5fd6fa54546a819dc1804491de1d8 100644 --- a/Framework/MDAlgorithms/test/ConvertToMDTest.h +++ b/Framework/MDAlgorithms/test/ConvertToMDTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -19,6 +19,8 @@ #include <Poco/File.h> #include <cxxtest/TestSuite.h> +#include <utility> + using namespace Mantid; using namespace Mantid::Kernel; using namespace Mantid::API; @@ -57,16 +59,15 @@ Mantid::API::MatrixWorkspace_sptr createTestWorkspaces() { class Convert2AnyTestHelper : public ConvertToMD { public: Convert2AnyTestHelper(){}; - TableWorkspace_const_sptr - preprocessDetectorsPositions(Mantid::API::MatrixWorkspace_const_sptr InWS2D, - const std::string dEModeRequested = "Direct", - bool updateMasks = false) { + TableWorkspace_const_sptr preprocessDetectorsPositions( + const Mantid::API::MatrixWorkspace_const_sptr &InWS2D, + const std::string &dEModeRequested = "Direct", bool updateMasks = false) { return ConvertToMD::preprocessDetectorsPositions( InWS2D, dEModeRequested, updateMasks, std::string(this->getProperty("PreprocDetectorsWS"))); } void setSourceWS(Mantid::API::MatrixWorkspace_sptr InWS2D) { - m_InWS2D = InWS2D; + m_InWS2D = std::move(InWS2D); } }; // helper function to provide list of names to test: diff --git a/Framework/MDAlgorithms/test/ConvertToQ3DdETest.h b/Framework/MDAlgorithms/test/ConvertToQ3DdETest.h index c8cd6e8f3c5a5108a93a273a5f4ca4da938bfb67..2446c16225689947d1bcd4bea14850c8af458ca2 100644 --- a/Framework/MDAlgorithms/test/ConvertToQ3DdETest.h +++ b/Framework/MDAlgorithms/test/ConvertToQ3DdETest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -59,7 +59,7 @@ public: /** Calculate min-max value defaults*/ Mantid::API::IAlgorithm * calcMinMaxValDefaults(const std::string &QMode, const std::string &QFrame, - std::string OtherProperties = std::string("")) { + const std::string &OtherProperties = std::string("")) { Mantid::API::IAlgorithm *childAlg = Mantid::API::FrameworkManager::Instance().createAlgorithm( diff --git a/Framework/MDAlgorithms/test/ConvertToReflectometryQTest.h b/Framework/MDAlgorithms/test/ConvertToReflectometryQTest.h index 0d12ec71c47df9fb1d7838b11557c2951f15c733..04378718a13a55837fa7b67064f222fe91814970 100644 --- a/Framework/MDAlgorithms/test/ConvertToReflectometryQTest.h +++ b/Framework/MDAlgorithms/test/ConvertToReflectometryQTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -42,7 +42,7 @@ private: Makes the tests much more readable like this. */ boost::shared_ptr<ConvertToReflectometryQ> - make_standard_algorithm(const std::string outputdimensions = "Q (lab frame)", + make_standard_algorithm(const std::string &outputdimensions = "Q (lab frame)", bool outputAsMD = true) { MatrixWorkspace_sptr in_ws = WorkspaceCreationHelper::create2DWorkspaceWithFullInstrument(10, 10); diff --git a/Framework/MDAlgorithms/test/CreateMDFitWorkspaceTest.h b/Framework/MDAlgorithms/test/CreateMDFitWorkspaceTest.h index 1dee694209ed2712b8aaf809b85eeffc2e2af5c6..4d9b4e6f11823915d01c7a77a2ba727fe1a5c47c 100644 --- a/Framework/MDAlgorithms/test/CreateMDFitWorkspaceTest.h +++ b/Framework/MDAlgorithms/test/CreateMDFitWorkspaceTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/test/CreateMDHistoWorkspaceTest.h b/Framework/MDAlgorithms/test/CreateMDHistoWorkspaceTest.h index 386bfbfd676548cde76b7d950295bc3cff8ae4db..2e778d78b36a8c0f1e4fe599ff2ced8754275131 100644 --- a/Framework/MDAlgorithms/test/CreateMDHistoWorkspaceTest.h +++ b/Framework/MDAlgorithms/test/CreateMDHistoWorkspaceTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/test/CreateMDTest.h b/Framework/MDAlgorithms/test/CreateMDTest.h index 463bb7a66657a7d4d78b5a2073648fd74e8a8a91..ee074eb2c7849fc1fd9ca274b0c40b5a7bfe131d 100644 --- a/Framework/MDAlgorithms/test/CreateMDTest.h +++ b/Framework/MDAlgorithms/test/CreateMDTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/test/CreateMDWorkspaceTest.h b/Framework/MDAlgorithms/test/CreateMDWorkspaceTest.h index d046f8092e0056d2c8875191159a53cb99ce2fa0..64d9c0c8d866ee3370ffc165cfa80b60b847b930 100644 --- a/Framework/MDAlgorithms/test/CreateMDWorkspaceTest.h +++ b/Framework/MDAlgorithms/test/CreateMDWorkspaceTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -91,8 +91,9 @@ public: ->isExecuted()); } - void do_test_exec(std::string Filename, bool lean, int MinRecursionDepth = 0, - int expectedNumMDBoxes = 216, bool withFrames = false) { + void do_test_exec(const std::string &Filename, bool lean, + int MinRecursionDepth = 0, int expectedNumMDBoxes = 216, + bool withFrames = false) { std::string wsName = "CreateMDWorkspaceTest_out"; CreateMDWorkspace alg; diff --git a/Framework/MDAlgorithms/test/CutMDTest.h b/Framework/MDAlgorithms/test/CutMDTest.h index a30badfedc659887d32d8e434ea267258ca8242c..cc8cef0d150d7acde449114000a7052bb11cfd8f 100644 --- a/Framework/MDAlgorithms/test/CutMDTest.h +++ b/Framework/MDAlgorithms/test/CutMDTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -42,7 +42,7 @@ class CutMDTest : public CxxTest::TestSuite { private: IMDWorkspace_sptr m_inWS; - void addNormalization(std::string wsName) { + void addNormalization(const std::string &wsName) { auto ws = AnalysisDataService::Instance().retrieveWS<IMDWorkspace>(wsName); auto eventWS = boost::dynamic_pointer_cast<IMDEventWorkspace>(ws); auto histoWS = boost::dynamic_pointer_cast<IMDHistoWorkspace>(ws); diff --git a/Framework/MDAlgorithms/test/DisplayNormalizationSetterTest.h b/Framework/MDAlgorithms/test/DisplayNormalizationSetterTest.h index a54adc20839dc6f99a48849030a435ff765ac796..2303c5e0b80036fb89e03807ee83471bf148a910 100644 --- a/Framework/MDAlgorithms/test/DisplayNormalizationSetterTest.h +++ b/Framework/MDAlgorithms/test/DisplayNormalizationSetterTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/test/DivideMDTest.h b/Framework/MDAlgorithms/test/DivideMDTest.h index 686eb5d96ecbdc780b222e63f783f7dcf54e80ba..cb039a85f717c58cde13784949f654aed8226d31 100644 --- a/Framework/MDAlgorithms/test/DivideMDTest.h +++ b/Framework/MDAlgorithms/test/DivideMDTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -62,7 +62,7 @@ public: /** Get a MDEventWorkspace and check that all events have the given * signal/error */ - void checkMDEWSignal(std::string wsName, signal_t expectedSignal, + void checkMDEWSignal(const std::string &wsName, signal_t expectedSignal, signal_t expectedError) { IMDEventWorkspace_sptr ws = AnalysisDataService::Instance().retrieveWS<IMDEventWorkspace>(wsName); diff --git a/Framework/MDAlgorithms/test/EqualToMDTest.h b/Framework/MDAlgorithms/test/EqualToMDTest.h index 0da92e29dcecbc48ab66279a00a325db3cfd9d71..dfa7a02dfa9b832601c19168b305c06f2adca799 100644 --- a/Framework/MDAlgorithms/test/EqualToMDTest.h +++ b/Framework/MDAlgorithms/test/EqualToMDTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/test/EvaluateMDFunctionTest.h b/Framework/MDAlgorithms/test/EvaluateMDFunctionTest.h index 616f3275f9ea7dc33ce872927b67975f4963dcf0..e757345ba012a446d734c863340784ef9e91b5e7 100644 --- a/Framework/MDAlgorithms/test/EvaluateMDFunctionTest.h +++ b/Framework/MDAlgorithms/test/EvaluateMDFunctionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/test/ExponentialMDTest.h b/Framework/MDAlgorithms/test/ExponentialMDTest.h index 509d09bf2c0c0d756e3265c2fb378e052c86fcaa..c53bb95a6f1fa0cd39df35b95372a342010a2007 100644 --- a/Framework/MDAlgorithms/test/ExponentialMDTest.h +++ b/Framework/MDAlgorithms/test/ExponentialMDTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/test/FakeMDEventDataTest.h b/Framework/MDAlgorithms/test/FakeMDEventDataTest.h index 336763799e3c98303aaa553f99a1f45a3bf77dc6..d4317b8a8017d48eb0a47eac90cf3f02236945ea 100644 --- a/Framework/MDAlgorithms/test/FakeMDEventDataTest.h +++ b/Framework/MDAlgorithms/test/FakeMDEventDataTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/test/FindPeaksMDTest.h b/Framework/MDAlgorithms/test/FindPeaksMDTest.h index 2c4670dac9b546ffa6d16a9be89a99759edaf005..0ba29c344a1658d51272cab7e7d592002e0d4870 100644 --- a/Framework/MDAlgorithms/test/FindPeaksMDTest.h +++ b/Framework/MDAlgorithms/test/FindPeaksMDTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/test/FitMDTest.h b/Framework/MDAlgorithms/test/FitMDTest.h index 92cdfceb0c2561a1383d32effb09deb82729ebb3..54587a927d92054ae750704ae171bacf4c049fe8 100644 --- a/Framework/MDAlgorithms/test/FitMDTest.h +++ b/Framework/MDAlgorithms/test/FitMDTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/test/FitResolutionConvolvedModelTest.h b/Framework/MDAlgorithms/test/FitResolutionConvolvedModelTest.h index 9a660747954ee004b6f2f760b6d70dc19419404f..df179a4241e0941dc14b6709fb6b8553a4fe8421 100644 --- a/Framework/MDAlgorithms/test/FitResolutionConvolvedModelTest.h +++ b/Framework/MDAlgorithms/test/FitResolutionConvolvedModelTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/test/FlippingRatioCorrectionMDTest.h b/Framework/MDAlgorithms/test/FlippingRatioCorrectionMDTest.h index 35de7633d70e5c093c18110ead1f1bafa368a326..1020c1488915f77da0f5a7157397b99aecc1b776 100644 --- a/Framework/MDAlgorithms/test/FlippingRatioCorrectionMDTest.h +++ b/Framework/MDAlgorithms/test/FlippingRatioCorrectionMDTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -85,7 +85,7 @@ public: } private: - void checkFRCorrection(std::string wsName, double expectedValuePeak1, + void checkFRCorrection(const std::string &wsName, double expectedValuePeak1, double expectedValuePeak2) { Mantid::MDAlgorithms::BinMD algBin; TS_ASSERT_THROWS_NOTHING(algBin.initialize()) diff --git a/Framework/MDAlgorithms/test/FunctionParserTest.h b/Framework/MDAlgorithms/test/FunctionParserTest.h index 69c59b5e00939cbbac7abb06c6a2d109925da890..cf3d7f9602947598a70b638410ef8099ac5047d2 100644 --- a/Framework/MDAlgorithms/test/FunctionParserTest.h +++ b/Framework/MDAlgorithms/test/FunctionParserTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/test/GetSpiceDataRawCountsFromMDTest.h b/Framework/MDAlgorithms/test/GetSpiceDataRawCountsFromMDTest.h index 772a87cc2109c3344281524db53e3efdc52be686..e4b9167b353104bb3a9ca5b3f24433fbdbf7675d 100644 --- a/Framework/MDAlgorithms/test/GetSpiceDataRawCountsFromMDTest.h +++ b/Framework/MDAlgorithms/test/GetSpiceDataRawCountsFromMDTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/test/GreaterThanMDTest.h b/Framework/MDAlgorithms/test/GreaterThanMDTest.h index 71e8e7de6813c731e9c9aecf7563ad4482dc4145..6f019578e64de25df7af673611adc6c6a04a6e7d 100644 --- a/Framework/MDAlgorithms/test/GreaterThanMDTest.h +++ b/Framework/MDAlgorithms/test/GreaterThanMDTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/test/ImportMDEventWorkspaceTest.h b/Framework/MDAlgorithms/test/ImportMDEventWorkspaceTest.h index f53065695793cb3649cbd59720f849e47edd7e1a..92dc688f9a2144a62b6416d7afbc39ae48d3efba 100644 --- a/Framework/MDAlgorithms/test/ImportMDEventWorkspaceTest.h +++ b/Framework/MDAlgorithms/test/ImportMDEventWorkspaceTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -72,7 +72,7 @@ public: /// Create a simple input file. MDFileObject( const FileContentsBuilder &builder = FileContentsBuilder(), - std::string filename = "test_import_md_event_workspace_file.txt") { + const std::string &filename = "test_import_md_event_workspace_file.txt") { Poco::Path path( Mantid::Kernel::ConfigService::Instance().getTempDir().c_str()); path.append(filename); diff --git a/Framework/MDAlgorithms/test/ImportMDHistoWorkspaceTest.h b/Framework/MDAlgorithms/test/ImportMDHistoWorkspaceTest.h index 704c88a4cee32195c1cf139f19f51f3c1e077cc8..ba1b5b39270281eacd9b705f802a78f6bec828ad 100644 --- a/Framework/MDAlgorithms/test/ImportMDHistoWorkspaceTest.h +++ b/Framework/MDAlgorithms/test/ImportMDHistoWorkspaceTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/test/Integrate3DEventsTest.h b/Framework/MDAlgorithms/test/Integrate3DEventsTest.h index 35b4c8655312077dd2b5a06578adc7a90e586574..1870468e8a86d4187745997e0d8031b47916b722 100644 --- a/Framework/MDAlgorithms/test/Integrate3DEventsTest.h +++ b/Framework/MDAlgorithms/test/Integrate3DEventsTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/test/IntegrateEllipsoidsTest.h b/Framework/MDAlgorithms/test/IntegrateEllipsoidsTest.h index 9b50b6e9671e8fce710d8edff8899aa864fafdff..27fac6e56bebfa4ebf1f21e97c3036cb87e63a4d 100644 --- a/Framework/MDAlgorithms/test/IntegrateEllipsoidsTest.h +++ b/Framework/MDAlgorithms/test/IntegrateEllipsoidsTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/AlgorithmManager.h" #include "MantidAPI/FrameworkManager.h" diff --git a/Framework/MDAlgorithms/test/IntegrateEllipsoidsTwoStepTest.h b/Framework/MDAlgorithms/test/IntegrateEllipsoidsTwoStepTest.h index bc4ab88ec7e4a661d672f6bc9bd3d839fa0eb43c..c2780c1e1c47db318919ad089ebf9fee538a18c7 100644 --- a/Framework/MDAlgorithms/test/IntegrateEllipsoidsTwoStepTest.h +++ b/Framework/MDAlgorithms/test/IntegrateEllipsoidsTwoStepTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDAlgorithms/IntegrateEllipsoidsTwoStep.h" diff --git a/Framework/MDAlgorithms/test/IntegrateEllipsoidsWithSatellitesTest.h b/Framework/MDAlgorithms/test/IntegrateEllipsoidsWithSatellitesTest.h index 850f9a7bd5f303baf133bc0030b9dee0b666b26a..f896566f99e0edc31c69c8616bc2c0a2e21ab9dd 100644 --- a/Framework/MDAlgorithms/test/IntegrateEllipsoidsWithSatellitesTest.h +++ b/Framework/MDAlgorithms/test/IntegrateEllipsoidsWithSatellitesTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/AlgorithmManager.h" #include "MantidAPI/FrameworkManager.h" diff --git a/Framework/MDAlgorithms/test/IntegrateFluxTest.h b/Framework/MDAlgorithms/test/IntegrateFluxTest.h index 638d06c23708dd7dd59175d34911456fc9321670..d65ee5b7baf0b625e0c234446becd9336b5bbc1b 100644 --- a/Framework/MDAlgorithms/test/IntegrateFluxTest.h +++ b/Framework/MDAlgorithms/test/IntegrateFluxTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/test/IntegrateMDHistoWorkspaceTest.h b/Framework/MDAlgorithms/test/IntegrateMDHistoWorkspaceTest.h index 7aa7828e7f37dcefc85bac9afec2205aaeeeae9d..0636526f31d700097cfc030ad41055b42f6dcf4b 100644 --- a/Framework/MDAlgorithms/test/IntegrateMDHistoWorkspaceTest.h +++ b/Framework/MDAlgorithms/test/IntegrateMDHistoWorkspaceTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -18,7 +18,7 @@ namespace { // This helper sets the signal values to the linear index to have some // variety -void resetSignalsToLinearIndexValue(IMDHistoWorkspace_sptr ws) { +void resetSignalsToLinearIndexValue(const IMDHistoWorkspace_sptr &ws) { auto numberOfIndices = static_cast<size_t>(ws->getNPoints()); for (size_t i = 0; i < numberOfIndices; ++i) { auto &signal = ws->signalAt(i); diff --git a/Framework/MDAlgorithms/test/IntegratePeaksCWSDTest.h b/Framework/MDAlgorithms/test/IntegratePeaksCWSDTest.h index b6e0a3614f618468c5c7cd674e52ccf5cdc18b25..cae13721fd16180092bf9a29584c0eefbeca2170 100644 --- a/Framework/MDAlgorithms/test/IntegratePeaksCWSDTest.h +++ b/Framework/MDAlgorithms/test/IntegratePeaksCWSDTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/test/IntegratePeaksMD2Test.h b/Framework/MDAlgorithms/test/IntegratePeaksMD2Test.h index 8607909986b2e75031c96c28e64e6aecb5e0cfba..790cb2067be1afe6e1192e68857436b8f2aacb92 100644 --- a/Framework/MDAlgorithms/test/IntegratePeaksMD2Test.h +++ b/Framework/MDAlgorithms/test/IntegratePeaksMD2Test.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -51,11 +51,11 @@ public: //------------------------------------------------------------------------------- /** Run the IntegratePeaksMD2 with the given peak radius integration param */ - static void doRun(double PeakRadius, double BackgroundRadius, - std::string OutputWorkspace = "IntegratePeaksMD2Test_peaks", - double BackgroundStartRadius = 0.0, bool edge = true, - bool cyl = false, std::string fnct = "NoFit", - double adaptive = 0.0) { + static void + doRun(double PeakRadius, double BackgroundRadius, + const std::string &OutputWorkspace = "IntegratePeaksMD2Test_peaks", + double BackgroundStartRadius = 0.0, bool edge = true, bool cyl = false, + const std::string &fnct = "NoFit", double adaptive = 0.0) { IntegratePeaksMD2 alg; TS_ASSERT_THROWS_NOTHING(alg.initialize()) TS_ASSERT(alg.isInitialized()) diff --git a/Framework/MDAlgorithms/test/IntegratePeaksMDHKLTest.h b/Framework/MDAlgorithms/test/IntegratePeaksMDHKLTest.h index 7bfeb8d9177ecc60f8db8f81d7652ae16773f9d8..23327899699fd2364dd4cdb0086a1105d1abea83 100644 --- a/Framework/MDAlgorithms/test/IntegratePeaksMDHKLTest.h +++ b/Framework/MDAlgorithms/test/IntegratePeaksMDHKLTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -55,7 +55,7 @@ public: /** Run the IntegratePeaksMDHKL with the given peak radius integration param */ static void - doRun(std::string OutputWorkspace = "IntegratePeaksMDHKLTest_peaks") { + doRun(const std::string &OutputWorkspace = "IntegratePeaksMDHKLTest_peaks") { IntegratePeaksMDHKL alg; TS_ASSERT_THROWS_NOTHING(alg.initialize()) TS_ASSERT(alg.isInitialized()) diff --git a/Framework/MDAlgorithms/test/IntegratePeaksMDTest.h b/Framework/MDAlgorithms/test/IntegratePeaksMDTest.h index 8a679271e7fb7240e516053a437f642f15b318c5..167d9e8ab1e52d5bbf14ed881b38b980bcac2684 100644 --- a/Framework/MDAlgorithms/test/IntegratePeaksMDTest.h +++ b/Framework/MDAlgorithms/test/IntegratePeaksMDTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -48,10 +48,11 @@ public: //------------------------------------------------------------------------------- /** Run the IntegratePeaksMD with the given peak radius integration param */ - static void doRun(double PeakRadius, double BackgroundRadius, - std::string OutputWorkspace = "IntegratePeaksMDTest_peaks", - double BackgroundStartRadius = 0.0, bool edge = true, - bool cyl = false, std::string fnct = "NoFit") { + static void + doRun(double PeakRadius, double BackgroundRadius, + const std::string &OutputWorkspace = "IntegratePeaksMDTest_peaks", + double BackgroundStartRadius = 0.0, bool edge = true, bool cyl = false, + const std::string &fnct = "NoFit") { IntegratePeaksMD alg; TS_ASSERT_THROWS_NOTHING(alg.initialize()) TS_ASSERT(alg.isInitialized()) diff --git a/Framework/MDAlgorithms/test/InvalidParameterParserTest.h b/Framework/MDAlgorithms/test/InvalidParameterParserTest.h index 49b6a025a803ee802172771c1be24c4516ef0612..1356cae417c29cdf7aef73aad03d46077c8e842a 100644 --- a/Framework/MDAlgorithms/test/InvalidParameterParserTest.h +++ b/Framework/MDAlgorithms/test/InvalidParameterParserTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/test/InvalidParameterTest.h b/Framework/MDAlgorithms/test/InvalidParameterTest.h index 8c53efe29ce39e99c9311d3e9aa9a6809fb915c3..c5047c9b882217d2253e4f3c4890e4c75779daf8 100644 --- a/Framework/MDAlgorithms/test/InvalidParameterTest.h +++ b/Framework/MDAlgorithms/test/InvalidParameterTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/test/LessThanMDTest.h b/Framework/MDAlgorithms/test/LessThanMDTest.h index 6252cd4555228879e9726070f08722c8f1f4b818..74e1232b533d668544e7724a28c5408b0867a7d2 100644 --- a/Framework/MDAlgorithms/test/LessThanMDTest.h +++ b/Framework/MDAlgorithms/test/LessThanMDTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/test/LoadDNSSCDTest.h b/Framework/MDAlgorithms/test/LoadDNSSCDTest.h index eb70e7445cd343156f2aab408a812d87335d51b4..bae2aba585c51f4c2d70efce253e1e53b7af0510 100644 --- a/Framework/MDAlgorithms/test/LoadDNSSCDTest.h +++ b/Framework/MDAlgorithms/test/LoadDNSSCDTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/test/LoadDNSSCDTestReference.h b/Framework/MDAlgorithms/test/LoadDNSSCDTestReference.h index 2a1115cd59794c56bf443a8bcdd54ed614cfbc64..8df28d82ef0d593b1986e5ad1be12ea84abfa97f 100644 --- a/Framework/MDAlgorithms/test/LoadDNSSCDTestReference.h +++ b/Framework/MDAlgorithms/test/LoadDNSSCDTestReference.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/test/LoadMDTest.h b/Framework/MDAlgorithms/test/LoadMDTest.h index 0bd44c256a9a802b6ca7de5c3425b7d0340e2df9..6a83c2b735fdc330faf1f1b3a1eaa6bf0aa6bdad 100644 --- a/Framework/MDAlgorithms/test/LoadMDTest.h +++ b/Framework/MDAlgorithms/test/LoadMDTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -488,7 +488,7 @@ public: } /** Run SaveMD v1 with the MDHistoWorkspace */ - void doTestHistoV1(MDHistoWorkspace_sptr ws) { + void doTestHistoV1(const MDHistoWorkspace_sptr &ws) { std::string filename = "SaveMDTestHisto.nxs"; SaveMD alg1; @@ -531,7 +531,7 @@ public: } /** Run SaveMD2 with the MDHistoWorkspace */ - void doTestHisto(MDHistoWorkspace_sptr ws) { + void doTestHisto(const MDHistoWorkspace_sptr &ws) { std::string filename = "SaveMD2TestHisto.nxs"; SaveMD2 alg1; @@ -682,7 +682,7 @@ public: } Mantid::API::IMDWorkspace_sptr - testSaveAndLoadWorkspace(Mantid::API::IMDWorkspace_sptr inputWS, + testSaveAndLoadWorkspace(const Mantid::API::IMDWorkspace_sptr &inputWS, const char *rootGroup, const bool rmCoordField = false) { const std::string fileName = "SaveMDSpecialCoordinatesTest.nxs"; diff --git a/Framework/MDAlgorithms/test/LoadSQW2Test.h b/Framework/MDAlgorithms/test/LoadSQW2Test.h index 13547074120ee4be31807c2c23eb7a14ea910dbe..afb097b986c74a527569f6878d67610ed303d1bd 100644 --- a/Framework/MDAlgorithms/test/LoadSQW2Test.h +++ b/Framework/MDAlgorithms/test/LoadSQW2Test.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -20,6 +20,7 @@ #include <Poco/TemporaryFile.h> #include <array> +#include <utility> using Mantid::API::ExperimentInfo; using Mantid::API::IAlgorithm; @@ -159,7 +160,8 @@ private: SizeTList nbins; }; - IMDEventWorkspace_sptr runAlgorithm(std::string filename, Arguments args) { + IMDEventWorkspace_sptr runAlgorithm(const std::string &filename, + const Arguments &args) { auto algm = createAlgorithm(); algm->setProperty("Filename", filename); algm->setProperty("MetadataOnly", args.metadataOnly); @@ -180,9 +182,9 @@ private: } void checkGeometryAsExpected(const IMDEventWorkspace &outputWS, - std::string outputFrame, DataType dtype) { + const std::string &outputFrame, DataType dtype) { TS_ASSERT_EQUALS(4, outputWS.getNumDims()); - auto expectedDim = getExpectedDimProperties(outputFrame, dtype); + auto expectedDim = getExpectedDimProperties(std::move(outputFrame), dtype); for (size_t i = 0; i < 4; ++i) { auto dim = outputWS.getDimension(i); TS_ASSERT_EQUALS(expectedDim.ids[i], dim->getDimensionId()); @@ -196,7 +198,7 @@ private: } GNU_DIAG_OFF("missing-braces") - DimensionProperties getExpectedDimProperties(std::string outputFrame, + DimensionProperties getExpectedDimProperties(const std::string &outputFrame, DataType dtype) { DimensionProperties expected; expected.ids = {"qx", "qy", "qz", "en"}; @@ -297,8 +299,8 @@ private: TS_ASSERT_DELTA(0.0, vVec[2], 1e-04); } - void checkDataAsExpected(const IMDEventWorkspace &outputWS, Arguments args, - DataType dtype) { + void checkDataAsExpected(const IMDEventWorkspace &outputWS, + const Arguments &args, DataType dtype) { if (args.metadataOnly) { TS_ASSERT_EQUALS(0, outputWS.getNEvents()); } else { @@ -353,7 +355,7 @@ private: } void checkOutputFile(const IMDEventWorkspace &outputWS, - std::string outputFilename) { + const std::string &outputFilename) { TS_ASSERT(outputWS.isFileBacked()); Poco::File fileback(outputFilename); TS_ASSERT(fileback.getSize() > 0); diff --git a/Framework/MDAlgorithms/test/LoadSQWTest.h b/Framework/MDAlgorithms/test/LoadSQWTest.h index f445dc0b4962778a0ddc939a167c90592c190725..237632999424fff6048f6b369f7ef559203e83fd 100644 --- a/Framework/MDAlgorithms/test/LoadSQWTest.h +++ b/Framework/MDAlgorithms/test/LoadSQWTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/test/LogarithmMDTest.h b/Framework/MDAlgorithms/test/LogarithmMDTest.h index 9739009ac0fcf6ff121483475590b604ea7e6767..4a0a355887b5eb235b10cee68bf32c161f32a209 100644 --- a/Framework/MDAlgorithms/test/LogarithmMDTest.h +++ b/Framework/MDAlgorithms/test/LogarithmMDTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/test/MDEventWSWrapperTest.h b/Framework/MDAlgorithms/test/MDEventWSWrapperTest.h index 94741b24cd07137d95454ee309f9687d55e38144..6632303a2f49b2427e2252f6feb9e1236fc5a04f 100644 --- a/Framework/MDAlgorithms/test/MDEventWSWrapperTest.h +++ b/Framework/MDAlgorithms/test/MDEventWSWrapperTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/test/MDNormDirectSCTest.h b/Framework/MDAlgorithms/test/MDNormDirectSCTest.h index 699986cdad2af3dbba6cc1b2100f391318ca2827..5036307ec0e2767144e3dcbd62825b05f76404fe 100644 --- a/Framework/MDAlgorithms/test/MDNormDirectSCTest.h +++ b/Framework/MDAlgorithms/test/MDNormDirectSCTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/test/MDNormSCDTest.h b/Framework/MDAlgorithms/test/MDNormSCDTest.h index 426e0c1230f581f4e3136137496e7ec0efa130d1..06b7b50fbe57a3eef7777f6efd1fa516a7a3aacc 100644 --- a/Framework/MDAlgorithms/test/MDNormSCDTest.h +++ b/Framework/MDAlgorithms/test/MDNormSCDTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/test/MDTransfAxisNamesTest.h b/Framework/MDAlgorithms/test/MDTransfAxisNamesTest.h index 1018e13bcf8029cc15f8b6cd4f90a4f5b1a84e7a..3418cedd66ba494acdaf8f2818b13e27bc2f9566 100644 --- a/Framework/MDAlgorithms/test/MDTransfAxisNamesTest.h +++ b/Framework/MDAlgorithms/test/MDTransfAxisNamesTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/test/MDTransfFactoryTest.h b/Framework/MDAlgorithms/test/MDTransfFactoryTest.h index 47bf759972265b11cae3b3827eed916f2693ed80..5dab7c36902fe8a17ac559a4f5b5b736dfffa131 100644 --- a/Framework/MDAlgorithms/test/MDTransfFactoryTest.h +++ b/Framework/MDAlgorithms/test/MDTransfFactoryTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/test/MDTransfModQTest.h b/Framework/MDAlgorithms/test/MDTransfModQTest.h index c07f9a8130feb7dd9a6cfb6888e1e1711e18ae07..d03727735866e5ef7dcdece1fd638015d50e3c3c 100644 --- a/Framework/MDAlgorithms/test/MDTransfModQTest.h +++ b/Framework/MDAlgorithms/test/MDTransfModQTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/test/MDTransfQ3DTest.h b/Framework/MDAlgorithms/test/MDTransfQ3DTest.h index 2a4e7aa1c3ea2b8c322c578766089ceef6146064..73349981b759e484ed458f5fffec7dda2ed50a87 100644 --- a/Framework/MDAlgorithms/test/MDTransfQ3DTest.h +++ b/Framework/MDAlgorithms/test/MDTransfQ3DTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/test/MDWSDescriptionTest.h b/Framework/MDAlgorithms/test/MDWSDescriptionTest.h index 8fea63dd4508da2fa1c712fdab875e7b83bcba6e..ce5335fffa4ec22fc38725c01e17b27e1f498c58 100644 --- a/Framework/MDAlgorithms/test/MDWSDescriptionTest.h +++ b/Framework/MDAlgorithms/test/MDWSDescriptionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/test/MDWSTransfTest.h b/Framework/MDAlgorithms/test/MDWSTransfTest.h index f64f17aaf0880499078beba811500560a4eed3b7..0e9b25bcfcb6dda25c00f3de7ccd1289a11c2dde 100644 --- a/Framework/MDAlgorithms/test/MDWSTransfTest.h +++ b/Framework/MDAlgorithms/test/MDWSTransfTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/test/MaskMDTest.h b/Framework/MDAlgorithms/test/MaskMDTest.h index aec70af6bb37423db26a0b61dbfdfef860192a20..0bdcdb0805783348db9f3e4f92d5217929804b76 100644 --- a/Framework/MDAlgorithms/test/MaskMDTest.h +++ b/Framework/MDAlgorithms/test/MaskMDTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/test/MergeMDFilesTest.h b/Framework/MDAlgorithms/test/MergeMDFilesTest.h index b1a8001b7fc412a37083dee492894b5761849fe5..64db29a303658a6edb77c21c21ab61cc01746287 100644 --- a/Framework/MDAlgorithms/test/MergeMDFilesTest.h +++ b/Framework/MDAlgorithms/test/MergeMDFilesTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -32,7 +32,7 @@ public: void test_exec_fileBacked() { do_test_exec("MergeMDFilesTest_OutputWS.nxs"); } - void do_test_exec(std::string OutputFilename) { + void do_test_exec(const std::string &OutputFilename) { if (OutputFilename != "") { if (Poco::File(OutputFilename).exists()) Poco::File(OutputFilename).remove(); diff --git a/Framework/MDAlgorithms/test/MergeMDTest.h b/Framework/MDAlgorithms/test/MergeMDTest.h index 563257ff32da87592ce0d9e5b94cc2f60dc22a9a..fe4d2bf3e4778c232e941ff805f4b099b23668bf 100644 --- a/Framework/MDAlgorithms/test/MergeMDTest.h +++ b/Framework/MDAlgorithms/test/MergeMDTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/test/MinusMDTest.h b/Framework/MDAlgorithms/test/MinusMDTest.h index 31709d9fdf447398051bce1397cc22e39acf24df..0b57a525a7d538f5957e1e2c6d2b46df3030b918 100644 --- a/Framework/MDAlgorithms/test/MinusMDTest.h +++ b/Framework/MDAlgorithms/test/MinusMDTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/test/MultiplyMDTest.h b/Framework/MDAlgorithms/test/MultiplyMDTest.h index 77b1615869c530f501f66df3dcded2a804a6a66a..a59854b4203c1f9f68f2cb7bea89993fdbb24efc 100644 --- a/Framework/MDAlgorithms/test/MultiplyMDTest.h +++ b/Framework/MDAlgorithms/test/MultiplyMDTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -61,7 +61,7 @@ public: /** Get a MDEventWorkspace and check that all events have the given * signal/error */ - void checkMDEWSignal(std::string wsName, signal_t expectedSignal, + void checkMDEWSignal(const std::string &wsName, signal_t expectedSignal, signal_t expectedError) { IMDEventWorkspace_sptr ws = AnalysisDataService::Instance().retrieveWS<IMDEventWorkspace>(wsName); diff --git a/Framework/MDAlgorithms/test/NotMDTest.h b/Framework/MDAlgorithms/test/NotMDTest.h index f7250e76f22f34b19bd8ff2ea856a2131329e03c..d8a77fe0668ce02615c8d2d9073a3d80fba20577 100644 --- a/Framework/MDAlgorithms/test/NotMDTest.h +++ b/Framework/MDAlgorithms/test/NotMDTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/test/OneStepMDEWTest.h b/Framework/MDAlgorithms/test/OneStepMDEWTest.h index 40dc9c80d6c23e530da55cd2d3c9a003b4767aaf..45576c9360b17d241ef40d3a7d740f6df80ed7fb 100644 --- a/Framework/MDAlgorithms/test/OneStepMDEWTest.h +++ b/Framework/MDAlgorithms/test/OneStepMDEWTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/test/OrMDTest.h b/Framework/MDAlgorithms/test/OrMDTest.h index 6c30147b048cc78039eb2cb03b0f9ae720ce6777..d4d8e5ffb7d6c342aa22e50dd740cb8455b6309b 100644 --- a/Framework/MDAlgorithms/test/OrMDTest.h +++ b/Framework/MDAlgorithms/test/OrMDTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/test/PlusMDTest.h b/Framework/MDAlgorithms/test/PlusMDTest.h index 76a56939ab214febb1b14294d0b71ba17e7beec1..5cfd9ec7e607eae735ed0bab0d9a1434581d2462 100644 --- a/Framework/MDAlgorithms/test/PlusMDTest.h +++ b/Framework/MDAlgorithms/test/PlusMDTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/test/PowerMDTest.h b/Framework/MDAlgorithms/test/PowerMDTest.h index 1f75f67be42fe2962ee149159283c29b7c01a4dc..e8bc6e9f12dd6fef3ac40527c5796ffd1cfd5f19 100644 --- a/Framework/MDAlgorithms/test/PowerMDTest.h +++ b/Framework/MDAlgorithms/test/PowerMDTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/test/PrecompiledHeader.h b/Framework/MDAlgorithms/test/PrecompiledHeader.h index 2938ffd0a3e091e68eeb75289179e3af4211b5a3..e6fdf6551cbda585cc789772079a0760cddd669b 100644 --- a/Framework/MDAlgorithms/test/PrecompiledHeader.h +++ b/Framework/MDAlgorithms/test/PrecompiledHeader.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/test/PreprocessDetectorsToMDTest.h b/Framework/MDAlgorithms/test/PreprocessDetectorsToMDTest.h index 0fdc8357d94f94d317df7349fd2da04413b18d09..cc35101cd412f6e19ba6ba8592cc24a35a1b002f 100644 --- a/Framework/MDAlgorithms/test/PreprocessDetectorsToMDTest.h +++ b/Framework/MDAlgorithms/test/PreprocessDetectorsToMDTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/test/QueryMDWorkspaceTest.h b/Framework/MDAlgorithms/test/QueryMDWorkspaceTest.h index 86b5f00b663d676f358a457d1a1c9d3d63a22aad..d012668da65384e12ea5ff3046745affc56c6e32 100644 --- a/Framework/MDAlgorithms/test/QueryMDWorkspaceTest.h +++ b/Framework/MDAlgorithms/test/QueryMDWorkspaceTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -30,7 +30,7 @@ public: QueryMDWorkspaceTest() { FrameworkManager::Instance(); } - void checkInputs(std::string strNormalisation) { + void checkInputs(const std::string &strNormalisation) { MDEventWorkspace3Lean::sptr in_ws = MDEventsTestHelper::makeMDEW<3>(10, -10.0, 20.0, 3); QueryMDWorkspace query; diff --git a/Framework/MDAlgorithms/test/RecalculateTrajectoriesExtentsTest.h b/Framework/MDAlgorithms/test/RecalculateTrajectoriesExtentsTest.h index 3574aea8d6aba8ec393d44eebbaa5ad26ff50879..c96e482de6a64379a0aab79068051952970e7de8 100644 --- a/Framework/MDAlgorithms/test/RecalculateTrajectoriesExtentsTest.h +++ b/Framework/MDAlgorithms/test/RecalculateTrajectoriesExtentsTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -34,8 +34,8 @@ public: delete suite; } - IMDEventWorkspace_sptr create_workspace(std::vector<double> extents, - std::string name) { + IMDEventWorkspace_sptr create_workspace(const std::vector<double> &extents, + const std::string &name) { // ---- empty MDEW ---- TS_ASSERT_EQUALS(extents.size(), 6) CreateMDWorkspace algC; @@ -76,7 +76,7 @@ public: TS_ASSERT(alg.isInitialized()) } - void do_test(std::string name, std::vector<double> extents) { + void do_test(const std::string &name, std::vector<double> extents) { IMDEventWorkspace_sptr inputWS = create_workspace(extents, name); RecalculateTrajectoriesExtents alg; diff --git a/Framework/MDAlgorithms/test/ReflectometryTransformKiKfTest.h b/Framework/MDAlgorithms/test/ReflectometryTransformKiKfTest.h index 94311a05dfc8f09f74cb76a96f53d0fc232f558b..efa63aca905647c72f62e2b901a26f491fe4f9d2 100644 --- a/Framework/MDAlgorithms/test/ReflectometryTransformKiKfTest.h +++ b/Framework/MDAlgorithms/test/ReflectometryTransformKiKfTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/test/ReflectometryTransformPTest.h b/Framework/MDAlgorithms/test/ReflectometryTransformPTest.h index 02eee8b34fff3a3069f884afe4ca046e9be96dda..adefc425b2574491f5ff6145688103bc8e965daa 100644 --- a/Framework/MDAlgorithms/test/ReflectometryTransformPTest.h +++ b/Framework/MDAlgorithms/test/ReflectometryTransformPTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/test/ReflectometryTransformQxQzTest.h b/Framework/MDAlgorithms/test/ReflectometryTransformQxQzTest.h index dc64299087218a5b1b20bf3691d99da622de1892..1979a548e4643883bd6818210551c94c0684a8d6 100644 --- a/Framework/MDAlgorithms/test/ReflectometryTransformQxQzTest.h +++ b/Framework/MDAlgorithms/test/ReflectometryTransformQxQzTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/test/ReplicateMDTest.h b/Framework/MDAlgorithms/test/ReplicateMDTest.h index 1db75ae79d07207831e6167ac6c813e146e1eae8..bfe5a4f1ec8bddb0ac1c63a056fb02d686d8c8fb 100644 --- a/Framework/MDAlgorithms/test/ReplicateMDTest.h +++ b/Framework/MDAlgorithms/test/ReplicateMDTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/test/SaveIsawQvectorTest.h b/Framework/MDAlgorithms/test/SaveIsawQvectorTest.h index 3f3a3954e196b2bbcaf3941d140e0a20795dcc74..f4586277ddd94a241abd1fe40168cbc508c63d1a 100644 --- a/Framework/MDAlgorithms/test/SaveIsawQvectorTest.h +++ b/Framework/MDAlgorithms/test/SaveIsawQvectorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/test/SaveMD2Test.h b/Framework/MDAlgorithms/test/SaveMD2Test.h index 8db75c71ba33d3f411e9efb98d4a108353493b0a..1b45b7e34141bff3bc7bd23bb58c0bb77bd4d031 100644 --- a/Framework/MDAlgorithms/test/SaveMD2Test.h +++ b/Framework/MDAlgorithms/test/SaveMD2Test.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -46,7 +46,7 @@ public: do_test_exec(23, "SaveMD2Test_updating.nxs", true, true); } - void do_test_exec(size_t numPerBox, std::string filename, + void do_test_exec(size_t numPerBox, const std::string &filename, bool MakeFileBacked = false, bool UpdateFileBackEnd = false) { @@ -103,8 +103,8 @@ public: } /// Add some data and update the back-end - void do_test_UpdateFileBackEnd(MDEventWorkspace1Lean::sptr ws, - std::string filename) { + void do_test_UpdateFileBackEnd(const MDEventWorkspace1Lean::sptr &ws, + const std::string &filename) { size_t initial_numEvents = ws->getNPoints(); TSM_ASSERT_EQUALS("Starting off with 230 events.", initial_numEvents, 230); @@ -335,7 +335,7 @@ public: } /** Run SaveMD with the MDHistoWorkspace */ - void doTestHisto(MDHistoWorkspace_sptr ws) { + void doTestHisto(const MDHistoWorkspace_sptr &ws) { std::string filename = "SaveMD2TestHisto.nxs"; SaveMD2 alg; diff --git a/Framework/MDAlgorithms/test/SaveMDTest.h b/Framework/MDAlgorithms/test/SaveMDTest.h index eb86f0d104a7687a0cbc9538277801acfb07d0b9..aa73db31c62c87c008e6588d3b3053cf0842cfd9 100644 --- a/Framework/MDAlgorithms/test/SaveMDTest.h +++ b/Framework/MDAlgorithms/test/SaveMDTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -50,7 +50,7 @@ public: do_test_exec(23, "SaveMDTest_other_file_name_test.nxs", true, false, true); } - void do_test_exec(size_t numPerBox, std::string filename, + void do_test_exec(size_t numPerBox, const std::string &filename, bool MakeFileBacked = false, bool UpdateFileBackEnd = false, bool OtherFileName = false) { @@ -108,8 +108,8 @@ public: } /// Add some data and update the back-end - void do_test_UpdateFileBackEnd(MDEventWorkspace1Lean::sptr ws, - std::string filename) { + void do_test_UpdateFileBackEnd(const MDEventWorkspace1Lean::sptr &ws, + const std::string &filename) { size_t initial_numEvents = ws->getNPoints(); TSM_ASSERT_EQUALS("Starting off with 230 events.", initial_numEvents, 230); @@ -150,8 +150,8 @@ public: Poco::File(fullPath).remove(); } - void do_test_OtherFileName(MDEventWorkspace1Lean::sptr ws, - std::string originalFileName) { + void do_test_OtherFileName(const MDEventWorkspace1Lean::sptr &ws, + const std::string &originalFileName) { const std::string otherFileName = "SaveMD_other_file_name.nxs"; auto algSave = AlgorithmManager::Instance().createUnmanaged("SaveMD"); @@ -284,7 +284,7 @@ public: } /** Run SaveMD with the MDHistoWorkspace */ - void doTestHisto(MDHistoWorkspace_sptr ws) { + void doTestHisto(const MDHistoWorkspace_sptr &ws) { std::string filename = "SaveMDTestHisto.nxs"; SaveMD alg; diff --git a/Framework/MDAlgorithms/test/SaveZODSTest.h b/Framework/MDAlgorithms/test/SaveZODSTest.h index 72455bb640879d38f56879035d1f2d3f51104f32..41eb380be5651b24da845448db6f8183099e9e1b 100644 --- a/Framework/MDAlgorithms/test/SaveZODSTest.h +++ b/Framework/MDAlgorithms/test/SaveZODSTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -27,8 +27,8 @@ public: TS_ASSERT(alg.isInitialized()) } - std::string do_test(std::string InputWorkspace, std::string Filename, - bool expectSuccess = true) { + std::string do_test(const std::string &InputWorkspace, + const std::string &Filename, bool expectSuccess = true) { SaveZODS alg; TS_ASSERT_THROWS_NOTHING(alg.initialize()) TS_ASSERT(alg.isInitialized()) diff --git a/Framework/MDAlgorithms/test/SetMDFrameTest.h b/Framework/MDAlgorithms/test/SetMDFrameTest.h index c91f0814a1e8351990ac4e2cb81950bedf8e293d..567f144ca660dc9c780b40127a728e51a45db1ba 100644 --- a/Framework/MDAlgorithms/test/SetMDFrameTest.h +++ b/Framework/MDAlgorithms/test/SetMDFrameTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/test/SetMDUsingMaskTest.h b/Framework/MDAlgorithms/test/SetMDUsingMaskTest.h index 66169e5ba096ad787bf5d0a6dcc687c8ba6332d6..238ddcdeebdadbc5d3b87c9c9c7c6b4f180546d5 100644 --- a/Framework/MDAlgorithms/test/SetMDUsingMaskTest.h +++ b/Framework/MDAlgorithms/test/SetMDUsingMaskTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -26,9 +26,10 @@ public: TS_ASSERT(alg.isInitialized()) } - void do_test(std::string InputWorkspace, std::string MaskWorkspace, - std::string ValueWorkspace, std::string Value, - std::string OutputWorkspace, double expectedSignal, + void do_test(const std::string &InputWorkspace, + const std::string &MaskWorkspace, + const std::string &ValueWorkspace, const std::string &Value, + const std::string &OutputWorkspace, double expectedSignal, double expectedError, bool succeeds = true) { MDHistoWorkspace_sptr histo_A = MDEventsTestHelper::makeFakeMDHistoWorkspace(2.0, 2, 5, 10.0, 2.0); diff --git a/Framework/MDAlgorithms/test/SingleValueParameterBaseTest.h b/Framework/MDAlgorithms/test/SingleValueParameterBaseTest.h index 564a30e7ddff272dfc3b2c2991f3c910762711b3..2b84d9758ab4a14129e54a160b57db79af49fbc1 100644 --- a/Framework/MDAlgorithms/test/SingleValueParameterBaseTest.h +++ b/Framework/MDAlgorithms/test/SingleValueParameterBaseTest.h @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #pragma once template <typename SingleValueParameter> class SingleValueParameterTests { diff --git a/Framework/MDAlgorithms/test/SliceMDTest.h b/Framework/MDAlgorithms/test/SliceMDTest.h index abb47a7f0d923eff231c1c1a71214ec347ec9a50..7ad71cd97b5bddfe1eefa70115fb254be7b0c1b2 100644 --- a/Framework/MDAlgorithms/test/SliceMDTest.h +++ b/Framework/MDAlgorithms/test/SliceMDTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -144,7 +144,7 @@ public: const uint64_t expectedNumPoints, const size_t expectedNumDims, bool willFail, const std::string &OutputFilename, - IMDEventWorkspace_sptr in_ws) { + const IMDEventWorkspace_sptr &in_ws) { SliceMD alg; TS_ASSERT_THROWS_NOTHING(alg.initialize()) TS_ASSERT(alg.isInitialized()) @@ -210,7 +210,7 @@ public: const std::string &name3, const std::string &name4, const uint64_t expectedNumPoints, const size_t expectedNumDims, bool willFail = false, - std::string OutputFilename = "") { + const std::string &OutputFilename = "") { Mantid::Geometry::QSample frame; IMDEventWorkspace_sptr in_ws = diff --git a/Framework/MDAlgorithms/test/SlicingAlgorithmTest.h b/Framework/MDAlgorithms/test/SlicingAlgorithmTest.h index 02d0219a9a93d8ac889c2b14cc90076502def492..3ca0c17dbec560367f57a0dcd60d5d4a47ab5ad8 100644 --- a/Framework/MDAlgorithms/test/SlicingAlgorithmTest.h +++ b/Framework/MDAlgorithms/test/SlicingAlgorithmTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -594,10 +594,11 @@ public: //---------------------------------------------------------------------------- std::unique_ptr<SlicingAlgorithmImpl> do_createGeneralTransform( - IMDEventWorkspace_sptr inWS, std::string name1, std::string name2, - std::string name3, std::string name4, VMD translation, - std::string extents, std::string numBins, bool ForceOrthogonal = false, - bool NormalizeBasisVectors = true) { + const IMDEventWorkspace_sptr &inWS, const std::string &name1, + const std::string &name2, const std::string &name3, + const std::string &name4, const VMD &translation, + const std::string &extents, const std::string &numBins, + bool ForceOrthogonal = false, bool NormalizeBasisVectors = true) { auto alg = std::make_unique<SlicingAlgorithmImpl>(); alg->m_inWS = inWS; alg->initSlicingProps(); diff --git a/Framework/MDAlgorithms/test/SmoothMDTest.h b/Framework/MDAlgorithms/test/SmoothMDTest.h index f161351e92b596cdbeaf7363a4188f0cd6bfdc90..da93d1ddc42fb9729c821ca1e3e37ab819aed54f 100644 --- a/Framework/MDAlgorithms/test/SmoothMDTest.h +++ b/Framework/MDAlgorithms/test/SmoothMDTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/test/ThresholdMDTest.h b/Framework/MDAlgorithms/test/ThresholdMDTest.h index 4d6a99bb40b96e0d0b51ee9b582ef052b14f622d..64950aae1367ee773e591310eecfe4a3b3621ffc 100644 --- a/Framework/MDAlgorithms/test/ThresholdMDTest.h +++ b/Framework/MDAlgorithms/test/ThresholdMDTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -51,7 +51,7 @@ public: TS_ASSERT(alg.isInitialized()) } - IMDHistoWorkspace_sptr doExecute(IMDHistoWorkspace_sptr inWS, + IMDHistoWorkspace_sptr doExecute(const IMDHistoWorkspace_sptr &inWS, const std::string &condition, const double &referenceValue) { const std::string outWSName = "OutWS"; diff --git a/Framework/MDAlgorithms/test/TransformMDTest.h b/Framework/MDAlgorithms/test/TransformMDTest.h index f7a601e205d2109d4302063167683b402d10fb34..5ab835d75b91bc0e8a7c60f039a85d6b31c35fa9 100644 --- a/Framework/MDAlgorithms/test/TransformMDTest.h +++ b/Framework/MDAlgorithms/test/TransformMDTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -95,7 +95,7 @@ public: } //-------------------------------------------------------------------------------------------- - void do_test_histo(MDHistoWorkspace_sptr ws1, bool inPlace = false) { + void do_test_histo(const MDHistoWorkspace_sptr &ws1, bool inPlace = false) { // Name of the output workspace. std::string outWSName("TransformMDTest_OutputWS"); std::string inWSName("TransformMDTest_ws"); diff --git a/Framework/MDAlgorithms/test/TransposeMDTest.h b/Framework/MDAlgorithms/test/TransposeMDTest.h index 3d49759b34167f42a2193ad2be3d2918f8040112..d7e597f6132afe3e3a783caf289cb2b23325ae2b 100644 --- a/Framework/MDAlgorithms/test/TransposeMDTest.h +++ b/Framework/MDAlgorithms/test/TransposeMDTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/test/UnaryOperationMDTest.h b/Framework/MDAlgorithms/test/UnaryOperationMDTest.h index 56644e211a6bcd31f30d5c30e09e3bfd31c3ada7..24c153af76a6654fbcd2cc3f01911997840be2ea 100644 --- a/Framework/MDAlgorithms/test/UnaryOperationMDTest.h +++ b/Framework/MDAlgorithms/test/UnaryOperationMDTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -60,8 +60,8 @@ public: } /// Run the mock algorithm - void doTest(MockUnaryOperationMD &alg, std::string inName, - std::string outName, bool succeeds = true) { + void doTest(MockUnaryOperationMD &alg, const std::string &inName, + const std::string &outName, bool succeeds = true) { out.reset(); TS_ASSERT_THROWS_NOTHING(alg.initialize()) TS_ASSERT(alg.isInitialized()) diff --git a/Framework/MDAlgorithms/test/UnitsConversionHelperTest.h b/Framework/MDAlgorithms/test/UnitsConversionHelperTest.h index 2a091d6d92831ded7dd0a7241f74085dd22198aa..ca9f8b0f0889d5f8622ec5989cab3c21683d10a6 100644 --- a/Framework/MDAlgorithms/test/UnitsConversionHelperTest.h +++ b/Framework/MDAlgorithms/test/UnitsConversionHelperTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MDAlgorithms/test/WeightedMeanMDTest.h b/Framework/MDAlgorithms/test/WeightedMeanMDTest.h index 286e4b63e043b535f0bae1908ad47635c32440ce..e836ac0fe72261da5d032e3db9aadd4e3b1f89c4 100644 --- a/Framework/MDAlgorithms/test/WeightedMeanMDTest.h +++ b/Framework/MDAlgorithms/test/WeightedMeanMDTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -45,8 +45,8 @@ private: /// Helper method to run the WeightedMean algorithm on two matrix workspaces /// and return the result. - MatrixWorkspace_sptr run_matrix_weighed_mean(MatrixWorkspace_sptr a, - MatrixWorkspace_sptr b, + MatrixWorkspace_sptr run_matrix_weighed_mean(const MatrixWorkspace_sptr &a, + const MatrixWorkspace_sptr &b, const std::string &name) { AnalysisDataServiceImpl &ADS = Mantid::API::AnalysisDataService::Instance(); IAlgorithm *alg = @@ -61,7 +61,8 @@ private: } /// Helper method to run input type validation checks. - void do_test_workspace_input_types(IMDWorkspace_sptr a, IMDWorkspace_sptr b) { + void do_test_workspace_input_types(const IMDWorkspace_sptr &a, + const IMDWorkspace_sptr &b) { WeightedMeanMD alg; alg.initialize(); diff --git a/Framework/MDAlgorithms/test/XorMDTest.h b/Framework/MDAlgorithms/test/XorMDTest.h index 9c3b59194b62db8439c1f2ca6dc8dfd1227c18ca..fe89ac45a9d8eeca2bca8c213c0f54de6c8d527e 100644 --- a/Framework/MDAlgorithms/test/XorMDTest.h +++ b/Framework/MDAlgorithms/test/XorMDTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MPIAlgorithms/inc/MantidMPIAlgorithms/BroadcastWorkspace.h b/Framework/MPIAlgorithms/inc/MantidMPIAlgorithms/BroadcastWorkspace.h index 5334af939a4867ae1e8ca0be828a2361e5aed0ac..714b40ae8c7abbbf6b4aa1dde28eb64d44b4a7e6 100644 --- a/Framework/MPIAlgorithms/inc/MantidMPIAlgorithms/BroadcastWorkspace.h +++ b/Framework/MPIAlgorithms/inc/MantidMPIAlgorithms/BroadcastWorkspace.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MPIAlgorithms/inc/MantidMPIAlgorithms/GatherWorkspaces.h b/Framework/MPIAlgorithms/inc/MantidMPIAlgorithms/GatherWorkspaces.h index 02f60fc533e2a2b8cd5eb930130fc0fb534a7cd9..a8ae873f0ab74088a2138450fb888d47ce33ab60 100644 --- a/Framework/MPIAlgorithms/inc/MantidMPIAlgorithms/GatherWorkspaces.h +++ b/Framework/MPIAlgorithms/inc/MantidMPIAlgorithms/GatherWorkspaces.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MPIAlgorithms/inc/MantidMPIAlgorithms/MPISerialization.h b/Framework/MPIAlgorithms/inc/MantidMPIAlgorithms/MPISerialization.h index d7f4a4935ddbb619dea85765e0c400b2c7eb5731..10b93e020b97a6cc67280d02a4a38e58b257901c 100644 --- a/Framework/MPIAlgorithms/inc/MantidMPIAlgorithms/MPISerialization.h +++ b/Framework/MPIAlgorithms/inc/MantidMPIAlgorithms/MPISerialization.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MPIAlgorithms/scripts/CNCS_mpi_example.py b/Framework/MPIAlgorithms/scripts/CNCS_mpi_example.py index edb6e1d4076a762277ef44ac5020494e27ab8ee4..eabde4dc9efa44d171234af2a828dfb36698e8cc 100644 --- a/Framework/MPIAlgorithms/scripts/CNCS_mpi_example.py +++ b/Framework/MPIAlgorithms/scripts/CNCS_mpi_example.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + ############################################################################################# # diff --git a/Framework/MPIAlgorithms/scripts/NOM1.py b/Framework/MPIAlgorithms/scripts/NOM1.py index b4bad90183ce63a1eb502e348e8e5099b1e08059..fd7f13f1f37da770e5408f37f2d58ab3217e8253 100644 --- a/Framework/MPIAlgorithms/scripts/NOM1.py +++ b/Framework/MPIAlgorithms/scripts/NOM1.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from mantid.simpleapi import * diff --git a/Framework/MPIAlgorithms/scripts/NOMAD_mpi_example.py b/Framework/MPIAlgorithms/scripts/NOMAD_mpi_example.py index 4754bac01d068b2e85c2e52f28a666e24359b6c1..03acb609b93798cce15d21b119e9011f157b9b6b 100644 --- a/Framework/MPIAlgorithms/scripts/NOMAD_mpi_example.py +++ b/Framework/MPIAlgorithms/scripts/NOMAD_mpi_example.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from mantid.simpleapi import * diff --git a/Framework/MPIAlgorithms/scripts/PG3_mpi_example.py b/Framework/MPIAlgorithms/scripts/PG3_mpi_example.py index f0432965fcabe46c8278be6e02808aca83a01d7b..bf6e30b0b632e2bdd75a49a2ff3aa5e073380afc 100644 --- a/Framework/MPIAlgorithms/scripts/PG3_mpi_example.py +++ b/Framework/MPIAlgorithms/scripts/PG3_mpi_example.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + ############################################################################################# # diff --git a/Framework/MPIAlgorithms/scripts/PG3_mpi_reduction.py b/Framework/MPIAlgorithms/scripts/PG3_mpi_reduction.py index ee71dedfb5952cece53a5289c03906d664f34c24..def0bbb2518fd6a02e7224614f2a24a5e5e10423 100644 --- a/Framework/MPIAlgorithms/scripts/PG3_mpi_reduction.py +++ b/Framework/MPIAlgorithms/scripts/PG3_mpi_reduction.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from mantid.simpleapi import * diff --git a/Framework/MPIAlgorithms/src/BroadcastWorkspace.cpp b/Framework/MPIAlgorithms/src/BroadcastWorkspace.cpp index e98fc1b1e9754a5caddfce306b542e0daf540b9e..08886d81c74b9eebf4432099434a2c928f71561b 100644 --- a/Framework/MPIAlgorithms/src/BroadcastWorkspace.cpp +++ b/Framework/MPIAlgorithms/src/BroadcastWorkspace.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/MPIAlgorithms/src/GatherWorkspaces.cpp b/Framework/MPIAlgorithms/src/GatherWorkspaces.cpp index 5ce0ec06535b4d923a2912b368fe309f30e7ef5f..2835bcabc8bdeb557119dfd58a3d15b208d23a53 100644 --- a/Framework/MPIAlgorithms/src/GatherWorkspaces.cpp +++ b/Framework/MPIAlgorithms/src/GatherWorkspaces.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/MPIAlgorithms/test/BroadcastWorkspaceTest.h b/Framework/MPIAlgorithms/test/BroadcastWorkspaceTest.h index fb3965c7de0109139a07ff50cd8f55958039695e..69cc0eaf314edfaeabb8dc4e730a0d8fa329a20a 100644 --- a/Framework/MPIAlgorithms/test/BroadcastWorkspaceTest.h +++ b/Framework/MPIAlgorithms/test/BroadcastWorkspaceTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/MPIAlgorithms/test/GatherWorkspacesTest.h b/Framework/MPIAlgorithms/test/GatherWorkspacesTest.h index 9605135e2fad7b1600186376136cb59c8757ee55..4f25b15b484d70c2ec31916285fa4e52649412e1 100644 --- a/Framework/MPIAlgorithms/test/GatherWorkspacesTest.h +++ b/Framework/MPIAlgorithms/test/GatherWorkspacesTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Muon/inc/MantidMuon/AlphaCalc.h b/Framework/Muon/inc/MantidMuon/AlphaCalc.h index e59734eee31acf64e2e3e354a662daf0e2380f9d..80357df2caa55f8d6754bd6e453f44b6cffa9d0a 100644 --- a/Framework/Muon/inc/MantidMuon/AlphaCalc.h +++ b/Framework/Muon/inc/MantidMuon/AlphaCalc.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Muon/inc/MantidMuon/ApplyDeadTimeCorr.h b/Framework/Muon/inc/MantidMuon/ApplyDeadTimeCorr.h index 6f582e4421f3a31752d1acf24d8c7ca1ccad25a2..22a6212ea0c05eae3510ea27f3ae3987de1173a7 100644 --- a/Framework/Muon/inc/MantidMuon/ApplyDeadTimeCorr.h +++ b/Framework/Muon/inc/MantidMuon/ApplyDeadTimeCorr.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Muon/inc/MantidMuon/ApplyMuonDetectorGroupPairing.h b/Framework/Muon/inc/MantidMuon/ApplyMuonDetectorGroupPairing.h index 723c0d8641218d704e376c0f9e68ed071a74b1c3..ff6d99d2776af6586e4d976078b49d93d65dfc61 100644 --- a/Framework/Muon/inc/MantidMuon/ApplyMuonDetectorGroupPairing.h +++ b/Framework/Muon/inc/MantidMuon/ApplyMuonDetectorGroupPairing.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -56,14 +56,16 @@ public: /// return a workspace for a pair of detector groups, specified in options. API::MatrixWorkspace_sptr - createPairWorkspaceManually(API::Workspace_sptr inputWS, const bool noRebin); + createPairWorkspaceManually(const API::Workspace_sptr &inputWS, + const bool noRebin); /// Store the input properties in options. Muon::AnalysisOptions getUserInput(); /// Set MuonProcess properties (input workspace and period properties). void - setMuonProcessPeriodProperties(IAlgorithm &alg, API::Workspace_sptr inputWS, + setMuonProcessPeriodProperties(IAlgorithm &alg, + const API::Workspace_sptr &inputWS, const Muon::AnalysisOptions &options) const; /// Set MuonProcess properties according to the given options. @@ -72,10 +74,9 @@ public: const Muon::AnalysisOptions &options) const; /// Apply the asymmetry calculation to two workspaces. - API::MatrixWorkspace_sptr - createPairWorkspaceFromGroupWorkspaces(API::MatrixWorkspace_sptr inputWS1, - API::MatrixWorkspace_sptr inputWS2, - const double &alpha); + API::MatrixWorkspace_sptr createPairWorkspaceFromGroupWorkspaces( + const API::MatrixWorkspace_sptr &inputWS1, + const API::MatrixWorkspace_sptr &inputWS2, const double &alpha); /// Set grouping properties of MuonProcess void setMuonProcessAlgorithmGroupingProperties( diff --git a/Framework/Muon/inc/MantidMuon/ApplyMuonDetectorGrouping.h b/Framework/Muon/inc/MantidMuon/ApplyMuonDetectorGrouping.h index e437c3e07f2a6fab3ff016208c0eaf64457272ff..4f6256f9a865df3d2f91c792a1d1f2b5c341a8ed 100644 --- a/Framework/Muon/inc/MantidMuon/ApplyMuonDetectorGrouping.h +++ b/Framework/Muon/inc/MantidMuon/ApplyMuonDetectorGrouping.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -59,9 +59,9 @@ private: void clipXRangeToWorkspace(const API::WorkspaceGroup &ws, Muon::AnalysisOptions &options); /// Creates and analyses a workspace, if noRebin does not rebin. - API::Workspace_sptr createAnalysisWorkspace(API::Workspace_sptr inputWS, - bool noRebin, - Muon::AnalysisOptions options); + API::Workspace_sptr + createAnalysisWorkspace(const API::Workspace_sptr &inputWS, bool noRebin, + Muon::AnalysisOptions options); /// Sets algorithm properties according to options. void setMuonProcessAlgorithmProperties(API::IAlgorithm &alg, const AnalysisOptions &options) const; @@ -70,7 +70,7 @@ private: /// MuonProcess. void setMuonProcessPeriodProperties(API::IAlgorithm &alg, - API::Workspace_sptr inputWS, + const API::Workspace_sptr &inputWS, const Muon::AnalysisOptions &options) const; void setMuonProcessAlgorithmOutputTypeProperty( diff --git a/Framework/Muon/inc/MantidMuon/AsymmetryCalc.h b/Framework/Muon/inc/MantidMuon/AsymmetryCalc.h index 85f5429bc4fd87fd0aae4615ad5ce63c71f50cee..a7036abc0a1d1742eee0b26b63904cff7b947afc 100644 --- a/Framework/Muon/inc/MantidMuon/AsymmetryCalc.h +++ b/Framework/Muon/inc/MantidMuon/AsymmetryCalc.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Muon/inc/MantidMuon/CalMuonDeadTime.h b/Framework/Muon/inc/MantidMuon/CalMuonDeadTime.h index 1399aad9577a2b1417820c45acb7426feb71668c..80415cb5e6cb6089ab16506d955b8d70c0b74c03 100644 --- a/Framework/Muon/inc/MantidMuon/CalMuonDeadTime.h +++ b/Framework/Muon/inc/MantidMuon/CalMuonDeadTime.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Muon/inc/MantidMuon/CalMuonDetectorPhases.h b/Framework/Muon/inc/MantidMuon/CalMuonDetectorPhases.h index 0c855ba9b7d7fd9fd17901614619030947813972..018a1393e8089d854ace3c2484c69cb52b792706 100644 --- a/Framework/Muon/inc/MantidMuon/CalMuonDetectorPhases.h +++ b/Framework/Muon/inc/MantidMuon/CalMuonDetectorPhases.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -57,7 +57,8 @@ private: removeExpDecay(const API::MatrixWorkspace_sptr &wsInput); /// Fit the workspace void fitWorkspace(const API::MatrixWorkspace_sptr &ws, double freq, - std::string groupName, API::ITableWorkspace_sptr resTab, + const std::string &groupName, + const API::ITableWorkspace_sptr &resTab, API::WorkspaceGroup_sptr &resGroup); /// Create the fitting function as string std::string createFittingFunction(double freq, bool fixFreq); diff --git a/Framework/Muon/inc/MantidMuon/CalculateMuonAsymmetry.h b/Framework/Muon/inc/MantidMuon/CalculateMuonAsymmetry.h index 831c8cf138d41ec59ffa67e3cbe8fc370fec7b9f..5fe014f469ca7e653cd1578287003732136a7061 100644 --- a/Framework/Muon/inc/MantidMuon/CalculateMuonAsymmetry.h +++ b/Framework/Muon/inc/MantidMuon/CalculateMuonAsymmetry.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -69,10 +69,10 @@ private: void init() override; void exec() override; // calculate Muon normalisation constant - std::vector<double> getNormConstants(std::vector<std::string> wsNames); + std::vector<double> getNormConstants(const std::vector<std::string> &wsNames); std::map<std::string, std::string> validateInputs() override; double getNormValue(API::CompositeFunction_sptr &func); - void addNormalizedFits(size_t numberOfFits, const std::vector<double>); + void addNormalizedFits(size_t numberOfFits, const std::vector<double> &); void normalizeWorkspace( const API::MatrixWorkspace_sptr &normalizedWorkspace, const API::MatrixWorkspace_const_sptr &unnormalizedWorkspace, diff --git a/Framework/Muon/inc/MantidMuon/ConvertFitFunctionForMuonTFAsymmetry.h b/Framework/Muon/inc/MantidMuon/ConvertFitFunctionForMuonTFAsymmetry.h index 78c871cf6e0d4875352e75b54b26b798d332b53b..8c540b31ce972bc7d34fe654ad8f345fc188efc6 100644 --- a/Framework/Muon/inc/MantidMuon/ConvertFitFunctionForMuonTFAsymmetry.h +++ b/Framework/Muon/inc/MantidMuon/ConvertFitFunctionForMuonTFAsymmetry.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Muon/inc/MantidMuon/EstimateMuonAsymmetryFromCounts.h b/Framework/Muon/inc/MantidMuon/EstimateMuonAsymmetryFromCounts.h index bc905f7e7f2bc0e24884ea15785654d2ba6275fa..b74ba4b76df197f9f841b3eaa057f59ad5e33050 100644 --- a/Framework/Muon/inc/MantidMuon/EstimateMuonAsymmetryFromCounts.h +++ b/Framework/Muon/inc/MantidMuon/EstimateMuonAsymmetryFromCounts.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Muon/inc/MantidMuon/LoadAndApplyMuonDetectorGrouping.h b/Framework/Muon/inc/MantidMuon/LoadAndApplyMuonDetectorGrouping.h index 9600944d922855db2547bdaa293eebd8a5ad9b41..a7b9ec57c752df18ed11b1eb0cfb4b9d930e72bf 100644 --- a/Framework/Muon/inc/MantidMuon/LoadAndApplyMuonDetectorGrouping.h +++ b/Framework/Muon/inc/MantidMuon/LoadAndApplyMuonDetectorGrouping.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -61,14 +61,14 @@ private: /// Add all the supplied groups to the ADS, inside wsGrouped, by /// executing the ApplyMuonDetectorGrouping algorithm void addGroupingToADS(const Mantid::Muon::AnalysisOptions &options, - Mantid::API::Workspace_sptr ws, - Mantid::API::WorkspaceGroup_sptr wsGrouped); + const Mantid::API::Workspace_sptr &ws, + const Mantid::API::WorkspaceGroup_sptr &wsGrouped); /// Add all the supplied pairs to the ADS, inside wsGrouped, by /// executing the ApplyMuonDetectorGroupPairing algorithm void addPairingToADS(const Mantid::Muon::AnalysisOptions &options, - Mantid::API::Workspace_sptr ws, - Mantid::API::WorkspaceGroup_sptr wsGrouped); + const Mantid::API::Workspace_sptr &ws, + const Mantid::API::WorkspaceGroup_sptr &wsGrouped); void addGroupingInformationToADS(const Mantid::API::Grouping &grouping); @@ -87,8 +87,9 @@ private: /// are paired are also included as groups. void CheckValidGroupsAndPairs(const Mantid::API::Grouping &grouping); - void getTimeLimitsFromInputWorkspace(Mantid::API::Workspace_sptr inputWS, - Mantid::Muon::AnalysisOptions &options); + void + getTimeLimitsFromInputWorkspace(const Mantid::API::Workspace_sptr &inputWS, + Mantid::Muon::AnalysisOptions &options); void getTimeLimitsFromInputs(AnalysisOptions &options); }; diff --git a/Framework/Muon/inc/MantidMuon/MuonAlgorithmHelper.h b/Framework/Muon/inc/MantidMuon/MuonAlgorithmHelper.h index 164cd90c80d27d33a1abf141f08de0cb776e1708..7e22e0efeca28579f90a1928326524c21d31f8c6 100644 --- a/Framework/Muon/inc/MantidMuon/MuonAlgorithmHelper.h +++ b/Framework/Muon/inc/MantidMuon/MuonAlgorithmHelper.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -55,7 +55,7 @@ namespace MuonAlgorithmHelper { /// Returns a first period MatrixWorkspace in a run workspace MANTID_MUON_DLL Mantid::API::MatrixWorkspace_sptr -firstPeriod(API::Workspace_sptr ws); +firstPeriod(const API::Workspace_sptr &ws); /// Get a run label for a workspace MANTID_MUON_DLL std::string getRunLabel(API::Workspace_sptr ws); @@ -89,15 +89,15 @@ generateWorkspaceName(const Muon::DatasetParams ¶ms); /// Find all the detector IDs contained inside a workspace (either matrix or /// group) and return as an ordered set. MANTID_MUON_DLL std::set<Mantid::detid_t> -getAllDetectorIDsFromWorkspace(Mantid::API::Workspace_sptr ws); +getAllDetectorIDsFromWorkspace(const Mantid::API::Workspace_sptr &ws); /// Find all the detector IDs contained inside a group workspace MANTID_MUON_DLL std::set<Mantid::detid_t> -getAllDetectorIDsFromGroupWorkspace(Mantid::API::WorkspaceGroup_sptr ws); +getAllDetectorIDsFromGroupWorkspace(const Mantid::API::WorkspaceGroup_sptr &ws); /// Find all the detector IDs contained inside a matrix workspace -MANTID_MUON_DLL std::set<Mantid::detid_t> -getAllDetectorIDsFromMatrixWorkspace(Mantid::API::MatrixWorkspace_sptr ws); +MANTID_MUON_DLL std::set<Mantid::detid_t> getAllDetectorIDsFromMatrixWorkspace( + const Mantid::API::MatrixWorkspace_sptr &ws); /// Find all the detector IDs contained inside a grouping object and return as a /// vector of ints @@ -108,7 +108,7 @@ getAllDetectorIDsFromGroup(const API::Grouping &grouping); /// workspace. Workspace can be matrix or group type. MANTID_MUON_DLL bool checkGroupDetectorsInWorkspace(const API::Grouping &grouping, - API::Workspace_sptr ws); + const API::Workspace_sptr &ws); /// Checks that all of the entries of a vector are contained in a set. MANTID_MUON_DLL bool checkItemsInSet(const std::vector<int> &items, @@ -142,9 +142,9 @@ subtractWorkspaces(const Mantid::API::MatrixWorkspace_sptr &lhs, MANTID_MUON_DLL Mantid::API::MatrixWorkspace_sptr extractSpectrum(const Mantid::API::Workspace_sptr &inputWS, const int index); -MANTID_MUON_DLL void addSampleLog(Mantid::API::MatrixWorkspace_sptr workspace, - const std::string &logName, - const std::string &logValue); +MANTID_MUON_DLL void +addSampleLog(const Mantid::API::MatrixWorkspace_sptr &workspace, + const std::string &logName, const std::string &logValue); MANTID_MUON_DLL bool isAlphanumericOrUnderscore(char character); diff --git a/Framework/Muon/inc/MantidMuon/MuonAsymmetryHelper.h b/Framework/Muon/inc/MantidMuon/MuonAsymmetryHelper.h index 46e8823b2eca955b1ee07f39e39019f3e908fd60..4959e7f5da63f972797c764360fc57cf130d1475 100644 --- a/Framework/Muon/inc/MantidMuon/MuonAsymmetryHelper.h +++ b/Framework/Muon/inc/MantidMuon/MuonAsymmetryHelper.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Muon/inc/MantidMuon/MuonGroupDetectors.h b/Framework/Muon/inc/MantidMuon/MuonGroupDetectors.h index e3d6554c4867928a642d0c1dbde69946139ffb7d..d52eaf6fb89107e829536862011abe2b72da2147 100644 --- a/Framework/Muon/inc/MantidMuon/MuonGroupDetectors.h +++ b/Framework/Muon/inc/MantidMuon/MuonGroupDetectors.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Muon/inc/MantidMuon/MuonGroupingAsymmetry.h b/Framework/Muon/inc/MantidMuon/MuonGroupingAsymmetry.h index 5ba6290e0eb56f61beec837dbc27bb617f4a6f9e..60c713dd299549d8a7f087c1fd3a448899263bf2 100644 --- a/Framework/Muon/inc/MantidMuon/MuonGroupingAsymmetry.h +++ b/Framework/Muon/inc/MantidMuon/MuonGroupingAsymmetry.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -44,9 +44,9 @@ private: std::map<std::string, std::string> validateInputs() override; - WorkspaceGroup_sptr createGroupWorkspace(WorkspaceGroup_sptr inputWS); + WorkspaceGroup_sptr createGroupWorkspace(const WorkspaceGroup_sptr &inputWS); - void addGroupingAsymmetrySampleLogs(MatrixWorkspace_sptr workspace); + void addGroupingAsymmetrySampleLogs(const MatrixWorkspace_sptr &workspace); }; } // namespace Muon diff --git a/Framework/Muon/inc/MantidMuon/MuonGroupingCounts.h b/Framework/Muon/inc/MantidMuon/MuonGroupingCounts.h index a1c5f8f88fda48c0b057fb0a7b64d6cf5e261ea4..59caf16207398ffe13675cc6d730342da193788f 100644 --- a/Framework/Muon/inc/MantidMuon/MuonGroupingCounts.h +++ b/Framework/Muon/inc/MantidMuon/MuonGroupingCounts.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -42,7 +42,7 @@ private: void init() override; void exec() override; - void setGroupingSampleLogs(MatrixWorkspace_sptr workspace); + void setGroupingSampleLogs(const MatrixWorkspace_sptr &workspace); }; } // namespace Muon diff --git a/Framework/Muon/inc/MantidMuon/MuonPairingAsymmetry.h b/Framework/Muon/inc/MantidMuon/MuonPairingAsymmetry.h index b524a9d93122d23e9981a4356e6e1a1513c59fc4..2df71cb4fd18a37944f017d23e0b0e41c2b2150e 100644 --- a/Framework/Muon/inc/MantidMuon/MuonPairingAsymmetry.h +++ b/Framework/Muon/inc/MantidMuon/MuonPairingAsymmetry.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -47,27 +47,27 @@ private: std::map<std::string, std::string> validateInputs() override; void validateManualGroups(std::map<std::string, std::string> &errors); void validateGroupsWorkspaces(std::map<std::string, std::string> &errors); - void validatePeriods(WorkspaceGroup_sptr inputWS, + void validatePeriods(const WorkspaceGroup_sptr &inputWS, std::map<std::string, std::string> &errors); - WorkspaceGroup_sptr createGroupWorkspace(WorkspaceGroup_sptr inputWS); - MatrixWorkspace_sptr appendSpectra(MatrixWorkspace_sptr inputWS1, - MatrixWorkspace_sptr inputWS2); + WorkspaceGroup_sptr createGroupWorkspace(const WorkspaceGroup_sptr &inputWS); + MatrixWorkspace_sptr appendSpectra(const MatrixWorkspace_sptr &inputWS1, + const MatrixWorkspace_sptr &inputWS2); /// Perform an asymmetry calculation - MatrixWorkspace_sptr pairAsymmetryCalc(MatrixWorkspace_sptr inputWS, + MatrixWorkspace_sptr pairAsymmetryCalc(const MatrixWorkspace_sptr &inputWS, const double &alpha); MatrixWorkspace_sptr calcPairAsymmetryWithSummedAndSubtractedPeriods( const std::vector<int> &summedPeriods, const std::vector<int> &subtractedPeriods, - WorkspaceGroup_sptr groupedPeriods, const double &alpha); + const WorkspaceGroup_sptr &groupedPeriods, const double &alpha); /// Execute the algorithm if "SpecifyGroupsManually" is checked MatrixWorkspace_sptr execSpecifyGroupsManually(); MatrixWorkspace_sptr execGroupWorkspaceInput(); - void setPairAsymmetrySampleLogs(MatrixWorkspace_sptr workspace); + void setPairAsymmetrySampleLogs(const MatrixWorkspace_sptr &workspace); }; } // namespace Muon diff --git a/Framework/Muon/inc/MantidMuon/MuonPreProcess.h b/Framework/Muon/inc/MantidMuon/MuonPreProcess.h index 442fcb76a4775c89ffe7f595314ce1bb3995e691..70b2407de69366c355be54fb57194ae842d82aa9 100644 --- a/Framework/Muon/inc/MantidMuon/MuonPreProcess.h +++ b/Framework/Muon/inc/MantidMuon/MuonPreProcess.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -45,11 +45,11 @@ private: void exec() override; /// Apply a series of corrections ; DTC, offset, rebin, crop - WorkspaceGroup_sptr correctWorkspaces(WorkspaceGroup_sptr wsGroup); + WorkspaceGroup_sptr correctWorkspaces(const WorkspaceGroup_sptr &wsGroup); MatrixWorkspace_sptr correctWorkspace(MatrixWorkspace_sptr ws); MatrixWorkspace_sptr applyDTC(MatrixWorkspace_sptr ws, - TableWorkspace_sptr dt); + const TableWorkspace_sptr &dt); MatrixWorkspace_sptr applyTimeOffset(MatrixWorkspace_sptr ws, const double &offset); @@ -60,10 +60,10 @@ private: MatrixWorkspace_sptr applyRebinning(MatrixWorkspace_sptr ws, const std::vector<double> &rebinArgs); - MatrixWorkspace_sptr cloneWorkspace(MatrixWorkspace_sptr ws); + MatrixWorkspace_sptr cloneWorkspace(const MatrixWorkspace_sptr &ws); /// Add the correction inputs into the logs - void addPreProcessSampleLogs(WorkspaceGroup_sptr group); + void addPreProcessSampleLogs(const WorkspaceGroup_sptr &group); /// Perform validation of inputs to the algorithm std::map<std::string, std::string> validateInputs() override; diff --git a/Framework/Muon/inc/MantidMuon/PhaseQuadMuon.h b/Framework/Muon/inc/MantidMuon/PhaseQuadMuon.h index 62cb5e2e1accd9bf6079c636c379cd77bc42b57b..805e2d5d464c0554f666169faa2631bc54ae457e 100644 --- a/Framework/Muon/inc/MantidMuon/PhaseQuadMuon.h +++ b/Framework/Muon/inc/MantidMuon/PhaseQuadMuon.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Muon/inc/MantidMuon/PlotAsymmetryByLogValue.h b/Framework/Muon/inc/MantidMuon/PlotAsymmetryByLogValue.h index 93e43093af5211c9d7df4cf92741b20380e4dad0..9eebe959a5257263ba3f1213212a822a3ab4b439 100644 --- a/Framework/Muon/inc/MantidMuon/PlotAsymmetryByLogValue.h +++ b/Framework/Muon/inc/MantidMuon/PlotAsymmetryByLogValue.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -67,7 +67,7 @@ private: // Load run, apply dead time corrections and detector grouping API::Workspace_sptr doLoad(size_t runNumber); // Analyse loaded run - void doAnalysis(API::Workspace_sptr loadedWs, size_t index); + void doAnalysis(const API::Workspace_sptr &loadedWs, size_t index); // Parse run names void parseRunNames(std::string &firstFN, std::string &lastFN, std::string &fnBase, std::string &fnExt, int &fnZeros); @@ -83,10 +83,11 @@ private: void groupDetectors(API::Workspace_sptr &loadedWs, API::Workspace_sptr grouping); /// Calculate the integral asymmetry for a workspace (single period) - void calcIntAsymmetry(API::MatrixWorkspace_sptr ws, double &Y, double &E); + void calcIntAsymmetry(const API::MatrixWorkspace_sptr &ws, double &Y, + double &E); /// Calculate the integral asymmetry for a workspace (red & green) - void calcIntAsymmetry(API::MatrixWorkspace_sptr ws_red, - API::MatrixWorkspace_sptr ws_green, double &Y, + void calcIntAsymmetry(const API::MatrixWorkspace_sptr &ws_red, + const API::MatrixWorkspace_sptr &ws_green, double &Y, double &E); /// Group detectors void groupDetectors(API::MatrixWorkspace_sptr &ws, diff --git a/Framework/Muon/inc/MantidMuon/RRFMuon.h b/Framework/Muon/inc/MantidMuon/RRFMuon.h index 2e0139d04bceb89ffd3caa9393e396ef4ec89606..54ce32546cb730641b8dd77132a69ad880d56cee 100644 --- a/Framework/Muon/inc/MantidMuon/RRFMuon.h +++ b/Framework/Muon/inc/MantidMuon/RRFMuon.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -43,7 +43,7 @@ private: /// Run the algorithm void exec() override; /// Get conversion factor from frequency units to input workspace units - double unitConversionFactor(std::string uin, std::string uuser); + double unitConversionFactor(const std::string &uin, const std::string &uuser); }; } // namespace Algorithms diff --git a/Framework/Muon/inc/MantidMuon/RemoveExpDecay.h b/Framework/Muon/inc/MantidMuon/RemoveExpDecay.h index 2d93d3550aa6c5b47408b50cabae91249a31a24e..03b02418ad05daa188f28bc1b5aa550a6b19c8c2 100644 --- a/Framework/Muon/inc/MantidMuon/RemoveExpDecay.h +++ b/Framework/Muon/inc/MantidMuon/RemoveExpDecay.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -56,7 +56,8 @@ private: HistogramData::Histogram removeDecay(const HistogramData::Histogram &histogram) const; // calculate Muon normalisation constant - double calNormalisationConst(API::MatrixWorkspace_sptr ws, int wsIndex); + double calNormalisationConst(const API::MatrixWorkspace_sptr &ws, + int wsIndex); }; } // namespace Algorithms diff --git a/Framework/Muon/src/AlphaCalc.cpp b/Framework/Muon/src/AlphaCalc.cpp index 27a7c96dd7a15b3653795b43fd3d902e3a1e6c00..99bf61c73d33efee1cf31924f329f984c08698c6 100644 --- a/Framework/Muon/src/AlphaCalc.cpp +++ b/Framework/Muon/src/AlphaCalc.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/Muon/src/ApplyDeadTimeCorr.cpp b/Framework/Muon/src/ApplyDeadTimeCorr.cpp index fb7e1a631f4090e8252e20fbf3a8fcba32f07d43..d0c8680187c5d260fabeaf422babd383bd67df23 100644 --- a/Framework/Muon/src/ApplyDeadTimeCorr.cpp +++ b/Framework/Muon/src/ApplyDeadTimeCorr.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMuon/ApplyDeadTimeCorr.h" #include "MantidAPI/EqualBinSizesValidator.h" diff --git a/Framework/Muon/src/ApplyMuonDetectorGroupPairing.cpp b/Framework/Muon/src/ApplyMuonDetectorGroupPairing.cpp index e4d784e88b2366fade010442e11ea46523639c3d..7a26b99d096fbcd618a916bb81bc59ec09247f91 100644 --- a/Framework/Muon/src/ApplyMuonDetectorGroupPairing.cpp +++ b/Framework/Muon/src/ApplyMuonDetectorGroupPairing.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMuon/ApplyMuonDetectorGroupPairing.h" #include "MantidMuon/MuonAlgorithmHelper.h" @@ -22,6 +22,8 @@ #include <algorithm> #include <cctype> #include <string> +#include <utility> + #include <vector> const std::vector<std::string> g_analysisTypes = {"Counts", "Asymmetry"}; @@ -340,7 +342,7 @@ const std::string ApplyMuonDetectorGroupPairing::getGroupWorkspaceNamesManually( */ MatrixWorkspace_sptr ApplyMuonDetectorGroupPairing::createPairWorkspaceFromGroupWorkspaces( - MatrixWorkspace_sptr inputWS1, MatrixWorkspace_sptr inputWS2, + const MatrixWorkspace_sptr &inputWS1, const MatrixWorkspace_sptr &inputWS2, const double &alpha) { IAlgorithm_sptr alg = this->createChildAlgorithm("AppendSpectra"); @@ -372,7 +374,7 @@ ApplyMuonDetectorGroupPairing::createPairWorkspaceFromGroupWorkspaces( * options. */ MatrixWorkspace_sptr ApplyMuonDetectorGroupPairing::createPairWorkspaceManually( - Workspace_sptr inputWS, bool noRebin) { + const Workspace_sptr &inputWS, bool noRebin) { IAlgorithm_sptr alg = this->createChildAlgorithm("MuonProcess"); if (!this->isLogging()) @@ -427,8 +429,8 @@ Muon::AnalysisOptions ApplyMuonDetectorGroupPairing::getUserInput() { // Checks that the detector IDs in grouping are in the workspace void ApplyMuonDetectorGroupPairing::checkDetectorIDsInWorkspace( API::Grouping &grouping, Workspace_sptr workspace) { - bool check = - MuonAlgorithmHelper::checkGroupDetectorsInWorkspace(grouping, workspace); + bool check = MuonAlgorithmHelper::checkGroupDetectorsInWorkspace( + grouping, std::move(workspace)); if (!check) { g_log.error("One or more detector IDs specified in the groups is not " "contained in the InputWorkspace"); @@ -443,7 +445,7 @@ void ApplyMuonDetectorGroupPairing::checkDetectorIDsInWorkspace( * to the given options. For use with MuonProcess. */ void ApplyMuonDetectorGroupPairing::setMuonProcessPeriodProperties( - IAlgorithm &alg, Workspace_sptr inputWS, + IAlgorithm &alg, const Workspace_sptr &inputWS, const Muon::AnalysisOptions &options) const { auto inputGroup = boost::make_shared<WorkspaceGroup>(); diff --git a/Framework/Muon/src/ApplyMuonDetectorGrouping.cpp b/Framework/Muon/src/ApplyMuonDetectorGrouping.cpp index 71b28234ab2ea76d8620dda69df9b8e7cea8c02f..02fca46359cbdb32c236e8e753fc6d0c75247758 100644 --- a/Framework/Muon/src/ApplyMuonDetectorGrouping.cpp +++ b/Framework/Muon/src/ApplyMuonDetectorGrouping.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMuon/ApplyMuonDetectorGrouping.h" #include "MantidMuon/MuonAlgorithmHelper.h" @@ -19,6 +19,8 @@ #include <algorithm> #include <cctype> #include <string> +#include <utility> + #include <vector> const std::vector<std::string> g_analysisTypes = {"Counts", "Asymmetry"}; @@ -44,7 +46,7 @@ Mantid::Muon::PlotType getPlotType(const std::string &plotType) { * single period otherwise leave it alone. */ Mantid::API::WorkspaceGroup_sptr -convertInputWStoWSGroup(Mantid::API::Workspace_sptr inputWS) { +convertInputWStoWSGroup(const Mantid::API::Workspace_sptr &inputWS) { // Cast input WS to a WorkspaceGroup auto muonWS = boost::make_shared<Mantid::API::WorkspaceGroup>(); @@ -317,7 +319,8 @@ void ApplyMuonDetectorGrouping::clipXRangeToWorkspace( * Creates workspace, processing the data using the MuonProcess algorithm. */ Workspace_sptr ApplyMuonDetectorGrouping::createAnalysisWorkspace( - Workspace_sptr inputWS, bool noRebin, Muon::AnalysisOptions options) { + const Workspace_sptr &inputWS, bool noRebin, + Muon::AnalysisOptions options) { IAlgorithm_sptr alg = Algorithm::createChildAlgorithm("MuonProcess"); @@ -325,7 +328,7 @@ Workspace_sptr ApplyMuonDetectorGrouping::createAnalysisWorkspace( options.rebinArgs = ""; } - setMuonProcessPeriodProperties(*alg, inputWS, options); + setMuonProcessPeriodProperties(*alg, std::move(inputWS), options); setMuonProcessAlgorithmProperties(*alg, options); alg->setPropertyValue("OutputWorkspace", "__NotUsed__"); alg->execute(); @@ -350,7 +353,7 @@ bool ApplyMuonDetectorGrouping::renameAndMoveUnNormWorkspace( * to the given options. For use with MuonProcess. */ void ApplyMuonDetectorGrouping::setMuonProcessPeriodProperties( - IAlgorithm &alg, Workspace_sptr inputWS, + IAlgorithm &alg, const Workspace_sptr &inputWS, const Muon::AnalysisOptions &options) const { auto inputGroup = boost::make_shared<WorkspaceGroup>(); diff --git a/Framework/Muon/src/AsymmetryCalc.cpp b/Framework/Muon/src/AsymmetryCalc.cpp index e03b26696fb390b29e05faefd66525ea48a1db3b..c114d68fd723578f976da7ee268a2dfa8ed622bb 100644 --- a/Framework/Muon/src/AsymmetryCalc.cpp +++ b/Framework/Muon/src/AsymmetryCalc.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/Muon/src/CalMuonDeadTime.cpp b/Framework/Muon/src/CalMuonDeadTime.cpp index d8608a7207736abc5d0bebb8cc30a43c5658e3fe..85920abc720f466a35c5d570cbab639245891e14 100644 --- a/Framework/Muon/src/CalMuonDeadTime.cpp +++ b/Framework/Muon/src/CalMuonDeadTime.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMuon/CalMuonDeadTime.h" #include "MantidAPI/AnalysisDataService.h" diff --git a/Framework/Muon/src/CalMuonDetectorPhases.cpp b/Framework/Muon/src/CalMuonDetectorPhases.cpp index b0a23db9bfd6cce1fc0e968a5e071930e9ec6a0b..9788d4f3253512f9dc3d77cc6619146b09444516 100644 --- a/Framework/Muon/src/CalMuonDetectorPhases.cpp +++ b/Framework/Muon/src/CalMuonDetectorPhases.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMuon/CalMuonDetectorPhases.h" @@ -152,10 +152,10 @@ void CalMuonDetectorPhases::exec() { * @param resTab :: [output] Table workspace storing the asymmetries and phases * @param resGroup :: [output] Workspace group storing the fitting results */ -void CalMuonDetectorPhases::fitWorkspace(const API::MatrixWorkspace_sptr &ws, - double freq, std::string groupName, - API::ITableWorkspace_sptr resTab, - API::WorkspaceGroup_sptr &resGroup) { +void CalMuonDetectorPhases::fitWorkspace( + const API::MatrixWorkspace_sptr &ws, double freq, + const std::string &groupName, const API::ITableWorkspace_sptr &resTab, + API::WorkspaceGroup_sptr &resGroup) { auto nhist = static_cast<int>(ws->getNumberHistograms()); diff --git a/Framework/Muon/src/CalculateMuonAsymmetry.cpp b/Framework/Muon/src/CalculateMuonAsymmetry.cpp index a0728c530d96ee4b24922c2036237243c9ae4270..d4f260631723249207ac478bc0167009e46c8bc1 100644 --- a/Framework/Muon/src/CalculateMuonAsymmetry.cpp +++ b/Framework/Muon/src/CalculateMuonAsymmetry.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes @@ -228,7 +228,7 @@ void CalculateMuonAsymmetry::exec() { * @return normalization constants */ void CalculateMuonAsymmetry::addNormalizedFits( - size_t numberOfFits, const std::vector<double> norms) { + size_t numberOfFits, const std::vector<double> &norms) { for (size_t j = 0; j < numberOfFits; j++) { API::Workspace_sptr fitWorkspace = getProperty("OutputWorkspace"); API::MatrixWorkspace_sptr fitWorkspaceActual; @@ -279,7 +279,7 @@ void CalculateMuonAsymmetry::addNormalizedFits( * @return normalization constants */ std::vector<double> CalculateMuonAsymmetry::getNormConstants( - const std::vector<std::string> wsNames) { + const std::vector<std::string> &wsNames) { std::vector<double> norms; double startX = getProperty("StartX"); double endX = getProperty("EndX"); diff --git a/Framework/Muon/src/ConvertFitFunctionForMuonTFAsymmetry.cpp b/Framework/Muon/src/ConvertFitFunctionForMuonTFAsymmetry.cpp index 6bc949eec0b181222928fa148d65acb8992df298..aec6f3ab6846a17b09de8f64fb24bb960c7de6e4 100644 --- a/Framework/Muon/src/ConvertFitFunctionForMuonTFAsymmetry.cpp +++ b/Framework/Muon/src/ConvertFitFunctionForMuonTFAsymmetry.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/Muon/src/EstimateMuonAsymmetryFromCounts.cpp b/Framework/Muon/src/EstimateMuonAsymmetryFromCounts.cpp index 3f915e155eb885f95feeadd042f8c1f52f1290a9..80844e2b39d4d727707052e51aec9fa310b12653 100644 --- a/Framework/Muon/src/EstimateMuonAsymmetryFromCounts.cpp +++ b/Framework/Muon/src/EstimateMuonAsymmetryFromCounts.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/Muon/src/LoadAndApplyMuonDetectorGrouping.cpp b/Framework/Muon/src/LoadAndApplyMuonDetectorGrouping.cpp index d3944e3c51bf422b1e8c7e8ef88d91ba97f8d858..6a2627176ca84e02727895e86f5b5a7428297a72 100644 --- a/Framework/Muon/src/LoadAndApplyMuonDetectorGrouping.cpp +++ b/Framework/Muon/src/LoadAndApplyMuonDetectorGrouping.cpp @@ -1,9 +1,11 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + +#include <utility> + #include "MantidMuon/LoadAndApplyMuonDetectorGrouping.h" #include "MantidMuon/MuonAlgorithmHelper.h" @@ -198,7 +200,7 @@ LoadAndApplyMuonDetectorGrouping::validateInputs() { } void LoadAndApplyMuonDetectorGrouping::getTimeLimitsFromInputWorkspace( - Workspace_sptr inputWS, AnalysisOptions &options) { + const Workspace_sptr &inputWS, AnalysisOptions &options) { MatrixWorkspace_sptr inputMatrixWS = boost::dynamic_pointer_cast<MatrixWorkspace>(inputWS); WorkspaceGroup_sptr inputGroupWS = @@ -268,8 +270,8 @@ void LoadAndApplyMuonDetectorGrouping::exec() { // Checks that the detector IDs in grouping are in the workspace void LoadAndApplyMuonDetectorGrouping::checkDetectorIDsInWorkspace( API::Grouping &grouping, Workspace_sptr workspace) { - bool check = - MuonAlgorithmHelper::checkGroupDetectorsInWorkspace(grouping, workspace); + bool check = MuonAlgorithmHelper::checkGroupDetectorsInWorkspace( + grouping, std::move(workspace)); if (!check) { g_log.error("One or more detector IDs specified in the groups is not " "contained in the InputWorkspace"); @@ -288,7 +290,8 @@ WorkspaceGroup_sptr LoadAndApplyMuonDetectorGrouping::addGroupedWSWithDefaultName( Workspace_sptr workspace) { auto &ads = AnalysisDataService::Instance(); - std::string groupedWSName = MuonAlgorithmHelper::getRunLabel(workspace); + std::string groupedWSName = + MuonAlgorithmHelper::getRunLabel(std::move(workspace)); WorkspaceGroup_sptr groupedWS; if (ads.doesExist(groupedWSName)) { @@ -388,8 +391,8 @@ void LoadAndApplyMuonDetectorGrouping::CheckValidGroupsAndPairs( */ void LoadAndApplyMuonDetectorGrouping::addGroupingToADS( const Mantid::Muon::AnalysisOptions &options, - Mantid::API::Workspace_sptr ws, - Mantid::API::WorkspaceGroup_sptr wsGrouped) { + const Mantid::API::Workspace_sptr &ws, + const Mantid::API::WorkspaceGroup_sptr &wsGrouped) { size_t numGroups = options.grouping.groups.size(); for (auto i = 0u; i < numGroups; ++i) { @@ -426,8 +429,8 @@ void LoadAndApplyMuonDetectorGrouping::addGroupingToADS( */ void LoadAndApplyMuonDetectorGrouping::addPairingToADS( const Mantid::Muon::AnalysisOptions &options, - Mantid::API::Workspace_sptr ws, - Mantid::API::WorkspaceGroup_sptr wsGrouped) { + const Mantid::API::Workspace_sptr &ws, + const Mantid::API::WorkspaceGroup_sptr &wsGrouped) { size_t numPairs = options.grouping.pairs.size(); for (size_t i = 0; i < numPairs; i++) { diff --git a/Framework/Muon/src/MuonAlgorithmHelper.cpp b/Framework/Muon/src/MuonAlgorithmHelper.cpp index 91fb3e87442b97ac7cd6bec12bbd096a56803e75..f04f4c25d956f02f7630714f9d56e523813419ab 100644 --- a/Framework/Muon/src/MuonAlgorithmHelper.cpp +++ b/Framework/Muon/src/MuonAlgorithmHelper.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMuon/MuonAlgorithmHelper.h" @@ -15,6 +15,8 @@ #include <fstream> #include <string> +#include <utility> + #include <vector> namespace Mantid { @@ -28,7 +30,7 @@ using namespace Mantid::API; * workspace has one period only - it is returned. * @param ws :: Run workspace */ -MatrixWorkspace_sptr firstPeriod(Workspace_sptr ws) { +MatrixWorkspace_sptr firstPeriod(const Workspace_sptr &ws) { if (auto group = boost::dynamic_pointer_cast<WorkspaceGroup>(ws)) { return boost::dynamic_pointer_cast<MatrixWorkspace>(group->getItem(0)); @@ -43,7 +45,7 @@ MatrixWorkspace_sptr firstPeriod(Workspace_sptr ws) { * @return :: run label */ std::string getRunLabel(Mantid::API::Workspace_sptr ws) { - const std::vector<Mantid::API::Workspace_sptr> wsList{ws}; + const std::vector<Mantid::API::Workspace_sptr> wsList{std::move(ws)}; return getRunLabel(wsList); } @@ -282,7 +284,7 @@ std::string generateWorkspaceName(const Muon::DatasetParams ¶ms) { * group) and return as an ordered set. */ std::set<Mantid::detid_t> -getAllDetectorIDsFromWorkspace(Mantid::API::Workspace_sptr ws) { +getAllDetectorIDsFromWorkspace(const Mantid::API::Workspace_sptr &ws) { std::set<Mantid::detid_t> detectorIDs; if (auto workspace = boost::dynamic_pointer_cast<MatrixWorkspace>(ws)) { @@ -296,8 +298,8 @@ getAllDetectorIDsFromWorkspace(Mantid::API::Workspace_sptr ws) { /** * Find all the detector IDs contained inside a matrix workspace */ -std::set<Mantid::detid_t> -getAllDetectorIDsFromMatrixWorkspace(Mantid::API::MatrixWorkspace_sptr ws) { +std::set<Mantid::detid_t> getAllDetectorIDsFromMatrixWorkspace( + const Mantid::API::MatrixWorkspace_sptr &ws) { std::set<Mantid::detid_t> detectorIDs; std::set<Mantid::detid_t> spectrumIDs; @@ -312,8 +314,8 @@ getAllDetectorIDsFromMatrixWorkspace(Mantid::API::MatrixWorkspace_sptr ws) { /** * Find all the detector IDs contained inside a group workspace */ -std::set<Mantid::detid_t> -getAllDetectorIDsFromGroupWorkspace(Mantid::API::WorkspaceGroup_sptr ws) { +std::set<Mantid::detid_t> getAllDetectorIDsFromGroupWorkspace( + const Mantid::API::WorkspaceGroup_sptr &ws) { std::set<Mantid::detid_t> detectorIDs; std::set<Mantid::detid_t> detectorIDsSingleWorkspace; @@ -348,8 +350,8 @@ std::vector<int> getAllDetectorIDsFromGroup(const Grouping &grouping) { // Checks if all the detectors in the groups in a Grouping are in the workspace. // Workspace can be matrix or group type. bool checkGroupDetectorsInWorkspace(const Grouping &grouping, - Workspace_sptr ws) { - std::set<int> detectorIDs = getAllDetectorIDsFromWorkspace(ws); + const Workspace_sptr &ws) { + std::set<int> detectorIDs = getAllDetectorIDsFromWorkspace(std::move(ws)); std::vector<int> groupDetectorIDs = getAllDetectorIDsFromGroup(grouping); return checkItemsInSet(groupDetectorIDs, detectorIDs); } @@ -605,8 +607,8 @@ MatrixWorkspace_sptr extractSpectrum(const Workspace_sptr &inputWS, return outWS; } -void addSampleLog(MatrixWorkspace_sptr workspace, const std::string &logName, - const std::string &logValue) { +void addSampleLog(const MatrixWorkspace_sptr &workspace, + const std::string &logName, const std::string &logValue) { IAlgorithm_sptr alg = AlgorithmManager::Instance().createUnmanaged("AddSampleLog"); alg->initialize(); diff --git a/Framework/Muon/src/MuonAsymmetryHelper.cpp b/Framework/Muon/src/MuonAsymmetryHelper.cpp index 484ecb95cd7614eb3750871a3547f81dff67ba72..10c91adbabc7db727293f5a0a0a0b18df061bd2f 100644 --- a/Framework/Muon/src/MuonAsymmetryHelper.cpp +++ b/Framework/Muon/src/MuonAsymmetryHelper.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/Muon/src/MuonGroupDetectors.cpp b/Framework/Muon/src/MuonGroupDetectors.cpp index e1deb201b21a557e4f8591313243d3e2512a37b1..12633fa18fdbe675c219e1847de1f20ba9dae039 100644 --- a/Framework/Muon/src/MuonGroupDetectors.cpp +++ b/Framework/Muon/src/MuonGroupDetectors.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMuon/MuonGroupDetectors.h" #include "MantidAPI/MatrixWorkspace.h" diff --git a/Framework/Muon/src/MuonGroupingAsymmetry.cpp b/Framework/Muon/src/MuonGroupingAsymmetry.cpp index fff02ba421d1ac369191e3694293db7112ab0ead..a43b232ad84b1f4c6738876395e33d43b7b0788f 100644 --- a/Framework/Muon/src/MuonGroupingAsymmetry.cpp +++ b/Framework/Muon/src/MuonGroupingAsymmetry.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMuon/MuonGroupingAsymmetry.h" #include "MantidAPI/Algorithm.h" @@ -66,7 +66,7 @@ estimateAsymmetry(const Workspace_sptr &inputWS, const int index, } std::pair<MatrixWorkspace_sptr, MatrixWorkspace_sptr> estimateMuonAsymmetry( - WorkspaceGroup_sptr inputWS, const std::vector<int> &summedPeriods, + const WorkspaceGroup_sptr &inputWS, const std::vector<int> &summedPeriods, const std::vector<int> &subtractedPeriods, int groupIndex, const double startX, const double endX, const double normalizationIn) { MatrixWorkspace_sptr tempWS; @@ -118,7 +118,7 @@ std::pair<MatrixWorkspace_sptr, MatrixWorkspace_sptr> estimateMuonAsymmetry( return outputPair; } -MatrixWorkspace_sptr groupDetectors(MatrixWorkspace_sptr workspace, +MatrixWorkspace_sptr groupDetectors(const MatrixWorkspace_sptr &workspace, const std::vector<int> &detectorIDs) { auto outputWS = WorkspaceFactory::Instance().create(workspace, 1); @@ -284,8 +284,8 @@ std::map<std::string, std::string> MuonGroupingAsymmetry::validateInputs() { return errors; } -WorkspaceGroup_sptr -MuonGroupingAsymmetry::createGroupWorkspace(WorkspaceGroup_sptr inputWS) { +WorkspaceGroup_sptr MuonGroupingAsymmetry::createGroupWorkspace( + const WorkspaceGroup_sptr &inputWS) { const std::vector<int> group = this->getProperty("Grouping"); auto groupedPeriods = boost::make_shared<WorkspaceGroup>(); // for each period @@ -320,7 +320,7 @@ void MuonGroupingAsymmetry::exec() { } void MuonGroupingAsymmetry::addGroupingAsymmetrySampleLogs( - MatrixWorkspace_sptr workspace) { + const MatrixWorkspace_sptr &workspace) { MuonAlgorithmHelper::addSampleLog(workspace, "analysis_asymmetry_group_name", getPropertyValue("GroupName")); MuonAlgorithmHelper::addSampleLog(workspace, "analysis_asymmetry_group", diff --git a/Framework/Muon/src/MuonGroupingCounts.cpp b/Framework/Muon/src/MuonGroupingCounts.cpp index 57ea7ba349cd1abb59bf4f8ad38a65822a53641f..2d1f6979e82969408aae54a6b29f8c8418ec6348 100644 --- a/Framework/Muon/src/MuonGroupingCounts.cpp +++ b/Framework/Muon/src/MuonGroupingCounts.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMuon/MuonGroupingCounts.h" #include "MantidAPI/Algorithm.h" @@ -25,11 +25,11 @@ using namespace Mantid::HistogramData; namespace { bool checkPeriodInWorkspaceGroup(const int &period, - WorkspaceGroup_sptr workspace) { + const WorkspaceGroup_sptr &workspace) { return period <= workspace->getNumberOfEntries(); } -MatrixWorkspace_sptr groupDetectors(MatrixWorkspace_sptr workspace, +MatrixWorkspace_sptr groupDetectors(const MatrixWorkspace_sptr &workspace, const std::vector<int> &detectorIDs) { auto outputWS = WorkspaceFactory::Instance().create(workspace, 1); @@ -199,7 +199,8 @@ void MuonGroupingCounts::exec() { setProperty("OutputWorkspace", outputWS); } -void MuonGroupingCounts::setGroupingSampleLogs(MatrixWorkspace_sptr workspace) { +void MuonGroupingCounts::setGroupingSampleLogs( + const MatrixWorkspace_sptr &workspace) { MuonAlgorithmHelper::addSampleLog(workspace, "analysis_group_name", getPropertyValue("GroupName")); MuonAlgorithmHelper::addSampleLog(workspace, "analysis_group", diff --git a/Framework/Muon/src/MuonPairingAsymmetry.cpp b/Framework/Muon/src/MuonPairingAsymmetry.cpp index 27beebfd3f23913b7f7089c71a8f087417ef3d9e..5116956eb3a38c37cdf10f9e842242615f6d946e 100644 --- a/Framework/Muon/src/MuonPairingAsymmetry.cpp +++ b/Framework/Muon/src/MuonPairingAsymmetry.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMuon/MuonPairingAsymmetry.h" #include "MantidAPI/Algorithm.h" @@ -23,11 +23,11 @@ using namespace Mantid::Kernel; namespace { bool checkPeriodInWorkspaceGroup(const int &period, - WorkspaceGroup_const_sptr workspace) { + const WorkspaceGroup_const_sptr &workspace) { return period <= workspace->getNumberOfEntries(); } -int countPeriods(Workspace_const_sptr ws) { +int countPeriods(const Workspace_const_sptr &ws) { if (auto tmp = boost::dynamic_pointer_cast<const WorkspaceGroup>(ws)) { return tmp->getNumberOfEntries(); } else { @@ -35,8 +35,8 @@ int countPeriods(Workspace_const_sptr ws) { } } -bool checkConsistentPeriods(Workspace_const_sptr ws1, - Workspace_const_sptr ws2) { +bool checkConsistentPeriods(const Workspace_const_sptr &ws1, + const Workspace_const_sptr &ws2) { if (ws1->isGroup()) { if (!ws2->isGroup()) { return false; @@ -48,12 +48,13 @@ bool checkConsistentPeriods(Workspace_const_sptr ws1, return true; } -MatrixWorkspace_sptr getWorkspace(WorkspaceGroup_sptr group, const int &index) { +MatrixWorkspace_sptr getWorkspace(const WorkspaceGroup_sptr &group, + const int &index) { auto ws = group->getItem(index); return boost::dynamic_pointer_cast<MatrixWorkspace>(ws); } -MatrixWorkspace_sptr groupDetectors(MatrixWorkspace_sptr workspace, +MatrixWorkspace_sptr groupDetectors(const MatrixWorkspace_sptr &workspace, const std::vector<int> &detectorIDs) { auto outputWS = WorkspaceFactory::Instance().create(workspace, 1); @@ -83,7 +84,7 @@ MatrixWorkspace_sptr groupDetectors(MatrixWorkspace_sptr workspace, // Convert a Workspace_sptr (which may be single period, MatrixWorkspace, or // multi period WorkspaceGroup) to a WorkspaceGroup_sptr -WorkspaceGroup_sptr workspaceToWorkspaceGroup(Workspace_sptr workspace) { +WorkspaceGroup_sptr workspaceToWorkspaceGroup(const Workspace_sptr &workspace) { WorkspaceGroup_sptr ws1; if (workspace->isGroup()) { @@ -333,7 +334,7 @@ MatrixWorkspace_sptr MuonPairingAsymmetry::calcPairAsymmetryWithSummedAndSubtractedPeriods( const std::vector<int> &summedPeriods, const std::vector<int> &subtractedPeriods, - WorkspaceGroup_sptr groupedPeriods, const double &alpha) { + const WorkspaceGroup_sptr &groupedPeriods, const double &alpha) { auto summedWS = MuonAlgorithmHelper::sumPeriods(groupedPeriods, summedPeriods); auto subtractedWS = @@ -358,7 +359,7 @@ workspace has two spectra corresponding to the two groupings specified in the inputs. */ WorkspaceGroup_sptr -MuonPairingAsymmetry::createGroupWorkspace(WorkspaceGroup_sptr inputWS) { +MuonPairingAsymmetry::createGroupWorkspace(const WorkspaceGroup_sptr &inputWS) { std::vector<int> group1 = this->getProperty("Group1"); std::vector<int> group2 = this->getProperty("Group2"); @@ -381,7 +382,7 @@ MuonPairingAsymmetry::createGroupWorkspace(WorkspaceGroup_sptr inputWS) { * @returns MatrixWorkspace containing result of the calculation. */ MatrixWorkspace_sptr -MuonPairingAsymmetry::pairAsymmetryCalc(MatrixWorkspace_sptr inputWS, +MuonPairingAsymmetry::pairAsymmetryCalc(const MatrixWorkspace_sptr &inputWS, const double &alpha) { MatrixWorkspace_sptr outWS; @@ -404,7 +405,7 @@ MuonPairingAsymmetry::pairAsymmetryCalc(MatrixWorkspace_sptr inputWS, } void MuonPairingAsymmetry::setPairAsymmetrySampleLogs( - MatrixWorkspace_sptr workspace) { + const MatrixWorkspace_sptr &workspace) { MuonAlgorithmHelper::addSampleLog(workspace, "analysis_pairName", getProperty("PairName")); MuonAlgorithmHelper::addSampleLog(workspace, "analysis_alpha", @@ -420,8 +421,8 @@ void MuonPairingAsymmetry::setPairAsymmetrySampleLogs( } MatrixWorkspace_sptr -MuonPairingAsymmetry::appendSpectra(MatrixWorkspace_sptr inputWS1, - MatrixWorkspace_sptr inputWS2) { +MuonPairingAsymmetry::appendSpectra(const MatrixWorkspace_sptr &inputWS1, + const MatrixWorkspace_sptr &inputWS2) { IAlgorithm_sptr alg = this->createChildAlgorithm("AppendSpectra"); alg->setProperty("InputWorkspace1", inputWS1); @@ -433,7 +434,8 @@ MuonPairingAsymmetry::appendSpectra(MatrixWorkspace_sptr inputWS1, } void MuonPairingAsymmetry::validatePeriods( - WorkspaceGroup_sptr inputWS, std::map<std::string, std::string> &errors) { + const WorkspaceGroup_sptr &inputWS, + std::map<std::string, std::string> &errors) { const std::vector<int> summedPeriods = getProperty("SummedPeriods"); const std::vector<int> subtractedPeriods = getProperty("SubtractedPeriods"); if (summedPeriods.empty() && subtractedPeriods.empty()) { diff --git a/Framework/Muon/src/MuonPreProcess.cpp b/Framework/Muon/src/MuonPreProcess.cpp index 8276d290d93858a39023b231da1804253943e350..2d78c07483c09d1825fb4aa32b9cd46aca0505b4 100644 --- a/Framework/Muon/src/MuonPreProcess.cpp +++ b/Framework/Muon/src/MuonPreProcess.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMuon/MuonPreProcess.h" #include "MantidAPI/Algorithm.h" @@ -155,7 +155,7 @@ void MuonPreProcess::exec() { * @return Corrected workspaces */ WorkspaceGroup_sptr -MuonPreProcess::correctWorkspaces(WorkspaceGroup_sptr wsGroup) { +MuonPreProcess::correctWorkspaces(const WorkspaceGroup_sptr &wsGroup) { WorkspaceGroup_sptr outWS = boost::make_shared<WorkspaceGroup>(); for (auto &&workspace : *wsGroup) { if (auto ws = boost::dynamic_pointer_cast<MatrixWorkspace>(workspace)) { @@ -191,7 +191,7 @@ MatrixWorkspace_sptr MuonPreProcess::correctWorkspace(MatrixWorkspace_sptr ws) { } MatrixWorkspace_sptr MuonPreProcess::applyDTC(MatrixWorkspace_sptr ws, - TableWorkspace_sptr dt) { + const TableWorkspace_sptr &dt) { if (dt != nullptr) { IAlgorithm_sptr dtc = this->createChildAlgorithm("ApplyDeadTimeCorr"); dtc->setProperty("InputWorkspace", ws); @@ -248,7 +248,8 @@ MuonPreProcess::applyRebinning(MatrixWorkspace_sptr ws, } } -MatrixWorkspace_sptr MuonPreProcess::cloneWorkspace(MatrixWorkspace_sptr ws) { +MatrixWorkspace_sptr +MuonPreProcess::cloneWorkspace(const MatrixWorkspace_sptr &ws) { IAlgorithm_sptr cloneWorkspace = this->createChildAlgorithm("CloneWorkspace"); cloneWorkspace->setProperty("InputWorkspace", ws); cloneWorkspace->execute(); @@ -256,7 +257,7 @@ MatrixWorkspace_sptr MuonPreProcess::cloneWorkspace(MatrixWorkspace_sptr ws) { return boost::dynamic_pointer_cast<MatrixWorkspace>(wsClone); } -void MuonPreProcess::addPreProcessSampleLogs(WorkspaceGroup_sptr group) { +void MuonPreProcess::addPreProcessSampleLogs(const WorkspaceGroup_sptr &group) { const std::string numPeriods = std::to_string(group->getNumberOfEntries()); for (auto &&workspace : *group) { diff --git a/Framework/Muon/src/PhaseQuadMuon.cpp b/Framework/Muon/src/PhaseQuadMuon.cpp index a73d8f0bcdc29495be8e88dbf30dd13da6b6cc1b..0d87915d716df687eb1878ed52edf4017e03c1e5 100644 --- a/Framework/Muon/src/PhaseQuadMuon.cpp +++ b/Framework/Muon/src/PhaseQuadMuon.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMuon/PhaseQuadMuon.h" #include "MantidAPI/AlgorithmManager.h" diff --git a/Framework/Muon/src/PlotAsymmetryByLogValue.cpp b/Framework/Muon/src/PlotAsymmetryByLogValue.cpp index 73d46fc7ca769c27f8098fac792ea96e77f88d45..c344108e3545418c862747b2e81087a3f320e951 100644 --- a/Framework/Muon/src/PlotAsymmetryByLogValue.cpp +++ b/Framework/Muon/src/PlotAsymmetryByLogValue.cpp @@ -1,10 +1,12 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include <cmath> +#include <utility> + #include <vector> #include "MantidAPI/AlgorithmManager.h" @@ -565,7 +567,7 @@ void PlotAsymmetryByLogValue::parseRunNames(std::string &firstFN, void PlotAsymmetryByLogValue::applyDeadtimeCorr(Workspace_sptr &loadedWs, Workspace_sptr deadTimes) { ScopedWorkspace ws(loadedWs); - ScopedWorkspace dt(deadTimes); + ScopedWorkspace dt(std::move(deadTimes)); IAlgorithm_sptr applyCorr = AlgorithmManager::Instance().createUnmanaged("ApplyDeadTimeCorr"); @@ -610,7 +612,7 @@ void PlotAsymmetryByLogValue::groupDetectors(Workspace_sptr &loadedWs, // Could be groups of workspaces, so need to work with ADS ScopedWorkspace inWS(loadedWs); - ScopedWorkspace grWS(grouping); + ScopedWorkspace grWS(std::move(grouping)); ScopedWorkspace outWS; IAlgorithm_sptr alg = @@ -628,7 +630,7 @@ void PlotAsymmetryByLogValue::groupDetectors(Workspace_sptr &loadedWs, * @param loadedWs :: [input] Workspace to apply analysis to * @param index :: [input] Vector index where results will be stored */ -void PlotAsymmetryByLogValue::doAnalysis(Workspace_sptr loadedWs, +void PlotAsymmetryByLogValue::doAnalysis(const Workspace_sptr &loadedWs, size_t index) { // Check if workspace is a workspace group @@ -698,7 +700,7 @@ void PlotAsymmetryByLogValue::doAnalysis(Workspace_sptr loadedWs, * @param Y :: Reference to a variable receiving the value of asymmetry * @param E :: Reference to a variable receiving the value of the error */ -void PlotAsymmetryByLogValue::calcIntAsymmetry(MatrixWorkspace_sptr ws, +void PlotAsymmetryByLogValue::calcIntAsymmetry(const MatrixWorkspace_sptr &ws, double &Y, double &E) { // Output workspace @@ -746,9 +748,9 @@ void PlotAsymmetryByLogValue::calcIntAsymmetry(MatrixWorkspace_sptr ws, * @param Y :: Reference to a variable receiving the value of asymmetry * @param E :: Reference to a variable receiving the value of the error */ -void PlotAsymmetryByLogValue::calcIntAsymmetry(MatrixWorkspace_sptr ws_red, - MatrixWorkspace_sptr ws_green, - double &Y, double &E) { +void PlotAsymmetryByLogValue::calcIntAsymmetry( + const MatrixWorkspace_sptr &ws_red, const MatrixWorkspace_sptr &ws_green, + double &Y, double &E) { if (!m_int) { // "Differential asymmetry" HistogramBuilder builder; builder.setX(ws_red->x(0).size()); diff --git a/Framework/Muon/src/RRFMuon.cpp b/Framework/Muon/src/RRFMuon.cpp index e39b8112ee69226a6f0af62ee1b5fe86d2c3c16d..801d8bfb95f0e935f8330b91cbb49c2f1f397673 100644 --- a/Framework/Muon/src/RRFMuon.cpp +++ b/Framework/Muon/src/RRFMuon.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMuon/RRFMuon.h" #include "MantidAPI/Axis.h" @@ -109,7 +109,8 @@ void RRFMuon::exec() { * @param uin :: [input] input workspace units * @param uuser :: [input] units selected by user */ -double RRFMuon::unitConversionFactor(std::string uin, std::string uuser) { +double RRFMuon::unitConversionFactor(const std::string &uin, + const std::string &uuser) { if ((uin == "microsecond")) { diff --git a/Framework/Muon/src/RemoveExpDecay.cpp b/Framework/Muon/src/RemoveExpDecay.cpp index 03c656a2c4ff1da9cf4e501394ab71ae99c27ef6..c23d63849799f9062b65bad4aaceb76a57c37f39 100644 --- a/Framework/Muon/src/RemoveExpDecay.cpp +++ b/Framework/Muon/src/RemoveExpDecay.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes @@ -178,8 +178,9 @@ HistogramData::Histogram MuonRemoveExpDecay::removeDecay( * @param wsIndex :: workspace index * @return normalisation constant */ -double MuonRemoveExpDecay::calNormalisationConst(API::MatrixWorkspace_sptr ws, - int wsIndex) { +double +MuonRemoveExpDecay::calNormalisationConst(const API::MatrixWorkspace_sptr &ws, + int wsIndex) { double retVal = 1.0; API::IAlgorithm_sptr fit; diff --git a/Framework/Muon/test/AlphaCalcTest.h b/Framework/Muon/test/AlphaCalcTest.h index de4569c687264bc1cfbec14611b9103d2772edda..9cc032ec72fd487750a52b4e59dcefc08cda4e71 100644 --- a/Framework/Muon/test/AlphaCalcTest.h +++ b/Framework/Muon/test/AlphaCalcTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Muon/test/ApplyDeadTimeCorrTest.h b/Framework/Muon/test/ApplyDeadTimeCorrTest.h index 44a7f98ac1a43f1b9d26338db72e9c0855f5e9a6..263eb2bde033350951772266363e5c480894af65 100644 --- a/Framework/Muon/test/ApplyDeadTimeCorrTest.h +++ b/Framework/Muon/test/ApplyDeadTimeCorrTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Muon/test/ApplyMuonDetectorGroupPairingTest.h b/Framework/Muon/test/ApplyMuonDetectorGroupPairingTest.h index 9bf181337ab36b3ce9c4b6157da361950ff6a86d..b0bfef20a031a1f49761228db6abbac5b70c1bfc 100644 --- a/Framework/Muon/test/ApplyMuonDetectorGroupPairingTest.h +++ b/Framework/Muon/test/ApplyMuonDetectorGroupPairingTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -36,8 +36,8 @@ namespace { // Set algorithm properties to sensible defaults (assuming data with 10 groups) // Use when specifying groups manually void setPairAlgorithmProperties(ApplyMuonDetectorGroupPairing &alg, - std::string inputWSName, - std::string wsGroupName) { + const std::string &inputWSName, + const std::string &wsGroupName) { alg.setProperty("SpecifyGroupsManually", true); alg.setProperty("PairName", "test"); alg.setProperty("Alpha", 1.0); @@ -58,8 +58,8 @@ void setPairAlgorithmProperties(ApplyMuonDetectorGroupPairing &alg, // Set algorithm properties to sensible defaults (assuming data with 10 groups) // Use when entering workspaces to pair void setPairAlgorithmPropertiesForInputWorkspace( - ApplyMuonDetectorGroupPairing &alg, std::string inputWSName, - std::string wsGroupName) { + ApplyMuonDetectorGroupPairing &alg, const std::string &inputWSName, + const std::string &wsGroupName) { alg.setProperty("SpecifyGroupsManually", false); alg.setProperty("PairName", "test"); alg.setProperty("Alpha", 1.0); @@ -72,7 +72,7 @@ void setPairAlgorithmPropertiesForInputWorkspace( // algorithm (a MatrixWorkspace and an empty group). class setUpADSWithWorkspace { public: - setUpADSWithWorkspace(Workspace_sptr ws) { + setUpADSWithWorkspace(const Workspace_sptr &ws) { AnalysisDataService::Instance().addOrReplace(inputWSName, ws); wsGroup = boost::make_shared<WorkspaceGroup>(); AnalysisDataService::Instance().addOrReplace(groupWSName, wsGroup); diff --git a/Framework/Muon/test/ApplyMuonDetectorGroupingTest.h b/Framework/Muon/test/ApplyMuonDetectorGroupingTest.h index 6b7acdec06cb025b857662913314dab5f6430aea..08b59730bc17a4f72eb1601c8151d3fdc45022c1 100644 --- a/Framework/Muon/test/ApplyMuonDetectorGroupingTest.h +++ b/Framework/Muon/test/ApplyMuonDetectorGroupingTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -50,7 +50,7 @@ IAlgorithm_sptr algorithmWithPropertiesSet(const std::string &inputWSName, // algorithm (a MatrixWorkspace and an empty GroupWorkspace). class setUpADSWithWorkspace { public: - setUpADSWithWorkspace(Workspace_sptr ws) { + setUpADSWithWorkspace(const Workspace_sptr &ws) { AnalysisDataService::Instance().addOrReplace(inputWSName, ws); wsGroup = boost::make_shared<WorkspaceGroup>(); AnalysisDataService::Instance().addOrReplace(groupWSName, wsGroup); diff --git a/Framework/Muon/test/AsymmetryCalcTest.h b/Framework/Muon/test/AsymmetryCalcTest.h index cb63bc8095c797535607a8c296f3ea90ae08bbbe..ce5879a9d9bf95bdc84c16f8595760a9c4d273a5 100644 --- a/Framework/Muon/test/AsymmetryCalcTest.h +++ b/Framework/Muon/test/AsymmetryCalcTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Muon/test/CMakeLists.txt b/Framework/Muon/test/CMakeLists.txt index ba644f61a1ae1573c466a69694c6e4aa9eb39937..6c36379da0c8a3755050dc4d685b9b550a76d8ba 100644 --- a/Framework/Muon/test/CMakeLists.txt +++ b/Framework/Muon/test/CMakeLists.txt @@ -1,8 +1,7 @@ if(CXXTEST_FOUND) include_directories(SYSTEM ${CXXTEST_INCLUDE_DIR} - ${GMOCK_INCLUDE_DIR} - ${GTEST_INCLUDE_DIR}) +) check_include_files(stdint.h stdint) if(stdint) add_definitions(-DHAVE_STDINT_H) @@ -40,8 +39,8 @@ if(CXXTEST_FOUND) DataHandling Muon Nexus - ${GMOCK_LIBRARIES} - ${GTEST_LIBRARIES}) + gmock +) add_dependencies(MuonTest Crystal CurveFitting) add_dependencies(FrameworkTests MuonTest) # Test data diff --git a/Framework/Muon/test/CalMuonDeadTimeTest.h b/Framework/Muon/test/CalMuonDeadTimeTest.h index db60858642c6d27be843ec22c5f61751d6c14dac..3bf38a17fed406f1f373d126b8ab9835ea2b62b2 100644 --- a/Framework/Muon/test/CalMuonDeadTimeTest.h +++ b/Framework/Muon/test/CalMuonDeadTimeTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Muon/test/CalMuonDetectorPhasesTest.h b/Framework/Muon/test/CalMuonDetectorPhasesTest.h index 16ee54a95de82e35ab56dedbd7e38ca1d7d71e8f..4fb6b5b283397c79a5d311c69e0b74f0222657bb 100644 --- a/Framework/Muon/test/CalMuonDetectorPhasesTest.h +++ b/Framework/Muon/test/CalMuonDetectorPhasesTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -187,7 +187,7 @@ private: } /// Runs test of execution on the given workspace - void runExecutionTest(const MatrixWorkspace_sptr workspace) { + void runExecutionTest(const MatrixWorkspace_sptr &workspace) { auto calc = AlgorithmManager::Instance().create("CalMuonDetectorPhases"); calc->initialize(); calc->setChild(true); diff --git a/Framework/Muon/test/CalculateMuonAsymmetryTest.h b/Framework/Muon/test/CalculateMuonAsymmetryTest.h index e2bac1834e01fc41f27995a2134b124ed3545251..5f97b2a47d66961e95bc6e501ceeaef49837043c 100644 --- a/Framework/Muon/test/CalculateMuonAsymmetryTest.h +++ b/Framework/Muon/test/CalculateMuonAsymmetryTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -16,6 +16,8 @@ #include "MantidTestHelpers/WorkspaceCreationHelper.h" #include <cxxtest/TestSuite.h> +#include <utility> + #include "MantidAPI/FunctionFactory.h" #include "MantidAPI/IFunction.h" #include "MantidAPI/ITableWorkspace.h" @@ -90,7 +92,7 @@ ITableWorkspace_sptr genTable() { return table; } -IAlgorithm_sptr setUpFuncAlg(std::vector<std::string> wsNames, +IAlgorithm_sptr setUpFuncAlg(const std::vector<std::string> &wsNames, const IFunction_sptr &func) { IAlgorithm_sptr asymmAlg = AlgorithmManager::Instance().create( "ConvertFitFunctionForMuonTFAsymmetry"); @@ -103,31 +105,32 @@ IAlgorithm_sptr setUpFuncAlg(std::vector<std::string> wsNames, return asymmAlg; } -IFunction_sptr genSingleFunc(std::vector<std::string> wsNames) { +IFunction_sptr genSingleFunc(const std::vector<std::string> &wsNames) { IFunction_sptr func = FunctionFactory::Instance().createInitialized( "name=GausOsc,Frequency=3.0"); - IAlgorithm_sptr alg = setUpFuncAlg(wsNames, func); + IAlgorithm_sptr alg = setUpFuncAlg(std::move(wsNames), func); alg->execute(); IFunction_sptr funcOut = alg->getProperty("OutputFunction"); return funcOut; } -IFunction_sptr genDoubleFunc(std::vector<std::string> wsNames) { +IFunction_sptr genDoubleFunc(const std::vector<std::string> &wsNames) { std::string multiFuncString = "composite=MultiDomainFunction,NumDeriv=1;"; multiFuncString += "name=GausOsc,$domains=i,Frequency=3.0;"; multiFuncString += "name=GausOsc,$domains=i,Frequency=3.0;"; IFunction_sptr func = FunctionFactory::Instance().createInitialized(multiFuncString); - IAlgorithm_sptr alg = setUpFuncAlg(wsNames, func); + IAlgorithm_sptr alg = setUpFuncAlg(std::move(wsNames), func); alg->execute(); IFunction_sptr funcOut = alg->getProperty("OutputFunction"); std::cout << funcOut << std::endl; return funcOut; } -IAlgorithm_sptr setUpAlg(ITableWorkspace_sptr &table, IFunction_sptr func, - std::vector<std::string> wsNamesNorm, - std::vector<std::string> wsOut) { +IAlgorithm_sptr setUpAlg(ITableWorkspace_sptr &table, + const IFunction_sptr &func, + const std::vector<std::string> &wsNamesNorm, + const std::vector<std::string> &wsOut) { IAlgorithm_sptr asymmAlg = AlgorithmManager::Instance().create("CalculateMuonAsymmetry"); asymmAlg->initialize(); diff --git a/Framework/Muon/test/ConvertFitFunctionForMuonTFAsymmetryTest.h b/Framework/Muon/test/ConvertFitFunctionForMuonTFAsymmetryTest.h index 092b3f245aeaa3b58bb95733496388cdd5433daf..7d7b8c16f2a9bf274db135ac463fcd34999922c1 100644 --- a/Framework/Muon/test/ConvertFitFunctionForMuonTFAsymmetryTest.h +++ b/Framework/Muon/test/ConvertFitFunctionForMuonTFAsymmetryTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -59,7 +59,7 @@ ITableWorkspace_sptr genTable() { return table; } -IAlgorithm_sptr setUpAlg(std::vector<std::string> wsNames, +IAlgorithm_sptr setUpAlg(const std::vector<std::string> &wsNames, const IFunction_sptr &func) { IAlgorithm_sptr asymmAlg = AlgorithmManager::Instance().create( "ConvertFitFunctionForMuonTFAsymmetry"); diff --git a/Framework/Muon/test/EstimateMuonAsymmetryFromCountsTest.h b/Framework/Muon/test/EstimateMuonAsymmetryFromCountsTest.h index 21e4e3e34832e7fd7ceb5c16271798f0798de69f..80bd49e6b14d47f6248032ac5feb8ab8880acb1a 100644 --- a/Framework/Muon/test/EstimateMuonAsymmetryFromCountsTest.h +++ b/Framework/Muon/test/EstimateMuonAsymmetryFromCountsTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Muon/test/LoadAndApplyMuonDetectorGroupingTest.h b/Framework/Muon/test/LoadAndApplyMuonDetectorGroupingTest.h index c383dc07535395d9f3c46284e292c51a901b9abc..ee52ecb44b66dcd0e1bd8c1bb3423fcdace2c918 100644 --- a/Framework/Muon/test/LoadAndApplyMuonDetectorGroupingTest.h +++ b/Framework/Muon/test/LoadAndApplyMuonDetectorGroupingTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -43,7 +43,7 @@ algorithmWithPropertiesSet(const std::string &inputWSName, // algorithm (a MatrixWorkspace and an empty group). class setUpADSWithWorkspace { public: - setUpADSWithWorkspace(Workspace_sptr ws) { + setUpADSWithWorkspace(const Workspace_sptr &ws) { AnalysisDataService::Instance().addOrReplace(inputWSName, ws); wsGroup = boost::make_shared<WorkspaceGroup>(); AnalysisDataService::Instance().addOrReplace(groupWSName, wsGroup); diff --git a/Framework/Muon/test/MuonAlgorithmHelperTest.h b/Framework/Muon/test/MuonAlgorithmHelperTest.h index 34de3a39087adbecafc4656db0115dc16047adff..2a215a5347f1b0255ad3d0f1ef89461ef7b97afa 100644 --- a/Framework/Muon/test/MuonAlgorithmHelperTest.h +++ b/Framework/Muon/test/MuonAlgorithmHelperTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Muon/test/MuonGroupDetectorsTest.h b/Framework/Muon/test/MuonGroupDetectorsTest.h index 5ba8e57f1957e3838684834f84f47f1a85daefd9..2ce2fd17e9f3fd1a3c3d7062e4b8bf910b3049a7 100644 --- a/Framework/Muon/test/MuonGroupDetectorsTest.h +++ b/Framework/Muon/test/MuonGroupDetectorsTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Muon/test/MuonGroupingAsymmetryTest.h b/Framework/Muon/test/MuonGroupingAsymmetryTest.h index 1331346f05869e73b8deaae86681870a4bc95315..66789bd98278f2c415ec4cfad7ddd58fb7dc2bfb 100644 --- a/Framework/Muon/test/MuonGroupingAsymmetryTest.h +++ b/Framework/Muon/test/MuonGroupingAsymmetryTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -27,7 +27,7 @@ namespace { // algorithm (a MatrixWorkspace). class setUpADSWithWorkspace { public: - setUpADSWithWorkspace(Workspace_sptr ws) { + setUpADSWithWorkspace(const Workspace_sptr &ws) { AnalysisDataService::Instance().addOrReplace(inputWSName, ws); }; ~setUpADSWithWorkspace() { AnalysisDataService::Instance().clear(); }; @@ -51,7 +51,7 @@ algorithmWithWorkspacePropertiesSet(const std::string &inputWSName) { // Set up algorithm without any optional properties // i.e. just the input workspace and group name. IAlgorithm_sptr -setUpAlgorithmWithoutOptionalProperties(WorkspaceGroup_sptr ws, +setUpAlgorithmWithoutOptionalProperties(const WorkspaceGroup_sptr &ws, const std::string &name, const std::vector<int> &grouping) { setUpADSWithWorkspace setup(ws); @@ -62,7 +62,7 @@ setUpAlgorithmWithoutOptionalProperties(WorkspaceGroup_sptr ws, } // Retrieve the output workspace from an executed algorithm -MatrixWorkspace_sptr getOutputWorkspace(IAlgorithm_sptr alg) { +MatrixWorkspace_sptr getOutputWorkspace(const IAlgorithm_sptr &alg) { MatrixWorkspace_sptr outputWS = alg->getProperty("OutputWorkspace"); return outputWS; } diff --git a/Framework/Muon/test/MuonGroupingCountsTest.h b/Framework/Muon/test/MuonGroupingCountsTest.h index 684c2289ed29b50f9689e6def2023dc04286f3f7..bd42678b49d2a2c62e113b99639a97f13cf263c5 100644 --- a/Framework/Muon/test/MuonGroupingCountsTest.h +++ b/Framework/Muon/test/MuonGroupingCountsTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -26,7 +26,7 @@ namespace { // algorithm (a MatrixWorkspace). class setUpADSWithWorkspace { public: - setUpADSWithWorkspace(Workspace_sptr ws) { + setUpADSWithWorkspace(const Workspace_sptr &ws) { AnalysisDataService::Instance().addOrReplace(inputWSName, ws); }; ~setUpADSWithWorkspace() { AnalysisDataService::Instance().clear(); }; @@ -50,7 +50,7 @@ algorithmWithoutOptionalPropertiesSet(const std::string &inputWSName) { // Set up algorithm without any optional properties // i.e. just the input workspace and group name. IAlgorithm_sptr -setUpAlgorithmWithoutOptionalProperties(WorkspaceGroup_sptr ws, +setUpAlgorithmWithoutOptionalProperties(const WorkspaceGroup_sptr &ws, const std::string &name) { setUpADSWithWorkspace setup(ws); IAlgorithm_sptr alg = @@ -60,7 +60,7 @@ setUpAlgorithmWithoutOptionalProperties(WorkspaceGroup_sptr ws, } // Set up algorithm with GroupName applied -IAlgorithm_sptr setUpAlgorithmWithGroupName(WorkspaceGroup_sptr ws, +IAlgorithm_sptr setUpAlgorithmWithGroupName(const WorkspaceGroup_sptr &ws, const std::string &name) { setUpADSWithWorkspace setup(ws); IAlgorithm_sptr alg = @@ -71,7 +71,7 @@ IAlgorithm_sptr setUpAlgorithmWithGroupName(WorkspaceGroup_sptr ws, // Set up algorithm with TimeOffset applied IAlgorithm_sptr -setUpAlgorithmWithGroupNameAndDetectors(WorkspaceGroup_sptr ws, +setUpAlgorithmWithGroupNameAndDetectors(const WorkspaceGroup_sptr &ws, const std::string &name, const std::vector<int> &detectors) { setUpADSWithWorkspace setup(ws); @@ -83,7 +83,7 @@ setUpAlgorithmWithGroupNameAndDetectors(WorkspaceGroup_sptr ws, } // Retrieve the output workspace from an executed algorithm -MatrixWorkspace_sptr getOutputWorkspace(IAlgorithm_sptr alg) { +MatrixWorkspace_sptr getOutputWorkspace(const IAlgorithm_sptr &alg) { Workspace_sptr outputWS = alg->getProperty("OutputWorkspace"); auto wsOut = boost::dynamic_pointer_cast<MatrixWorkspace>(outputWS); return wsOut; diff --git a/Framework/Muon/test/MuonPairingAsymmetryTest.h b/Framework/Muon/test/MuonPairingAsymmetryTest.h index 1f0b73f249b0ce2c6e930476196902d95a6abb2b..3922da95028dce51f9576da968f299782199d57e 100644 --- a/Framework/Muon/test/MuonPairingAsymmetryTest.h +++ b/Framework/Muon/test/MuonPairingAsymmetryTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -27,7 +27,7 @@ namespace { // algorithm (a MatrixWorkspace). class setUpADSWithWorkspace { public: - setUpADSWithWorkspace(Workspace_sptr ws) { + setUpADSWithWorkspace(const Workspace_sptr &ws) { AnalysisDataService::Instance().addOrReplace(inputWSName, ws); }; ~setUpADSWithWorkspace() { AnalysisDataService::Instance().clear(); }; @@ -55,7 +55,7 @@ IAlgorithm_sptr algorithmWithoutOptionalPropertiesSet( // Set up algorithm without any optional properties. IAlgorithm_sptr -setUpAlgorithmWithoutOptionalProperties(WorkspaceGroup_sptr ws, +setUpAlgorithmWithoutOptionalProperties(const WorkspaceGroup_sptr &ws, const std::string &name) { const std::vector<int> group1 = {1, 2}; const std::vector<int> group2 = {3, 4}; @@ -67,7 +67,7 @@ setUpAlgorithmWithoutOptionalProperties(WorkspaceGroup_sptr ws, } // Set up algorithm with groupings -IAlgorithm_sptr setUpAlgorithmWithGroups(WorkspaceGroup_sptr ws, +IAlgorithm_sptr setUpAlgorithmWithGroups(const WorkspaceGroup_sptr &ws, const std::vector<int> &group1, const std::vector<int> &group2) { setUpADSWithWorkspace setup(ws); @@ -78,8 +78,8 @@ IAlgorithm_sptr setUpAlgorithmWithGroups(WorkspaceGroup_sptr ws, // Set up algorithm to accept two group workspaces IAlgorithm_sptr -setUpAlgorithmWithGroupWorkspaces(MatrixWorkspace_sptr groupedWS1, - MatrixWorkspace_sptr groupedWS2) { +setUpAlgorithmWithGroupWorkspaces(const MatrixWorkspace_sptr &groupedWS1, + const MatrixWorkspace_sptr &groupedWS2) { auto alg = boost::make_shared<MuonPairingAsymmetry>(); alg->initialize(); alg->setProperty("SpecifyGroupsManually", false); @@ -94,8 +94,8 @@ setUpAlgorithmWithGroupWorkspaces(MatrixWorkspace_sptr groupedWS1, // Set up MuonPairingAsymmetry algorithm to accept two WorkspaceGroups IAlgorithm_sptr -setUpAlgorithmWithGroupWorkspaceGroups(WorkspaceGroup_sptr groupedWS1, - WorkspaceGroup_sptr groupedWS2) { +setUpAlgorithmWithGroupWorkspaceGroups(const WorkspaceGroup_sptr &groupedWS1, + const WorkspaceGroup_sptr &groupedWS2) { auto alg = boost::make_shared<MuonPairingAsymmetry>(); alg->setRethrows(true); alg->initialize(); @@ -110,7 +110,7 @@ setUpAlgorithmWithGroupWorkspaceGroups(WorkspaceGroup_sptr groupedWS1, } // Retrieve the output workspace from an executed algorithm -MatrixWorkspace_sptr getOutputWorkspace(IAlgorithm_sptr alg) { +MatrixWorkspace_sptr getOutputWorkspace(const IAlgorithm_sptr &alg) { MatrixWorkspace_sptr outputWS = alg->getProperty("OutputWorkspace"); return outputWS; } diff --git a/Framework/Muon/test/MuonPreProcessTest.h b/Framework/Muon/test/MuonPreProcessTest.h index 5721cd643c8be2e04ac387dcc13202636db2ec63..c2554089ce3b936e4815103de9fd13e75f56ffa1 100644 --- a/Framework/Muon/test/MuonPreProcessTest.h +++ b/Framework/Muon/test/MuonPreProcessTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -13,6 +13,8 @@ #include <cxxtest/TestSuite.h> +#include <utility> + using namespace Mantid; using namespace Mantid::Kernel; using namespace Mantid::API; @@ -41,22 +43,23 @@ class setUpADSWithWorkspace { public: std::string const inputWSName = "inputData"; - setUpADSWithWorkspace(Workspace_sptr ws) { + setUpADSWithWorkspace(const Workspace_sptr &ws) { AnalysisDataService::Instance().addOrReplace(inputWSName, ws); }; ~setUpADSWithWorkspace() { AnalysisDataService::Instance().clear(); }; }; // Set up algorithm with none of the optional properties -IAlgorithm_sptr setUpAlgorithmWithNoOptionalProperties(Workspace_sptr ws) { - setUpADSWithWorkspace setup(ws); +IAlgorithm_sptr +setUpAlgorithmWithNoOptionalProperties(const Workspace_sptr &ws) { + setUpADSWithWorkspace setup(std::move(ws)); IAlgorithm_sptr alg = algorithmWithoutOptionalPropertiesSet(setup.inputWSName); return alg; } // Set up algorithm with TimeOffset applied -IAlgorithm_sptr setUpAlgorithmWithTimeOffset(MatrixWorkspace_sptr ws, +IAlgorithm_sptr setUpAlgorithmWithTimeOffset(const MatrixWorkspace_sptr &ws, const double &offset) { setUpADSWithWorkspace setup(ws); IAlgorithm_sptr alg = @@ -67,8 +70,8 @@ IAlgorithm_sptr setUpAlgorithmWithTimeOffset(MatrixWorkspace_sptr ws, // Set up algorithm with DeadTimeTable applied IAlgorithm_sptr -setUpAlgorithmWithDeadTimeTable(MatrixWorkspace_sptr ws, - ITableWorkspace_sptr deadTimes) { +setUpAlgorithmWithDeadTimeTable(const MatrixWorkspace_sptr &ws, + const ITableWorkspace_sptr &deadTimes) { setUpADSWithWorkspace setup(ws); IAlgorithm_sptr alg = algorithmWithoutOptionalPropertiesSet(setup.inputWSName); @@ -77,7 +80,7 @@ setUpAlgorithmWithDeadTimeTable(MatrixWorkspace_sptr ws, } // Set up algorithm with TimeMin applied -IAlgorithm_sptr setUpAlgorithmWithTimeMin(MatrixWorkspace_sptr ws, +IAlgorithm_sptr setUpAlgorithmWithTimeMin(const MatrixWorkspace_sptr &ws, const double &timeMin) { setUpADSWithWorkspace setup(ws); IAlgorithm_sptr alg = @@ -87,7 +90,7 @@ IAlgorithm_sptr setUpAlgorithmWithTimeMin(MatrixWorkspace_sptr ws, } // Set up algorithm with TimeMax applied -IAlgorithm_sptr setUpAlgorithmWithTimeMax(MatrixWorkspace_sptr ws, +IAlgorithm_sptr setUpAlgorithmWithTimeMax(const MatrixWorkspace_sptr &ws, const double &timeMax) { setUpADSWithWorkspace setup(ws); IAlgorithm_sptr alg = @@ -98,8 +101,8 @@ IAlgorithm_sptr setUpAlgorithmWithTimeMax(MatrixWorkspace_sptr ws, // Get the workspace at a particular index from the output workspace // group produced by the PreProcess alg -MatrixWorkspace_sptr getOutputWorkspace(IAlgorithm_sptr muonPreProcessAlg, - const int &index) { +MatrixWorkspace_sptr +getOutputWorkspace(const IAlgorithm_sptr &muonPreProcessAlg, const int &index) { WorkspaceGroup_sptr outputWS; outputWS = muonPreProcessAlg->getProperty("OutputWorkspace"); MatrixWorkspace_sptr wsOut = diff --git a/Framework/Muon/test/PhaseQuadMuonTest.h b/Framework/Muon/test/PhaseQuadMuonTest.h index 0e32fcf1a01ce2abc711a8a6177e923a9e369563..b6d69c4febb83353b6b7fad42cbfd329be45ef2d 100644 --- a/Framework/Muon/test/PhaseQuadMuonTest.h +++ b/Framework/Muon/test/PhaseQuadMuonTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -17,6 +17,8 @@ #include "MantidDataObjects/TableWorkspace.h" #include <cxxtest/TestSuite.h> +#include <utility> + using namespace Mantid::DataObjects; using namespace Mantid::API; @@ -25,8 +27,8 @@ namespace { const int dead1 = 4; const int dead2 = 12; -void populatePhaseTableWithDeadDetectors(ITableWorkspace_sptr phaseTable, - const MatrixWorkspace_sptr ws) { +void populatePhaseTableWithDeadDetectors(const ITableWorkspace_sptr &phaseTable, + const MatrixWorkspace_sptr &ws) { phaseTable->addColumn("int", "DetectprID"); phaseTable->addColumn("double", "Asymmetry"); phaseTable->addColumn("double", "phase"); @@ -42,7 +44,7 @@ void populatePhaseTableWithDeadDetectors(ITableWorkspace_sptr phaseTable, } } } -void populatePhaseTable(ITableWorkspace_sptr phaseTable, +void populatePhaseTable(const ITableWorkspace_sptr &phaseTable, std::vector<std::string> names, bool swap = false) { phaseTable->addColumn("int", names[0]); phaseTable->addColumn("double", names[1]); @@ -58,12 +60,14 @@ void populatePhaseTable(ITableWorkspace_sptr phaseTable, phaseRow2 << i << asym << phase; } } -void populatePhaseTable(ITableWorkspace_sptr phaseTable) { - populatePhaseTable(phaseTable, {"DetectorID", "Asymmetry", "Phase"}); +void populatePhaseTable(const ITableWorkspace_sptr &phaseTable) { + populatePhaseTable(std::move(phaseTable), + {"DetectorID", "Asymmetry", "Phase"}); } -IAlgorithm_sptr setupAlg(MatrixWorkspace_sptr m_loadedData, bool isChildAlg, - ITableWorkspace_sptr phaseTable) { +IAlgorithm_sptr setupAlg(const MatrixWorkspace_sptr &m_loadedData, + bool isChildAlg, + const ITableWorkspace_sptr &phaseTable) { // Set up PhaseQuad IAlgorithm_sptr phaseQuad = AlgorithmManager::Instance().create("PhaseQuad"); phaseQuad->setChild(isChildAlg); @@ -74,26 +78,28 @@ IAlgorithm_sptr setupAlg(MatrixWorkspace_sptr m_loadedData, bool isChildAlg, return phaseQuad; } -IAlgorithm_sptr setupAlg(MatrixWorkspace_sptr m_loadedData, bool isChildAlg) { +IAlgorithm_sptr setupAlg(const MatrixWorkspace_sptr &m_loadedData, + bool isChildAlg) { // Create and populate a detector table boost::shared_ptr<ITableWorkspace> phaseTable( new Mantid::DataObjects::TableWorkspace); populatePhaseTable(phaseTable); - return setupAlg(m_loadedData, isChildAlg, phaseTable); + return setupAlg(std::move(m_loadedData), isChildAlg, phaseTable); } -IAlgorithm_sptr setupAlg(MatrixWorkspace_sptr m_loadedData, bool isChildAlg, - std::vector<std::string> names, bool swap = false) { +IAlgorithm_sptr setupAlg(const MatrixWorkspace_sptr &m_loadedData, + bool isChildAlg, std::vector<std::string> names, + bool swap = false) { // Create and populate a detector table boost::shared_ptr<ITableWorkspace> phaseTable( new Mantid::DataObjects::TableWorkspace); - populatePhaseTable(phaseTable, names, swap); + populatePhaseTable(phaseTable, std::move(names), swap); - return setupAlg(m_loadedData, isChildAlg, phaseTable); + return setupAlg(std::move(m_loadedData), isChildAlg, phaseTable); } -IAlgorithm_sptr setupAlgDead(MatrixWorkspace_sptr m_loadedData) { +IAlgorithm_sptr setupAlgDead(const MatrixWorkspace_sptr &m_loadedData) { // Create and populate a detector table boost::shared_ptr<ITableWorkspace> phaseTable( new Mantid::DataObjects::TableWorkspace); @@ -102,7 +108,7 @@ IAlgorithm_sptr setupAlgDead(MatrixWorkspace_sptr m_loadedData) { return setupAlg(m_loadedData, true, phaseTable); } -MatrixWorkspace_sptr setupWS(MatrixWorkspace_sptr m_loadedData) { +MatrixWorkspace_sptr setupWS(const MatrixWorkspace_sptr &m_loadedData) { boost::shared_ptr<ITableWorkspace> phaseTable( new Mantid::DataObjects::TableWorkspace); MatrixWorkspace_sptr ws = m_loadedData->clone(); diff --git a/Framework/Muon/test/PlotAsymmetryByLogValueTest.h b/Framework/Muon/test/PlotAsymmetryByLogValueTest.h index db34089905d337de435873474420e87446a562f8..cfc3747ad28d7ab895a352b7fcd6040f4589e47c 100644 --- a/Framework/Muon/test/PlotAsymmetryByLogValueTest.h +++ b/Framework/Muon/test/PlotAsymmetryByLogValueTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Muon/test/RRFMuonTest.h b/Framework/Muon/test/RRFMuonTest.h index 34df4c3957a0f49d1cabf0fc2c319b36a3b6b3d9..6bcba3fcac53fd0b7621c47f769bee43666bb48d 100644 --- a/Framework/Muon/test/RRFMuonTest.h +++ b/Framework/Muon/test/RRFMuonTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Muon/test/RemoveExpDecayTest.h b/Framework/Muon/test/RemoveExpDecayTest.h index f1f36f922d92c82553b7c88495ae0055492bc7ed..ab7399eee72170eca5e69be131da2742b6da2ac2 100644 --- a/Framework/Muon/test/RemoveExpDecayTest.h +++ b/Framework/Muon/test/RemoveExpDecayTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Nexus/CMakeLists.txt b/Framework/Nexus/CMakeLists.txt index 0a00f9f80e76f1d20729b93cee76ba44255e3be2..e481148ce386482ac0aa5a0d7e8c9eb473cda31d 100644 --- a/Framework/Nexus/CMakeLists.txt +++ b/Framework/Nexus/CMakeLists.txt @@ -1,12 +1,13 @@ -set(SRC_FILES src/MuonNexusReader.cpp src/NexusClasses.cpp src/NexusFileIO.cpp) +set(SRC_FILES src/MuonNexusReader.cpp src/NexusClasses.cpp src/NexusFileIO.cpp src/NexusHDF5Descriptor.cpp) set(INC_FILES inc/MantidNexus/MuonNexusReader.h inc/MantidNexus/NexusClasses.h inc/MantidNexus/NexusFileIO.h - inc/MantidNexus/NexusIOHelper.h) + inc/MantidNexus/NexusIOHelper.h + inc/MantidNexus/NexusHDF5Descriptor.h) -set(TEST_FILES NexusIOHelperTest.h) +set(TEST_FILES NexusIOHelperTest.h NexusHDF5DescriptorTest.h) if(COVERALLS) foreach(loop_var ${SRC_FILES} ${INC_FILES}) @@ -38,12 +39,16 @@ set_property(TARGET Nexus PROPERTY FOLDER "MantidFramework") include_directories(inc) +target_include_directories(Nexus + PRIVATE ${HDF5_INCLUDE_DIRS}) + target_link_libraries(Nexus LINK_PRIVATE ${TCMALLOC_LIBRARIES_LINKTIME} ${MANTIDLIBS} ${NEXUS_C_LIBRARIES} - ${NEXUS_LIBRARIES}) + ${NEXUS_LIBRARIES} + ${HDF5_LIBRARIES}) # Add the unit tests directory add_subdirectory(test) diff --git a/Framework/Nexus/inc/MantidNexus/MuonNexusReader.h b/Framework/Nexus/inc/MantidNexus/MuonNexusReader.h index ab72939b6a26f63663f7091c9e0500253a512752..7a8748dae8ffd7853cabea7dbe7d1c2c95dfa3e8 100644 --- a/Framework/Nexus/inc/MantidNexus/MuonNexusReader.h +++ b/Framework/Nexus/inc/MantidNexus/MuonNexusReader.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -48,7 +48,7 @@ private: /// file to base all NXlog times on std::time_t startTime_time_t; ///< startTime in time_t format std::time_t - to_time_t(boost::posix_time::ptime t) ///< convert posix time to time_t + to_time_t(const boost::posix_time::ptime &t) ///< convert posix time to time_t { /** Take the input Posix time, subtract the unix epoch, and return the seconds diff --git a/Framework/Nexus/inc/MantidNexus/NexusClasses.h b/Framework/Nexus/inc/MantidNexus/NexusClasses.h index d2803d98b5051810fd1e496a463a2e5d824c0a17..cb5ab3a3d91762f547139ad01a1a0a63ad8b7714 100644 --- a/Framework/Nexus/inc/MantidNexus/NexusClasses.h +++ b/Framework/Nexus/inc/MantidNexus/NexusClasses.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Nexus/inc/MantidNexus/NexusFileIO.h b/Framework/Nexus/inc/MantidNexus/NexusFileIO.h index bc9d3476adf96b3b69774bc0aecb39ffec26ea04..e6b04b001935f8323cfba04eb3e91f75683d7694 100644 --- a/Framework/Nexus/inc/MantidNexus/NexusFileIO.h +++ b/Framework/Nexus/inc/MantidNexus/NexusFileIO.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidAPI/ITableWorkspace_fwd.h" @@ -83,7 +83,7 @@ public: float *errorSquareds, int64_t *pulsetimes, bool compress) const; int writeEventList(const DataObjects::EventList &el, - std::string group_name) const; + const std::string &group_name) const; template <class T> void writeEventListData(std::vector<T> events, bool writeTOF, @@ -103,7 +103,7 @@ public: const int &spectra) const; /// write bin masking information - bool writeNexusBinMasking(API::MatrixWorkspace_const_sptr ws) const; + bool writeNexusBinMasking(const API::MatrixWorkspace_const_sptr &ws) const; /// Reset the pointer to the progress object. void resetProgress(Mantid::API::Progress *prog); @@ -171,7 +171,7 @@ private: int findMantidWSEntries() const; /// convert posix time to time_t std::time_t - to_time_t(boost::posix_time::ptime t) ///< convert posix time to time_t + to_time_t(const boost::posix_time::ptime &t) ///< convert posix time to time_t { /** Take the input Posix time, subtract the unix epoch, and return the seconds @@ -202,7 +202,7 @@ private: /// Writes given vector column to the currently open Nexus file template <typename VecType, typename ElemType> - void writeNexusVectorColumn(API::Column_const_sptr col, + void writeNexusVectorColumn(const API::Column_const_sptr &col, const std::string &columnName, int nexusType, const std::string &interpret_as) const; diff --git a/Framework/Nexus/inc/MantidNexus/NexusHDF5Descriptor.h b/Framework/Nexus/inc/MantidNexus/NexusHDF5Descriptor.h new file mode 100644 index 0000000000000000000000000000000000000000..d41db1717c86d8475169bfe08941f56172237ada --- /dev/null +++ b/Framework/Nexus/inc/MantidNexus/NexusHDF5Descriptor.h @@ -0,0 +1,75 @@ +// Mantid Repository : https://github.com/mantidproject/mantid +// +// Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS +// SPDX - License - Identifier: GPL - 3.0 + +#pragma once + +#include "MantidKernel/System.h" + +#include <map> +#include <set> +#include <string> + +namespace Mantid { +namespace NeXus { + +class DLLExport NexusHDF5Descriptor { + +public: + /** + * Unique constructor + * @param filename input HDF5 Nexus file name + */ + NexusHDF5Descriptor(const std::string &filename); + + NexusHDF5Descriptor() = delete; + + /** + * Using RAII components, no need to deallocate explicitly + */ + ~NexusHDF5Descriptor() = default; + + /** + * Returns a copy of the current file name + * @return + */ + std::string getFilename() const noexcept; + + /** + * Returns a const reference of the internal map holding all entries in the + * NeXus HDF5 file + * @return map holding all entries by group class + * <pre> + * key: group_class (e.g. NXentry, NXlog) + * value: set with absolute entry names for the group_class key + * (e.g. /entry/log) + * </pre> + */ + const std::map<std::string, std::set<std::string>> &getAllEntries() const + noexcept; + +private: + /** + * Sets m_allEntries, called in HDF5 constructor. + * m_filename must be set + */ + std::map<std::string, std::set<std::string>> initAllEntries(); + + /** NeXus HDF5 file name */ + std::string m_filename; + + /** + * All entries metadata + * <pre> + * key: group_class (e.g. NXentry, NXlog) + * value: set with absolute entry names for the group_class key + * (e.g. /entry/log) + * </pre> + */ + std::map<std::string, std::set<std::string>> m_allEntries; +}; + +} // namespace NeXus +} // namespace Mantid diff --git a/Framework/Nexus/inc/MantidNexus/NexusIOHelper.h b/Framework/Nexus/inc/MantidNexus/NexusIOHelper.h index f779a25b88dcb325d13fe9690bb90892efc18d20..69de03ffe0d0817af6b2334228f7cf9bdf5a50af 100644 --- a/Framework/Nexus/inc/MantidNexus/NexusIOHelper.h +++ b/Framework/Nexus/inc/MantidNexus/NexusIOHelper.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -12,6 +12,9 @@ #include <nexus/NeXusFile.hpp> #include <numeric> #include <string> +#include <utility> + +#include <utility> namespace Mantid { namespace NeXus { @@ -46,8 +49,8 @@ namespace { throw std::runtime_error("Unknown type in Nexus file"); \ } -std::pair<::NeXus::Info, bool> checkIfOpenAndGetInfo(::NeXus::File &file, - std::string entry) { +std::pair<::NeXus::Info, bool> +checkIfOpenAndGetInfo(::NeXus::File &file, const std::string &&entry) { std::pair<::NeXus::Info, bool> info_and_close; info_and_close.second = false; if (!file.isDataSetOpen()) { @@ -160,8 +163,10 @@ T readNexusAnyVariable(::NeXus::File &file, bool close_file) { * and calls readNexusAnyVector via the RUN_NEXUSIOHELPER_FUNCTION macro. */ template <typename T> -std::vector<T> readNexusVector(::NeXus::File &file, std::string entry = "") { - auto info_and_close = checkIfOpenAndGetInfo(file, entry); +std::vector<T> readNexusVector(::NeXus::File &file, + const std::string &entry = "") { + auto info_and_close = + checkIfOpenAndGetInfo(file, std::move(std::move(entry))); auto dims = (info_and_close.first).dims; auto total_size = std::accumulate(dims.begin(), dims.end(), int64_t{1}, std::multiplies<>()); @@ -173,17 +178,19 @@ std::vector<T> readNexusVector(::NeXus::File &file, std::string entry = "") { * readNexusAnySlab via the RUN_NEXUSIOHELPER_FUNCTION macro. */ template <typename T> -std::vector<T> readNexusSlab(::NeXus::File &file, std::string entry, +std::vector<T> readNexusSlab(::NeXus::File &file, const std::string &entry, const std::vector<int64_t> &start, const std::vector<int64_t> &size) { - auto info_and_close = checkIfOpenAndGetInfo(file, entry); + auto info_and_close = + checkIfOpenAndGetInfo(file, std::move(std::move(entry))); RUN_NEXUSIOHELPER_FUNCTION((info_and_close.first).type, readNexusAnySlab, file, start, size, info_and_close.second); } template <typename T> -T readNexusValue(::NeXus::File &file, std::string entry = "") { - auto info_and_close = checkIfOpenAndGetInfo(file, entry); +T readNexusValue(::NeXus::File &file, const std::string &entry = "") { + auto info_and_close = + checkIfOpenAndGetInfo(file, std::move(std::move(entry))); RUN_NEXUSIOHELPER_FUNCTION((info_and_close.first).type, readNexusAnyVariable, file, info_and_close.second); } diff --git a/Framework/Nexus/inc/MantidNexus/PrecompiledHeader.h b/Framework/Nexus/inc/MantidNexus/PrecompiledHeader.h index cb11a20d7719e59e62a7d9a141aef7bb2dc8dd82..23e5654658fae2e717d16bce286bae8404d63cd7 100644 --- a/Framework/Nexus/inc/MantidNexus/PrecompiledHeader.h +++ b/Framework/Nexus/inc/MantidNexus/PrecompiledHeader.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Nexus/src/MuonNexusReader.cpp b/Framework/Nexus/src/MuonNexusReader.cpp index ca153439f82c5f27f8a9e51bae280eb10a0bb348..a32b659da20fec88ad50436091815abc78d85e04 100644 --- a/Framework/Nexus/src/MuonNexusReader.cpp +++ b/Framework/Nexus/src/MuonNexusReader.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidNexus/MuonNexusReader.h" #include "MantidKernel/System.h" diff --git a/Framework/Nexus/src/NexusClasses.cpp b/Framework/Nexus/src/NexusClasses.cpp index 40099c937a94a99c5274037f2bb88b64ec0c8ed6..a2e651fa0f63d99cb345de9cf390fefb0e71bd9f 100644 --- a/Framework/Nexus/src/NexusClasses.cpp +++ b/Framework/Nexus/src/NexusClasses.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/Nexus/src/NexusFileIO.cpp b/Framework/Nexus/src/NexusFileIO.cpp index acad6618507121d287b9ac711c689d78e8e1677e..c82b40f08d4b92432a2d88fc25de3e7b23edc960 100644 --- a/Framework/Nexus/src/NexusFileIO.cpp +++ b/Framework/Nexus/src/NexusFileIO.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + // NexusFileIO // @author Ronald Fowler @@ -574,7 +574,7 @@ size_t getSizeOf(const Kernel::V3D & /*unused*/) { return 3; } */ template <typename VecType, typename ElemType> void NexusFileIO::writeNexusVectorColumn( - Column_const_sptr col, const std::string &columnName, int nexusType, + const Column_const_sptr &col, const std::string &columnName, int nexusType, const std::string &interpret_as) const { ConstColumnVector<VecType> column(col); size_t rowCount = column.size(); @@ -893,7 +893,7 @@ void NexusFileIO::writeEventListData(std::vector<T> events, bool writeTOF, * @param group_name :: group_name to create. * */ int NexusFileIO::writeEventList(const DataObjects::EventList &el, - std::string group_name) const { + const std::string &group_name) const { // write data entry NXstatus status = NXmakegroup(fileID, group_name.c_str(), "NXdata"); if (status == NX_ERROR) @@ -1162,7 +1162,7 @@ bool NexusFileIO::checkEntryAtLevelByAttribute(const std::string &attribute, * @return true for OK, false for error */ bool NexusFileIO::writeNexusBinMasking( - API::MatrixWorkspace_const_sptr ws) const { + const API::MatrixWorkspace_const_sptr &ws) const { std::vector<int> spectra; std::vector<std::size_t> bins; std::vector<double> weights; diff --git a/Framework/Nexus/src/NexusHDF5Descriptor.cpp b/Framework/Nexus/src/NexusHDF5Descriptor.cpp new file mode 100644 index 0000000000000000000000000000000000000000..266397764a7f14be029287535602a87ba80e49cd --- /dev/null +++ b/Framework/Nexus/src/NexusHDF5Descriptor.cpp @@ -0,0 +1,217 @@ +// Mantid Repository : https://github.com/mantidproject/mantid +// +// Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS +// SPDX - License - Identifier: GPL - 3.0 + + +#include "MantidNexus/NexusHDF5Descriptor.h" + +#include <hdf5.h> + +#include <cstdlib> // malloc, calloc +#include <cstring> // strcpy +#include <stdexcept> // std::invalid_argument + +namespace Mantid { +namespace NeXus { + +/// hdf5 specific functions, stay in anonymous namespace to make hdf5 linking +/// PRIVATE +namespace { + +/** + * populate a string attribute from HDF5 attribute handler + * @param attr input HDF5 atttribute handler + * @param data + * @return + */ +herr_t readStringAttribute(hid_t attr, char **data) { + herr_t iRet = 0; + hsize_t thedims[H5S_MAX_RANK]; + + hid_t atype = H5Aget_type(attr); + hsize_t sdim = H5Tget_size(atype); + hid_t space = H5Aget_space(attr); + int ndims = H5Sget_simple_extent_dims(space, thedims, NULL); + + if (ndims == 0) { + if (H5Tis_variable_str(atype)) { + hid_t btype = H5Tget_native_type(atype, H5T_DIR_ASCEND); + iRet = H5Aread(attr, btype, data); + H5Tclose(btype); + } else { + *data = (char *)malloc(sdim + 1); + iRet = H5Aread(attr, atype, *data); + (*data)[sdim] = '\0'; + } + } else if (ndims == 1) { + unsigned int i; + char **strings; + + strings = (char **)malloc(thedims[0] * sizeof(char *)); + + if (!H5Tis_variable_str(atype)) { + strings[0] = (char *)malloc(thedims[0] * sdim * sizeof(char)); + for (i = 1; i < thedims[0]; i++) { + strings[i] = strings[0] + i * sdim; + } + } + + iRet = H5Aread(attr, atype, strings[0]); + *data = (char *)calloc((sdim + 2) * thedims[0], sizeof(char)); + for (i = 0; i < thedims[0]; i++) { + if (i == 0) { + strncpy(*data, strings[i], sdim); + } else { + strcat(*data, ", "); + strncat(*data, strings[i], sdim); + } + } + if (H5Tis_variable_str(atype)) { + H5Dvlen_reclaim(atype, space, H5P_DEFAULT, strings); + } else { + free(strings[0]); + } + + free(strings); + } else { + *data = (char *)malloc(33); + strcpy(*data, " higher dimensional string array"); + *data[32] = '\0'; + } + + H5Tclose(atype); + H5Sclose(space); + if (iRet < 0) + return -1; + return 0; +} + +/** + * Reads a string attribute of N-dimensions + * @param attr input HDF5 attribute handler + * @param data output attribute data + * @param maxlen + * @return + */ +herr_t readStringAttributeN(hid_t attr, char *data, int maxlen) { + herr_t iRet; + char *vdat = NULL; + iRet = readStringAttribute(attr, &vdat); + if (iRet >= 0) { + strncpy(data, vdat, maxlen); + free(vdat); + } + data[maxlen - 1] = '\0'; + return iRet; +} + +void getGroup(hid_t groupID, + std::map<std::string, std::set<std::string>> &allEntries) { + + /** + * Return the NX_class attribute associate with objectName group entry + */ + auto lf_getNxClassAttribute = [&](hid_t groupID, + const char *objectName) -> std::string { + std::string attribute = ""; + hid_t attributeID = H5Aopen_by_name(groupID, objectName, "NX_class", + H5P_DEFAULT, H5P_DEFAULT); + if (attributeID < 0) { + H5Aclose(attributeID); + return attribute; + } + + hid_t type = H5T_C_S1; + hid_t atype = H5Tcopy(type); + char data[128]; + H5Tset_size(atype, sizeof(data)); + readStringAttributeN(attributeID, data, sizeof(data)); + // already null terminated in readStringAttributeN + attribute = std::string(data); + H5Tclose(atype); + H5Aclose(attributeID); + + return attribute; + }; + + // using HDF5 C API + constexpr std::size_t maxLength = 1024; + char groupName[maxLength]; + char memberName[maxLength]; + std::size_t groupNameLength = + static_cast<std::size_t>(H5Iget_name(groupID, groupName, maxLength)); + hsize_t nObjects = 0; + H5Gget_num_objs(groupID, &nObjects); + + const std::string groupNameStr(groupName, groupNameLength); + const std::string nxClass = + (groupNameStr == "/") + ? "" + : lf_getNxClassAttribute(groupID, groupNameStr.c_str()); + + if (!nxClass.empty()) { + allEntries[nxClass].insert(groupNameStr); + } + + for (unsigned int i = 0; i < nObjects; ++i) { + + const int type = H5Gget_objtype_by_idx(groupID, static_cast<size_t>(i)); + const std::size_t memberNameLength = + static_cast<std::size_t>(H5Gget_objname_by_idx( + groupID, static_cast<hsize_t>(i), memberName, maxLength)); + + if (type == H5O_TYPE_GROUP) { + hid_t subGroupID = H5Gopen2(groupID, memberName, H5P_DEFAULT); + getGroup(subGroupID, allEntries); + H5Gclose(subGroupID); + + } else if (type == H5O_TYPE_DATASET) { + const std::string memberNameStr(memberName, memberNameLength); + const std::string absoluteEntryName = groupNameStr + "/" + memberNameStr; + allEntries["SDS"].insert(absoluteEntryName); + } + } +} + +} // namespace + +NexusHDF5Descriptor::NexusHDF5Descriptor(const std::string &filename) + : m_filename(filename), m_allEntries(initAllEntries()) {} + +// PUBLIC +std::string NexusHDF5Descriptor::getFilename() const noexcept { + return m_filename; +} + +const std::map<std::string, std::set<std::string>> & +NexusHDF5Descriptor::getAllEntries() const noexcept { + return m_allEntries; +} + +// PRIVATE +std::map<std::string, std::set<std::string>> +NexusHDF5Descriptor::initAllEntries() { + + hid_t fileID = H5Fopen(m_filename.c_str(), H5F_ACC_RDONLY, H5P_DEFAULT); + if (fileID < 0) { + throw std::invalid_argument( + "ERROR: NeXus::HDF5Descriptor couldn't open hdf5 file " + m_filename + + "\n"); + } + + hid_t groupID = H5Gopen2(fileID, "/", H5P_DEFAULT); + + std::map<std::string, std::set<std::string>> allEntries; + // scan file recursively starting with root group "/" + getGroup(groupID, allEntries); + H5Gclose(groupID); + H5Fclose(fileID); + + // rely on move semantics + return allEntries; +} + +} // namespace NeXus +} // namespace Mantid diff --git a/Framework/Nexus/test/NexusHDF5DescriptorTest.h b/Framework/Nexus/test/NexusHDF5DescriptorTest.h new file mode 100644 index 0000000000000000000000000000000000000000..0ebf44e369ad77175614893c25133ba64a1c9239 --- /dev/null +++ b/Framework/Nexus/test/NexusHDF5DescriptorTest.h @@ -0,0 +1,58 @@ +// Mantid Repository : https://github.com/mantidproject/mantid +// +// Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS +// SPDX - License - Identifier: GPL - 3.0 + +#pragma once + +#include "MantidAPI/FileFinder.h" +#include "MantidNexus/NexusHDF5Descriptor.h" + +#include <cstddef> // std::size_t + +#include <cxxtest/TestSuite.h> + +class NexusHDF5DescriptorTest : public CxxTest::TestSuite { + +public: + // test get functions getFilename and getAllEntries + void test_nexus_hdf5_descriptor_get() { + const std::string filename = + Mantid::API::FileFinder::Instance().getFullPath("EQSANS_89157.nxs.h5"); + + Mantid::NeXus::NexusHDF5Descriptor nexusHDF5Descriptor(filename); + + TS_ASSERT_EQUALS(filename, nexusHDF5Descriptor.getFilename()); + + const std::map<std::string, std::set<std::string>> &allEntries = + nexusHDF5Descriptor.getAllEntries(); + + TS_ASSERT_EQUALS(allEntries.size(), 12); + + // confirms existence of groupClass key and expectedSize for value set + auto lf_TestSet = [&](const std::string &groupClass, + const std::size_t expectedSize) -> std::size_t { + auto itClass = allEntries.find(groupClass); + TS_ASSERT_DIFFERS(itClass, allEntries.end()); + TS_ASSERT_EQUALS(itClass->second.size(), expectedSize); + return expectedSize; + }; + + std::size_t nEntries = 0; + nEntries += lf_TestSet("NXcollection", 39); + nEntries += lf_TestSet("NXdetector", 48); + nEntries += lf_TestSet("NXdisk_chopper", 4); + nEntries += lf_TestSet("NXentry", 1); + nEntries += lf_TestSet("NXevent_data", 48); + nEntries += lf_TestSet("NXinstrument", 1); + nEntries += lf_TestSet("NXlog", 204); + nEntries += lf_TestSet("NXmonitor", 3); + nEntries += lf_TestSet("NXnote", 1); + nEntries += lf_TestSet("NXsample", 1); + nEntries += lf_TestSet("NXuser", 6); + nEntries += lf_TestSet("SDS", 2567); + + TS_ASSERT_EQUALS(nEntries, 2923); + } +}; diff --git a/Framework/Nexus/test/NexusIOHelperTest.h b/Framework/Nexus/test/NexusIOHelperTest.h index 21c8e16e2782ea458265e518ef002850d0e3264d..b39bc993871f47da8618dbc349b393fc4fd9ba2d 100644 --- a/Framework/Nexus/test/NexusIOHelperTest.h +++ b/Framework/Nexus/test/NexusIOHelperTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/NexusGeometry/inc/MantidNexusGeometry/AbstractLogger.h b/Framework/NexusGeometry/inc/MantidNexusGeometry/AbstractLogger.h index 5eda71338ccbce434ffa08194ec17e3200cf267c..440be61b9329d22179aed49d7c29b9d97a0036f2 100644 --- a/Framework/NexusGeometry/inc/MantidNexusGeometry/AbstractLogger.h +++ b/Framework/NexusGeometry/inc/MantidNexusGeometry/AbstractLogger.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/NexusGeometry/inc/MantidNexusGeometry/H5ForwardCompatibility.h b/Framework/NexusGeometry/inc/MantidNexusGeometry/H5ForwardCompatibility.h index b75aaa976bcd33cb7e0f5c8563b0a14a10dadba7..768223fa506acc512f92948f62b2f9d36a66272f 100644 --- a/Framework/NexusGeometry/inc/MantidNexusGeometry/H5ForwardCompatibility.h +++ b/Framework/NexusGeometry/inc/MantidNexusGeometry/H5ForwardCompatibility.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/NexusGeometry/inc/MantidNexusGeometry/Hdf5Version.h b/Framework/NexusGeometry/inc/MantidNexusGeometry/Hdf5Version.h index eac70d50e16213794a3533df0fb8c6e1ff2375e0..c000d96f7dacb538ddb77f29bcc2481284760351 100644 --- a/Framework/NexusGeometry/inc/MantidNexusGeometry/Hdf5Version.h +++ b/Framework/NexusGeometry/inc/MantidNexusGeometry/Hdf5Version.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/NexusGeometry/inc/MantidNexusGeometry/InstrumentBuilder.h b/Framework/NexusGeometry/inc/MantidNexusGeometry/InstrumentBuilder.h index 945c94a296e6818b0fbaa0194ddd3ce5d8d97718..24828bdff3ea60ee460c41bab6e59380ba929293 100644 --- a/Framework/NexusGeometry/inc/MantidNexusGeometry/InstrumentBuilder.h +++ b/Framework/NexusGeometry/inc/MantidNexusGeometry/InstrumentBuilder.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -37,9 +37,10 @@ public: Geometry::IComponent *addComponent(const std::string &compName, const Eigen::Vector3d &position); /// Adds tubes (ObjComponentAssemblies) to the last registered bank - void addTubes(const std::string &bankName, - const std::vector<detail::TubeBuilder> &tubes, - boost::shared_ptr<const Mantid::Geometry::IObject> pixelShape); + void addTubes( + const std::string &bankName, + const std::vector<detail::TubeBuilder> &tubes, + const boost::shared_ptr<const Mantid::Geometry::IObject> &pixelShape); /// Adds detector to the root (instrument) void addDetectorToInstrument( const std::string &detName, detid_t detId, @@ -69,8 +70,9 @@ public: private: /// Add a single tube to the last registed bank - void doAddTube(const std::string &compName, const detail::TubeBuilder &tube, - boost::shared_ptr<const Mantid::Geometry::IObject> pixelShape); + void doAddTube( + const std::string &compName, const detail::TubeBuilder &tube, + const boost::shared_ptr<const Mantid::Geometry::IObject> &pixelShape); /// Sorts detectors void sortDetectors() const; /// product diff --git a/Framework/NexusGeometry/inc/MantidNexusGeometry/JSONGeometryParser.h b/Framework/NexusGeometry/inc/MantidNexusGeometry/JSONGeometryParser.h index 808ebcbec68a84943b66d61204b8fdbe4ee23808..b5cdc628ada487f38c50ef13c549be9011447cae 100644 --- a/Framework/NexusGeometry/inc/MantidNexusGeometry/JSONGeometryParser.h +++ b/Framework/NexusGeometry/inc/MantidNexusGeometry/JSONGeometryParser.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/NexusGeometry/inc/MantidNexusGeometry/JSONInstrumentBuilder.h b/Framework/NexusGeometry/inc/MantidNexusGeometry/JSONInstrumentBuilder.h index 8a51283a03e88bcfc0f6036ca4b41094676bdf66..89f6581bc76a81f81b99beb90256e9f519105323 100644 --- a/Framework/NexusGeometry/inc/MantidNexusGeometry/JSONInstrumentBuilder.h +++ b/Framework/NexusGeometry/inc/MantidNexusGeometry/JSONInstrumentBuilder.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/NexusGeometry/inc/MantidNexusGeometry/NexusGeometryDefinitions.h b/Framework/NexusGeometry/inc/MantidNexusGeometry/NexusGeometryDefinitions.h index ce91a22b5df20022121c79d6a3a172d5cf195045..a3d68e0a20e7222a909c0005d4ef90584673398b 100644 --- a/Framework/NexusGeometry/inc/MantidNexusGeometry/NexusGeometryDefinitions.h +++ b/Framework/NexusGeometry/inc/MantidNexusGeometry/NexusGeometryDefinitions.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/NexusGeometry/inc/MantidNexusGeometry/NexusGeometryParser.h b/Framework/NexusGeometry/inc/MantidNexusGeometry/NexusGeometryParser.h index 8a179a86f2acf4ea573521211645d06f5ae180c9..09d4f07a03205fec2381edc448c1f8cc19420c70 100644 --- a/Framework/NexusGeometry/inc/MantidNexusGeometry/NexusGeometryParser.h +++ b/Framework/NexusGeometry/inc/MantidNexusGeometry/NexusGeometryParser.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/NexusGeometry/inc/MantidNexusGeometry/NexusGeometrySave.h b/Framework/NexusGeometry/inc/MantidNexusGeometry/NexusGeometrySave.h index 691f57d84db61665bcb3d35ef790723618f966fa..084e4a5635d420c2413c5aec08376277aece9352 100644 --- a/Framework/NexusGeometry/inc/MantidNexusGeometry/NexusGeometrySave.h +++ b/Framework/NexusGeometry/inc/MantidNexusGeometry/NexusGeometrySave.h @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - /* * NexusGeometrySave::saveInstrument : * Save methods to save geometry and metadata from memory diff --git a/Framework/NexusGeometry/inc/MantidNexusGeometry/NexusGeometryUtilities.h b/Framework/NexusGeometry/inc/MantidNexusGeometry/NexusGeometryUtilities.h index 5dddb02af12fb4f0c53f3ed5e351b58634301172..86fe3e0b5ed57f84f394fc1e3fab5cabd44eefc4 100644 --- a/Framework/NexusGeometry/inc/MantidNexusGeometry/NexusGeometryUtilities.h +++ b/Framework/NexusGeometry/inc/MantidNexusGeometry/NexusGeometryUtilities.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/NexusGeometry/inc/MantidNexusGeometry/NexusShapeFactory.h b/Framework/NexusGeometry/inc/MantidNexusGeometry/NexusShapeFactory.h index 2d17eb50cb6610e7b96bd88fbfe98c368f519be9..7add1675840a0753a7b89eddbec137889c00fcbd 100644 --- a/Framework/NexusGeometry/inc/MantidNexusGeometry/NexusShapeFactory.h +++ b/Framework/NexusGeometry/inc/MantidNexusGeometry/NexusShapeFactory.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/NexusGeometry/inc/MantidNexusGeometry/TubeBuilder.h b/Framework/NexusGeometry/inc/MantidNexusGeometry/TubeBuilder.h index 44fb50c5d72285a31af07cb2bcf6817f31828aed..94626863f7d0b5c938f50a06625fb57cb6e03f2c 100644 --- a/Framework/NexusGeometry/inc/MantidNexusGeometry/TubeBuilder.h +++ b/Framework/NexusGeometry/inc/MantidNexusGeometry/TubeBuilder.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidNexusGeometry/DllConfig.h" @@ -25,7 +25,8 @@ Colinear detectors with cylindrical shape. class MANTID_NEXUSGEOMETRY_DLL TubeBuilder { public: TubeBuilder(const Mantid::Geometry::IObject &pixelShape, - Eigen::Vector3d firstDetectorPosition, int firstDetectorId); + const Eigen::Vector3d &firstDetectorPosition, + int firstDetectorId); const Eigen::Vector3d &tubePosition() const; const std::vector<Eigen::Vector3d> &detPositions() const; const std::vector<int> &detIDs() const; diff --git a/Framework/NexusGeometry/inc/MantidNexusGeometry/TubeHelpers.h b/Framework/NexusGeometry/inc/MantidNexusGeometry/TubeHelpers.h index cd20d167873531e886178413f3c384de47b24bc2..16b756f361d7b8830295060fc194a1ae705f9084 100644 --- a/Framework/NexusGeometry/inc/MantidNexusGeometry/TubeHelpers.h +++ b/Framework/NexusGeometry/inc/MantidNexusGeometry/TubeHelpers.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/NexusGeometry/src/H5ForwardCompatibility.cpp b/Framework/NexusGeometry/src/H5ForwardCompatibility.cpp index 85c62a97355218242e79eee3210aeb4e3442ad36..614d7871b6a5c9afdb4a854fc3950bdb907833ba 100644 --- a/Framework/NexusGeometry/src/H5ForwardCompatibility.cpp +++ b/Framework/NexusGeometry/src/H5ForwardCompatibility.cpp @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #include "MantidNexusGeometry/H5ForwardCompatibility.h" #include <cstring> //memset. #include <string> diff --git a/Framework/NexusGeometry/src/Hdf5Version.cpp b/Framework/NexusGeometry/src/Hdf5Version.cpp index 0cbb1c52b98a1e0ea5c5d5372b6fe8f3298f38c4..da3ba0a8a076d6b9f42d266d52050787d255bdf8 100644 --- a/Framework/NexusGeometry/src/Hdf5Version.cpp +++ b/Framework/NexusGeometry/src/Hdf5Version.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidNexusGeometry/Hdf5Version.h" #include <H5Cpp.h> diff --git a/Framework/NexusGeometry/src/InstrumentBuilder.cpp b/Framework/NexusGeometry/src/InstrumentBuilder.cpp index 17eba373e55c2dc38224a134c27fec9f1df91043..30e54b073b651495eed42fe143fae0d5550d25fc 100644 --- a/Framework/NexusGeometry/src/InstrumentBuilder.cpp +++ b/Framework/NexusGeometry/src/InstrumentBuilder.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidNexusGeometry/InstrumentBuilder.h" #include "MantidGeometry/Instrument.h" @@ -14,6 +14,7 @@ #include "MantidNexusGeometry/NexusShapeFactory.h" #include <boost/make_shared.hpp> +#include <utility> namespace Mantid { namespace NexusGeometry { @@ -56,7 +57,7 @@ InstrumentBuilder::addComponent(const std::string &compName, */ void InstrumentBuilder::addTubes( const std::string &bankName, const std::vector<detail::TubeBuilder> &tubes, - boost::shared_ptr<const Mantid::Geometry::IObject> pixelShape) { + const boost::shared_ptr<const Mantid::Geometry::IObject> &pixelShape) { for (size_t i = 0; i < tubes.size(); i++) doAddTube(bankName + "_tube_" + std::to_string(i), tubes[i], pixelShape); } @@ -68,7 +69,7 @@ void InstrumentBuilder::addTubes( */ void InstrumentBuilder::doAddTube( const std::string &compName, const detail::TubeBuilder &tube, - boost::shared_ptr<const Mantid::Geometry::IObject> pixelShape) { + const boost::shared_ptr<const Mantid::Geometry::IObject> &pixelShape) { auto *objComp(new Geometry::ObjCompAssembly(compName)); const auto &pos = tube.tubePosition(); objComp->setPos(pos(0), pos(1), pos(2)); @@ -98,7 +99,7 @@ void InstrumentBuilder::addDetectorToLastBank( detector->translate(Mantid::Kernel::toV3D(relativeOffset)); // No rotation set for detector pixels of a bank. This is not possible in the // Nexus Geometry specification. - detector->setShape(shape); + detector->setShape(std::move(shape)); m_lastBank->add(detector); m_instrument->markAsDetectorIncomplete(detector); } diff --git a/Framework/NexusGeometry/src/JSONGeometryParser.cpp b/Framework/NexusGeometry/src/JSONGeometryParser.cpp index 5d76f225b13b925f6d382974a66463cd8dbf5ab0..942138140e8ddb1d069d21bafae34ab171f1f69f 100644 --- a/Framework/NexusGeometry/src/JSONGeometryParser.cpp +++ b/Framework/NexusGeometry/src/JSONGeometryParser.cpp @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #include "MantidNexusGeometry/JSONGeometryParser.h" #include "MantidKernel/Logger.h" #include "MantidNexusGeometry/NexusGeometryDefinitions.h" diff --git a/Framework/NexusGeometry/src/JSONInstrumentBuilder.cpp b/Framework/NexusGeometry/src/JSONInstrumentBuilder.cpp index 5ba6ea4de6495104b0e8776fb1856e929c7d02cb..7225344feeabdd85a7d7b7d7b2f4515ffa2807be 100644 --- a/Framework/NexusGeometry/src/JSONInstrumentBuilder.cpp +++ b/Framework/NexusGeometry/src/JSONInstrumentBuilder.cpp @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #include "MantidNexusGeometry/JSONInstrumentBuilder.h" #include "MantidGeometry/Instrument.h" #include "MantidGeometry/Objects/IObject.h" diff --git a/Framework/NexusGeometry/src/NexusGeometryParser.cpp b/Framework/NexusGeometry/src/NexusGeometryParser.cpp index 2f5da3167f8867da3cebb96348403577e85f1642..12b9acd9c59f70f7c3896c70afdff90e845e7c0b 100644 --- a/Framework/NexusGeometry/src/NexusGeometryParser.cpp +++ b/Framework/NexusGeometry/src/NexusGeometryParser.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidNexusGeometry/NexusGeometryParser.h" #include "MantidGeometry/Instrument.h" diff --git a/Framework/NexusGeometry/src/NexusGeometrySave.cpp b/Framework/NexusGeometry/src/NexusGeometrySave.cpp index ac27550517cc3dedaaf165d0864695678e76c031..707510f5d1ef958e8d016f2cf94b5d3be4d3a719 100644 --- a/Framework/NexusGeometry/src/NexusGeometrySave.cpp +++ b/Framework/NexusGeometry/src/NexusGeometrySave.cpp @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - /* * NexusGeometrySave::saveInstrument : * Save methods to save geometry and metadata from memory diff --git a/Framework/NexusGeometry/src/NexusGeometryUtilities.cpp b/Framework/NexusGeometry/src/NexusGeometryUtilities.cpp index 5c77f90775655d52210e07ccd2e54fbec7b394bd..f1bfd151e865fba427fbb47b19ea717393976564 100644 --- a/Framework/NexusGeometry/src/NexusGeometryUtilities.cpp +++ b/Framework/NexusGeometry/src/NexusGeometryUtilities.cpp @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #include "MantidNexusGeometry/NexusGeometryUtilities.h" #include "MantidNexusGeometry/H5ForwardCompatibility.h" #include "MantidNexusGeometry/NexusGeometryDefinitions.h" diff --git a/Framework/NexusGeometry/src/NexusShapeFactory.cpp b/Framework/NexusGeometry/src/NexusShapeFactory.cpp index 22d522af90febf1923d42b081a124073b08599cf..ae369df36727e348db2d641eb835f11348297715 100644 --- a/Framework/NexusGeometry/src/NexusShapeFactory.cpp +++ b/Framework/NexusGeometry/src/NexusShapeFactory.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidNexusGeometry/NexusShapeFactory.h" #include "MantidGeometry/Objects/CSGObject.h" diff --git a/Framework/NexusGeometry/src/TubeBuilder.cpp b/Framework/NexusGeometry/src/TubeBuilder.cpp index 44d423d3e073fa249b474204bdf463b3f189b5bd..c01c154a3e7d6816c4a18c8f96fdfb018c797180 100644 --- a/Framework/NexusGeometry/src/TubeBuilder.cpp +++ b/Framework/NexusGeometry/src/TubeBuilder.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidNexusGeometry/TubeBuilder.h" #include "MantidGeometry/Objects/IObject.h" @@ -17,7 +17,7 @@ namespace NexusGeometry { namespace detail { TubeBuilder::TubeBuilder(const Mantid::Geometry::IObject &pixelShape, - Eigen::Vector3d firstDetectorPosition, + const Eigen::Vector3d &firstDetectorPosition, int firstDetectorId) : m_pixelHeight(pixelShape.getGeometryHandler()->shapeInfo().height()), m_pixelRadius(pixelShape.getGeometryHandler()->shapeInfo().radius()) { diff --git a/Framework/NexusGeometry/src/TubeHelpers.cpp b/Framework/NexusGeometry/src/TubeHelpers.cpp index 2dbec668110cdb62c829a00364f68f7d0f1a6cdc..376a8276997832d2bbbf90fd5be8bdacce2606a8 100644 --- a/Framework/NexusGeometry/src/TubeHelpers.cpp +++ b/Framework/NexusGeometry/src/TubeHelpers.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidNexusGeometry/TubeHelpers.h" #include "MantidGeometry/Objects/IObject.h" diff --git a/Framework/NexusGeometry/test/CMakeLists.txt b/Framework/NexusGeometry/test/CMakeLists.txt index 573d6ccc0d9b8e03557af290fe5386f076466fa6..eaa05475724fdd563c8bcf12bf8580fd4d3468a9 100644 --- a/Framework/NexusGeometry/test/CMakeLists.txt +++ b/Framework/NexusGeometry/test/CMakeLists.txt @@ -1,8 +1,6 @@ if(CXXTEST_FOUND) include_directories(SYSTEM ${CXXTEST_INCLUDE_DIR} - ${GMOCK_INCLUDE_DIR} - ${GTEST_INCLUDE_DIR} ${Boost_INCLUDE_DIRS} ../../TestHelpers/inc) @@ -28,7 +26,7 @@ if(CXXTEST_FOUND) ${NEXUS_LIBRARIES} ${HDF5_LIBRARIES} ${HDF5_HL_LIBRARIES} - ${GMOCK_LIBRARIES}) + gmock) add_dependencies(NexusGeometryTest Geometry) add_dependencies(FrameworkTests NexusGeometryTest) add_dependencies(NexusGeometryTest StandardTestData) diff --git a/Framework/NexusGeometry/test/InstrumentBuilderTest.h b/Framework/NexusGeometry/test/InstrumentBuilderTest.h index ce760753027d002660332235f65da14463b7d287..79131f0f1b779d51fc4164a58e5d1a0f297a994e 100644 --- a/Framework/NexusGeometry/test/InstrumentBuilderTest.h +++ b/Framework/NexusGeometry/test/InstrumentBuilderTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/NexusGeometry/test/JSONGeometryParserTest.h b/Framework/NexusGeometry/test/JSONGeometryParserTest.h index 2d1e38e4a2113c32f4e836ac7b4169b572d70e43..c321802e32c7700d2309a2515a75463becb51ed1 100644 --- a/Framework/NexusGeometry/test/JSONGeometryParserTest.h +++ b/Framework/NexusGeometry/test/JSONGeometryParserTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/NexusGeometry/test/JSONInstrumentBuilderTest.h b/Framework/NexusGeometry/test/JSONInstrumentBuilderTest.h index a3fb7148a17913ac62f3177ea2c1fc856b333842..ba18527fd436ba94e6e64af89beb0bfdc3f6c6bf 100644 --- a/Framework/NexusGeometry/test/JSONInstrumentBuilderTest.h +++ b/Framework/NexusGeometry/test/JSONInstrumentBuilderTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/NexusGeometry/test/NexusGeometryParserTest.h b/Framework/NexusGeometry/test/NexusGeometryParserTest.h index dba4a3efa189d4ee1b16393b795b56a5e24545ad..fc2c66c80ea0c747a8f4367f574273c9b69c75be 100644 --- a/Framework/NexusGeometry/test/NexusGeometryParserTest.h +++ b/Framework/NexusGeometry/test/NexusGeometryParserTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/NexusGeometry/test/NexusGeometrySaveTest.h b/Framework/NexusGeometry/test/NexusGeometrySaveTest.h index cbd3a3d5f3264a9a1df403743dec183362d85acd..8cb977402ba70bd588af0e9825aef087f5fc0fd4 100644 --- a/Framework/NexusGeometry/test/NexusGeometrySaveTest.h +++ b/Framework/NexusGeometry/test/NexusGeometrySaveTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/NexusGeometry/test/NexusShapeFactoryTest.h b/Framework/NexusGeometry/test/NexusShapeFactoryTest.h index 282ef221a5248853a56888436a12643d946c4502..e91a89ccf817f4923317afda0abb2a466dd2320f 100644 --- a/Framework/NexusGeometry/test/NexusShapeFactoryTest.h +++ b/Framework/NexusGeometry/test/NexusShapeFactoryTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Objects/IObject.h" #include "MantidGeometry/Objects/MeshObject.h" diff --git a/Framework/NexusGeometry/test/TubeBuilderTest.h b/Framework/NexusGeometry/test/TubeBuilderTest.h index 490c4325639ae61bd851672da065933aabfbea2e..3546e57cb04bafa2481071e08836ae584195a50e 100644 --- a/Framework/NexusGeometry/test/TubeBuilderTest.h +++ b/Framework/NexusGeometry/test/TubeBuilderTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/NexusGeometry/test/TubeHelpersTest.h b/Framework/NexusGeometry/test/TubeHelpersTest.h index f6a68455d3373a9e88173ea684b500974561d815..b14a0216243453ee4009228f49d92291481beaeb 100644 --- a/Framework/NexusGeometry/test/TubeHelpersTest.h +++ b/Framework/NexusGeometry/test/TubeHelpersTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/NexusGeometry/test/mockobjects.h b/Framework/NexusGeometry/test/mockobjects.h index 13be27d7e26ecc67dc40070a2e5ad247ada06e2b..01ff9f620443f4662ac029aaa462c86316447a30 100644 --- a/Framework/NexusGeometry/test/mockobjects.h +++ b/Framework/NexusGeometry/test/mockobjects.h @@ -1,3 +1,9 @@ +// Mantid Repository : https://github.com/mantidproject/mantid +// +// Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS +// SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidKernel/ProgressBase.h" #include "MantidKernel/WarningSuppressions.h" diff --git a/Framework/Parallel/inc/MantidParallel/Collectives.h b/Framework/Parallel/inc/MantidParallel/Collectives.h index 1be289fcb4e73ce1fdd04a7170315a906fd7a78b..b7e971c0e5ef93ba2362455b6c9036435c4ed8d5 100644 --- a/Framework/Parallel/inc/MantidParallel/Collectives.h +++ b/Framework/Parallel/inc/MantidParallel/Collectives.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Parallel/inc/MantidParallel/Communicator.h b/Framework/Parallel/inc/MantidParallel/Communicator.h index 0fcda543f5c90c2a7ff7c8155ae10fb4c609d1cc..17c50a571655aa84b335971ad302be93c0778c8f 100644 --- a/Framework/Parallel/inc/MantidParallel/Communicator.h +++ b/Framework/Parallel/inc/MantidParallel/Communicator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Parallel/inc/MantidParallel/DllConfig.h b/Framework/Parallel/inc/MantidParallel/DllConfig.h index e62a0196c5a7f1808f27ab97e408603e33bf3545..9fabdfc9aa73f26d3490a36c829dde190ce7306b 100644 --- a/Framework/Parallel/inc/MantidParallel/DllConfig.h +++ b/Framework/Parallel/inc/MantidParallel/DllConfig.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Parallel/inc/MantidParallel/ExecutionMode.h b/Framework/Parallel/inc/MantidParallel/ExecutionMode.h index eb3b122870300aaffc0f4b0dc2c970ddb4b42664..1e71cac048257839ac72a6d9c81a67a719be02b5 100644 --- a/Framework/Parallel/inc/MantidParallel/ExecutionMode.h +++ b/Framework/Parallel/inc/MantidParallel/ExecutionMode.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Parallel/inc/MantidParallel/IO/Chunker.h b/Framework/Parallel/inc/MantidParallel/IO/Chunker.h index 0426beabdc144140b05502996ef6ea322dee4446..43186c90063967de00904479e066170f4497697d 100644 --- a/Framework/Parallel/inc/MantidParallel/IO/Chunker.h +++ b/Framework/Parallel/inc/MantidParallel/IO/Chunker.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Parallel/inc/MantidParallel/IO/EventDataPartitioner.h b/Framework/Parallel/inc/MantidParallel/IO/EventDataPartitioner.h index d582a192898ddf409ce1142b3375effa4aa501a5..27e69d0bc76324acc884f887b2903422e4139bdb 100644 --- a/Framework/Parallel/inc/MantidParallel/IO/EventDataPartitioner.h +++ b/Framework/Parallel/inc/MantidParallel/IO/EventDataPartitioner.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Parallel/inc/MantidParallel/IO/EventLoader.h b/Framework/Parallel/inc/MantidParallel/IO/EventLoader.h index d364e79759a8b35c2d854dc409c19796454b5b2c..a058a511b4d0f1f3cd19a4f66b1f7369197d7acb 100644 --- a/Framework/Parallel/inc/MantidParallel/IO/EventLoader.h +++ b/Framework/Parallel/inc/MantidParallel/IO/EventLoader.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -37,13 +37,13 @@ MANTID_PARALLEL_DLL void load(const Communicator &communicator, const std::string &filename, const std::string &groupName, const std::vector<std::string> &bankNames, const std::vector<int32_t> &bankOffsets, - std::vector<std::vector<Types::Event::TofEvent> *> eventLists); + const std::vector<std::vector<Types::Event::TofEvent> *> &eventLists); MANTID_PARALLEL_DLL void load(const std::string &filename, const std::string &groupName, const std::vector<std::string> &bankNames, const std::vector<int32_t> &bankOffsets, - std::vector<std::vector<Types::Event::TofEvent> *> eventLists, + const std::vector<std::vector<Types::Event::TofEvent> *> &eventLists, bool precalcEvents); } // namespace EventLoader diff --git a/Framework/Parallel/inc/MantidParallel/IO/EventLoaderHelpers.h b/Framework/Parallel/inc/MantidParallel/IO/EventLoaderHelpers.h index 3e7b14191697ec3e1548f92dd9de84ac3cb3e8d4..9e0ff90110544551a05dd823c17027b7bc79537e 100644 --- a/Framework/Parallel/inc/MantidParallel/IO/EventLoaderHelpers.h +++ b/Framework/Parallel/inc/MantidParallel/IO/EventLoaderHelpers.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -76,10 +76,11 @@ void load(const Chunker &chunker, NXEventDataSource<TimeOffsetType> &dataSource, } template <class TimeOffsetType> -void load(const Communicator &comm, const H5::Group &group, - const std::vector<std::string> &bankNames, - const std::vector<int32_t> &bankOffsets, - std::vector<std::vector<Types::Event::TofEvent> *> eventLists) { +void load( + const Communicator &comm, const H5::Group &group, + const std::vector<std::string> &bankNames, + const std::vector<int32_t> &bankOffsets, + const std::vector<std::vector<Types::Event::TofEvent> *> &eventLists) { // In tests loading from a single SSD this chunk size seems close to the // optimum. May need to be adjusted in the future (potentially dynamically) // when loading from parallel file systems and running on a cluster. diff --git a/Framework/Parallel/inc/MantidParallel/IO/EventParser.h b/Framework/Parallel/inc/MantidParallel/IO/EventParser.h index 80d0fa21dc936a4cb70aba05ba1ab0647d31dba9..1e2e3ac67a599e0cc93d06ab329eedf23457e1e4 100644 --- a/Framework/Parallel/inc/MantidParallel/IO/EventParser.h +++ b/Framework/Parallel/inc/MantidParallel/IO/EventParser.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Parallel/inc/MantidParallel/IO/EventsListsShmemManager.h b/Framework/Parallel/inc/MantidParallel/IO/EventsListsShmemManager.h index bc0f332ea8c26ce57f3ebcadf58f3f13f6aeffb8..c83e59385363251bcddab3461079f2367d7849fb 100644 --- a/Framework/Parallel/inc/MantidParallel/IO/EventsListsShmemManager.h +++ b/Framework/Parallel/inc/MantidParallel/IO/EventsListsShmemManager.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Parallel/inc/MantidParallel/IO/EventsListsShmemStorage.h b/Framework/Parallel/inc/MantidParallel/IO/EventsListsShmemStorage.h index 0ed53c29796541cf8665a4589af3b58a8f1f5c6a..f27db136667263de45f32c4fe0ba8831981b8427 100644 --- a/Framework/Parallel/inc/MantidParallel/IO/EventsListsShmemStorage.h +++ b/Framework/Parallel/inc/MantidParallel/IO/EventsListsShmemStorage.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Parallel/inc/MantidParallel/IO/MultiProcessEventLoader.h b/Framework/Parallel/inc/MantidParallel/IO/MultiProcessEventLoader.h index 2d2c464e70c0e5e731483bd64a4c45dc9f22c687..4590bb9874b20e44438827e0011b85f9bcc66e06 100644 --- a/Framework/Parallel/inc/MantidParallel/IO/MultiProcessEventLoader.h +++ b/Framework/Parallel/inc/MantidParallel/IO/MultiProcessEventLoader.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Parallel/inc/MantidParallel/IO/NXEventDataLoader.h b/Framework/Parallel/inc/MantidParallel/IO/NXEventDataLoader.h index 29e8f677adeb63100bd7275a1d4edc3d1a1cd00d..64134ebbf05db6174e734671ff4835b2205e54a7 100644 --- a/Framework/Parallel/inc/MantidParallel/IO/NXEventDataLoader.h +++ b/Framework/Parallel/inc/MantidParallel/IO/NXEventDataLoader.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Parallel/inc/MantidParallel/IO/NXEventDataSource.h b/Framework/Parallel/inc/MantidParallel/IO/NXEventDataSource.h index bbf660447ccc286c08dca170a6615b67a5035b2b..cbcb4526c0f436945eb0e49e8a2d3d62873e5690 100644 --- a/Framework/Parallel/inc/MantidParallel/IO/NXEventDataSource.h +++ b/Framework/Parallel/inc/MantidParallel/IO/NXEventDataSource.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Parallel/inc/MantidParallel/IO/PulseTimeGenerator.h b/Framework/Parallel/inc/MantidParallel/IO/PulseTimeGenerator.h index 4e08bf15482ac5d8398db3ce8de1bdf44b508919..de81af25cdf299a37b37d7ae059623daf3aad140 100644 --- a/Framework/Parallel/inc/MantidParallel/IO/PulseTimeGenerator.h +++ b/Framework/Parallel/inc/MantidParallel/IO/PulseTimeGenerator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Parallel/inc/MantidParallel/Nonblocking.h b/Framework/Parallel/inc/MantidParallel/Nonblocking.h index 01d445cd7aa9edb71c1842c5de4666d4f54528e2..7eedaf24287baeb4b41eeb936b985831756b4cdd 100644 --- a/Framework/Parallel/inc/MantidParallel/Nonblocking.h +++ b/Framework/Parallel/inc/MantidParallel/Nonblocking.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Parallel/inc/MantidParallel/Request.h b/Framework/Parallel/inc/MantidParallel/Request.h index d18a21cb0c51fffaf3897893e19459fdd2001d5b..7550a1d5494d1492aef0cc701183d7c9bf005453 100644 --- a/Framework/Parallel/inc/MantidParallel/Request.h +++ b/Framework/Parallel/inc/MantidParallel/Request.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Parallel/inc/MantidParallel/Status.h b/Framework/Parallel/inc/MantidParallel/Status.h index 2242a663456f5e1efad35f7888015674fc6bb3c4..7f0bbca215a987cd6d537845b24d7e6d8e858765 100644 --- a/Framework/Parallel/inc/MantidParallel/Status.h +++ b/Framework/Parallel/inc/MantidParallel/Status.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Parallel/inc/MantidParallel/StorageMode.h b/Framework/Parallel/inc/MantidParallel/StorageMode.h index e2ee7e31dde1ec4bcbc4a419a2ebefd103737542..bd269f136c557e79477845205c8d99bf0c99e92b 100644 --- a/Framework/Parallel/inc/MantidParallel/StorageMode.h +++ b/Framework/Parallel/inc/MantidParallel/StorageMode.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Parallel/inc/MantidParallel/ThreadingBackend.h b/Framework/Parallel/inc/MantidParallel/ThreadingBackend.h index 3a5520e1a08b8d7d80c4c6204cceb405baa44fb7..75f531a636d1e58b18f5dce6e0a61129a8dc6907 100644 --- a/Framework/Parallel/inc/MantidParallel/ThreadingBackend.h +++ b/Framework/Parallel/inc/MantidParallel/ThreadingBackend.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Parallel/src/Communicator.cpp b/Framework/Parallel/src/Communicator.cpp index be0f1665d516544ccaae88a0ef843ad13a0c7870..6e44485b03cc0773e16639103f149128527e969d 100644 --- a/Framework/Parallel/src/Communicator.cpp +++ b/Framework/Parallel/src/Communicator.cpp @@ -1,9 +1,11 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + +#include <utility> + #include "MantidParallel/Communicator.h" #ifdef MPI_EXPERIMENTAL @@ -24,7 +26,7 @@ Communicator::Communicator(const boost::mpi::communicator &comm) Communicator::Communicator(boost::shared_ptr<detail::ThreadingBackend> backend, const int rank) - : m_backend(backend), m_rank(rank) {} + : m_backend(std::move(backend)), m_rank(rank) {} int Communicator::rank() const { if (m_backend) diff --git a/Framework/Parallel/src/ExecutionMode.cpp b/Framework/Parallel/src/ExecutionMode.cpp index e928c0127f48a1b9d3eb4422865bed1bb0c32a87..da1d7d464e5c437d240093cbf419b341066f9e48 100644 --- a/Framework/Parallel/src/ExecutionMode.cpp +++ b/Framework/Parallel/src/ExecutionMode.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidParallel/ExecutionMode.h" diff --git a/Framework/Parallel/src/IO/Chunker.cpp b/Framework/Parallel/src/IO/Chunker.cpp index c8b996dac3ec5cdfba8c43bd015a022f9dfdefaa..d9f6a30f22f47f438025c5210ba4c3411abf3c4b 100644 --- a/Framework/Parallel/src/IO/Chunker.cpp +++ b/Framework/Parallel/src/IO/Chunker.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include <numeric> diff --git a/Framework/Parallel/src/IO/EventLoader.cpp b/Framework/Parallel/src/IO/EventLoader.cpp index fa9197920312bf6c31c0bd63eaf3eef428a58927..a4a0ba4641aa8ddf72bd277d992a46da5b1f8278 100644 --- a/Framework/Parallel/src/IO/EventLoader.cpp +++ b/Framework/Parallel/src/IO/EventLoader.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidParallel/IO/EventLoader.h" #include "MantidKernel/ConfigService.h" @@ -45,11 +45,11 @@ makeAnyEventIdToBankMap(const std::string &filename, } /// Load events from given banks into event lists using MPI. -void load(const Communicator &comm, const std::string &filename, - const std::string &groupName, - const std::vector<std::string> &bankNames, - const std::vector<int32_t> &bankOffsets, - std::vector<std::vector<Types::Event::TofEvent> *> eventLists) { +void load( + const Communicator &comm, const std::string &filename, + const std::string &groupName, const std::vector<std::string> &bankNames, + const std::vector<int32_t> &bankOffsets, + const std::vector<std::vector<Types::Event::TofEvent> *> &eventLists) { H5::H5File file(filename, H5F_ACC_RDONLY); H5::Group group = file.openGroup(groupName); load(readDataType(group, bankNames, "event_time_offset"), comm, group, @@ -60,7 +60,7 @@ void load(const Communicator &comm, const std::string &filename, void load(const std::string &filename, const std::string &groupname, const std::vector<std::string> &bankNames, const std::vector<int32_t> &bankOffsets, - std::vector<std::vector<Types::Event::TofEvent> *> eventLists, + const std::vector<std::vector<Types::Event::TofEvent> *> &eventLists, bool precalcEvents) { auto concurencyNumber = PARALLEL_GET_MAX_THREADS; auto numThreads = std::max<int>(concurencyNumber / 2, 1); diff --git a/Framework/Parallel/src/IO/EventLoaderChild.cpp b/Framework/Parallel/src/IO/EventLoaderChild.cpp index b14eff2461736b268a442d68fe952663d4daeb43..7b8c66996370a76c11cceb689e697389ee9cf835 100644 --- a/Framework/Parallel/src/IO/EventLoaderChild.cpp +++ b/Framework/Parallel/src/IO/EventLoaderChild.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidParallel/IO/EventsListsShmemStorage.h" #include "MantidParallel/IO/MultiProcessEventLoader.h" diff --git a/Framework/Parallel/src/IO/EventLoaderHelpers.cpp b/Framework/Parallel/src/IO/EventLoaderHelpers.cpp index f46b5e085887fa2510e30bb8ce46197a174a5fc5..62511ef952ec022317b2eee2bfe83dcb85f89739 100644 --- a/Framework/Parallel/src/IO/EventLoaderHelpers.cpp +++ b/Framework/Parallel/src/IO/EventLoaderHelpers.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidParallel/IO/EventLoaderHelpers.h" diff --git a/Framework/Parallel/src/IO/EventParser.cpp b/Framework/Parallel/src/IO/EventParser.cpp index d9283e636ddd402febc1f0fb74bb6cec254e14f4..33e7bb46b53dbb5107cd9c9c4e91c71d30fdf993 100644 --- a/Framework/Parallel/src/IO/EventParser.cpp +++ b/Framework/Parallel/src/IO/EventParser.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidParallel/IO/EventParser.h" diff --git a/Framework/Parallel/src/IO/EventsListsShmemManager.cpp b/Framework/Parallel/src/IO/EventsListsShmemManager.cpp index d6413d0128afa48651722b161dc16fc922007296..5d565b33b3f589db0ea28cedf28fff38c8a203e4 100644 --- a/Framework/Parallel/src/IO/EventsListsShmemManager.cpp +++ b/Framework/Parallel/src/IO/EventsListsShmemManager.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidParallel/IO/EventsListsShmemManager.h" #include <random> diff --git a/Framework/Parallel/src/IO/EventsListsShmemStorage.cpp b/Framework/Parallel/src/IO/EventsListsShmemStorage.cpp index 222ba9aaad11ebaf4530c4e1cbd1d3555d7d820b..725401fb5b64d61ec4052bc6d54ad22f40a07673 100644 --- a/Framework/Parallel/src/IO/EventsListsShmemStorage.cpp +++ b/Framework/Parallel/src/IO/EventsListsShmemStorage.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidParallel/IO/EventsListsShmemStorage.h" #include "MantidTypes/Event/TofEvent.h" diff --git a/Framework/Parallel/src/IO/MultiProcessEventLoader.cpp b/Framework/Parallel/src/IO/MultiProcessEventLoader.cpp index 6e64e87a78016d23c5851eeb00686e4ba619add6..b4d45eb110773e5f81dc38f67a3d4e8d5d89354e 100644 --- a/Framework/Parallel/src/IO/MultiProcessEventLoader.cpp +++ b/Framework/Parallel/src/IO/MultiProcessEventLoader.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidParallel/IO/MultiProcessEventLoader.h" //#include <boost/process/child.hpp> diff --git a/Framework/Parallel/src/IO/NXEventDataLoader.cpp b/Framework/Parallel/src/IO/NXEventDataLoader.cpp index 783366fe64fead4f9f1245611b17e2d9dbf9f4ee..814847c160a009c25546dd7ec5539a1c57e19835 100644 --- a/Framework/Parallel/src/IO/NXEventDataLoader.cpp +++ b/Framework/Parallel/src/IO/NXEventDataLoader.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidParallel/IO/NXEventDataLoader.h" diff --git a/Framework/Parallel/src/Request.cpp b/Framework/Parallel/src/Request.cpp index f6093f48c5c71cc74c220be9bcc4baaed8276edc..e7b8159d237755602c61830be1e6dcecc65e494b 100644 --- a/Framework/Parallel/src/Request.cpp +++ b/Framework/Parallel/src/Request.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidParallel/Request.h" diff --git a/Framework/Parallel/src/StorageMode.cpp b/Framework/Parallel/src/StorageMode.cpp index 699530774a8535bcfed83390f50e4891a1de03dd..ec86ba679aeb93eeaf8e6bb86582064899fae0a4 100644 --- a/Framework/Parallel/src/StorageMode.cpp +++ b/Framework/Parallel/src/StorageMode.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidParallel/StorageMode.h" diff --git a/Framework/Parallel/src/ThreadingBackend.cpp b/Framework/Parallel/src/ThreadingBackend.cpp index 23206e5f3b63888a919eb72eaf9eafbc35d8a896..ea6a2867a4c53ecddddef5785bf844e1f77c2db4 100644 --- a/Framework/Parallel/src/ThreadingBackend.cpp +++ b/Framework/Parallel/src/ThreadingBackend.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidParallel/ThreadingBackend.h" diff --git a/Framework/Parallel/test/CMakeLists.txt b/Framework/Parallel/test/CMakeLists.txt index d4801afec52fa63f1bfcb61b7fcfa0794fd4f9eb..2487ba6f254133acb5c54478bc989efd01de37da 100644 --- a/Framework/Parallel/test/CMakeLists.txt +++ b/Framework/Parallel/test/CMakeLists.txt @@ -1,8 +1,6 @@ if(CXXTEST_FOUND) include_directories(SYSTEM ${CXXTEST_INCLUDE_DIR} - ${GMOCK_INCLUDE_DIR} - ${GTEST_INCLUDE_DIR} ../../TestHelpers/inc) # This variable is used within the cxxtest_add_test macro to build these @@ -17,8 +15,7 @@ if(CXXTEST_FOUND) ${TCMALLOC_LIBRARIES_LINKTIME} ${MANTIDLIBS} Parallel - ${GMOCK_LIBRARIES} - ${GTEST_LIBRARIES} + gmock ${HDF5_LIBRARIES}) add_dependencies(FrameworkTests ParallelTest) diff --git a/Framework/Parallel/test/ChunkerTest.h b/Framework/Parallel/test/ChunkerTest.h index 0f9067baf9267a22cb5a7585aa0890c9e2682772..addf8e9489dfd0d975dce56f70dbfccbd75d4fc4 100644 --- a/Framework/Parallel/test/ChunkerTest.h +++ b/Framework/Parallel/test/ChunkerTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Parallel/test/CollectivesTest.h b/Framework/Parallel/test/CollectivesTest.h index c8749431a040e9c6c0ee11fe627e02f93b08d476..1275620ac6103be18b8afe678ee30269d2ed1a53 100644 --- a/Framework/Parallel/test/CollectivesTest.h +++ b/Framework/Parallel/test/CollectivesTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Parallel/test/CommunicatorTest.h b/Framework/Parallel/test/CommunicatorTest.h index c7d0b069fbb2a5ab9770f474969c919f029880b1..d105e93cad9d9c17a29de3638d3fcb2f82f0e52d 100644 --- a/Framework/Parallel/test/CommunicatorTest.h +++ b/Framework/Parallel/test/CommunicatorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Parallel/test/EnvironmentSetup.cpp b/Framework/Parallel/test/EnvironmentSetup.cpp index c09dbd293aa023b5e33371db712ca701bd94a415..713b8f22896038b2cfe682e47e8f0873f143687c 100644 --- a/Framework/Parallel/test/EnvironmentSetup.cpp +++ b/Framework/Parallel/test/EnvironmentSetup.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #ifndef MANTID_PARALLEL_ENVIRONMENTSETUP_H_ #define MANTID_PARALLEL_ENVIRONMENTSETUP_H_ diff --git a/Framework/Parallel/test/EventDataPartitionerTest.h b/Framework/Parallel/test/EventDataPartitionerTest.h index 6355eb116aa29caa43ecf47347e8025ada115b5c..5b5ade278f9ecac28392036ff52b4897612c0a4f 100644 --- a/Framework/Parallel/test/EventDataPartitionerTest.h +++ b/Framework/Parallel/test/EventDataPartitionerTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Parallel/test/EventLoaderTest.h b/Framework/Parallel/test/EventLoaderTest.h index 343b23ba29d640d71b2de7b26c0d22ab7b22b183..38dd6a30e2b4344ce2a76d097d09ba517414c73d 100644 --- a/Framework/Parallel/test/EventLoaderTest.h +++ b/Framework/Parallel/test/EventLoaderTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Parallel/test/EventParserTest.h b/Framework/Parallel/test/EventParserTest.h index 0c2bee5d299e921beff67112dd2c6e3de4a620c7..9db38ca18cf61c706c6b60fccf0f8d5e87a91533 100644 --- a/Framework/Parallel/test/EventParserTest.h +++ b/Framework/Parallel/test/EventParserTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Parallel/test/ExecutionModeTest.h b/Framework/Parallel/test/ExecutionModeTest.h index ce5b4e99a070e1ca766b143a18faa67d39a1bcde..79eed55b3c734454fe028a4d4119fec5a7021252 100644 --- a/Framework/Parallel/test/ExecutionModeTest.h +++ b/Framework/Parallel/test/ExecutionModeTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Parallel/test/NonblockingTest.h b/Framework/Parallel/test/NonblockingTest.h index 95583a1250f1b49351ac69d250ab0ab754d5293f..a5ddd9614e70baac0c033f8bd5d914bc4f8e5386 100644 --- a/Framework/Parallel/test/NonblockingTest.h +++ b/Framework/Parallel/test/NonblockingTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Parallel/test/ParallelRunnerTest.h b/Framework/Parallel/test/ParallelRunnerTest.h index df279ec3b6111059337e0d1217c88923c8040292..01cbf21131e360601f1db5ce0424adc352073a62 100644 --- a/Framework/Parallel/test/ParallelRunnerTest.h +++ b/Framework/Parallel/test/ParallelRunnerTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Parallel/test/PulseTimeGeneratorTest.h b/Framework/Parallel/test/PulseTimeGeneratorTest.h index 4cac34b31636067538b28b9200ba132a70013255..499946188479dd4c9ad5339e4f86784027050bea 100644 --- a/Framework/Parallel/test/PulseTimeGeneratorTest.h +++ b/Framework/Parallel/test/PulseTimeGeneratorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Parallel/test/RequestTest.h b/Framework/Parallel/test/RequestTest.h index 90a922e67e528248b814cd55059138df4bf1dfd3..a3f7afe9e3da3082366282694fdb7d4597584b9e 100644 --- a/Framework/Parallel/test/RequestTest.h +++ b/Framework/Parallel/test/RequestTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Parallel/test/StorageModeTest.h b/Framework/Parallel/test/StorageModeTest.h index fcf02754f5a676bd8ad4584dad9f553cb6ebf8b0..53e00a2f57a2063bd5ebc0613588fade6b9defe6 100644 --- a/Framework/Parallel/test/StorageModeTest.h +++ b/Framework/Parallel/test/StorageModeTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Parallel/test/ThreadingBackendTest.h b/Framework/Parallel/test/ThreadingBackendTest.h index ee75458efa4b4a668b00d03f319b222ae87c62f4..3087a07f5c50cb48ecadeaff2028c8c46cd4a88a 100644 --- a/Framework/Parallel/test/ThreadingBackendTest.h +++ b/Framework/Parallel/test/ThreadingBackendTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Properties/Mantid.properties.template b/Framework/Properties/Mantid.properties.template index aa98016f34e54182ce72ffdff53cd35db52ca658..028a3ecc5a97239449801f6056cc479da7d51882 100644 --- a/Framework/Properties/Mantid.properties.template +++ b/Framework/Properties/Mantid.properties.template @@ -111,9 +111,6 @@ icatDownload.directory = # ICat mount point. Directory where archive is mounted. See Facility.xml filelocation. icatDownload.mountPoint = -# The Number of algorithms properties to retain im memory for refence in scripts. -algorithms.retained = 50 - # Defines the maximum number of cores to use for OpenMP # For machine default set to 0 MultiThreaded.MaxCores = 0 diff --git a/Framework/PythonInterface/core/inc/MantidPythonInterface/core/CallMethod.h b/Framework/PythonInterface/core/inc/MantidPythonInterface/core/CallMethod.h index 161c0a8c30dde943fff0abcc767998ae9d47282e..f5d1ae9226999ebef09ba7b3f31fe9bcdf2e1dff 100644 --- a/Framework/PythonInterface/core/inc/MantidPythonInterface/core/CallMethod.h +++ b/Framework/PythonInterface/core/inc/MantidPythonInterface/core/CallMethod.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Converters/CArrayToNDArray.h b/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Converters/CArrayToNDArray.h index b77f346ea11d77613e41b3dc05c5f8c004992767..ff0ce009e0637f12d27cb31c668766451ddb963b 100644 --- a/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Converters/CArrayToNDArray.h +++ b/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Converters/CArrayToNDArray.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Converters/CloneToNDArray.h b/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Converters/CloneToNDArray.h index 75e19e3b3e0d7ee88d40a88f09df5c497d40ec07..a19c990992d03dfb76823879a6a276d3f46fbf7e 100644 --- a/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Converters/CloneToNDArray.h +++ b/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Converters/CloneToNDArray.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Converters/ContainerDtype.h b/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Converters/ContainerDtype.h index 28473961f3157b5e0e9132161bba19079213aeae..2c76badd17ec80b512a3946374e9999229d6eea8 100644 --- a/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Converters/ContainerDtype.h +++ b/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Converters/ContainerDtype.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Converters/DateAndTime.h b/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Converters/DateAndTime.h index 8a38faae5e1f8a982708985b6fe496b2b5c8ddd5..533c02ec727035e3178cfef5282bb1107b0c69d8 100644 --- a/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Converters/DateAndTime.h +++ b/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Converters/DateAndTime.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Converters/MapToPyDictionary.h b/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Converters/MapToPyDictionary.h index 1910104934c591129ca4000c0b279bbeb77b871d..de88aea168c79434f964aae5d1ef85202ed6deba 100644 --- a/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Converters/MapToPyDictionary.h +++ b/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Converters/MapToPyDictionary.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Converters/MatrixToNDArray.h b/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Converters/MatrixToNDArray.h index 8c3c8c3945c6a54316639b72b9c9437febcb2b25..331b5c6e6a5474996c7f7572af4acbd33fac6046 100644 --- a/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Converters/MatrixToNDArray.h +++ b/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Converters/MatrixToNDArray.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Converters/NDArrayToVector.h b/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Converters/NDArrayToVector.h index 1a1cf3a00ffb2b12ea7d534d8d19a61923fdeb50..036e8ccce1b197faf8f338dda9217f29e47a4a96 100644 --- a/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Converters/NDArrayToVector.h +++ b/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Converters/NDArrayToVector.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Converters/NDArrayTypeIndex.h b/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Converters/NDArrayTypeIndex.h index a1a130aff2e20bacebdb31ef1e311fae21638b57..11f292b0bbdceac6ae5b5fb241f6a49183502d5e 100644 --- a/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Converters/NDArrayTypeIndex.h +++ b/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Converters/NDArrayTypeIndex.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Converters/NumpyFunctions.h b/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Converters/NumpyFunctions.h index f0f41d1601b9b616e97a647930cce0fbc3ee9925..fc95680ddd5d4332b3c0a0c92c0e547aa8015999 100644 --- a/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Converters/NumpyFunctions.h +++ b/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Converters/NumpyFunctions.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Converters/PyObjectToMatrix.h b/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Converters/PyObjectToMatrix.h index 5aa12a27b505f8ea51047c2e097170c533f32115..db7c4bbd8d104d1b36bd1319a142db37c888eac6 100644 --- a/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Converters/PyObjectToMatrix.h +++ b/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Converters/PyObjectToMatrix.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Converters/PyObjectToV3D.h b/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Converters/PyObjectToV3D.h index 2e2304ef9499d6c39e6e609eb32056efe1f5b116..1e494baf57c8b9aee02e40df6d456af7b5b9542e 100644 --- a/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Converters/PyObjectToV3D.h +++ b/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Converters/PyObjectToV3D.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Converters/PyObjectToVMD.h b/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Converters/PyObjectToVMD.h index 2e6d4959fdc1c94291b0f36b8ec8ccf908c19dfe..b5beb1fa0d0b5f11ecd54e494a0d23a4cccf26a8 100644 --- a/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Converters/PyObjectToVMD.h +++ b/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Converters/PyObjectToVMD.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Converters/PySequenceToVector.h b/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Converters/PySequenceToVector.h index 6a999bccafd4761a8ec44bc9ddf73d2eda6ed2b7..11f4871db7851f50b268a7f71f6af38f84da00bd 100644 --- a/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Converters/PySequenceToVector.h +++ b/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Converters/PySequenceToVector.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Converters/ToPyList.h b/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Converters/ToPyList.h index bfa6ac014930c59bdcdc7cc8235804f44e5e818e..2d419be146b4664f8c7f7f90e74cc5abd259a0c2 100644 --- a/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Converters/ToPyList.h +++ b/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Converters/ToPyList.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Converters/VectorToNDArray.h b/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Converters/VectorToNDArray.h index 13ba84f99b062954cec10fce4a7b67af22e39fbe..322fd89ebc1f5dfc1966f9f72ee3a86d23aebe08 100644 --- a/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Converters/VectorToNDArray.h +++ b/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Converters/VectorToNDArray.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Converters/WrapWithNDArray.h b/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Converters/WrapWithNDArray.h index 20aadff4fd7df56428df6ff21c0338ddc557868f..af2f895f1ef5757129c2ea4dc43aa024724e84c6 100644 --- a/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Converters/WrapWithNDArray.h +++ b/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Converters/WrapWithNDArray.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Copyable.h b/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Copyable.h index e1fd19a64106ffcec23bc682564a42b15371432e..0f53468da45562d008f929d481e1131dc9d99dca 100644 --- a/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Copyable.h +++ b/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Copyable.h @@ -1,9 +1,8 @@ - // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include <boost/python/class.hpp> diff --git a/Framework/PythonInterface/core/inc/MantidPythonInterface/core/DataServiceExporter.h b/Framework/PythonInterface/core/inc/MantidPythonInterface/core/DataServiceExporter.h index 7886f1e52742d1f3ebe3ee9fc936012dbe520783..1bb8476977c5f84d1ae428cb546aec36a74f5d42 100644 --- a/Framework/PythonInterface/core/inc/MantidPythonInterface/core/DataServiceExporter.h +++ b/Framework/PythonInterface/core/inc/MantidPythonInterface/core/DataServiceExporter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/PythonInterface/core/inc/MantidPythonInterface/core/DllConfig.h b/Framework/PythonInterface/core/inc/MantidPythonInterface/core/DllConfig.h index 071aba00ec582285d25ac9ccbb46b6992c2e71d4..473db175b26d834ea33f7ca7bd469bd36533f3a3 100644 --- a/Framework/PythonInterface/core/inc/MantidPythonInterface/core/DllConfig.h +++ b/Framework/PythonInterface/core/inc/MantidPythonInterface/core/DllConfig.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once /* diff --git a/Framework/PythonInterface/core/inc/MantidPythonInterface/core/ErrorHandling.h b/Framework/PythonInterface/core/inc/MantidPythonInterface/core/ErrorHandling.h index 5fd26dffd07e9efee93c3fa47e0794dc56712b71..e536a8716fa13f984a2a591dc35fa5cdc8776ac2 100644 --- a/Framework/PythonInterface/core/inc/MantidPythonInterface/core/ErrorHandling.h +++ b/Framework/PythonInterface/core/inc/MantidPythonInterface/core/ErrorHandling.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/PythonInterface/core/inc/MantidPythonInterface/core/ExtractWorkspace.h b/Framework/PythonInterface/core/inc/MantidPythonInterface/core/ExtractWorkspace.h index 08894b0c06a7f862f11cb4e08c88bdc516a92f4f..fd5df24273b5147f074f8f06bab3009ed6574172 100644 --- a/Framework/PythonInterface/core/inc/MantidPythonInterface/core/ExtractWorkspace.h +++ b/Framework/PythonInterface/core/inc/MantidPythonInterface/core/ExtractWorkspace.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/PythonInterface/core/inc/MantidPythonInterface/core/GetPointer.h b/Framework/PythonInterface/core/inc/MantidPythonInterface/core/GetPointer.h index 4c83985ca954fec0bc8796d966b219568a08cd1e..2737c646900fa86e77f5d81ba32aa36dd20706f2 100644 --- a/Framework/PythonInterface/core/inc/MantidPythonInterface/core/GetPointer.h +++ b/Framework/PythonInterface/core/inc/MantidPythonInterface/core/GetPointer.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/PythonInterface/core/inc/MantidPythonInterface/core/GlobalInterpreterLock.h b/Framework/PythonInterface/core/inc/MantidPythonInterface/core/GlobalInterpreterLock.h index 8277cbdd6347b66367db3fbc3cdefe06a0edea59..a73ba7d953fce715ca3b2f47574a7f8531b4e577 100644 --- a/Framework/PythonInterface/core/inc/MantidPythonInterface/core/GlobalInterpreterLock.h +++ b/Framework/PythonInterface/core/inc/MantidPythonInterface/core/GlobalInterpreterLock.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/PythonInterface/core/inc/MantidPythonInterface/core/IsNone.h b/Framework/PythonInterface/core/inc/MantidPythonInterface/core/IsNone.h index 824966d2bbbea79c3ba4c9b1fcc85b461b991d9b..8d9a222ece49c80c0c1cd3e5dff729d6029edea9 100644 --- a/Framework/PythonInterface/core/inc/MantidPythonInterface/core/IsNone.h +++ b/Framework/PythonInterface/core/inc/MantidPythonInterface/core/IsNone.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/PythonInterface/core/inc/MantidPythonInterface/core/NDArray.h b/Framework/PythonInterface/core/inc/MantidPythonInterface/core/NDArray.h index ab5e531f6a8706b3828b6a2fe8a78c6d4a941960..67daeb0497aeebc1a3aa75dea9c709df14c2a105 100644 --- a/Framework/PythonInterface/core/inc/MantidPythonInterface/core/NDArray.h +++ b/Framework/PythonInterface/core/inc/MantidPythonInterface/core/NDArray.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidPythonInterface/core/DllConfig.h" diff --git a/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Policies/AsType.h b/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Policies/AsType.h index 970a69a8b751ac06908a6722eee5ebbb89449f8d..651570e8b3a847732696b8e5c2c24dd4d00b07df 100644 --- a/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Policies/AsType.h +++ b/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Policies/AsType.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Policies/MatrixToNumpy.h b/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Policies/MatrixToNumpy.h index 4f0913365b252acfe568d0b17dcee9fc25be8bc2..aaf45569d8edbe0428349be16d2de410b589ae74 100644 --- a/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Policies/MatrixToNumpy.h +++ b/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Policies/MatrixToNumpy.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Policies/RemoveConst.h b/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Policies/RemoveConst.h index b7ba493fb4886c17570d378e66f9b6782433662b..8d9450e937743136771214c3abb356ca372f772f 100644 --- a/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Policies/RemoveConst.h +++ b/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Policies/RemoveConst.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Policies/ToWeakPtr.h b/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Policies/ToWeakPtr.h index dd83dde137f4592f6c4aa200ed1ec375e3ad641e..c0deacf088f658fe2bd0303c84777753bdea801b 100644 --- a/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Policies/ToWeakPtr.h +++ b/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Policies/ToWeakPtr.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Policies/VectorToNumpy.h b/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Policies/VectorToNumpy.h index 5179783f8979e536592404c41036a9699fe762c8..d92a9ca41e6bb3725f35db5595beb64f4a973eac 100644 --- a/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Policies/VectorToNumpy.h +++ b/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Policies/VectorToNumpy.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/PythonInterface/core/inc/MantidPythonInterface/core/PropertyWithValueExporter.h b/Framework/PythonInterface/core/inc/MantidPythonInterface/core/PropertyWithValueExporter.h index 3143da7e0dae619bd37cbeab637470ad70288741..e7aa80b52111b5e82ea1db4d8d04d9ec6adadf12 100644 --- a/Framework/PythonInterface/core/inc/MantidPythonInterface/core/PropertyWithValueExporter.h +++ b/Framework/PythonInterface/core/inc/MantidPythonInterface/core/PropertyWithValueExporter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/PythonInterface/core/inc/MantidPythonInterface/core/PythonObjectInstantiator.h b/Framework/PythonInterface/core/inc/MantidPythonInterface/core/PythonObjectInstantiator.h index 298fcf1ca18cc73e10e44475ce600a4bdf28e236..05c4e4e347db15d1e0b9dd9ec4f3099f60454664 100644 --- a/Framework/PythonInterface/core/inc/MantidPythonInterface/core/PythonObjectInstantiator.h +++ b/Framework/PythonInterface/core/inc/MantidPythonInterface/core/PythonObjectInstantiator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/PythonInterface/core/inc/MantidPythonInterface/core/ReleaseGlobalInterpreterLock.h b/Framework/PythonInterface/core/inc/MantidPythonInterface/core/ReleaseGlobalInterpreterLock.h index 173ec3d2c0b434e27da4b33ef981fba887ace1e2..211ff7b836f0b0b03721ca2de2dc836a71772971 100644 --- a/Framework/PythonInterface/core/inc/MantidPythonInterface/core/ReleaseGlobalInterpreterLock.h +++ b/Framework/PythonInterface/core/inc/MantidPythonInterface/core/ReleaseGlobalInterpreterLock.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/PythonInterface/core/inc/MantidPythonInterface/core/StlExportDefinitions.h b/Framework/PythonInterface/core/inc/MantidPythonInterface/core/StlExportDefinitions.h index 42f516eae2fba6f942d5befd002b83f5ecb3ac36..18babc901b06fd78271175ea415d8923dd811bc7 100644 --- a/Framework/PythonInterface/core/inc/MantidPythonInterface/core/StlExportDefinitions.h +++ b/Framework/PythonInterface/core/inc/MantidPythonInterface/core/StlExportDefinitions.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once /** diff --git a/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Testing/PythonInterpreterGlobalFixture.h b/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Testing/PythonInterpreterGlobalFixture.h index 26826aa2aec86fceb24999d236040e581dc2d7da..b6dcc5817ad891351d6deb413f6db9570cb03674 100644 --- a/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Testing/PythonInterpreterGlobalFixture.h +++ b/Framework/PythonInterface/core/inc/MantidPythonInterface/core/Testing/PythonInterpreterGlobalFixture.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/PythonInterface/core/inc/MantidPythonInterface/core/TypedValidatorExporter.h b/Framework/PythonInterface/core/inc/MantidPythonInterface/core/TypedValidatorExporter.h index 8d77891ccda4ebec94f5d60fa9b48d08457a3d99..bb8bd83c09a3fe5b326eff6f5d495ee8e0ac6477 100644 --- a/Framework/PythonInterface/core/inc/MantidPythonInterface/core/TypedValidatorExporter.h +++ b/Framework/PythonInterface/core/inc/MantidPythonInterface/core/TypedValidatorExporter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/PythonInterface/core/inc/MantidPythonInterface/core/UninstallTrace.h b/Framework/PythonInterface/core/inc/MantidPythonInterface/core/UninstallTrace.h index f2b0ff8258aed86d2d5f5ab991dfe59f4818e8f4..c59a8534adcd93a3dcc62d9dc3d2e30a2faa6775 100644 --- a/Framework/PythonInterface/core/inc/MantidPythonInterface/core/UninstallTrace.h +++ b/Framework/PythonInterface/core/inc/MantidPythonInterface/core/UninstallTrace.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/PythonInterface/core/inc/MantidPythonInterface/core/VersionCompat.h b/Framework/PythonInterface/core/inc/MantidPythonInterface/core/VersionCompat.h index 196a99680a565894a3be9a1bacbcf49060c7dd11..939cb734f446d9c854331f5eacffaa64377f85ea 100644 --- a/Framework/PythonInterface/core/inc/MantidPythonInterface/core/VersionCompat.h +++ b/Framework/PythonInterface/core/inc/MantidPythonInterface/core/VersionCompat.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/PythonInterface/core/inc/MantidPythonInterface/core/WeakPtr.h b/Framework/PythonInterface/core/inc/MantidPythonInterface/core/WeakPtr.h index def7f7ced1f07a210391895a48f9951da3686a3c..8e5a311000507cbe5e8ee34cb759f695dd80ee70 100644 --- a/Framework/PythonInterface/core/inc/MantidPythonInterface/core/WeakPtr.h +++ b/Framework/PythonInterface/core/inc/MantidPythonInterface/core/WeakPtr.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once /* diff --git a/Framework/PythonInterface/core/inc/MantidPythonInterface/core/WrapPython.h b/Framework/PythonInterface/core/inc/MantidPythonInterface/core/WrapPython.h index 10171819e3e76ef146cdd2ca40462980f967ac61..1bcc811b0292f9e6126dd635980f492461b25119 100644 --- a/Framework/PythonInterface/core/inc/MantidPythonInterface/core/WrapPython.h +++ b/Framework/PythonInterface/core/inc/MantidPythonInterface/core/WrapPython.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/PythonInterface/core/inc/MantidPythonInterface/core/WrapperHelpers.h b/Framework/PythonInterface/core/inc/MantidPythonInterface/core/WrapperHelpers.h index 00e9ff634068f2bc3db85ddc7c5bfb5672355b41..aea778c149582f1e3ae982b7439040cc731ac8b2 100644 --- a/Framework/PythonInterface/core/inc/MantidPythonInterface/core/WrapperHelpers.h +++ b/Framework/PythonInterface/core/inc/MantidPythonInterface/core/WrapperHelpers.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/PythonInterface/core/src/Converters/CloneToNDArray.cpp b/Framework/PythonInterface/core/src/Converters/CloneToNDArray.cpp index 2c2d67e816bade607a88f34263315f78af42f0d4..8f1dc095b67fa7b8da00d15362a0fe234599e603 100644 --- a/Framework/PythonInterface/core/src/Converters/CloneToNDArray.cpp +++ b/Framework/PythonInterface/core/src/Converters/CloneToNDArray.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //----------------------------------------------------------------------------- // Includes diff --git a/Framework/PythonInterface/core/src/Converters/DateAndTime.cpp b/Framework/PythonInterface/core/src/Converters/DateAndTime.cpp index 7c7c8a4f37d2cc9329f2d0d022428d9301711cf2..18842c9db192c2e812b765df6afc828f34ec8fa6 100644 --- a/Framework/PythonInterface/core/src/Converters/DateAndTime.cpp +++ b/Framework/PythonInterface/core/src/Converters/DateAndTime.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidPythonInterface/core/Converters/DateAndTime.h" #include "MantidKernel/WarningSuppressions.h" diff --git a/Framework/PythonInterface/core/src/Converters/MatrixToNDArray.cpp b/Framework/PythonInterface/core/src/Converters/MatrixToNDArray.cpp index c0cb4bf4eac64b483a0270b5b7649b89c305e98e..31f749cc80c6398ee484c0ca7329c461b694472c 100644 --- a/Framework/PythonInterface/core/src/Converters/MatrixToNDArray.cpp +++ b/Framework/PythonInterface/core/src/Converters/MatrixToNDArray.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //----------------------------------------------------------------------------- // Includes diff --git a/Framework/PythonInterface/core/src/Converters/NDArrayToVector.cpp b/Framework/PythonInterface/core/src/Converters/NDArrayToVector.cpp index 24aa00795086cdb6721235a2043dc027a0a68a8a..985a7eb4fb166d12ba9892fe9f08ad36491e1932 100644 --- a/Framework/PythonInterface/core/src/Converters/NDArrayToVector.cpp +++ b/Framework/PythonInterface/core/src/Converters/NDArrayToVector.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //----------------------------------------------------------------------------- // Includes diff --git a/Framework/PythonInterface/core/src/Converters/NDArrayTypeIndex.cpp b/Framework/PythonInterface/core/src/Converters/NDArrayTypeIndex.cpp index d3a57d8519a7b5e0f7173ad8eb82f584140406d6..f23ad772a393344a7f7120b419b75ba5e344a7cb 100644 --- a/Framework/PythonInterface/core/src/Converters/NDArrayTypeIndex.cpp +++ b/Framework/PythonInterface/core/src/Converters/NDArrayTypeIndex.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //----------------------------------------------------------------------------- // Includes diff --git a/Framework/PythonInterface/core/src/Converters/NumpyFunctions.cpp b/Framework/PythonInterface/core/src/Converters/NumpyFunctions.cpp index b3eda030424ebb37f6015a8103e347f6dcfcbc68..67912d41d8c37a9062ac7c5c1c2ef58e1e321e25 100644 --- a/Framework/PythonInterface/core/src/Converters/NumpyFunctions.cpp +++ b/Framework/PythonInterface/core/src/Converters/NumpyFunctions.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidPythonInterface/core/Converters/NumpyFunctions.h" diff --git a/Framework/PythonInterface/core/src/Converters/PyObjectToMatrix.cpp b/Framework/PythonInterface/core/src/Converters/PyObjectToMatrix.cpp index f88cb3165d62f9f5072d64ccc5e363361b4dd8e9..d3068697dd2611a39ce6868b97dce8d882110f57 100644 --- a/Framework/PythonInterface/core/src/Converters/PyObjectToMatrix.cpp +++ b/Framework/PythonInterface/core/src/Converters/PyObjectToMatrix.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------------- // Includes diff --git a/Framework/PythonInterface/core/src/Converters/PyObjectToV3D.cpp b/Framework/PythonInterface/core/src/Converters/PyObjectToV3D.cpp index 2d7fe5a52599f3ba5c4070c6ec35dd38929f1f50..105c0ec26e32039631931bdf1fc469b21fbeffaa 100644 --- a/Framework/PythonInterface/core/src/Converters/PyObjectToV3D.cpp +++ b/Framework/PythonInterface/core/src/Converters/PyObjectToV3D.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------------- // Includes diff --git a/Framework/PythonInterface/core/src/Converters/PyObjectToVMD.cpp b/Framework/PythonInterface/core/src/Converters/PyObjectToVMD.cpp index 4c8a9979d00008d15bd60fdf7946b724a16affca..f67e84a7c15658d0b0a303fd5a21e7cfddcfa539 100644 --- a/Framework/PythonInterface/core/src/Converters/PyObjectToVMD.cpp +++ b/Framework/PythonInterface/core/src/Converters/PyObjectToVMD.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------------- // Includes diff --git a/Framework/PythonInterface/core/src/Converters/WrapWithNDArray.cpp b/Framework/PythonInterface/core/src/Converters/WrapWithNDArray.cpp index 758c4c265cf15c786a58e4f4f9145ce3bab52b4d..3c3104dcdcd7cea4a46803ab79f612e38bd04b0d 100644 --- a/Framework/PythonInterface/core/src/Converters/WrapWithNDArray.cpp +++ b/Framework/PythonInterface/core/src/Converters/WrapWithNDArray.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //----------------------------------------------------------------------------- // Includes diff --git a/Framework/PythonInterface/core/src/ErrorHandling.cpp b/Framework/PythonInterface/core/src/ErrorHandling.cpp index 6a4573bab1543a686ed425966ea669f1c8485862..20619afa7b14f362bb0a631bf6ccfe6e06210c03 100644 --- a/Framework/PythonInterface/core/src/ErrorHandling.cpp +++ b/Framework/PythonInterface/core/src/ErrorHandling.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //------------------------------------------- // Includes diff --git a/Framework/PythonInterface/core/src/ExtractWorkspace.cpp b/Framework/PythonInterface/core/src/ExtractWorkspace.cpp index 0dbef53012eccb0736c38a1dc8f8681313566ea7..bf189a7a202b42624658adc3a228c607d779914a 100644 --- a/Framework/PythonInterface/core/src/ExtractWorkspace.cpp +++ b/Framework/PythonInterface/core/src/ExtractWorkspace.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //----------------------------------------------------------------------------- // Includes diff --git a/Framework/PythonInterface/core/src/GlobalInterpreterLock.cpp b/Framework/PythonInterface/core/src/GlobalInterpreterLock.cpp index 98f5484dce7abb7cfaa1ce2b4923bd7102e96d78..2f64519b01ea6ce5d342fe6170712c767135a971 100644 --- a/Framework/PythonInterface/core/src/GlobalInterpreterLock.cpp +++ b/Framework/PythonInterface/core/src/GlobalInterpreterLock.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidPythonInterface/core/GlobalInterpreterLock.h" #include "MantidPythonInterface/core/VersionCompat.h" diff --git a/Framework/PythonInterface/core/src/NDArray.cpp b/Framework/PythonInterface/core/src/NDArray.cpp index 8cc41b38bed75e10b82be5543d773227574198d2..970d43c0a4fc1c3938491439e8e87bb08d747073 100644 --- a/Framework/PythonInterface/core/src/NDArray.cpp +++ b/Framework/PythonInterface/core/src/NDArray.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidPythonInterface/core/NDArray.h" diff --git a/Framework/PythonInterface/core/src/ReleaseGlobalInterpreterLock.cpp b/Framework/PythonInterface/core/src/ReleaseGlobalInterpreterLock.cpp index 256d7860b0f7b4bad8b491ac82347c5d45257f1d..df0d3b066617840c16530414b2fc5e740dd7e9f1 100644 --- a/Framework/PythonInterface/core/src/ReleaseGlobalInterpreterLock.cpp +++ b/Framework/PythonInterface/core/src/ReleaseGlobalInterpreterLock.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidPythonInterface/core/ReleaseGlobalInterpreterLock.h" diff --git a/Framework/PythonInterface/core/src/UninstallTrace.cpp b/Framework/PythonInterface/core/src/UninstallTrace.cpp index c83a30c9816fe3c9f2434c8a208e13de450ed8f8..40b29814c9468d5465987e19513b66dac52ee8ec 100644 --- a/Framework/PythonInterface/core/src/UninstallTrace.cpp +++ b/Framework/PythonInterface/core/src/UninstallTrace.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidPythonInterface/core/UninstallTrace.h" diff --git a/Framework/PythonInterface/core/src/WrapperHelpers.cpp b/Framework/PythonInterface/core/src/WrapperHelpers.cpp index 372ccee831d7ead498aabf92d4227b30ee13102d..22b675fc18b8309cc5f94f3db06d32ab03f4be9e 100644 --- a/Framework/PythonInterface/core/src/WrapperHelpers.cpp +++ b/Framework/PythonInterface/core/src/WrapperHelpers.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //----------------------------------------------------------------------------- // Includes diff --git a/Framework/PythonInterface/mantid/__init__.py b/Framework/PythonInterface/mantid/__init__.py index ae21ec5ddc6f6570bc5523944cca91abe57dfc4f..abc301bbd94be03a430f33fa67914b7c0676e686 100644 --- a/Framework/PythonInterface/mantid/__init__.py +++ b/Framework/PythonInterface/mantid/__init__.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + """ Mantid diff --git a/Framework/PythonInterface/mantid/_plugins/__init__.py b/Framework/PythonInterface/mantid/_plugins/__init__.py index 51e9e3a8e969d49d3c3f3240c0a7780a6918f1b0..136498795eb8b107d73b82104af24e17d8af4a81 100644 --- a/Framework/PythonInterface/mantid/_plugins/__init__.py +++ b/Framework/PythonInterface/mantid/_plugins/__init__.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + """ Plugins diff --git a/Framework/PythonInterface/mantid/_plugins/src/Exports/ProductFunction.cpp b/Framework/PythonInterface/mantid/_plugins/src/Exports/ProductFunction.cpp index fcccd4959b535846849b9d29277f68dc12542f08..c738043c0916c5b19e2b10d3673fd26617d9157a 100644 --- a/Framework/PythonInterface/mantid/_plugins/src/Exports/ProductFunction.cpp +++ b/Framework/PythonInterface/mantid/_plugins/src/Exports/ProductFunction.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCurveFitting/Functions/ProductFunction.h" #include <boost/python/class.hpp> diff --git a/Framework/PythonInterface/mantid/_plugins/src/curvefitting.cpp.in b/Framework/PythonInterface/mantid/_plugins/src/curvefitting.cpp.in index 02b5b822950b16b29549b6c1cf889dae737782ae..b2204267b352e82c88c384bbd30f533347c64150 100644 --- a/Framework/PythonInterface/mantid/_plugins/src/curvefitting.cpp.in +++ b/Framework/PythonInterface/mantid/_plugins/src/curvefitting.cpp.in @@ -1,13 +1,13 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + -/*****************************************************************************************/ + /********** PLEASE NOTE! THIS FILE WAS AUTO-GENERATED FROM CMAKE. ***********************/ /********** Source = curvefitting.cpp.in **********************************************************/ -/*****************************************************************************************/ + #include <boost/python/def.hpp> #include <boost/python/module.hpp> #include <boost/python/docstring_options.hpp> diff --git a/Framework/PythonInterface/mantid/api/__init__.py b/Framework/PythonInterface/mantid/api/__init__.py index 9c592a5c8df52928216ef2c9ca759d97c6ba8c39..0ec0bf31a23969d086193f1a2fd196f52491a01c 100644 --- a/Framework/PythonInterface/mantid/api/__init__.py +++ b/Framework/PythonInterface/mantid/api/__init__.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + """ api diff --git a/Framework/PythonInterface/mantid/api/_adsimports.py b/Framework/PythonInterface/mantid/api/_adsimports.py index 46d210778f6f75fac162b20cfd6150ce2dd51945..bc6c2f1d3f532cca20b629a654cdec76247aabe0 100644 --- a/Framework/PythonInterface/mantid/api/_adsimports.py +++ b/Framework/PythonInterface/mantid/api/_adsimports.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + """ This modules provides a function, importAllFromADS, that creates a python diff --git a/Framework/PythonInterface/mantid/api/_aliases.py b/Framework/PythonInterface/mantid/api/_aliases.py index 665fa7efc526d6c9a39290ab8aead2bbb9ce6dc8..a5ccca32168fabb18d048e0ff7e67c2c23dfc7bb 100644 --- a/Framework/PythonInterface/mantid/api/_aliases.py +++ b/Framework/PythonInterface/mantid/api/_aliases.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + """ Defines a set of aliases to make accessing certain objects easier diff --git a/Framework/PythonInterface/mantid/api/_workspaceops.py b/Framework/PythonInterface/mantid/api/_workspaceops.py index 3e7c45f39041d4e0991ba616a6feaf62ad94cbb5..f128e77c9b72314b68e64162c293529cb72b0a7e 100644 --- a/Framework/PythonInterface/mantid/api/_workspaceops.py +++ b/Framework/PythonInterface/mantid/api/_workspaceops.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + """ This module adds functions to the Workspace classes diff --git a/Framework/PythonInterface/mantid/api/inc/MantidPythonInterface/api/AlgorithmIDProxy.h b/Framework/PythonInterface/mantid/api/inc/MantidPythonInterface/api/AlgorithmIDProxy.h index 22dc91759a0f4799e9b77c3994089b47470dbefc..a3a734884ab9f79f525140e31ccabc3460ecc735 100644 --- a/Framework/PythonInterface/mantid/api/inc/MantidPythonInterface/api/AlgorithmIDProxy.h +++ b/Framework/PythonInterface/mantid/api/inc/MantidPythonInterface/api/AlgorithmIDProxy.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/PythonInterface/mantid/api/inc/MantidPythonInterface/api/Algorithms/AlgorithmFactoryObserverAdapter.h b/Framework/PythonInterface/mantid/api/inc/MantidPythonInterface/api/Algorithms/AlgorithmFactoryObserverAdapter.h index 3056ca29ada53f7310c930bcd0a34b849ed38f8a..2987745e82c215a06181d505872f9f8845cdcacb 100644 --- a/Framework/PythonInterface/mantid/api/inc/MantidPythonInterface/api/Algorithms/AlgorithmFactoryObserverAdapter.h +++ b/Framework/PythonInterface/mantid/api/inc/MantidPythonInterface/api/Algorithms/AlgorithmFactoryObserverAdapter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/PythonInterface/mantid/api/inc/MantidPythonInterface/api/Algorithms/AlgorithmObserverAdapter.h b/Framework/PythonInterface/mantid/api/inc/MantidPythonInterface/api/Algorithms/AlgorithmObserverAdapter.h index 486df4fd1b3f7d768dc158deb65bdd2c3a12c8ca..486ea7c05e0f8c87e703b7f1796a0dd7c6fa8006 100644 --- a/Framework/PythonInterface/mantid/api/inc/MantidPythonInterface/api/Algorithms/AlgorithmObserverAdapter.h +++ b/Framework/PythonInterface/mantid/api/inc/MantidPythonInterface/api/Algorithms/AlgorithmObserverAdapter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/PythonInterface/mantid/api/inc/MantidPythonInterface/api/Algorithms/RunPythonScript.h b/Framework/PythonInterface/mantid/api/inc/MantidPythonInterface/api/Algorithms/RunPythonScript.h index 34b7f499e1bae993fec4301e6ca76ea71c11e1a2..609563854846bdfbbf0365fb31d744e3a343966a 100644 --- a/Framework/PythonInterface/mantid/api/inc/MantidPythonInterface/api/Algorithms/RunPythonScript.h +++ b/Framework/PythonInterface/mantid/api/inc/MantidPythonInterface/api/Algorithms/RunPythonScript.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/PythonInterface/mantid/api/inc/MantidPythonInterface/api/AnalysisDataServiceObserverAdapter.h b/Framework/PythonInterface/mantid/api/inc/MantidPythonInterface/api/AnalysisDataServiceObserverAdapter.h index d460f6a71be4b00df47a64a1ee71ee3acce5dc0a..5cde44d5f4a639ebdd0866490c5600d279be6c5f 100644 --- a/Framework/PythonInterface/mantid/api/inc/MantidPythonInterface/api/AnalysisDataServiceObserverAdapter.h +++ b/Framework/PythonInterface/mantid/api/inc/MantidPythonInterface/api/AnalysisDataServiceObserverAdapter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/PythonInterface/mantid/api/inc/MantidPythonInterface/api/BinaryOperations.h b/Framework/PythonInterface/mantid/api/inc/MantidPythonInterface/api/BinaryOperations.h index 10730a9095589d42d308d30763d37434ab56baf6..a3847051d37ea0cf5cdc233165b2566688b6b931 100644 --- a/Framework/PythonInterface/mantid/api/inc/MantidPythonInterface/api/BinaryOperations.h +++ b/Framework/PythonInterface/mantid/api/inc/MantidPythonInterface/api/BinaryOperations.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once //----------------------------------------------------------------------------- diff --git a/Framework/PythonInterface/mantid/api/inc/MantidPythonInterface/api/CloneMatrixWorkspace.h b/Framework/PythonInterface/mantid/api/inc/MantidPythonInterface/api/CloneMatrixWorkspace.h index 140405203ca1e4551399c75c064515ef7c492d5d..44e4a187e6bbcccceab48b5f37030d1c832c7383 100644 --- a/Framework/PythonInterface/mantid/api/inc/MantidPythonInterface/api/CloneMatrixWorkspace.h +++ b/Framework/PythonInterface/mantid/api/inc/MantidPythonInterface/api/CloneMatrixWorkspace.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/PythonInterface/mantid/api/inc/MantidPythonInterface/api/FitFunctions/IFunction1DAdapter.h b/Framework/PythonInterface/mantid/api/inc/MantidPythonInterface/api/FitFunctions/IFunction1DAdapter.h index 30b8f22c03637c7674948c7c731c28b1705baf38..dda6b7582db97267af2245ff7619a58d2d1d91d6 100644 --- a/Framework/PythonInterface/mantid/api/inc/MantidPythonInterface/api/FitFunctions/IFunction1DAdapter.h +++ b/Framework/PythonInterface/mantid/api/inc/MantidPythonInterface/api/FitFunctions/IFunction1DAdapter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/PythonInterface/mantid/api/inc/MantidPythonInterface/api/FitFunctions/IFunctionAdapter.h b/Framework/PythonInterface/mantid/api/inc/MantidPythonInterface/api/FitFunctions/IFunctionAdapter.h index ff2c7f73febc3b36ab4d4980001ef467075f38f7..69850db8bab6787b84de22009da8da91b1d4e556 100644 --- a/Framework/PythonInterface/mantid/api/inc/MantidPythonInterface/api/FitFunctions/IFunctionAdapter.h +++ b/Framework/PythonInterface/mantid/api/inc/MantidPythonInterface/api/FitFunctions/IFunctionAdapter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/PythonInterface/mantid/api/inc/MantidPythonInterface/api/FitFunctions/IPeakFunctionAdapter.h b/Framework/PythonInterface/mantid/api/inc/MantidPythonInterface/api/FitFunctions/IPeakFunctionAdapter.h index b47a9f258553ec83978f8d783705e82f3a64aaf5..f87674683835c2c8f27390f895ae2d613c1cb132 100644 --- a/Framework/PythonInterface/mantid/api/inc/MantidPythonInterface/api/FitFunctions/IPeakFunctionAdapter.h +++ b/Framework/PythonInterface/mantid/api/inc/MantidPythonInterface/api/FitFunctions/IPeakFunctionAdapter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/PythonInterface/mantid/api/inc/MantidPythonInterface/api/PythonAlgorithm/AlgorithmAdapter.h b/Framework/PythonInterface/mantid/api/inc/MantidPythonInterface/api/PythonAlgorithm/AlgorithmAdapter.h index b923187b54f411e21e4ef554bce7663451dbd747..9dc4863a12d94a8faf55e5724e758c343ea295df 100644 --- a/Framework/PythonInterface/mantid/api/inc/MantidPythonInterface/api/PythonAlgorithm/AlgorithmAdapter.h +++ b/Framework/PythonInterface/mantid/api/inc/MantidPythonInterface/api/PythonAlgorithm/AlgorithmAdapter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/PythonInterface/mantid/api/inc/MantidPythonInterface/api/PythonAlgorithm/DataProcessorAdapter.h b/Framework/PythonInterface/mantid/api/inc/MantidPythonInterface/api/PythonAlgorithm/DataProcessorAdapter.h index 28fa5cebe16617f4505dd25671dccf035ea335c8..e3f5f79ac98bbadcb4b741b45f289fb2b735ffa6 100644 --- a/Framework/PythonInterface/mantid/api/inc/MantidPythonInterface/api/PythonAlgorithm/DataProcessorAdapter.h +++ b/Framework/PythonInterface/mantid/api/inc/MantidPythonInterface/api/PythonAlgorithm/DataProcessorAdapter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/PythonInterface/mantid/api/inc/MantidPythonInterface/api/SpectrumInfoPythonIterator.h b/Framework/PythonInterface/mantid/api/inc/MantidPythonInterface/api/SpectrumInfoPythonIterator.h index fef48f22074fbe3d76afeac4f981728f259d98e4..eda383083ac2f1ac3bfe411d38b467cb80ebf0c7 100644 --- a/Framework/PythonInterface/mantid/api/inc/MantidPythonInterface/api/SpectrumInfoPythonIterator.h +++ b/Framework/PythonInterface/mantid/api/inc/MantidPythonInterface/api/SpectrumInfoPythonIterator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/PythonInterface/mantid/api/inc/MantidPythonInterface/api/WorkspacePropertyExporter.h b/Framework/PythonInterface/mantid/api/inc/MantidPythonInterface/api/WorkspacePropertyExporter.h index fe7ab04656646514670f36eb1a4bdeb58dd5204f..90e7decc5117657f56185e3f0c5ad4583bae472c 100644 --- a/Framework/PythonInterface/mantid/api/inc/MantidPythonInterface/api/WorkspacePropertyExporter.h +++ b/Framework/PythonInterface/mantid/api/inc/MantidPythonInterface/api/WorkspacePropertyExporter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/PythonInterface/mantid/api/src/Algorithms/AlgorithmObserverAdapter.cpp b/Framework/PythonInterface/mantid/api/src/Algorithms/AlgorithmObserverAdapter.cpp index 8ffafe831686ebeeaeec31c66f94fde754e7aa40..d04a189d4b9a7baddd580e639a137e27716f3c6b 100644 --- a/Framework/PythonInterface/mantid/api/src/Algorithms/AlgorithmObserverAdapter.cpp +++ b/Framework/PythonInterface/mantid/api/src/Algorithms/AlgorithmObserverAdapter.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidPythonInterface/api/Algorithms/AlgorithmObserverAdapter.h" #include "MantidPythonInterface/core/CallMethod.h" diff --git a/Framework/PythonInterface/mantid/api/src/Algorithms/RunPythonScript.cpp b/Framework/PythonInterface/mantid/api/src/Algorithms/RunPythonScript.cpp index 9db214bb6ef32fea5720ad1ecbcd11d43bba87d1..0421ee873759bb7104e530a25b7908e729d41f49 100644 --- a/Framework/PythonInterface/mantid/api/src/Algorithms/RunPythonScript.cpp +++ b/Framework/PythonInterface/mantid/api/src/Algorithms/RunPythonScript.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidPythonInterface/api/Algorithms/RunPythonScript.h" #include "MantidAPI/AnalysisDataService.h" diff --git a/Framework/PythonInterface/mantid/api/src/CloneMatrixWorkspace.cpp b/Framework/PythonInterface/mantid/api/src/CloneMatrixWorkspace.cpp index d88f13458b6fb5d11aac7266f15d3502a0e9f754..485fa943d8a19f44568e8026f536689195588378 100644 --- a/Framework/PythonInterface/mantid/api/src/CloneMatrixWorkspace.cpp +++ b/Framework/PythonInterface/mantid/api/src/CloneMatrixWorkspace.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //----------------------------------------------------------------------------- // Includes diff --git a/Framework/PythonInterface/mantid/api/src/Exports/ADSValidator.cpp b/Framework/PythonInterface/mantid/api/src/Exports/ADSValidator.cpp index 2746f3785167d83ddcb41fbdfb1dd76e7e6b968a..117b68ebfcde0eafcc115fd0da16881663e6f704 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/ADSValidator.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/ADSValidator.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/ADSValidator.h" #include "MantidKernel/TypedValidator.h" diff --git a/Framework/PythonInterface/mantid/api/src/Exports/Algorithm.cpp b/Framework/PythonInterface/mantid/api/src/Exports/Algorithm.cpp index cbe196da80c52d1e12c7108786428c5e55bb5dd3..50664568cd4b6b510be1c59cf3aeed5f867c46f5 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/Algorithm.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/Algorithm.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #ifdef _MSC_VER #pragma warning(disable : 4250) // Disable warning regarding inheritance via diff --git a/Framework/PythonInterface/mantid/api/src/Exports/AlgorithmFactory.cpp b/Framework/PythonInterface/mantid/api/src/Exports/AlgorithmFactory.cpp index 81a4f61607c95f6319642747416d6a6d29889fb8..e121df69e853b60eada45f5b898cdbb29680c50f 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/AlgorithmFactory.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/AlgorithmFactory.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/AlgorithmFactory.h" #include "MantidAPI/Algorithm.h" diff --git a/Framework/PythonInterface/mantid/api/src/Exports/AlgorithmFactoryObserver.cpp b/Framework/PythonInterface/mantid/api/src/Exports/AlgorithmFactoryObserver.cpp index 5526969e9af09bb4091ef8fe3074a8e5123deedf..6d8c159f119ca45fa4f40f0c68f600898ea0cd8b 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/AlgorithmFactoryObserver.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/AlgorithmFactoryObserver.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/AlgorithmFactoryObserver.h" #include "MantidPythonInterface/api/Algorithms/AlgorithmFactoryObserverAdapter.h" diff --git a/Framework/PythonInterface/mantid/api/src/Exports/AlgorithmFactoryObserverAdapter.cpp b/Framework/PythonInterface/mantid/api/src/Exports/AlgorithmFactoryObserverAdapter.cpp index e17923545c19f2a531cb0084b4a5820efd721276..680561a0334ee7c2b119db8363a3acf90cf1aa04 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/AlgorithmFactoryObserverAdapter.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/AlgorithmFactoryObserverAdapter.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidPythonInterface/api/Algorithms/AlgorithmFactoryObserverAdapter.h" #include "MantidAPI/AlgorithmFactoryObserver.h" diff --git a/Framework/PythonInterface/mantid/api/src/Exports/AlgorithmHistory.cpp b/Framework/PythonInterface/mantid/api/src/Exports/AlgorithmHistory.cpp index eca42ab4c1228dd1cbb4b784d962daf897d5f9f7..f45dc113d3dc90b82666184de2d443d2470be767 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/AlgorithmHistory.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/AlgorithmHistory.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/AlgorithmHistory.h" #include "MantidAPI/IAlgorithm.h" @@ -27,7 +27,7 @@ using namespace boost::python; * @returns A python list created from the set of child algorithm histories */ boost::python::list -getChildrenAsList(boost::shared_ptr<AlgorithmHistory> self) { +getChildrenAsList(const boost::shared_ptr<AlgorithmHistory> &self) { boost::python::list names; const auto histories = self->getChildHistories(); for (const auto &history : histories) { diff --git a/Framework/PythonInterface/mantid/api/src/Exports/AlgorithmManager.cpp b/Framework/PythonInterface/mantid/api/src/Exports/AlgorithmManager.cpp index 1c244daaf1e18d47c1a6fcc3fc905e7eb9ae992e..8379c24ee2b27b440da24dd697a62c41d7887d29 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/AlgorithmManager.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/AlgorithmManager.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/AlgorithmManager.h" #include "MantidKernel/WarningSuppressions.h" @@ -109,9 +109,6 @@ void export_AlgorithmManager() { "Creates an unmanaged algorithm.")) .def("size", &AlgorithmManagerImpl::size, arg("self"), "Returns the number of managed algorithms") - .def("setMaxAlgorithms", &AlgorithmManagerImpl::setMaxAlgorithms, - (arg("self"), arg("n")), - "Set the maximum number of allowed managed algorithms") .def("getAlgorithm", &getAlgorithm, (arg("self"), arg("id_holder")), "Return the algorithm instance identified by the given id.") .def("removeById", &removeById, (arg("self"), arg("id_holder")), diff --git a/Framework/PythonInterface/mantid/api/src/Exports/AlgorithmObserver.cpp b/Framework/PythonInterface/mantid/api/src/Exports/AlgorithmObserver.cpp index 0de6cf75a44e267b568bed10f2936b3c3476001d..867fcfa855f781f3293036d69aea563a63c6a2c3 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/AlgorithmObserver.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/AlgorithmObserver.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidPythonInterface/api/Algorithms/AlgorithmObserverAdapter.h" #include "MantidPythonInterface/core/GetPointer.h" @@ -14,22 +14,23 @@ using namespace Mantid::API; using namespace Mantid::PythonInterface; using namespace boost::python; -void observeFinish(AlgorithmObserver &self, boost::python::object alg) { +void observeFinish(AlgorithmObserver &self, const boost::python::object &alg) { IAlgorithm_sptr &calg = boost::python::extract<IAlgorithm_sptr &>(alg); self.observeFinish(calg); } -void observeError(AlgorithmObserver &self, boost::python::object alg) { +void observeError(AlgorithmObserver &self, const boost::python::object &alg) { IAlgorithm_sptr &calg = boost::python::extract<IAlgorithm_sptr &>(alg); self.observeError(calg); } -void observeProgress(AlgorithmObserver &self, boost::python::object alg) { +void observeProgress(AlgorithmObserver &self, + const boost::python::object &alg) { IAlgorithm_sptr &calg = boost::python::extract<IAlgorithm_sptr &>(alg); self.observeProgress(calg); } -void stopObserving(AlgorithmObserver &self, boost::python::object alg) { +void stopObserving(AlgorithmObserver &self, const boost::python::object &alg) { IAlgorithm_sptr &calg = boost::python::extract<IAlgorithm_sptr &>(alg); self.stopObserving(calg); } diff --git a/Framework/PythonInterface/mantid/api/src/Exports/AlgorithmProperty.cpp b/Framework/PythonInterface/mantid/api/src/Exports/AlgorithmProperty.cpp index 5a5eaa9c9472b8ab77045bb947a52f8aefb3a85d..7e5852be10fb37f91dcb171ca9b35c5d613dc8cc 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/AlgorithmProperty.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/AlgorithmProperty.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/AlgorithmProperty.h" #include "MantidAPI/IAlgorithm.h" diff --git a/Framework/PythonInterface/mantid/api/src/Exports/AlgorithmProxy.cpp b/Framework/PythonInterface/mantid/api/src/Exports/AlgorithmProxy.cpp index dd64d28a7007b9fed18be3a36894b36405a55773..51f3f771bf529c9166a82e2871cc50874ac2798c 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/AlgorithmProxy.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/AlgorithmProxy.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #ifdef _MSC_VER #pragma warning(disable : 4250) // Disable warning regarding inheritance via diff --git a/Framework/PythonInterface/mantid/api/src/Exports/AnalysisDataService.cpp b/Framework/PythonInterface/mantid/api/src/Exports/AnalysisDataService.cpp index 46bd52302c5d913baaaaf04b3338609f199542c6..bdcbc628e9623cef200a2830450084408e94e721 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/AnalysisDataService.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/AnalysisDataService.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/AnalysisDataService.h" #include "MantidKernel/WarningSuppressions.h" diff --git a/Framework/PythonInterface/mantid/api/src/Exports/AnalysisDataServiceObserver.cpp b/Framework/PythonInterface/mantid/api/src/Exports/AnalysisDataServiceObserver.cpp index 69fe469a833eeae05a25cc28106c6ce36c192f66..14172487ba9e12f7d330cea551f0a4e3b314ff50 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/AnalysisDataServiceObserver.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/AnalysisDataServiceObserver.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/AnalysisDataServiceObserver.h" #include "MantidPythonInterface/api/AnalysisDataServiceObserverAdapter.h" diff --git a/Framework/PythonInterface/mantid/api/src/Exports/AnalysisDataServiceObserverAdapter.cpp b/Framework/PythonInterface/mantid/api/src/Exports/AnalysisDataServiceObserverAdapter.cpp index 32e33c85472ef41ed0e592ec1a5252933f42b4b8..1e99860423f46365ab1e17559495a844ae7b7258 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/AnalysisDataServiceObserverAdapter.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/AnalysisDataServiceObserverAdapter.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidPythonInterface/api/AnalysisDataServiceObserverAdapter.h" #include "MantidAPI/AnalysisDataServiceObserver.h" diff --git a/Framework/PythonInterface/mantid/api/src/Exports/Axis.cpp b/Framework/PythonInterface/mantid/api/src/Exports/Axis.cpp index 9b86c3b0d2f04d0535ef753df0ecc04fe5cd436e..083fd62d3e096c0f91e70f57e93d5f91aa40a24e 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/Axis.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/Axis.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/Axis.h" #include "MantidAPI/BinEdgeAxis.h" diff --git a/Framework/PythonInterface/mantid/api/src/Exports/BinaryOperations.cpp b/Framework/PythonInterface/mantid/api/src/Exports/BinaryOperations.cpp index 9dce598c84fdc0d0624110f94cf8d6e82bed7411..e5b07cc3ac193b1b2951955e9e94a128ce3a8f68 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/BinaryOperations.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/BinaryOperations.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidPythonInterface/api/BinaryOperations.h" diff --git a/Framework/PythonInterface/mantid/api/src/Exports/BoxController.cpp b/Framework/PythonInterface/mantid/api/src/Exports/BoxController.cpp index 87ad15cbaae61b7ea6b8b227da445673104e7e2c..a6b5ea0e9c4b90721c3ec844c7a63f669340710d 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/BoxController.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/BoxController.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/BoxController.h" #include "MantidPythonInterface/core/GetPointer.h" diff --git a/Framework/PythonInterface/mantid/api/src/Exports/CatalogManager.cpp b/Framework/PythonInterface/mantid/api/src/Exports/CatalogManager.cpp index ce0177881cc4b980ad14d3325e96678773dd5073..e5d7d741892b2e2da3ddce6879e0d6e077e3e1a8 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/CatalogManager.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/CatalogManager.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/CatalogManager.h" #include "MantidPythonInterface/core/GetPointer.h" diff --git a/Framework/PythonInterface/mantid/api/src/Exports/CatalogSession.cpp b/Framework/PythonInterface/mantid/api/src/Exports/CatalogSession.cpp index d521a7f7dd9b2de4639010bff20eaacb6503be1d..ef919f4be375917a67352a71aa6da1db2b9b75ef 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/CatalogSession.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/CatalogSession.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/CatalogSession.h" diff --git a/Framework/PythonInterface/mantid/api/src/Exports/Citation.cpp b/Framework/PythonInterface/mantid/api/src/Exports/Citation.cpp index 6a6dd3358c53fd08cd35556d3731b4a663ebfde8..7d47d1145f959cd53c0fc7b77c3df10ea935d347 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/Citation.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/Citation.cpp @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #include "MantidAPI/Citation.h" #include "MantidKernel/WarningSuppressions.h" diff --git a/Framework/PythonInterface/mantid/api/src/Exports/CompositeFunction.cpp b/Framework/PythonInterface/mantid/api/src/Exports/CompositeFunction.cpp index 523810543e74445ac99b3dcb90d8f58e8f1bbc87..3d2bccc50af2b8d39bd3fde758489485e5314739 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/CompositeFunction.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/CompositeFunction.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/CompositeFunction.h" #include "MantidKernel/WarningSuppressions.h" diff --git a/Framework/PythonInterface/mantid/api/src/Exports/DataProcessorAlgorithm.cpp b/Framework/PythonInterface/mantid/api/src/Exports/DataProcessorAlgorithm.cpp index e169e11af90b75892428012c9245d901ff8a5a6b..6ba84e9601b4b07075aa4f51003cdd6182aaee93 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/DataProcessorAlgorithm.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/DataProcessorAlgorithm.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/ITableWorkspace.h" #include "MantidPythonInterface/api/PythonAlgorithm/DataProcessorAdapter.h" diff --git a/Framework/PythonInterface/mantid/api/src/Exports/DeprecatedAlgorithmChecker.cpp b/Framework/PythonInterface/mantid/api/src/Exports/DeprecatedAlgorithmChecker.cpp index c73ecd970e8bf03bd12f85461a43bc759e597b02..746b90f0f3a7f2059c6e26eec5ee0d832ae81b1f 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/DeprecatedAlgorithmChecker.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/DeprecatedAlgorithmChecker.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/AlgorithmManager.h" #include "MantidAPI/DeprecatedAlgorithm.h" diff --git a/Framework/PythonInterface/mantid/api/src/Exports/ExperimentInfo.cpp b/Framework/PythonInterface/mantid/api/src/Exports/ExperimentInfo.cpp index 58819ee58cc7385a6eac9c49e4284c1d6e172e3c..ccf70834fc55988a9427089145efc1b9ebae7507 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/ExperimentInfo.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/ExperimentInfo.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/ExperimentInfo.h" #include "MantidAPI/Run.h" diff --git a/Framework/PythonInterface/mantid/api/src/Exports/FileFinder.cpp b/Framework/PythonInterface/mantid/api/src/Exports/FileFinder.cpp index 85aa78a1a2c9c126d236c0fb343f032e581029c1..b03273526f03c7319b213b730ff96175d69be391 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/FileFinder.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/FileFinder.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/FileFinder.h" #include "MantidKernel/WarningSuppressions.h" @@ -39,7 +39,8 @@ GNU_DIAG_ON("unused-local-typedef") * combination of exts_list and facility_exts. */ std::vector<std::string> runFinderProxy(FileFinderImpl &self, - std::string hintstr, list exts_list, + const std::string &hintstr, + list exts_list, const bool useExtsOnly) { // Convert python list to c++ vector std::vector<std::string> exts; diff --git a/Framework/PythonInterface/mantid/api/src/Exports/FileLoaderRegistry.cpp b/Framework/PythonInterface/mantid/api/src/Exports/FileLoaderRegistry.cpp index f1e19b557b850bcde9041e5e4a06708ce1548d46..f18f727d5e93f4aa4e0ae33de0a36c36e9f75bf1 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/FileLoaderRegistry.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/FileLoaderRegistry.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/FileLoaderRegistry.h" #include <boost/python/class.hpp> diff --git a/Framework/PythonInterface/mantid/api/src/Exports/FileProperty.cpp b/Framework/PythonInterface/mantid/api/src/Exports/FileProperty.cpp index 9bf16edefb7198bf6e66b925ed3248cb1ec57c6f..13153e988abda497545b7aa6726e9ef00cf098f0 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/FileProperty.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/FileProperty.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/FileProperty.h" #include "MantidKernel/PropertyWithValue.h" diff --git a/Framework/PythonInterface/mantid/api/src/Exports/FrameworkManager.cpp b/Framework/PythonInterface/mantid/api/src/Exports/FrameworkManager.cpp index 25105c0463a64dc3b6e5dea53d4e79a7f64513ea..a60f954480b5b3eaa3311a5ff1f9ac1eebf6c9c4 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/FrameworkManager.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/FrameworkManager.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/FrameworkManager.h" #include "MantidKernel/ConfigService.h" diff --git a/Framework/PythonInterface/mantid/api/src/Exports/FunctionFactory.cpp b/Framework/PythonInterface/mantid/api/src/Exports/FunctionFactory.cpp index dda2948b6c02ed34dce5cf3894d3cec2190af90b..1457c5de47f78cad88cd8c894507b248e8f5126f 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/FunctionFactory.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/FunctionFactory.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/FunctionFactory.h" #include "MantidAPI/CompositeFunction.h" diff --git a/Framework/PythonInterface/mantid/api/src/Exports/FunctionProperty.cpp b/Framework/PythonInterface/mantid/api/src/Exports/FunctionProperty.cpp index 6df670acd70e2362fe6eafa1469ee5e0315d43e6..ae4f776e85ca4dd940e5bde22f5620a90cd4f23a 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/FunctionProperty.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/FunctionProperty.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/FunctionProperty.h" #include "MantidPythonInterface/core/PropertyWithValueExporter.h" diff --git a/Framework/PythonInterface/mantid/api/src/Exports/IAlgorithm.cpp b/Framework/PythonInterface/mantid/api/src/Exports/IAlgorithm.cpp index 900e55c5dabe60da47693babc9df6c9ca2b1359a..b9dc200d6d2054cf19482c9ac813052f47bb7c6c 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/IAlgorithm.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/IAlgorithm.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #ifdef _MSC_VER #pragma warning(disable : 4250) // Disable warning regarding inheritance via diff --git a/Framework/PythonInterface/mantid/api/src/Exports/IEventList.cpp b/Framework/PythonInterface/mantid/api/src/Exports/IEventList.cpp index 825c5ddfaef7b31f55559dae4db6a5292288805c..22818b339cc8e6ed39d59cf8b3f07d329f80afac 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/IEventList.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/IEventList.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/IEventList.h" #include "MantidPythonInterface/core/Converters/NDArrayToVector.h" diff --git a/Framework/PythonInterface/mantid/api/src/Exports/IEventWorkspace.cpp b/Framework/PythonInterface/mantid/api/src/Exports/IEventWorkspace.cpp index 28a39d7bf3ec252e41cf15e6ced851bb3aec0842..b7cd1a5ca75534e3e7999e31f34a402b11a0951f 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/IEventWorkspace.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/IEventWorkspace.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/IEventWorkspace.h" #include "MantidAPI/IEventList.h" diff --git a/Framework/PythonInterface/mantid/api/src/Exports/IEventWorkspaceProperty.cpp b/Framework/PythonInterface/mantid/api/src/Exports/IEventWorkspaceProperty.cpp index 6d95b43e325a0405d887d1a0b0f4809ab2b52bdb..8e9ace1414b33f4c92b186490f45d44795782a6e 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/IEventWorkspaceProperty.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/IEventWorkspaceProperty.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/IEventWorkspace.h" #include "MantidPythonInterface/api/WorkspacePropertyExporter.h" diff --git a/Framework/PythonInterface/mantid/api/src/Exports/IFunction.cpp b/Framework/PythonInterface/mantid/api/src/Exports/IFunction.cpp index bfd12b55fddf4567cbeea168273eed83cfd728d1..6fee815a9c06b81a9e6e8827e583eb25b1ec52fe 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/IFunction.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/IFunction.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/CompositeFunction.h" #include "MantidKernel/WarningSuppressions.h" diff --git a/Framework/PythonInterface/mantid/api/src/Exports/IFunction1D.cpp b/Framework/PythonInterface/mantid/api/src/Exports/IFunction1D.cpp index e7e3cd01d1c9d9d9375175ed97c556657f111144..a1c8b22706df3c8d82e122489e516d5981b43d02 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/IFunction1D.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/IFunction1D.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/IFunction1D.h" #include "MantidPythonInterface/api/FitFunctions/IFunction1DAdapter.h" diff --git a/Framework/PythonInterface/mantid/api/src/Exports/IMDEventWorkspace.cpp b/Framework/PythonInterface/mantid/api/src/Exports/IMDEventWorkspace.cpp index ca3f08e192225e26cc11584213c64549a32bdf4a..9ffed0ec9a08e5dd5597ecbac294cff097f2577a 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/IMDEventWorkspace.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/IMDEventWorkspace.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/IMDEventWorkspace.h" #include "MantidPythonInterface/core/GetPointer.h" diff --git a/Framework/PythonInterface/mantid/api/src/Exports/IMDEventWorkspaceProperty.cpp b/Framework/PythonInterface/mantid/api/src/Exports/IMDEventWorkspaceProperty.cpp index 1c177ee09888eeaddc0a08d59eba01bb67fdda0b..78289ac66b2347fe30908d2d72948fc05b756c8e 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/IMDEventWorkspaceProperty.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/IMDEventWorkspaceProperty.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/IMDEventWorkspace.h" #include "MantidPythonInterface/api/WorkspacePropertyExporter.h" diff --git a/Framework/PythonInterface/mantid/api/src/Exports/IMDHistoWorkspace.cpp b/Framework/PythonInterface/mantid/api/src/Exports/IMDHistoWorkspace.cpp index 7e5d2c008cedb99f364ead5f711e575d17fb8d33..3bc010e1d582622760323dcd136affc256878525 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/IMDHistoWorkspace.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/IMDHistoWorkspace.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/IMDHistoWorkspace.h" #include "MantidGeometry/MDGeometry/IMDDimension.h" diff --git a/Framework/PythonInterface/mantid/api/src/Exports/IMDHistoWorkspaceProperty.cpp b/Framework/PythonInterface/mantid/api/src/Exports/IMDHistoWorkspaceProperty.cpp index c155c793e2d34af5cdb8fc2fab9f100349042750..93dfcfa7cdede252a57fcbbfdf59f03c91b3eddc 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/IMDHistoWorkspaceProperty.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/IMDHistoWorkspaceProperty.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/IMDHistoWorkspace.h" #include "MantidPythonInterface/api/WorkspacePropertyExporter.h" diff --git a/Framework/PythonInterface/mantid/api/src/Exports/IMDWorkspace.cpp b/Framework/PythonInterface/mantid/api/src/Exports/IMDWorkspace.cpp index c9d7cb6ee02898639f48ef8b70ac1dd85de70d8f..edfcb9eaa91f5350be2b5b6ce05bec0b31f473e4 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/IMDWorkspace.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/IMDWorkspace.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/IMDWorkspace.h" #include "MantidPythonInterface/core/GetPointer.h" diff --git a/Framework/PythonInterface/mantid/api/src/Exports/IMDWorkspaceProperty.cpp b/Framework/PythonInterface/mantid/api/src/Exports/IMDWorkspaceProperty.cpp index d8a56f58480fcc613673ce0fa962112a6ffc3636..b21faf54393d92d14489567006342f61029f4994 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/IMDWorkspaceProperty.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/IMDWorkspaceProperty.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/IMDWorkspace.h" #include "MantidPythonInterface/api/WorkspacePropertyExporter.h" diff --git a/Framework/PythonInterface/mantid/api/src/Exports/IMaskWorkspace.cpp b/Framework/PythonInterface/mantid/api/src/Exports/IMaskWorkspace.cpp index c10b06951c35b0e55e73f8e3d43847aeeb0beba0..12c91b11f22b1576a45365496320a46f1f1c4f76 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/IMaskWorkspace.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/IMaskWorkspace.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/IMaskWorkspace.h" #include "MantidKernel/WarningSuppressions.h" diff --git a/Framework/PythonInterface/mantid/api/src/Exports/IPeak.cpp b/Framework/PythonInterface/mantid/api/src/Exports/IPeak.cpp index 1e3eb05ace0dcc85633807c756d1abb7ec260956..051fb435364a1778e486279d5e94278c1ca76270 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/IPeak.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/IPeak.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Crystal/IPeak.h" #include "MantidPythonInterface/core/Converters/CloneToNDArray.h" diff --git a/Framework/PythonInterface/mantid/api/src/Exports/IPeakFunction.cpp b/Framework/PythonInterface/mantid/api/src/Exports/IPeakFunction.cpp index 63d94644c541c36f3e2c419abd5a446701db3c96..ca02e4dac1fbddf8ce1bae0f3225ff39a0e501a7 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/IPeakFunction.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/IPeakFunction.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/IPeakFunction.h" #include "MantidPythonInterface/api/FitFunctions/IPeakFunctionAdapter.h" diff --git a/Framework/PythonInterface/mantid/api/src/Exports/IPeaksWorkspace.cpp b/Framework/PythonInterface/mantid/api/src/Exports/IPeaksWorkspace.cpp index 4b75069ad94043176c2be4616df327b7026b1644..2817282c22a6f4eb76c0244630cee66a2481032c 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/IPeaksWorkspace.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/IPeaksWorkspace.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/IPeaksWorkspace.h" #include "MantidAPI/Run.h" @@ -16,6 +16,7 @@ #include <boost/python/iterator.hpp> #include <boost/python/manage_new_object.hpp> #include <boost/python/return_internal_reference.hpp> +#include <utility> using namespace boost::python; using namespace Mantid::Geometry; @@ -102,7 +103,7 @@ public: throw std::runtime_error(columnName + " is a read only column of a peaks workspace"); } - m_setterMap[columnName](peak, value); + m_setterMap[columnName](peak, std::move(value)); } private: @@ -122,7 +123,7 @@ private: * setter's value type */ template <typename T> SetterType setterFunction(MemberFunc<T> func) { - return [func](IPeak &peak, const object value) { + return [func](IPeak &peak, const object &value) { extract<T> extractor{value}; if (!extractor.check()) { throw std::runtime_error( @@ -143,7 +144,7 @@ private: * setter's value type */ SetterType setterFunction(MemberFuncV3D func) { - return [func](IPeak &peak, const object value) { + return [func](IPeak &peak, const object &value) { extract<const V3D &> extractor{value}; if (!extractor.check()) { throw std::runtime_error( diff --git a/Framework/PythonInterface/mantid/api/src/Exports/IPeaksWorkspaceProperty.cpp b/Framework/PythonInterface/mantid/api/src/Exports/IPeaksWorkspaceProperty.cpp index 9c8d1e4f3f191b517fe06273442c43a9130bf042..5c6baa8d3c006ad1e2300311e9d78db74a0c869b 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/IPeaksWorkspaceProperty.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/IPeaksWorkspaceProperty.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/IPeaksWorkspace.h" #include "MantidPythonInterface/api/WorkspacePropertyExporter.h" diff --git a/Framework/PythonInterface/mantid/api/src/Exports/ISpectrum.cpp b/Framework/PythonInterface/mantid/api/src/Exports/ISpectrum.cpp index 40a32a9680634463e4bf26b38ed0a5bf1b78abbf..0377af4608890943de21108eb2704b100de6f7ba 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/ISpectrum.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/ISpectrum.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/ISpectrum.h" #include "MantidPythonInterface/core/GetPointer.h" diff --git a/Framework/PythonInterface/mantid/api/src/Exports/ISplittersWorkspace.cpp b/Framework/PythonInterface/mantid/api/src/Exports/ISplittersWorkspace.cpp index fe458db5c0a61231c3ed0734a9eced87e00bbdb0..212375a7009fe7af0292a796db7f7cffd663d388 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/ISplittersWorkspace.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/ISplittersWorkspace.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/ISplittersWorkspace.h" #include "MantidPythonInterface/core/GetPointer.h" diff --git a/Framework/PythonInterface/mantid/api/src/Exports/ITableWorkspace.cpp b/Framework/PythonInterface/mantid/api/src/Exports/ITableWorkspace.cpp index 60f6697082068376fcd73171d520ed822f26b5dd..e2bf4e2c7df6e19541d7a5b324d59385cc38edae 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/ITableWorkspace.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/ITableWorkspace.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/ITableWorkspace.h" #include "MantidAPI/AnalysisDataService.h" @@ -82,7 +82,7 @@ namespace { * @param typeID The python identifier of the column type. * @param row The row to get the value from. */ -PyObject *getValue(Mantid::API::Column_const_sptr column, +PyObject *getValue(const Mantid::API::Column_const_sptr &column, const std::type_info &typeID, const int row) { if (typeID.hash_code() == typeid(Mantid::API::Boolean).hash_code()) { bool res = column->cell<Mantid::API::Boolean>(row); @@ -129,7 +129,7 @@ PyObject *getValue(Mantid::API::Column_const_sptr column, * @param row :: The index of the row * @param value :: The value to set */ -void setValue(const Column_sptr column, const int row, const object &value) { +void setValue(const Column_sptr &column, const int row, const object &value) { const auto &typeID = column->get_type_info(); // Special case: Treat Mantid Boolean as normal bool @@ -542,7 +542,7 @@ public: return data; } - static void setstate(ITableWorkspace &ws, dict state) { + static void setstate(ITableWorkspace &ws, const dict &state) { readMetaData(ws, state); readData(ws, state); } diff --git a/Framework/PythonInterface/mantid/api/src/Exports/ITableWorkspaceProperty.cpp b/Framework/PythonInterface/mantid/api/src/Exports/ITableWorkspaceProperty.cpp index 179168b55d4938231a0f5ecc923db382d802ffa1..d3a09051dd89e1d3c5689373d342a127de59e843 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/ITableWorkspaceProperty.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/ITableWorkspaceProperty.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/ITableWorkspace.h" #include "MantidPythonInterface/api/WorkspacePropertyExporter.h" diff --git a/Framework/PythonInterface/mantid/api/src/Exports/IWorkspaceProperty.cpp b/Framework/PythonInterface/mantid/api/src/Exports/IWorkspaceProperty.cpp index 68f02493f17a271b8865153ffdd2732a3dcddb30..67e3b45adea61f6f64b1584b1c189b8142b164b5 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/IWorkspaceProperty.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/IWorkspaceProperty.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/IWorkspaceProperty.h" #include <boost/python/class.hpp> diff --git a/Framework/PythonInterface/mantid/api/src/Exports/InstrumentValidator.cpp b/Framework/PythonInterface/mantid/api/src/Exports/InstrumentValidator.cpp index 1e8a8bb4479dbc97fda0a9666121c2332be75ca8..295fcba7f3e26a3c6c1642333009889afafdf48c 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/InstrumentValidator.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/InstrumentValidator.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/InstrumentValidator.h" #include "MantidPythonInterface/core/TypedValidatorExporter.h" diff --git a/Framework/PythonInterface/mantid/api/src/Exports/Jacobian.cpp b/Framework/PythonInterface/mantid/api/src/Exports/Jacobian.cpp index 9965847b592488b88fe05cc7b1c43c523a249b3c..64f5976ade4caf1723b54524845f8c1e5bb7329a 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/Jacobian.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/Jacobian.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/Jacobian.h" #include "MantidPythonInterface/core/GetPointer.h" diff --git a/Framework/PythonInterface/mantid/api/src/Exports/MDGeometry.cpp b/Framework/PythonInterface/mantid/api/src/Exports/MDGeometry.cpp index aeedbe06e9b2dbcc6e1eeb3bffb868c965688dcf..cffc91eabe134ba3133a73840b8a2f706d34b78a 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/MDGeometry.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/MDGeometry.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/MDGeometry.h" #include "MantidAPI/Workspace.h" diff --git a/Framework/PythonInterface/mantid/api/src/Exports/MatrixWorkspace.cpp b/Framework/PythonInterface/mantid/api/src/Exports/MatrixWorkspace.cpp index 20091513984df5a2921d4c478c2f91891d742b95..5a4070da3584f24bcc91d292e66a9f7431c3a589 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/MatrixWorkspace.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/MatrixWorkspace.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/MatrixWorkspace.h" diff --git a/Framework/PythonInterface/mantid/api/src/Exports/MatrixWorkspaceProperty.cpp b/Framework/PythonInterface/mantid/api/src/Exports/MatrixWorkspaceProperty.cpp index 2ce0a77fed81aab0ade28b9bc4041d3bcd308974..5034e962b9851f3fa91f0fa9230f0fb615ed8567 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/MatrixWorkspaceProperty.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/MatrixWorkspaceProperty.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/MatrixWorkspace.h" #include "MantidPythonInterface/api/WorkspacePropertyExporter.h" diff --git a/Framework/PythonInterface/mantid/api/src/Exports/MultiDomainFunction.cpp b/Framework/PythonInterface/mantid/api/src/Exports/MultiDomainFunction.cpp index ab9102c16a2d5894a3ceac47ceeadb5205d48d42..d02fc691112af6b5cb01972b28cc9cd21def659f 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/MultiDomainFunction.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/MultiDomainFunction.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/MultiDomainFunction.h" #include <boost/python/class.hpp> diff --git a/Framework/PythonInterface/mantid/api/src/Exports/MultipleExperimentInfos.cpp b/Framework/PythonInterface/mantid/api/src/Exports/MultipleExperimentInfos.cpp index db98048534fc7e706aa8e4149dbc085eb52cb95f..790e1856bf87c38e3f8cf612641a7bef2390b910 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/MultipleExperimentInfos.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/MultipleExperimentInfos.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/MultipleExperimentInfos.h" #include "MantidAPI/ExperimentInfo.h" diff --git a/Framework/PythonInterface/mantid/api/src/Exports/MultipleFileProperty.cpp b/Framework/PythonInterface/mantid/api/src/Exports/MultipleFileProperty.cpp index 3a220e899183fac67d7896f3b2123756fd6e4d23..495965277fe1aa6c3711de300fb506e1c0822f22 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/MultipleFileProperty.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/MultipleFileProperty.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/MultipleFileProperty.h" #include "MantidAPI/FileProperty.h" diff --git a/Framework/PythonInterface/mantid/api/src/Exports/OrientedLatticeValidator.cpp b/Framework/PythonInterface/mantid/api/src/Exports/OrientedLatticeValidator.cpp index 9ac4f333632c601f56ba586a5506a4ee004853d7..9d8f67470741539eee7a4bb17bb6559db016c30f 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/OrientedLatticeValidator.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/OrientedLatticeValidator.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/OrientedLatticeValidator.h" #include "MantidPythonInterface/core/TypedValidatorExporter.h" diff --git a/Framework/PythonInterface/mantid/api/src/Exports/ProductFunction.cpp b/Framework/PythonInterface/mantid/api/src/Exports/ProductFunction.cpp index 8e82f4ddaed84274290ac808ba37f6bc3e2042fe..22bd5104b9afde7ed2ae25a692a4b12a880a1fa4 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/ProductFunction.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/ProductFunction.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/ProductFunction.h" #include <boost/python/class.hpp> diff --git a/Framework/PythonInterface/mantid/api/src/Exports/Progress.cpp b/Framework/PythonInterface/mantid/api/src/Exports/Progress.cpp index 41096dcf09c59ddf31f7e9da0df0840c1225f22d..4de8e56b13b4777c29e1645b5e2a02ca2bc27b9e 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/Progress.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/Progress.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/Progress.h" #include "MantidAPI/Algorithm.h" diff --git a/Framework/PythonInterface/mantid/api/src/Exports/Projection.cpp b/Framework/PythonInterface/mantid/api/src/Exports/Projection.cpp index c2cfa615c3d37cb4fa14a2a36702533377f80e19..d2bc7cc52ab4e31bb0ac42ff5552c484eaa64f9c 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/Projection.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/Projection.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/Projection.h" #include "MantidAPI/TableRow.h" diff --git a/Framework/PythonInterface/mantid/api/src/Exports/PropertyHistory.cpp b/Framework/PythonInterface/mantid/api/src/Exports/PropertyHistory.cpp index 862c140e0c45f26e0c7cdb5f78320a29b8abb475..d33c9ccf395c27115622592eae1b84dba76fc741 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/PropertyHistory.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/PropertyHistory.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/PropertyHistory.h" #include "MantidAPI/IAlgorithm.h" diff --git a/Framework/PythonInterface/mantid/api/src/Exports/Run.cpp b/Framework/PythonInterface/mantid/api/src/Exports/Run.cpp index 3a1f7aae4753a20ee0ef8c74228d5928827bdc36..1a7e17e2221e264269fef95550ce39d5af8e889c 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/Run.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/Run.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/Run.h" #include "MantidGeometry/Instrument/Goniometer.h" @@ -16,6 +16,7 @@ #include <boost/python/list.hpp> #include <boost/python/overloads.hpp> #include <boost/python/register_ptr_to_python.hpp> +#include <utility> using Mantid::API::LogManager; using Mantid::API::Run; @@ -103,7 +104,7 @@ void addOrReplaceProperty(Run &self, const std::string &name, * @param key The key * @param default_ The default to return if it does not exist */ -bpl::object getWithDefault(bpl::object self, bpl::object key, +bpl::object getWithDefault(bpl::object self, const bpl::object &key, bpl::object default_) { bpl::object exists(self.attr("__contains__")); if (extract<bool>(exists(key))()) { @@ -119,8 +120,8 @@ bpl::object getWithDefault(bpl::object self, bpl::object key, * @param self The bpl::object called on * @param key The key */ -bpl::object get(bpl::object self, bpl::object key) { - return getWithDefault(self, key, bpl::object()); +bpl::object get(bpl::object self, const bpl::object &key) { + return getWithDefault(std::move(self), std::move(key), bpl::object()); } /** diff --git a/Framework/PythonInterface/mantid/api/src/Exports/Sample.cpp b/Framework/PythonInterface/mantid/api/src/Exports/Sample.cpp index 594233d551259ef099b840fa2d3d14ae8d30896a..c8f153e8715ca740be8dca73ea84a48e0cbba964 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/Sample.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/Sample.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/Sample.h" diff --git a/Framework/PythonInterface/mantid/api/src/Exports/ScriptRepository.cpp b/Framework/PythonInterface/mantid/api/src/Exports/ScriptRepository.cpp index d5f5659f6f64daaaa3a573d0db94baf13ad7039c..524ae8c8fa49776f6a3e4529ceb1a83e33939a50 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/ScriptRepository.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/ScriptRepository.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/ScriptRepository.h" #include "MantidPythonInterface/core/GetPointer.h" diff --git a/Framework/PythonInterface/mantid/api/src/Exports/ScriptRepositoryFactory.cpp b/Framework/PythonInterface/mantid/api/src/Exports/ScriptRepositoryFactory.cpp index 87aa9e2f9f77ea27cc7b6b55f6b992a59f88045e..ee18afdefbe853326ca18e29fcb32468db73ead3 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/ScriptRepositoryFactory.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/ScriptRepositoryFactory.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/ScriptRepositoryFactory.h" #include "MantidAPI/ScriptRepository.h" diff --git a/Framework/PythonInterface/mantid/api/src/Exports/SpectrumDefinition.cpp b/Framework/PythonInterface/mantid/api/src/Exports/SpectrumDefinition.cpp index d4f21658fb579a6ae6625b5fe4fae7ade13c86f3..a0f057a393c3fd428bb989e61693a4c90b39c5f4 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/SpectrumDefinition.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/SpectrumDefinition.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidTypes/SpectrumDefinition.h" diff --git a/Framework/PythonInterface/mantid/api/src/Exports/SpectrumInfo.cpp b/Framework/PythonInterface/mantid/api/src/Exports/SpectrumInfo.cpp index c44d7a8d3dba2d3dedd21a5d37cd6fe53d9975c7..1c23af6e39416ca7d1dae00963e6e48bddd50144 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/SpectrumInfo.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/SpectrumInfo.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/SpectrumInfo.h" #include "MantidAPI/SpectrumInfoItem.h" @@ -76,5 +76,7 @@ void export_SpectrumInfo() { .def("getSpectrumDefinition", &SpectrumInfo::spectrumDefinition, return_value_policy<return_by_value>(), (arg("self"), arg("index")), "Returns the SpectrumDefinition of the spectrum with the given " - "index."); + "index.") + .def("detectorCount", &SpectrumInfo::detectorCount, arg("self"), + "Returns the total number of detectors used across spectrum info."); } diff --git a/Framework/PythonInterface/mantid/api/src/Exports/SpectrumInfoItem.cpp b/Framework/PythonInterface/mantid/api/src/Exports/SpectrumInfoItem.cpp index 322e5d1706613e4580a3faf37871448151336905..2b2dd604232966c98631a55b655c92b599dab0b9 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/SpectrumInfoItem.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/SpectrumInfoItem.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/SpectrumInfoItem.h" #include "MantidKernel/V3D.h" @@ -27,6 +27,8 @@ void export_SpectrumInfoItem() { .add_property("signedTwoTheta", &SpectrumInfoItem<SpectrumInfo>::signedTwoTheta) .add_property("l2", &SpectrumInfoItem<SpectrumInfo>::l2) + .add_property("hasDetectors", + &SpectrumInfoItem<SpectrumInfo>::hasDetectors) .add_property("hasUniqueDetector", &SpectrumInfoItem<SpectrumInfo>::hasUniqueDetector) .add_property( diff --git a/Framework/PythonInterface/mantid/api/src/Exports/SpectrumInfoIterator.cpp b/Framework/PythonInterface/mantid/api/src/Exports/SpectrumInfoIterator.cpp index 3b49a932a7245ac0df652f0f76275d9d3555b6cb..a9861a855db44c440b624724eee81ad5756e2ef6 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/SpectrumInfoIterator.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/SpectrumInfoIterator.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/SpectrumInfoIterator.h" #include "MantidAPI/SpectrumInfo.h" diff --git a/Framework/PythonInterface/mantid/api/src/Exports/SpectrumInfoPythonIterator.cpp b/Framework/PythonInterface/mantid/api/src/Exports/SpectrumInfoPythonIterator.cpp index a39ae74131a860c14eef2a9af11ac2d2dc634f5c..ab13eb7dd092b63c8f11826d044a4d1652fed303 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/SpectrumInfoPythonIterator.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/SpectrumInfoPythonIterator.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidPythonInterface/api/SpectrumInfoPythonIterator.h" diff --git a/Framework/PythonInterface/mantid/api/src/Exports/Workspace.cpp b/Framework/PythonInterface/mantid/api/src/Exports/Workspace.cpp index 6c52b394779b20cdac978a282520b2df88adacbf..b06966fd93646e4f8f5792a208fa5849d05c1389 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/Workspace.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/Workspace.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/Workspace.h" #include "MantidAPI/WorkspaceHistory.h" diff --git a/Framework/PythonInterface/mantid/api/src/Exports/WorkspaceFactory.cpp b/Framework/PythonInterface/mantid/api/src/Exports/WorkspaceFactory.cpp index 5b1f77a3c573d21be4165491e6faa7eeb4596886..cc75d2f67ea4b2dabb6fbc365a6121f6d5f0fe92 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/WorkspaceFactory.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/WorkspaceFactory.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/WorkspaceFactory.h" #include "MantidAPI/Axis.h" diff --git a/Framework/PythonInterface/mantid/api/src/Exports/WorkspaceGroup.cpp b/Framework/PythonInterface/mantid/api/src/Exports/WorkspaceGroup.cpp index 9659e30200f7bb8c99399e86f5c79e92af9f7fa6..c1ccdadea0b50ee5cceb8c66ed9b9ff66a67007e 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/WorkspaceGroup.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/WorkspaceGroup.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/WorkspaceGroup.h" #include "MantidAPI/AnalysisDataService.h" diff --git a/Framework/PythonInterface/mantid/api/src/Exports/WorkspaceGroupProperty.cpp b/Framework/PythonInterface/mantid/api/src/Exports/WorkspaceGroupProperty.cpp index 444a23ef8e158bdc254fcaa37149a50027d91166..d7052bbd5446bd4b973204ec071c95ad266866cb 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/WorkspaceGroupProperty.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/WorkspaceGroupProperty.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/WorkspaceGroup.h" #include "MantidPythonInterface/api/WorkspacePropertyExporter.h" diff --git a/Framework/PythonInterface/mantid/api/src/Exports/WorkspaceHistory.cpp b/Framework/PythonInterface/mantid/api/src/Exports/WorkspaceHistory.cpp index ca1e2a30d099b9318d3e77f61e3846d3ace4841c..955ed8a81d3ca079595d96f725a4c53831df2a1d 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/WorkspaceHistory.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/WorkspaceHistory.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/WorkspaceHistory.h" #include "MantidAPI/AlgorithmHistory.h" diff --git a/Framework/PythonInterface/mantid/api/src/Exports/WorkspaceProperty.cpp b/Framework/PythonInterface/mantid/api/src/Exports/WorkspaceProperty.cpp index 689fba10bb50c59c52260bc1e5df27ac3e141ef0..4c4540e05c95cc385b1f860e4a345d8c7694348c 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/WorkspaceProperty.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/WorkspaceProperty.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/Workspace.h" #include "MantidPythonInterface/api/WorkspacePropertyExporter.h" diff --git a/Framework/PythonInterface/mantid/api/src/Exports/WorkspaceValidators.cpp b/Framework/PythonInterface/mantid/api/src/Exports/WorkspaceValidators.cpp index 47b8bd4f598659741a3c365d635603b78eca521d..819ffd267c956974101a14d77b62e2192fc9b0d7 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/WorkspaceValidators.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/WorkspaceValidators.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/CommonBinsValidator.h" #include "MantidAPI/HistogramValidator.h" diff --git a/Framework/PythonInterface/mantid/api/src/FitFunctions/IFunction1DAdapter.cpp b/Framework/PythonInterface/mantid/api/src/FitFunctions/IFunction1DAdapter.cpp index 16cd9d296babd74b945f1425d9e3795ccaedc8d6..47f807dd6deadf074314d0f485233204b739ab8f 100644 --- a/Framework/PythonInterface/mantid/api/src/FitFunctions/IFunction1DAdapter.cpp +++ b/Framework/PythonInterface/mantid/api/src/FitFunctions/IFunction1DAdapter.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidPythonInterface/api/FitFunctions/IFunction1DAdapter.h" #include "MantidPythonInterface/core/CallMethod.h" diff --git a/Framework/PythonInterface/mantid/api/src/FitFunctions/IFunctionAdapter.cpp b/Framework/PythonInterface/mantid/api/src/FitFunctions/IFunctionAdapter.cpp index 167a28260e01ba02966524ad88889310c30f4d47..bda56715c423d33730655f195409509e39a039fd 100644 --- a/Framework/PythonInterface/mantid/api/src/FitFunctions/IFunctionAdapter.cpp +++ b/Framework/PythonInterface/mantid/api/src/FitFunctions/IFunctionAdapter.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidPythonInterface/api/FitFunctions/IFunctionAdapter.h" #include "MantidPythonInterface/core/CallMethod.h" @@ -10,6 +10,7 @@ #include <boost/python/class.hpp> #include <boost/python/list.hpp> +#include <utility> #define PY_ARRAY_UNIQUE_SYMBOL API_ARRAY_API #define NO_IMPORT_ARRAY @@ -80,7 +81,7 @@ IFunction::Attribute createAttributeFromPythonValue(const object &value) { IFunctionAdapter::IFunctionAdapter(PyObject *self, std::string functionMethod, std::string derivMethod) : m_self(self), m_functionName(std::move(functionMethod)), - m_derivName(derivMethod), + m_derivName(std::move(derivMethod)), m_derivOveridden(typeHasAttribute(self, m_derivName.c_str())) { if (!typeHasAttribute(self, "init")) throw std::runtime_error("Function does not define an init method."); @@ -107,8 +108,6 @@ const std::string IFunctionAdapter::category() const { } } -/** - */ void IFunctionAdapter::init() { callMethodNoCheck<void>(getSelf(), "init"); } /** diff --git a/Framework/PythonInterface/mantid/api/src/FitFunctions/IPeakFunctionAdapter.cpp b/Framework/PythonInterface/mantid/api/src/FitFunctions/IPeakFunctionAdapter.cpp index 93896c781ec6e956df197d05c3ac1f875504f0ce..9c48b4eb30329368e5c4af83fc62ebbbf6e23a28 100644 --- a/Framework/PythonInterface/mantid/api/src/FitFunctions/IPeakFunctionAdapter.cpp +++ b/Framework/PythonInterface/mantid/api/src/FitFunctions/IPeakFunctionAdapter.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidPythonInterface/api/FitFunctions/IPeakFunctionAdapter.h" #include "MantidPythonInterface/core/CallMethod.h" @@ -21,14 +21,10 @@ using namespace boost::python; IPeakFunctionAdapter::IPeakFunctionAdapter(PyObject *self) : IFunctionAdapter(self, "functionLocal", "functionDerivLocal") {} -/** - */ double IPeakFunctionAdapter::centre() const { return callMethodNoCheck<double>(getSelf(), "centre"); } -/** - */ double IPeakFunctionAdapter::height() const { return callMethodNoCheck<double>(getSelf(), "height"); } diff --git a/Framework/PythonInterface/mantid/api/src/PythonAlgorithm/AlgorithmAdapter.cpp b/Framework/PythonInterface/mantid/api/src/PythonAlgorithm/AlgorithmAdapter.cpp index 3bf9d13a97731f492b4ef61ff306f7c1529a80f0..c2ef2205bc20d793db3515cdeee03f743ed59757 100644 --- a/Framework/PythonInterface/mantid/api/src/PythonAlgorithm/AlgorithmAdapter.cpp +++ b/Framework/PythonInterface/mantid/api/src/PythonAlgorithm/AlgorithmAdapter.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidPythonInterface/api/PythonAlgorithm/AlgorithmAdapter.h" #include "MantidAPI/DataProcessorAlgorithm.h" @@ -170,8 +170,6 @@ bool AlgorithmAdapter<BaseAlgorithm>::isRunning() const { GNU_DIAG_ON("parentheses-equality") } -/** - */ template <typename BaseAlgorithm> void AlgorithmAdapter<BaseAlgorithm>::cancel() { try { diff --git a/Framework/PythonInterface/mantid/api/src/PythonAlgorithm/DataProcessorAdapter.cpp b/Framework/PythonInterface/mantid/api/src/PythonAlgorithm/DataProcessorAdapter.cpp index c25aa03eaf5105bd1c0670a49ae7e98dadda2e1e..4a85e707a777fe85eec75ca1cca8e8fa072a4045 100644 --- a/Framework/PythonInterface/mantid/api/src/PythonAlgorithm/DataProcessorAdapter.cpp +++ b/Framework/PythonInterface/mantid/api/src/PythonAlgorithm/DataProcessorAdapter.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidPythonInterface/api/PythonAlgorithm/DataProcessorAdapter.h" diff --git a/Framework/PythonInterface/mantid/api/src/api.cpp.in b/Framework/PythonInterface/mantid/api/src/api.cpp.in index 33566e819bf0aa561340d602ab4439ceb764d09a..faee580dfed5831ccad5387aa08add358de67ee5 100644 --- a/Framework/PythonInterface/mantid/api/src/api.cpp.in +++ b/Framework/PythonInterface/mantid/api/src/api.cpp.in @@ -1,13 +1,13 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + -/*****************************************************************************************/ + /********** PLEASE NOTE! THIS FILE WAS AUTO-GENERATED FROM CMAKE. ***********************/ /********** Source = api.cpp.in **********************************************************/ -/*****************************************************************************************/ + #include <boost/python/def.hpp> #include <boost/python/module.hpp> #include <boost/python/docstring_options.hpp> diff --git a/Framework/PythonInterface/mantid/dataobjects/__init__.py b/Framework/PythonInterface/mantid/dataobjects/__init__.py index 794d2bab38ca5f5967539a09441be4cfdcb404b4..5bd41720c97e3a39248657ce9315296171ab4b7f 100644 --- a/Framework/PythonInterface/mantid/dataobjects/__init__.py +++ b/Framework/PythonInterface/mantid/dataobjects/__init__.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + """ datobjects diff --git a/Framework/PythonInterface/mantid/dataobjects/src/Exports/EventList.cpp b/Framework/PythonInterface/mantid/dataobjects/src/Exports/EventList.cpp index c44f6290eaca2b5b780c2426d1ffd770d04d651b..b166b3c2e1b3eaeaaf6dcab6ec4ad48e176043b4 100644 --- a/Framework/PythonInterface/mantid/dataobjects/src/Exports/EventList.cpp +++ b/Framework/PythonInterface/mantid/dataobjects/src/Exports/EventList.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataObjects/EventList.h" #include "MantidPythonInterface/core/GetPointer.h" diff --git a/Framework/PythonInterface/mantid/dataobjects/src/Exports/EventWorkspace.cpp b/Framework/PythonInterface/mantid/dataobjects/src/Exports/EventWorkspace.cpp index bfff0277a498df7361fa5fbaa1b0fe1c70a238c6..73374c5c046d321f82429f5f02e10798e2de6791 100644 --- a/Framework/PythonInterface/mantid/dataobjects/src/Exports/EventWorkspace.cpp +++ b/Framework/PythonInterface/mantid/dataobjects/src/Exports/EventWorkspace.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataObjects/EventWorkspace.h" #include "MantidPythonInterface/core/GetPointer.h" diff --git a/Framework/PythonInterface/mantid/dataobjects/src/Exports/EventWorkspaceProperty.cpp b/Framework/PythonInterface/mantid/dataobjects/src/Exports/EventWorkspaceProperty.cpp index bd5d00cd3cb87ac324012822ea280bb8490bf81a..c937ff8181305ff09ada7e309a427beb754c3793 100644 --- a/Framework/PythonInterface/mantid/dataobjects/src/Exports/EventWorkspaceProperty.cpp +++ b/Framework/PythonInterface/mantid/dataobjects/src/Exports/EventWorkspaceProperty.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataObjects/EventWorkspace.h" #include "MantidPythonInterface/api/WorkspacePropertyExporter.h" diff --git a/Framework/PythonInterface/mantid/dataobjects/src/Exports/GroupingWorkspace.cpp b/Framework/PythonInterface/mantid/dataobjects/src/Exports/GroupingWorkspace.cpp index 76ca576500ebd6fa4c57f52c7871ce7fffe37540..e17f4e4aabffa6f11f86f050058e6230f93fd953 100644 --- a/Framework/PythonInterface/mantid/dataobjects/src/Exports/GroupingWorkspace.cpp +++ b/Framework/PythonInterface/mantid/dataobjects/src/Exports/GroupingWorkspace.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataObjects/GroupingWorkspace.h" #include "MantidPythonInterface/core/GetPointer.h" diff --git a/Framework/PythonInterface/mantid/dataobjects/src/Exports/MDEventWorkspace.cpp b/Framework/PythonInterface/mantid/dataobjects/src/Exports/MDEventWorkspace.cpp index 513830ed4297ef29e11897d14f252b441fe25e2d..ec69275753fa062803f95ad0f08102036df99a88 100644 --- a/Framework/PythonInterface/mantid/dataobjects/src/Exports/MDEventWorkspace.cpp +++ b/Framework/PythonInterface/mantid/dataobjects/src/Exports/MDEventWorkspace.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataObjects/MDEventWorkspace.h" #include "MantidDataObjects/MDEvent.h" diff --git a/Framework/PythonInterface/mantid/dataobjects/src/Exports/MDHistoWorkspace.cpp b/Framework/PythonInterface/mantid/dataobjects/src/Exports/MDHistoWorkspace.cpp index 79c49c954fdd98c565dfcee4747f923b9eaf83d0..e2c1938fd75a79d0f8fe73441b8875b56b3d9867 100644 --- a/Framework/PythonInterface/mantid/dataobjects/src/Exports/MDHistoWorkspace.cpp +++ b/Framework/PythonInterface/mantid/dataobjects/src/Exports/MDHistoWorkspace.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataObjects/MDHistoWorkspace.h" #include "MantidPythonInterface/core/GetPointer.h" diff --git a/Framework/PythonInterface/mantid/dataobjects/src/Exports/MaskWorkspace.cpp b/Framework/PythonInterface/mantid/dataobjects/src/Exports/MaskWorkspace.cpp index f762814f2d722b97e753bc27c5df8a855cf01ed1..1553e4db5de002977f32e6fac80c17e7a232bbcc 100644 --- a/Framework/PythonInterface/mantid/dataobjects/src/Exports/MaskWorkspace.cpp +++ b/Framework/PythonInterface/mantid/dataobjects/src/Exports/MaskWorkspace.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataObjects/MaskWorkspace.h" #include "MantidPythonInterface/core/GetPointer.h" diff --git a/Framework/PythonInterface/mantid/dataobjects/src/Exports/MaskWorkspaceProperty.cpp b/Framework/PythonInterface/mantid/dataobjects/src/Exports/MaskWorkspaceProperty.cpp index 8001f45f35e4f54ad8f1ca88d5c0a66fc3fff4a8..fc0970a6018bc3a25e8b2dc4f69f4d8850b4253a 100644 --- a/Framework/PythonInterface/mantid/dataobjects/src/Exports/MaskWorkspaceProperty.cpp +++ b/Framework/PythonInterface/mantid/dataobjects/src/Exports/MaskWorkspaceProperty.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataObjects/MaskWorkspace.h" #include "MantidPythonInterface/api/WorkspacePropertyExporter.h" diff --git a/Framework/PythonInterface/mantid/dataobjects/src/Exports/OffsetsWorkspace.cpp b/Framework/PythonInterface/mantid/dataobjects/src/Exports/OffsetsWorkspace.cpp index dc8f1a747ba603c3085e968177ea60605e48c511..bc7c4499bd28a6bf05ed410c0dd1f932b566fe2f 100644 --- a/Framework/PythonInterface/mantid/dataobjects/src/Exports/OffsetsWorkspace.cpp +++ b/Framework/PythonInterface/mantid/dataobjects/src/Exports/OffsetsWorkspace.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataObjects/OffsetsWorkspace.h" #include "MantidPythonInterface/core/GetPointer.h" diff --git a/Framework/PythonInterface/mantid/dataobjects/src/Exports/PeaksWorkspace.cpp b/Framework/PythonInterface/mantid/dataobjects/src/Exports/PeaksWorkspace.cpp index b0339f73d7e488d4519e016671cac5b4ed4a6458..0832fff36e8b8eea617e0178afceb05b2bfbd1ee 100644 --- a/Framework/PythonInterface/mantid/dataobjects/src/Exports/PeaksWorkspace.cpp +++ b/Framework/PythonInterface/mantid/dataobjects/src/Exports/PeaksWorkspace.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataObjects/PeaksWorkspace.h" #include "MantidPythonInterface/core/GetPointer.h" diff --git a/Framework/PythonInterface/mantid/dataobjects/src/Exports/PeaksWorkspaceProperty.cpp b/Framework/PythonInterface/mantid/dataobjects/src/Exports/PeaksWorkspaceProperty.cpp index a8e47532716bfd5302572e62f55e9f47a3196bae..e365221c5377451c30f6dbe1ef2bfe28eae6518b 100644 --- a/Framework/PythonInterface/mantid/dataobjects/src/Exports/PeaksWorkspaceProperty.cpp +++ b/Framework/PythonInterface/mantid/dataobjects/src/Exports/PeaksWorkspaceProperty.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataObjects/PeaksWorkspace.h" #include "MantidPythonInterface/api/WorkspacePropertyExporter.h" diff --git a/Framework/PythonInterface/mantid/dataobjects/src/Exports/RebinnedOutput.cpp b/Framework/PythonInterface/mantid/dataobjects/src/Exports/RebinnedOutput.cpp index c241b305e68462d8e917d079fd32eee78b3d86d6..6228649660d6848492119c3f9ccf1d39cc1d4cc7 100644 --- a/Framework/PythonInterface/mantid/dataobjects/src/Exports/RebinnedOutput.cpp +++ b/Framework/PythonInterface/mantid/dataobjects/src/Exports/RebinnedOutput.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataObjects/RebinnedOutput.h" #include "MantidPythonInterface/core/Converters/NDArrayToVector.h" diff --git a/Framework/PythonInterface/mantid/dataobjects/src/Exports/SpecialWorkspace2D.cpp b/Framework/PythonInterface/mantid/dataobjects/src/Exports/SpecialWorkspace2D.cpp index d35d70aa6c35f9ad5c5062666be547529ef58378..1f26f0d83fc6422f7c8ed0d2b6f82630f6143102 100644 --- a/Framework/PythonInterface/mantid/dataobjects/src/Exports/SpecialWorkspace2D.cpp +++ b/Framework/PythonInterface/mantid/dataobjects/src/Exports/SpecialWorkspace2D.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataObjects/SpecialWorkspace2D.h" #include "MantidPythonInterface/core/GetPointer.h" diff --git a/Framework/PythonInterface/mantid/dataobjects/src/Exports/SplittersWorkspace.cpp b/Framework/PythonInterface/mantid/dataobjects/src/Exports/SplittersWorkspace.cpp index 36a4789522d0945709f030556e882c2f00e149b6..c5380350185cbd88443ca5121579ce429b0f0fdc 100644 --- a/Framework/PythonInterface/mantid/dataobjects/src/Exports/SplittersWorkspace.cpp +++ b/Framework/PythonInterface/mantid/dataobjects/src/Exports/SplittersWorkspace.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataObjects/SplittersWorkspace.h" #include "MantidPythonInterface/core/GetPointer.h" diff --git a/Framework/PythonInterface/mantid/dataobjects/src/Exports/TableWorkspace.cpp b/Framework/PythonInterface/mantid/dataobjects/src/Exports/TableWorkspace.cpp index 8a7f0a00d96111b293e10a742e61085a82fd826d..3b23108eea4e165d6edc1de3e960795a2285d798 100644 --- a/Framework/PythonInterface/mantid/dataobjects/src/Exports/TableWorkspace.cpp +++ b/Framework/PythonInterface/mantid/dataobjects/src/Exports/TableWorkspace.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataObjects/TableWorkspace.h" #include "MantidAPI/WorkspaceFactory.h" diff --git a/Framework/PythonInterface/mantid/dataobjects/src/Exports/Workspace2D.cpp b/Framework/PythonInterface/mantid/dataobjects/src/Exports/Workspace2D.cpp index 4ad5dff349822bf491334deca4a244153d9e7406..4278fee649eafc1f73e44076fa194a1f1db3bf99 100644 --- a/Framework/PythonInterface/mantid/dataobjects/src/Exports/Workspace2D.cpp +++ b/Framework/PythonInterface/mantid/dataobjects/src/Exports/Workspace2D.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataObjects/Workspace2D.h" diff --git a/Framework/PythonInterface/mantid/dataobjects/src/Exports/WorkspaceSingleValue.cpp b/Framework/PythonInterface/mantid/dataobjects/src/Exports/WorkspaceSingleValue.cpp index 54471e1d92ac11d07941c33c4d7ba838692b5d6f..de9cd94243e5239a0eab6e31c0dbfceb6942b949 100644 --- a/Framework/PythonInterface/mantid/dataobjects/src/Exports/WorkspaceSingleValue.cpp +++ b/Framework/PythonInterface/mantid/dataobjects/src/Exports/WorkspaceSingleValue.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidDataObjects/WorkspaceSingleValue.h" #include "MantidPythonInterface/core/GetPointer.h" diff --git a/Framework/PythonInterface/mantid/dataobjects/src/dataobjects.cpp.in b/Framework/PythonInterface/mantid/dataobjects/src/dataobjects.cpp.in index 029892e53eafe77036e221ce16cb1cf67b7be660..760c43c45d994d7b6552814224f33200237b1095 100644 --- a/Framework/PythonInterface/mantid/dataobjects/src/dataobjects.cpp.in +++ b/Framework/PythonInterface/mantid/dataobjects/src/dataobjects.cpp.in @@ -1,13 +1,13 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + -/*****************************************************************************************/ + /********** PLEASE NOTE! THIS FILE WAS AUTO-GENERATED FROM CMAKE. ***********************/ /********** Source = dataobjects.cpp.in **********************************************************/ -/*****************************************************************************************/ + #include <boost/python/def.hpp> #include <boost/python/module.hpp> #include <boost/python/docstring_options.hpp> diff --git a/Framework/PythonInterface/mantid/fitfunctions.py b/Framework/PythonInterface/mantid/fitfunctions.py index abcdb7931ddb2670ec6e20843c98b924f3c11065..1c839f822f58bb3442e77bfae6d2632b60f7bf34 100644 --- a/Framework/PythonInterface/mantid/fitfunctions.py +++ b/Framework/PythonInterface/mantid/fitfunctions.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from mantid.api import FunctionFactory, Workspace, AlgorithmManager, IFunction1D diff --git a/Framework/PythonInterface/mantid/geometry/__init__.py b/Framework/PythonInterface/mantid/geometry/__init__.py index 47274df57af6d3d953535e85ac16cc5eac8ae114..c982060c841fd18b7e689e5ff5f944fe463e0c70 100644 --- a/Framework/PythonInterface/mantid/geometry/__init__.py +++ b/Framework/PythonInterface/mantid/geometry/__init__.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + """ mantid.geometry diff --git a/Framework/PythonInterface/mantid/geometry/_aliases.py b/Framework/PythonInterface/mantid/geometry/_aliases.py index 43d8b06e9369e8b9f690c8fb231ed0eb19866dc6..651fc5acd8251cc618c725af435faf086b4c9057 100644 --- a/Framework/PythonInterface/mantid/geometry/_aliases.py +++ b/Framework/PythonInterface/mantid/geometry/_aliases.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + """ Defines a set of aliases to make accessing certain objects easier, diff --git a/Framework/PythonInterface/mantid/geometry/inc/MantidPythonInterface/geometry/ComponentInfoPythonIterator.h b/Framework/PythonInterface/mantid/geometry/inc/MantidPythonInterface/geometry/ComponentInfoPythonIterator.h index 7c4c787463076344dc87293907be6a50eacad7cf..21881560076b952e8371869ca6187010751dc504 100644 --- a/Framework/PythonInterface/mantid/geometry/inc/MantidPythonInterface/geometry/ComponentInfoPythonIterator.h +++ b/Framework/PythonInterface/mantid/geometry/inc/MantidPythonInterface/geometry/ComponentInfoPythonIterator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/PythonInterface/mantid/geometry/inc/MantidPythonInterface/geometry/DetectorInfoPythonIterator.h b/Framework/PythonInterface/mantid/geometry/inc/MantidPythonInterface/geometry/DetectorInfoPythonIterator.h index 696ec21867c89b53978cf344e2e793fb7bba7301..7e4b5ede5478a0fb3476dbcba9aefa3c52929435 100644 --- a/Framework/PythonInterface/mantid/geometry/inc/MantidPythonInterface/geometry/DetectorInfoPythonIterator.h +++ b/Framework/PythonInterface/mantid/geometry/inc/MantidPythonInterface/geometry/DetectorInfoPythonIterator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/PythonInterface/mantid/geometry/src/Exports/BoundingBox.cpp b/Framework/PythonInterface/mantid/geometry/src/Exports/BoundingBox.cpp index 8bb4cc23fd1ba10f52ca9ef7549d0adfcccba242..969b0528fbab389a22ff63966bff7298a87dd85e 100644 --- a/Framework/PythonInterface/mantid/geometry/src/Exports/BoundingBox.cpp +++ b/Framework/PythonInterface/mantid/geometry/src/Exports/BoundingBox.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Objects/BoundingBox.h" #include <boost/python/class.hpp> diff --git a/Framework/PythonInterface/mantid/geometry/src/Exports/CSGObject.cpp b/Framework/PythonInterface/mantid/geometry/src/Exports/CSGObject.cpp index c6916fa8f6bdfe8d139b2e90b818ef6c3d1a29ae..1de741fcdac7279d27f4cfe94e634f8d23d26968 100644 --- a/Framework/PythonInterface/mantid/geometry/src/Exports/CSGObject.cpp +++ b/Framework/PythonInterface/mantid/geometry/src/Exports/CSGObject.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Objects/CSGObject.h" #include "MantidPythonInterface/core/GetPointer.h" diff --git a/Framework/PythonInterface/mantid/geometry/src/Exports/CompAssembly.cpp b/Framework/PythonInterface/mantid/geometry/src/Exports/CompAssembly.cpp index 540fa94dafb3d53dab978302b5733fd3181ae8db..1c1476f8894c61a5f6aaaec87e8909c4ad4390ef 100644 --- a/Framework/PythonInterface/mantid/geometry/src/Exports/CompAssembly.cpp +++ b/Framework/PythonInterface/mantid/geometry/src/Exports/CompAssembly.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Instrument/CompAssembly.h" #include <boost/python/class.hpp> diff --git a/Framework/PythonInterface/mantid/geometry/src/Exports/Component.cpp b/Framework/PythonInterface/mantid/geometry/src/Exports/Component.cpp index dcae4b35ee201bb150f768e8e0e2b2f31566d350..50f5d03e19b10a070dfdad22746bf75815f290fb 100644 --- a/Framework/PythonInterface/mantid/geometry/src/Exports/Component.cpp +++ b/Framework/PythonInterface/mantid/geometry/src/Exports/Component.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Instrument/Component.h" #include "MantidKernel/WarningSuppressions.h" diff --git a/Framework/PythonInterface/mantid/geometry/src/Exports/ComponentInfo.cpp b/Framework/PythonInterface/mantid/geometry/src/Exports/ComponentInfo.cpp index 12b56b6808df86e3f0b58c49542cb3d92a64e664..b57912af6f0d76060730b36fb00d4120d73533e1 100644 --- a/Framework/PythonInterface/mantid/geometry/src/Exports/ComponentInfo.cpp +++ b/Framework/PythonInterface/mantid/geometry/src/Exports/ComponentInfo.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Instrument/ComponentInfo.h" #include "MantidGeometry/Objects/IObject.h" diff --git a/Framework/PythonInterface/mantid/geometry/src/Exports/ComponentInfoItem.cpp b/Framework/PythonInterface/mantid/geometry/src/Exports/ComponentInfoItem.cpp index 3835004905b9c60a856ac109a5013d0efc69eafa..a738026810ceb471579e513b551105e4a64bd532 100644 --- a/Framework/PythonInterface/mantid/geometry/src/Exports/ComponentInfoItem.cpp +++ b/Framework/PythonInterface/mantid/geometry/src/Exports/ComponentInfoItem.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Instrument/ComponentInfoItem.h" #include "MantidGeometry/Instrument/ComponentInfo.h" diff --git a/Framework/PythonInterface/mantid/geometry/src/Exports/ComponentInfoPythonIterator.cpp b/Framework/PythonInterface/mantid/geometry/src/Exports/ComponentInfoPythonIterator.cpp index a43b9fad497115c0944aeb3c726d46227360de4b..b684669bdea90834086870783de7932f02a03b30 100644 --- a/Framework/PythonInterface/mantid/geometry/src/Exports/ComponentInfoPythonIterator.cpp +++ b/Framework/PythonInterface/mantid/geometry/src/Exports/ComponentInfoPythonIterator.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidPythonInterface/geometry/ComponentInfoPythonIterator.h" #include "MantidPythonInterface/core/VersionCompat.h" diff --git a/Framework/PythonInterface/mantid/geometry/src/Exports/CrystalStructure.cpp b/Framework/PythonInterface/mantid/geometry/src/Exports/CrystalStructure.cpp index aab760f27f64e8b92a54c8a51ee7ed5cb5e7bf30..72e814a32a081bb6e475e759f2a8b9ab74e51905 100644 --- a/Framework/PythonInterface/mantid/geometry/src/Exports/CrystalStructure.cpp +++ b/Framework/PythonInterface/mantid/geometry/src/Exports/CrystalStructure.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Crystal/CrystalStructure.h" #include "MantidGeometry/Crystal/IsotropicAtomBraggScatterer.h" diff --git a/Framework/PythonInterface/mantid/geometry/src/Exports/Detector.cpp b/Framework/PythonInterface/mantid/geometry/src/Exports/Detector.cpp index 04280b1d47a8b8c861c4ceb2f2e9f76bd2039faa..89aa38bcd1e71686203526c629781092b0dbe0b5 100644 --- a/Framework/PythonInterface/mantid/geometry/src/Exports/Detector.cpp +++ b/Framework/PythonInterface/mantid/geometry/src/Exports/Detector.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Instrument/Detector.h" #include "MantidGeometry/Instrument/DetectorInfo.h" diff --git a/Framework/PythonInterface/mantid/geometry/src/Exports/DetectorGroup.cpp b/Framework/PythonInterface/mantid/geometry/src/Exports/DetectorGroup.cpp index 7b2e1290f2b4369ffa35da273dac8179b8104924..aa69c693275eba5bf0c9bc064c6f309288496a95 100644 --- a/Framework/PythonInterface/mantid/geometry/src/Exports/DetectorGroup.cpp +++ b/Framework/PythonInterface/mantid/geometry/src/Exports/DetectorGroup.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Instrument/DetectorGroup.h" #include "MantidGeometry/Instrument/DetectorInfo.h" diff --git a/Framework/PythonInterface/mantid/geometry/src/Exports/DetectorInfo.cpp b/Framework/PythonInterface/mantid/geometry/src/Exports/DetectorInfo.cpp index 15279d5e9e01903927d69be9c0e89bee32038c1e..d00b9d5941614a92566b4e55c4dfa39da6a11fff 100644 --- a/Framework/PythonInterface/mantid/geometry/src/Exports/DetectorInfo.cpp +++ b/Framework/PythonInterface/mantid/geometry/src/Exports/DetectorInfo.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Instrument/DetectorInfo.h" #include "MantidGeometry/Instrument/DetectorInfoItem.h" diff --git a/Framework/PythonInterface/mantid/geometry/src/Exports/DetectorInfoItem.cpp b/Framework/PythonInterface/mantid/geometry/src/Exports/DetectorInfoItem.cpp index e9b2a2d346105485f89134f4bb554b0ae5c5a4c9..9f15f0f37902bf8f3598934f270b4e967512119d 100644 --- a/Framework/PythonInterface/mantid/geometry/src/Exports/DetectorInfoItem.cpp +++ b/Framework/PythonInterface/mantid/geometry/src/Exports/DetectorInfoItem.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Instrument/DetectorInfoItem.h" #include "MantidGeometry/Instrument/DetectorInfo.h" diff --git a/Framework/PythonInterface/mantid/geometry/src/Exports/DetectorInfoPythonIterator.cpp b/Framework/PythonInterface/mantid/geometry/src/Exports/DetectorInfoPythonIterator.cpp index 7e0adc30665a8e5e7c9b2d2c66b583df6cd7a06f..2ab39289176adb4a2ae2e01c96cf8490a97da117 100644 --- a/Framework/PythonInterface/mantid/geometry/src/Exports/DetectorInfoPythonIterator.cpp +++ b/Framework/PythonInterface/mantid/geometry/src/Exports/DetectorInfoPythonIterator.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidPythonInterface/geometry/DetectorInfoPythonIterator.h" #include "MantidPythonInterface/core/VersionCompat.h" diff --git a/Framework/PythonInterface/mantid/geometry/src/Exports/Goniometer.cpp b/Framework/PythonInterface/mantid/geometry/src/Exports/Goniometer.cpp index f9dfd7663c73a0acdee26e80ab7317694d3858d7..852503bde0143e6efd774c31fca0b483779e6087 100644 --- a/Framework/PythonInterface/mantid/geometry/src/Exports/Goniometer.cpp +++ b/Framework/PythonInterface/mantid/geometry/src/Exports/Goniometer.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Instrument/Goniometer.h" #include "MantidKernel/WarningSuppressions.h" diff --git a/Framework/PythonInterface/mantid/geometry/src/Exports/GridDetector.cpp b/Framework/PythonInterface/mantid/geometry/src/Exports/GridDetector.cpp index 7ee7423c9f00675309a5cd82569140efd5384592..4d228269add116ace680119aedd5220d7407fe1e 100644 --- a/Framework/PythonInterface/mantid/geometry/src/Exports/GridDetector.cpp +++ b/Framework/PythonInterface/mantid/geometry/src/Exports/GridDetector.cpp @@ -1,3 +1,9 @@ +// Mantid Repository : https://github.com/mantidproject/mantid +// +// Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS +// SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Instrument/GridDetector.h" #include "MantidGeometry/Instrument/CompAssembly.h" #include "MantidGeometry/Instrument/GridDetectorPixel.h" diff --git a/Framework/PythonInterface/mantid/geometry/src/Exports/Group.cpp b/Framework/PythonInterface/mantid/geometry/src/Exports/Group.cpp index bf4688f187f69e17fd3e70e8d4fadd3b9192ffce..c4ce5921c9338647f2f74f42722b8eb848092528 100644 --- a/Framework/PythonInterface/mantid/geometry/src/Exports/Group.cpp +++ b/Framework/PythonInterface/mantid/geometry/src/Exports/Group.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Crystal/Group.h" #include "MantidPythonInterface/core/Converters/PyObjectToMatrix.h" diff --git a/Framework/PythonInterface/mantid/geometry/src/Exports/ICompAssembly.cpp b/Framework/PythonInterface/mantid/geometry/src/Exports/ICompAssembly.cpp index 59300bf9f895c3f176c7d34eb6db554be4a1784f..4d3389e3e855eb32075f8da8b6bf0948f2cb045d 100644 --- a/Framework/PythonInterface/mantid/geometry/src/Exports/ICompAssembly.cpp +++ b/Framework/PythonInterface/mantid/geometry/src/Exports/ICompAssembly.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/ICompAssembly.h" #include "MantidPythonInterface/core/GetPointer.h" diff --git a/Framework/PythonInterface/mantid/geometry/src/Exports/IComponent.cpp b/Framework/PythonInterface/mantid/geometry/src/Exports/IComponent.cpp index cce0445b1497276f3ad785eb52217f2c12655e8a..cdade0aede4951f68f0c681777c7f0096ca274b8 100644 --- a/Framework/PythonInterface/mantid/geometry/src/Exports/IComponent.cpp +++ b/Framework/PythonInterface/mantid/geometry/src/Exports/IComponent.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/IComponent.h" #include "MantidKernel/Quat.h" diff --git a/Framework/PythonInterface/mantid/geometry/src/Exports/IDetector.cpp b/Framework/PythonInterface/mantid/geometry/src/Exports/IDetector.cpp index 1343c19ef528601005650a47df9ce89af830d316..72319be68c19e5d3fb7c46ff76e0f267607983c4 100644 --- a/Framework/PythonInterface/mantid/geometry/src/Exports/IDetector.cpp +++ b/Framework/PythonInterface/mantid/geometry/src/Exports/IDetector.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/IDetector.h" #include "MantidPythonInterface/core/GetPointer.h" diff --git a/Framework/PythonInterface/mantid/geometry/src/Exports/IMDDimension.cpp b/Framework/PythonInterface/mantid/geometry/src/Exports/IMDDimension.cpp index 23581e99fd6d595de890344ca9294aa257ca7a43..f69dcc712ce4e13bd490266a706a2a076ee01ebb 100644 --- a/Framework/PythonInterface/mantid/geometry/src/Exports/IMDDimension.cpp +++ b/Framework/PythonInterface/mantid/geometry/src/Exports/IMDDimension.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/MDGeometry/IMDDimension.h" #include "MantidGeometry/MDGeometry/MDFrame.h" diff --git a/Framework/PythonInterface/mantid/geometry/src/Exports/IObjComponent.cpp b/Framework/PythonInterface/mantid/geometry/src/Exports/IObjComponent.cpp index 78f8a3c83e1f841d28401bdad3bdf6cfd478a9aa..dcdc8b94e2b92f5aff650b1a3c7ce9b4da3096b1 100644 --- a/Framework/PythonInterface/mantid/geometry/src/Exports/IObjComponent.cpp +++ b/Framework/PythonInterface/mantid/geometry/src/Exports/IObjComponent.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/IObjComponent.h" #include "MantidPythonInterface/core/GetPointer.h" diff --git a/Framework/PythonInterface/mantid/geometry/src/Exports/IObject.cpp b/Framework/PythonInterface/mantid/geometry/src/Exports/IObject.cpp index 496aa897c293437bfc6be6ea3bf12b9a4ac57957..7bd673b372f9754b61170d9c49df1717296627bd 100644 --- a/Framework/PythonInterface/mantid/geometry/src/Exports/IObject.cpp +++ b/Framework/PythonInterface/mantid/geometry/src/Exports/IObject.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Objects/IObject.h" #include "MantidPythonInterface/core/GetPointer.h" diff --git a/Framework/PythonInterface/mantid/geometry/src/Exports/Instrument.cpp b/Framework/PythonInterface/mantid/geometry/src/Exports/Instrument.cpp index b9b3968b6fd3e5f7c1534288b8b8a110cfd3e10c..84de8e481764a36d549aca4d55dc18ec451421ad 100644 --- a/Framework/PythonInterface/mantid/geometry/src/Exports/Instrument.cpp +++ b/Framework/PythonInterface/mantid/geometry/src/Exports/Instrument.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Instrument.h" #include "MantidGeometry/Instrument/ReferenceFrame.h" diff --git a/Framework/PythonInterface/mantid/geometry/src/Exports/MDFrame.cpp b/Framework/PythonInterface/mantid/geometry/src/Exports/MDFrame.cpp index 964d9e99b846f62e8b41f096b1c314b626db7995..392e0b1cd8d4ba58d6fd5713566aa765ec3c693e 100644 --- a/Framework/PythonInterface/mantid/geometry/src/Exports/MDFrame.cpp +++ b/Framework/PythonInterface/mantid/geometry/src/Exports/MDFrame.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/MDGeometry/MDFrame.h" #include "MantidPythonInterface/core/GetPointer.h" diff --git a/Framework/PythonInterface/mantid/geometry/src/Exports/ObjCompAssembly.cpp b/Framework/PythonInterface/mantid/geometry/src/Exports/ObjCompAssembly.cpp index f1b2f44d05aea1213efae797b065c244dd370681..8156aa0146d0a508e4e9401d10a8a9ee8903f92a 100644 --- a/Framework/PythonInterface/mantid/geometry/src/Exports/ObjCompAssembly.cpp +++ b/Framework/PythonInterface/mantid/geometry/src/Exports/ObjCompAssembly.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Instrument/ObjCompAssembly.h" #include "MantidPythonInterface/core/GetPointer.h" diff --git a/Framework/PythonInterface/mantid/geometry/src/Exports/ObjComponent.cpp b/Framework/PythonInterface/mantid/geometry/src/Exports/ObjComponent.cpp index 0f15b4e32df4c0422ad6989a4be20282ea1cda75..7e850cf11d3e87bf41c20bba9271c964fe9f2698 100644 --- a/Framework/PythonInterface/mantid/geometry/src/Exports/ObjComponent.cpp +++ b/Framework/PythonInterface/mantid/geometry/src/Exports/ObjComponent.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Instrument/ObjComponent.h" #include <boost/python/class.hpp> diff --git a/Framework/PythonInterface/mantid/geometry/src/Exports/OrientedLattice.cpp b/Framework/PythonInterface/mantid/geometry/src/Exports/OrientedLattice.cpp index 5bb0c408958e612ba25406face6024542f821206..ff7e5ed28a67acd071d09c2235ce7c881adda6e2 100644 --- a/Framework/PythonInterface/mantid/geometry/src/Exports/OrientedLattice.cpp +++ b/Framework/PythonInterface/mantid/geometry/src/Exports/OrientedLattice.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Crystal/OrientedLattice.h" #include "MantidPythonInterface/core/Converters/MatrixToNDArray.h" diff --git a/Framework/PythonInterface/mantid/geometry/src/Exports/PeakShape.cpp b/Framework/PythonInterface/mantid/geometry/src/Exports/PeakShape.cpp index fe400929f396a67111dcc99777c9de8211d3c098..b91c36ab058c98151b9c257e3fc818056de649e7 100644 --- a/Framework/PythonInterface/mantid/geometry/src/Exports/PeakShape.cpp +++ b/Framework/PythonInterface/mantid/geometry/src/Exports/PeakShape.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Crystal/PeakShape.h" #include "MantidPythonInterface/core/GetPointer.h" diff --git a/Framework/PythonInterface/mantid/geometry/src/Exports/PointGroup.cpp b/Framework/PythonInterface/mantid/geometry/src/Exports/PointGroup.cpp index 3af943f1c2e8885d102087d2e8c7bf9699665730..f65803d9c46f0ebd95df1e8e8aa93ba18c33f44b 100644 --- a/Framework/PythonInterface/mantid/geometry/src/Exports/PointGroup.cpp +++ b/Framework/PythonInterface/mantid/geometry/src/Exports/PointGroup.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Crystal/PointGroup.h" #include "MantidGeometry/Crystal/Group.h" diff --git a/Framework/PythonInterface/mantid/geometry/src/Exports/PointGroupFactory.cpp b/Framework/PythonInterface/mantid/geometry/src/Exports/PointGroupFactory.cpp index 48ddecbe14ef812faa41ded4fbe06141d20ae903..52663ff951ac984766071937e9b403344614cf8f 100644 --- a/Framework/PythonInterface/mantid/geometry/src/Exports/PointGroupFactory.cpp +++ b/Framework/PythonInterface/mantid/geometry/src/Exports/PointGroupFactory.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Crystal/PointGroupFactory.h" #include "MantidGeometry/Crystal/SpaceGroupFactory.h" diff --git a/Framework/PythonInterface/mantid/geometry/src/Exports/RectangularDetector.cpp b/Framework/PythonInterface/mantid/geometry/src/Exports/RectangularDetector.cpp index db7d948c05c9c3c62222b58e1ef7c501cdf48ef3..e6a9a751659a5902a290799d1a604f8b92dada04 100644 --- a/Framework/PythonInterface/mantid/geometry/src/Exports/RectangularDetector.cpp +++ b/Framework/PythonInterface/mantid/geometry/src/Exports/RectangularDetector.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Instrument/RectangularDetector.h" #include "MantidGeometry/Instrument/CompAssembly.h" diff --git a/Framework/PythonInterface/mantid/geometry/src/Exports/ReferenceFrame.cpp b/Framework/PythonInterface/mantid/geometry/src/Exports/ReferenceFrame.cpp index 7568ff0d24c207fe8e489a575056aa4a399cb2b1..eaab45ffc5295528757e8d1750c959bc4c614a4d 100644 --- a/Framework/PythonInterface/mantid/geometry/src/Exports/ReferenceFrame.cpp +++ b/Framework/PythonInterface/mantid/geometry/src/Exports/ReferenceFrame.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Instrument/ReferenceFrame.h" #include "MantidPythonInterface/core/GetPointer.h" diff --git a/Framework/PythonInterface/mantid/geometry/src/Exports/ReflectionGenerator.cpp b/Framework/PythonInterface/mantid/geometry/src/Exports/ReflectionGenerator.cpp index 9db9c778a0ab8aec9d628f1936b1b01498289c54..4a8ad00a7451a970609551735ff7a3911efd2777 100644 --- a/Framework/PythonInterface/mantid/geometry/src/Exports/ReflectionGenerator.cpp +++ b/Framework/PythonInterface/mantid/geometry/src/Exports/ReflectionGenerator.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Crystal/ReflectionGenerator.h" #include "MantidPythonInterface/core/Converters/PySequenceToVector.h" diff --git a/Framework/PythonInterface/mantid/geometry/src/Exports/SpaceGroup.cpp b/Framework/PythonInterface/mantid/geometry/src/Exports/SpaceGroup.cpp index 4220a5fb27fb5fa531cc941dd4aa15cf7c9d9165..47a99b32219e3e6e86cd55b3ecc2997460b65e0b 100644 --- a/Framework/PythonInterface/mantid/geometry/src/Exports/SpaceGroup.cpp +++ b/Framework/PythonInterface/mantid/geometry/src/Exports/SpaceGroup.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Crystal/SpaceGroup.h" #include "MantidGeometry/Crystal/Group.h" diff --git a/Framework/PythonInterface/mantid/geometry/src/Exports/SpaceGroupFactory.cpp b/Framework/PythonInterface/mantid/geometry/src/Exports/SpaceGroupFactory.cpp index c5c923ccc62de5ffaf28d139be6fba134ce4f7f7..a995fd7c33815c0961db82ab45b2498e613c3bec 100644 --- a/Framework/PythonInterface/mantid/geometry/src/Exports/SpaceGroupFactory.cpp +++ b/Framework/PythonInterface/mantid/geometry/src/Exports/SpaceGroupFactory.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Crystal/SpaceGroupFactory.h" #include "MantidPythonInterface/core/GetPointer.h" diff --git a/Framework/PythonInterface/mantid/geometry/src/Exports/SymmetryElement.cpp b/Framework/PythonInterface/mantid/geometry/src/Exports/SymmetryElement.cpp index 68981de602ce999a3c68e9a087af895d207d54a2..b6a125815a01c7759243927ccf388689d4c13ace 100644 --- a/Framework/PythonInterface/mantid/geometry/src/Exports/SymmetryElement.cpp +++ b/Framework/PythonInterface/mantid/geometry/src/Exports/SymmetryElement.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Crystal/SymmetryElement.h" #include "MantidPythonInterface/core/GetPointer.h" diff --git a/Framework/PythonInterface/mantid/geometry/src/Exports/SymmetryElementFactory.cpp b/Framework/PythonInterface/mantid/geometry/src/Exports/SymmetryElementFactory.cpp index a5977ecb59d645de28ec9ed21a449f5c78f3378b..52cdd8584f6b45d5de204179c82f40bec85f256f 100644 --- a/Framework/PythonInterface/mantid/geometry/src/Exports/SymmetryElementFactory.cpp +++ b/Framework/PythonInterface/mantid/geometry/src/Exports/SymmetryElementFactory.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Crystal/SymmetryElementFactory.h" #include "MantidPythonInterface/core/GetPointer.h" diff --git a/Framework/PythonInterface/mantid/geometry/src/Exports/SymmetryOperation.cpp b/Framework/PythonInterface/mantid/geometry/src/Exports/SymmetryOperation.cpp index b1c94ae7ff63e7e352b3eabc69cbbd015507033a..e08e0a3557640bfba5eef15a67792ba0d4e546ae 100644 --- a/Framework/PythonInterface/mantid/geometry/src/Exports/SymmetryOperation.cpp +++ b/Framework/PythonInterface/mantid/geometry/src/Exports/SymmetryOperation.cpp @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #include "MantidGeometry/Crystal/SymmetryOperation.h" #include "MantidPythonInterface/core/Converters/PyObjectToMatrix.h" #include "MantidPythonInterface/core/Converters/PyObjectToV3D.h" diff --git a/Framework/PythonInterface/mantid/geometry/src/Exports/SymmetryOperationFactory.cpp b/Framework/PythonInterface/mantid/geometry/src/Exports/SymmetryOperationFactory.cpp index 5bf25d70d9f5d5b6309b7aea262244fe3426b54c..2b378e84bbb26fa8c743f393dcf17a114c3d58cf 100644 --- a/Framework/PythonInterface/mantid/geometry/src/Exports/SymmetryOperationFactory.cpp +++ b/Framework/PythonInterface/mantid/geometry/src/Exports/SymmetryOperationFactory.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Crystal/SymmetryOperationFactory.h" #include "MantidPythonInterface/core/PythonObjectInstantiator.h" diff --git a/Framework/PythonInterface/mantid/geometry/src/Exports/UnitCell.cpp b/Framework/PythonInterface/mantid/geometry/src/Exports/UnitCell.cpp index c56ad2f6df791f7d1ee56c71314da41cf9126986..5811c325eb7e6364637075a26812bf233f720a9a 100644 --- a/Framework/PythonInterface/mantid/geometry/src/Exports/UnitCell.cpp +++ b/Framework/PythonInterface/mantid/geometry/src/Exports/UnitCell.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidGeometry/Crystal/UnitCell.h" #include "MantidPythonInterface/core/Converters/MatrixToNDArray.h" @@ -30,7 +30,7 @@ namespace //<unnamed> using namespace Mantid::PythonInterface; /// Pass-through function to set the unit cell from a 2D numpy array -void recalculateFromGstar(UnitCell &self, object values) { +void recalculateFromGstar(UnitCell &self, const object &values) { // Create a double matrix and put this in to the unit cell self.recalculateFromGstar(Converters::PyObjectToMatrix(values)()); } diff --git a/Framework/PythonInterface/mantid/geometry/src/geometry.cpp.in b/Framework/PythonInterface/mantid/geometry/src/geometry.cpp.in index b13d4b2f3ea1cb1971f57a682c13dc21838473ba..96e8d37ba38ca5942d6be0b139a581ac67535eb1 100644 --- a/Framework/PythonInterface/mantid/geometry/src/geometry.cpp.in +++ b/Framework/PythonInterface/mantid/geometry/src/geometry.cpp.in @@ -1,13 +1,13 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + -/*****************************************************************************************/ + /********** PLEASE NOTE! THIS FILE WAS AUTO-GENERATED FROM CMAKE. ***********************/ /********** Source = geometry.cpp.in *****************************************************/ -/*****************************************************************************************/ + #include <boost/python/module.hpp> #include <boost/python/docstring_options.hpp> #include <boost/python/def.hpp> diff --git a/Framework/PythonInterface/mantid/kernel/__init__.py b/Framework/PythonInterface/mantid/kernel/__init__.py index 40cea724506fa4fcc30e720606e8ba8a3e635d97..888f203deab3573d6457fc826ebb5603a11f3277 100644 --- a/Framework/PythonInterface/mantid/kernel/__init__.py +++ b/Framework/PythonInterface/mantid/kernel/__init__.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + """ kernel diff --git a/Framework/PythonInterface/mantid/kernel/_aliases.py b/Framework/PythonInterface/mantid/kernel/_aliases.py index b6ac466b9d7ce5a992507530126fd7d8bdd6036e..d4a217c0c0be6b3d519b055656227175042babfa 100644 --- a/Framework/PythonInterface/mantid/kernel/_aliases.py +++ b/Framework/PythonInterface/mantid/kernel/_aliases.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + """ Defines a set of aliases for the kernel module to make diff --git a/Framework/PythonInterface/mantid/kernel/environment.py b/Framework/PythonInterface/mantid/kernel/environment.py index c9fdb1f8ada956d09a44a8e63891463ee2d09fb0..edf7ebfe51169dc0c0a242668da4ed5d7f5340ef 100644 --- a/Framework/PythonInterface/mantid/kernel/environment.py +++ b/Framework/PythonInterface/mantid/kernel/environment.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + """ Defines a set functions for interrogating the current enviroment. diff --git a/Framework/PythonInterface/mantid/kernel/funcinspect.py b/Framework/PythonInterface/mantid/kernel/funcinspect.py index 41653670e3d3bc9b01ed0a7d47777c0faa983331..ce5a1611cf84d4afc07155ff123ccbe70b4a44e2 100644 --- a/Framework/PythonInterface/mantid/kernel/funcinspect.py +++ b/Framework/PythonInterface/mantid/kernel/funcinspect.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + """ Defines functions that can be used to inspect the properties of a diff --git a/Framework/PythonInterface/mantid/kernel/inc/MantidPythonInterface/kernel/DllConfig.h b/Framework/PythonInterface/mantid/kernel/inc/MantidPythonInterface/kernel/DllConfig.h index ec2b95129a1f080aab3713271c064813ec4a9270..e6bb34545dc174907cc7faab8a61c79cf454ea9b 100644 --- a/Framework/PythonInterface/mantid/kernel/inc/MantidPythonInterface/kernel/DllConfig.h +++ b/Framework/PythonInterface/mantid/kernel/inc/MantidPythonInterface/kernel/DllConfig.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/PythonInterface/mantid/kernel/inc/MantidPythonInterface/kernel/Registry/MappingTypeHandler.h b/Framework/PythonInterface/mantid/kernel/inc/MantidPythonInterface/kernel/Registry/MappingTypeHandler.h index e3681a9687facca6675aaac2a4b6997c890a0239..093f8e5fb89be8f13b63249e635e65edd9dc9b4f 100644 --- a/Framework/PythonInterface/mantid/kernel/inc/MantidPythonInterface/kernel/Registry/MappingTypeHandler.h +++ b/Framework/PythonInterface/mantid/kernel/inc/MantidPythonInterface/kernel/Registry/MappingTypeHandler.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/PythonInterface/mantid/kernel/inc/MantidPythonInterface/kernel/Registry/PropertyManagerFactory.h b/Framework/PythonInterface/mantid/kernel/inc/MantidPythonInterface/kernel/Registry/PropertyManagerFactory.h index a9acd9f4967915342a27fd21a6593516b05ddd92..4878f4602f95c674f184073bf329587363f6ad7a 100644 --- a/Framework/PythonInterface/mantid/kernel/inc/MantidPythonInterface/kernel/Registry/PropertyManagerFactory.h +++ b/Framework/PythonInterface/mantid/kernel/inc/MantidPythonInterface/kernel/Registry/PropertyManagerFactory.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/PythonInterface/mantid/kernel/inc/MantidPythonInterface/kernel/Registry/PropertyValueHandler.h b/Framework/PythonInterface/mantid/kernel/inc/MantidPythonInterface/kernel/Registry/PropertyValueHandler.h index e2dcf7f0c73cd0ce3b88c502046416782d2c37fd..24f40b42e093a5eae5327ec7d59a4a6fdd5f12ae 100644 --- a/Framework/PythonInterface/mantid/kernel/inc/MantidPythonInterface/kernel/Registry/PropertyValueHandler.h +++ b/Framework/PythonInterface/mantid/kernel/inc/MantidPythonInterface/kernel/Registry/PropertyValueHandler.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/PythonInterface/mantid/kernel/inc/MantidPythonInterface/kernel/Registry/PropertyWithValueFactory.h b/Framework/PythonInterface/mantid/kernel/inc/MantidPythonInterface/kernel/Registry/PropertyWithValueFactory.h index 0e552f420a0367f9fdea9ecacc030f837e82292c..ce2bb5d7711a50080c5966b54c11b85142647ba5 100644 --- a/Framework/PythonInterface/mantid/kernel/inc/MantidPythonInterface/kernel/Registry/PropertyWithValueFactory.h +++ b/Framework/PythonInterface/mantid/kernel/inc/MantidPythonInterface/kernel/Registry/PropertyWithValueFactory.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/PythonInterface/mantid/kernel/inc/MantidPythonInterface/kernel/Registry/RegisterWorkspacePtrToPython.h b/Framework/PythonInterface/mantid/kernel/inc/MantidPythonInterface/kernel/Registry/RegisterWorkspacePtrToPython.h index 7f96e5f1b38b1b5aee1e598385a3a2879c1a5eff..fdcf077cd1a599e70a31fd7acea7ef3e40056f0e 100644 --- a/Framework/PythonInterface/mantid/kernel/inc/MantidPythonInterface/kernel/Registry/RegisterWorkspacePtrToPython.h +++ b/Framework/PythonInterface/mantid/kernel/inc/MantidPythonInterface/kernel/Registry/RegisterWorkspacePtrToPython.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/PythonInterface/mantid/kernel/inc/MantidPythonInterface/kernel/Registry/SequenceTypeHandler.h b/Framework/PythonInterface/mantid/kernel/inc/MantidPythonInterface/kernel/Registry/SequenceTypeHandler.h index 6072575787b15ac74d23c8bd36f872347630a607..cc49c520857ac7952d905c962d1dffcf59a1da03 100644 --- a/Framework/PythonInterface/mantid/kernel/inc/MantidPythonInterface/kernel/Registry/SequenceTypeHandler.h +++ b/Framework/PythonInterface/mantid/kernel/inc/MantidPythonInterface/kernel/Registry/SequenceTypeHandler.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/PythonInterface/mantid/kernel/inc/MantidPythonInterface/kernel/Registry/TypeRegistry.h b/Framework/PythonInterface/mantid/kernel/inc/MantidPythonInterface/kernel/Registry/TypeRegistry.h index 5799f74301c3b1d41f1700278ad8d549ae0f9209..12cb47b94effe5392aa56bdee779f133ff68e35d 100644 --- a/Framework/PythonInterface/mantid/kernel/inc/MantidPythonInterface/kernel/Registry/TypeRegistry.h +++ b/Framework/PythonInterface/mantid/kernel/inc/MantidPythonInterface/kernel/Registry/TypeRegistry.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/PythonInterface/mantid/kernel/inc/MantidPythonInterface/kernel/Registry/TypedPropertyValueHandler.h b/Framework/PythonInterface/mantid/kernel/inc/MantidPythonInterface/kernel/Registry/TypedPropertyValueHandler.h index 3b9d16261f46ba7d26b805c204b01a89aca7c6bb..b706b7d67897d0b872d50c8fdcf1b6e7a48d5356 100644 --- a/Framework/PythonInterface/mantid/kernel/inc/MantidPythonInterface/kernel/Registry/TypedPropertyValueHandler.h +++ b/Framework/PythonInterface/mantid/kernel/inc/MantidPythonInterface/kernel/Registry/TypedPropertyValueHandler.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/PythonInterface/mantid/kernel/inc/MantidPythonInterface/kernel/kernel.h b/Framework/PythonInterface/mantid/kernel/inc/MantidPythonInterface/kernel/kernel.h index 073f7bf61fe19895bc83d038c2517488d5e8850f..a66f911baafdd59d418b993ffdd73041dd945cf4 100644 --- a/Framework/PythonInterface/mantid/kernel/inc/MantidPythonInterface/kernel/kernel.h +++ b/Framework/PythonInterface/mantid/kernel/inc/MantidPythonInterface/kernel/kernel.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once /* diff --git a/Framework/PythonInterface/mantid/kernel/plugins.py b/Framework/PythonInterface/mantid/kernel/plugins.py index 99e7a396b09699d17e60e935dc403223c68597e7..fe28799d80d567ddf5e35e04a8146bf7c125d06f 100644 --- a/Framework/PythonInterface/mantid/kernel/plugins.py +++ b/Framework/PythonInterface/mantid/kernel/plugins.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + """ Defines functions to dynamically load Python modules. diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/ArrayBoundedValidator.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/ArrayBoundedValidator.cpp index 5ba093aff04d9a45ef588df4695911870757fc05..c08b6c571f494e116af6c9eec5c344b257d4325f 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Exports/ArrayBoundedValidator.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Exports/ArrayBoundedValidator.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/ArrayBoundedValidator.h" diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/ArrayLengthValidator.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/ArrayLengthValidator.cpp index 6f07d79a4f577c1bfca5f825390b4c53175a79b6..c6ade3a1f4bd02767623036abe47a352ed28b4f0 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Exports/ArrayLengthValidator.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Exports/ArrayLengthValidator.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/ArrayLengthValidator.h" #include <boost/python/class.hpp> diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/ArrayOrderedPairsValidator.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/ArrayOrderedPairsValidator.cpp index 97a52f80ecac67c03d32320671ff72d87a6e7d9c..4e62986c8fc53214998b01ea08880f7b95970d85 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Exports/ArrayOrderedPairsValidator.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Exports/ArrayOrderedPairsValidator.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/ArrayOrderedPairsValidator.h" #include <boost/python/class.hpp> diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/ArrayProperty.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/ArrayProperty.cpp index 468836d94d3a5c0eaa20f83d71070c263d63fdb1..0c904dd32a933aaabfafa7ac1c29fad7989cdcf0 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Exports/ArrayProperty.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Exports/ArrayProperty.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/ArrayProperty.h" #include "MantidKernel/NullValidator.h" @@ -114,7 +114,7 @@ template <> std::string dtype(ArrayProperty<std::string> &self) { template <typename T> ArrayProperty<T> *createArrayPropertyFromList(const std::string &name, const boost::python::list &values, - IValidator_sptr validator, + const IValidator_sptr &validator, const unsigned int direction) { return new ArrayProperty<T>(name, Converters::PySequenceToVector<T>(values)(), validator, direction); @@ -130,10 +130,10 @@ ArrayProperty<T> *createArrayPropertyFromList(const std::string &name, * @return */ template <typename T> -ArrayProperty<T> *createArrayPropertyFromNDArray(const std::string &name, - const NDArray &values, - IValidator_sptr validator, - const unsigned int direction) { +ArrayProperty<T> * +createArrayPropertyFromNDArray(const std::string &name, const NDArray &values, + const IValidator_sptr &validator, + const unsigned int direction) { return new ArrayProperty<T>(name, Converters::NDArrayToVector<T>(values)(), validator, direction); } diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/Atom.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/Atom.cpp index 4e9769ec96ef4094f2795ddeea05b4083aeae35b..8e887d3f32a6cdb283a450028ea8ef48a4a326f3 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Exports/Atom.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Exports/Atom.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/Atom.h" #include "MantidKernel/NeutronAtom.h" diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/BoundedValidator.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/BoundedValidator.cpp index 102f2113f2137f6b1eae96859450eee2060887ee..3bb38a74f45ce047aee9a3166ab2f00ab378e27e 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Exports/BoundedValidator.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Exports/BoundedValidator.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/BoundedValidator.h" #include "MantidPythonInterface/core/IsNone.h" diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/CompositeValidator.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/CompositeValidator.cpp index 06d914802e8de2210761638bc174a5e07cbdbfb7..685993a4f756f33f3aac3547f919d69b1258b328 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Exports/CompositeValidator.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Exports/CompositeValidator.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/CompositeValidator.h" #include <boost/python/class.hpp> @@ -52,7 +52,7 @@ void export_CompositeValidator() { &createCompositeValidator, default_call_policies(), (arg("validators"), arg("relation") = CompositeRelation::AND))) .def("add", - (void (CompositeValidator::*)(IValidator_sptr)) & + (void (CompositeValidator::*)(const IValidator_sptr &)) & CompositeValidator::add, (arg("self"), arg("other")), "Add another validator to the list"); } diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/ConfigObserver.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/ConfigObserver.cpp index 85608fc327a39daec1a35e90267249ecea3efe05..70e1904050c71bf19d7340c0a911dc25c30bc73e 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Exports/ConfigObserver.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Exports/ConfigObserver.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/ConfigObserver.h" #include "MantidPythonInterface/core/CallMethod.h" diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/ConfigPropertyObserver.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/ConfigPropertyObserver.cpp index c419a614f4835921dcfce46625c61fc61066d05f..4a8aee4f0f0dd6013ac78593950081eefb81aa32 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Exports/ConfigPropertyObserver.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Exports/ConfigPropertyObserver.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/ConfigPropertyObserver.h" #include "MantidPythonInterface/core/CallMethod.h" diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/ConfigService.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/ConfigService.cpp index 80214a1afd8de18e8383fc55fb2b84fc7ec78302..214307dfd34d7aed8bdd7c1fa18f3ba853aaf8e2 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Exports/ConfigService.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Exports/ConfigService.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/ConfigService.h" #include "MantidKernel/FacilityInfo.h" diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/DataItem.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/DataItem.cpp index 061791017b8f9f86b81e50832e36518128f676fd..f8d84029b1872775e71e74d9c1cc0a393d16a23a 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Exports/DataItem.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Exports/DataItem.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/DataItem.h" #include "MantidPythonInterface/core/GetPointer.h" diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/DateAndTime.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/DateAndTime.cpp index 412faf8f61ba81b1ac61fa3a9841508790ce4199..563d9a45ae360db048bf48b1dcb2b0dc5b6a95b5 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Exports/DateAndTime.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Exports/DateAndTime.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/DateAndTime.h" #include "MantidPythonInterface/core/Converters/DateAndTime.h" diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/DeltaEMode.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/DeltaEMode.cpp index ed0b48a9e8c28ecb77fa0b7bc8c3548bc9c695a0..31c8e1ba26bb14d056fa4bd8b715ccea59a4664e 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Exports/DeltaEMode.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Exports/DeltaEMode.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/DeltaEMode.h" #include "MantidPythonInterface/core/Policies/VectorToNumpy.h" diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/EnabledWhenProperty.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/EnabledWhenProperty.cpp index 2d08c4c9fe4ac44ad928155ce3edab18ad24fa00..86b878b41a1514c05c0f77f2707d40bc8a638fec 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Exports/EnabledWhenProperty.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Exports/EnabledWhenProperty.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/EnabledWhenProperty.h" #include <boost/python/class.hpp> diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/ErrorReporter.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/ErrorReporter.cpp index f5d33bc7df6f4efec312cba549a973c1a4f829cd..1ccfaaaeeb31044055be76a9fccd2cfbbb84921f 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Exports/ErrorReporter.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Exports/ErrorReporter.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/ErrorReporter.h" #include "MantidPythonInterface/core/GetPointer.h" diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/FacilityInfo.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/FacilityInfo.cpp index 4ecfeb4a9fd7d0df80a639d63c68eb6253c191f8..146d8ed6a307282f94579c2845a3d16ca231eb31 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Exports/FacilityInfo.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Exports/FacilityInfo.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/FacilityInfo.h" #include <boost/python/class.hpp> diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/FilteredTimeSeriesProperty.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/FilteredTimeSeriesProperty.cpp index 2c653b2cbe5f02ade9634a7c93b5e49cf81c59cf..3a9edd1d3a639e9ab4c67f2a9ad5f054282d9418 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Exports/FilteredTimeSeriesProperty.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Exports/FilteredTimeSeriesProperty.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/FilteredTimeSeriesProperty.h" #include "MantidPythonInterface/core/GetPointer.h" diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/IPropertyManager.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/IPropertyManager.cpp index fc7d1e4d1dd1ce33e587c80b516a7d1509274f16..ebff49089ca1d8169b915cb0698789548fd5e6fc 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Exports/IPropertyManager.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Exports/IPropertyManager.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/IPropertyManager.h" #include "MantidKernel/IPropertySettings.h" @@ -76,7 +76,7 @@ void setProperties(IPropertyManager &self, const boost::python::dict &kwargs) { * @param value :: The value of the property as a bpl object */ void declareProperty(IPropertyManager &self, const std::string &name, - boost::python::object value) { + const boost::python::object &value) { auto p = std::unique_ptr<Property>( Registry::PropertyWithValueFactory::create(name, value, 0)); self.declareProperty(std::move(p)); @@ -91,7 +91,7 @@ void declareProperty(IPropertyManager &self, const std::string &name, * @param value :: The value of the property as a bpl object */ void declareOrSetProperty(IPropertyManager &self, const std::string &name, - boost::python::object value) { + const boost::python::object &value) { bool propExists = self.existsProperty(name); if (propExists) { setProperty(self, name, value); diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/IPropertySettings.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/IPropertySettings.cpp index 419b8b20d09ed775c67b9b3c935c9937dd363b2d..88002937b897bb707aa56dc4550bcc0fcdc106e3 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Exports/IPropertySettings.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Exports/IPropertySettings.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/IPropertySettings.h" #include "MantidKernel/IPropertyManager.h" diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/IValidator.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/IValidator.cpp index 3eb312bb4b3d33d4b7e6fd01ffd7201102f09a9d..70f80f3f03ec356417e659009d62ebc09f1ffd38 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Exports/IValidator.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Exports/IValidator.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/IValidator.h" #include "MantidPythonInterface/core/GetPointer.h" diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/InstrumentInfo.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/InstrumentInfo.cpp index b62168648b8159c4d63786a06c9d5330d6b1a734..88b582a6f15055c44cf550fef0770020a916eaa0 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Exports/InstrumentInfo.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Exports/InstrumentInfo.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/InstrumentInfo.h" #include "MantidKernel/FacilityInfo.h" diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/ListValidator.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/ListValidator.cpp index 916f03762cd6b7665e5225b826aeb57d2050e867..67c4bdcf91a95f258c5afdebd0f4a4b4cd8edc2c 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Exports/ListValidator.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Exports/ListValidator.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/ListValidator.h" #include "MantidPythonInterface/core/Converters/PySequenceToVector.h" diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/LiveListenerInfo.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/LiveListenerInfo.cpp index 4f57cb75d4cadaafb1b30de22654a35bb743441d..6ef1759265f400118a91c7b1dc6fd096b02f9319 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Exports/LiveListenerInfo.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Exports/LiveListenerInfo.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/LiveListenerInfo.h" #include "MantidKernel/InstrumentInfo.h" diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/LogFilter.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/LogFilter.cpp index e7701d23411d455c8fcbb6d82650669099fe48da..478de8fc2c93af41560356758b9c5b424c031787 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Exports/LogFilter.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Exports/LogFilter.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/LogFilter.h" #include "MantidKernel/TimeSeriesProperty.h" diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/Logger.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/Logger.cpp index 10e43a9f636189c0097241577aacba5fb24869ea..c86e7c696d14184f3b6a2c9ce21349b0ad8cac94 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Exports/Logger.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Exports/Logger.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/Logger.h" #include <boost/make_shared.hpp> diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/MandatoryValidator.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/MandatoryValidator.cpp index 09d844c8225c45243154f18283a48fdabcc3532a..2ad701e6186a67a58551e35a6a87b62f4165b7cd 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Exports/MandatoryValidator.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Exports/MandatoryValidator.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/MandatoryValidator.h" #include <boost/python/class.hpp> diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/Material.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/Material.cpp index 23d3ca860a5f34936724ff32564fa9002605fcd0..a6a54e4d7e9e2080a04603b43aff2fe16cdf0903 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Exports/Material.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Exports/Material.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/Material.h" #include "MantidKernel/Atom.h" diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/MaterialBuilder.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/MaterialBuilder.cpp index e1944a974bcd0c068ccfbd17d0579e013b9566d5..fa6800b3e58929254fef46fb28a6986190f949af 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Exports/MaterialBuilder.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Exports/MaterialBuilder.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/MaterialBuilder.h" #include <boost/python/class.hpp> diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/Memory.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/Memory.cpp index 143c3d345fb2776dae19cdf512e3be4b87d9cf64..9bcfa1b7881545decb435aec6d43437a29bee3b6 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Exports/Memory.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Exports/Memory.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/Memory.h" #include <boost/python/class.hpp> diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/NullValidator.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/NullValidator.cpp index f90eab68b5233e925eb4729fbf76855664aa0fb5..1f5f355bde168004654f333d4c3f8fbbab986b07 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Exports/NullValidator.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Exports/NullValidator.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/NullValidator.h" #include "MantidPythonInterface/core/GetPointer.h" diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/OptionalBool.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/OptionalBool.cpp index 575bac16edbf614f63c9657857986d094d9a2985..aeacb786d505eb81ec4079ac675c583d9a1655ac 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Exports/OptionalBool.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Exports/OptionalBool.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/OptionalBool.h" #include "MantidKernel/IPropertyManager.h" diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/ProgressBase.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/ProgressBase.cpp index 1efbf811205d2f2538fd5c415efd02ca489b0a75..17038e7c0839e50eb5e8e989dc4f1368c4717c22 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Exports/ProgressBase.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Exports/ProgressBase.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/ProgressBase.h" #include <boost/python/class.hpp> diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/Property.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/Property.cpp index 0a92e2ca101316ef37cd657f35936b8412fbf750..59628cf3367dd9d3825908e40652f9a7d30379f4 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Exports/Property.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Exports/Property.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/Property.h" #include "MantidKernel/EmptyValues.h" diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/PropertyFactory.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/PropertyFactory.cpp index 123fa4d316235ddfc6e2128d0f999530704ce198..469602519bf97844084cb6736bf3c26876a3fe15 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Exports/PropertyFactory.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Exports/PropertyFactory.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidPythonInterface/kernel/Registry/PropertyWithValueFactory.h" #include "MantidPythonInterface/kernel/Registry/SequenceTypeHandler.h" diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/PropertyHistory.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/PropertyHistory.cpp index 1c223b9cbe0a2b7da4d0b20daaa1e2afe6a4323e..a8fd5cee27e2363198e956dcd2283d8802629e7d 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Exports/PropertyHistory.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Exports/PropertyHistory.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/PropertyHistory.h" #include "MantidPythonInterface/core/GetPointer.h" diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/PropertyManager.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/PropertyManager.cpp index 89989afeceeada683f7777fa57e55b57a8067553..8667e2ff91d5192d1d0af30e3a185034f3745ece 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Exports/PropertyManager.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Exports/PropertyManager.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #ifdef _MSC_VER #pragma warning(disable : 4250) // Disable warning regarding inheritance via diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/PropertyManagerDataService.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/PropertyManagerDataService.cpp index dfac09d95064f8a5aaf3e320bded30b54a48b67c..f7ccc7b3cc7277f2c060fff28edd0403034cc00b 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Exports/PropertyManagerDataService.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Exports/PropertyManagerDataService.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidPythonInterface/core/DataServiceExporter.h" #include "MantidPythonInterface/core/GetPointer.h" diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/PropertyManagerProperty.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/PropertyManagerProperty.cpp index 0cbd2221d992bf42f7325d2211291865829d9e35..08ecb601d1a67b7b6b11cb9145ff8482be8c1410 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Exports/PropertyManagerProperty.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Exports/PropertyManagerProperty.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/PropertyManagerProperty.h" #include "MantidKernel/PropertyManager.h" diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/PropertyWithValue.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/PropertyWithValue.cpp index 49242ef82e6ea92a5d3e5812698773bd78408373..2d4617da6f44b0e2b2936e47bdb2a04bb73b783f 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Exports/PropertyWithValue.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Exports/PropertyWithValue.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidPythonInterface/core/PropertyWithValueExporter.h" diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/Quat.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/Quat.cpp index afac6f8d6ee8e3ee246d7b43eaec6f28d4d319b6..dad7f9136c3f5a9e772f43b485cb0f7de421e534 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Exports/Quat.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Exports/Quat.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/Quat.h" #include "MantidKernel/V3D.h" diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/RebinParamsValidator.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/RebinParamsValidator.cpp index ba8f8e430a79e58396ab5cc0d4b8a37bbf8a79eb..8623d2426df08d1baf1bda3bb0a9d564963375b0 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Exports/RebinParamsValidator.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Exports/RebinParamsValidator.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/RebinParamsValidator.h" #include <boost/python/class.hpp> diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/Statistics.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/Statistics.cpp index ddee93b2c6199658a4a30e219c09c0a8f5e07b3b..846f2c71d1b2fbda1c523e2d4ca63533493c023f 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Exports/Statistics.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Exports/Statistics.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/Statistics.h" #include "MantidKernel/WarningSuppressions.h" diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/StlContainers.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/StlContainers.cpp index d7fe8319c3fb2e0026dfc358c1aca3597cc9e423..7b92ec274fe16438f55ee2e48cbbc2605edf7c46 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Exports/StlContainers.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Exports/StlContainers.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidPythonInterface/core/StlExportDefinitions.h" diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/StringContainsValidator.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/StringContainsValidator.cpp index 8c9b87f73676c9acc630b5d39124bb447f71b7f8..1ef5a753d509adce598645dbc65d6472a3e74883 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Exports/StringContainsValidator.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Exports/StringContainsValidator.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/StringContainsValidator.h" #include "MantidPythonInterface/core/Converters/PySequenceToVector.h" diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/TimeSeriesProperty.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/TimeSeriesProperty.cpp index 062fe3a62d2303e91b2631d9acedab6d4d6ec975..866ccf41a5c96484731b388f39b2f2cb9031c795 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Exports/TimeSeriesProperty.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Exports/TimeSeriesProperty.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/TimeSeriesProperty.h" #include "MantidPythonInterface/core/Converters/ContainerDtype.h" diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/Unit.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/Unit.cpp index a3d9f28a911a10991d137e119dd1884c92035c39..ba461e9ff12905a18377fdd0f772e62f471c130a 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Exports/Unit.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Exports/Unit.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/Unit.h" #include "MantidPythonInterface/core/GetPointer.h" diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/UnitConversion.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/UnitConversion.cpp index 0b9b2bb9bb94a4d7664471d4ac67370f6b4f7e8b..7e371ad185ef594a874a0b836d2a9ab74b4b32ab 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Exports/UnitConversion.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Exports/UnitConversion.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/UnitConversion.h" #include <boost/python/class.hpp> diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/UnitFactory.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/UnitFactory.cpp index 1088d0da1b33ec743a4534de5be7e58a67f54f32..0fc257c79e2219a630ae4c6fff7be4196130ee88 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Exports/UnitFactory.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Exports/UnitFactory.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/UnitFactory.h" #include "MantidKernel/Unit.h" diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/UnitLabel.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/UnitLabel.cpp index 9330af21762d8c25de0a51457c77062c28c09711..dc514eadf99a821c94e880d03b6119a3dca619f8 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Exports/UnitLabel.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Exports/UnitLabel.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/UnitLabel.h" #include <boost/python/class.hpp> diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/Units.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/Units.cpp index 0be434255c6c76e89634e3026e427bd2c0e36cba..207d2ada174ad901e47843d0fcc6b0e95e30e576 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Exports/Units.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Exports/Units.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/Unit.h" diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/UsageService.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/UsageService.cpp index 1d75c6c6ba5049e6b7b89f909746a1b006002200..0d5354b8b2f8f30a5d9a401aba68ee20ce125c8a 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Exports/UsageService.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Exports/UsageService.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/UsageService.h" #include "MantidPythonInterface/core/Converters/PySequenceToVector.h" diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/V3D.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/V3D.cpp index 78353feb95c759f7991615f39884c4dac1cb1341..1a2b21fe5cf808e81fb868d344206865fc80f898 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Exports/V3D.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Exports/V3D.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/V3D.h" #include "MantidKernel/WarningSuppressions.h" diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/VMD.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/VMD.cpp index 72a31e4488d424c7c202d4ab54f5fa7522072d39..08f826f06ffb92e33d78cc7ebaa8674fb541367d 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Exports/VMD.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Exports/VMD.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/VMD.h" #include "MantidKernel/WarningSuppressions.h" diff --git a/Framework/PythonInterface/mantid/kernel/src/Exports/VisibleWhenProperty.cpp b/Framework/PythonInterface/mantid/kernel/src/Exports/VisibleWhenProperty.cpp index a72ed96f9e5649c68c6fe19b631c2829bd9ec7de..6d669e7c071a56a685ffe324345d7dd7476050ca 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Exports/VisibleWhenProperty.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Exports/VisibleWhenProperty.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/VisibleWhenProperty.h" #include <boost/python/class.hpp> diff --git a/Framework/PythonInterface/mantid/kernel/src/Registry/MappingTypeHandler.cpp b/Framework/PythonInterface/mantid/kernel/src/Registry/MappingTypeHandler.cpp index 1a8fcd763be501ac7c6bad8faeec3c131d73f9f8..b928379c08926d3abbf46002c870f89064ab4975 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Registry/MappingTypeHandler.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Registry/MappingTypeHandler.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidPythonInterface/kernel/Registry/MappingTypeHandler.h" #include "MantidPythonInterface/kernel/Registry/PropertyManagerFactory.h" diff --git a/Framework/PythonInterface/mantid/kernel/src/Registry/PropertyManagerFactory.cpp b/Framework/PythonInterface/mantid/kernel/src/Registry/PropertyManagerFactory.cpp index 27dada0491e173c09f8317fd8fa7f23adedc4930..8593b767b24eaec5c7c3761f8037f2d46b7456a7 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Registry/PropertyManagerFactory.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Registry/PropertyManagerFactory.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidPythonInterface/kernel/Registry/PropertyManagerFactory.h" #include "MantidKernel/PropertyManager.h" diff --git a/Framework/PythonInterface/mantid/kernel/src/Registry/PropertyWithValueFactory.cpp b/Framework/PythonInterface/mantid/kernel/src/Registry/PropertyWithValueFactory.cpp index 310b1cd12b5dc6de7292c50c9bdfbfc97a71de49..fa50a8a14f7f2cced9385426ca02e1001fbcc558 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Registry/PropertyWithValueFactory.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Registry/PropertyWithValueFactory.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //----------------------------------------------------------------------------- // Includes diff --git a/Framework/PythonInterface/mantid/kernel/src/Registry/SequenceTypeHandler.cpp b/Framework/PythonInterface/mantid/kernel/src/Registry/SequenceTypeHandler.cpp index 455fe0a541bbd0ec6352ae983bd59b635de13e0f..4502ae5e47586721984d488f7c04ba7252011dae 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Registry/SequenceTypeHandler.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Registry/SequenceTypeHandler.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //----------------------------------------------------------------------------- // Includes diff --git a/Framework/PythonInterface/mantid/kernel/src/Registry/TypeRegistry.cpp b/Framework/PythonInterface/mantid/kernel/src/Registry/TypeRegistry.cpp index 88f4737b6beeb16a2f432a169d1488ad917eb78a..c0332db959b58b04497d2f89353b58ec597a04fe 100644 --- a/Framework/PythonInterface/mantid/kernel/src/Registry/TypeRegistry.cpp +++ b/Framework/PythonInterface/mantid/kernel/src/Registry/TypeRegistry.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //----------------------------------------------------------------------------- // Includes @@ -37,8 +37,7 @@ TypeIDMap &typeRegistry() { //------------------------------------------------------------------------------------------- // Public methods //------------------------------------------------------------------------------------------- -/** - */ + void TypeRegistry::registerBuiltins() { // -- Register a handler for each basic type and vector of each basic type + // std::string -- diff --git a/Framework/PythonInterface/mantid/kernel/src/kernel.cpp.in b/Framework/PythonInterface/mantid/kernel/src/kernel.cpp.in index 23be3b48118a3015ed7752ff357389b7b486a90a..8237e4850be22aa3bf5809f00b5d89815212d11f 100644 --- a/Framework/PythonInterface/mantid/kernel/src/kernel.cpp.in +++ b/Framework/PythonInterface/mantid/kernel/src/kernel.cpp.in @@ -1,15 +1,15 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + -/*****************************************************************************************/ + /********** PLEASE NOTE! THIS FILE WAS AUTO-GENERATED FROM CMAKE. * ***********************/ /********** Source = kernel.cpp.in * *******************************************************/ -/*****************************************************************************************/ + #include <boost/python/def.hpp> #include <boost/python/docstring_options.hpp> #include <boost/python/module.hpp> diff --git a/Framework/PythonInterface/mantid/plots/__init__.py b/Framework/PythonInterface/mantid/plots/__init__.py index 95ee170792d22f000f0393b9ae220b92389f595d..587580b72012e24d942c9a392433d634fb7890cf 100644 --- a/Framework/PythonInterface/mantid/plots/__init__.py +++ b/Framework/PythonInterface/mantid/plots/__init__.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid package # diff --git a/Framework/PythonInterface/mantid/plots/_compatability.py b/Framework/PythonInterface/mantid/plots/_compatability.py index 0ada948cb7a09da48de8a64df793982ae181d394..fb1b13958c3920b23dd2bf874bd2ff9956f4f68d 100644 --- a/Framework/PythonInterface/mantid/plots/_compatability.py +++ b/Framework/PythonInterface/mantid/plots/_compatability.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid package # diff --git a/Framework/PythonInterface/mantid/plots/axesfunctions.py b/Framework/PythonInterface/mantid/plots/axesfunctions.py index 42e662fb314c2b5ac0b5c3b19ce8fa39fe29ca39..8fc4fdd66257c37c1c6d15b3e9efca0632e262a9 100644 --- a/Framework/PythonInterface/mantid/plots/axesfunctions.py +++ b/Framework/PythonInterface/mantid/plots/axesfunctions.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid package # diff --git a/Framework/PythonInterface/mantid/plots/axesfunctions3D.py b/Framework/PythonInterface/mantid/plots/axesfunctions3D.py index 84822b5dd530e0088d3d889b25a800eaa55df550..aff2d05efb079cbf52759a50751288bd7608ea14 100644 --- a/Framework/PythonInterface/mantid/plots/axesfunctions3D.py +++ b/Framework/PythonInterface/mantid/plots/axesfunctions3D.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid package # diff --git a/Framework/PythonInterface/mantid/plots/datafunctions.py b/Framework/PythonInterface/mantid/plots/datafunctions.py index c7d5228dbfc1617d9b7c969b368555544f865eb7..f86b46e53bd58b5f402b81860e4a79937f184a32 100644 --- a/Framework/PythonInterface/mantid/plots/datafunctions.py +++ b/Framework/PythonInterface/mantid/plots/datafunctions.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid package # diff --git a/Framework/PythonInterface/mantid/plots/legend.py b/Framework/PythonInterface/mantid/plots/legend.py index 088e17b883d30fae6eaf13e55630b9a64c3aeb53..af84c91242f1b2a37b6014c36032d43d0c3dd0c0 100644 --- a/Framework/PythonInterface/mantid/plots/legend.py +++ b/Framework/PythonInterface/mantid/plots/legend.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid package # diff --git a/Framework/PythonInterface/mantid/plots/mantidaxes.py b/Framework/PythonInterface/mantid/plots/mantidaxes.py index 0681624a0e119f09aa461c9aa114a1724353424c..8ad76112806bfcbfd13b60230126b159cc32a49f 100644 --- a/Framework/PythonInterface/mantid/plots/mantidaxes.py +++ b/Framework/PythonInterface/mantid/plots/mantidaxes.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid package from __future__ import absolute_import @@ -285,7 +285,7 @@ class MantidAxes(Axes): Remove the artists reference by this workspace (if any) and return True if the axes is then empty :param workspace: A Workspace object - :return: True if the axes is empty, false if artists remain or this workspace is not associated here + :return: True is an artist was removed False if one was not """ try: # pop to ensure we don't hold onto an artist reference @@ -296,7 +296,7 @@ class MantidAxes(Axes): for workspace_artist in artist_info: workspace_artist.remove(self) - return self.is_empty(self) + return True def remove_artists_if(self, unary_predicate): """ diff --git a/Framework/PythonInterface/mantid/plots/modest_image/__init__.py b/Framework/PythonInterface/mantid/plots/modest_image/__init__.py index 226e7f5f931c37cc94e698db8fcc2f7d4f979ad4..72d0089de518e01dab6f8a859053ac2132b09119 100644 --- a/Framework/PythonInterface/mantid/plots/modest_image/__init__.py +++ b/Framework/PythonInterface/mantid/plots/modest_image/__init__.py @@ -1 +1,7 @@ +# Mantid Repository : https://github.com/mantidproject/mantid +# +# Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS +# SPDX - License - Identifier: GPL - 3.0 + from .modest_image import ModestImage, imshow diff --git a/Framework/PythonInterface/mantid/plots/modest_image/modest_image.py b/Framework/PythonInterface/mantid/plots/modest_image/modest_image.py index 88631d6fbf890291b5a782fae08bda2923c0e227..098610c30dd0b3c958e0299535ad312e375b8760 100644 --- a/Framework/PythonInterface/mantid/plots/modest_image/modest_image.py +++ b/Framework/PythonInterface/mantid/plots/modest_image/modest_image.py @@ -1,3 +1,9 @@ +# Mantid Repository : https://github.com/mantidproject/mantid +# +# Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS +# SPDX - License - Identifier: GPL - 3.0 + # v0.2 obtained on March 12, 2019 """ Modification of Chris Beaumont's mpl-modest-image package to allow the use of diff --git a/Framework/PythonInterface/mantid/plots/plotfunctions.py b/Framework/PythonInterface/mantid/plots/plotfunctions.py index 7670d0eccc1cd8f7bbd571c65aaf5275b89b1d94..b69fd0eddb5ec7ad8a23704ad50542b9e302f959 100644 --- a/Framework/PythonInterface/mantid/plots/plotfunctions.py +++ b/Framework/PythonInterface/mantid/plots/plotfunctions.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid package from __future__ import absolute_import diff --git a/Framework/PythonInterface/mantid/plots/scales.py b/Framework/PythonInterface/mantid/plots/scales.py index 2c7167d7dcf0345bed11b5ed9c37207f5d641ebf..d048f2ccbab4567f2380596d399d6c22b73be74d 100644 --- a/Framework/PythonInterface/mantid/plots/scales.py +++ b/Framework/PythonInterface/mantid/plots/scales.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid package """ diff --git a/Framework/PythonInterface/mantid/plots/utility.py b/Framework/PythonInterface/mantid/plots/utility.py index e8e7909e771475f2b63a1af6999fb7b5c999eddf..a3a4b2f6a66e90033aeb5e3c0f28c2bafa3e5438 100644 --- a/Framework/PythonInterface/mantid/plots/utility.py +++ b/Framework/PythonInterface/mantid/plots/utility.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid package from __future__ import absolute_import diff --git a/Framework/PythonInterface/mantid/py3compat/__init__.py b/Framework/PythonInterface/mantid/py3compat/__init__.py index 3ce30e0c26e3e92180851728595099ed1aeab1d9..d27238a25eca6012f5bf9de800b8a75c2971276c 100644 --- a/Framework/PythonInterface/mantid/py3compat/__init__.py +++ b/Framework/PythonInterface/mantid/py3compat/__init__.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/Framework/PythonInterface/mantid/py3compat/mock.py b/Framework/PythonInterface/mantid/py3compat/mock.py index bdbef6fa6f3698ce0e6c63d6eea92cd6514ba9f0..16a2c781934a1cb35f6ff1d51ff559e872821835 100644 --- a/Framework/PythonInterface/mantid/py3compat/mock.py +++ b/Framework/PythonInterface/mantid/py3compat/mock.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import absolute_import diff --git a/Framework/PythonInterface/mantid/simpleapi.py b/Framework/PythonInterface/mantid/simpleapi.py index ebba8b18b52bd8ac7f9beabbf4f9fd5f2729be0d..1f33127f28f137289ea9a68320b809291f7dd80d 100644 --- a/Framework/PythonInterface/mantid/simpleapi.py +++ b/Framework/PythonInterface/mantid/simpleapi.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + """ This module defines a function-style API for running Mantid diff --git a/Framework/PythonInterface/mantid/utils.py b/Framework/PythonInterface/mantid/utils.py index 01320c1a89305f86183905ae51b45101740fd122..18394d05873ae28f0fb59c0f1fc755e145f0400d 100644 --- a/Framework/PythonInterface/mantid/utils.py +++ b/Framework/PythonInterface/mantid/utils.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from contextlib import contextmanager from importlib import import_module diff --git a/Framework/PythonInterface/plugins/__init__.py b/Framework/PythonInterface/plugins/__init__.py index d43ca442a3b069de62b966ee9f1e47beadcb570c..09a03b9527df10149b95338dd0eb6151e36dc546 100644 --- a/Framework/PythonInterface/plugins/__init__.py +++ b/Framework/PythonInterface/plugins/__init__.py @@ -1,6 +1,6 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + diff --git a/Framework/PythonInterface/plugins/algorithms/Abins.py b/Framework/PythonInterface/plugins/algorithms/Abins.py index 65d0df999e63512f7c48ddef2d321d8e861a84c4..1fe77c6498b0772b5b25053660910f364e22133c 100644 --- a/Framework/PythonInterface/plugins/algorithms/Abins.py +++ b/Framework/PythonInterface/plugins/algorithms/Abins.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/AlignAndFocusPowderFromFiles.py b/Framework/PythonInterface/plugins/algorithms/AlignAndFocusPowderFromFiles.py index dcc4539226e660f02c84cefb9567d98a6d4c98cf..3adcc45b3829a2beac89f80bf345746698f0ed1c 100644 --- a/Framework/PythonInterface/plugins/algorithms/AlignAndFocusPowderFromFiles.py +++ b/Framework/PythonInterface/plugins/algorithms/AlignAndFocusPowderFromFiles.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/AlignComponents.py b/Framework/PythonInterface/plugins/algorithms/AlignComponents.py index 20b9a26bd1b845ea4d061869642b051c9e3df365..97cba2c7b03aaaab29713d0fe2430fccad25ddcb 100644 --- a/Framework/PythonInterface/plugins/algorithms/AlignComponents.py +++ b/Framework/PythonInterface/plugins/algorithms/AlignComponents.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init, no-name-in-module from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/AngularAutoCorrelationsSingleAxis.py b/Framework/PythonInterface/plugins/algorithms/AngularAutoCorrelationsSingleAxis.py index 3025cf5ab089434de29bbae12c07e146794574ee..b2f6708dbab9cb37d620333cafdee006ddcc62e5 100644 --- a/Framework/PythonInterface/plugins/algorithms/AngularAutoCorrelationsSingleAxis.py +++ b/Framework/PythonInterface/plugins/algorithms/AngularAutoCorrelationsSingleAxis.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=too-many-branches,too-many-locals, invalid-name from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/AngularAutoCorrelationsTwoAxes.py b/Framework/PythonInterface/plugins/algorithms/AngularAutoCorrelationsTwoAxes.py index 227f94a20cdc90b6d772c9c53739da295ccd699d..5b2f0bce7256d0b60137b3b55a18664aba943dc5 100644 --- a/Framework/PythonInterface/plugins/algorithms/AngularAutoCorrelationsTwoAxes.py +++ b/Framework/PythonInterface/plugins/algorithms/AngularAutoCorrelationsTwoAxes.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=too-many-branches,too-many-locals, invalid-name from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/ApplyDetectorScanEffCorr.py b/Framework/PythonInterface/plugins/algorithms/ApplyDetectorScanEffCorr.py index 3d00d79dcd5183d38de766d532c053cb09b107bb..faeeb73ad49908205cbc42aeb89b18beea0d86f0 100644 --- a/Framework/PythonInterface/plugins/algorithms/ApplyDetectorScanEffCorr.py +++ b/Framework/PythonInterface/plugins/algorithms/ApplyDetectorScanEffCorr.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import print_function diff --git a/Framework/PythonInterface/plugins/algorithms/ApplyNegMuCorrection.py b/Framework/PythonInterface/plugins/algorithms/ApplyNegMuCorrection.py index 67c939b9a1bc1eaa46804fe03c69c87a9246d81f..fc3ab839adf2fc4fd46910949c3b802474024bf8 100644 --- a/Framework/PythonInterface/plugins/algorithms/ApplyNegMuCorrection.py +++ b/Framework/PythonInterface/plugins/algorithms/ApplyNegMuCorrection.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/BASISCrystalDiffraction.py b/Framework/PythonInterface/plugins/algorithms/BASISCrystalDiffraction.py index 0f379d22d0a216047fdc6a3f2d6950f606697f05..27c5b797860ed8a173eb007eaae8678cda3e42ab 100644 --- a/Framework/PythonInterface/plugins/algorithms/BASISCrystalDiffraction.py +++ b/Framework/PythonInterface/plugins/algorithms/BASISCrystalDiffraction.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=too-many-branches diff --git a/Framework/PythonInterface/plugins/algorithms/BASISDiffraction.py b/Framework/PythonInterface/plugins/algorithms/BASISDiffraction.py index 0085a08e5f84b629603c99dfdebf742869d20e16..0bd137efa0263c1c20fa055ba864725b135535e5 100644 --- a/Framework/PythonInterface/plugins/algorithms/BASISDiffraction.py +++ b/Framework/PythonInterface/plugins/algorithms/BASISDiffraction.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=too-many-branches diff --git a/Framework/PythonInterface/plugins/algorithms/BASISPowderDiffraction.py b/Framework/PythonInterface/plugins/algorithms/BASISPowderDiffraction.py index aea80b0f230145d8828e6d4913eb870a1597c075..be7b818048810d599dda49bbf3e03d1ce41c225c 100644 --- a/Framework/PythonInterface/plugins/algorithms/BASISPowderDiffraction.py +++ b/Framework/PythonInterface/plugins/algorithms/BASISPowderDiffraction.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/BASISReduction.py b/Framework/PythonInterface/plugins/algorithms/BASISReduction.py index d483e7b30851343db09000085d66ac020d32f9eb..f1ecf432c12c8d7010e74026aeac720404967f86 100644 --- a/Framework/PythonInterface/plugins/algorithms/BASISReduction.py +++ b/Framework/PythonInterface/plugins/algorithms/BASISReduction.py @@ -1,10 +1,10 @@ # Mantid Repository : https://github.com/mantidproject/mantid -# Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + +# Mantid Repository : https://github.com/mantidproject/mantid # pylint: disable=no-init from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/BilbySANSDataProcessor.py b/Framework/PythonInterface/plugins/algorithms/BilbySANSDataProcessor.py index 33b5e123ccdf7dd49d0f2dab64098006050cf64f..50f8bc9aa96dff22d23b4974f74b9e89eeea412c 100644 --- a/Framework/PythonInterface/plugins/algorithms/BilbySANSDataProcessor.py +++ b/Framework/PythonInterface/plugins/algorithms/BilbySANSDataProcessor.py @@ -1,10 +1,9 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + - import numpy as np from mantid.api import MatrixWorkspaceProperty, PropertyMode, WorkspaceUnitValidator from mantid.api import DataProcessorAlgorithm, AlgorithmFactory diff --git a/Framework/PythonInterface/plugins/algorithms/BinWidthAtX.py b/Framework/PythonInterface/plugins/algorithms/BinWidthAtX.py index 1a5970c6fa3810f42ef5909cb4257bfb3db7d61b..94530f3de2b9e8ecc8e6e5000c94787ecf2b8dbf 100644 --- a/Framework/PythonInterface/plugins/algorithms/BinWidthAtX.py +++ b/Framework/PythonInterface/plugins/algorithms/BinWidthAtX.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/CalculateEfficiencyCorrection.py b/Framework/PythonInterface/plugins/algorithms/CalculateEfficiencyCorrection.py index 621e71935d55b67e682c1476312e5e2557aa081f..acfc065d3e2a4a63681eaf2bde8b412782583eaf 100644 --- a/Framework/PythonInterface/plugins/algorithms/CalculateEfficiencyCorrection.py +++ b/Framework/PythonInterface/plugins/algorithms/CalculateEfficiencyCorrection.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import absolute_import, division, print_function import numpy as np diff --git a/Framework/PythonInterface/plugins/algorithms/CalculateFlux.py b/Framework/PythonInterface/plugins/algorithms/CalculateFlux.py index a4839b671d2d48863f8136d135cdfc8f5ba7dcf5..4e44fe523e82b84b45f7b8f884a24bb26ddd8e3f 100644 --- a/Framework/PythonInterface/plugins/algorithms/CalculateFlux.py +++ b/Framework/PythonInterface/plugins/algorithms/CalculateFlux.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) from mantid.api import PythonAlgorithm, MatrixWorkspaceProperty, WorkspaceUnitValidator, HistogramValidator, InstrumentValidator diff --git a/Framework/PythonInterface/plugins/algorithms/CalculateSampleTransmission.py b/Framework/PythonInterface/plugins/algorithms/CalculateSampleTransmission.py index d461bbe32e81fd6bee7dc3504505b19ecde930a7..2c54044b2893e46b2b092230f6cc6b7088e29844 100644 --- a/Framework/PythonInterface/plugins/algorithms/CalculateSampleTransmission.py +++ b/Framework/PythonInterface/plugins/algorithms/CalculateSampleTransmission.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,invalid-name from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/CalibrateRectangularDetectors.py b/Framework/PythonInterface/plugins/algorithms/CalibrateRectangularDetectors.py index 2e9d79739805c17a097392a994e2dfe2a19e5c82..549a16febb1780a67a5e579787d32a622185bdf7 100644 --- a/Framework/PythonInterface/plugins/algorithms/CalibrateRectangularDetectors.py +++ b/Framework/PythonInterface/plugins/algorithms/CalibrateRectangularDetectors.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,invalid-name from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/CheckForSampleLogs.py b/Framework/PythonInterface/plugins/algorithms/CheckForSampleLogs.py index 3d06f8ee9048086613725cdbd5c91afcd5e21a1e..7443fc437d4cc326bbe14aaa528233115dec9fe9 100644 --- a/Framework/PythonInterface/plugins/algorithms/CheckForSampleLogs.py +++ b/Framework/PythonInterface/plugins/algorithms/CheckForSampleLogs.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=invalid-name, no-init from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/CleanFileCache.py b/Framework/PythonInterface/plugins/algorithms/CleanFileCache.py index 0e5c0019c1bccc19a4a24746e0cf272b69bac0c3..826c8752c40ae08a2061f9bae2595be81ac75a40 100644 --- a/Framework/PythonInterface/plugins/algorithms/CleanFileCache.py +++ b/Framework/PythonInterface/plugins/algorithms/CleanFileCache.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,invalid-name,bare-except,too-many-arguments,multiple-statements from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/CollectHB3AExperimentInfo.py b/Framework/PythonInterface/plugins/algorithms/CollectHB3AExperimentInfo.py index 2e7af81146817c111aae3541c8460379111136e2..f615a6faf2f3053b68894b44afb2a4ce5d85085b 100644 --- a/Framework/PythonInterface/plugins/algorithms/CollectHB3AExperimentInfo.py +++ b/Framework/PythonInterface/plugins/algorithms/CollectHB3AExperimentInfo.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,invalid-name,too-many-instance-attributes from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/CompareSampleLogs.py b/Framework/PythonInterface/plugins/algorithms/CompareSampleLogs.py index 1cb7c10154cfbe2672ab27f249261abfb177b079..a6c090705b7ec22257d2beb9a8ddd72483dcffa6 100644 --- a/Framework/PythonInterface/plugins/algorithms/CompareSampleLogs.py +++ b/Framework/PythonInterface/plugins/algorithms/CompareSampleLogs.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/ComputeCalibrationCoefVan.py b/Framework/PythonInterface/plugins/algorithms/ComputeCalibrationCoefVan.py index e9c965fb58c5d33023ba7323e232c26eb170ae0c..3687c3c78d41d3c34f31b65a0baee46975b4ea8b 100644 --- a/Framework/PythonInterface/plugins/algorithms/ComputeCalibrationCoefVan.py +++ b/Framework/PythonInterface/plugins/algorithms/ComputeCalibrationCoefVan.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/ComputeIncoherentDOS.py b/Framework/PythonInterface/plugins/algorithms/ComputeIncoherentDOS.py index c6e195f5d452e47465c5000eedc427c29782a81f..85414aade70319356cc825da0bda55848c5f2704 100644 --- a/Framework/PythonInterface/plugins/algorithms/ComputeIncoherentDOS.py +++ b/Framework/PythonInterface/plugins/algorithms/ComputeIncoherentDOS.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable = no-init, invalid-name, line-too-long, eval-used, unused-argument, too-many-locals, too-many-branches, too-many-statements from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/ConjoinFiles.py b/Framework/PythonInterface/plugins/algorithms/ConjoinFiles.py index 938c43b0ffc384b954d0a46ebc7ba419f4552bde..72e44169cb9168eaaa1f61f2764fbf4f9e65f166 100644 --- a/Framework/PythonInterface/plugins/algorithms/ConjoinFiles.py +++ b/Framework/PythonInterface/plugins/algorithms/ConjoinFiles.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,invalid-name from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/ConjoinSpectra.py b/Framework/PythonInterface/plugins/algorithms/ConjoinSpectra.py index db5c0e48c3791a58267cacc332c1d823e2d75cc1..d81bc78a591d3ebdad62e1fea088876dc77103cb 100644 --- a/Framework/PythonInterface/plugins/algorithms/ConjoinSpectra.py +++ b/Framework/PythonInterface/plugins/algorithms/ConjoinSpectra.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,invalid-name from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/ConvertSnsRoiFileToMask.py b/Framework/PythonInterface/plugins/algorithms/ConvertSnsRoiFileToMask.py index 8765458b68f9694dfdf5b3f066a101abd9c1f1f8..09721f7e6e355ed2a6e8ae7555154402eba85a08 100644 --- a/Framework/PythonInterface/plugins/algorithms/ConvertSnsRoiFileToMask.py +++ b/Framework/PythonInterface/plugins/algorithms/ConvertSnsRoiFileToMask.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,invalid-name from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/ConvertWANDSCDtoQ.py b/Framework/PythonInterface/plugins/algorithms/ConvertWANDSCDtoQ.py index 9e5bfc368774507baa6ed6d0330c1ebc82f27c57..f334589ed49b30a0f725bb4e1b83ad8fc4165be5 100644 --- a/Framework/PythonInterface/plugins/algorithms/ConvertWANDSCDtoQ.py +++ b/Framework/PythonInterface/plugins/algorithms/ConvertWANDSCDtoQ.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) from mantid.api import (PythonAlgorithm, AlgorithmFactory, diff --git a/Framework/PythonInterface/plugins/algorithms/CorrectLogTimes.py b/Framework/PythonInterface/plugins/algorithms/CorrectLogTimes.py index ad3db1b2c416eb2d76cf1ae3b11f407cf1b10902..2c43988cb61a4c4dce329de162ab87949be48b3d 100644 --- a/Framework/PythonInterface/plugins/algorithms/CorrectLogTimes.py +++ b/Framework/PythonInterface/plugins/algorithms/CorrectLogTimes.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=invalid-name,no-init from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/CorrectTOF.py b/Framework/PythonInterface/plugins/algorithms/CorrectTOF.py index 4a3d348371e89e0e23b20e5e5335cdb769e959ee..d100f99a0ab78ed902b7a91056c48dc081e6565b 100644 --- a/Framework/PythonInterface/plugins/algorithms/CorrectTOF.py +++ b/Framework/PythonInterface/plugins/algorithms/CorrectTOF.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/CreateCacheFilename.py b/Framework/PythonInterface/plugins/algorithms/CreateCacheFilename.py index 04b5d7a1469662265ace1c7f17a8830ef30a4688..631a90978e006b225f86beeffe3a766a99086474 100644 --- a/Framework/PythonInterface/plugins/algorithms/CreateCacheFilename.py +++ b/Framework/PythonInterface/plugins/algorithms/CreateCacheFilename.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,invalid-name,bare-except,too-many-arguments from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/CreateEmptyTableWorkspace.py b/Framework/PythonInterface/plugins/algorithms/CreateEmptyTableWorkspace.py index 003f11d3b63bae0b981d59bfe994b0b8b542d29d..4c7ed28904bd6c282109fe51e81faff87aee007d 100644 --- a/Framework/PythonInterface/plugins/algorithms/CreateEmptyTableWorkspace.py +++ b/Framework/PythonInterface/plugins/algorithms/CreateEmptyTableWorkspace.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/CreateLeBailFitInput.py b/Framework/PythonInterface/plugins/algorithms/CreateLeBailFitInput.py index 43388756b3856855d14043c3debaf97f9ce44692..178268813bcbb49d6e8ebc695dc4ea913ac62cb7 100644 --- a/Framework/PythonInterface/plugins/algorithms/CreateLeBailFitInput.py +++ b/Framework/PythonInterface/plugins/algorithms/CreateLeBailFitInput.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,invalid-name from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/CropWorkspaceForMDNorm.py b/Framework/PythonInterface/plugins/algorithms/CropWorkspaceForMDNorm.py index 089bcc899207e50f5d1215f383a5b7c6edc9ce65..e3e7986d3a8f32f3d0d0012321c0ce324c021f4a 100644 --- a/Framework/PythonInterface/plugins/algorithms/CropWorkspaceForMDNorm.py +++ b/Framework/PythonInterface/plugins/algorithms/CropWorkspaceForMDNorm.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,invalid-name from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/CropWorkspaceRagged.py b/Framework/PythonInterface/plugins/algorithms/CropWorkspaceRagged.py index 41a09f1b183c7aee6ebfda14df31dbc946b03053..616ffd680b5fa5df0c24db26fb50b354ee3b8c41 100644 --- a/Framework/PythonInterface/plugins/algorithms/CropWorkspaceRagged.py +++ b/Framework/PythonInterface/plugins/algorithms/CropWorkspaceRagged.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,invalid-name from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/CylinderPaalmanPingsCorrection2.py b/Framework/PythonInterface/plugins/algorithms/CylinderPaalmanPingsCorrection2.py index 5a9a27646600721dfb7ad46732d7b5166a9c793c..f920a78d7a530fbccb2063ae003773cbc628ece2 100644 --- a/Framework/PythonInterface/plugins/algorithms/CylinderPaalmanPingsCorrection2.py +++ b/Framework/PythonInterface/plugins/algorithms/CylinderPaalmanPingsCorrection2.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,too-many-locals,too-many-instance-attributes,too-many-arguments,invalid-name from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/DNSComputeDetEffCorrCoefs.py b/Framework/PythonInterface/plugins/algorithms/DNSComputeDetEffCorrCoefs.py index 4f8d7ff7c329d4655f9fc0edd897ebc2b5bb1f13..337de47751a3a495f97fe89e7d16a09f1c2bd4dd 100644 --- a/Framework/PythonInterface/plugins/algorithms/DNSComputeDetEffCorrCoefs.py +++ b/Framework/PythonInterface/plugins/algorithms/DNSComputeDetEffCorrCoefs.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) import mantid.simpleapi as api diff --git a/Framework/PythonInterface/plugins/algorithms/DNSFlippingRatioCorr.py b/Framework/PythonInterface/plugins/algorithms/DNSFlippingRatioCorr.py index e742157dd37f05b5f63bc082db14146f5339c1d9..f1c3ec437cfe5375e202d5b39ee1c61f2cab5be5 100644 --- a/Framework/PythonInterface/plugins/algorithms/DNSFlippingRatioCorr.py +++ b/Framework/PythonInterface/plugins/algorithms/DNSFlippingRatioCorr.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=too-many-locals from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/DNSMergeRuns.py b/Framework/PythonInterface/plugins/algorithms/DNSMergeRuns.py index 25f65b7ea2e7f11e5d1e0de020285a74ee107b65..1f8ac0b97b4e11e4a4fc4cda832524904d752ed7 100644 --- a/Framework/PythonInterface/plugins/algorithms/DNSMergeRuns.py +++ b/Framework/PythonInterface/plugins/algorithms/DNSMergeRuns.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) import mantid.simpleapi as api diff --git a/Framework/PythonInterface/plugins/algorithms/DPDFreduction.py b/Framework/PythonInterface/plugins/algorithms/DPDFreduction.py index 034bab55499815a3e59b6559d11be4c0f61cb21c..ece8f7bcf7d973a9bda1a7216f5cfaeb0629d715 100644 --- a/Framework/PythonInterface/plugins/algorithms/DPDFreduction.py +++ b/Framework/PythonInterface/plugins/algorithms/DPDFreduction.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,invalid-name from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/DSFinterp.py b/Framework/PythonInterface/plugins/algorithms/DSFinterp.py index d92ad2a443c6f01822af85da5584d95e46a6c696..944a78ff8d92a490c6e1a0c43af842ab60a09130 100644 --- a/Framework/PythonInterface/plugins/algorithms/DSFinterp.py +++ b/Framework/PythonInterface/plugins/algorithms/DSFinterp.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,invalid-name from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/DakotaChiSquared.py b/Framework/PythonInterface/plugins/algorithms/DakotaChiSquared.py index 9edad7f123654f1cf0e14be092d4a90ac53b28b1..eaafa1e617b001b30b23407413cdd51b1d33e5d6 100644 --- a/Framework/PythonInterface/plugins/algorithms/DakotaChiSquared.py +++ b/Framework/PythonInterface/plugins/algorithms/DakotaChiSquared.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,invalid-name from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/DeltaPDF3D.py b/Framework/PythonInterface/plugins/algorithms/DeltaPDF3D.py index 114487f4900c8d4ddfe52b0cb4fdf6094f263a3e..1de36ac736091d818b47ed0fea9c006644551839 100644 --- a/Framework/PythonInterface/plugins/algorithms/DeltaPDF3D.py +++ b/Framework/PythonInterface/plugins/algorithms/DeltaPDF3D.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) from mantid.api import PythonAlgorithm, AlgorithmFactory, IMDHistoWorkspaceProperty, PropertyMode, WorkspaceProperty, Progress diff --git a/Framework/PythonInterface/plugins/algorithms/EnggCalibrate.py b/Framework/PythonInterface/plugins/algorithms/EnggCalibrate.py index 44cbf50b5c0d00184639aa96a1d3182db14eb945..c9c919f6f4d0f7cabf807a57263577ba9017a822 100644 --- a/Framework/PythonInterface/plugins/algorithms/EnggCalibrate.py +++ b/Framework/PythonInterface/plugins/algorithms/EnggCalibrate.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) from mantid.kernel import * diff --git a/Framework/PythonInterface/plugins/algorithms/EnggCalibrateFull.py b/Framework/PythonInterface/plugins/algorithms/EnggCalibrateFull.py index a432153866935124ba531f3d5ee61897b9c932e5..71d4e3d48fdd6e97442b6610e1e6282738da2e77 100644 --- a/Framework/PythonInterface/plugins/algorithms/EnggCalibrateFull.py +++ b/Framework/PythonInterface/plugins/algorithms/EnggCalibrateFull.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) import math diff --git a/Framework/PythonInterface/plugins/algorithms/EnggFitPeaks.py b/Framework/PythonInterface/plugins/algorithms/EnggFitPeaks.py index 8056e75760fa5dac2b00f44169e120dd152323e6..badf5e32e36d2916847942f0a96060457d5b2a42 100644 --- a/Framework/PythonInterface/plugins/algorithms/EnggFitPeaks.py +++ b/Framework/PythonInterface/plugins/algorithms/EnggFitPeaks.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) import math diff --git a/Framework/PythonInterface/plugins/algorithms/EnggFitTOFFromPeaks.py b/Framework/PythonInterface/plugins/algorithms/EnggFitTOFFromPeaks.py index 2b87d89056a408738be6e078b4333c6fdee548ac..f97556daa117f029ab9b0e51568928d71061185d 100644 --- a/Framework/PythonInterface/plugins/algorithms/EnggFitTOFFromPeaks.py +++ b/Framework/PythonInterface/plugins/algorithms/EnggFitTOFFromPeaks.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) from mantid.kernel import * diff --git a/Framework/PythonInterface/plugins/algorithms/EnggFocus.py b/Framework/PythonInterface/plugins/algorithms/EnggFocus.py index 585864f2ee27bd6e6ba3d93f266e927de911af2c..56ad9aadbf8859931260eb417d9a2aecd1c5f20c 100644 --- a/Framework/PythonInterface/plugins/algorithms/EnggFocus.py +++ b/Framework/PythonInterface/plugins/algorithms/EnggFocus.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) from mantid.kernel import * diff --git a/Framework/PythonInterface/plugins/algorithms/EnggSaveGSASIIFitResultsToHDF5.py b/Framework/PythonInterface/plugins/algorithms/EnggSaveGSASIIFitResultsToHDF5.py index 432e7ebbad4986e35d1416f13e602d9a8f6c5d72..3e64ee1c7a689dc9ad8f1932092b721d08a17aaf 100644 --- a/Framework/PythonInterface/plugins/algorithms/EnggSaveGSASIIFitResultsToHDF5.py +++ b/Framework/PythonInterface/plugins/algorithms/EnggSaveGSASIIFitResultsToHDF5.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/EnggSaveSinglePeakFitResultsToHDF5.py b/Framework/PythonInterface/plugins/algorithms/EnggSaveSinglePeakFitResultsToHDF5.py index 5969da28c0de53c518fb2e08db70365b2f7ab79e..502770be183298d432ca969ee94e511ce74b3b3b 100644 --- a/Framework/PythonInterface/plugins/algorithms/EnggSaveSinglePeakFitResultsToHDF5.py +++ b/Framework/PythonInterface/plugins/algorithms/EnggSaveSinglePeakFitResultsToHDF5.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/EnggVanadiumCorrections.py b/Framework/PythonInterface/plugins/algorithms/EnggVanadiumCorrections.py index 3af6056b1bf53494522c5f5498682a2ed58e4035..34bc610f6b169ca9a280888a94fd768f326b0c41 100644 --- a/Framework/PythonInterface/plugins/algorithms/EnggVanadiumCorrections.py +++ b/Framework/PythonInterface/plugins/algorithms/EnggVanadiumCorrections.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) from mantid.kernel import * diff --git a/Framework/PythonInterface/plugins/algorithms/ExaminePowderDiffProfile.py b/Framework/PythonInterface/plugins/algorithms/ExaminePowderDiffProfile.py index 335a78b010107c96a2fe0c1d6e19dfe665cbd9cb..9e997b7a6e59ccdf573b253adf55493686727b4d 100644 --- a/Framework/PythonInterface/plugins/algorithms/ExaminePowderDiffProfile.py +++ b/Framework/PythonInterface/plugins/algorithms/ExaminePowderDiffProfile.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init, too-many-instance-attributes from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/Examples/ExampleSaveAscii.py b/Framework/PythonInterface/plugins/algorithms/Examples/ExampleSaveAscii.py index 61032399c5fa82e6d81b85e7c69e5ab2743c6857..7ea23478e5773e7c05cf7645b930f7a265762c6e 100644 --- a/Framework/PythonInterface/plugins/algorithms/Examples/ExampleSaveAscii.py +++ b/Framework/PythonInterface/plugins/algorithms/Examples/ExampleSaveAscii.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init """ diff --git a/Framework/PythonInterface/plugins/algorithms/Examples/Squares.py b/Framework/PythonInterface/plugins/algorithms/Examples/Squares.py index 33a78fab747ca0a658aa7ccdba4725c8f2d25074..2ad3c4b09084c40eb3f13c665c49f20c1b991205 100644 --- a/Framework/PythonInterface/plugins/algorithms/Examples/Squares.py +++ b/Framework/PythonInterface/plugins/algorithms/Examples/Squares.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init # This __future__ import is for Python 2/3 compatibility diff --git a/Framework/PythonInterface/plugins/algorithms/ExportExperimentLog.py b/Framework/PythonInterface/plugins/algorithms/ExportExperimentLog.py index ea906bfe8c23fbeb5857b9c23202bcfc310821d6..1ce6a2fb474816d182c45a60f7df1e1aa3cea5ee 100644 --- a/Framework/PythonInterface/plugins/algorithms/ExportExperimentLog.py +++ b/Framework/PythonInterface/plugins/algorithms/ExportExperimentLog.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,invalid-name from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/ExportGeometry.py b/Framework/PythonInterface/plugins/algorithms/ExportGeometry.py index 4199c5bdf622db90e012d1b43c2a310c279bd19c..bd90b173e7d9c5effcf898c0c943ed388da8ef1e 100644 --- a/Framework/PythonInterface/plugins/algorithms/ExportGeometry.py +++ b/Framework/PythonInterface/plugins/algorithms/ExportGeometry.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/ExportSampleLogsToCSVFile.py b/Framework/PythonInterface/plugins/algorithms/ExportSampleLogsToCSVFile.py index 0af8e361e5e2d3fa4b0762ff7f781c045977bd05..050bce2d6fc059ce1009b0388b508867b3530b5d 100644 --- a/Framework/PythonInterface/plugins/algorithms/ExportSampleLogsToCSVFile.py +++ b/Framework/PythonInterface/plugins/algorithms/ExportSampleLogsToCSVFile.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,invalid-name,too-many-instance-attributes from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/ExportSampleLogsToHDF5.py b/Framework/PythonInterface/plugins/algorithms/ExportSampleLogsToHDF5.py index 002c1733d053f1cab79f039e8054bf75b2c628fc..990ef2361258da2e00ee8802c82bdb52422be32b 100644 --- a/Framework/PythonInterface/plugins/algorithms/ExportSampleLogsToHDF5.py +++ b/Framework/PythonInterface/plugins/algorithms/ExportSampleLogsToHDF5.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) from mantid.api import * diff --git a/Framework/PythonInterface/plugins/algorithms/ExportSpectraMask.py b/Framework/PythonInterface/plugins/algorithms/ExportSpectraMask.py index 0d7e7d6d80bcdde1df37d5475de7340e41c7fe8e..f3e5387b001f9c56a0796d65800804042e4d41e5 100644 --- a/Framework/PythonInterface/plugins/algorithms/ExportSpectraMask.py +++ b/Framework/PythonInterface/plugins/algorithms/ExportSpectraMask.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=invalid-name, no-init from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/ExtractMonitors.py b/Framework/PythonInterface/plugins/algorithms/ExtractMonitors.py index 70d8b03eff9091203aea559b29a05d7ceda0f930..c9b3e9a53d2cdcdf075b16f317def83d1ce09dd2 100644 --- a/Framework/PythonInterface/plugins/algorithms/ExtractMonitors.py +++ b/Framework/PythonInterface/plugins/algorithms/ExtractMonitors.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) from mantid.simpleapi import * diff --git a/Framework/PythonInterface/plugins/algorithms/FilterLogByTime.py b/Framework/PythonInterface/plugins/algorithms/FilterLogByTime.py index dc0c4a3fa268b50970548c04bd558cea7537f850..ea0ec4d17c83d35ef0e85566ce0cc9cfdccb98ae 100644 --- a/Framework/PythonInterface/plugins/algorithms/FilterLogByTime.py +++ b/Framework/PythonInterface/plugins/algorithms/FilterLogByTime.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,invalid-name from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/FindSatellitePeaks.py b/Framework/PythonInterface/plugins/algorithms/FindSatellitePeaks.py index 310f1d5e07ccd9a620e5b1ed1990a4204c8f98f5..bb54e4b4d46bcaa8df8e52aa639dd5c904bdbf11 100644 --- a/Framework/PythonInterface/plugins/algorithms/FindSatellitePeaks.py +++ b/Framework/PythonInterface/plugins/algorithms/FindSatellitePeaks.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from mantid.kernel import * from mantid.dataobjects import PeaksWorkspaceProperty diff --git a/Framework/PythonInterface/plugins/algorithms/FitGaussian.py b/Framework/PythonInterface/plugins/algorithms/FitGaussian.py index ac16652a2da1c7bdb13a2328ad06ee8fd9f73856..ef6ce8ccbc89409cd9a4197d4afef6c5d7be4c93 100644 --- a/Framework/PythonInterface/plugins/algorithms/FitGaussian.py +++ b/Framework/PythonInterface/plugins/algorithms/FitGaussian.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) from mantid.api import PythonAlgorithm, AlgorithmFactory, MatrixWorkspaceProperty diff --git a/Framework/PythonInterface/plugins/algorithms/FitIncidentSpectrum.py b/Framework/PythonInterface/plugins/algorithms/FitIncidentSpectrum.py index 996cca6d3ed86785467916aca25555a79eb9dc2b..938a60db1099154619c9990b9d4cf89432177fa7 100644 --- a/Framework/PythonInterface/plugins/algorithms/FitIncidentSpectrum.py +++ b/Framework/PythonInterface/plugins/algorithms/FitIncidentSpectrum.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import absolute_import, division, print_function from copy import copy diff --git a/Framework/PythonInterface/plugins/algorithms/GSASIIRefineFitPeaks.py b/Framework/PythonInterface/plugins/algorithms/GSASIIRefineFitPeaks.py index 7b8d4b5c43942f265135d790d3f1d6acc00cbbfe..001b551274c6820a831ad5f03956040dc19ed99c 100644 --- a/Framework/PythonInterface/plugins/algorithms/GSASIIRefineFitPeaks.py +++ b/Framework/PythonInterface/plugins/algorithms/GSASIIRefineFitPeaks.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) from contextlib import contextmanager diff --git a/Framework/PythonInterface/plugins/algorithms/GenerateGroupingSNSInelastic.py b/Framework/PythonInterface/plugins/algorithms/GenerateGroupingSNSInelastic.py index cf9a26e0dd4e018a0afc5a57c26fc6aef617ecca..8748d4b7c12ab09ef66d774be28b563ca2b42512 100644 --- a/Framework/PythonInterface/plugins/algorithms/GenerateGroupingSNSInelastic.py +++ b/Framework/PythonInterface/plugins/algorithms/GenerateGroupingSNSInelastic.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,invalid-name from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/GetEiT0atSNS.py b/Framework/PythonInterface/plugins/algorithms/GetEiT0atSNS.py index 6a4a7290e274650123886b7cc3b98833828dd9b4..48246f1a5e7d0eed32244905f3435b191540bc19 100644 --- a/Framework/PythonInterface/plugins/algorithms/GetEiT0atSNS.py +++ b/Framework/PythonInterface/plugins/algorithms/GetEiT0atSNS.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,invalid-name from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/GetIPTS.py b/Framework/PythonInterface/plugins/algorithms/GetIPTS.py index 34b7268d314b1f1385b0157e8e3270f320d5d310..89d49af1c7cccc22271f188402acc20e28e3ccab 100644 --- a/Framework/PythonInterface/plugins/algorithms/GetIPTS.py +++ b/Framework/PythonInterface/plugins/algorithms/GetIPTS.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) from mantid.api import AlgorithmFactory, FileFinder, PythonAlgorithm diff --git a/Framework/PythonInterface/plugins/algorithms/GetLiveInstrumentValue.py b/Framework/PythonInterface/plugins/algorithms/GetLiveInstrumentValue.py index 7aaea3aa87365240b7c7cd14d154ca2b8d5f689e..08e1a35e0b8b1163b2726b74b581393fe6cce5a2 100644 --- a/Framework/PythonInterface/plugins/algorithms/GetLiveInstrumentValue.py +++ b/Framework/PythonInterface/plugins/algorithms/GetLiveInstrumentValue.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/HB2AReduce.py b/Framework/PythonInterface/plugins/algorithms/HB2AReduce.py index 817d81c18601df8f9a3da9b9ed49626478374a43..7c874bc906a909716b71fd1b5b737c80a485cdca 100644 --- a/Framework/PythonInterface/plugins/algorithms/HB2AReduce.py +++ b/Framework/PythonInterface/plugins/algorithms/HB2AReduce.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) from mantid.api import (PythonAlgorithm, AlgorithmFactory, PropertyMode, WorkspaceProperty, FileProperty, diff --git a/Framework/PythonInterface/plugins/algorithms/HFIRSANS2Wavelength.py b/Framework/PythonInterface/plugins/algorithms/HFIRSANS2Wavelength.py index 08555abd701271d1e9e8f1c1dbcdd7193e61f855..f766d6af1f685d487d741843857b4f0aa9910a69 100644 --- a/Framework/PythonInterface/plugins/algorithms/HFIRSANS2Wavelength.py +++ b/Framework/PythonInterface/plugins/algorithms/HFIRSANS2Wavelength.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) from mantid.api import (PythonAlgorithm, AlgorithmFactory, MatrixWorkspaceProperty, PropertyMode, Progress) diff --git a/Framework/PythonInterface/plugins/algorithms/IndexSatellitePeaks.py b/Framework/PythonInterface/plugins/algorithms/IndexSatellitePeaks.py index a99451e8d9693b738199c8c84aa2213d9f0fded8..4e6ee12804b41b9633b96c5c73bff8a16971ed8a 100644 --- a/Framework/PythonInterface/plugins/algorithms/IndexSatellitePeaks.py +++ b/Framework/PythonInterface/plugins/algorithms/IndexSatellitePeaks.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + import numpy as np from scipy.spatial import KDTree diff --git a/Framework/PythonInterface/plugins/algorithms/IndirectTransmission.py b/Framework/PythonInterface/plugins/algorithms/IndirectTransmission.py index 42b60b72e81737bc943594626768576cf8ac2ac5..3fa272cade206b36a024169273e8d16aed3797f9 100644 --- a/Framework/PythonInterface/plugins/algorithms/IndirectTransmission.py +++ b/Framework/PythonInterface/plugins/algorithms/IndirectTransmission.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/IntegratePeaksProfileFitting.py b/Framework/PythonInterface/plugins/algorithms/IntegratePeaksProfileFitting.py index a6e9d2c7a9a8b69c467359223971cde2e3f7850b..9ca63312683914286b292aa096bf7eb19110c29c 100644 --- a/Framework/PythonInterface/plugins/algorithms/IntegratePeaksProfileFitting.py +++ b/Framework/PythonInterface/plugins/algorithms/IntegratePeaksProfileFitting.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init """ diff --git a/Framework/PythonInterface/plugins/algorithms/LRAutoReduction.py b/Framework/PythonInterface/plugins/algorithms/LRAutoReduction.py index a0f10500bcb2c622b599ff23d052b0769aa3fa62..9be2f10bf574390760422cd0eb741a6e98a9b30f 100644 --- a/Framework/PythonInterface/plugins/algorithms/LRAutoReduction.py +++ b/Framework/PythonInterface/plugins/algorithms/LRAutoReduction.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init, invalid-name, no-self-use, attribute-defined-outside-init """ diff --git a/Framework/PythonInterface/plugins/algorithms/LRDirectBeamSort.py b/Framework/PythonInterface/plugins/algorithms/LRDirectBeamSort.py index 55bc521cc2bb9930cabc28495717d01f129b829a..d7cccf9be61f58746838c8d5c51d8546716ef6fe 100644 --- a/Framework/PythonInterface/plugins/algorithms/LRDirectBeamSort.py +++ b/Framework/PythonInterface/plugins/algorithms/LRDirectBeamSort.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,invalid-name from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/LRPeakSelection.py b/Framework/PythonInterface/plugins/algorithms/LRPeakSelection.py index 22cf2bcda95fe0b9f4f32fbe7f37ff540c8277fb..22054d2a6b66a7ed96e88bc61723981fb81a5e78 100644 --- a/Framework/PythonInterface/plugins/algorithms/LRPeakSelection.py +++ b/Framework/PythonInterface/plugins/algorithms/LRPeakSelection.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=no-init,invalid-name, too-many-instance-attributes diff --git a/Framework/PythonInterface/plugins/algorithms/LRPrimaryFraction.py b/Framework/PythonInterface/plugins/algorithms/LRPrimaryFraction.py index 5b5a9c8fa232285c7d29aff5a1eb40b4e4ee6b26..31a072787b8d44f390b49113e97591faa848385c 100644 --- a/Framework/PythonInterface/plugins/algorithms/LRPrimaryFraction.py +++ b/Framework/PythonInterface/plugins/algorithms/LRPrimaryFraction.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,invalid-name from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/LRReflectivityOutput.py b/Framework/PythonInterface/plugins/algorithms/LRReflectivityOutput.py index 5336f370f2dd5f88a8a8c7c674955a15e6514ec1..f49c58c0069dec3ce717d7504e10847ed9125e88 100644 --- a/Framework/PythonInterface/plugins/algorithms/LRReflectivityOutput.py +++ b/Framework/PythonInterface/plugins/algorithms/LRReflectivityOutput.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=no-init,invalid-name,bare-except from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/LRScalingFactors.py b/Framework/PythonInterface/plugins/algorithms/LRScalingFactors.py index 0c1f29ec09e0a0dc20fcb6fd46285fd4f766ac9e..d474992872d890b8e62a03f2b6ba4de88145d3cb 100644 --- a/Framework/PythonInterface/plugins/algorithms/LRScalingFactors.py +++ b/Framework/PythonInterface/plugins/algorithms/LRScalingFactors.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=invalid-name, no-init from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/LRSubtractAverageBackground.py b/Framework/PythonInterface/plugins/algorithms/LRSubtractAverageBackground.py index 317556ced3d405d647a5b0e9068b4a34596a088a..59330c218edca8d7dc7816c17c54ad69d49940e6 100644 --- a/Framework/PythonInterface/plugins/algorithms/LRSubtractAverageBackground.py +++ b/Framework/PythonInterface/plugins/algorithms/LRSubtractAverageBackground.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,invalid-name from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/LinkedUBs.py b/Framework/PythonInterface/plugins/algorithms/LinkedUBs.py index 60a232d1ef5505de6a1fe58070a9a38a85add4d8..a8fc255332d056c94c9385ce81b77b1448678547 100644 --- a/Framework/PythonInterface/plugins/algorithms/LinkedUBs.py +++ b/Framework/PythonInterface/plugins/algorithms/LinkedUBs.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from mantid.api import (DataProcessorAlgorithm, mtd, AlgorithmFactory, WorkspaceProperty, diff --git a/Framework/PythonInterface/plugins/algorithms/LiquidsReflectometryReduction.py b/Framework/PythonInterface/plugins/algorithms/LiquidsReflectometryReduction.py index 6d632f5162c572cbb7b5384dec0f8cb4dfd2b0d1..a2126f254b2f45e635ae13f5200467898edad86a 100644 --- a/Framework/PythonInterface/plugins/algorithms/LiquidsReflectometryReduction.py +++ b/Framework/PythonInterface/plugins/algorithms/LiquidsReflectometryReduction.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,invalid-name """ diff --git a/Framework/PythonInterface/plugins/algorithms/LoadAndMerge.py b/Framework/PythonInterface/plugins/algorithms/LoadAndMerge.py index 388e84a6ac6c5ed7a5f000ccc5be1c71d0f81eae..dcaca149e623efa3ec3d8389bcfc5d152d78d4d4 100644 --- a/Framework/PythonInterface/plugins/algorithms/LoadAndMerge.py +++ b/Framework/PythonInterface/plugins/algorithms/LoadAndMerge.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/LoadCIF.py b/Framework/PythonInterface/plugins/algorithms/LoadCIF.py index 9adfb23d0feeafc7c98124d3e8c838a190257e83..ce451509a5d9895ef5953774206d359300172c05 100644 --- a/Framework/PythonInterface/plugins/algorithms/LoadCIF.py +++ b/Framework/PythonInterface/plugins/algorithms/LoadCIF.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=no-init,too-few-public-methods from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/LoadDNSLegacy.py b/Framework/PythonInterface/plugins/algorithms/LoadDNSLegacy.py index 8d6b5ea1629a20b9edbc0261973c887eb6a8755a..1989684cc604341fa33deecc62e9d2a2659eac26 100644 --- a/Framework/PythonInterface/plugins/algorithms/LoadDNSLegacy.py +++ b/Framework/PythonInterface/plugins/algorithms/LoadDNSLegacy.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) import mantid.simpleapi as api diff --git a/Framework/PythonInterface/plugins/algorithms/LoadEXED.py b/Framework/PythonInterface/plugins/algorithms/LoadEXED.py index 41f4a883ba3e46753bc79e5359d65a544587d637..235c2685136caaba117faed9b7b535b10181d57b 100644 --- a/Framework/PythonInterface/plugins/algorithms/LoadEXED.py +++ b/Framework/PythonInterface/plugins/algorithms/LoadEXED.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) from mantid.kernel import Direction diff --git a/Framework/PythonInterface/plugins/algorithms/LoadEmptyVesuvio.py b/Framework/PythonInterface/plugins/algorithms/LoadEmptyVesuvio.py index 4665a0667ab32e9da0b4407a8cfda44f15044009..7b7e6b8d3b06bb5eefa873827182ff67072138f7 100644 --- a/Framework/PythonInterface/plugins/algorithms/LoadEmptyVesuvio.py +++ b/Framework/PythonInterface/plugins/algorithms/LoadEmptyVesuvio.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/LoadFullprofFile.py b/Framework/PythonInterface/plugins/algorithms/LoadFullprofFile.py index 359129e676a331d4e4a9a24853b30501ba5b6e4f..7d51a5d09a1d1d75cc1e0196bd670c925c7e84dc 100644 --- a/Framework/PythonInterface/plugins/algorithms/LoadFullprofFile.py +++ b/Framework/PythonInterface/plugins/algorithms/LoadFullprofFile.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,invalid-name from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/LoadGudrunOutput.py b/Framework/PythonInterface/plugins/algorithms/LoadGudrunOutput.py index e84daf713e3fb555d2d4559c55192cfdb9161801..ee167e499d119e3fde37c5d86f516b9e2ca45fdc 100644 --- a/Framework/PythonInterface/plugins/algorithms/LoadGudrunOutput.py +++ b/Framework/PythonInterface/plugins/algorithms/LoadGudrunOutput.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) from mantid.api import (FileProperty, WorkspaceProperty, PythonAlgorithm, diff --git a/Framework/PythonInterface/plugins/algorithms/LoadLamp.py b/Framework/PythonInterface/plugins/algorithms/LoadLamp.py index cf2a5dda5f2778545b1438fad3d5f5b0331c9de4..78b8b68b7cff83167b9bb6388c31af092f3b1d47 100644 --- a/Framework/PythonInterface/plugins/algorithms/LoadLamp.py +++ b/Framework/PythonInterface/plugins/algorithms/LoadLamp.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) from mantid.api import FileProperty, WorkspaceProperty, PythonAlgorithm, AlgorithmFactory, FileAction diff --git a/Framework/PythonInterface/plugins/algorithms/LoadLogPropertyTable.py b/Framework/PythonInterface/plugins/algorithms/LoadLogPropertyTable.py index 14015f740b1a8d0edd99381119a03515d22c52d2..abc6ed0c9682a51907f39e410a8dc082de9fc51d 100644 --- a/Framework/PythonInterface/plugins/algorithms/LoadLogPropertyTable.py +++ b/Framework/PythonInterface/plugins/algorithms/LoadLogPropertyTable.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,invalid-name from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/LoadMultipleGSS.py b/Framework/PythonInterface/plugins/algorithms/LoadMultipleGSS.py index a9f586f39da25820f674bb511001457b7575ddef..3cb95b539e9dc0e47425671fe6fe8fc280e41cae 100644 --- a/Framework/PythonInterface/plugins/algorithms/LoadMultipleGSS.py +++ b/Framework/PythonInterface/plugins/algorithms/LoadMultipleGSS.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,invalid-name from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/LoadNMoldyn3Ascii.py b/Framework/PythonInterface/plugins/algorithms/LoadNMoldyn3Ascii.py index 259d1159ffb9e887f0cb633e767f348411317b66..a8138648d023e6720ae838cde57a1d11043f6521 100644 --- a/Framework/PythonInterface/plugins/algorithms/LoadNMoldyn3Ascii.py +++ b/Framework/PythonInterface/plugins/algorithms/LoadNMoldyn3Ascii.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=invalid-name,no-init,too-many-locals,too-many-branches diff --git a/Framework/PythonInterface/plugins/algorithms/LoadNMoldyn4Ascii.py b/Framework/PythonInterface/plugins/algorithms/LoadNMoldyn4Ascii.py index 2520899ab07c837e1980c169c1f8f50e51ea1745..857343d6a15b0c46b5836591b2bfb798f54b36b4 100644 --- a/Framework/PythonInterface/plugins/algorithms/LoadNMoldyn4Ascii.py +++ b/Framework/PythonInterface/plugins/algorithms/LoadNMoldyn4Ascii.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init diff --git a/Framework/PythonInterface/plugins/algorithms/LoadNMoldyn4Ascii1D.py b/Framework/PythonInterface/plugins/algorithms/LoadNMoldyn4Ascii1D.py index 2397da46caa26689c329a184f8bfee6a32b6134b..2afefea75a3892b953ab2b5e98398372754ac4b5 100644 --- a/Framework/PythonInterface/plugins/algorithms/LoadNMoldyn4Ascii1D.py +++ b/Framework/PythonInterface/plugins/algorithms/LoadNMoldyn4Ascii1D.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) from mantid.simpleapi import CreateWorkspace, GroupWorkspaces diff --git a/Framework/PythonInterface/plugins/algorithms/LoadPreNexusLive.py b/Framework/PythonInterface/plugins/algorithms/LoadPreNexusLive.py index 8714c453ddb71d04ee1115ad1d0199fb028208db..7d0aaf953c425cc101399e0818bfb74759776c2f 100644 --- a/Framework/PythonInterface/plugins/algorithms/LoadPreNexusLive.py +++ b/Framework/PythonInterface/plugins/algorithms/LoadPreNexusLive.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) from mantid import mtd diff --git a/Framework/PythonInterface/plugins/algorithms/LoadSINQ.py b/Framework/PythonInterface/plugins/algorithms/LoadSINQ.py index 1007b9b038ab435fdea3749a85be2493996020c0..d630240588f033f3379b4697c46c1be929f7af4b 100644 --- a/Framework/PythonInterface/plugins/algorithms/LoadSINQ.py +++ b/Framework/PythonInterface/plugins/algorithms/LoadSINQ.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=invalid-name,no-init #-------------------------------------------------------------- diff --git a/Framework/PythonInterface/plugins/algorithms/LoadSINQFile.py b/Framework/PythonInterface/plugins/algorithms/LoadSINQFile.py index 1ed5741a9f75cc31b523b0a8bda0e55307f38acf..9717663c928ee1a9cef46e8bd498a1cc15251625 100644 --- a/Framework/PythonInterface/plugins/algorithms/LoadSINQFile.py +++ b/Framework/PythonInterface/plugins/algorithms/LoadSINQFile.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,invalid-name #-------------------------------------------------------------- diff --git a/Framework/PythonInterface/plugins/algorithms/LoadVesuvio.py b/Framework/PythonInterface/plugins/algorithms/LoadVesuvio.py index 7cab05628e59a9f0e91ac6e1f0b3b786e076c8f5..cc1b385463f3ae6804ae053d29a5e022b094bcce 100644 --- a/Framework/PythonInterface/plugins/algorithms/LoadVesuvio.py +++ b/Framework/PythonInterface/plugins/algorithms/LoadVesuvio.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) from mantid.kernel import * diff --git a/Framework/PythonInterface/plugins/algorithms/LoadVisionElasticBS.py b/Framework/PythonInterface/plugins/algorithms/LoadVisionElasticBS.py index 29e5b115967018bf23a45ed9ccc1df02fc77e174..4a93e325df9e3547a105dc7817962f47e0ea2c1a 100644 --- a/Framework/PythonInterface/plugins/algorithms/LoadVisionElasticBS.py +++ b/Framework/PythonInterface/plugins/algorithms/LoadVisionElasticBS.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,invalid-name #from mantid.api import AlgorithmFactory diff --git a/Framework/PythonInterface/plugins/algorithms/LoadVisionElasticEQ.py b/Framework/PythonInterface/plugins/algorithms/LoadVisionElasticEQ.py index ca0815e70958002a9b35278b25532f965f64be3d..b12a8e508c4f9c8fae385567bb9c209ae4a74886 100644 --- a/Framework/PythonInterface/plugins/algorithms/LoadVisionElasticEQ.py +++ b/Framework/PythonInterface/plugins/algorithms/LoadVisionElasticEQ.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,invalid-name #from mantid.api import AlgorithmFactory diff --git a/Framework/PythonInterface/plugins/algorithms/LoadVisionInelastic.py b/Framework/PythonInterface/plugins/algorithms/LoadVisionInelastic.py index 9ac62d23ba668e058680c5141b328f69aace119d..1eeceabf0d4a63cc1f59c7e602916af3521507d1 100644 --- a/Framework/PythonInterface/plugins/algorithms/LoadVisionInelastic.py +++ b/Framework/PythonInterface/plugins/algorithms/LoadVisionInelastic.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,invalid-name #from mantid.api import AlgorithmFactory diff --git a/Framework/PythonInterface/plugins/algorithms/LoadWANDSCD.py b/Framework/PythonInterface/plugins/algorithms/LoadWANDSCD.py index d5280d8f583b088078c70a194318e1c2d1211e47..8303c6ee52b7e88249a652b107480ee9da4ac8a4 100644 --- a/Framework/PythonInterface/plugins/algorithms/LoadWANDSCD.py +++ b/Framework/PythonInterface/plugins/algorithms/LoadWANDSCD.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) from mantid.api import PythonAlgorithm, AlgorithmFactory, PropertyMode, WorkspaceProperty, Progress, MultipleFileProperty, FileAction, mtd diff --git a/Framework/PythonInterface/plugins/algorithms/MRFilterCrossSections.py b/Framework/PythonInterface/plugins/algorithms/MRFilterCrossSections.py index e8ab8f9fa51fc89e5ca744275976edd1a9bda5a9..5afbd8df43fe074fac88ab3d12dca8361f1c6122 100644 --- a/Framework/PythonInterface/plugins/algorithms/MRFilterCrossSections.py +++ b/Framework/PythonInterface/plugins/algorithms/MRFilterCrossSections.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,invalid-name from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/MRGetTheta.py b/Framework/PythonInterface/plugins/algorithms/MRGetTheta.py index a9d0da65dc0ea714dbf8d9a2cef4eaafc8a79aac..5c22cb0a32d666e20e5b281b4d16b54573b2c4ae 100644 --- a/Framework/PythonInterface/plugins/algorithms/MRGetTheta.py +++ b/Framework/PythonInterface/plugins/algorithms/MRGetTheta.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,invalid-name from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/MRInspectData.py b/Framework/PythonInterface/plugins/algorithms/MRInspectData.py index 71286494f7974c3f331dfcc95479a602c87b9727..df20dc64118868bcb5225d533e79e802247e5dae 100644 --- a/Framework/PythonInterface/plugins/algorithms/MRInspectData.py +++ b/Framework/PythonInterface/plugins/algorithms/MRInspectData.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=bare-except,no-init,invalid-name,dangerous-default-value from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/MagnetismReflectometryReduction.py b/Framework/PythonInterface/plugins/algorithms/MagnetismReflectometryReduction.py index fc6e6334f3b8e3b7785b14b19fb2703f71a8592f..54bed65f3234eef6f87c2289db4bf6bf76ec5c8a 100644 --- a/Framework/PythonInterface/plugins/algorithms/MagnetismReflectometryReduction.py +++ b/Framework/PythonInterface/plugins/algorithms/MagnetismReflectometryReduction.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init, invalid-name, bare-except """ diff --git a/Framework/PythonInterface/plugins/algorithms/MaskAngle.py b/Framework/PythonInterface/plugins/algorithms/MaskAngle.py index 6e7983ed7235d27c24d553a43f02f1171ae9a215..c582e5432f4373386469db1582e90c474597dcf6 100644 --- a/Framework/PythonInterface/plugins/algorithms/MaskAngle.py +++ b/Framework/PythonInterface/plugins/algorithms/MaskAngle.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,invalid-name from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/MaskBTP.py b/Framework/PythonInterface/plugins/algorithms/MaskBTP.py index c03c4e69b012eb747ce25b25056f10ed2873b57a..d00a88e3827a982bd0e79fa7a3a08b90fba2dc83 100644 --- a/Framework/PythonInterface/plugins/algorithms/MaskBTP.py +++ b/Framework/PythonInterface/plugins/algorithms/MaskBTP.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) import mantid.simpleapi diff --git a/Framework/PythonInterface/plugins/algorithms/MaskWorkspaceToCalFile.py b/Framework/PythonInterface/plugins/algorithms/MaskWorkspaceToCalFile.py index 2fbe6554cbd90855567ffd7c01ab2b531479c879..3132c489f53f5233dee03081b42227e66d4b8ecc 100644 --- a/Framework/PythonInterface/plugins/algorithms/MaskWorkspaceToCalFile.py +++ b/Framework/PythonInterface/plugins/algorithms/MaskWorkspaceToCalFile.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=invalid-name, no-init from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/MatchPeaks.py b/Framework/PythonInterface/plugins/algorithms/MatchPeaks.py index f147489744ffa47ced4f1c881929b0f4f73c80ea..10ce38de7695091006a06951b7518c5ff202b59d 100644 --- a/Framework/PythonInterface/plugins/algorithms/MatchPeaks.py +++ b/Framework/PythonInterface/plugins/algorithms/MatchPeaks.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=too-many-branches from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/MatchSpectra.py b/Framework/PythonInterface/plugins/algorithms/MatchSpectra.py index cc3eaee7df31bfca54e963eb8f39f8da2dc090ff..93037bf04dd1764406923262b2a83ff3e42962a1 100644 --- a/Framework/PythonInterface/plugins/algorithms/MatchSpectra.py +++ b/Framework/PythonInterface/plugins/algorithms/MatchSpectra.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) from mantid.api import AlgorithmFactory, MatrixWorkspaceProperty, PythonAlgorithm diff --git a/Framework/PythonInterface/plugins/algorithms/Mean.py b/Framework/PythonInterface/plugins/algorithms/Mean.py index 0c2173d93662615a6884e5e8d349bd9934922ed1..ce5122288333077846c53d35d380610d7d530e00 100644 --- a/Framework/PythonInterface/plugins/algorithms/Mean.py +++ b/Framework/PythonInterface/plugins/algorithms/Mean.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,invalid-name from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/MedianBinWidth.py b/Framework/PythonInterface/plugins/algorithms/MedianBinWidth.py index 5de7140f3e4bed6ab04e521bf5396995475e8ba1..004edb5c7eec1b1f08514c8ccb43b083a427f912 100644 --- a/Framework/PythonInterface/plugins/algorithms/MedianBinWidth.py +++ b/Framework/PythonInterface/plugins/algorithms/MedianBinWidth.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/MergeCalFiles.py b/Framework/PythonInterface/plugins/algorithms/MergeCalFiles.py index c4699c8049f5a55da2da8eec3f179965bbeee6e1..938238597796b8cdbafb114f880937b4d74bd38a 100644 --- a/Framework/PythonInterface/plugins/algorithms/MergeCalFiles.py +++ b/Framework/PythonInterface/plugins/algorithms/MergeCalFiles.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/MuonMaxent.py b/Framework/PythonInterface/plugins/algorithms/MuonMaxent.py index c72d09ff09cea412b353c7fd4c18f8b1529e0c7b..4492297d97987ffb89a34f0edae4e882104797da 100644 --- a/Framework/PythonInterface/plugins/algorithms/MuonMaxent.py +++ b/Framework/PythonInterface/plugins/algorithms/MuonMaxent.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) import numpy as np diff --git a/Framework/PythonInterface/plugins/algorithms/MuscatSofQW.py b/Framework/PythonInterface/plugins/algorithms/MuscatSofQW.py index 06244fda3524c374c5aef286a8cc29a24784692e..5c9b53886db372b6338c98de7b4e164c1b495138 100644 --- a/Framework/PythonInterface/plugins/algorithms/MuscatSofQW.py +++ b/Framework/PythonInterface/plugins/algorithms/MuscatSofQW.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,too-many-instance-attributes,too-many-arguments diff --git a/Framework/PythonInterface/plugins/algorithms/NMoldyn4Interpolation.py b/Framework/PythonInterface/plugins/algorithms/NMoldyn4Interpolation.py index c9395f46fc0350818ced280665bad801631a879b..6600a2f98edf27acf1f9eafcc11b414166477a1f 100644 --- a/Framework/PythonInterface/plugins/algorithms/NMoldyn4Interpolation.py +++ b/Framework/PythonInterface/plugins/algorithms/NMoldyn4Interpolation.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # Author: Alex Phimister 08/2016 # pylint: disable=invalid-name diff --git a/Framework/PythonInterface/plugins/algorithms/NormaliseSpectra.py b/Framework/PythonInterface/plugins/algorithms/NormaliseSpectra.py index 06548b34a7da4e3404c4d2fd59b0c748875844d8..12a441399fb2063b219283d2c619837e86b31145 100644 --- a/Framework/PythonInterface/plugins/algorithms/NormaliseSpectra.py +++ b/Framework/PythonInterface/plugins/algorithms/NormaliseSpectra.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/OptimizeCrystalPlacementByRun.py b/Framework/PythonInterface/plugins/algorithms/OptimizeCrystalPlacementByRun.py index 73d1a5030b66885a3f839db67e5ef36456d184e5..e8969cf62a71cd160a1b603c69fb836a84aa3121 100644 --- a/Framework/PythonInterface/plugins/algorithms/OptimizeCrystalPlacementByRun.py +++ b/Framework/PythonInterface/plugins/algorithms/OptimizeCrystalPlacementByRun.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init diff --git a/Framework/PythonInterface/plugins/algorithms/OrderWorkspaceHistory.py b/Framework/PythonInterface/plugins/algorithms/OrderWorkspaceHistory.py index 9735222cb7866cbd636114c7599d14f7c69518c3..0a652ac6aa826ca55c73b7797ef214399036a781 100644 --- a/Framework/PythonInterface/plugins/algorithms/OrderWorkspaceHistory.py +++ b/Framework/PythonInterface/plugins/algorithms/OrderWorkspaceHistory.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import absolute_import, division, print_function diff --git a/Framework/PythonInterface/plugins/algorithms/PDConvertRealSpace.py b/Framework/PythonInterface/plugins/algorithms/PDConvertRealSpace.py index 8d145a47783c12316be0861aa783815d644d8605..af20bcc293bf1887686c89318f581a6cf86acf0f 100644 --- a/Framework/PythonInterface/plugins/algorithms/PDConvertRealSpace.py +++ b/Framework/PythonInterface/plugins/algorithms/PDConvertRealSpace.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=no-init,invalid-name from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/PDConvertReciprocalSpace.py b/Framework/PythonInterface/plugins/algorithms/PDConvertReciprocalSpace.py index d20e631acede32998747804b04973a3b6934ae2f..e6c796f1b81e1a1e92372521a02ec3772ea9a0b8 100644 --- a/Framework/PythonInterface/plugins/algorithms/PDConvertReciprocalSpace.py +++ b/Framework/PythonInterface/plugins/algorithms/PDConvertReciprocalSpace.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=no-init,invalid-name from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/PDToGUDRUN.py b/Framework/PythonInterface/plugins/algorithms/PDToGUDRUN.py index 53a100b8f66a8be17a5df192ccde21305ec8f9c5..5c016a408c7c3d2addc7d80370d05dd317516de3 100644 --- a/Framework/PythonInterface/plugins/algorithms/PDToGUDRUN.py +++ b/Framework/PythonInterface/plugins/algorithms/PDToGUDRUN.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/PDToPDFgetN.py b/Framework/PythonInterface/plugins/algorithms/PDToPDFgetN.py index 851bef30158c3fd46f3df585c6d15bfd4dd66d3e..1b529a9d6ea7016339a6662e1c3d4620af315ce6 100644 --- a/Framework/PythonInterface/plugins/algorithms/PDToPDFgetN.py +++ b/Framework/PythonInterface/plugins/algorithms/PDToPDFgetN.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/PearlMCAbsorption.py b/Framework/PythonInterface/plugins/algorithms/PearlMCAbsorption.py index 0fcd7ad4b1ebc5311028db63f97716ab3ccce3a1..83553032a2a2e0a62469676e352f9b314db9a68b 100644 --- a/Framework/PythonInterface/plugins/algorithms/PearlMCAbsorption.py +++ b/Framework/PythonInterface/plugins/algorithms/PearlMCAbsorption.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/PoldiCreatePeaksFromFile.py b/Framework/PythonInterface/plugins/algorithms/PoldiCreatePeaksFromFile.py index 5a0782bfca8031396a063d6a7afc0267459f8eaa..62dfdc88e0385995b55ceaf524655722d008ec15 100644 --- a/Framework/PythonInterface/plugins/algorithms/PoldiCreatePeaksFromFile.py +++ b/Framework/PythonInterface/plugins/algorithms/PoldiCreatePeaksFromFile.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/PoldiLoadRuns.py b/Framework/PythonInterface/plugins/algorithms/PoldiLoadRuns.py index 9a88a8b927cbfb48217ec076f25be2ee8ca35e7e..aba6c8a29aae97d78f476afcd20a8d04a8d7c268 100644 --- a/Framework/PythonInterface/plugins/algorithms/PoldiLoadRuns.py +++ b/Framework/PythonInterface/plugins/algorithms/PoldiLoadRuns.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/PoldiMerge.py b/Framework/PythonInterface/plugins/algorithms/PoldiMerge.py index daa4d4a835cfa20cbdeacb1697de7266bb7e4735..cbb2b0d32a57800f373cfed976e9d1565097db21 100644 --- a/Framework/PythonInterface/plugins/algorithms/PoldiMerge.py +++ b/Framework/PythonInterface/plugins/algorithms/PoldiMerge.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=no-init,invalid-name from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/RefinePowderDiffProfileSeq.py b/Framework/PythonInterface/plugins/algorithms/RefinePowderDiffProfileSeq.py index 73709c5e8bbcfb948b5ccdab70568f81aa7c4d17..ee5baf1560dbfe9bcda19e18a0eefc34820b3452 100644 --- a/Framework/PythonInterface/plugins/algorithms/RefinePowderDiffProfileSeq.py +++ b/Framework/PythonInterface/plugins/algorithms/RefinePowderDiffProfileSeq.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,invalid-name from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/ReflectometryReductionOneLiveData.py b/Framework/PythonInterface/plugins/algorithms/ReflectometryReductionOneLiveData.py index 7aa62eb025f2a05cb1f98b2b46bd1c08eb51d107..485b7c2c9e5a3e5647fd59f3e35336e3d1ce9a18 100644 --- a/Framework/PythonInterface/plugins/algorithms/ReflectometryReductionOneLiveData.py +++ b/Framework/PythonInterface/plugins/algorithms/ReflectometryReductionOneLiveData.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/ReflectometrySliceEventWorkspace.py b/Framework/PythonInterface/plugins/algorithms/ReflectometrySliceEventWorkspace.py index 35317a1cccf1d750425ae3a0ab94bf9d5ce4f3f7..65cf8ce0b25315f036f1f9aaaa07a089f4c385f3 100644 --- a/Framework/PythonInterface/plugins/algorithms/ReflectometrySliceEventWorkspace.py +++ b/Framework/PythonInterface/plugins/algorithms/ReflectometrySliceEventWorkspace.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) from mantid.api import * diff --git a/Framework/PythonInterface/plugins/algorithms/ResNorm.py b/Framework/PythonInterface/plugins/algorithms/ResNorm.py index 0a2ddb4b6a1eb2990bb70f788d8ca722b2882ba4..3e0a41f0ed22683e78e045e9627d6dae2521f684 100644 --- a/Framework/PythonInterface/plugins/algorithms/ResNorm.py +++ b/Framework/PythonInterface/plugins/algorithms/ResNorm.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/RetrieveRunInfo.py b/Framework/PythonInterface/plugins/algorithms/RetrieveRunInfo.py index 66f12ac1541a146b7dd71e60818e19396ea00872..b964d99cb5ad0f0166196f6d3e3d719d7997035b 100644 --- a/Framework/PythonInterface/plugins/algorithms/RetrieveRunInfo.py +++ b/Framework/PythonInterface/plugins/algorithms/RetrieveRunInfo.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=invalid-name,no-init from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/SANSSubtract.py b/Framework/PythonInterface/plugins/algorithms/SANSSubtract.py index ebb9878b71b9c95a69b3beffa73e0f3ad17256d8..360128e7fc25a694d04bac124b0520ccb7e14991 100644 --- a/Framework/PythonInterface/plugins/algorithms/SANSSubtract.py +++ b/Framework/PythonInterface/plugins/algorithms/SANSSubtract.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,invalid-name from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/SANSWideAngleCorrection.py b/Framework/PythonInterface/plugins/algorithms/SANSWideAngleCorrection.py index 51c3eba49a63baf88c4283c7f442959a4e2136f7..7d32302fc0554d23daba58afe421c80c465834ae 100644 --- a/Framework/PythonInterface/plugins/algorithms/SANSWideAngleCorrection.py +++ b/Framework/PythonInterface/plugins/algorithms/SANSWideAngleCorrection.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,invalid-name from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/SNAPReduce.py b/Framework/PythonInterface/plugins/algorithms/SNAPReduce.py index dab0f89b0f6b927bf1f2fb1330d9c59afe6419f6..9209a655c97e77ae542f000b97a958c2b8a74664 100644 --- a/Framework/PythonInterface/plugins/algorithms/SNAPReduce.py +++ b/Framework/PythonInterface/plugins/algorithms/SNAPReduce.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=invalid-name,no-init,too-many-lines from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/SNSPowderReduction.py b/Framework/PythonInterface/plugins/algorithms/SNSPowderReduction.py index ffa9403ebd3a18040d1762b8ac399d5fd0a18c2d..3e16ac1decc25d9661b4daf9d6c8fa6c9529a8ef 100644 --- a/Framework/PythonInterface/plugins/algorithms/SNSPowderReduction.py +++ b/Framework/PythonInterface/plugins/algorithms/SNSPowderReduction.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=invalid-name,no-init,too-many-lines from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/SaveGEMMAUDParamFile.py b/Framework/PythonInterface/plugins/algorithms/SaveGEMMAUDParamFile.py index d8abe74fd07567b0237f8e89330c68f34144c718..98786ee7d66810e7046298f64737d7e17fadd1f1 100644 --- a/Framework/PythonInterface/plugins/algorithms/SaveGEMMAUDParamFile.py +++ b/Framework/PythonInterface/plugins/algorithms/SaveGEMMAUDParamFile.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/SaveNexusPD.py b/Framework/PythonInterface/plugins/algorithms/SaveNexusPD.py index 007af5c9ea0fcde326a3939d237bfa120e10a09c..9cf53e444d791ff1ef415bad5f108c63d5d6a708 100644 --- a/Framework/PythonInterface/plugins/algorithms/SaveNexusPD.py +++ b/Framework/PythonInterface/plugins/algorithms/SaveNexusPD.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,invalid-name from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/SavePlot1DAsJson.py b/Framework/PythonInterface/plugins/algorithms/SavePlot1DAsJson.py index ff9aed224da7400ac194c754769303d374234123..4fcdcd54360c963e0c19657c41ebfdb96968b566 100644 --- a/Framework/PythonInterface/plugins/algorithms/SavePlot1DAsJson.py +++ b/Framework/PythonInterface/plugins/algorithms/SavePlot1DAsJson.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,unused-variable,invalid-name,bare-except from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/SaveReflections.py b/Framework/PythonInterface/plugins/algorithms/SaveReflections.py index f59d49291e2ad09279aeef504d3f58d292d9d4a9..cce52b5e21a5e34f55da4e0493fa022c1c9c5b05 100644 --- a/Framework/PythonInterface/plugins/algorithms/SaveReflections.py +++ b/Framework/PythonInterface/plugins/algorithms/SaveReflections.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, unicode_literals) diff --git a/Framework/PythonInterface/plugins/algorithms/SaveYDA.py b/Framework/PythonInterface/plugins/algorithms/SaveYDA.py index 1f2b390b64171d24bc6c35b5b88a68b43f289848..c2fe2aa45ee3327782db27c156b4e739fe54530e 100644 --- a/Framework/PythonInterface/plugins/algorithms/SaveYDA.py +++ b/Framework/PythonInterface/plugins/algorithms/SaveYDA.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import absolute_import, division, print_function diff --git a/Framework/PythonInterface/plugins/algorithms/SelectNexusFilesByMetadata.py b/Framework/PythonInterface/plugins/algorithms/SelectNexusFilesByMetadata.py index e30a964a0738554a1653a6324be1cd870cc9f6fe..cb51bf58f83332ee83bad5dfcb617f7c40eb5c84 100644 --- a/Framework/PythonInterface/plugins/algorithms/SelectNexusFilesByMetadata.py +++ b/Framework/PythonInterface/plugins/algorithms/SelectNexusFilesByMetadata.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=eval-used from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/SetDetScale.py b/Framework/PythonInterface/plugins/algorithms/SetDetScale.py index ab7efc41495b2a25e5d8a2c4a80d71b31aca8435..7ab33c62646b5dc04577c99c9672d094f87d1fbc 100644 --- a/Framework/PythonInterface/plugins/algorithms/SetDetScale.py +++ b/Framework/PythonInterface/plugins/algorithms/SetDetScale.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/SortByQVectors.py b/Framework/PythonInterface/plugins/algorithms/SortByQVectors.py index ac06d3a7590e7bed28ae0c878fd6d38133345340..8a1b33421b6ae286a6b8ef908e8e992293e623d2 100644 --- a/Framework/PythonInterface/plugins/algorithms/SortByQVectors.py +++ b/Framework/PythonInterface/plugins/algorithms/SortByQVectors.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,invalid-name from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/SortDetectors.py b/Framework/PythonInterface/plugins/algorithms/SortDetectors.py index c13b72bbf0881922e64db3b76b3fba17e3770967..f28c2dd820f19d845ea30f058bd2e131032861ee 100644 --- a/Framework/PythonInterface/plugins/algorithms/SortDetectors.py +++ b/Framework/PythonInterface/plugins/algorithms/SortDetectors.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,invalid-name from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/StatisticsOfTableWorkspace.py b/Framework/PythonInterface/plugins/algorithms/StatisticsOfTableWorkspace.py index 5667d38d6bc06ffc6e9566199c8ffc67a52fae01..e5b63c8879312bb695cb8359d93458111974f202 100644 --- a/Framework/PythonInterface/plugins/algorithms/StatisticsOfTableWorkspace.py +++ b/Framework/PythonInterface/plugins/algorithms/StatisticsOfTableWorkspace.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=no-init diff --git a/Framework/PythonInterface/plugins/algorithms/StringToPng.py b/Framework/PythonInterface/plugins/algorithms/StringToPng.py index adca9d2ae727e03bfbccfc406686091d0c14db62..9e78bbc9df0ff6277bbda20b1dfdaf389279096b 100644 --- a/Framework/PythonInterface/plugins/algorithms/StringToPng.py +++ b/Framework/PythonInterface/plugins/algorithms/StringToPng.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,invalid-name from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/SuggestTibCNCS.py b/Framework/PythonInterface/plugins/algorithms/SuggestTibCNCS.py index 42ed60833a9cdb258ad1130d28a76adc7cb7b2a8..cb70790b3d4f086039a18848b740122345a47c17 100644 --- a/Framework/PythonInterface/plugins/algorithms/SuggestTibCNCS.py +++ b/Framework/PythonInterface/plugins/algorithms/SuggestTibCNCS.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,invalid-name from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/SuggestTibHYSPEC.py b/Framework/PythonInterface/plugins/algorithms/SuggestTibHYSPEC.py index 7ffa0f44aefc99649fc7a3a8a009fa7b97cf5df9..85332455c48be368836d6e4b53c011cfebd309aa 100644 --- a/Framework/PythonInterface/plugins/algorithms/SuggestTibHYSPEC.py +++ b/Framework/PythonInterface/plugins/algorithms/SuggestTibHYSPEC.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/Symmetrise.py b/Framework/PythonInterface/plugins/algorithms/Symmetrise.py index d770966518e6e3bacbb33ead551ca9476ae66067..cd94eb2b70457f0a0422e0f0d5931db8b08c49ef 100644 --- a/Framework/PythonInterface/plugins/algorithms/Symmetrise.py +++ b/Framework/PythonInterface/plugins/algorithms/Symmetrise.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=no-init,invalid-name from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/TOFTOFCropWorkspace.py b/Framework/PythonInterface/plugins/algorithms/TOFTOFCropWorkspace.py index 06d5c2579a56dfb7a5c900cd0966b5a08d4c690a..03378303122d0fa42772fadafa125988136ce0bf 100644 --- a/Framework/PythonInterface/plugins/algorithms/TOFTOFCropWorkspace.py +++ b/Framework/PythonInterface/plugins/algorithms/TOFTOFCropWorkspace.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/TOFTOFMergeRuns.py b/Framework/PythonInterface/plugins/algorithms/TOFTOFMergeRuns.py index 257c6acd85f76aa490210c06d77935f4eb052212..abb4c95648ad2fe839262f3af37c567430ece10a 100644 --- a/Framework/PythonInterface/plugins/algorithms/TOFTOFMergeRuns.py +++ b/Framework/PythonInterface/plugins/algorithms/TOFTOFMergeRuns.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/TestWorkspaceGroupProperty.py b/Framework/PythonInterface/plugins/algorithms/TestWorkspaceGroupProperty.py index a6c5883b8a4ca3634d35b19ba505de4917566e28..7e29d62fd2b7a0eddc9f3007a6b4f582de35b708 100644 --- a/Framework/PythonInterface/plugins/algorithms/TestWorkspaceGroupProperty.py +++ b/Framework/PythonInterface/plugins/algorithms/TestWorkspaceGroupProperty.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,invalid-name from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/USANSSimulation.py b/Framework/PythonInterface/plugins/algorithms/USANSSimulation.py index 93bf70ee557827a1e63261a0011a40108994005e..d8c47e652780fdd20e12d85fd2824ca38a559b96 100644 --- a/Framework/PythonInterface/plugins/algorithms/USANSSimulation.py +++ b/Framework/PythonInterface/plugins/algorithms/USANSSimulation.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,invalid-name from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/UpdatePeakParameterTableValue.py b/Framework/PythonInterface/plugins/algorithms/UpdatePeakParameterTableValue.py index 063fade57ca46bd470819bbd56c14e1a5f262178..bef0a617508de4d8eece1bdbb65f02aeadad57b5 100644 --- a/Framework/PythonInterface/plugins/algorithms/UpdatePeakParameterTableValue.py +++ b/Framework/PythonInterface/plugins/algorithms/UpdatePeakParameterTableValue.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,invalid-name,redefined-builtin from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/VelocityAutoCorrelations.py b/Framework/PythonInterface/plugins/algorithms/VelocityAutoCorrelations.py index 222eaea10c03455b4837489800b59da5c95f759b..bf67e3507a6d82e93b4cc402416e7efc6ef0ea75 100644 --- a/Framework/PythonInterface/plugins/algorithms/VelocityAutoCorrelations.py +++ b/Framework/PythonInterface/plugins/algorithms/VelocityAutoCorrelations.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=too-many-branches,too-many-locals, invalid-name from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/VelocityCrossCorrelations.py b/Framework/PythonInterface/plugins/algorithms/VelocityCrossCorrelations.py index bb0238cedf3246f5a296b244042464733531889e..053df6409699e4bee5bc7a95aa3190faec344709 100644 --- a/Framework/PythonInterface/plugins/algorithms/VelocityCrossCorrelations.py +++ b/Framework/PythonInterface/plugins/algorithms/VelocityCrossCorrelations.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=too-many-branches,too-many-locals, invalid-name from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/VesuvioCorrections.py b/Framework/PythonInterface/plugins/algorithms/VesuvioCorrections.py index dbcd0ad54f152459f8075bd484912422ef635e7b..2e900d72505487f0c990f04355f5547e885afe9f 100644 --- a/Framework/PythonInterface/plugins/algorithms/VesuvioCorrections.py +++ b/Framework/PythonInterface/plugins/algorithms/VesuvioCorrections.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=no-init, too-many-instance-attributes from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/VesuvioPeakPrediction.py b/Framework/PythonInterface/plugins/algorithms/VesuvioPeakPrediction.py index b28eb6a9e08a316aa2ccd24f067091e7168c13c3..23d88fe11885d0a27ad4956a38ac4e6919b4cbaa 100644 --- a/Framework/PythonInterface/plugins/algorithms/VesuvioPeakPrediction.py +++ b/Framework/PythonInterface/plugins/algorithms/VesuvioPeakPrediction.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from mantid.api import * from mantid.kernel import * diff --git a/Framework/PythonInterface/plugins/algorithms/VesuvioPreFit.py b/Framework/PythonInterface/plugins/algorithms/VesuvioPreFit.py index ade6a3356f94c499d620adcb524e78dbbc947f88..3c527fb75e7a069a41796168f22848b8b59533ba 100644 --- a/Framework/PythonInterface/plugins/algorithms/VesuvioPreFit.py +++ b/Framework/PythonInterface/plugins/algorithms/VesuvioPreFit.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=no-init from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/VesuvioResolution.py b/Framework/PythonInterface/plugins/algorithms/VesuvioResolution.py index f457caf7f14b8dfaac2b6cff0fa76979530d7d7d..4410508417c93016406ed41c1c275f8b6dca6885 100644 --- a/Framework/PythonInterface/plugins/algorithms/VesuvioResolution.py +++ b/Framework/PythonInterface/plugins/algorithms/VesuvioResolution.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/VesuvioTOFFit.py b/Framework/PythonInterface/plugins/algorithms/VesuvioTOFFit.py index e5cd36a31ea1288671a6a86fa0b89a12b31a84e6..2e8e283f6c2ae67511fe80581c6d4de6fdaf16a3 100644 --- a/Framework/PythonInterface/plugins/algorithms/VesuvioTOFFit.py +++ b/Framework/PythonInterface/plugins/algorithms/VesuvioTOFFit.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=no-init from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/VesuvioThickness.py b/Framework/PythonInterface/plugins/algorithms/VesuvioThickness.py index ae4da92b3db650c6f719eea7979b2c1ac7f4b777..933fff2a076dffc0446af531f65a1fffa135d9c8 100644 --- a/Framework/PythonInterface/plugins/algorithms/VesuvioThickness.py +++ b/Framework/PythonInterface/plugins/algorithms/VesuvioThickness.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/ViewBOA.py b/Framework/PythonInterface/plugins/algorithms/ViewBOA.py index 8f0c9651b6c201ec289dc781210f38cdca90f99f..e434c18f253ecf18c4f5321cbccdc2679c3406d0 100644 --- a/Framework/PythonInterface/plugins/algorithms/ViewBOA.py +++ b/Framework/PythonInterface/plugins/algorithms/ViewBOA.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,invalid-name from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/VisionReduction.py b/Framework/PythonInterface/plugins/algorithms/VisionReduction.py index 0d908ad7b37c3530f55898e69df334395d0e37ad..059774b2774ff020ffda57b10f34fa8d0fc5d263 100644 --- a/Framework/PythonInterface/plugins/algorithms/VisionReduction.py +++ b/Framework/PythonInterface/plugins/algorithms/VisionReduction.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,invalid-name from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/AddSampleLogMultiple.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/AddSampleLogMultiple.py index 871ad86ef57a5f8ede0cb114cce80862bcb550a6..b37888685b714313c9606d78da2c476f0bb3a5d1 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/AddSampleLogMultiple.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/AddSampleLogMultiple.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/ApplyPaalmanPingsCorrection.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/ApplyPaalmanPingsCorrection.py index 930cd00bb03175bb7da099808a065c9c9bb45186..8dcc0bb10941d970909d919aad4112a16e744a59 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/ApplyPaalmanPingsCorrection.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/ApplyPaalmanPingsCorrection.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=no-init,too-many-instance-attributes from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/BayesQuasi.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/BayesQuasi.py index 98a118fd21458bd7b728bd3d639c3c9ef050e5cf..3c7fdd0f6c602c1e1ef6fe05a20fd01c4551d52b 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/BayesQuasi.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/BayesQuasi.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=invalid-name,too-many-instance-attributes,too-many-branches,no-init,redefined-builtin from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/BayesStretch.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/BayesStretch.py index 6790c9d43a3280750156eff02475cef67c30c8d0..699c1a4ba9bba8fb7803d9c964226335382f3894 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/BayesStretch.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/BayesStretch.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=invalid-name,too-many-instance-attributes,too-many-branches,no-init from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/CalculateMonteCarloAbsorption.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/CalculateMonteCarloAbsorption.py index 4906323e72dca1489d3ca63fa15ecd3385152c7d..aa6a54c5981588140a4bf90fcde78b557c3a4544 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/CalculateMonteCarloAbsorption.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/CalculateMonteCarloAbsorption.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/ConvertMultipleRunsToSingleCrystalMD.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/ConvertMultipleRunsToSingleCrystalMD.py index 6697f3ab61727a69190770f1b909ff9c7092df2a..f6a35cabbce59b4741134a1110aebf1a373e6268 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/ConvertMultipleRunsToSingleCrystalMD.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/ConvertMultipleRunsToSingleCrystalMD.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/DetectorFloodWeighting.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/DetectorFloodWeighting.py index bd89fc8b283d00b8d8dbea1a34310ebe99a21b56..b63e2d672aaee904aa1abcef3ffaffd288bc9a29 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/DetectorFloodWeighting.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/DetectorFloodWeighting.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/DirectILLApplySelfShielding.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/DirectILLApplySelfShielding.py index 3adee1ac23b93e8b6fbbd439e64f76ccd67b7faa..8421e94002c350f5891dec86396058fc1defbda6 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/DirectILLApplySelfShielding.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/DirectILLApplySelfShielding.py @@ -1,9 +1,8 @@ -# -*- coding: utf-8 -*- -# Mantid Repository : https://github.com/mantidproject/mantid +# -*- coding: utf-8 -*-# Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/DirectILLCollectData.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/DirectILLCollectData.py index 1ffbf59ee7e23a2c8a1aa3baeec667f454346ed0..0dedded20fe2f2fd8cf0577bdc99b05086563e31 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/DirectILLCollectData.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/DirectILLCollectData.py @@ -1,9 +1,8 @@ -# -*- coding: utf-8 -*- -# Mantid Repository : https://github.com/mantidproject/mantid +# -*- coding: utf-8 -*-# Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/DirectILLDiagnostics.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/DirectILLDiagnostics.py index f00439aa75c1f3f5c19d5af5e5ad9d3f8e30e375..d32d5a396da370e1fbc727d722e074249a9e1845 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/DirectILLDiagnostics.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/DirectILLDiagnostics.py @@ -1,9 +1,8 @@ -# -*- coding: utf-8 -*- -# Mantid Repository : https://github.com/mantidproject/mantid +# -*- coding: utf-8 -*-# Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/DirectILLIntegrateVanadium.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/DirectILLIntegrateVanadium.py index 94071b9170cdf1126091dfa7526c0701933e4426..66544e3aace637a8be3caed990b6548b2605cbca 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/DirectILLIntegrateVanadium.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/DirectILLIntegrateVanadium.py @@ -1,9 +1,8 @@ -# -*- coding: utf-8 -*- -# Mantid Repository : https://github.com/mantidproject/mantid +# -*- coding: utf-8 -*-# Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/DirectILLReduction.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/DirectILLReduction.py index 99e8b6ca1ad97bb11acddf0b6ca14f2242ad50e1..a9407cb0633fbdb11a1b57e07046bd9e1d9e187c 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/DirectILLReduction.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/DirectILLReduction.py @@ -1,9 +1,8 @@ -# -*- coding: utf-8 -*- -# Mantid Repository : https://github.com/mantidproject/mantid +# -*- coding: utf-8 -*-# Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/DirectILLSelfShielding.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/DirectILLSelfShielding.py index 17ab93ac265bb610925f8524313179cd53f9c94f..11b26505bff94b3a2a0605459b5e2ea574b398fd 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/DirectILLSelfShielding.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/DirectILLSelfShielding.py @@ -1,9 +1,8 @@ -# -*- coding: utf-8 -*- -# Mantid Repository : https://github.com/mantidproject/mantid +# -*- coding: utf-8 -*-# Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/DirectILL_common.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/DirectILL_common.py index a28464a248c92b7ea6f91067c91b915ef1a53eb0..8e6d94ffc04610d52a50b3046d63a523fd981984 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/DirectILL_common.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/DirectILL_common.py @@ -1,9 +1,8 @@ -# -*- coding: utf-8 -*- -# Mantid Repository : https://github.com/mantidproject/mantid +# -*- coding: utf-8 -*-# Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/EQSANSAzimuthalAverage1D.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/EQSANSAzimuthalAverage1D.py index 13cc64cac8315f3dabb652238006e2ad61faed16..07b7f4c8035e5308d16bddf4243a91985c646431 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/EQSANSAzimuthalAverage1D.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/EQSANSAzimuthalAverage1D.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,invalid-name from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/EQSANSDirectBeamTransmission.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/EQSANSDirectBeamTransmission.py index 3e81b419b7bd8214d204cb21a0d88d3bc7342fab..191383701f8c11397ca33cc38a3ee05c804204d0 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/EQSANSDirectBeamTransmission.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/EQSANSDirectBeamTransmission.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #Pylint: disable=no-init,invalid-name from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/EQSANSNormalise.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/EQSANSNormalise.py index ca4339fc18458da590098ed231f5773e2913c110..ed1532d1e37a2697716bf0eb21036801bab99dfd 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/EQSANSNormalise.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/EQSANSNormalise.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/ElasticWindowMultiple.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/ElasticWindowMultiple.py index e3f582cad224073cd5bdfa00f5ab94f13a51e165..34ad391e3663ddb847f7b84236946ed192aa70ef 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/ElasticWindowMultiple.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/ElasticWindowMultiple.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/EnergyWindowScan.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/EnergyWindowScan.py index b9dadba614917aa42d33eca4910d5e56fbd9720f..0ae9f898756de3bf179cedff2e10f1653977f086 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/EnergyWindowScan.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/EnergyWindowScan.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from mantid.api import * from mantid.kernel import * diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/FindPeaksAutomatic.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/FindPeaksAutomatic.py index cfbe66058ce13c7374ed923ad69543e3621185ee..71815d40ff00dc0b2574dc1e7cb0d2b36bcec872 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/FindPeaksAutomatic.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/FindPeaksAutomatic.py @@ -1,10 +1,9 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + - from __future__ import (absolute_import, division, print_function, unicode_literals) from mantid.simpleapi import (ConvertToPointData, CreateWorkspace, DeleteWorkspace, diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/FitGaussianPeaks.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/FitGaussianPeaks.py index 4b1cf6cafaa7d302b33832a87202e947fdb0eb69..c5f5f9c6fa8f263bc5908f9574dea5c0ee81349a 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/FitGaussianPeaks.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/FitGaussianPeaks.py @@ -1,10 +1,9 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + - from __future__ import (absolute_import, division, print_function, unicode_literals) from mantid.simpleapi import (CreateEmptyTableWorkspace, Fit) diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/FlatPlatePaalmanPingsCorrection.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/FlatPlatePaalmanPingsCorrection.py index ebfad8c4627bc27ac18d17b56c010825d16b23c3..5185712cfeed5775ab296aed39a10335305987ea 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/FlatPlatePaalmanPingsCorrection.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/FlatPlatePaalmanPingsCorrection.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=no-init,invalid-name,too-many-instance-attributes diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/HFIRSANSReduction.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/HFIRSANSReduction.py index 603a68cbdc2c5c0fb93be93cfaf598b91e1c0430..01dcabe76d0be311856b405612cff62ac3c6a7ae 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/HFIRSANSReduction.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/HFIRSANSReduction.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,invalid-name,too-many-branches from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/ILL_utilities.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/ILL_utilities.py index 747a880cebe20db1e95e86a92c5d0fc4b98d0c74..dc0c9390ee4bc5f179d93d78c8b99be7cdb8e4cb 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/ILL_utilities.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/ILL_utilities.py @@ -1,9 +1,8 @@ -# -*- coding: utf-8 -*- -# Mantid Repository : https://github.com/mantidproject/mantid +# -*- coding: utf-8 -*-# Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/ISISIndirectDiffractionReduction.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/ISISIndirectDiffractionReduction.py index e3c75af401d0c01d804d87b5868c9cfb7559ebed..9c7253650ce2ea640cc324445484a53d1b22281d 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/ISISIndirectDiffractionReduction.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/ISISIndirectDiffractionReduction.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=no-init,too-many-instance-attributes from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/ISISIndirectEnergyTransfer.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/ISISIndirectEnergyTransfer.py index 657f04fa2f540cee5a80e845f4bca56781ea9255..360d2c196d454959b33d0e5cce6622db423a7669 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/ISISIndirectEnergyTransfer.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/ISISIndirectEnergyTransfer.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=invalid-name,too-many-instance-attributes,too-many-branches,no-init,deprecated-module from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/ISISIndirectEnergyTransferWrapper.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/ISISIndirectEnergyTransferWrapper.py index 0f5657447dc494c827e819738366106e16a60262..3a17e0c6b1880e4096a7bdebc059f1b4df7a7113 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/ISISIndirectEnergyTransferWrapper.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/ISISIndirectEnergyTransferWrapper.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=invalid-name,too-many-instance-attributes,too-many-branches,no-init,deprecated-module from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/IndirectAnnulusAbsorption.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/IndirectAnnulusAbsorption.py index 91eeea05b8e1bd6065426c0ef0b571afc330f0ef..e9897f0f21015438c8ec7c237b66b5604d0f4587 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/IndirectAnnulusAbsorption.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/IndirectAnnulusAbsorption.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=no-init, too-many-instance-attributes diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/IndirectAnnulusAbsorption2.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/IndirectAnnulusAbsorption2.py index 7afdd769ad36e42d4b573b2fecce7b9157eee700..2c4c3e16b404cba9decf6933c603087e1307303d 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/IndirectAnnulusAbsorption2.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/IndirectAnnulusAbsorption2.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/IndirectCalibration.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/IndirectCalibration.py index a7be41fcbeca4731a05e1d1762cb88851a10a8d4..dde63797fb7f80b6fb04e48144b11ee3a52e2857 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/IndirectCalibration.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/IndirectCalibration.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,too-many-instance-attributes from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/IndirectCylinderAbsorption.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/IndirectCylinderAbsorption.py index 99cfa4f2c1e067f5b4989f0543f8878405cb6dbf..ccb203631a53097551a26ce687d5bef36a30803e 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/IndirectCylinderAbsorption.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/IndirectCylinderAbsorption.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init, too-many-instance-attributes diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/IndirectCylinderAbsorption2.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/IndirectCylinderAbsorption2.py index d9ba011825a9ce15313426f4c63cfd1dfa8eb5f9..48fda32f4803d5ce1ed10f0f061e9c40bfbd6f3b 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/IndirectCylinderAbsorption2.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/IndirectCylinderAbsorption2.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/IndirectDiffScan.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/IndirectDiffScan.py index 3edf4618cafe9859073878c400c04add033593dc..1a38968706b25f755b4e044f3ab7a3cf8e784278 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/IndirectDiffScan.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/IndirectDiffScan.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) from mantid.kernel import * diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/IndirectFlatPlateAbsorption.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/IndirectFlatPlateAbsorption.py index 679f7263e5e721e23ac4132ba825626dc1bb3eaf..ff96daf0257294493e558f574801729c3e770298 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/IndirectFlatPlateAbsorption.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/IndirectFlatPlateAbsorption.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,too-many-instance-attributes,too-many-branches from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/IndirectFlatPlateAbsorption2.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/IndirectFlatPlateAbsorption2.py index a73acaefe8392c39a2e0d1031aa4f8f34c48d149..8db5610f7112ae439d9cb82ee7f6732d62ff0bd7 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/IndirectFlatPlateAbsorption2.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/IndirectFlatPlateAbsorption2.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/IndirectILLEnergyTransfer.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/IndirectILLEnergyTransfer.py index e658badf95eb4e65d862169dd6fd7ffed3f0059d..3f601a6fa456ab98007cf6bf01e7fd7a488993c9 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/IndirectILLEnergyTransfer.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/IndirectILLEnergyTransfer.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/IndirectILLReductionFWS.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/IndirectILLReductionFWS.py index e3ad447b791e36fc4d160040e97eb4e6697b4db3..14d44c754fe7d5a5f2607085bdabed558380ca8a 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/IndirectILLReductionFWS.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/IndirectILLReductionFWS.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/IndirectILLReductionQENS.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/IndirectILLReductionQENS.py index 2601e8894cdd9e84869a5e7e724fe561a6c0359c..8aa7953c9b5f166f409e063f314b7a8c985c5d4d 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/IndirectILLReductionQENS.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/IndirectILLReductionQENS.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/IndirectQuickRun.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/IndirectQuickRun.py index a7bffc8c2e2082a362dba10e12dfacec515eb3a6..22dd6e5284f235ebd1dde8bc448173283bc12404 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/IndirectQuickRun.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/IndirectQuickRun.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=too-many-locals from mantid.api import (AlgorithmFactory, AnalysisDataService, DataProcessorAlgorithm, MatrixWorkspace, NumericAxis, diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/IndirectReplaceFitResult.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/IndirectReplaceFitResult.py index 77c6a3fd6b3a4732a886a98933711cbec796ef9e..ace858f77ef36e13b7250e7b95ea287248797fbe 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/IndirectReplaceFitResult.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/IndirectReplaceFitResult.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=no-init,too-many-instance-attributes from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/IndirectResolution.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/IndirectResolution.py index 4f33ef502e9bc12d841d6d68b92b7333192291b0..77c0a9b0e181096328df7a107b8e84b6ad9ed781 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/IndirectResolution.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/IndirectResolution.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/IndirectSampleChanger.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/IndirectSampleChanger.py index 1385022a2cba24d2c4a47f28fb35fb853db2f51e..371f124cb4cc4e53fc0789a176e59b1815cd4c73 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/IndirectSampleChanger.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/IndirectSampleChanger.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from mantid.api import (AlgorithmFactory, DataProcessorAlgorithm) from mantid.kernel import (FloatArrayLengthValidator, FloatArrayProperty, IntArrayLengthValidator, IntArrayProperty, diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/IndirectTransmissionMonitor.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/IndirectTransmissionMonitor.py index ff7aff686cd75033c2dfe49766cb7da00d31b9c7..9772aeeffa8dd2c91dcafe6f3670013789c98dc9 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/IndirectTransmissionMonitor.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/IndirectTransmissionMonitor.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/IndirectTwoPeakFit.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/IndirectTwoPeakFit.py index 0c98b30093c0b00f590934f3a4d8adc8b15ee6d6..d11121173801aa8894a2a5a277e57cdb330178c2 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/IndirectTwoPeakFit.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/IndirectTwoPeakFit.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=too-many-locals from mantid.api import (PythonAlgorithm, AlgorithmFactory, MatrixWorkspaceProperty, PropertyMode, Progress, TextAxis) diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/IqtFitMultiple.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/IqtFitMultiple.py index 3660714341a67b4855e19d7ade2df62446ec1cd1..b224bae32d1e9dc63355d5da3a0bcf2386e7bd9f 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/IqtFitMultiple.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/IqtFitMultiple.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/LoadWAND.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/LoadWAND.py index b7419171e9075a49b3fe96b5642c99b1a6628354..db0196c14bb833cf750411ceca834aa37cb372e6 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/LoadWAND.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/LoadWAND.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import absolute_import, division, print_function from mantid.api import DataProcessorAlgorithm, AlgorithmFactory, MultipleFileProperty, FileAction, WorkspaceProperty diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/MDNormSCDPreprocessIncoherent.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/MDNormSCDPreprocessIncoherent.py index a6653504196e7a4c4356d5fcb0027295b2fed0b3..c2af5e28821476a1f87202e79b98ec444a18e112 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/MDNormSCDPreprocessIncoherent.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/MDNormSCDPreprocessIncoherent.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/MSDFit.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/MSDFit.py index 7ead0cd9c3e0764b2c03773d3f1b41102d3c5782..982335ab975e735777eb2076bd41ac818c017175 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/MSDFit.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/MSDFit.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=no-init from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/MatchAndMergeWorkspaces.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/MatchAndMergeWorkspaces.py index 0bb57638599a96984abef2a44dbb70c2cbbf1e0a..85937583480bbee0e48cd637a3482228a8789a5e 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/MatchAndMergeWorkspaces.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/MatchAndMergeWorkspaces.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/MildnerCarpenter.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/MildnerCarpenter.py index 139be9fdc4cc4394baab2d9d60dda1ee532f2a5e..4e563ae4d1f695337b6b15b9644b43d077eb2677 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/MildnerCarpenter.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/MildnerCarpenter.py @@ -1,10 +1,9 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + - # Contains parametrized formulae for SANS Q resolution based on papers by Mildner, Carpenter. import math import numpy diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/MolDyn.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/MolDyn.py index 53e0c22a61194bab0f50bf081045585f6ad83352..16a540fbf96cc3a6079cbab399ee68830f05add8 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/MolDyn.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/MolDyn.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=invalid-name,no-init from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/MuscatData.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/MuscatData.py index 82cbf65d3c7db5c3cac4377b13e94e3799219952..86d9a2a703cf248675b225aca5f8af751585de2c 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/MuscatData.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/MuscatData.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init # Algorithm to start Bayes programs diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/MuscatFunc.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/MuscatFunc.py index 31be49ae02ac9ec991ee3067080a48891573983d..634b2b2ff30817874d664b26845f6cce2bda5c54 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/MuscatFunc.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/MuscatFunc.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,invalid-name # Algorithm to start Bayes programs diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/NormaliseByThickness.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/NormaliseByThickness.py index c8cb4672ef882e10b1e80c945b65527fdcbb93b4..d52c007137b7824261a98e91ec9daac4f87d0983 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/NormaliseByThickness.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/NormaliseByThickness.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/OSIRISDiffractionReduction.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/OSIRISDiffractionReduction.py index 8c75d0a009c1baa9f2370e242216a2459d88c0c0..7375fd46240ec1a29c221fc160e381889d32a6ad 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/OSIRISDiffractionReduction.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/OSIRISDiffractionReduction.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/PoldiDataAnalysis.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/PoldiDataAnalysis.py index 9ee7de7fdf4d5773fb36746113a74651ad3f64ef..638eeb4b6bd22fd2daf75d9778b28de459ed29c7 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/PoldiDataAnalysis.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/PoldiDataAnalysis.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=no-init,invalid-name,attribute-defined-outside-init,too-many-instance-attributes from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/PowderILLDetectorScan.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/PowderILLDetectorScan.py index 22582a7797e498e52015264bf5843fcf8bd4d35a..a2cbad2b926d971973dce5ac2ae2ae65008e3c55 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/PowderILLDetectorScan.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/PowderILLDetectorScan.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/PowderILLEfficiency.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/PowderILLEfficiency.py index 542f2dbbe73d56769658d9dbf5abcc754aec1ddd..8d0d28f0cef46239b0d3066505511c2b42a576d0 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/PowderILLEfficiency.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/PowderILLEfficiency.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/PowderILLParameterScan.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/PowderILLParameterScan.py index d54f0240da72ab8cbab1c5585c48b03010c6ba3d..87f40ed5fb70d02d9a96e7077516dcac2682919d 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/PowderILLParameterScan.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/PowderILLParameterScan.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/ReactorSANSResolution.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/ReactorSANSResolution.py index cf5091747754d2c0fb65a2be5ae36ff224a1a8e2..6db1669788dab23335fe9337e6d59f3360884cb5 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/ReactorSANSResolution.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/ReactorSANSResolution.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/ReflectometryILLAutoProcess.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/ReflectometryILLAutoProcess.py index a4bc5a5ccf336194d3d6b8449b39ba582d6697bf..cc3c087a191766a7333ec1114bd5ebd2081c9576 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/ReflectometryILLAutoProcess.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/ReflectometryILLAutoProcess.py @@ -1,9 +1,8 @@ -# -*- coding: utf-8 -*- -# Mantid Repository : https://github.com/mantidproject/mantid +# -*- coding: utf-8 -*-# Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import ( diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/ReflectometryILLConvertToQ.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/ReflectometryILLConvertToQ.py index 241ad93255a11d055666623577f01798b541536f..c39d017a00ee212f3807dd1f6f99aae17b6cb162 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/ReflectometryILLConvertToQ.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/ReflectometryILLConvertToQ.py @@ -1,9 +1,8 @@ -# -*- coding: utf-8 -*- -# Mantid Repository : https://github.com/mantidproject/mantid +# -*- coding: utf-8 -*-# Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/ReflectometryILLPolarizationCor.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/ReflectometryILLPolarizationCor.py index 93ffb136a108e080303995d210c2171e2da0d64c..b2111a652f2e085e29567579d1da63e497746cac 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/ReflectometryILLPolarizationCor.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/ReflectometryILLPolarizationCor.py @@ -1,9 +1,8 @@ -# -*- coding: utf-8 -*- -# Mantid Repository : https://github.com/mantidproject/mantid +# -*- coding: utf-8 -*-# Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/ReflectometryILLPreprocess.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/ReflectometryILLPreprocess.py index 8fc3c81e728f80e7862c2089ce8762b19d20fbd2..578d64a36b019e995044bae796daa9135690daa2 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/ReflectometryILLPreprocess.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/ReflectometryILLPreprocess.py @@ -1,9 +1,8 @@ -# -*- coding: utf-8 -*- -# Mantid Repository : https://github.com/mantidproject/mantid +# -*- coding: utf-8 -*-# Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/ReflectometryILLSumForeground.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/ReflectometryILLSumForeground.py index 2a08c234d731274a9548b1c293e96fbcc509dba4..7f6d08dddd379db1df46f040de92819645f11745 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/ReflectometryILLSumForeground.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/ReflectometryILLSumForeground.py @@ -1,9 +1,8 @@ -# -*- coding: utf-8 -*- -# Mantid Repository : https://github.com/mantidproject/mantid +# -*- coding: utf-8 -*-# Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/ReflectometryILL_common.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/ReflectometryILL_common.py index 056c4118d58f0a09f30c1003491ef2f8779f557d..8bb711d0ece60e1e39eea07f30e3db9848f4870f 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/ReflectometryILL_common.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/ReflectometryILL_common.py @@ -1,9 +1,8 @@ -# -*- coding: utf-8 -*- -# Mantid Repository : https://github.com/mantidproject/mantid +# -*- coding: utf-8 -*-# Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/ReflectometryISISLoadAndProcess.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/ReflectometryISISLoadAndProcess.py index 71806c24a105be8c639a3cce5b905496b9139eba..332f171e74b7e5d9de4f2d28d0ee9e5354cfb64b 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/ReflectometryISISLoadAndProcess.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/ReflectometryISISLoadAndProcess.py @@ -1,9 +1,8 @@ -# -*- coding: utf-8 -*- -# Mantid Repository : https://github.com/mantidproject/mantid +# -*- coding: utf-8 -*-# Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/ResNorm2.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/ResNorm2.py index 7c9146abca87509bf39af1efa14d57920ec029b4..3ae64957666e756cbac121886046e45da9580029 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/ResNorm2.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/ResNorm2.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSBeamCentreFinder.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSBeamCentreFinder.py index e4f6acad785ae85035c8d78c36f0ab0656740718..74e2de3e859b0711b8d1ab2c0c60951d8af79e76 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSBeamCentreFinder.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSBeamCentreFinder.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=too-few-public-methods diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSBeamCentreFinderCore.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSBeamCentreFinderCore.py index 5dc93bc7e29bde31c55f73316c46e2ed9d6c9f5c..e4939224bf2866b0b6e43e19a608a115e056d843 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSBeamCentreFinderCore.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSBeamCentreFinderCore.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=too-few-public-methods diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSBeamCentreFinderMassMethod.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSBeamCentreFinderMassMethod.py index b04430c6ccb1eff47cf8b82f11725f8b7f37e9e4..6c75018d801990d604eff1a8c1b5699b1006de1f 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSBeamCentreFinderMassMethod.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSBeamCentreFinderMassMethod.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=too-few-public-methods diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSConvertToWavelengthAndRebin.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSConvertToWavelengthAndRebin.py index dd2a52a771cc241e5d080373691448f0e8c4e327..9e39f0c47c63e1ff82d0309dc6c93eecf30c201d 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSConvertToWavelengthAndRebin.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSConvertToWavelengthAndRebin.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=too-few-public-methods diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSCreateAdjustmentWorkspaces.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSCreateAdjustmentWorkspaces.py index 69d4cbe9af5bd8241713e92ca619e5f8ebb19692..f5b3d0d630c6de093d9b495cc6d77461ae01013d 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSCreateAdjustmentWorkspaces.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSCreateAdjustmentWorkspaces.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=invalid-name diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSLoad.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSLoad.py index 252521b89afdd6f8c443b028c4db5dfba63b9c85..63355d2d456af8c0b9c4adcfba3d3e0cc5d2abc0 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSLoad.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSLoad.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=invalid-name diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSReductionCore.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSReductionCore.py index 183727bfb5622e438a352fb768688f0898d813d9..71fccf9bbba5e29c9718cd97d7647579239750e9 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSReductionCore.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSReductionCore.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=invalid-name diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSReductionCoreBase.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSReductionCoreBase.py index c46946979ea8ec694716f0538bd273659fd3d74e..fc4da011268d735052bb852b7a600e90c771ce9d 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSReductionCoreBase.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSReductionCoreBase.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=invalid-name diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSReductionCoreEventSlice.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSReductionCoreEventSlice.py index eea62a214ced21f9d8557a8cba816310e756f836..2bcf3a126137bf2e706da23f0b9c7551a138385c 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSReductionCoreEventSlice.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSReductionCoreEventSlice.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=invalid-name diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSReductionCorePreprocess.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSReductionCorePreprocess.py index 4bee74ea586acf296e5e872297678ce2f42fe3cc..a885277ff7cd75424b7697474bd35fdd6ed39053 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSReductionCorePreprocess.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSReductionCorePreprocess.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=invalid-name diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSSave.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSSave.py index 8ad85228dd871f91f383b8b5f4f7a22fd6149b14..01b6b8383ad4440fdeea54ec67b2652ad3b69840 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSSave.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSSave.py @@ -1,11 +1,9 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + - - # pylint: disable=invalid-name """ SANSSave algorithm performs saving of SANS reduction data.""" diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSSingleReduction.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSSingleReduction.py index a17d8ab41a8f273faafcbc6db43e7544d257a4d6..67b78d9247f79c333c010533605f637dec0a8bb9 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSSingleReduction.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSSingleReduction.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=invalid-name diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSSingleReduction2.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSSingleReduction2.py index 0ca3fb774dbe530a0ba6ecefc1c0453c93f78adc..2a115e7037cb3962e181e7c0f7639700550caab6 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSSingleReduction2.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSSingleReduction2.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=invalid-name diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSSingleReductionBase.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSSingleReductionBase.py index f5bc11cc8a42e2a9719e10ebdc71c0b24a805f13..ccabfaddb94010222cda9e74d2b44503204d87cc 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSSingleReductionBase.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSSingleReductionBase.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=invalid-name diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/__init__.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/__init__.py index 680d818636ca0c71215d00e62846d9ac7b9aec63..cb485c401bbd9b6828c07b6738c35f830629089f 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/__init__.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/__init__.py @@ -1,7 +1,7 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=invalid-name diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANSAbsoluteScale.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANSAbsoluteScale.py index bbec4d97300cdd28728f0be831d3ad7ab882abfd..c743c02c47dc69dc6a7d3d72889b53ec43f5f785 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANSAbsoluteScale.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANSAbsoluteScale.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,invalid-name from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANSAzimuthalAverage1D.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANSAzimuthalAverage1D.py index f152888233b91f14a664752f44f017cd89d03027..855ce3a734ed287efce9218c5a60d94ff8c5c11a 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANSAzimuthalAverage1D.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANSAzimuthalAverage1D.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,invalid-name,too-many-locals,too-many-branches from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANSBeamSpreaderTransmission.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANSBeamSpreaderTransmission.py index b3af8730b44feb29388002f99964d05a12d3ef2c..5f21b10360452e895bfc70035b80b6ce73225001 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANSBeamSpreaderTransmission.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANSBeamSpreaderTransmission.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,invalid-name from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANSDarkRunBackgroundCorrection.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANSDarkRunBackgroundCorrection.py index 5c3c1b1dace01cf3dbb9750512d7f94e361772cc..74bcc04f28c0a030ad7e7e1de8ee0fdb30727316 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANSDarkRunBackgroundCorrection.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANSDarkRunBackgroundCorrection.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,invalid-name,too-many-locals,too-many-branches from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANSDirectBeamTransmission.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANSDirectBeamTransmission.py index 1d9ebe580c3e8f8107aa496a6c7931d337a6a13c..e5b2a5f9b121cf91bb3dbb21d34c372636809ae4 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANSDirectBeamTransmission.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANSDirectBeamTransmission.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANSFitShiftScale.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANSFitShiftScale.py index 9b34e5553c06ff629aa601615ec4ac2452ee61f9..5379df9e28bfbb0bf7fe9f10c0593b67cbba2bc9 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANSFitShiftScale.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANSFitShiftScale.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=no-init,invalid-name,too-many-arguments,too-few-public-methods diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANSILLAutoProcess.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANSILLAutoProcess.py index f99a52a9819c388c24385d10c79084c572e06261..5c8313556a7478deebe91a08f35d8ad7e3f5e626 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANSILLAutoProcess.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANSILLAutoProcess.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANSILLIntegration.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANSILLIntegration.py index d7eac396ed72d50203b2ef2445f0b93e68195e91..fc8c647dd238f8f188241f62f6b448507e5602ba 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANSILLIntegration.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANSILLIntegration.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) from mantid.api import PythonAlgorithm, MatrixWorkspaceProperty, WorkspaceUnitValidator, WorkspaceGroupProperty, \ diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANSILLReduction.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANSILLReduction.py index 92649557057dbd48598ff8f1044a312280b236cb..33d6147704d0d815a38cecc8659b951f76e6b066 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANSILLReduction.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANSILLReduction.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANSMask.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANSMask.py index f417717374d7b96a9fd5e72155f3fc60fbeb7d5c..c4518727a29ea98764a37c56474eb54bc51b4722 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANSMask.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANSMask.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=no-init,invalid-name,bare-except from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANSPatchSensitivity.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANSPatchSensitivity.py index 0f7b8040f24b3da8bd962f222dfcd08d87b23f6b..d33421d93dab907c93404325a56972470c5af29d 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANSPatchSensitivity.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANSPatchSensitivity.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=no-init,invalid-name,bare-except from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANSReduction.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANSReduction.py index 8d3e3aab03e7e3deb6d954970cc803bfb07c2eb1..f220b7cc99b4c57c9108d31ac5906bdc26eaf696 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANSReduction.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANSReduction.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,invalid-name from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANSStitch.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANSStitch.py index cf44050d4b125ecc3642d09533d37728d04ad575..cbf1d41da560311f8265926d1aa2908e0b5ff7d0 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANSStitch.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANSStitch.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=no-init,invalid-name,too-many-arguments,too-few-public-methods diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SavePlot1D.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SavePlot1D.py index 61f61b382c52b4e759792370a1ae9ad01c98f3aa..59274dec950043eddb302180328584efe6e81133 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SavePlot1D.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SavePlot1D.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,invalid-name,redefined-builtin from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SaveVulcanGSS.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SaveVulcanGSS.py index f1bc04eae8e8534cbbb6d102e2caafbf3f128671..6308e7f50b0bf2546ccba9e473bc1047a71532d7 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SaveVulcanGSS.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SaveVulcanGSS.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,invalid-name from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SimpleShapeMonteCarloAbsorption.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SimpleShapeMonteCarloAbsorption.py index 2e23364145659370d7217d832aeb5c2c2fbcbd02..2d7ad054ffbffc283798a18b6554bec43b60bd09 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SimpleShapeMonteCarloAbsorption.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SimpleShapeMonteCarloAbsorption.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SimulatedDensityOfStates.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SimulatedDensityOfStates.py index f2a218ce008f9bfeacacae77dcc31888debedbd8..2f39927da802f56905163f84e2b321543d44d6d6 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SimulatedDensityOfStates.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SimulatedDensityOfStates.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,invalid-name,too-many-locals,too-many-lines, redefined-builtin from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SingleCrystalDiffuseReduction.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SingleCrystalDiffuseReduction.py index aff9888c391d24615f7183634b7378a34dbec5e3..309bbb32905c81d24f9efb9f8ac949209079bcfa 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SingleCrystalDiffuseReduction.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SingleCrystalDiffuseReduction.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SofQWMoments.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SofQWMoments.py index 615ac89a278bc84e66731c0063205e267393f444..f1ef17e9e727c52401efdbe4e007743ac8796818 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SofQWMoments.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SofQWMoments.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # Algorithm to start Bayes programs from mantid.simpleapi import * diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SofQWMomentsScan.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SofQWMomentsScan.py index f4bd02a13040fa01b837c27aa6bbc623888d4d20..77b276a6015b77341e53882d0c29868365a88bcb 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SofQWMomentsScan.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SofQWMomentsScan.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from mantid.kernel import * from mantid.api import * diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SwapWidths.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SwapWidths.py index dd3cb74e25d2b45b8f4a20aa149187f3aa128506..0a6994d6c286d7e5a3e94994f2edc4e634dfc29f 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SwapWidths.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SwapWidths.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/TOSCABankCorrection.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/TOSCABankCorrection.py index 55a362ae3a6023981e477f6e7b4dbfda1da9d6ac..2cc4e2d362fc578ee63089dbdcb3656a05401b2a 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/TOSCABankCorrection.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/TOSCABankCorrection.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/TimeSlice.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/TimeSlice.py index 727ba7a66efc3a5641bb4348a91b835955c17872..77fa091a73b1187d44dfbe57a9cf7a1b11136b70 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/TimeSlice.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/TimeSlice.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,invalid-name from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/TotScatCalculateSelfScattering.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/TotScatCalculateSelfScattering.py index 95b7f2e907ce2161f47c5b0d476d3f17ff09b0b6..c56274516f63d9dfe40b79edb95f3b900e759309 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/TotScatCalculateSelfScattering.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/TotScatCalculateSelfScattering.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/TransformToIqt.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/TransformToIqt.py index eaa3db4d1f508f195c220a31ecde3d2ba785be14..9b2dfbc6379deae009051248d1ec7d49ffc6393e 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/TransformToIqt.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/TransformToIqt.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=no-init,too-many-instance-attributes from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/TransmissionUtils.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/TransmissionUtils.py index 3c7bd4fed96ea56580ff7cc58377aaf1e80a2201..1da362a7952a988c9858a628ead9af6a3fa5c59b 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/TransmissionUtils.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/TransmissionUtils.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=invalid-name from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/USANSReduction.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/USANSReduction.py index 64b12311ac46f0814d339ee860380bacfca34c78..bd1d0b0661087099416a3e37d4283def9a0ccaff 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/USANSReduction.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/USANSReduction.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,invalid-name from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/VesuvioDiffractionReduction.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/VesuvioDiffractionReduction.py index 4f595a2303baec812edff5a8fe54f46425e5f6d0..88051eb83797393ee85559f889232f578d9fc409 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/VesuvioDiffractionReduction.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/VesuvioDiffractionReduction.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) from mantid.simpleapi import * diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/WANDPowderReduction.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/WANDPowderReduction.py index bd8fa9507b897b77332900010a7a94d41109882c..9e23a4bec0986a3494c9b4694e8d96426e4ed959 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/WANDPowderReduction.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/WANDPowderReduction.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import absolute_import, division, print_function from mantid.api import (DataProcessorAlgorithm, AlgorithmFactory, diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/__init__.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/__init__.py index d43ca442a3b069de62b966ee9f1e47beadcb570c..09a03b9527df10149b95338dd0eb6151e36dc546 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/__init__.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/__init__.py @@ -1,6 +1,6 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + diff --git a/Framework/PythonInterface/plugins/algorithms/__init__.py b/Framework/PythonInterface/plugins/algorithms/__init__.py index d43ca442a3b069de62b966ee9f1e47beadcb570c..09a03b9527df10149b95338dd0eb6151e36dc546 100644 --- a/Framework/PythonInterface/plugins/algorithms/__init__.py +++ b/Framework/PythonInterface/plugins/algorithms/__init__.py @@ -1,6 +1,6 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + diff --git a/Framework/PythonInterface/plugins/algorithms/dnsdata.py b/Framework/PythonInterface/plugins/algorithms/dnsdata.py index 5df826a12aaf50d29fac8b7fa81f86e3ddd40629..78b63467e9a6f32538eb6fff13a36026f8af1b11 100644 --- a/Framework/PythonInterface/plugins/algorithms/dnsdata.py +++ b/Framework/PythonInterface/plugins/algorithms/dnsdata.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=too-many-instance-attributes,too-few-public-methods from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/plugins/algorithms/fractional_indexing.py b/Framework/PythonInterface/plugins/algorithms/fractional_indexing.py index e9748e004e741e0ada5f2f92327ae1e5bc19c25d..8bc5c020db35e6da5c7725c169cfdd896e8452f0 100644 --- a/Framework/PythonInterface/plugins/algorithms/fractional_indexing.py +++ b/Framework/PythonInterface/plugins/algorithms/fractional_indexing.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + import itertools import numpy as np diff --git a/Framework/PythonInterface/plugins/algorithms/roundinghelper.py b/Framework/PythonInterface/plugins/algorithms/roundinghelper.py index fc73e5ab464a2c97512b1d0b817dd6418100dd1e..c993044234a93b781c1104621d8fdf2ba639a8c1 100644 --- a/Framework/PythonInterface/plugins/algorithms/roundinghelper.py +++ b/Framework/PythonInterface/plugins/algorithms/roundinghelper.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) from mantid.kernel import Direction, StringListValidator diff --git a/Framework/PythonInterface/plugins/functions/AFMLF.py b/Framework/PythonInterface/plugins/functions/AFMLF.py index a1ae6480fe532f222c26bf3a2ff1b105c7318a02..aa06c4be97bb85db27722b38a20cae83d09cee3e 100644 --- a/Framework/PythonInterface/plugins/functions/AFMLF.py +++ b/Framework/PythonInterface/plugins/functions/AFMLF.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=invalid-name, anomalous-backslash-in-string, attribute-defined-outside-init diff --git a/Framework/PythonInterface/plugins/functions/AFMZF.py b/Framework/PythonInterface/plugins/functions/AFMZF.py index f6393be886306357f09e308d64bd3075df9424e3..a282ad4d44022a84ac54e71d939c96e7e2b155d2 100644 --- a/Framework/PythonInterface/plugins/functions/AFMZF.py +++ b/Framework/PythonInterface/plugins/functions/AFMZF.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=invalid-name, anomalous-backslash-in-string, attribute-defined-outside-init diff --git a/Framework/PythonInterface/plugins/functions/Bessel.py b/Framework/PythonInterface/plugins/functions/Bessel.py index 3f4bc14da6dec33da593915993af729d2b6b82bd..e728c5cc9e2e1dfc28d18986349457d8bf58e6a9 100644 --- a/Framework/PythonInterface/plugins/functions/Bessel.py +++ b/Framework/PythonInterface/plugins/functions/Bessel.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=invalid-name, anomalous-backslash-in-string, attribute-defined-outside-init diff --git a/Framework/PythonInterface/plugins/functions/BivariateGaussian.py b/Framework/PythonInterface/plugins/functions/BivariateGaussian.py index 4e617f763e6c8ff14d21a43e30361efb74e7f404..1184c1e5a54370423c6246b862034fe2451bf283 100644 --- a/Framework/PythonInterface/plugins/functions/BivariateGaussian.py +++ b/Framework/PythonInterface/plugins/functions/BivariateGaussian.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) import numpy as np diff --git a/Framework/PythonInterface/plugins/functions/ChudleyElliot.py b/Framework/PythonInterface/plugins/functions/ChudleyElliot.py index 577e7415e00282434294c707ca99f6f425ecdce2..bba99c455898516613bfe2364431a05d610a19f9 100644 --- a/Framework/PythonInterface/plugins/functions/ChudleyElliot.py +++ b/Framework/PythonInterface/plugins/functions/ChudleyElliot.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=no-init,invalid-name ''' diff --git a/Framework/PythonInterface/plugins/functions/CombGaussLorentzKT.py b/Framework/PythonInterface/plugins/functions/CombGaussLorentzKT.py index 854592cdae5ee9ec97543a4fd91316ecb1815363..760ffd6a6bec37300ef261ed17669d9036d69679 100644 --- a/Framework/PythonInterface/plugins/functions/CombGaussLorentzKT.py +++ b/Framework/PythonInterface/plugins/functions/CombGaussLorentzKT.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=invalid-name, anomalous-backslash-in-string, attribute-defined-outside-init diff --git a/Framework/PythonInterface/plugins/functions/CompositePCRmagnet.py b/Framework/PythonInterface/plugins/functions/CompositePCRmagnet.py index 9561f19aef730fa6a24b3e59a124781f6614c084..9c280ca2da15e7f7dc090bc00efe0462d4829e4e 100644 --- a/Framework/PythonInterface/plugins/functions/CompositePCRmagnet.py +++ b/Framework/PythonInterface/plugins/functions/CompositePCRmagnet.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=invalid-name, anomalous-backslash-in-string, attribute-defined-outside-init diff --git a/Framework/PythonInterface/plugins/functions/DSFinterp1DFit.py b/Framework/PythonInterface/plugins/functions/DSFinterp1DFit.py index 4f12321c428a8c04f500dcadd186aca511db63ae..7a2fee15b140a246565cf4a7cbfbb64864230c8e 100644 --- a/Framework/PythonInterface/plugins/functions/DSFinterp1DFit.py +++ b/Framework/PythonInterface/plugins/functions/DSFinterp1DFit.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=no-init,invalid-name ''' diff --git a/Framework/PythonInterface/plugins/functions/DampedBessel.py b/Framework/PythonInterface/plugins/functions/DampedBessel.py index 273f29129895c99146d4de5005725e1a690494e5..0c547ad9f0c1fb51927e683e56876025dee3c0cc 100644 --- a/Framework/PythonInterface/plugins/functions/DampedBessel.py +++ b/Framework/PythonInterface/plugins/functions/DampedBessel.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=invalid-name, anomalous-backslash-in-string, attribute-defined-outside-init diff --git a/Framework/PythonInterface/plugins/functions/EISFDiffCylinder.py b/Framework/PythonInterface/plugins/functions/EISFDiffCylinder.py index fb8b6d72d29fa432bf7c1393858328f494ee6969..65293a4c5f0c03a593ea554e86376540628174de 100644 --- a/Framework/PythonInterface/plugins/functions/EISFDiffCylinder.py +++ b/Framework/PythonInterface/plugins/functions/EISFDiffCylinder.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=no-init,invalid-name """ diff --git a/Framework/PythonInterface/plugins/functions/EISFDiffSphere.py b/Framework/PythonInterface/plugins/functions/EISFDiffSphere.py index c7f3fd59b4f3b5daad26d97904cb50419e991cdd..a8ad8207e851569153e7a0650ee07a452416d769 100644 --- a/Framework/PythonInterface/plugins/functions/EISFDiffSphere.py +++ b/Framework/PythonInterface/plugins/functions/EISFDiffSphere.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=no-init,invalid-name """ diff --git a/Framework/PythonInterface/plugins/functions/EISFDiffSphereAlkyl.py b/Framework/PythonInterface/plugins/functions/EISFDiffSphereAlkyl.py index 1dc269fe622af38d00bd2771e860f5be0008fcb7..5d9c7afe4d9ca3d2b8541677f6f1cd5df80421ed 100644 --- a/Framework/PythonInterface/plugins/functions/EISFDiffSphereAlkyl.py +++ b/Framework/PythonInterface/plugins/functions/EISFDiffSphereAlkyl.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=no-init,invalid-name """ diff --git a/Framework/PythonInterface/plugins/functions/Examples/Example1DFunction.py b/Framework/PythonInterface/plugins/functions/Examples/Example1DFunction.py index d2bb37e893c3c087170fe411c34bd1e321dfcb36..40f9024e0d6edc077907baa5a18028d77451dad5 100644 --- a/Framework/PythonInterface/plugins/functions/Examples/Example1DFunction.py +++ b/Framework/PythonInterface/plugins/functions/Examples/Example1DFunction.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=no-init,invalid-name """ diff --git a/Framework/PythonInterface/plugins/functions/Examples/ExamplePeakFunction.py b/Framework/PythonInterface/plugins/functions/Examples/ExamplePeakFunction.py index 0da5b71eaf955a8e613418363042dee82d47c373..430587e7e37ce4e203b4199fb08eb72e9b31d5a9 100644 --- a/Framework/PythonInterface/plugins/functions/Examples/ExamplePeakFunction.py +++ b/Framework/PythonInterface/plugins/functions/Examples/ExamplePeakFunction.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=no-init,invalid-name """ diff --git a/Framework/PythonInterface/plugins/functions/FickDiffusion.py b/Framework/PythonInterface/plugins/functions/FickDiffusion.py index a43e87b29209c6c054177bf7c03a6cc4ead5f016..bc599951d58342c6d1cc9255a4f77e7025f614c2 100644 --- a/Framework/PythonInterface/plugins/functions/FickDiffusion.py +++ b/Framework/PythonInterface/plugins/functions/FickDiffusion.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=no-init,invalid-name ''' diff --git a/Framework/PythonInterface/plugins/functions/FmuF.py b/Framework/PythonInterface/plugins/functions/FmuF.py index 9312e753c2d62aba50b692a8570b38349293cefc..119d97eae36abf867ee0ab737c3a1a4a84f21dcd 100644 --- a/Framework/PythonInterface/plugins/functions/FmuF.py +++ b/Framework/PythonInterface/plugins/functions/FmuF.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=invalid-name, anomalous-backslash-in-string, attribute-defined-outside-init diff --git a/Framework/PythonInterface/plugins/functions/GauBroadGauKT.py b/Framework/PythonInterface/plugins/functions/GauBroadGauKT.py index 8a942604715be1c7cc61a64f28b67d942057606a..e37f28a2c68a7eb0060728b9493601162cfee6d6 100644 --- a/Framework/PythonInterface/plugins/functions/GauBroadGauKT.py +++ b/Framework/PythonInterface/plugins/functions/GauBroadGauKT.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=invalid-name, anomalous-backslash-in-string, attribute-defined-outside-init diff --git a/Framework/PythonInterface/plugins/functions/GaussBessel.py b/Framework/PythonInterface/plugins/functions/GaussBessel.py index 03387cb0bdbc798615acbb7ae6f5c6b44f73979c..5eabcb9cc7f3848b55dbb488d0787b563049b43d 100644 --- a/Framework/PythonInterface/plugins/functions/GaussBessel.py +++ b/Framework/PythonInterface/plugins/functions/GaussBessel.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=invalid-name, anomalous-backslash-in-string, attribute-defined-outside-init diff --git a/Framework/PythonInterface/plugins/functions/Guinier.py b/Framework/PythonInterface/plugins/functions/Guinier.py index 1bc1fc5f397b1cbc12f20334d0707e8f4a9bc6fd..46f8ae86e17ddb89224ae0f61bd989cbb8e223ce 100644 --- a/Framework/PythonInterface/plugins/functions/Guinier.py +++ b/Framework/PythonInterface/plugins/functions/Guinier.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=no-init,invalid-name ''' diff --git a/Framework/PythonInterface/plugins/functions/GuinierPorod.py b/Framework/PythonInterface/plugins/functions/GuinierPorod.py index d5a50fb4d5115ddbd63eeb8492f8a7c6be3c1e19..4146d630c7e575c7afdc5e34b46a73fb9095179b 100644 --- a/Framework/PythonInterface/plugins/functions/GuinierPorod.py +++ b/Framework/PythonInterface/plugins/functions/GuinierPorod.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=no-init,invalid-name ''' diff --git a/Framework/PythonInterface/plugins/functions/HallRoss.py b/Framework/PythonInterface/plugins/functions/HallRoss.py index acb2a88590b4addb6a532bc08b5fb126720b28d6..df80753cdeac871a8f4bfb38bac654e2b67aac02 100644 --- a/Framework/PythonInterface/plugins/functions/HallRoss.py +++ b/Framework/PythonInterface/plugins/functions/HallRoss.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=no-init,invalid-name ''' diff --git a/Framework/PythonInterface/plugins/functions/HighTFMuonium.py b/Framework/PythonInterface/plugins/functions/HighTFMuonium.py index aa7a8cab37405f8989115a476b4be4d04884c37c..0a1dedcd5a07ae99c6f8d6d9f4f1bf00d3498436 100644 --- a/Framework/PythonInterface/plugins/functions/HighTFMuonium.py +++ b/Framework/PythonInterface/plugins/functions/HighTFMuonium.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=invalid-name, anomalous-backslash-in-string, attribute-defined-outside-init diff --git a/Framework/PythonInterface/plugins/functions/ICConvoluted.py b/Framework/PythonInterface/plugins/functions/ICConvoluted.py index c55681058abaf776316292852d975558f4bcd42b..97fc3e7263f7962fcaada0dc33d263d807bafc0f 100644 --- a/Framework/PythonInterface/plugins/functions/ICConvoluted.py +++ b/Framework/PythonInterface/plugins/functions/ICConvoluted.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # ICConvoluted.py # diff --git a/Framework/PythonInterface/plugins/functions/Lorentz.py b/Framework/PythonInterface/plugins/functions/Lorentz.py index 921ff71782f7a8473ffb79b97e4c8b6b3c26dfc2..7ec0240cdedecd58f3fce17a5ef08cf9759b24a8 100644 --- a/Framework/PythonInterface/plugins/functions/Lorentz.py +++ b/Framework/PythonInterface/plugins/functions/Lorentz.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=no-init,invalid-name ''' diff --git a/Framework/PythonInterface/plugins/functions/LowTFMuonium.py b/Framework/PythonInterface/plugins/functions/LowTFMuonium.py index d51ef5ee05e72fc9107ccfb4065202aea12f0ab3..cafd73a219a7049a06362fe2780f9272b0de883c 100644 --- a/Framework/PythonInterface/plugins/functions/LowTFMuonium.py +++ b/Framework/PythonInterface/plugins/functions/LowTFMuonium.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=invalid-name, anomalous-backslash-in-string, attribute-defined-outside-init diff --git a/Framework/PythonInterface/plugins/functions/Meier.py b/Framework/PythonInterface/plugins/functions/Meier.py index f2e996ff69dce36ec24fca9d1334ed7a5b7108ff..40117c9dc428f8a9ffd84bc4d09d99e4bf19b0e2 100644 --- a/Framework/PythonInterface/plugins/functions/Meier.py +++ b/Framework/PythonInterface/plugins/functions/Meier.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=invalid-name, anomalous-backslash-in-string, attribute-defined-outside-init diff --git a/Framework/PythonInterface/plugins/functions/ModOsc.py b/Framework/PythonInterface/plugins/functions/ModOsc.py index 858f761d3674965f5437747648b608a2abbff2f5..fa480e0699fb277b9e9a3d4ee8d5c0a77d00b6c9 100644 --- a/Framework/PythonInterface/plugins/functions/ModOsc.py +++ b/Framework/PythonInterface/plugins/functions/ModOsc.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=invalid-name, anomalous-backslash-in-string, attribute-defined-outside-init diff --git a/Framework/PythonInterface/plugins/functions/MsdGauss.py b/Framework/PythonInterface/plugins/functions/MsdGauss.py index 2427ee8fb1aa0a51fbfd201fb4c5a9e9d5dd8f6f..41c38ec0d560db0002fe903a4cd1556a1ea02d81 100644 --- a/Framework/PythonInterface/plugins/functions/MsdGauss.py +++ b/Framework/PythonInterface/plugins/functions/MsdGauss.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=no-init,invalid-name ''' diff --git a/Framework/PythonInterface/plugins/functions/MsdPeters.py b/Framework/PythonInterface/plugins/functions/MsdPeters.py index 9974d21ec72df219503536a556219a5e35656c07..62ab90e01b11d307487a5cb9883b65c73b4ea1ed 100644 --- a/Framework/PythonInterface/plugins/functions/MsdPeters.py +++ b/Framework/PythonInterface/plugins/functions/MsdPeters.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=no-init,invalid-name ''' diff --git a/Framework/PythonInterface/plugins/functions/MsdYi.py b/Framework/PythonInterface/plugins/functions/MsdYi.py index 3e92154c30074bd59135b1da19897c175ad7f517..137eaea4417026cbe4ec5ed9796a6596e6bc722d 100644 --- a/Framework/PythonInterface/plugins/functions/MsdYi.py +++ b/Framework/PythonInterface/plugins/functions/MsdYi.py @@ -1,17 +1,9 @@ -''' -@author Spencer Howells, ISIS -@date December 05, 2013 - -Copyright © 2007-8 ISIS Rutherford Appleton Laboratory, -NScD Oak Ridge National Laboratory & European Spallation Source - -pylint: disable=no-init,invalid-name - -This file is part of Mantid. -Mantid Repository : https://github.com/mantidproject/mantid -File change history is stored at: <https://github.com/mantidproject/mantid> -Code Documentation is available at: <http://doxygen.mantidproject.org> -''' +# Mantid Repository : https://github.com/mantidproject/mantid +# +# Copyright © 2007-8 ISIS Rutherford Appleton Laboratory UKRI, +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS +# SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) import math import numpy as np diff --git a/Framework/PythonInterface/plugins/functions/MuH.py b/Framework/PythonInterface/plugins/functions/MuH.py index 966322a83c63b410834d4b021afd6c66e9e638be..b270f375162b3a8d2c59a5354884ec9975691751 100644 --- a/Framework/PythonInterface/plugins/functions/MuH.py +++ b/Framework/PythonInterface/plugins/functions/MuH.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=invalid-name, anomalous-backslash-in-string, attribute-defined-outside-init diff --git a/Framework/PythonInterface/plugins/functions/MuMinusExpTF.py b/Framework/PythonInterface/plugins/functions/MuMinusExpTF.py index 4e1b2ce7bb697107e95b8ee23418b63bfa49b61e..bff6af459d03a059866307e1ce3772a227be6d66 100644 --- a/Framework/PythonInterface/plugins/functions/MuMinusExpTF.py +++ b/Framework/PythonInterface/plugins/functions/MuMinusExpTF.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=invalid-name, anomalous-backslash-in-string, attribute-defined-outside-init diff --git a/Framework/PythonInterface/plugins/functions/PCRmagRedfield.py b/Framework/PythonInterface/plugins/functions/PCRmagRedfield.py index a14cbb3868290df88e3be7b83256c21c593d658d..ae46b2e3db23b79a999d253205184b1c83063e0e 100644 --- a/Framework/PythonInterface/plugins/functions/PCRmagRedfield.py +++ b/Framework/PythonInterface/plugins/functions/PCRmagRedfield.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=invalid-name, anomalous-backslash-in-string, attribute-defined-outside-init diff --git a/Framework/PythonInterface/plugins/functions/PCRmagnet.py b/Framework/PythonInterface/plugins/functions/PCRmagnet.py index 7f97d04cc1edaaf02af67dba7f587156593ae70d..b17ea80584bfa47e874d8cc47b6bff290e3ca842 100644 --- a/Framework/PythonInterface/plugins/functions/PCRmagnet.py +++ b/Framework/PythonInterface/plugins/functions/PCRmagnet.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=invalid-name, anomalous-backslash-in-string, attribute-defined-outside-init diff --git a/Framework/PythonInterface/plugins/functions/PCRmagnetZFKT.py b/Framework/PythonInterface/plugins/functions/PCRmagnetZFKT.py index 4a7a5ac7eb576a066362a2f3c67d7e56867c3efb..a13a572b42c5ed1dfb7abe714058a461c7bf73e2 100644 --- a/Framework/PythonInterface/plugins/functions/PCRmagnetZFKT.py +++ b/Framework/PythonInterface/plugins/functions/PCRmagnetZFKT.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=invalid-name, anomalous-backslash-in-string, attribute-defined-outside-init diff --git a/Framework/PythonInterface/plugins/functions/PCRmagnetfnorm.py b/Framework/PythonInterface/plugins/functions/PCRmagnetfnorm.py index 7caf87979b1e241e7c994543487bf9ce83b84757..f028751734755afa5f662485d2e281432f928060 100644 --- a/Framework/PythonInterface/plugins/functions/PCRmagnetfnorm.py +++ b/Framework/PythonInterface/plugins/functions/PCRmagnetfnorm.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=invalid-name, anomalous-backslash-in-string, attribute-defined-outside-init diff --git a/Framework/PythonInterface/plugins/functions/Porod.py b/Framework/PythonInterface/plugins/functions/Porod.py index 545e56720b0f3c04bdc0daffedebd2377e9ecd32..e29a5c975791f7d67fd871dbf4de821c1b4ab388 100644 --- a/Framework/PythonInterface/plugins/functions/Porod.py +++ b/Framework/PythonInterface/plugins/functions/Porod.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=no-init,invalid-name ''' diff --git a/Framework/PythonInterface/plugins/functions/PrimStretchedExpFT.py b/Framework/PythonInterface/plugins/functions/PrimStretchedExpFT.py index 296959e6fd0f2b3f61ecd55ea29f71cdb76aeb01..6b173fda85b551d42072ca678f8e2ce360dcb443 100644 --- a/Framework/PythonInterface/plugins/functions/PrimStretchedExpFT.py +++ b/Framework/PythonInterface/plugins/functions/PrimStretchedExpFT.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=invalid-name, anomalous-backslash-in-string, attribute-defined-outside-init diff --git a/Framework/PythonInterface/plugins/functions/RFresonance.py b/Framework/PythonInterface/plugins/functions/RFresonance.py index e6b381f41a80f6d9de7d4d762c4b300fec0dafa2..6e510ea83f73138bd46d1cddde406f60c4562550 100644 --- a/Framework/PythonInterface/plugins/functions/RFresonance.py +++ b/Framework/PythonInterface/plugins/functions/RFresonance.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=invalid-name, anomalous-backslash-in-string, attribute-defined-outside-init diff --git a/Framework/PythonInterface/plugins/functions/Redfield.py b/Framework/PythonInterface/plugins/functions/Redfield.py index 2b69ae550395407310a2032e4cc84bd74b6ff636..ebea31459295163d948437351f0f8df24ad4af04 100644 --- a/Framework/PythonInterface/plugins/functions/Redfield.py +++ b/Framework/PythonInterface/plugins/functions/Redfield.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=invalid-name, anomalous-backslash-in-string, attribute-defined-outside-init diff --git a/Framework/PythonInterface/plugins/functions/SCgapSwave.py b/Framework/PythonInterface/plugins/functions/SCgapSwave.py index 1e85cd0c251842e9cf521903784c8c6a904db44a..c0376c412a66d7cee7703ef5ba25b20620c34849 100644 --- a/Framework/PythonInterface/plugins/functions/SCgapSwave.py +++ b/Framework/PythonInterface/plugins/functions/SCgapSwave.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=invalid-name, anomalous-backslash-in-string, attribute-defined-outside-init diff --git a/Framework/PythonInterface/plugins/functions/SpinGlass.py b/Framework/PythonInterface/plugins/functions/SpinGlass.py index 94da0e05339d3b59b3a249363662d01649bedf89..a8749d37184d401ef69390a483e0140b5f6b4192 100644 --- a/Framework/PythonInterface/plugins/functions/SpinGlass.py +++ b/Framework/PythonInterface/plugins/functions/SpinGlass.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=invalid-name, anomalous-backslash-in-string, attribute-defined-outside-init diff --git a/Framework/PythonInterface/plugins/functions/StandardSC.py b/Framework/PythonInterface/plugins/functions/StandardSC.py index 1d4c3a5279136dac3b2b456ea8978e7685a3dd02..c2d13bde5b509f2d1d4fda0d248bbe92bfe5d150 100644 --- a/Framework/PythonInterface/plugins/functions/StandardSC.py +++ b/Framework/PythonInterface/plugins/functions/StandardSC.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=invalid-name, anomalous-backslash-in-string, attribute-defined-outside-init diff --git a/Framework/PythonInterface/plugins/functions/StaticLorentzianKT.py b/Framework/PythonInterface/plugins/functions/StaticLorentzianKT.py index ac7ffb36671fbde4c1b54bf71975b48fa249857f..ce7736775344bb87dda2eb8ef93edf35e27be69d 100644 --- a/Framework/PythonInterface/plugins/functions/StaticLorentzianKT.py +++ b/Framework/PythonInterface/plugins/functions/StaticLorentzianKT.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=invalid-name, anomalous-backslash-in-string, attribute-defined-outside-init diff --git a/Framework/PythonInterface/plugins/functions/StretchedExpFT.py b/Framework/PythonInterface/plugins/functions/StretchedExpFT.py index ad32d59bf89df2da95d4ed0f1e1bc4733a28b212..3def86307f0d831cbe0e732330a9b01fd95fcc3e 100644 --- a/Framework/PythonInterface/plugins/functions/StretchedExpFT.py +++ b/Framework/PythonInterface/plugins/functions/StretchedExpFT.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=invalid-name, anomalous-backslash-in-string, attribute-defined-outside-init diff --git a/Framework/PythonInterface/plugins/functions/StretchedExpFTHelper.py b/Framework/PythonInterface/plugins/functions/StretchedExpFTHelper.py index 2422dc871d78009be5d12549eccc707781b3d9d4..9d9280e2a2f395367ad7bfc6a54447b3c39eb87c 100644 --- a/Framework/PythonInterface/plugins/functions/StretchedExpFTHelper.py +++ b/Framework/PythonInterface/plugins/functions/StretchedExpFTHelper.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=invalid-name, anomalous-backslash-in-string, attribute-defined-outside-init diff --git a/Framework/PythonInterface/plugins/functions/StretchedKT.py b/Framework/PythonInterface/plugins/functions/StretchedKT.py index 5ee3b4b9bd782fa0482fd26ea38ff3ba5457107c..7b0d7d56f8613dc977badb2c9a5a5028804d8563 100644 --- a/Framework/PythonInterface/plugins/functions/StretchedKT.py +++ b/Framework/PythonInterface/plugins/functions/StretchedKT.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=invalid-name, anomalous-backslash-in-string, attribute-defined-outside-init diff --git a/Framework/PythonInterface/plugins/functions/TFMuonium.py b/Framework/PythonInterface/plugins/functions/TFMuonium.py index eb699a1f59b7e4794fc6f5ee76edd041a3328572..500af1e50ab9f53d89a708790ea3b3518f833bec 100644 --- a/Framework/PythonInterface/plugins/functions/TFMuonium.py +++ b/Framework/PythonInterface/plugins/functions/TFMuonium.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=invalid-name, anomalous-backslash-in-string, attribute-defined-outside-init diff --git a/Framework/PythonInterface/plugins/functions/TeixeiraWater.py b/Framework/PythonInterface/plugins/functions/TeixeiraWater.py index 05850d94cde3834895b4637ec3505318674d9da4..f047c648243d1a700f74a07d12474846f877c0c8 100644 --- a/Framework/PythonInterface/plugins/functions/TeixeiraWater.py +++ b/Framework/PythonInterface/plugins/functions/TeixeiraWater.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=no-init,invalid-name ''' diff --git a/Framework/PythonInterface/plugins/functions/ZFMuonium.py b/Framework/PythonInterface/plugins/functions/ZFMuonium.py index 9c045d56e54e024313cef462e0591dae44ecb34b..d3eedd95571931370e41aee7bac4b298e1f93d3c 100644 --- a/Framework/PythonInterface/plugins/functions/ZFMuonium.py +++ b/Framework/PythonInterface/plugins/functions/ZFMuonium.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=invalid-name, anomalous-backslash-in-string, attribute-defined-outside-init diff --git a/Framework/PythonInterface/plugins/functions/ZFdipole.py b/Framework/PythonInterface/plugins/functions/ZFdipole.py index d8fb1033f0c24d24017172096e6225b17a568b6d..c50825bbaf67ed51a505bbd043439f36eb00fb80 100644 --- a/Framework/PythonInterface/plugins/functions/ZFdipole.py +++ b/Framework/PythonInterface/plugins/functions/ZFdipole.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=invalid-name, anomalous-backslash-in-string, attribute-defined-outside-init diff --git a/Framework/PythonInterface/plugins/functions/ZFelectronDipole.py b/Framework/PythonInterface/plugins/functions/ZFelectronDipole.py index 18e66289c54b1788c717547462e6fa4e1d70d5e8..fc14c082289172f937c42db1c09417cb3ab11554 100644 --- a/Framework/PythonInterface/plugins/functions/ZFelectronDipole.py +++ b/Framework/PythonInterface/plugins/functions/ZFelectronDipole.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=invalid-name, anomalous-backslash-in-string, attribute-defined-outside-init diff --git a/Framework/PythonInterface/plugins/functions/ZFprotonDipole.py b/Framework/PythonInterface/plugins/functions/ZFprotonDipole.py index f2501836a9a37a7d5fc80c5e4034cf053614816e..d40ac7268b3cca86b86504a782554878204740c9 100644 --- a/Framework/PythonInterface/plugins/functions/ZFprotonDipole.py +++ b/Framework/PythonInterface/plugins/functions/ZFprotonDipole.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=invalid-name, anomalous-backslash-in-string, attribute-defined-outside-init diff --git a/Framework/PythonInterface/test/cpp/FunctionAdapterTestCommon.h b/Framework/PythonInterface/test/cpp/FunctionAdapterTestCommon.h index 73377197af5776e0f891b610ede57d603d2ea5d6..69f5bd593602d551b52f3d242bf3377bc7ac9edb 100644 --- a/Framework/PythonInterface/test/cpp/FunctionAdapterTestCommon.h +++ b/Framework/PythonInterface/test/cpp/FunctionAdapterTestCommon.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/PythonInterface/test/cpp/IFunction1DAdapterTest.h b/Framework/PythonInterface/test/cpp/IFunction1DAdapterTest.h index 41f924d888a42d1831ffe1ff43904ca2c5ab01e8..2d147bc0060621a3cdf0fdecf6197da57436c693 100644 --- a/Framework/PythonInterface/test/cpp/IFunction1DAdapterTest.h +++ b/Framework/PythonInterface/test/cpp/IFunction1DAdapterTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/PythonInterface/test/cpp/IPeakFunctionAdapterTest.h b/Framework/PythonInterface/test/cpp/IPeakFunctionAdapterTest.h index 0961726d84431b1389580b4e9d60c3fddff9dcaa..5977b4fe7c8dd331082092fca7b88e7dbca1a081 100644 --- a/Framework/PythonInterface/test/cpp/IPeakFunctionAdapterTest.h +++ b/Framework/PythonInterface/test/cpp/IPeakFunctionAdapterTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/PythonInterface/test/cpp/PropertyWithValueFactoryTest.h b/Framework/PythonInterface/test/cpp/PropertyWithValueFactoryTest.h index dc967832f5b2b2bf879c5ff13a7d4d37141e230f..76f116adb253ba7e01c013ad140bffb4867a580e 100644 --- a/Framework/PythonInterface/test/cpp/PropertyWithValueFactoryTest.h +++ b/Framework/PythonInterface/test/cpp/PropertyWithValueFactoryTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/PythonInterface/test/cpp/PySequenceToVectorTest.h b/Framework/PythonInterface/test/cpp/PySequenceToVectorTest.h index ad91fbec841017836708d458b936de476a39dbe7..009656642135ff92ae95874e65bd7718ec9b646d 100644 --- a/Framework/PythonInterface/test/cpp/PySequenceToVectorTest.h +++ b/Framework/PythonInterface/test/cpp/PySequenceToVectorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/PythonInterface/test/cpp/PythonAlgorithmInstantiatorTest.h b/Framework/PythonInterface/test/cpp/PythonAlgorithmInstantiatorTest.h index 0066ed724640c42a7e11fa4e1b93aa930c3aead1..fb71489361ed5267f32247acf02b3a174a8a4bfe 100644 --- a/Framework/PythonInterface/test/cpp/PythonAlgorithmInstantiatorTest.h +++ b/Framework/PythonInterface/test/cpp/PythonAlgorithmInstantiatorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/PythonInterface/test/cpp/PythonInterfaceCppTestInitialization.h b/Framework/PythonInterface/test/cpp/PythonInterfaceCppTestInitialization.h index 3ce494e46df5240c9adb0a88b5774a936652e897..98c571ae35ac25e2bd2eb08e60a5577288a0118e 100644 --- a/Framework/PythonInterface/test/cpp/PythonInterfaceCppTestInitialization.h +++ b/Framework/PythonInterface/test/cpp/PythonInterfaceCppTestInitialization.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/PythonInterface/test/cpp/RunPythonScriptTest.h b/Framework/PythonInterface/test/cpp/RunPythonScriptTest.h index 4e130746411a393a1f5db9640b5ad7cd672a6214..77239d7e4879beb3aa378d58e4b5dec33aed47de 100644 --- a/Framework/PythonInterface/test/cpp/RunPythonScriptTest.h +++ b/Framework/PythonInterface/test/cpp/RunPythonScriptTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/PythonInterface/test/cpp/ToPyListTest.h b/Framework/PythonInterface/test/cpp/ToPyListTest.h index f099e27175bfc531f5def2774ffcff87c0ed4078..5832f31ae5842c4985d879737bf759fc4cf767f5 100644 --- a/Framework/PythonInterface/test/cpp/ToPyListTest.h +++ b/Framework/PythonInterface/test/cpp/ToPyListTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/PythonInterface/test/python/mantid/FitFunctionsTest.py b/Framework/PythonInterface/test/python/mantid/FitFunctionsTest.py index e0fa6bb1050e2075bae59d163ba0455d60ac6a0f..8616c4eb5fd89fac58fce104e6ad673dda5eda68 100644 --- a/Framework/PythonInterface/test/python/mantid/FitFunctionsTest.py +++ b/Framework/PythonInterface/test/python/mantid/FitFunctionsTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + """ Test of fitfunctions.py and related classes diff --git a/Framework/PythonInterface/test/python/mantid/ImportModuleTest.py b/Framework/PythonInterface/test/python/mantid/ImportModuleTest.py index 3a7abc385514ef0bbe858c80288aaa0946dc7740..79b98ee28707d9b555f60dffe82d87d9b3c73ea2 100644 --- a/Framework/PythonInterface/test/python/mantid/ImportModuleTest.py +++ b/Framework/PythonInterface/test/python/mantid/ImportModuleTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/PVPythonTest.py b/Framework/PythonInterface/test/python/mantid/PVPythonTest.py index af9d0fb63a5c673391bd3f7b1a52d8ea2715849c..2549fdcb8826e3b5f4740eab8f4d85e8b3e2ff87 100644 --- a/Framework/PythonInterface/test/python/mantid/PVPythonTest.py +++ b/Framework/PythonInterface/test/python/mantid/PVPythonTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) import unittest diff --git a/Framework/PythonInterface/test/python/mantid/SimpleAPIFitTest.py b/Framework/PythonInterface/test/python/mantid/SimpleAPIFitTest.py index 8a9e1857c6115a55b435b6420437805f0c625eb6..e759c2a3f66710d56bbba454fb794373cdff03b3 100644 --- a/Framework/PythonInterface/test/python/mantid/SimpleAPIFitTest.py +++ b/Framework/PythonInterface/test/python/mantid/SimpleAPIFitTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + """ Specifically tests the Fit function in the simple API diff --git a/Framework/PythonInterface/test/python/mantid/SimpleAPILoadTest.py b/Framework/PythonInterface/test/python/mantid/SimpleAPILoadTest.py index 6c6a3211a9e10317d236fbfc6d0e375a6f8100aa..5c23b5ce43fa6ec149df619848363a1749931a23 100644 --- a/Framework/PythonInterface/test/python/mantid/SimpleAPILoadTest.py +++ b/Framework/PythonInterface/test/python/mantid/SimpleAPILoadTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + """ Specifically tests the Load function in the simple API diff --git a/Framework/PythonInterface/test/python/mantid/SimpleAPIRenameWorkspaceTest.py b/Framework/PythonInterface/test/python/mantid/SimpleAPIRenameWorkspaceTest.py index 48fc6b6b49cc8ed56337d34f49a48ce995743424..992ff4e7fa35e6b612427ba40b7d9ce99eba0adb 100644 --- a/Framework/PythonInterface/test/python/mantid/SimpleAPIRenameWorkspaceTest.py +++ b/Framework/PythonInterface/test/python/mantid/SimpleAPIRenameWorkspaceTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + """ Specifically tests the RenameWorkspace algorithm in the simple API diff --git a/Framework/PythonInterface/test/python/mantid/SimpleAPITest.py b/Framework/PythonInterface/test/python/mantid/SimpleAPITest.py index 7090dc97e2d5c745b49a4a8af2108d43157a86fa..e35c8fa0360cbad29f730e3bdaef9c8093a3113e 100644 --- a/Framework/PythonInterface/test/python/mantid/SimpleAPITest.py +++ b/Framework/PythonInterface/test/python/mantid/SimpleAPITest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/_plugins/ProductFunctionTest.py b/Framework/PythonInterface/test/python/mantid/_plugins/ProductFunctionTest.py index 8c75c7eee9e6b1b7385c5d4dd1b1c1cbeca3eb36..7cf1b0b6cd016bd934512b2dfd87f81ffdc9c06f 100644 --- a/Framework/PythonInterface/test/python/mantid/_plugins/ProductFunctionTest.py +++ b/Framework/PythonInterface/test/python/mantid/_plugins/ProductFunctionTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=invalid-name, too-many-public-methods from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/api/ADSValidatorTest.py b/Framework/PythonInterface/test/python/mantid/api/ADSValidatorTest.py index 54ab78e45a43082db1a53bc5cfad9e145135f390..1fd716b2d6634aabcb0c419d32e4458252a24e38 100644 --- a/Framework/PythonInterface/test/python/mantid/api/ADSValidatorTest.py +++ b/Framework/PythonInterface/test/python/mantid/api/ADSValidatorTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + import unittest import testhelpers diff --git a/Framework/PythonInterface/test/python/mantid/api/AlgorithmFactoryObserverTest.py b/Framework/PythonInterface/test/python/mantid/api/AlgorithmFactoryObserverTest.py index b6b28c6a0479bd96da6351c7cc9372c7a7d45ab9..67b6c5e9f34a0a82178e0726d23fda73e48f14be 100644 --- a/Framework/PythonInterface/test/python/mantid/api/AlgorithmFactoryObserverTest.py +++ b/Framework/PythonInterface/test/python/mantid/api/AlgorithmFactoryObserverTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package # diff --git a/Framework/PythonInterface/test/python/mantid/api/AlgorithmFactoryTest.py b/Framework/PythonInterface/test/python/mantid/api/AlgorithmFactoryTest.py index c0a7c0d843c42f4adea0b6072d8e9c1401b0f7af..0af3a2b856edd463156985ecc009399a4a666c1d 100644 --- a/Framework/PythonInterface/test/python/mantid/api/AlgorithmFactoryTest.py +++ b/Framework/PythonInterface/test/python/mantid/api/AlgorithmFactoryTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/api/AlgorithmHistoryTest.py b/Framework/PythonInterface/test/python/mantid/api/AlgorithmHistoryTest.py index 271507c0935923178d277c4402e050c66de28fb6..30c8f8e6960e49932a0eb127c56ac59d2895e9d8 100644 --- a/Framework/PythonInterface/test/python/mantid/api/AlgorithmHistoryTest.py +++ b/Framework/PythonInterface/test/python/mantid/api/AlgorithmHistoryTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/api/AlgorithmManagerTest.py b/Framework/PythonInterface/test/python/mantid/api/AlgorithmManagerTest.py index 3c20424da10e742684e39ab142716e81f6028571..f78decc2c57eb71e11bf424a0e2bf4187f78bcdb 100644 --- a/Framework/PythonInterface/test/python/mantid/api/AlgorithmManagerTest.py +++ b/Framework/PythonInterface/test/python/mantid/api/AlgorithmManagerTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) @@ -44,10 +44,11 @@ class AlgorithmManagerTest(unittest.TestCase): self.assertTrue(isinstance(alg, Algorithm)) def test_size_reports_number_of_managed_algorithms(self): - old_size = AlgorithmManager.size() - new_alg = AlgorithmManager.create("ConvertUnits") - new_size = AlgorithmManager.size() - self.assertEqual(new_size, old_size + 1) + # no longer deterministically possible to have a correct answer for size + # if test are run multi threaded + # just check we got an integer back + size = AlgorithmManager.size() + self.assertTrue(isinstance(size, int)) def test_getAlgorithm_returns_correct_instance(self): returned_instance = AlgorithmManager.create("ConvertUnits") diff --git a/Framework/PythonInterface/test/python/mantid/api/AlgorithmPropertyTest.py b/Framework/PythonInterface/test/python/mantid/api/AlgorithmPropertyTest.py index 9789e173ca04e9b5f3e6a9364aeb2ff85ec727b5..9452ae0ccbd9a0c827a3124380020ead5eb2f9fb 100644 --- a/Framework/PythonInterface/test/python/mantid/api/AlgorithmPropertyTest.py +++ b/Framework/PythonInterface/test/python/mantid/api/AlgorithmPropertyTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/api/AlgorithmTest.py b/Framework/PythonInterface/test/python/mantid/api/AlgorithmTest.py index ae7eb140160a0abf08c7bb235a6f56e953112774..f0b0ef308011d938c23423698259edcc61fb02c8 100644 --- a/Framework/PythonInterface/test/python/mantid/api/AlgorithmTest.py +++ b/Framework/PythonInterface/test/python/mantid/api/AlgorithmTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) import six diff --git a/Framework/PythonInterface/test/python/mantid/api/AnalysisDataServiceObserverTest.py b/Framework/PythonInterface/test/python/mantid/api/AnalysisDataServiceObserverTest.py index 07e6e022a3271a60182cf5fb5368fc44d44a4f08..90c0e5f4a8f069440fbe5674c471207fb2390bdd 100644 --- a/Framework/PythonInterface/test/python/mantid/api/AnalysisDataServiceObserverTest.py +++ b/Framework/PythonInterface/test/python/mantid/api/AnalysisDataServiceObserverTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package # diff --git a/Framework/PythonInterface/test/python/mantid/api/AnalysisDataServiceTest.py b/Framework/PythonInterface/test/python/mantid/api/AnalysisDataServiceTest.py index 2c75b92c4183f18ccf008bbb27f48ff55ccf24e8..3ecb6b16a715705d6ffd983983c19edc20ed9249 100644 --- a/Framework/PythonInterface/test/python/mantid/api/AnalysisDataServiceTest.py +++ b/Framework/PythonInterface/test/python/mantid/api/AnalysisDataServiceTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/api/AxisTest.py b/Framework/PythonInterface/test/python/mantid/api/AxisTest.py index 453ab0874330b259819f014226cba90e20e534ad..1a69080a3ddcc371acc303c0ae1b3c3371295700 100644 --- a/Framework/PythonInterface/test/python/mantid/api/AxisTest.py +++ b/Framework/PythonInterface/test/python/mantid/api/AxisTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/api/CatalogManagerTest.py b/Framework/PythonInterface/test/python/mantid/api/CatalogManagerTest.py index b85ceb7baf0757e8ed5a6abec54e04e82c97be2c..a0496c6c1b26fe48fb633e686f78e807dfc0bcd1 100644 --- a/Framework/PythonInterface/test/python/mantid/api/CatalogManagerTest.py +++ b/Framework/PythonInterface/test/python/mantid/api/CatalogManagerTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/api/CompositeFunctionTest.py b/Framework/PythonInterface/test/python/mantid/api/CompositeFunctionTest.py index 965d801071ef9e483119471c179062ce7fa4952b..16b78067c6b7d8ad00bddbead4bd6ec2adbf6e16 100644 --- a/Framework/PythonInterface/test/python/mantid/api/CompositeFunctionTest.py +++ b/Framework/PythonInterface/test/python/mantid/api/CompositeFunctionTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/api/DataProcessorAlgorithmTest.py b/Framework/PythonInterface/test/python/mantid/api/DataProcessorAlgorithmTest.py index 58c293976b1f2c54e644a55e2109eaac5e1876b5..31bee3311c5ca7f52bc0758bd95554fe7699522b 100644 --- a/Framework/PythonInterface/test/python/mantid/api/DataProcessorAlgorithmTest.py +++ b/Framework/PythonInterface/test/python/mantid/api/DataProcessorAlgorithmTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/api/DeprecatedAlgorithmCheckerTest.py b/Framework/PythonInterface/test/python/mantid/api/DeprecatedAlgorithmCheckerTest.py index 0df12e8bb1d214b56db76fe61f1c4dae437000b0..3b835a41fd3abb857d44b34c7ec66f81232847d2 100644 --- a/Framework/PythonInterface/test/python/mantid/api/DeprecatedAlgorithmCheckerTest.py +++ b/Framework/PythonInterface/test/python/mantid/api/DeprecatedAlgorithmCheckerTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/api/ExperimentInfoTest.py b/Framework/PythonInterface/test/python/mantid/api/ExperimentInfoTest.py index 8e47bd74321cfe89f72545083f6092abd3c6b373..c97d362966ff2af67dbafce1b4c83753e3a3d55b 100644 --- a/Framework/PythonInterface/test/python/mantid/api/ExperimentInfoTest.py +++ b/Framework/PythonInterface/test/python/mantid/api/ExperimentInfoTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/api/FileFinderTest.py b/Framework/PythonInterface/test/python/mantid/api/FileFinderTest.py index 8552373c9a5380869feab3fd6d918d94e82e5f92..cab2bb7ae26410d3961e3c9c5fb19546b143183f 100644 --- a/Framework/PythonInterface/test/python/mantid/api/FileFinderTest.py +++ b/Framework/PythonInterface/test/python/mantid/api/FileFinderTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/api/FilePropertyTest.py b/Framework/PythonInterface/test/python/mantid/api/FilePropertyTest.py index a159fb56658483f4bfa075d65d8d7b7afe91bb80..cc7459dbac368bc023f502f334ff26c1cd928c47 100644 --- a/Framework/PythonInterface/test/python/mantid/api/FilePropertyTest.py +++ b/Framework/PythonInterface/test/python/mantid/api/FilePropertyTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/api/FrameworkManagerTest.py b/Framework/PythonInterface/test/python/mantid/api/FrameworkManagerTest.py index 58ba56c79971e4d4925b72dc86c9df885edc290f..add99b12ca7bcb783318dd20ca27d2605e1bb18c 100644 --- a/Framework/PythonInterface/test/python/mantid/api/FrameworkManagerTest.py +++ b/Framework/PythonInterface/test/python/mantid/api/FrameworkManagerTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/api/FunctionFactoryTest.py b/Framework/PythonInterface/test/python/mantid/api/FunctionFactoryTest.py index dfdbe3cd81e4cec38acd1f3ef0344d7ee3315975..12e0f1a50fdbc28520e5dccca302b3bbbacb69cb 100644 --- a/Framework/PythonInterface/test/python/mantid/api/FunctionFactoryTest.py +++ b/Framework/PythonInterface/test/python/mantid/api/FunctionFactoryTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/api/FunctionPropertyTest.py b/Framework/PythonInterface/test/python/mantid/api/FunctionPropertyTest.py index 4871304c00f1c5ecf12026fcdb4dd46985e500ec..9d9b20383e9ba0b649715e9bb38904ed9cdfb877 100644 --- a/Framework/PythonInterface/test/python/mantid/api/FunctionPropertyTest.py +++ b/Framework/PythonInterface/test/python/mantid/api/FunctionPropertyTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/api/IEventWorkspaceTest.py b/Framework/PythonInterface/test/python/mantid/api/IEventWorkspaceTest.py index e66cbe29eeeb69043c06c2aecbedf0f7a9aecf16..fe8f99db7b03104e375783bf26bd8841e30a6e52 100644 --- a/Framework/PythonInterface/test/python/mantid/api/IEventWorkspaceTest.py +++ b/Framework/PythonInterface/test/python/mantid/api/IEventWorkspaceTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/api/IFunction1DTest.py b/Framework/PythonInterface/test/python/mantid/api/IFunction1DTest.py index 24655c46b68fb3a8c5e1d01784eed7d23884f2ce..7519e19df1482c25208435f6b6783495c63d4e7c 100644 --- a/Framework/PythonInterface/test/python/mantid/api/IFunction1DTest.py +++ b/Framework/PythonInterface/test/python/mantid/api/IFunction1DTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/api/IMaskWorkspaceTest.py b/Framework/PythonInterface/test/python/mantid/api/IMaskWorkspaceTest.py index 9d4a6360ea289962dadc3932465213068c6a4906..21d07404733f433ea53995e64bde9e0fa3149b69 100644 --- a/Framework/PythonInterface/test/python/mantid/api/IMaskWorkspaceTest.py +++ b/Framework/PythonInterface/test/python/mantid/api/IMaskWorkspaceTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/api/IPeakFunctionTest.py b/Framework/PythonInterface/test/python/mantid/api/IPeakFunctionTest.py index 77f9253c48002ad9b4bf9ff2e9d80d22caec4911..5e35f5b4cc9bf5c1cccaefd0736116e3f1d97614 100644 --- a/Framework/PythonInterface/test/python/mantid/api/IPeakFunctionTest.py +++ b/Framework/PythonInterface/test/python/mantid/api/IPeakFunctionTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/api/IPeaksWorkspaceTest.py b/Framework/PythonInterface/test/python/mantid/api/IPeaksWorkspaceTest.py index fa2174686c2e220bfb67efa2453029efdf78b060..b70d165782384ce1daacfe1484b28dce6313edff 100644 --- a/Framework/PythonInterface/test/python/mantid/api/IPeaksWorkspaceTest.py +++ b/Framework/PythonInterface/test/python/mantid/api/IPeaksWorkspaceTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/api/ITableWorkspaceTest.py b/Framework/PythonInterface/test/python/mantid/api/ITableWorkspaceTest.py index ed52b2e82b08c813e9f52204cee5823454e2d8c8..46a88016621e2166061c8174a3f1a3987efce6c9 100644 --- a/Framework/PythonInterface/test/python/mantid/api/ITableWorkspaceTest.py +++ b/Framework/PythonInterface/test/python/mantid/api/ITableWorkspaceTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/api/JacobianTest.py b/Framework/PythonInterface/test/python/mantid/api/JacobianTest.py index a2f42ea28708af502b41e5f6a9e94dcdb8743627..e9b23083f73ab669dd27d9caaa2d72e340880a0c 100644 --- a/Framework/PythonInterface/test/python/mantid/api/JacobianTest.py +++ b/Framework/PythonInterface/test/python/mantid/api/JacobianTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/api/MDEventWorkspaceTest.py b/Framework/PythonInterface/test/python/mantid/api/MDEventWorkspaceTest.py index 06cb48d324e08c0db84ad9bbf842652a4148346a..192106176893e2c2f449b73a9b11f398d04f153b 100644 --- a/Framework/PythonInterface/test/python/mantid/api/MDEventWorkspaceTest.py +++ b/Framework/PythonInterface/test/python/mantid/api/MDEventWorkspaceTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/api/MDGeometryTest.py b/Framework/PythonInterface/test/python/mantid/api/MDGeometryTest.py index e8551a6eb00ddae7539d7b807461036c1566e907..2347b99b8b7be4800e97fed343d7a1febedbfe17 100644 --- a/Framework/PythonInterface/test/python/mantid/api/MDGeometryTest.py +++ b/Framework/PythonInterface/test/python/mantid/api/MDGeometryTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/api/MDHistoWorkspaceTest.py b/Framework/PythonInterface/test/python/mantid/api/MDHistoWorkspaceTest.py index 0d22a65c619a7c2a3c1ac4b03a8e82379b538a10..b15eb400f70322eb855b36000f813f2bf2c2010c 100644 --- a/Framework/PythonInterface/test/python/mantid/api/MDHistoWorkspaceTest.py +++ b/Framework/PythonInterface/test/python/mantid/api/MDHistoWorkspaceTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/api/MatrixWorkspaceTest.py b/Framework/PythonInterface/test/python/mantid/api/MatrixWorkspaceTest.py index 82fbdf900bd6cfb924cd4bcc622a9823c67cf130..57dfbf4b1c8a743c26c2ab03c6a226dfa779ab0a 100644 --- a/Framework/PythonInterface/test/python/mantid/api/MatrixWorkspaceTest.py +++ b/Framework/PythonInterface/test/python/mantid/api/MatrixWorkspaceTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/api/MultipleExperimentInfos.py b/Framework/PythonInterface/test/python/mantid/api/MultipleExperimentInfos.py index 5356987f7cd84389accd241d01b07849e601d1c8..585a0a7d2de0eb4b5d4a1d558026409786df9c55 100644 --- a/Framework/PythonInterface/test/python/mantid/api/MultipleExperimentInfos.py +++ b/Framework/PythonInterface/test/python/mantid/api/MultipleExperimentInfos.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/api/MultipleFilePropertyTest.py b/Framework/PythonInterface/test/python/mantid/api/MultipleFilePropertyTest.py index aa35654e6a9139c74052f5684120593b76ff72d8..dc0408a761c1775d1bd5075004e72f6b7b175900 100644 --- a/Framework/PythonInterface/test/python/mantid/api/MultipleFilePropertyTest.py +++ b/Framework/PythonInterface/test/python/mantid/api/MultipleFilePropertyTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/api/ProgressTest.py b/Framework/PythonInterface/test/python/mantid/api/ProgressTest.py index 78342693e993fbbeba0a241be5181a0c099d63d0..ef8ee10371476038ab4524b77b7929e74a454fd5 100644 --- a/Framework/PythonInterface/test/python/mantid/api/ProgressTest.py +++ b/Framework/PythonInterface/test/python/mantid/api/ProgressTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/api/ProjectionTest.py b/Framework/PythonInterface/test/python/mantid/api/ProjectionTest.py index 0d37e39f8cac90622f5c5b675a505777be9a4196..cef2eb0f3f1b4747e65e6acf226477701549df6b 100644 --- a/Framework/PythonInterface/test/python/mantid/api/ProjectionTest.py +++ b/Framework/PythonInterface/test/python/mantid/api/ProjectionTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/api/PythonAlgorithmChildAlgCallTest.py b/Framework/PythonInterface/test/python/mantid/api/PythonAlgorithmChildAlgCallTest.py index 43e7cc488c22b1553033d8821fc1eabe9d53aae3..af4b2eb404f6e95ee62064a65514cea4ac185650 100644 --- a/Framework/PythonInterface/test/python/mantid/api/PythonAlgorithmChildAlgCallTest.py +++ b/Framework/PythonInterface/test/python/mantid/api/PythonAlgorithmChildAlgCallTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + """A test for the simple API dedicated to Python algorithms. Checks things like Child Algorithm calls diff --git a/Framework/PythonInterface/test/python/mantid/api/PythonAlgorithmPropertiesTest.py b/Framework/PythonInterface/test/python/mantid/api/PythonAlgorithmPropertiesTest.py index 1f9c4593cb4b7779850015926ef41e5f98cab182..8267e70957b64563a29d1ca7796c70976935a9f2 100644 --- a/Framework/PythonInterface/test/python/mantid/api/PythonAlgorithmPropertiesTest.py +++ b/Framework/PythonInterface/test/python/mantid/api/PythonAlgorithmPropertiesTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + """Defines tests for the simple property declarations types within Python algorithms diff --git a/Framework/PythonInterface/test/python/mantid/api/PythonAlgorithmTraitsTest.py b/Framework/PythonInterface/test/python/mantid/api/PythonAlgorithmTraitsTest.py index ffcf2428255bd254fbfe0f5d8c6f005822953701..79a5f4df635ce2f7bef6329d7bdd5e9ae24fabf0 100644 --- a/Framework/PythonInterface/test/python/mantid/api/PythonAlgorithmTraitsTest.py +++ b/Framework/PythonInterface/test/python/mantid/api/PythonAlgorithmTraitsTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + """Defines tests for the traits within Python algorithms such as name, version etc. diff --git a/Framework/PythonInterface/test/python/mantid/api/PythonAlgorithmWorkspacePropertyTest.py b/Framework/PythonInterface/test/python/mantid/api/PythonAlgorithmWorkspacePropertyTest.py index 27e282902d217fc5206cbd4eb635e26cf88eb030..b2b502da7f0e2f138229e27ac1b3281ed9690adc 100644 --- a/Framework/PythonInterface/test/python/mantid/api/PythonAlgorithmWorkspacePropertyTest.py +++ b/Framework/PythonInterface/test/python/mantid/api/PythonAlgorithmWorkspacePropertyTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + """Defines tests for the WorkspaceProperty types within Python algorithms diff --git a/Framework/PythonInterface/test/python/mantid/api/RunPythonScriptTest.py b/Framework/PythonInterface/test/python/mantid/api/RunPythonScriptTest.py index 9af7ab36936158407d250c3a1235b19e25db0a05..39dfe76c7c9367fdf860f7858410362ea2ed477d 100644 --- a/Framework/PythonInterface/test/python/mantid/api/RunPythonScriptTest.py +++ b/Framework/PythonInterface/test/python/mantid/api/RunPythonScriptTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/api/RunTest.py b/Framework/PythonInterface/test/python/mantid/api/RunTest.py index f6fe7ea957f0ddbd8452208dfb82461cffb77ee6..4361d892741343dd36b3d24df7c782694977e759 100644 --- a/Framework/PythonInterface/test/python/mantid/api/RunTest.py +++ b/Framework/PythonInterface/test/python/mantid/api/RunTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/api/SampleTest.py b/Framework/PythonInterface/test/python/mantid/api/SampleTest.py index c3f40c01be49a5960ec27c23e5ac106ec8cad7ca..8f7bde6ded04ab2e63fa50f8a14856bb213c94a0 100644 --- a/Framework/PythonInterface/test/python/mantid/api/SampleTest.py +++ b/Framework/PythonInterface/test/python/mantid/api/SampleTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/api/SpectrumInfoTest.py b/Framework/PythonInterface/test/python/mantid/api/SpectrumInfoTest.py index daa23d3ec09f15d4d0179a0fd4cde9fec997018b..bcaee8d1ab35ec74ff46275f60457a9a5e5723c7 100644 --- a/Framework/PythonInterface/test/python/mantid/api/SpectrumInfoTest.py +++ b/Framework/PythonInterface/test/python/mantid/api/SpectrumInfoTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) @@ -40,6 +40,13 @@ class SpectrumInfoTest(unittest.TestCase): info = self._ws.spectrumInfo() self.assertEqual(info.size(), 3) + def test_detectorCount(self): + """ Check total detector count """ + info = self._ws.spectrumInfo() + # One detector cleared. So not counted. + self.assertEqual(info.detectorCount(), 2) + + def test_isMonitor(self): """ Check if a monitor is present. """ info = self._ws.spectrumInfo() diff --git a/Framework/PythonInterface/test/python/mantid/api/WorkspaceBinaryOpsTest.py b/Framework/PythonInterface/test/python/mantid/api/WorkspaceBinaryOpsTest.py index b0152a542de7f15956fe8c0f9f44934b2db5e90c..210adde80d7c04f906fb605c1cd075ab6799a1b7 100644 --- a/Framework/PythonInterface/test/python/mantid/api/WorkspaceBinaryOpsTest.py +++ b/Framework/PythonInterface/test/python/mantid/api/WorkspaceBinaryOpsTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/api/WorkspaceFactoryTest.py b/Framework/PythonInterface/test/python/mantid/api/WorkspaceFactoryTest.py index 9aae031906ca55eab92f740ad840508a7f8b1883..f992cf33bcacc76d112f3e7a8e1ea57a48d15ffa 100644 --- a/Framework/PythonInterface/test/python/mantid/api/WorkspaceFactoryTest.py +++ b/Framework/PythonInterface/test/python/mantid/api/WorkspaceFactoryTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/api/WorkspaceGroupTest.py b/Framework/PythonInterface/test/python/mantid/api/WorkspaceGroupTest.py index 9f86575f893cb1f78ad5d6119b7e1f3da3198d0f..49c0a47581902bfd1c61f3616c1de0aa9347166f 100644 --- a/Framework/PythonInterface/test/python/mantid/api/WorkspaceGroupTest.py +++ b/Framework/PythonInterface/test/python/mantid/api/WorkspaceGroupTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/api/WorkspaceHistoryTest.py b/Framework/PythonInterface/test/python/mantid/api/WorkspaceHistoryTest.py index 18f99f1553af6fcc7c98ba2479c6d856369ee61a..9dbfa8f5a29a6e8cdcba912cf95326aa63890b0c 100644 --- a/Framework/PythonInterface/test/python/mantid/api/WorkspaceHistoryTest.py +++ b/Framework/PythonInterface/test/python/mantid/api/WorkspaceHistoryTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/api/WorkspacePropertiesTest.py b/Framework/PythonInterface/test/python/mantid/api/WorkspacePropertiesTest.py index aa32fe29f5b8f5f5326a6f55c5fcd231fb0f85e2..10be3193855f5dab68467edc8185b648c79f881a 100644 --- a/Framework/PythonInterface/test/python/mantid/api/WorkspacePropertiesTest.py +++ b/Framework/PythonInterface/test/python/mantid/api/WorkspacePropertiesTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + """Tests the construction of the various workspace property types diff --git a/Framework/PythonInterface/test/python/mantid/api/WorkspaceTest.py b/Framework/PythonInterface/test/python/mantid/api/WorkspaceTest.py index 1ddea4c9dc4ef6486fece0aadb43edeac2e86e92..8e4a42b6d8456e032f959c736825d8119179dc67 100644 --- a/Framework/PythonInterface/test/python/mantid/api/WorkspaceTest.py +++ b/Framework/PythonInterface/test/python/mantid/api/WorkspaceTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/api/WorkspaceUnaryOpsTest.py b/Framework/PythonInterface/test/python/mantid/api/WorkspaceUnaryOpsTest.py index b01714925a65d3b28d2fa68deb178e6daf934b6e..6ffb7d71c1bb09b9767db81a85e91d131f4af789 100644 --- a/Framework/PythonInterface/test/python/mantid/api/WorkspaceUnaryOpsTest.py +++ b/Framework/PythonInterface/test/python/mantid/api/WorkspaceUnaryOpsTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/api/WorkspaceValidatorsTest.py b/Framework/PythonInterface/test/python/mantid/api/WorkspaceValidatorsTest.py index 43fe1d7bdd5dfb4f5e530fc01d03132202e5dbcb..e3020a432e25572cc8e2e419cd1e32f1b7f699e3 100644 --- a/Framework/PythonInterface/test/python/mantid/api/WorkspaceValidatorsTest.py +++ b/Framework/PythonInterface/test/python/mantid/api/WorkspaceValidatorsTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + """ Test construction of the WorkspaceValidators diff --git a/Framework/PythonInterface/test/python/mantid/dataobjects/EventListTest.py b/Framework/PythonInterface/test/python/mantid/dataobjects/EventListTest.py index 53cb62f3e30b88c80c44a7846a81ea3e1226f1ed..ee3c635b5f7153ed6068357800a11c1cb42174f7 100644 --- a/Framework/PythonInterface/test/python/mantid/dataobjects/EventListTest.py +++ b/Framework/PythonInterface/test/python/mantid/dataobjects/EventListTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=invalid-name, too-many-public-methods from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/dataobjects/Workspace2DPickleTest.py b/Framework/PythonInterface/test/python/mantid/dataobjects/Workspace2DPickleTest.py index cead277edfc0f8500e22ead230aa963dbe24e7a8..5657c4dc616a64764d74342002c0a57274dbb3df 100644 --- a/Framework/PythonInterface/test/python/mantid/dataobjects/Workspace2DPickleTest.py +++ b/Framework/PythonInterface/test/python/mantid/dataobjects/Workspace2DPickleTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=invalid-name, too-many-public-methods from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/geometry/BoundingBoxTest.py b/Framework/PythonInterface/test/python/mantid/geometry/BoundingBoxTest.py index 3ef0938c726cb61159899d68b2bba4b14d63dd24..de7d689c6c70ddf33547bf8278c98248588c9605 100644 --- a/Framework/PythonInterface/test/python/mantid/geometry/BoundingBoxTest.py +++ b/Framework/PythonInterface/test/python/mantid/geometry/BoundingBoxTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/geometry/CSGObjectTest.py b/Framework/PythonInterface/test/python/mantid/geometry/CSGObjectTest.py index 0c76090b59a884566a804e54175cb0e2f9674273..9c97836f048e2e5693242140c8e5cd121b0f84a5 100644 --- a/Framework/PythonInterface/test/python/mantid/geometry/CSGObjectTest.py +++ b/Framework/PythonInterface/test/python/mantid/geometry/CSGObjectTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/geometry/ComponentInfoTest.py b/Framework/PythonInterface/test/python/mantid/geometry/ComponentInfoTest.py index 54913f0d9223e6dbdf8fb654946ff0ae886ce0df..3cb254ff671f0dd3d4d2f806b3897c58b04e15eb 100644 --- a/Framework/PythonInterface/test/python/mantid/geometry/ComponentInfoTest.py +++ b/Framework/PythonInterface/test/python/mantid/geometry/ComponentInfoTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/geometry/CrystalStructureTest.py b/Framework/PythonInterface/test/python/mantid/geometry/CrystalStructureTest.py index 885be8b46f2bd1b905bbd00b35ea4628c39a52be..f66b1a93d8bc34549c5de3ee197bc2b903cc9d42 100644 --- a/Framework/PythonInterface/test/python/mantid/geometry/CrystalStructureTest.py +++ b/Framework/PythonInterface/test/python/mantid/geometry/CrystalStructureTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=no-init,invalid-name,too-many-public-methods,broad-except from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/geometry/DetectorInfoTest.py b/Framework/PythonInterface/test/python/mantid/geometry/DetectorInfoTest.py index 22f5a3ed667b70f45e0ed9e74403687f2464974f..f9377c7ab4b0643dbd62b20f0c5a3b3f609f2fd0 100644 --- a/Framework/PythonInterface/test/python/mantid/geometry/DetectorInfoTest.py +++ b/Framework/PythonInterface/test/python/mantid/geometry/DetectorInfoTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/geometry/GoniometerTest.py b/Framework/PythonInterface/test/python/mantid/geometry/GoniometerTest.py index dbb805b3ba369ac886e85b32d1de791df09e554c..ae195e5f6244ed1dd55b070e0175b97d0173273b 100644 --- a/Framework/PythonInterface/test/python/mantid/geometry/GoniometerTest.py +++ b/Framework/PythonInterface/test/python/mantid/geometry/GoniometerTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/geometry/GroupTest.py b/Framework/PythonInterface/test/python/mantid/geometry/GroupTest.py index b480b1be5a00cf9160c9953b402ff10f165c5f90..106f95593f67d8451cdbe2d2c3cac8c76f185f94 100644 --- a/Framework/PythonInterface/test/python/mantid/geometry/GroupTest.py +++ b/Framework/PythonInterface/test/python/mantid/geometry/GroupTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=no-init,invalid-name,too-many-public-methods from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/geometry/IComponentTest.py b/Framework/PythonInterface/test/python/mantid/geometry/IComponentTest.py index 4f8ea0c657e35e8c74153dcabd28ad3a4fae0f7a..020fd91b00e462f6f1df157140d115ef348436a6 100644 --- a/Framework/PythonInterface/test/python/mantid/geometry/IComponentTest.py +++ b/Framework/PythonInterface/test/python/mantid/geometry/IComponentTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/geometry/IPeakTest.py b/Framework/PythonInterface/test/python/mantid/geometry/IPeakTest.py index cb59a0ce5657739a1b41e49c63c24e44b20fae19..fdc67931287f1929d136e49147c7ba331c7bc311 100644 --- a/Framework/PythonInterface/test/python/mantid/geometry/IPeakTest.py +++ b/Framework/PythonInterface/test/python/mantid/geometry/IPeakTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + import unittest from mantid.kernel import V3D diff --git a/Framework/PythonInterface/test/python/mantid/geometry/InstrumentTest.py b/Framework/PythonInterface/test/python/mantid/geometry/InstrumentTest.py index f12568368a6da381ce37fdcf6bca6144f9928c88..12be77ca21e95515cec931ccc48bf95aa4f45cb3 100644 --- a/Framework/PythonInterface/test/python/mantid/geometry/InstrumentTest.py +++ b/Framework/PythonInterface/test/python/mantid/geometry/InstrumentTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/geometry/OrientedLatticeTest.py b/Framework/PythonInterface/test/python/mantid/geometry/OrientedLatticeTest.py index 8fda90938217a7036f5bda2c81b9cf280e831cb7..31a56890a34b0dfdf14e22dbbe9e980f1e6c8c29 100644 --- a/Framework/PythonInterface/test/python/mantid/geometry/OrientedLatticeTest.py +++ b/Framework/PythonInterface/test/python/mantid/geometry/OrientedLatticeTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/geometry/PeakShapeTest.py b/Framework/PythonInterface/test/python/mantid/geometry/PeakShapeTest.py index 7e26d03dc30ffcbff2efbb08f9848fab278880a7..8cf57179d18c67e6569ec8603491f3f4f8f09773 100644 --- a/Framework/PythonInterface/test/python/mantid/geometry/PeakShapeTest.py +++ b/Framework/PythonInterface/test/python/mantid/geometry/PeakShapeTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/geometry/PointGroupTest.py b/Framework/PythonInterface/test/python/mantid/geometry/PointGroupTest.py index 625311c9d6cd0243d022f1ca620669a28122eab4..37c84b401b023e44157f20ab1c531df5bc2246a0 100644 --- a/Framework/PythonInterface/test/python/mantid/geometry/PointGroupTest.py +++ b/Framework/PythonInterface/test/python/mantid/geometry/PointGroupTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=invalid-name,too-many-public-methods from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/geometry/RectangularDetectorTest.py b/Framework/PythonInterface/test/python/mantid/geometry/RectangularDetectorTest.py index 0fa0dfeb743c345802f2455e855ab5e5efd31e27..d6f141e338e10455da4a4690d7c8f41ee0ad78e1 100644 --- a/Framework/PythonInterface/test/python/mantid/geometry/RectangularDetectorTest.py +++ b/Framework/PythonInterface/test/python/mantid/geometry/RectangularDetectorTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/geometry/ReferenceFrameTest.py b/Framework/PythonInterface/test/python/mantid/geometry/ReferenceFrameTest.py index 83cd60344c5074053148cad57374a03a2542684d..0c7d23661c0cfa898ff48b84ff6e1e3eab1c5f2b 100644 --- a/Framework/PythonInterface/test/python/mantid/geometry/ReferenceFrameTest.py +++ b/Framework/PythonInterface/test/python/mantid/geometry/ReferenceFrameTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/geometry/ReflectionGeneratorTest.py b/Framework/PythonInterface/test/python/mantid/geometry/ReflectionGeneratorTest.py index 3f67ef1dc8321ea8da9530ad4b0ddfe51ae203b9..21521d5192859421ed6e005e8b811ad53e8a2741 100644 --- a/Framework/PythonInterface/test/python/mantid/geometry/ReflectionGeneratorTest.py +++ b/Framework/PythonInterface/test/python/mantid/geometry/ReflectionGeneratorTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=no-init,invalid-name,too-many-public-methods from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/geometry/SpaceGroupTest.py b/Framework/PythonInterface/test/python/mantid/geometry/SpaceGroupTest.py index cee800a43304c55a6ae534a29400b07a57008c16..54c8eb51bb6af3a59238eaeae51ac1eabcc44451 100644 --- a/Framework/PythonInterface/test/python/mantid/geometry/SpaceGroupTest.py +++ b/Framework/PythonInterface/test/python/mantid/geometry/SpaceGroupTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=no-init,invalid-name,too-many-public-methods from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/geometry/SymmetryElementTest.py b/Framework/PythonInterface/test/python/mantid/geometry/SymmetryElementTest.py index c845003aa8eac16356b69d618b1e06b3d51ba243..2454749ea78157e9f5feb7b56c4f9888622fefbf 100644 --- a/Framework/PythonInterface/test/python/mantid/geometry/SymmetryElementTest.py +++ b/Framework/PythonInterface/test/python/mantid/geometry/SymmetryElementTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/geometry/SymmetryOperationTest.py b/Framework/PythonInterface/test/python/mantid/geometry/SymmetryOperationTest.py index f0a347ef9cd34225db68af86941896740482f70d..ba0e3d53035768a57ebdb9af9245a32c57cfa866 100644 --- a/Framework/PythonInterface/test/python/mantid/geometry/SymmetryOperationTest.py +++ b/Framework/PythonInterface/test/python/mantid/geometry/SymmetryOperationTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/geometry/UnitCellTest.py b/Framework/PythonInterface/test/python/mantid/geometry/UnitCellTest.py index eb6083f46a170c3f8b60a7c406e2b4e75793adfc..98fcf086ba3b4beb1d5d548041af8a6536e8d128 100644 --- a/Framework/PythonInterface/test/python/mantid/geometry/UnitCellTest.py +++ b/Framework/PythonInterface/test/python/mantid/geometry/UnitCellTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/kernel/ArrayBoundedValidatorTest.py b/Framework/PythonInterface/test/python/mantid/kernel/ArrayBoundedValidatorTest.py index 1e3b9dce98298b9e2d01f37bc2d4341fe27ed1be..6b850963a4bc1b69ee7d3e8a87d34a7231af18cf 100644 --- a/Framework/PythonInterface/test/python/mantid/kernel/ArrayBoundedValidatorTest.py +++ b/Framework/PythonInterface/test/python/mantid/kernel/ArrayBoundedValidatorTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/kernel/ArrayLengthValidatorTest.py b/Framework/PythonInterface/test/python/mantid/kernel/ArrayLengthValidatorTest.py index 5e9ceb3b10e35f59e45d9bd15c7315961f6b8d0c..e771606e3340e1af27bd15b35419cd865f83c051 100644 --- a/Framework/PythonInterface/test/python/mantid/kernel/ArrayLengthValidatorTest.py +++ b/Framework/PythonInterface/test/python/mantid/kernel/ArrayLengthValidatorTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/kernel/ArrayOrderedPairsValidatorTest.py b/Framework/PythonInterface/test/python/mantid/kernel/ArrayOrderedPairsValidatorTest.py index 41dd3553323ff392b5e05e2bf3d136d59ece372f..3e12f5ec7bfefb38f3ddc60c72830e090a4f2af1 100644 --- a/Framework/PythonInterface/test/python/mantid/kernel/ArrayOrderedPairsValidatorTest.py +++ b/Framework/PythonInterface/test/python/mantid/kernel/ArrayOrderedPairsValidatorTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/kernel/ArrayPropertyTest.py b/Framework/PythonInterface/test/python/mantid/kernel/ArrayPropertyTest.py index 1f3d2b7285a92189605bcecbe270a5875fb89948..38b53f8bf1305bb97f5c5ae69231d230d0d84ca2 100644 --- a/Framework/PythonInterface/test/python/mantid/kernel/ArrayPropertyTest.py +++ b/Framework/PythonInterface/test/python/mantid/kernel/ArrayPropertyTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + """Test the exposed ArrayProperty """ diff --git a/Framework/PythonInterface/test/python/mantid/kernel/BoundedValidatorTest.py b/Framework/PythonInterface/test/python/mantid/kernel/BoundedValidatorTest.py index 1f48912e40856ded883f4625968fb7c3de99126a..bcd2bc121f6edbb795c9892b7accf747fbe82b19 100644 --- a/Framework/PythonInterface/test/python/mantid/kernel/BoundedValidatorTest.py +++ b/Framework/PythonInterface/test/python/mantid/kernel/BoundedValidatorTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/kernel/CompositeValidatorTest.py b/Framework/PythonInterface/test/python/mantid/kernel/CompositeValidatorTest.py index 3f42a2e0162257c0e1f871b4439305b61cc5a1ed..84f8ad1d83b9ed18fe8c20000e8d501ac7469ecc 100644 --- a/Framework/PythonInterface/test/python/mantid/kernel/CompositeValidatorTest.py +++ b/Framework/PythonInterface/test/python/mantid/kernel/CompositeValidatorTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/kernel/ConfigObserverTest.py b/Framework/PythonInterface/test/python/mantid/kernel/ConfigObserverTest.py index 6fa2304492e756980acb734003aa7c7220b49f14..9b966b335f133901ee44c9e73990551d4f4b7659 100644 --- a/Framework/PythonInterface/test/python/mantid/kernel/ConfigObserverTest.py +++ b/Framework/PythonInterface/test/python/mantid/kernel/ConfigObserverTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + import unittest diff --git a/Framework/PythonInterface/test/python/mantid/kernel/ConfigPropertyObserverTest.py b/Framework/PythonInterface/test/python/mantid/kernel/ConfigPropertyObserverTest.py index 771035fc2a236e19e2242b3e58e83544ebb1037a..809f334830acb3b69787f52d73ea28c8f013e609 100644 --- a/Framework/PythonInterface/test/python/mantid/kernel/ConfigPropertyObserverTest.py +++ b/Framework/PythonInterface/test/python/mantid/kernel/ConfigPropertyObserverTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + import unittest diff --git a/Framework/PythonInterface/test/python/mantid/kernel/ConfigServiceTest.py b/Framework/PythonInterface/test/python/mantid/kernel/ConfigServiceTest.py index 573b3be007a7850ec79dd7f75cc5426983daa4f0..a8cfbaa84b7627f1deba821f6eac53a8e8f65db1 100644 --- a/Framework/PythonInterface/test/python/mantid/kernel/ConfigServiceTest.py +++ b/Framework/PythonInterface/test/python/mantid/kernel/ConfigServiceTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function, unicode_literals) @@ -65,7 +65,7 @@ class ConfigServiceTest(unittest.TestCase): self.assertRaises(RuntimeError, config.getInstrument, "MadeUpInstrument") def test_service_acts_like_dictionary(self): - test_prop = "algorithms.retained" + test_prop = "projectRecovery.secondsBetween" self.assertTrue(config.hasProperty(test_prop)) dictcall = config[test_prop] fncall = config.getString(test_prop) diff --git a/Framework/PythonInterface/test/python/mantid/kernel/DateAndTimeTest.py b/Framework/PythonInterface/test/python/mantid/kernel/DateAndTimeTest.py index e7c5e5030e90384f787299efa356876decd28e06..7affe0c954887ceabdd03f4ac2263ae2c7ee3525 100644 --- a/Framework/PythonInterface/test/python/mantid/kernel/DateAndTimeTest.py +++ b/Framework/PythonInterface/test/python/mantid/kernel/DateAndTimeTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/kernel/DeltaEModeTest.py b/Framework/PythonInterface/test/python/mantid/kernel/DeltaEModeTest.py index e12501ea6e29f67532ccc741fa5e3b7bff4ef8f7..d0216dff6d6eec7496ddd86baea5cc147782244f 100644 --- a/Framework/PythonInterface/test/python/mantid/kernel/DeltaEModeTest.py +++ b/Framework/PythonInterface/test/python/mantid/kernel/DeltaEModeTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/kernel/EnabledWhenPropertyTest.py b/Framework/PythonInterface/test/python/mantid/kernel/EnabledWhenPropertyTest.py index 71cbab5e7322a1822b71ae1d12dc24961f678e42..2b64b8987f5783855f504d866d29124c55e1289a 100644 --- a/Framework/PythonInterface/test/python/mantid/kernel/EnabledWhenPropertyTest.py +++ b/Framework/PythonInterface/test/python/mantid/kernel/EnabledWhenPropertyTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/kernel/FacilityInfoTest.py b/Framework/PythonInterface/test/python/mantid/kernel/FacilityInfoTest.py index 4f6fa20e036d088ad915df050d1a9fb41c08f463..61e4f5fec6d92fd52b078ba73c81b87121593a2d 100644 --- a/Framework/PythonInterface/test/python/mantid/kernel/FacilityInfoTest.py +++ b/Framework/PythonInterface/test/python/mantid/kernel/FacilityInfoTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/kernel/FilteredTimeSeriesPropertyTest.py b/Framework/PythonInterface/test/python/mantid/kernel/FilteredTimeSeriesPropertyTest.py index 56baabe94e1cf42d42134adfe50991bb524def85..dd1b037e587b9850e233bcd8c6712fc63caedcd6 100644 --- a/Framework/PythonInterface/test/python/mantid/kernel/FilteredTimeSeriesPropertyTest.py +++ b/Framework/PythonInterface/test/python/mantid/kernel/FilteredTimeSeriesPropertyTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/kernel/IPropertySettingsTest.py b/Framework/PythonInterface/test/python/mantid/kernel/IPropertySettingsTest.py index a753142ff53d18fcc1d99636615021b3e0646388..be7226f80e60dc1f99f7581653c85eaabd4376a3 100644 --- a/Framework/PythonInterface/test/python/mantid/kernel/IPropertySettingsTest.py +++ b/Framework/PythonInterface/test/python/mantid/kernel/IPropertySettingsTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/kernel/InstrumentInfoTest.py b/Framework/PythonInterface/test/python/mantid/kernel/InstrumentInfoTest.py index 7bb58a95849a572100a30a01b5638499904925e0..973f0146c1d1b0ec9e81f807ade988e2bebe53c8 100644 --- a/Framework/PythonInterface/test/python/mantid/kernel/InstrumentInfoTest.py +++ b/Framework/PythonInterface/test/python/mantid/kernel/InstrumentInfoTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/kernel/ListValidatorTest.py b/Framework/PythonInterface/test/python/mantid/kernel/ListValidatorTest.py index 820c98079b709f787aedfc7f580b28262e7a9e72..2ee79e9f85c5114b377bf587266313d180002890 100644 --- a/Framework/PythonInterface/test/python/mantid/kernel/ListValidatorTest.py +++ b/Framework/PythonInterface/test/python/mantid/kernel/ListValidatorTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/kernel/LiveListenerInfoTest.py b/Framework/PythonInterface/test/python/mantid/kernel/LiveListenerInfoTest.py index b16a150510ea11ecccea0fc847ae743d2f303ef9..8a3c3686c62e03a11eed328589aa843f8a79606e 100644 --- a/Framework/PythonInterface/test/python/mantid/kernel/LiveListenerInfoTest.py +++ b/Framework/PythonInterface/test/python/mantid/kernel/LiveListenerInfoTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/kernel/LogFilterTest.py b/Framework/PythonInterface/test/python/mantid/kernel/LogFilterTest.py index 875cc525f9589b2210a66c4b89348772d7279f92..f94c213dc9a5a13a77a059477b8a4eeeb09d8193 100644 --- a/Framework/PythonInterface/test/python/mantid/kernel/LogFilterTest.py +++ b/Framework/PythonInterface/test/python/mantid/kernel/LogFilterTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/kernel/LoggerTest.py b/Framework/PythonInterface/test/python/mantid/kernel/LoggerTest.py index bf79855befc3373cb7572488286d73f0535b026e..20fc806ed96d8c0fe7bc3e5d62ea21aa860cf529 100644 --- a/Framework/PythonInterface/test/python/mantid/kernel/LoggerTest.py +++ b/Framework/PythonInterface/test/python/mantid/kernel/LoggerTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function, unicode_literals) diff --git a/Framework/PythonInterface/test/python/mantid/kernel/MandatoryValidatorTest.py b/Framework/PythonInterface/test/python/mantid/kernel/MandatoryValidatorTest.py index 681436fea8aee5bddc510c81e4b65deb9e642f11..05bfebbd433e8f81ac3ec2efbfcd004e36cacd4d 100644 --- a/Framework/PythonInterface/test/python/mantid/kernel/MandatoryValidatorTest.py +++ b/Framework/PythonInterface/test/python/mantid/kernel/MandatoryValidatorTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/kernel/MaterialBuilderTest.py b/Framework/PythonInterface/test/python/mantid/kernel/MaterialBuilderTest.py index 604abfb2bc0a6b70fcdaf58279111f7df53775e8..9183dc6933297215ccde7c3dc7235abf08f10a31 100644 --- a/Framework/PythonInterface/test/python/mantid/kernel/MaterialBuilderTest.py +++ b/Framework/PythonInterface/test/python/mantid/kernel/MaterialBuilderTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/kernel/MemoryStatsTest.py b/Framework/PythonInterface/test/python/mantid/kernel/MemoryStatsTest.py index a34a0a5b9118f44a6552ef413aa8c3aa645cb649..573f2115729145ae07e47101b3c9bf46638e7096 100644 --- a/Framework/PythonInterface/test/python/mantid/kernel/MemoryStatsTest.py +++ b/Framework/PythonInterface/test/python/mantid/kernel/MemoryStatsTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/kernel/NullValidatorTest.py b/Framework/PythonInterface/test/python/mantid/kernel/NullValidatorTest.py index 6c859446508515238699619603f60e4db7f59c4e..c8c45bf9f54855ed60bd7d74f2f6a384650c09b9 100644 --- a/Framework/PythonInterface/test/python/mantid/kernel/NullValidatorTest.py +++ b/Framework/PythonInterface/test/python/mantid/kernel/NullValidatorTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/kernel/OptionalBoolTest.py b/Framework/PythonInterface/test/python/mantid/kernel/OptionalBoolTest.py index f61f869cfa83160396caaab8817b7321e99aa2b7..629c0fa81de4806f03e3f4d2a8fa0afffd5ebded 100644 --- a/Framework/PythonInterface/test/python/mantid/kernel/OptionalBoolTest.py +++ b/Framework/PythonInterface/test/python/mantid/kernel/OptionalBoolTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/kernel/ProgressBaseTest.py b/Framework/PythonInterface/test/python/mantid/kernel/ProgressBaseTest.py index 5d1181974137803ea8ee7a2d963dd1ac8e424cb7..28f345745a7699c912597fe320971e4a25ec99c5 100644 --- a/Framework/PythonInterface/test/python/mantid/kernel/ProgressBaseTest.py +++ b/Framework/PythonInterface/test/python/mantid/kernel/ProgressBaseTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/kernel/PropertyHistoryTest.py b/Framework/PythonInterface/test/python/mantid/kernel/PropertyHistoryTest.py index e83d6262669b768992a29dc71199fe6ab0828447..3b838d84f29444475b985e3c2e600cc322155efb 100644 --- a/Framework/PythonInterface/test/python/mantid/kernel/PropertyHistoryTest.py +++ b/Framework/PythonInterface/test/python/mantid/kernel/PropertyHistoryTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/kernel/PropertyManagerDataServiceTest.py b/Framework/PythonInterface/test/python/mantid/kernel/PropertyManagerDataServiceTest.py index 2de1eae1833b40b0ee4cd30ddc3f6a71e0090aba..52867a8457967b92ee5124ed4fb1c1bb430b8d83 100644 --- a/Framework/PythonInterface/test/python/mantid/kernel/PropertyManagerDataServiceTest.py +++ b/Framework/PythonInterface/test/python/mantid/kernel/PropertyManagerDataServiceTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function, unicode_literals) diff --git a/Framework/PythonInterface/test/python/mantid/kernel/PropertyManagerPropertyTest.py b/Framework/PythonInterface/test/python/mantid/kernel/PropertyManagerPropertyTest.py index c73d01248e9eb3e4c7f1beca82093c1c39238df1..60f2c35bc4639bfd43ac69c9769cf9030f09e06b 100644 --- a/Framework/PythonInterface/test/python/mantid/kernel/PropertyManagerPropertyTest.py +++ b/Framework/PythonInterface/test/python/mantid/kernel/PropertyManagerPropertyTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + """Test the exposed PropertyManagerProperty """ diff --git a/Framework/PythonInterface/test/python/mantid/kernel/PropertyManagerTest.py b/Framework/PythonInterface/test/python/mantid/kernel/PropertyManagerTest.py index f07df555875316c06f23e7ff6f19dcb97ab95cf2..ebd111a872161523b61668f45be00652dc1f6908 100644 --- a/Framework/PythonInterface/test/python/mantid/kernel/PropertyManagerTest.py +++ b/Framework/PythonInterface/test/python/mantid/kernel/PropertyManagerTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/kernel/PropertyWithValueTest.py b/Framework/PythonInterface/test/python/mantid/kernel/PropertyWithValueTest.py index a4f6b4670d4573ef09371e5abb299d66aea2f57d..d4ee387013b8cf843c9e048436220cf509af7e03 100644 --- a/Framework/PythonInterface/test/python/mantid/kernel/PropertyWithValueTest.py +++ b/Framework/PythonInterface/test/python/mantid/kernel/PropertyWithValueTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/kernel/PythonPluginsTest.py b/Framework/PythonInterface/test/python/mantid/kernel/PythonPluginsTest.py index f3bcc0935fff0782f92efc248b8d1bfe697e345a..4ee81cc12af48fd53b3186168035b31b8230e13d 100644 --- a/Framework/PythonInterface/test/python/mantid/kernel/PythonPluginsTest.py +++ b/Framework/PythonInterface/test/python/mantid/kernel/PythonPluginsTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/kernel/QuatTest.py b/Framework/PythonInterface/test/python/mantid/kernel/QuatTest.py index e3a0d31c1eeddb3f25ac336de53862d861cfaec2..917a9e4997c6caca113d6cf6f6a74a8ebb9fa026 100644 --- a/Framework/PythonInterface/test/python/mantid/kernel/QuatTest.py +++ b/Framework/PythonInterface/test/python/mantid/kernel/QuatTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/kernel/RebinParamsValidatorTest.py b/Framework/PythonInterface/test/python/mantid/kernel/RebinParamsValidatorTest.py index 974dd733265428e209d28a317f85fb11198759d1..6100b3d83f8662ba456a3f681ff7e56ddb644423 100644 --- a/Framework/PythonInterface/test/python/mantid/kernel/RebinParamsValidatorTest.py +++ b/Framework/PythonInterface/test/python/mantid/kernel/RebinParamsValidatorTest.py @@ -1,10 +1,9 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + - from __future__ import (absolute_import, division, print_function) import unittest diff --git a/Framework/PythonInterface/test/python/mantid/kernel/StatisticsTest.py b/Framework/PythonInterface/test/python/mantid/kernel/StatisticsTest.py index 1d49206e31b175177fadb55b6df248b94f5ad120..33bfd035d73a7dbc60fec2349aeb5751a0e1eb3d 100644 --- a/Framework/PythonInterface/test/python/mantid/kernel/StatisticsTest.py +++ b/Framework/PythonInterface/test/python/mantid/kernel/StatisticsTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/kernel/StringContainsValidatorTest.py b/Framework/PythonInterface/test/python/mantid/kernel/StringContainsValidatorTest.py index e474de60b1ad60225d2ad894bfa9b5369cf8ec16..19467543e8c9579ebeab30b6f5119d8e990c3bcd 100644 --- a/Framework/PythonInterface/test/python/mantid/kernel/StringContainsValidatorTest.py +++ b/Framework/PythonInterface/test/python/mantid/kernel/StringContainsValidatorTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/kernel/TimeSeriesPropertyTest.py b/Framework/PythonInterface/test/python/mantid/kernel/TimeSeriesPropertyTest.py index 155c8d88de74bdb1ce86201ad63a74120e018ee3..8050d3ca3c810a9e0017d4b25bd4f082a3a27e1f 100644 --- a/Framework/PythonInterface/test/python/mantid/kernel/TimeSeriesPropertyTest.py +++ b/Framework/PythonInterface/test/python/mantid/kernel/TimeSeriesPropertyTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/kernel/UnitConversionTest.py b/Framework/PythonInterface/test/python/mantid/kernel/UnitConversionTest.py index 02c3aefff36898c91312861b8d45cc523bbef38a..c17e14382c27e9cca08bd94cff33cbc0083a2a3f 100644 --- a/Framework/PythonInterface/test/python/mantid/kernel/UnitConversionTest.py +++ b/Framework/PythonInterface/test/python/mantid/kernel/UnitConversionTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/kernel/UnitFactoryTest.py b/Framework/PythonInterface/test/python/mantid/kernel/UnitFactoryTest.py index 2f183436b6e012e0cd1329dc347a6173a01dda5e..155d5eb0cc84148ce0d547efb910a085496d815e 100644 --- a/Framework/PythonInterface/test/python/mantid/kernel/UnitFactoryTest.py +++ b/Framework/PythonInterface/test/python/mantid/kernel/UnitFactoryTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/kernel/UnitLabelTest.py b/Framework/PythonInterface/test/python/mantid/kernel/UnitLabelTest.py index 06606ee2d11d6ba3350417e573142338a0b3ebf1..620f1318740ef0e630b1fec99a9c7dac16d46f0f 100644 --- a/Framework/PythonInterface/test/python/mantid/kernel/UnitLabelTest.py +++ b/Framework/PythonInterface/test/python/mantid/kernel/UnitLabelTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/kernel/UnitsTest.py b/Framework/PythonInterface/test/python/mantid/kernel/UnitsTest.py index 4f775e3244fe6cc98614b1620bf91c802869193b..763649525f09efa8bc2dc6abca31763d5cff4385 100644 --- a/Framework/PythonInterface/test/python/mantid/kernel/UnitsTest.py +++ b/Framework/PythonInterface/test/python/mantid/kernel/UnitsTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/kernel/UsageServiceTest.py b/Framework/PythonInterface/test/python/mantid/kernel/UsageServiceTest.py index 555f1bc3c0de43989b139f59b48cde7e9a64c751..20d142b19544526173aad163a5b93dba56da47ef 100644 --- a/Framework/PythonInterface/test/python/mantid/kernel/UsageServiceTest.py +++ b/Framework/PythonInterface/test/python/mantid/kernel/UsageServiceTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function, unicode_literals) diff --git a/Framework/PythonInterface/test/python/mantid/kernel/V3DTest.py b/Framework/PythonInterface/test/python/mantid/kernel/V3DTest.py index aec69d1281c25b46f98a5bae80a5115cd0341a80..7d244e58a71dead0bfe58c1627bbe39ceefe5150 100644 --- a/Framework/PythonInterface/test/python/mantid/kernel/V3DTest.py +++ b/Framework/PythonInterface/test/python/mantid/kernel/V3DTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/kernel/VMDTest.py b/Framework/PythonInterface/test/python/mantid/kernel/VMDTest.py index b0e493452d0440f82f65efb3bb63871f0cb422cb..08a119434520c3d536945b958770ec29b3c1e2ff 100644 --- a/Framework/PythonInterface/test/python/mantid/kernel/VMDTest.py +++ b/Framework/PythonInterface/test/python/mantid/kernel/VMDTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/kernel/VisibleWhenPropertyTest.py b/Framework/PythonInterface/test/python/mantid/kernel/VisibleWhenPropertyTest.py index f05a5430e9a2872b32946a905e933cfda266f0be..6ffd0a876be1c0a68fc6d2f10d910e40f08460a0 100644 --- a/Framework/PythonInterface/test/python/mantid/kernel/VisibleWhenPropertyTest.py +++ b/Framework/PythonInterface/test/python/mantid/kernel/VisibleWhenPropertyTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/plots/ScalesTest.py b/Framework/PythonInterface/test/python/mantid/plots/ScalesTest.py index 2de3a3d71140eb705b66c684bdf2a6ffc7c2e889..7e283244c046731b8eaed16fb3680974904b0748 100644 --- a/Framework/PythonInterface/test/python/mantid/plots/ScalesTest.py +++ b/Framework/PythonInterface/test/python/mantid/plots/ScalesTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid package # Mantid Repository : https://github.com/mantidproject/mantid diff --git a/Framework/PythonInterface/test/python/mantid/plots/UtilityTest.py b/Framework/PythonInterface/test/python/mantid/plots/UtilityTest.py index 94d4fd2a3550c3444f8c8e18712c67c786876f0a..83d65de0799c3521db24e6b6c380f953609a253e 100644 --- a/Framework/PythonInterface/test/python/mantid/plots/UtilityTest.py +++ b/Framework/PythonInterface/test/python/mantid/plots/UtilityTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid package # Mantid Repository : https://github.com/mantidproject/mantid diff --git a/Framework/PythonInterface/test/python/mantid/plots/__init__.py b/Framework/PythonInterface/test/python/mantid/plots/__init__.py index db65bfdd56145fdd2d6d2eccf8d7684e66930c50..d4649f5e6d8bb07eea47f10137cb8dbc8c8b3cb0 100644 --- a/Framework/PythonInterface/test/python/mantid/plots/__init__.py +++ b/Framework/PythonInterface/test/python/mantid/plots/__init__.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. diff --git a/Framework/PythonInterface/test/python/mantid/plots/axesfunctions3DTest.py b/Framework/PythonInterface/test/python/mantid/plots/axesfunctions3DTest.py index df4f9d3a8cc0036acaa84a9aca6f2b36306d73b0..2701d1a1f81e5b6161bc7c3ff4d91037bf882156 100644 --- a/Framework/PythonInterface/test/python/mantid/plots/axesfunctions3DTest.py +++ b/Framework/PythonInterface/test/python/mantid/plots/axesfunctions3DTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/plots/axesfunctionsTest.py b/Framework/PythonInterface/test/python/mantid/plots/axesfunctionsTest.py index 03f47dadf67d4bead48ef83bd7494b311fec0dfc..c5be1f8b4384142d4d9345dc0e627f9d38b54574 100644 --- a/Framework/PythonInterface/test/python/mantid/plots/axesfunctionsTest.py +++ b/Framework/PythonInterface/test/python/mantid/plots/axesfunctionsTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/plots/compatabilityTest.py b/Framework/PythonInterface/test/python/mantid/plots/compatabilityTest.py index 7228a4ad09e30d6939b6b50b40aea9d51b6476f2..6c0affbfce8355e28fa1d491d78047051bd72595 100644 --- a/Framework/PythonInterface/test/python/mantid/plots/compatabilityTest.py +++ b/Framework/PythonInterface/test/python/mantid/plots/compatabilityTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/Framework/PythonInterface/test/python/mantid/plots/datafunctionsTest.py b/Framework/PythonInterface/test/python/mantid/plots/datafunctionsTest.py index 5a1645224e69f2808c30e0964d6ed334cb94fe96..0a1bd9c1fb68505333c4388b08286db256241f60 100644 --- a/Framework/PythonInterface/test/python/mantid/plots/datafunctionsTest.py +++ b/Framework/PythonInterface/test/python/mantid/plots/datafunctionsTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/mantid/plots/modest_image/test_imshow.py b/Framework/PythonInterface/test/python/mantid/plots/modest_image/test_imshow.py index fce6ac851cad74d2b7bdbfbc9bbcf3508ea2bfb8..c32a344fb4ce360a3a7b9d039d7c10c982f7f321 100644 --- a/Framework/PythonInterface/test/python/mantid/plots/modest_image/test_imshow.py +++ b/Framework/PythonInterface/test/python/mantid/plots/modest_image/test_imshow.py @@ -1,3 +1,9 @@ +# Mantid Repository : https://github.com/mantidproject/mantid +# +# Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS +# SPDX - License - Identifier: GPL - 3.0 + from __future__ import print_function, division import unittest diff --git a/Framework/PythonInterface/test/python/mantid/plots/modest_image/test_modest_image.py b/Framework/PythonInterface/test/python/mantid/plots/modest_image/test_modest_image.py index 6188e83bcfcad611553e1a9df5863103ded475ab..e3c98982cf0c3eca19a37dcbe1419a91a7526f1d 100644 --- a/Framework/PythonInterface/test/python/mantid/plots/modest_image/test_modest_image.py +++ b/Framework/PythonInterface/test/python/mantid/plots/modest_image/test_modest_image.py @@ -1,3 +1,9 @@ +# Mantid Repository : https://github.com/mantidproject/mantid +# +# Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS +# SPDX - License - Identifier: GPL - 3.0 + from __future__ import print_function, division import itertools diff --git a/Framework/PythonInterface/test/python/mantid/plots/modest_image/test_speed.py b/Framework/PythonInterface/test/python/mantid/plots/modest_image/test_speed.py index 0986a4582fe06405d19c5d0e1fd5c6c4ac20cee7..927381b902ab662f4d57af84767815a817a6df71 100644 --- a/Framework/PythonInterface/test/python/mantid/plots/modest_image/test_speed.py +++ b/Framework/PythonInterface/test/python/mantid/plots/modest_image/test_speed.py @@ -1,3 +1,9 @@ +# Mantid Repository : https://github.com/mantidproject/mantid +# +# Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS +# SPDX - License - Identifier: GPL - 3.0 + from __future__ import print_function, division from time import time diff --git a/Framework/PythonInterface/test/python/mantid/plots/plotfunctionsTest.py b/Framework/PythonInterface/test/python/mantid/plots/plotfunctionsTest.py index db49efc14fbacd71f5808fae8a4a0ff35e68775b..569619dd069620936e3727d5cb85939e9e024bcb 100644 --- a/Framework/PythonInterface/test/python/mantid/plots/plotfunctionsTest.py +++ b/Framework/PythonInterface/test/python/mantid/plots/plotfunctionsTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/Framework/PythonInterface/test/python/mantid/plots/plots__init__Test.py b/Framework/PythonInterface/test/python/mantid/plots/plots__init__Test.py index 6d34107ee7312ac6883156d65637e0e8d0d7049e..6f4b1d2c4d4103fddb08368c1ac780c2a6efb49e 100644 --- a/Framework/PythonInterface/test/python/mantid/plots/plots__init__Test.py +++ b/Framework/PythonInterface/test/python/mantid/plots/plots__init__Test.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) @@ -76,14 +76,15 @@ class Plots__init__Test(unittest.TestCase): def test_remove_workspace_artist_for_known_workspace_removes_plot(self): self.ax.plot(self.ws2d_histo, specNum=2, linewidth=6) - is_empty = self.ax.remove_workspace_artists(self.ws2d_histo) - self.assertEqual(True, is_empty) + workspace_removed = self.ax.remove_workspace_artists(self.ws2d_histo) + self.assertEqual(True, workspace_removed) self.assertEqual(0, len(self.ax.lines)) def test_remove_workspace_artist_for_unknown_workspace_does_nothing(self): self.ax.plot(self.ws2d_histo, specNum=2, linewidth=6) unknown_ws = CreateSampleWorkspace() - self.ax.remove_workspace_artists(unknown_ws) + workspace_removed = self.ax.remove_workspace_artists(unknown_ws) + self.assertEqual(False, workspace_removed) self.assertEqual(1, len(self.ax.lines)) def test_remove_workspace_artist_for_removes_only_specified_workspace(self): @@ -92,7 +93,8 @@ class Plots__init__Test(unittest.TestCase): line_second_ws = self.ax.plot(second_ws, specNum=5)[0] self.assertEqual(2, len(self.ax.lines)) - self.ax.remove_workspace_artists(self.ws2d_histo) + workspace_removed = self.ax.remove_workspace_artists(self.ws2d_histo) + self.assertEqual(True, workspace_removed) self.assertEqual(1, len(self.ax.lines)) self.assertTrue(line_ws2d_histo not in self.ax.lines) self.assertTrue(line_second_ws in self.ax.lines) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/AbinsAdvancedParametersTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/AbinsAdvancedParametersTest.py index f64311c81f4400937152e8123f3a13c880663196..c353487052fa2333a83f8cb122a1b63b11babcf5 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/AbinsAdvancedParametersTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/AbinsAdvancedParametersTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) import unittest diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/AbinsBasicTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/AbinsBasicTest.py index 7ee4639f12047ff38ddf12f6571197cdcac9e7e2..b948729aff214cd1eedb451f99b76786e9fbf9df 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/AbinsBasicTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/AbinsBasicTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) import unittest diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/AlignComponentsTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/AlignComponentsTest.py index cab2c3d6327c31e4f48a8b7d1e1e40b855b591ea..e8a8ad6cd3886254d8d092050718a5ef8f6855f4 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/AlignComponentsTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/AlignComponentsTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/AngularAutoCorrelationsSingleAxisTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/AngularAutoCorrelationsSingleAxisTest.py index 7107d14b66edd6414cfe5a1f36e13acb4aa586d5..a64f1c5ac83e466c4cda1b0b4bfb662f7215c5a1 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/AngularAutoCorrelationsSingleAxisTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/AngularAutoCorrelationsSingleAxisTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/AngularAutoCorrelationsTwoAxesTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/AngularAutoCorrelationsTwoAxesTest.py index 41eda4ae12f6fc09a8fe952b5bd501e5934d13d3..c6e3af1188fc0a4ea412d781ba64bc109d5291f7 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/AngularAutoCorrelationsTwoAxesTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/AngularAutoCorrelationsTwoAxesTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/ApplyDetectorScanEffCorrTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/ApplyDetectorScanEffCorrTest.py index b3eb14480a872c76b5db6b346e13b42f477cd9fb..0cf1087c7dc588da82c44cfcbae0a075f1e47f06 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/ApplyDetectorScanEffCorrTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/ApplyDetectorScanEffCorrTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/BinWidthAtXTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/BinWidthAtXTest.py index e0c8124d5dc10baf2915172db6c0412858a79510..097cb6c6a70489293be9bd28cd7ea39c6e879d63 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/BinWidthAtXTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/BinWidthAtXTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/CalculateEfficiencyCorrectionTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/CalculateEfficiencyCorrectionTest.py index 86693365da9347434a6884a683d650bdfa27c03d..539754e91864e5cdba78d19fb34dcc3841ac2c3c 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/CalculateEfficiencyCorrectionTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/CalculateEfficiencyCorrectionTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/CalculateFluxTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/CalculateFluxTest.py index ccee5b80476dd40dc77d9b441ce5ed06f92e86bb..d6e15113af17d7ff889a878df452904a43126867 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/CalculateFluxTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/CalculateFluxTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/CalculateSampleTransmissionTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/CalculateSampleTransmissionTest.py index 6ec98f57f2a92c81e09438e5df331869caa8a352..c0477f6a42f10d002f566e2c9c6a3282bb834e28 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/CalculateSampleTransmissionTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/CalculateSampleTransmissionTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/CheckForSampleLogsTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/CheckForSampleLogsTest.py index bf272e08a249112ac5f14b336506c6ecde81f8ad..71884672bb0f757e7f7d54785ba78142ff331efd 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/CheckForSampleLogsTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/CheckForSampleLogsTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/CleanFileCacheTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/CleanFileCacheTest.py index aed68c59460bb7b83df3b0a36f6118567c519b4f..b7627588e10141c72e25862297afe8db17395360 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/CleanFileCacheTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/CleanFileCacheTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=invalid-name,too-many-public-methods,too-many-arguments,multiple-statements from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/CompareSampleLogsTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/CompareSampleLogsTest.py index 10db38acaf405442a7827c00058c2260f079a3de..4a3eb111852c90e962e8ca278dba0f4c81a5c3d7 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/CompareSampleLogsTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/CompareSampleLogsTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/ComputeCalibrationCoefVanTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/ComputeCalibrationCoefVanTest.py index fecdc8673d2dd89186ba2f9dd36dd68a5ecf1a15..55e35b84207211e9e396016535199914669dcd84 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/ComputeCalibrationCoefVanTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/ComputeCalibrationCoefVanTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/ComputeIncoherentDOSTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/ComputeIncoherentDOSTest.py index 2fbd9cc341538eb72a300f5304aa676b69ec9c51..d4b47cb288fb9d7ec912b600334639b2fa856bf8 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/ComputeIncoherentDOSTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/ComputeIncoherentDOSTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/ConjoinSpectraTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/ConjoinSpectraTest.py index 771aa43520932693d7865f724c2dca7e5570f1e6..23c7375ce2ddcea0663f6a77bc0ec044b90f6280 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/ConjoinSpectraTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/ConjoinSpectraTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/ConvertWANDSCDtoQTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/ConvertWANDSCDtoQTest.py index c07e0b5deaa2f73ea779a58cd6108d7373ce310b..91912d78993c6500d35774bc3083d1701b387fd8 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/ConvertWANDSCDtoQTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/ConvertWANDSCDtoQTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import absolute_import, division, print_function from mantid.simpleapi import ConvertWANDSCDtoQ, CreateMDHistoWorkspace, CreateSingleValuedWorkspace, SetUB, mtd diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/CorrectLogTimesTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/CorrectLogTimesTest.py index 3ecf748365ad2188c52ed4d35f3d8d29956b72ee..56ed13a02d074a2b758df89e2f9fd74227be3e08 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/CorrectLogTimesTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/CorrectLogTimesTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/CorrectTOFTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/CorrectTOFTest.py index 6b7e108909ce5592c645cfcd622d0a45033b05e6..277ad2d115e9f0d3aa0aa43214dab37d67302f91 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/CorrectTOFTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/CorrectTOFTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/CreateCacheFilenameTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/CreateCacheFilenameTest.py index 71a5f5948c9e5720d9f0c41c59b517b2d517a5db..b2bb855087182534fcf96894e0c8ab3e88f4460f 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/CreateCacheFilenameTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/CreateCacheFilenameTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=invalid-name,too-many-public-methods,too-many-arguments from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/CreateLeBailFitInputTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/CreateLeBailFitInputTest.py index d3ecbc3cb199713609d787548ee3cc0a29c503ac..4aa8f1d5e070ac193d94554dda2a4191f7e38511 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/CreateLeBailFitInputTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/CreateLeBailFitInputTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/CreateWorkspaceTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/CreateWorkspaceTest.py index e22b3a2837636f5f8359fe373610635a2186b75b..d7a48126f7dba2467eedf9b48304fcf99fa96d11 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/CreateWorkspaceTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/CreateWorkspaceTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/CropWorkspaceForMDNormTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/CropWorkspaceForMDNormTest.py index 8480831e775f198f55964d361bf16c6022dccec7..d1fdbd1e591ae08603026c22667cdb827dd8c548 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/CropWorkspaceForMDNormTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/CropWorkspaceForMDNormTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/CropWorkspaceRaggedTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/CropWorkspaceRaggedTest.py index 1fabea61b66c9a1b43909b097e7a68085a9a154d..e5349805653aff481a818fc8fd21497858b4300e 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/CropWorkspaceRaggedTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/CropWorkspaceRaggedTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/CylinderPaalmanPingsCorrection2Test.py b/Framework/PythonInterface/test/python/plugins/algorithms/CylinderPaalmanPingsCorrection2Test.py index 1d1d7e42fae3d1448cd0b060b28278d153e6208c..0d5452bfbb95aae9df2b0c49bfe1b6ae8e0ec4f8 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/CylinderPaalmanPingsCorrection2Test.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/CylinderPaalmanPingsCorrection2Test.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/DNSComputeDetEffCorrCoefsTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/DNSComputeDetEffCorrCoefsTest.py index 807336e028c59340a2e19622165d3af9ffe0f48d..5644a024a4b98f7a02f0f7fec4a048d0a006ca06 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/DNSComputeDetEffCorrCoefsTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/DNSComputeDetEffCorrCoefsTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/DNSFlippingRatioCorrTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/DNSFlippingRatioCorrTest.py index 88bfe5437725aa575db351ed577207348c564806..5a09f871aa75c66ccdc7726d4a58b31f9428c72d 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/DNSFlippingRatioCorrTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/DNSFlippingRatioCorrTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/DNSMergeRunsTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/DNSMergeRunsTest.py index 50d487033a4164aeecc7ad35efaf024a04ed19e7..fe6299dba2ae10030c0931ca6083143ace97dc5a 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/DNSMergeRunsTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/DNSMergeRunsTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/DSFinterpTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/DSFinterpTest.py index aa847f3a7873c1c8468d51303fabadd2e58990da..4dc898534b52393f75ee6ae0eca6fa24a5afb743 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/DSFinterpTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/DSFinterpTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/DakotaChiSquaredTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/DakotaChiSquaredTest.py index 80e3bd310c8816016595f8e9ac8d4d0e37a797ac..d73496d8e70f7f1391530439fffef676efde73c3 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/DakotaChiSquaredTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/DakotaChiSquaredTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/DeltaPDF3DTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/DeltaPDF3DTest.py index 48d38325f6a8611f7481fd199a36bd680a1b183a..b69569c2b58010931f57b1e016e162102622e830 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/DeltaPDF3DTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/DeltaPDF3DTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/EnggCalibrateFullTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/EnggCalibrateFullTest.py index 15baa732ed7fa0506f3036ceb21007fa636ee00d..3ac664875eeb1df92949918215d94d72721d8de0 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/EnggCalibrateFullTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/EnggCalibrateFullTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/EnggCalibrateTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/EnggCalibrateTest.py index 73265adb4ec8dd6fc7e377e65616534a8b934337..8b74419fce5573b3733d8668468f456b50189a59 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/EnggCalibrateTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/EnggCalibrateTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/EnggFitPeaksTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/EnggFitPeaksTest.py index 31de2a1e2ce8ab99277dcd9755fbd1281de6f0db..a535fc9f41409eac7fdc0d636991671188ecfb36 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/EnggFitPeaksTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/EnggFitPeaksTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/EnggFitTOFFromPeaksTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/EnggFitTOFFromPeaksTest.py index 729c8022bd91741e49ff60092c30960e110a3b28..b6c8ada02ef0fe1895f99c13452a783be8ada646 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/EnggFitTOFFromPeaksTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/EnggFitTOFFromPeaksTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/EnggFocusTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/EnggFocusTest.py index 94b89a42dc40173c205c1a672f270ccf8515db4b..c5fbd57010f110afb0c8e76c426f400480d23d83 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/EnggFocusTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/EnggFocusTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/EnggSaveGSASIIFitResultsToHDF5Test.py b/Framework/PythonInterface/test/python/plugins/algorithms/EnggSaveGSASIIFitResultsToHDF5Test.py index d3ec3caa23a97691eac3bab706f4392c987d1abe..9c6cc4ede04e7acba1a6655c8e670f2d7a9b599a 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/EnggSaveGSASIIFitResultsToHDF5Test.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/EnggSaveGSASIIFitResultsToHDF5Test.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/EnggSaveSinglePeakFitResultsToHDF5Test.py b/Framework/PythonInterface/test/python/plugins/algorithms/EnggSaveSinglePeakFitResultsToHDF5Test.py index d5b52417b53cb8c5dd96dc9a8007c892a7bf0418..b01576d645b3f2155afaee2dff8c0d1c04e4851a 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/EnggSaveSinglePeakFitResultsToHDF5Test.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/EnggSaveSinglePeakFitResultsToHDF5Test.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/EnggVanadiumCorrectionsTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/EnggVanadiumCorrectionsTest.py index 1c7c31a81e38c3e1652955f85ac39a2531e6cf8c..24f6b2bd1e8c58078bf422cd15d7d83daa5ff1b5 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/EnggVanadiumCorrectionsTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/EnggVanadiumCorrectionsTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/ExportExperimentLogTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/ExportExperimentLogTest.py index 8b30a75b4a1050e1e4ee1149354b20b086400085..6ae58e9127ce25d5cea72ea03e1c9b94cfe1f794 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/ExportExperimentLogTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/ExportExperimentLogTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/ExportSampleLogsToCSVFileTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/ExportSampleLogsToCSVFileTest.py index abcf3a37c996b83974634561ed8d98094e0a84ba..f103669dcfaef807b4e522e38c65c768b40c36fa 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/ExportSampleLogsToCSVFileTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/ExportSampleLogsToCSVFileTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/ExportSampleLogsToHDF5Test.py b/Framework/PythonInterface/test/python/plugins/algorithms/ExportSampleLogsToHDF5Test.py index a6178ff3dd916c47ab8c3f08421fb0585c3975bd..480e8a94f9c92a1d85416e4a4562366dcf17710a 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/ExportSampleLogsToHDF5Test.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/ExportSampleLogsToHDF5Test.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/ExportSpectraMaskTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/ExportSpectraMaskTest.py index 2935be9d0144b204216869d3dc7e9cec1f14a3e7..e89707adee82eca03d5f20282f7632dc9564ddfb 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/ExportSpectraMaskTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/ExportSpectraMaskTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/ExtractMonitorsTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/ExtractMonitorsTest.py index 3f90c7b61c297a5e72284e2c60cddfa7e3e102c9..bfd2ffac5e307f01236dcd07bd860a9b3238f6a3 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/ExtractMonitorsTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/ExtractMonitorsTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/FilterLogByTimeTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/FilterLogByTimeTest.py index a0385435027a1a2fcbd7e2261580b869402d10d8..d5fa9a181e94b7eff57f119ddf361d916c39bcef 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/FilterLogByTimeTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/FilterLogByTimeTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/FitGaussianTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/FitGaussianTest.py index d39bed5e42e904263f85575185ea72da3e5172d4..27cdc9c6ef097959366a013914e564412d3b21be 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/FitGaussianTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/FitGaussianTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/FitIncidentSpectrumTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/FitIncidentSpectrumTest.py index b8e7013954dda30f592227e7012a933f5d61e504..2dfa372c376849794ac1073fcf31a0ecda6cc224 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/FitIncidentSpectrumTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/FitIncidentSpectrumTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/FractionalIndexingTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/FractionalIndexingTest.py index 55f7089ad77c206b92d3eba8ce33d07213041bda..a85e9facdd27fcb5dfeba355bdab49b80a8f9c12 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/FractionalIndexingTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/FractionalIndexingTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + import unittest import numpy as np diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/GetEiT0atSNSTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/GetEiT0atSNSTest.py index ca55c867d0e2bf40dae8f77a39f407967a53b41f..6bee61f04d81606ff5da949bd8a6ec50f43675f0 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/GetEiT0atSNSTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/GetEiT0atSNSTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/HB2AReduceTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/HB2AReduceTest.py index d82980db400ea8f7acd5350481200c5393000cfa..9989f4830765fcc0f8134c6919df1079140ec3db 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/HB2AReduceTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/HB2AReduceTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import absolute_import, division, print_function from mantid.simpleapi import HB2AReduce diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/HFIRSANS2WavelengthTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/HFIRSANS2WavelengthTest.py index ae3be4f2a61ea7372218554be5cfb0d6c33f36d4..cb40e25fd0bdfb2395da7a90dd7a2230971f6e30 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/HFIRSANS2WavelengthTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/HFIRSANS2WavelengthTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) import unittest diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/IndexSatellitePeaksTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/IndexSatellitePeaksTest.py index 6093094c1dc25df3c1254166b1161949ac45a6fd..96c3b5ee80560b8303739358098dd4576832647c 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/IndexSatellitePeaksTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/IndexSatellitePeaksTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from mantid.simpleapi import mtd, Load, IndexSatellitePeaks import unittest diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/IndirectTransmissionTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/IndirectTransmissionTest.py index 64be363967ce8b90543e016643bc5a3887748df0..3bf384766c40f3516764ea28a1a607c2d0301d3c 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/IndirectTransmissionTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/IndirectTransmissionTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/LRPeakSelectionTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/LRPeakSelectionTest.py index 3813b958adc36eac6795f1d9afb3e93a0c9dd93c..9d646a83107bce90245ba205444af0cbf6bd1459 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/LRPeakSelectionTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/LRPeakSelectionTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/LoadAndMergeTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/LoadAndMergeTest.py index 6af4f9b9d509e86a96375d2171c488366dd589a7..7bb064bb6efda948ca28f607d029520ad91f0543 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/LoadAndMergeTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/LoadAndMergeTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/LoadCIFTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/LoadCIFTest.py index 7bbe3d01d24d97f63089a7db1f75602916c974b9..981f28b4233d7c2616bbcb62b1732afac1789e58 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/LoadCIFTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/LoadCIFTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=no-init,too-many-public-methods,invalid-name,protected-access from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/LoadDNSLegacyTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/LoadDNSLegacyTest.py index cbbba782dee27c9ff139e4b7aa1b2d086fa48968..d0eea6fad53217ed659067a03e09ad89290048e0 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/LoadDNSLegacyTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/LoadDNSLegacyTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/LoadEmptyVesuvioTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/LoadEmptyVesuvioTest.py index 1a89eadbf03e421f2d26c1b480e77417d4760a3a..660f72f8b83d7e211881c60767bb05bc8a4616fd 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/LoadEmptyVesuvioTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/LoadEmptyVesuvioTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/LoadFullprofFileTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/LoadFullprofFileTest.py index e55a70b938cce4bd710686bebf5829cd8765ad2b..4aaa8668203ea7b3ccb05d5a73f3173f9e19108e 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/LoadFullprofFileTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/LoadFullprofFileTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/LoadGudrunOutputTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/LoadGudrunOutputTest.py index 63498f7a7cd852595334f4c9c9365660cde922ba..f5be53822bd61d5f140fb3bff36d6ed6116f0373 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/LoadGudrunOutputTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/LoadGudrunOutputTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) from mantid.simpleapi import LoadGudrunOutput, Workspace diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/LoadLampTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/LoadLampTest.py index 2afef078f45ba3d1fa259a3445bc4cfdb11300d7..ed8a24d0d86f5ee362f35ee83fca4e51a75b4c8d 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/LoadLampTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/LoadLampTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) from mantid.simpleapi import config, mtd, LoadLamp diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/LoadLiveDataTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/LoadLiveDataTest.py index bdaf4c7b22d47f3a92f9a7bb6d1d4fdb0bda7d38..1bfb77979e3c337573f98484155aafe00f7fd979 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/LoadLiveDataTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/LoadLiveDataTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/LoadLogPropertyTableTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/LoadLogPropertyTableTest.py index 972556065d826512b89689b47d22508eeaef3b1a..6c65286de65f20d418245d84d5b79c332d305c04 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/LoadLogPropertyTableTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/LoadLogPropertyTableTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/LoadMultipleGSSTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/LoadMultipleGSSTest.py index 87126e86183f177574705218621c14f6c63371c6..5569ed64e9c4d203d5bb9c5413ede21b4fb9fe50 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/LoadMultipleGSSTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/LoadMultipleGSSTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/LoadNMoldyn3AsciiTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/LoadNMoldyn3AsciiTest.py index 994e5f7d8c6a22ef006d9c3932ff4b154ba04744..d06a22c30618c0c42d3506c960b40deff678aaee 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/LoadNMoldyn3AsciiTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/LoadNMoldyn3AsciiTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=too-many-public-methods from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/LoadNMoldyn4Ascii1DTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/LoadNMoldyn4Ascii1DTest.py index d24aac92ffde22835b001469288f9f5012771851..78a68b5cf79e6a1df2bd8e2faa3a96fad63cd49e 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/LoadNMoldyn4Ascii1DTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/LoadNMoldyn4Ascii1DTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/LoadNMoldyn4AsciiTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/LoadNMoldyn4AsciiTest.py index 42a96530e2abf22549e03b32dca38e0ec1a3e8be..54c6c43507f2fa15d1048fae06b21545b2de961f 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/LoadNMoldyn4AsciiTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/LoadNMoldyn4AsciiTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=too-many-public-methods,invalid-name from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/LoadWANDSCDTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/LoadWANDSCDTest.py index 54c30b7da2a4856afc655d9dcba43b8100c2ab22..cda4f1f4a2516b2992c95f4553be9de7442eb30f 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/LoadWANDSCDTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/LoadWANDSCDTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import absolute_import, division, print_function from mantid.simpleapi import LoadWANDSCD diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/MaskAngleTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/MaskAngleTest.py index ead86368ee4114c13fd37fc6227e7e7cb7d979fe..93b53b25af814ace97e5e70acdaa8dc8528e077a 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/MaskAngleTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/MaskAngleTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/MaskBTPTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/MaskBTPTest.py index ef6b95555d1de5303ccc20f2e4afd766436a6f20..4cbeac2717c3cae643c4795a29af8ab0bd1a23a9 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/MaskBTPTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/MaskBTPTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/MaskWorkspaceToCalFileTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/MaskWorkspaceToCalFileTest.py index c400d4e8121f28f5c2af7f19f1f9ec42981f9f23..88a362c3db2dfb04aff33460eeecc557db31d339 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/MaskWorkspaceToCalFileTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/MaskWorkspaceToCalFileTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/MatchPeaksTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/MatchPeaksTest.py index 6173e745701c775b5bf871d1c2564d298c949295..7d13a6a4d196e1dae1487c56b814409bc43e2607 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/MatchPeaksTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/MatchPeaksTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/MatchSpectraTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/MatchSpectraTest.py index ff654cf670fc20e96f2dd85244b69c19869384bd..ecc460b8a18c416563f13339babe572110bfb198 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/MatchSpectraTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/MatchSpectraTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/MeanTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/MeanTest.py index c19daa106a4f2ac74f0cd840ae919d78f173fc55..aa891036ce8fe24d598b8b1223b22ac964d5a501 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/MeanTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/MeanTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/MedianBinWidthTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/MedianBinWidthTest.py index c0d21a4f45634dd01310269ed6b52846a601d65f..d9f6792bdd02bb80a36ca37244f6b04c01664489 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/MedianBinWidthTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/MedianBinWidthTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/MergeCalFilesTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/MergeCalFilesTest.py index 1a568a8ce5c049bc126430d137fd0627e29ff00a..d122ea39de7f288db2171ab0a6b329cb8f0aa5c5 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/MergeCalFilesTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/MergeCalFilesTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/MuonMaxEntTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/MuonMaxEntTest.py index 65a64d77a4f60ba7689a73902e5ec9b3f36710c1..1ff9fd20a37f228705952b5f75c8356c1465d126 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/MuonMaxEntTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/MuonMaxEntTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/MuscatSofQWTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/MuscatSofQWTest.py index 947126a132cf0fcb840d9b1fbeb64ba2b2bed1d6..965e28ee9fb463cc778d0b925a944519985f2435 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/MuscatSofQWTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/MuscatSofQWTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/NMoldyn4InterpolationTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/NMoldyn4InterpolationTest.py index 322c985a928c6a821fd77157e9a11fa0b8ad4813..f69e5edadcc76abec0b52db041a9c4f52803c109 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/NMoldyn4InterpolationTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/NMoldyn4InterpolationTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # Author: Alex Phimister 08/2016 # pylint disable: invalid-name diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/NormaliseSpectraTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/NormaliseSpectraTest.py index e3ab82f0c6ed46f6b669044314b1d080b5a3578a..6b2d8713e8f4fef7ed73a7fcdc7905e5a227a17f 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/NormaliseSpectraTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/NormaliseSpectraTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/OptimizeCrystalPlacementByRunTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/OptimizeCrystalPlacementByRunTest.py index 9429be6ff88a77351cf3ce73fff45f42079f8e5a..f37ab7d447a59d5732a270d81b7529b13c97ad5d 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/OptimizeCrystalPlacementByRunTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/OptimizeCrystalPlacementByRunTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/PDConvertRealSpaceTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/PDConvertRealSpaceTest.py index eebaead6663cf7110448fb714e7970e38b146e41..6d42d188aa4bc7bffe5e98297dda5f920f53701f 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/PDConvertRealSpaceTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/PDConvertRealSpaceTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/PDConvertReciprocalSpaceTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/PDConvertReciprocalSpaceTest.py index 425e0c187cd0b313144cf05d7b65bebd48166392..b2bbf15c40637836bb762540318a104c01828d84 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/PDConvertReciprocalSpaceTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/PDConvertReciprocalSpaceTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/PoldiCreatePeaksFromFileTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/PoldiCreatePeaksFromFileTest.py index b8cb9e18d2f8f825db736da1c5a79bcb622487c2..2bfa2f5f42ae82b960e4fc5403c0f31170dc594d 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/PoldiCreatePeaksFromFileTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/PoldiCreatePeaksFromFileTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=no-init,invalid-name,too-many-public-methods from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/PoldiMergeTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/PoldiMergeTest.py index 3eb2444a6b4a1c446ba9802f79337324e6e7d476..0d88c34962fb498d2ff8afdfefb73d9fa6f689c2 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/PoldiMergeTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/PoldiMergeTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/ReflectometryReductionOneLiveDataTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/ReflectometryReductionOneLiveDataTest.py index b75e58d9a1df32322bcd5be3938243e19a874a8f..88de096dec18816daa50cf3502f46199167c0b15 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/ReflectometryReductionOneLiveDataTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/ReflectometryReductionOneLiveDataTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/ReflectometrySliceEventWorkspaceTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/ReflectometrySliceEventWorkspaceTest.py index 75905175023d82c99413987d653ce6dc3498d9d6..09dc3aeb62297d259e88f46bad16e0f56eee8542 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/ReflectometrySliceEventWorkspaceTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/ReflectometrySliceEventWorkspaceTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/RetrieveRunInfoTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/RetrieveRunInfoTest.py index fa4e08bede53fa2307c7a78a173f4c82c38075b1..76ac755af646b34c99184d252adec8fa74ceded0 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/RetrieveRunInfoTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/RetrieveRunInfoTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/SANSSubtractTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/SANSSubtractTest.py index 064008df2272a0783d890fa4ec7e83a7b8990722..d7e2b738dff045e685230e4d28cc457361d0c4de 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/SANSSubtractTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/SANSSubtractTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/SANSWideAngleCorrectionTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/SANSWideAngleCorrectionTest.py index b7fe9057de696981dd44a2c83556d745f60d96b7..b1e18b13c15490db50224e1722763571fc7b41b8 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/SANSWideAngleCorrectionTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/SANSWideAngleCorrectionTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/SaveGEMMAUDParamFileTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/SaveGEMMAUDParamFileTest.py index 5558a576896031401285123a58ff3eaf06046475..7417e5168f652347aab86c085cbd5f2a184b3f33 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/SaveGEMMAUDParamFileTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/SaveGEMMAUDParamFileTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/SaveNexusPDTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/SaveNexusPDTest.py index 3a2fccde45d167820914bc888be717dfd900083e..343a56aa487309a63afe712fbc9d9f3e17325588 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/SaveNexusPDTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/SaveNexusPDTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=invalid-name,too-many-public-methods,too-many-arguments from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/SavePlot1DAsJsonTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/SavePlot1DAsJsonTest.py index 0b00e5e7a7a7e9b299c550910c36b8f9cfc19f5f..19f6604db164d59a24012427f3b0b0f30602a0be 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/SavePlot1DAsJsonTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/SavePlot1DAsJsonTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=invalid-name,too-many-public-methods,too-many-arguments from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/SaveReflectionsTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/SaveReflectionsTest.py index 6f8900f74f67a4a1719abe99fa458fd94266a6c4..a07a363bfdf928bdc6d84b11df5ec94c305d09a6 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/SaveReflectionsTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/SaveReflectionsTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + import unittest import tempfile diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/SaveYDATest.py b/Framework/PythonInterface/test/python/plugins/algorithms/SaveYDATest.py index b654cc06e0d74c32e606ecbd0e06d72dd3fea856..07e92a131c32c79c55aaa4a0f7613d48c6ae3625 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/SaveYDATest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/SaveYDATest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/SelectNexusFilesByMetadataTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/SelectNexusFilesByMetadataTest.py index 8e544c09e47f95a18160ac3764cba80809f4965b..15626706d52c4907a43c9f14db05fe95913538ac 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/SelectNexusFilesByMetadataTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/SelectNexusFilesByMetadataTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=unused-import from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/SetDetScaleTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/SetDetScaleTest.py index 02315f447b398c4b19b188045136c7a6a6da5c60..df82657a0a2e5cdd91f6ebb49f15befd67c74cc2 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/SetDetScaleTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/SetDetScaleTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/SortByQVectorsTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/SortByQVectorsTest.py index d61834e7b2dafe4aba17342297a21fc44e24dd6e..0f3f2d420f56eaf127db4bf04df55a676951d401 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/SortByQVectorsTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/SortByQVectorsTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/SortDetectorsTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/SortDetectorsTest.py index 20d5ef5a0f250afa18d33a88e69a894b347518e5..55dad04901464a3c4e9c8f015a3bf1a0506ab2b4 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/SortDetectorsTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/SortDetectorsTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/StatisticsOfTableWorkspaceTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/StatisticsOfTableWorkspaceTest.py index 417f35cb590dc7c7f168c8d7800a00094f164fbd..90d127dcb1fd720d16a9d8c6e7f30b8e56def8b6 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/StatisticsOfTableWorkspaceTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/StatisticsOfTableWorkspaceTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/StringToPngTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/StringToPngTest.py index 4ac5ee8c85aca37d3679a7d3d1d330fe1ca7decc..e426fbe4aafe78d3b6646db40fd7188f01b0a136 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/StringToPngTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/StringToPngTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/SuggestTibCNCSTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/SuggestTibCNCSTest.py index 7c5702b36d37242b1b837ab009dbc3e2f3528a30..52288a25abd908227887428c068eec752d221890 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/SuggestTibCNCSTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/SuggestTibCNCSTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/SuggestTibHYSPECTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/SuggestTibHYSPECTest.py index feddaaa75f0058263ac0f30e005e8b9f1a947dcc..65e8b7b023e40b8d2064f2547e57ff3f1466f1ca 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/SuggestTibHYSPECTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/SuggestTibHYSPECTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/SymmetriseTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/SymmetriseTest.py index d1b18d9472f031465a24607f5755cea2c8f770f9..3e4bd6c2a9f32831f1e6cbd8358d649e752b59f8 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/SymmetriseTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/SymmetriseTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=redefined-builtin from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/TOFTOFCropWorkspaceTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/TOFTOFCropWorkspaceTest.py index d1ce03d3c3134b3238ebfd7d543794ceeecb3c29..f06b7d4f40c5053ceec72defc82f6f500a2166af 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/TOFTOFCropWorkspaceTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/TOFTOFCropWorkspaceTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/TOFTOFMergeRunsTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/TOFTOFMergeRunsTest.py index da6301c7b115ebd93ed6b05d976830538492bf06..92f0bca8ea4fe0a78ce7b06923759b265ccc622e 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/TOFTOFMergeRunsTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/TOFTOFMergeRunsTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/UpdatePeakParameterTableValueTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/UpdatePeakParameterTableValueTest.py index 1e0308992b81284dc199137acd6cf26ef0fca706..58bb7741446a4a86dc52d005e379734ebf3c4722 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/UpdatePeakParameterTableValueTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/UpdatePeakParameterTableValueTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/VelocityAutoCorrelationsTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/VelocityAutoCorrelationsTest.py index cddeaac0f8e1f05c6da0d7aef72addadc87d427a..42c65df7669025a3002ce7e0fa37cd15cf839b86 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/VelocityAutoCorrelationsTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/VelocityAutoCorrelationsTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/VelocityCrossCorrelationsTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/VelocityCrossCorrelationsTest.py index f627f79a8b7fe8528fd57b3eccc6c87828a2e059..5fc2f0268c892674f0a19f2d3ca407d7db60c293 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/VelocityCrossCorrelationsTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/VelocityCrossCorrelationsTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/VesuvioPeakPredictionTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/VesuvioPeakPredictionTest.py index 61bfa47b3364d1e76212e6631ceb38c9fa444680..8319214b5e61d867a753cdca39f8b053c9aebbe6 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/VesuvioPeakPredictionTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/VesuvioPeakPredictionTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + import unittest from mantid.simpleapi import VesuvioPeakPrediction diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/VesuvioPreFitTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/VesuvioPreFitTest.py index ae368d8e7bf1d044949ea4ccb75e4a5baf76f908..354f44d5cf3684a7d2180fa80f13b5c75d3f2e9b 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/VesuvioPreFitTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/VesuvioPreFitTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + """ Unit test for Vesuvio pre-fitting steps diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/VesuvioResolutionTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/VesuvioResolutionTest.py index fddbb7e5a7334923a105880f93c7bae7d0f643d1..a3998c9cdde2788a21ec06af261c715c8df153d4 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/VesuvioResolutionTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/VesuvioResolutionTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/VesuvioTOFFitTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/VesuvioTOFFitTest.py index 73edd8704db52880ca6bbd09b609579a07c3aa44..a6cf2e405ac6dfd5c26277f7d96bfdb4a9477b41 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/VesuvioTOFFitTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/VesuvioTOFFitTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + """ Unit test for Vesuvio reduction diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/VesuvioThicknessTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/VesuvioThicknessTest.py index ab64419be44d348e3f995bd550fea0150aa119af..0a42d1bbf180f58e6a8c9cd73e97d884362e586e 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/VesuvioThicknessTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/VesuvioThicknessTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/AddSampleLogMultipleTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/AddSampleLogMultipleTest.py index c4f7e55be280d754910b273d9c10c324fb34f04e..19883d21d72024c356ab4b534989ca3a7977c1bd 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/AddSampleLogMultipleTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/AddSampleLogMultipleTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/ApplyPaalmanPingsCorrectionTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/ApplyPaalmanPingsCorrectionTest.py index ccd23502c03cb7919597ff9eebe953c4805c9fc5..313324a48e293778097971f24a4b7c04d459447b 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/ApplyPaalmanPingsCorrectionTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/ApplyPaalmanPingsCorrectionTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/BayesQuasiTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/BayesQuasiTest.py index 9c8d308ade3ecd2896c7bb1d9e91e516888eba5f..1641351d7791a044875e1f1023b8f970ec57a5fb 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/BayesQuasiTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/BayesQuasiTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/BayesStretchTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/BayesStretchTest.py index 0c589f528f4c96bc21cbac71ba29efe9d3ac47a3..658ba4be7c3e5b976932a0679e7a59d5be22df15 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/BayesStretchTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/BayesStretchTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/CalculateMonteCarloAbsorptionTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/CalculateMonteCarloAbsorptionTest.py index e75e2c359d90e8174a3b799826d3da3207d23d8e..4d963a6355a1808164589a5607debe71fea59b4b 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/CalculateMonteCarloAbsorptionTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/CalculateMonteCarloAbsorptionTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from mantid.kernel import * from mantid.api import * diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/DetectorFloodWeightingTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/DetectorFloodWeightingTest.py index 965896d7194df04cefc787c0a77201b205cb6743..75eec44d2c3300298635453cdb72e9c1ba5f7417 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/DetectorFloodWeightingTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/DetectorFloodWeightingTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/DirectILLApplySelfShieldingTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/DirectILLApplySelfShieldingTest.py index b42cb9e3fdcbd4dd74f33e9615cd84c346dc2446..7403e418018bbfc41cd46e5701554d61e6148578 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/DirectILLApplySelfShieldingTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/DirectILLApplySelfShieldingTest.py @@ -1,10 +1,10 @@ -# -*- coding: utf-8 -*- -# Mantid Repository : https://github.com/mantidproject/mantid +# -*- coding: utf-8 -*-# Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + + from __future__ import (absolute_import, division, print_function) from mantid.api import (mtd) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/DirectILLCollectDataTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/DirectILLCollectDataTest.py index f040fd22723e9ea34f3e1d3656d40a864c10540c..e53a69d7816294dc7667731111d442acdc7d6822 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/DirectILLCollectDataTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/DirectILLCollectDataTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/DirectILLDiagnosticsTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/DirectILLDiagnosticsTest.py index 41d308e415deb5fe0e7d152697da3fd8e7b42898..f21b83c6787d344dcc4988717e3bcfd031bc74c8 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/DirectILLDiagnosticsTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/DirectILLDiagnosticsTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/DirectILLIntegrateVanadiumTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/DirectILLIntegrateVanadiumTest.py index 2651a23a8c0de633ffeac9176539b62cee0f6b74..15da84bc444a85d2b32d1416439b574a90e5de23 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/DirectILLIntegrateVanadiumTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/DirectILLIntegrateVanadiumTest.py @@ -1,9 +1,8 @@ -# -*- coding: utf-8 -*- -# Mantid Repository : https://github.com/mantidproject/mantid +# -*- coding: utf-8 -*-# Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/DirectILLReductionTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/DirectILLReductionTest.py index f2c4b6d1ad2a87043bca819a6827eabc9a190a52..01685333b1c5c9224d4f29cc31508797db0df627 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/DirectILLReductionTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/DirectILLReductionTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/DirectILLSelfShieldingTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/DirectILLSelfShieldingTest.py index 8cad839b2fcb33bb9cd8abdc12608170c4c99cb0..39ed6f27d65e08548d80f79a85bf4b24f92c8437 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/DirectILLSelfShieldingTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/DirectILLSelfShieldingTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/EnergyWindowScanTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/EnergyWindowScanTest.py index 6d45825fb0886b3c4b85d24cfe74fda9bd4bf69e..8b66a39092b22ec20b02bc747e8641df28cce95a 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/EnergyWindowScanTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/EnergyWindowScanTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/FindPeakAutomaticTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/FindPeakAutomaticTest.py index 710518547f108b4d9f094390cd4fc4e0a22698df..632f183057f5a08624641fcdad5de7dda10638ec 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/FindPeakAutomaticTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/FindPeakAutomaticTest.py @@ -1,10 +1,9 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + - import unittest import numpy as np diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/FitGaussianPeaksTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/FitGaussianPeaksTest.py index a62475cbd31803962db8627cadcfac19521d229a..7f43c96386fbbc6b783f2a8b2efbbac07b0f12b8 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/FitGaussianPeaksTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/FitGaussianPeaksTest.py @@ -1,10 +1,9 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + - from __future__ import (absolute_import, division, print_function, unicode_literals) import numpy as np diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/FlatPlatePaalmanPingsCorrectionTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/FlatPlatePaalmanPingsCorrectionTest.py index 512dc80a6d04ef6e233445138a5aa0b6083b3bd5..14084604e463de9e221e2105b37af2010a6fce0a 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/FlatPlatePaalmanPingsCorrectionTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/FlatPlatePaalmanPingsCorrectionTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/ISISIndirectDiffractionReductionTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/ISISIndirectDiffractionReductionTest.py index 941ff0eed411f31275353813c4dd0b1f2a34d8d9..d447069f410b078e4dcee36db449c41173c19027 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/ISISIndirectDiffractionReductionTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/ISISIndirectDiffractionReductionTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=too-many-public-methods,invalid-name diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/ISISIndirectEnergyTransferTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/ISISIndirectEnergyTransferTest.py index 98e72e871947437310cad8aefe89f39c794d0906..452a02eb9f8fd46ee82299c5a759ad33d30ef9d8 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/ISISIndirectEnergyTransferTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/ISISIndirectEnergyTransferTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=too-many-public-methods,invalid-name from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/ISISIndirectEnergyTransferWrapperTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/ISISIndirectEnergyTransferWrapperTest.py index 825ab9d49f065f23082a9d3d6b8b63c314e113c8..ec9ce0787a9e02ec57961f47b1039ca96d8b2f5b 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/ISISIndirectEnergyTransferWrapperTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/ISISIndirectEnergyTransferWrapperTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=too-many-public-methods,invalid-name from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/IndirectAnnulusAbsorption2Test.py b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/IndirectAnnulusAbsorption2Test.py index 4f1f2f6723d3f1c50a7552fc995aa07079af70b8..ce39323af56c4bf8598e33cf42f1f9e0ef377697 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/IndirectAnnulusAbsorption2Test.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/IndirectAnnulusAbsorption2Test.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/IndirectAnnulusAbsorptionTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/IndirectAnnulusAbsorptionTest.py index 032a4ea95db7f3114f661f5b30e7ab1cc5c57500..654ba6c2ad2abf38405f5369a4407f30ec5b74e1 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/IndirectAnnulusAbsorptionTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/IndirectAnnulusAbsorptionTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/IndirectCalibrationTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/IndirectCalibrationTest.py index a32a36dcd29bc5f2003accfa014b4b8e5df837d6..209eed919cb4bf5d9c797ab1360583f6398e891f 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/IndirectCalibrationTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/IndirectCalibrationTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/IndirectCylinderAbsorption2Test.py b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/IndirectCylinderAbsorption2Test.py index 3e49923b8e094076925baf7fe85f29c63a347f4a..f4eb642c1f01aa0641510ec363e2d3898acd8bda 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/IndirectCylinderAbsorption2Test.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/IndirectCylinderAbsorption2Test.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/IndirectCylinderAbsorptionTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/IndirectCylinderAbsorptionTest.py index ec72aad0a702970bbf97aa301214b97d05069d93..89b3877877bbb24c847276b80e9620c992b72172 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/IndirectCylinderAbsorptionTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/IndirectCylinderAbsorptionTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/IndirectDiffScanTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/IndirectDiffScanTest.py index 295907a72eab01038bb69966a061bc66ef5da7b7..e4c297774fc285e9e4cd94a8e01e069a6af40516 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/IndirectDiffScanTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/IndirectDiffScanTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/IndirectFlatPlateAbsorption2Test.py b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/IndirectFlatPlateAbsorption2Test.py index 1f31c5a755b4adeb4838b34bffdead0145820408..b8acb73891538103143f4b3afc6f7db259590dad 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/IndirectFlatPlateAbsorption2Test.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/IndirectFlatPlateAbsorption2Test.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/IndirectFlatPlateAbsorptionTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/IndirectFlatPlateAbsorptionTest.py index 5729f45211dfd9e0c0400a1c62d6e75af2fcdd5d..d69e5744354b809f6de0245261bcc3599f7da6c0 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/IndirectFlatPlateAbsorptionTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/IndirectFlatPlateAbsorptionTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/IndirectILLEnergyTransferTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/IndirectILLEnergyTransferTest.py index 5932699befd92df0b9ebf76bca6ff40a1678236d..6013f355ccbc27af640c352cfa2c546e2048ffbb 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/IndirectILLEnergyTransferTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/IndirectILLEnergyTransferTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/IndirectILLReductionFWSTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/IndirectILLReductionFWSTest.py index 536ceb4fab39b181cfced14e43ce053416d0dd87..e4f640d65012b3f2e6b108c5861dd60b9a63f235 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/IndirectILLReductionFWSTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/IndirectILLReductionFWSTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/IndirectILLReductionQENSTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/IndirectILLReductionQENSTest.py index 12d078a05ece45e74dd916ee56c540253d9c8492..3a5f5529ca8e78de8d542b46f640e8cb2026f6de 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/IndirectILLReductionQENSTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/IndirectILLReductionQENSTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/IndirectReplaceFitResultTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/IndirectReplaceFitResultTest.py index fca9d06b0df78b49cd68d0ab2f9bb7b39f441b0d..59aeda0b3746c04d9adc08de02b9e9038f4dffc2 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/IndirectReplaceFitResultTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/IndirectReplaceFitResultTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/IndirectResolutionTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/IndirectResolutionTest.py index 0583490aff5018f0e66ff42558d37f8787ff884d..03302ce561fb85dcf67ab7724ac4463a08745d23 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/IndirectResolutionTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/IndirectResolutionTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/IndirectSampleChangerTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/IndirectSampleChangerTest.py index 8517fde9a0a7b3fa7bfbb91c620d25793ef39baf..fffa277cbafeedae3916157bf456c2ace5c6a602 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/IndirectSampleChangerTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/IndirectSampleChangerTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/IndirectTransmissionMonitorTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/IndirectTransmissionMonitorTest.py index 73aec24c25344d38a26958f8492125ce44055976..380b11019905879b6a4eda540bdcd49b180133af 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/IndirectTransmissionMonitorTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/IndirectTransmissionMonitorTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/IndirectTwoPeakFitTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/IndirectTwoPeakFitTest.py index 4e89d258293870e2ef1fcac7bc4e96823726d170..6612f157f2e1ec786bbcc590f9dd3a50bb7162d7 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/IndirectTwoPeakFitTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/IndirectTwoPeakFitTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/IqtFitMultipleTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/IqtFitMultipleTest.py index f0b2549327989658d8dcf71849664b4169454704..7c1a82a555ef5e25c1386cf56a1fb6e7c31c5a4f 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/IqtFitMultipleTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/IqtFitMultipleTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/IqtFitSequentialTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/IqtFitSequentialTest.py index 6385741a3b2661d9bf632803c1ba1960d5399ab1..731bb44d8cb334cbbd193ad458ba9d6152f5080b 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/IqtFitSequentialTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/IqtFitSequentialTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/LoadWANDTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/LoadWANDTest.py index ae29461805a9d932964cb88361f21e6b3d26b6c2..2b4a59942f1cb624448f4bedd966598a40a05fdd 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/LoadWANDTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/LoadWANDTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import absolute_import, division, print_function from mantid.simpleapi import LoadWAND diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/MDNormSCDPreprocessIncoherentTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/MDNormSCDPreprocessIncoherentTest.py index c91bd097d2f7a680d4bacba01b4ad56b273972cc..db0ae9ce85ec7edd151478dfe63d44d4267469e1 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/MDNormSCDPreprocessIncoherentTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/MDNormSCDPreprocessIncoherentTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) import unittest diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/MSDFitTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/MSDFitTest.py index 65f5e2fe753c4cd51989668371067b098a156d4a..b01d906598ff87486303ad9b6785160e47213b4f 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/MSDFitTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/MSDFitTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/MatchAndMergeWorkspacesTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/MatchAndMergeWorkspacesTest.py index 74ea740da32c09332e0b66a9cf968e6ffdbc9521..744f4b4eb62c7a907b0dccd128b41fffc019b428 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/MatchAndMergeWorkspacesTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/MatchAndMergeWorkspacesTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/MolDynTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/MolDynTest.py index 36ee2a100e89e1bea6104a77bf39ce84bb1eba38..f4ee79bc32021e0a0a4d6d70fa5c7586aa18736f 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/MolDynTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/MolDynTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=too-many-public-methods,invalid-name from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/OSIRISDiffractionReductionTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/OSIRISDiffractionReductionTest.py index dbb51c2be4bf99dbced00753b19ce3a02b49a3bd..f7daafc8d893b16b31f6e3615e4f468f1c1a4631 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/OSIRISDiffractionReductionTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/OSIRISDiffractionReductionTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=too-many-public-methods,invalid-name from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/PowderILLDetectorScanTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/PowderILLDetectorScanTest.py index 80c0b99e1b617e4dcc434ada00f5f62dd2f98846..f7d28e0ef179c023b938f7efdbb7119e0f7ea485 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/PowderILLDetectorScanTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/PowderILLDetectorScanTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/PowderILLParameterScanTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/PowderILLParameterScanTest.py index c84c075aebe975dd9063724ec1081ce7522939fe..bf3871fb6e5627c31ade4ac145cb4346d039fa90 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/PowderILLParameterScanTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/PowderILLParameterScanTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/ReflectometryILLAutoProcessTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/ReflectometryILLAutoProcessTest.py index 78a941710ee97070c196df119d051714331b6404..b4a46c03afc56919b411db74c68874cf436c26b4 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/ReflectometryILLAutoProcessTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/ReflectometryILLAutoProcessTest.py @@ -1,9 +1,8 @@ -# -*- coding: utf-8 -*- -# Mantid Repository : https://github.com/mantidproject/mantid +# -*- coding: utf-8 -*-# Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/ReflectometryILLConvertToQTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/ReflectometryILLConvertToQTest.py index 064fefe78a98699b9f8ed7ec298f5863b66e68aa..34cd61ca6a82def52a6f5d516593f13f1fa056f1 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/ReflectometryILLConvertToQTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/ReflectometryILLConvertToQTest.py @@ -1,9 +1,8 @@ -# -*- coding: utf-8 -*- -# Mantid Repository : https://github.com/mantidproject/mantid +# -*- coding: utf-8 -*-# Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/ReflectometryILLPolarizationCorTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/ReflectometryILLPolarizationCorTest.py index d23ed0d8a0e5c8f5e0a4911f139a8c9d16398d8f..ee35dd6bb5029d7cb51e451b55b5ebe54a15ef89 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/ReflectometryILLPolarizationCorTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/ReflectometryILLPolarizationCorTest.py @@ -1,9 +1,8 @@ -# -*- coding: utf-8 -*- -# Mantid Repository : https://github.com/mantidproject/mantid +# -*- coding: utf-8 -*-# Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/ReflectometryILLPreprocessTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/ReflectometryILLPreprocessTest.py index f3798487065a1d084df27724270047adf795c34a..b25f2fa7844bd65dc0a2505619132d41705afdd2 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/ReflectometryILLPreprocessTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/ReflectometryILLPreprocessTest.py @@ -1,9 +1,8 @@ -# -*- coding: utf-8 -*- -# Mantid Repository : https://github.com/mantidproject/mantid +# -*- coding: utf-8 -*-# Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/ReflectometryILLSumForegroundTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/ReflectometryILLSumForegroundTest.py index e1221eaccdb5b79e677a7677371e4a2abaa13e8a..e1611f96baae2a0d6de5ea07d61cb3c796a77e15 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/ReflectometryILLSumForegroundTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/ReflectometryILLSumForegroundTest.py @@ -1,9 +1,8 @@ -# -*- coding: utf-8 -*- -# Mantid Repository : https://github.com/mantidproject/mantid +# -*- coding: utf-8 -*-# Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/ReflectometryILL_commonTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/ReflectometryILL_commonTest.py index 98c5e9644d193be83d3e059462d188abb7c4afeb..cae3ad8bf6c4bbc209ac1209518e04c880fc3876 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/ReflectometryILL_commonTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/ReflectometryILL_commonTest.py @@ -1,9 +1,8 @@ -# -*- coding: utf-8 -*- -# Mantid Repository : https://github.com/mantidproject/mantid +# -*- coding: utf-8 -*-# Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/ReflectometryISISLoadAndProcessTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/ReflectometryISISLoadAndProcessTest.py index 99c253390891c08f35a8008fea57f5ae034852bd..6a93cf1ecf0bdf2662b4e937e8a2408e7fb1fb6d 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/ReflectometryISISLoadAndProcessTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/ReflectometryISISLoadAndProcessTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/ResNorm2Test.py b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/ResNorm2Test.py index a618db9f271c0c60b644cb7b52fe8a6aaa130967..b62879a4d176ee59e20cb3a931a9010f43bddbbe 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/ResNorm2Test.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/ResNorm2Test.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/SANSDarkRunBackgroundCorrectionTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/SANSDarkRunBackgroundCorrectionTest.py index 3d192f849ae11b796faa574150b58dc76ddd5dc0..6a571d7acfafbe120b4ee17b733928b48cd92866 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/SANSDarkRunBackgroundCorrectionTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/SANSDarkRunBackgroundCorrectionTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/SANSFitShiftScaleTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/SANSFitShiftScaleTest.py index bb4dc86c12d533d2d6f8741eaf5ebd752a09365b..3a23be12413dc858598bf1a382cccd1ea281ce59 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/SANSFitShiftScaleTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/SANSFitShiftScaleTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/SANSILLIntegrationTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/SANSILLIntegrationTest.py index 93a94d4dfdab3a2b4aaf5755c1e41b04407ba10e..7e4aaf58870e2b7dc38fcb81eac1bf3363082c61 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/SANSILLIntegrationTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/SANSILLIntegrationTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/SANSILLReductionTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/SANSILLReductionTest.py index 9e3e81567eee671a1bce845bec597d90427d228a..23700e030f1b08355cd53669e09aca6342a79ff1 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/SANSILLReductionTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/SANSILLReductionTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/SANSMaskTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/SANSMaskTest.py index 9f9d14fde26c99693bcaf6e822154c72bfd3e6a8..49edeef4e42a831056f6a302fbec71a8fa6e7349 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/SANSMaskTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/SANSMaskTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/SANSStitchTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/SANSStitchTest.py index 5b42f8a14fe4a778dd5494c60ca7b262969df93c..c3a37ecd5d42f71c9441365673bfac7c6370e5bf 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/SANSStitchTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/SANSStitchTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/SavePlot1DTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/SavePlot1DTest.py index 15981dd9a12257d7e29eb7a5b1e9274755e61666..ec6d9ea160ef6d7cf4f82ae3de2c59dab7e4f3ab 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/SavePlot1DTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/SavePlot1DTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/SaveVulcanGSSTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/SaveVulcanGSSTest.py index 8f36146d5574c1d65ca610599144ea960a97436b..23ec76dc102c9a7d39d1bf13b2595f42e4dc7276 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/SaveVulcanGSSTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/SaveVulcanGSSTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) from six.moves import range diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/SimpleShapeMonteCarloAbsorptionTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/SimpleShapeMonteCarloAbsorptionTest.py index 3a2892a55e20dc39fa672c6f0be9bc1ce972beed..8ab032e980d519f1fdfa8d48fcaf0d7e07baabac 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/SimpleShapeMonteCarloAbsorptionTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/SimpleShapeMonteCarloAbsorptionTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) @@ -13,7 +13,8 @@ import unittest class SimpleShapeMonteCarloAbsorptionTest(unittest.TestCase): - def setUp(self): + @classmethod + def setUpClass(self): red_ws = Load('irs26176_graphite002_red.nxs') red_ws = ConvertUnits( InputWorkspace=red_ws, @@ -38,7 +39,7 @@ class SimpleShapeMonteCarloAbsorptionTest(unittest.TestCase): 'OuterRadius': 2.0 }) - corrected = SimpleShapeMonteCarloAbsorption(InputWorkspace=self._red_ws, + __corrected_flat_plate = SimpleShapeMonteCarloAbsorption(InputWorkspace=self._red_ws, Shape='FlatPlate', Width=2.0, Thickness=2.0, @@ -46,7 +47,12 @@ class SimpleShapeMonteCarloAbsorptionTest(unittest.TestCase): # store the basic flat plate workspace so it can be compared with # others - self._corrected_flat_plate = corrected + self._corrected_flat_plate = __corrected_flat_plate + + @classmethod + def tearDownClass(self): + DeleteWorkspace(self._red_ws) + DeleteWorkspace(self._corrected_flat_plate) def _test_corrections_workspace(self, corr_ws): x_unit = corr_ws.getAxis(0).getUnit().unitID() @@ -61,10 +67,6 @@ class SimpleShapeMonteCarloAbsorptionTest(unittest.TestCase): blocksize = corr_ws.blocksize() self.assertEqual(blocksize, 1905) - def tearDown(self): - DeleteWorkspace(self._red_ws) - DeleteWorkspace(self._corrected_flat_plate) - def test_flat_plate(self): # Test flat plate shape diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/SimulatedDensityOfStatesTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/SimulatedDensityOfStatesTest.py index 305adab68418785c9f20dbfa704f6c7ec5462b03..24f0e382956459c60b425ad653385890d54d709c 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/SimulatedDensityOfStatesTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/SimulatedDensityOfStatesTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=too-many-public-methods,invalid-name from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/SofQWMomentsScanTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/SofQWMomentsScanTest.py index 17557c178bbe9392076f41b5788a99737fb65256..16b7498c2f320123cf1f069741d24ff1e19ceba3 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/SofQWMomentsScanTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/SofQWMomentsScanTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + import unittest from mantid.simpleapi import SofQWMomentsScan, DeleteWorkspace diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/SofQWMomentsTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/SofQWMomentsTest.py index 19e8f8b8ab085cf2cfcdb46be6d96e8947b0bf6e..54706645e981b7ee528487ff1b8f2ab1d376c5da 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/SofQWMomentsTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/SofQWMomentsTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/SwapWidthsTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/SwapWidthsTest.py index 6f9538bb3806d8235cadced6c44662321013762b..2ef022800bb53a73cb2062109ca4f90fbf06c270 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/SwapWidthsTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/SwapWidthsTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/TOSCABankCorrectionTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/TOSCABankCorrectionTest.py index 1ff719dd29b6935ae67355ee7b5d5104c9e0be96..d04df142373988618dfd3e3dbf9df3c4c6894732 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/TOSCABankCorrectionTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/TOSCABankCorrectionTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/TimeSliceTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/TimeSliceTest.py index 504b285b815187f1386892f492584ac4d9ed1a66..04a406b7e928dac66d1b1ccac5bd87bdd904c090 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/TimeSliceTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/TimeSliceTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/TotScatCalculateSelfScatteringTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/TotScatCalculateSelfScatteringTest.py index 1b909da5fa0a27f4857bed6445efd6bf4d2f8514..23af31f7d27a6e69911a6631b3ca6dafa4fdbf9f 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/TotScatCalculateSelfScatteringTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/TotScatCalculateSelfScatteringTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/TransformToIqtTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/TransformToIqtTest.py index 4dc0ecc5916a9956509809b11b0959f0cdf0a5de..4b1b92903bb349f492e757f23c2c78d26795e724 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/TransformToIqtTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/TransformToIqtTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/VesuvioDiffractionReductionTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/VesuvioDiffractionReductionTest.py index d0ddc26056030dd8e8a0ae82f3f7c65c8ca6aa4c..1f9f240d66d0082aa0ce530e12a02379e917d673 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/VesuvioDiffractionReductionTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/VesuvioDiffractionReductionTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=too-many-public-methods,invalid-name from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/WANDPowderReductionTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/WANDPowderReductionTest.py index 1bce9801cc84adbed1c46581befc4f5d0a3edcc6..8ade53fe51cfb3c455fa124ff0a09e1662437756 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/WANDPowderReductionTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/WANDPowderReductionTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import absolute_import, division, print_function from mantid.simpleapi import (WANDPowderReduction, diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/sans/SANSBeamCentreFinderTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/sans/SANSBeamCentreFinderTest.py index 820c029a1f430925fcd07714ec78789ea5fb0d48..faa755c4ec0ba75156c63be70c9f61e03548dd2a 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/sans/SANSBeamCentreFinderTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/sans/SANSBeamCentreFinderTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + import unittest diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/sans/SANSConvertToWavelengthAndRebinTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/sans/SANSConvertToWavelengthAndRebinTest.py index a7b7a0e33430c9ec4f1359e1c37c06f7ecf68839..735aa2ec17bac347b719b77e2588cb45964f9912 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/sans/SANSConvertToWavelengthAndRebinTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/sans/SANSConvertToWavelengthAndRebinTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) import unittest diff --git a/Framework/PythonInterface/test/python/plugins/functions/AFM_LFTest.py b/Framework/PythonInterface/test/python/plugins/functions/AFM_LFTest.py index 09797e80bf17b59f41424cc3372887253f3cf863..89ffdd5f068783d5b38f8ef2b14d548f30e3f96c 100644 --- a/Framework/PythonInterface/test/python/plugins/functions/AFM_LFTest.py +++ b/Framework/PythonInterface/test/python/plugins/functions/AFM_LFTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/functions/AFM_ZFTest.py b/Framework/PythonInterface/test/python/plugins/functions/AFM_ZFTest.py index 296bf26166243a33f274ea36ea379f0dea952284..94077cd13c1711db69d828c0dcdca0e8ff71c896 100644 --- a/Framework/PythonInterface/test/python/plugins/functions/AFM_ZFTest.py +++ b/Framework/PythonInterface/test/python/plugins/functions/AFM_ZFTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/functions/AttributeTest.py b/Framework/PythonInterface/test/python/plugins/functions/AttributeTest.py index d1ae0d4c6329f344e12524ab118cdcec1d846734..bf5784336d5b461943454c983f0af39e70aac4c5 100644 --- a/Framework/PythonInterface/test/python/plugins/functions/AttributeTest.py +++ b/Framework/PythonInterface/test/python/plugins/functions/AttributeTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/functions/BesselTest.py b/Framework/PythonInterface/test/python/plugins/functions/BesselTest.py index 33fca8e5f0d71f5e25e4b841128176115fe259c7..27de45812ee827c086c65bfb8b40c09739f93452 100644 --- a/Framework/PythonInterface/test/python/plugins/functions/BesselTest.py +++ b/Framework/PythonInterface/test/python/plugins/functions/BesselTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/functions/ChudleyElliotTest.py b/Framework/PythonInterface/test/python/plugins/functions/ChudleyElliotTest.py index ffdb15898cec910f90391cff3096659104917697..14e4835f19d9c7547e2141dc69b27f7045490c1d 100644 --- a/Framework/PythonInterface/test/python/plugins/functions/ChudleyElliotTest.py +++ b/Framework/PythonInterface/test/python/plugins/functions/ChudleyElliotTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/functions/CombGaussLorentzKTTest.py b/Framework/PythonInterface/test/python/plugins/functions/CombGaussLorentzKTTest.py index fae9d8427191a66a150c28d7f5ae6ab1c8ce5b8e..b1671db7a0d1b0aafabfb32c5745dde2abe38697 100644 --- a/Framework/PythonInterface/test/python/plugins/functions/CombGaussLorentzKTTest.py +++ b/Framework/PythonInterface/test/python/plugins/functions/CombGaussLorentzKTTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/functions/CompositePCRmagnetTest.py b/Framework/PythonInterface/test/python/plugins/functions/CompositePCRmagnetTest.py index 4d6f0bc93f3491ae350f4b2aae3f137cc7ea7eaf..ea61f944e5f175186e4ca58618d0a0dea907467a 100644 --- a/Framework/PythonInterface/test/python/plugins/functions/CompositePCRmagnetTest.py +++ b/Framework/PythonInterface/test/python/plugins/functions/CompositePCRmagnetTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/functions/DSFinterp1DFitTest.py b/Framework/PythonInterface/test/python/plugins/functions/DSFinterp1DFitTest.py index ae5f9bac57d986ff903c8ac06728eed041808ee8..d23bb7cbd33b81e6c24c57da41195f62def1e21d 100644 --- a/Framework/PythonInterface/test/python/plugins/functions/DSFinterp1DFitTest.py +++ b/Framework/PythonInterface/test/python/plugins/functions/DSFinterp1DFitTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/functions/DampedBesselTest.py b/Framework/PythonInterface/test/python/plugins/functions/DampedBesselTest.py index ff6539a8eba6d0fb3c9f30a90f4a560841b4a293..8535ecfa86a9e1ba3009f088e0a80f87d023dc2e 100644 --- a/Framework/PythonInterface/test/python/plugins/functions/DampedBesselTest.py +++ b/Framework/PythonInterface/test/python/plugins/functions/DampedBesselTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/functions/EISFDiffCylinderTest.py b/Framework/PythonInterface/test/python/plugins/functions/EISFDiffCylinderTest.py index 2deb63a0fa233d58cd86c97e164adae224d4f910..b6929e36e5daa795d267ffa236f54c8f98f6036a 100644 --- a/Framework/PythonInterface/test/python/plugins/functions/EISFDiffCylinderTest.py +++ b/Framework/PythonInterface/test/python/plugins/functions/EISFDiffCylinderTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/functions/EISFDiffSphereAlkylTest.py b/Framework/PythonInterface/test/python/plugins/functions/EISFDiffSphereAlkylTest.py index 0d2d2a480d8bb645e6d217a26d01721481c8662a..262de3c569c8cfdd533b3a68286d3f724373f433 100644 --- a/Framework/PythonInterface/test/python/plugins/functions/EISFDiffSphereAlkylTest.py +++ b/Framework/PythonInterface/test/python/plugins/functions/EISFDiffSphereAlkylTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/functions/EISFDiffSphereTest.py b/Framework/PythonInterface/test/python/plugins/functions/EISFDiffSphereTest.py index 0270bed525b7f48802ad7b964d6ee7a78fc9380b..03986189c426297e8e819a69d4d141e57d7fc941 100644 --- a/Framework/PythonInterface/test/python/plugins/functions/EISFDiffSphereTest.py +++ b/Framework/PythonInterface/test/python/plugins/functions/EISFDiffSphereTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/functions/Example1DFunctionTest.py b/Framework/PythonInterface/test/python/plugins/functions/Example1DFunctionTest.py index d4cf08865bdf5872ac1d166f3bb5b6f874a64c73..14a7748598ed17590df3d30aaad7c74e15e682ba 100644 --- a/Framework/PythonInterface/test/python/plugins/functions/Example1DFunctionTest.py +++ b/Framework/PythonInterface/test/python/plugins/functions/Example1DFunctionTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/functions/ExamplePeakFunctionTest.py b/Framework/PythonInterface/test/python/plugins/functions/ExamplePeakFunctionTest.py index 05196904084d71def009a568b18e4eb5f414cba3..65e1eb08faaaebd366bf7c0d9b8d2e990540c11e 100644 --- a/Framework/PythonInterface/test/python/plugins/functions/ExamplePeakFunctionTest.py +++ b/Framework/PythonInterface/test/python/plugins/functions/ExamplePeakFunctionTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/functions/FmuFTest.py b/Framework/PythonInterface/test/python/plugins/functions/FmuFTest.py index e330e8d9d864de6fc62b1842cf7230f1fc0e8185..719205a4d91c7853d0c5bbca3ae332a68a1f8566 100644 --- a/Framework/PythonInterface/test/python/plugins/functions/FmuFTest.py +++ b/Framework/PythonInterface/test/python/plugins/functions/FmuFTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/functions/GauBroadGauKTTest.py b/Framework/PythonInterface/test/python/plugins/functions/GauBroadGauKTTest.py index 47530bcf710a6a49dc33d5b89ff92e7fed840d2b..85e4daf4e2f9d4a58f2390a1cabf42edc2055a5b 100644 --- a/Framework/PythonInterface/test/python/plugins/functions/GauBroadGauKTTest.py +++ b/Framework/PythonInterface/test/python/plugins/functions/GauBroadGauKTTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/functions/GaussBesselTest.py b/Framework/PythonInterface/test/python/plugins/functions/GaussBesselTest.py index 447dbcde3038cdcfb38600477d75f178838305af..ec53472438f802640b5906f3082f9e648cd2e8c8 100644 --- a/Framework/PythonInterface/test/python/plugins/functions/GaussBesselTest.py +++ b/Framework/PythonInterface/test/python/plugins/functions/GaussBesselTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/functions/HighTFMuoniumTest.py b/Framework/PythonInterface/test/python/plugins/functions/HighTFMuoniumTest.py index 39536390badb434b048ed7153ad906e0cd8053b6..820d22a23f797dffd6a1cfa285f71d5acf39b17d 100644 --- a/Framework/PythonInterface/test/python/plugins/functions/HighTFMuoniumTest.py +++ b/Framework/PythonInterface/test/python/plugins/functions/HighTFMuoniumTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/functions/LowTFMuoniumTest.py b/Framework/PythonInterface/test/python/plugins/functions/LowTFMuoniumTest.py index b8ff96a30e5faf7c3790271a2d9b1bb6bf9147ed..5605e9b2f151da24e0963d12155dab14e6f241ab 100644 --- a/Framework/PythonInterface/test/python/plugins/functions/LowTFMuoniumTest.py +++ b/Framework/PythonInterface/test/python/plugins/functions/LowTFMuoniumTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/functions/MeierTest.py b/Framework/PythonInterface/test/python/plugins/functions/MeierTest.py index 2b99dd8b91fb6c80a647bdcea610c6f3bc674f1c..2cb2b8785a9fca19f16832ebc8e92d27d126520a 100644 --- a/Framework/PythonInterface/test/python/plugins/functions/MeierTest.py +++ b/Framework/PythonInterface/test/python/plugins/functions/MeierTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/functions/ModOscTest.py b/Framework/PythonInterface/test/python/plugins/functions/ModOscTest.py index 51f9bbf61392703f101ca5ee1c952054c258a4d3..0d54f46e08bb03b30723bb71e7d265cb3ab22661 100644 --- a/Framework/PythonInterface/test/python/plugins/functions/ModOscTest.py +++ b/Framework/PythonInterface/test/python/plugins/functions/ModOscTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/functions/MsdGaussTest.py b/Framework/PythonInterface/test/python/plugins/functions/MsdGaussTest.py index 9bf812c98c1c4c221d8f756a091f9294fd07c712..f8da7ed228a19213d5317856576483c4ba714607 100644 --- a/Framework/PythonInterface/test/python/plugins/functions/MsdGaussTest.py +++ b/Framework/PythonInterface/test/python/plugins/functions/MsdGaussTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/functions/MsdPetersTest.py b/Framework/PythonInterface/test/python/plugins/functions/MsdPetersTest.py index 86ff0730ccdaf2d7c59367c7aa96855ba4c57474..8115e580174eb3236d57f0de7659386278bfd632 100644 --- a/Framework/PythonInterface/test/python/plugins/functions/MsdPetersTest.py +++ b/Framework/PythonInterface/test/python/plugins/functions/MsdPetersTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/functions/MsdTestHelper.py b/Framework/PythonInterface/test/python/plugins/functions/MsdTestHelper.py index b80be7b2c611df6a3fd4417fcc761906a2440eb3..70e61259ddeb82e78245543f46d53a65025ecc9c 100644 --- a/Framework/PythonInterface/test/python/plugins/functions/MsdTestHelper.py +++ b/Framework/PythonInterface/test/python/plugins/functions/MsdTestHelper.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from mantid.simpleapi import (Fit, FunctionWrapper, CreateWorkspace) from mantid.api import (FunctionFactory, WorkspaceFactory) diff --git a/Framework/PythonInterface/test/python/plugins/functions/MsdYiTest.py b/Framework/PythonInterface/test/python/plugins/functions/MsdYiTest.py index 4a1e5431d573283d2c73a486801b50ac2adc5d42..1df748c01b15a6a06de40333d2b6fe43b012c616 100644 --- a/Framework/PythonInterface/test/python/plugins/functions/MsdYiTest.py +++ b/Framework/PythonInterface/test/python/plugins/functions/MsdYiTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/functions/MuHTest.py b/Framework/PythonInterface/test/python/plugins/functions/MuHTest.py index a46c8c2dc4b2fe5ee06b4380081b84f185adf543..8af4bf30017ffd7daf337aeecfec0c9452a6d6fa 100644 --- a/Framework/PythonInterface/test/python/plugins/functions/MuHTest.py +++ b/Framework/PythonInterface/test/python/plugins/functions/MuHTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/functions/MuMinusExpTFTest.py b/Framework/PythonInterface/test/python/plugins/functions/MuMinusExpTFTest.py index 77152184db4e598e4775a7d945ba64cc780597f3..fa6f95ad6e05849b9e48771568db6c5e970317b8 100644 --- a/Framework/PythonInterface/test/python/plugins/functions/MuMinusExpTFTest.py +++ b/Framework/PythonInterface/test/python/plugins/functions/MuMinusExpTFTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/functions/PCRmagnetRedfieldTest.py b/Framework/PythonInterface/test/python/plugins/functions/PCRmagnetRedfieldTest.py index b246167dfa7b344dcded7e725799487be99c6eb9..458842e126040f89b58cd48e51458d157f76f571 100644 --- a/Framework/PythonInterface/test/python/plugins/functions/PCRmagnetRedfieldTest.py +++ b/Framework/PythonInterface/test/python/plugins/functions/PCRmagnetRedfieldTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/functions/PCRmagnetTest.py b/Framework/PythonInterface/test/python/plugins/functions/PCRmagnetTest.py index 54d4a08a6796d237d31fdad6e11d10e495fd19d8..4e8eea6d347e035b7672b4df84f8ed6c340369aa 100644 --- a/Framework/PythonInterface/test/python/plugins/functions/PCRmagnetTest.py +++ b/Framework/PythonInterface/test/python/plugins/functions/PCRmagnetTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/functions/PCRmagnetZFKTTest.py b/Framework/PythonInterface/test/python/plugins/functions/PCRmagnetZFKTTest.py index 1989c50e7e28144f897b51fd08a05778dd23d9b0..b925f5fa25cb19dc1abf1682c2856ad9493ccfeb 100644 --- a/Framework/PythonInterface/test/python/plugins/functions/PCRmagnetZFKTTest.py +++ b/Framework/PythonInterface/test/python/plugins/functions/PCRmagnetZFKTTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/functions/PCRmagnetfnormTest.py b/Framework/PythonInterface/test/python/plugins/functions/PCRmagnetfnormTest.py index 3d750591916a110b99574b15dcba58b345f11303..91a9f620cb7a81daa79311d0e192eddb770bb853 100644 --- a/Framework/PythonInterface/test/python/plugins/functions/PCRmagnetfnormTest.py +++ b/Framework/PythonInterface/test/python/plugins/functions/PCRmagnetfnormTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/functions/PrimStretchedExpFTTest.py b/Framework/PythonInterface/test/python/plugins/functions/PrimStretchedExpFTTest.py index ba48b0ea296577e763bc6b9d5d6ffe471b030308..01bcd3335f4fbc5c294c54dd9890edd773b33785 100644 --- a/Framework/PythonInterface/test/python/plugins/functions/PrimStretchedExpFTTest.py +++ b/Framework/PythonInterface/test/python/plugins/functions/PrimStretchedExpFTTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) import unittest diff --git a/Framework/PythonInterface/test/python/plugins/functions/RFresonanceTest.py b/Framework/PythonInterface/test/python/plugins/functions/RFresonanceTest.py index f3e03cfe02c30317591fcf5b3b72daf21e58b6da..eaf5f700e7d9b8bfdb5834f7f47a54d78d31d4ce 100644 --- a/Framework/PythonInterface/test/python/plugins/functions/RFresonanceTest.py +++ b/Framework/PythonInterface/test/python/plugins/functions/RFresonanceTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/functions/RedfieldTest.py b/Framework/PythonInterface/test/python/plugins/functions/RedfieldTest.py index 3b6d2e1ca06d9e0ef0dc01e59ce066c233a63f5c..52bc64a9ccbd9772d039d55f6b97e28e2f31e1ac 100644 --- a/Framework/PythonInterface/test/python/plugins/functions/RedfieldTest.py +++ b/Framework/PythonInterface/test/python/plugins/functions/RedfieldTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/functions/SpinGlassTest.py b/Framework/PythonInterface/test/python/plugins/functions/SpinGlassTest.py index 86687121607ceca0f56f19cc8f93260b717ad04b..7b771e4c5cce3d097fc09d496224dc9149014dd4 100644 --- a/Framework/PythonInterface/test/python/plugins/functions/SpinGlassTest.py +++ b/Framework/PythonInterface/test/python/plugins/functions/SpinGlassTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/functions/StandardSCTest.py b/Framework/PythonInterface/test/python/plugins/functions/StandardSCTest.py index e9c79559a53c7c47dcf476e0d96a4bed30757468..537ee0f870478ad2f67b779ab5a7a010f2757a53 100644 --- a/Framework/PythonInterface/test/python/plugins/functions/StandardSCTest.py +++ b/Framework/PythonInterface/test/python/plugins/functions/StandardSCTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/functions/StaticLorentzianKTTest.py b/Framework/PythonInterface/test/python/plugins/functions/StaticLorentzianKTTest.py index 42e7c3fcece80febf99d3abd07bde6bce366aa4a..d996f040ac99edf341af0e78d60523d31f79f8e3 100644 --- a/Framework/PythonInterface/test/python/plugins/functions/StaticLorentzianKTTest.py +++ b/Framework/PythonInterface/test/python/plugins/functions/StaticLorentzianKTTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/functions/StretchedExpFTTest.py b/Framework/PythonInterface/test/python/plugins/functions/StretchedExpFTTest.py index d99d74846013f1791e7b39b3cdce4e080e192d8a..b3e5c68766644596e3e0efb48afa1c1685d75bef 100644 --- a/Framework/PythonInterface/test/python/plugins/functions/StretchedExpFTTest.py +++ b/Framework/PythonInterface/test/python/plugins/functions/StretchedExpFTTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) import unittest diff --git a/Framework/PythonInterface/test/python/plugins/functions/StretchedExpFTTestHelper.py b/Framework/PythonInterface/test/python/plugins/functions/StretchedExpFTTestHelper.py index e970412190825e5d489a03ff25a96c45602ee824..991c49ece8a3b10b3435fd038c72b4a113a592e4 100644 --- a/Framework/PythonInterface/test/python/plugins/functions/StretchedExpFTTestHelper.py +++ b/Framework/PythonInterface/test/python/plugins/functions/StretchedExpFTTestHelper.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/functions/StretchedKTTest.py b/Framework/PythonInterface/test/python/plugins/functions/StretchedKTTest.py index f3bf821e43602ee6d42ce3110f0bc08aa1d41398..5cbbb673aa82290cacf71dcd126d4fa295334e6d 100644 --- a/Framework/PythonInterface/test/python/plugins/functions/StretchedKTTest.py +++ b/Framework/PythonInterface/test/python/plugins/functions/StretchedKTTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/functions/TFMuoniumTest.py b/Framework/PythonInterface/test/python/plugins/functions/TFMuoniumTest.py index d9622c3bc5366a898e9f1c30d65c6dd9a431ac6a..e78ad616f88ef3969c6c91e5cfcd7b3ea70ccbcc 100644 --- a/Framework/PythonInterface/test/python/plugins/functions/TFMuoniumTest.py +++ b/Framework/PythonInterface/test/python/plugins/functions/TFMuoniumTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/functions/TeixeiraWaterTest.py b/Framework/PythonInterface/test/python/plugins/functions/TeixeiraWaterTest.py index 7b9e5ed99f58e25ec0d11e264263380e22d18872..a26a3f56c567b1e0c4bc2768d3b2c48a617920f2 100644 --- a/Framework/PythonInterface/test/python/plugins/functions/TeixeiraWaterTest.py +++ b/Framework/PythonInterface/test/python/plugins/functions/TeixeiraWaterTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/functions/ZFMuoniumTest.py b/Framework/PythonInterface/test/python/plugins/functions/ZFMuoniumTest.py index 9963085918cb8ecc96b20dfe6ce72d905b178e0d..74633aeacf70f9864e07013b5e84692fa1fc781f 100644 --- a/Framework/PythonInterface/test/python/plugins/functions/ZFMuoniumTest.py +++ b/Framework/PythonInterface/test/python/plugins/functions/ZFMuoniumTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/functions/ZFdipoleTest.py b/Framework/PythonInterface/test/python/plugins/functions/ZFdipoleTest.py index ddf1d18d240f552b38af2c45c470e761bd6e50f3..ffe8d0db6c7eb3a27e85b1e1d474d0ad206dea2f 100644 --- a/Framework/PythonInterface/test/python/plugins/functions/ZFdipoleTest.py +++ b/Framework/PythonInterface/test/python/plugins/functions/ZFdipoleTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/functions/ZFelectronDipoleTest.py b/Framework/PythonInterface/test/python/plugins/functions/ZFelectronDipoleTest.py index 1af55c9e7feeaa97d8c01a3a7f0b2cb78037afeb..f6702b678300c69c362f61fefbc3cbf910289670 100644 --- a/Framework/PythonInterface/test/python/plugins/functions/ZFelectronDipoleTest.py +++ b/Framework/PythonInterface/test/python/plugins/functions/ZFelectronDipoleTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/python/plugins/functions/ZFprotonDipoleTest.py b/Framework/PythonInterface/test/python/plugins/functions/ZFprotonDipoleTest.py index b4d8cf4bc526ae16be5cc68359a3ff45d747f0bf..6aea67e457bfc8fbdd7dcf7881c796700b9defbc 100644 --- a/Framework/PythonInterface/test/python/plugins/functions/ZFprotonDipoleTest.py +++ b/Framework/PythonInterface/test/python/plugins/functions/ZFprotonDipoleTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/testhelpers/WorkspaceCreationHelper/WorkspaceCreationHelperModule.cpp b/Framework/PythonInterface/test/testhelpers/WorkspaceCreationHelper/WorkspaceCreationHelperModule.cpp index f00b2ea8721675830588a7a9b11ad172c664c691..cd8f01aeb223a8c95bfc59ccc54c7619aeec73b5 100644 --- a/Framework/PythonInterface/test/testhelpers/WorkspaceCreationHelper/WorkspaceCreationHelperModule.cpp +++ b/Framework/PythonInterface/test/testhelpers/WorkspaceCreationHelper/WorkspaceCreationHelperModule.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /****************************************************************************** * Python module wrapper for the WorkspaceCreationHelper methods diff --git a/Framework/PythonInterface/test/testhelpers/WorkspaceCreationHelper/__init__.py b/Framework/PythonInterface/test/testhelpers/WorkspaceCreationHelper/__init__.py index 4f6a61e8cf6513278aadee72c5a1daecce8acfef..e263aa0814864f68a91009f8e92fc68210d1d643 100644 --- a/Framework/PythonInterface/test/testhelpers/WorkspaceCreationHelper/__init__.py +++ b/Framework/PythonInterface/test/testhelpers/WorkspaceCreationHelper/__init__.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import absolute_import diff --git a/Framework/PythonInterface/test/testhelpers/__init__.py b/Framework/PythonInterface/test/testhelpers/__init__.py index e13f3ff977d36c6e8208191b7b67e9ba9723a0f2..395d69af206a21f9a5c01e9d2e36ce5218a1d88f 100644 --- a/Framework/PythonInterface/test/testhelpers/__init__.py +++ b/Framework/PythonInterface/test/testhelpers/__init__.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + """Defines a set of helpers wrapped around the C++ TestHelpers package that are for use in unit tests only! diff --git a/Framework/PythonInterface/test/testhelpers/algorithm_decorator.py b/Framework/PythonInterface/test/testhelpers/algorithm_decorator.py index 613b93e627d8c6e39171326d6da500b0bf50a0a0..9bb863b56fbef9794da4a632029d71d5e3ba2355 100644 --- a/Framework/PythonInterface/test/testhelpers/algorithm_decorator.py +++ b/Framework/PythonInterface/test/testhelpers/algorithm_decorator.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/testhelpers/illhelpers.py b/Framework/PythonInterface/test/testhelpers/illhelpers.py index 663b07c3a0cacc40f475cd4948162cda644167cc..307a5a77d2f52e9d37afa3702e085765a276612e 100644 --- a/Framework/PythonInterface/test/testhelpers/illhelpers.py +++ b/Framework/PythonInterface/test/testhelpers/illhelpers.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/testhelpers/mlzhelpers.py b/Framework/PythonInterface/test/testhelpers/mlzhelpers.py index c5e8ba602bb64be0906bd64ccc5737195c1055f5..02a9631f73737920d41d9504bc967f9ff08117dc 100644 --- a/Framework/PythonInterface/test/testhelpers/mlzhelpers.py +++ b/Framework/PythonInterface/test/testhelpers/mlzhelpers.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/testhelpers/tempfile_wrapper.py b/Framework/PythonInterface/test/testhelpers/tempfile_wrapper.py index e6867aee456cff60a45424b1fdbe7c23d98a2ea8..9d75d8031c35c3b53ef6c672fb9a0962f75297e2 100644 --- a/Framework/PythonInterface/test/testhelpers/tempfile_wrapper.py +++ b/Framework/PythonInterface/test/testhelpers/tempfile_wrapper.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Framework/PythonInterface/test/testhelpers/testrunner.py b/Framework/PythonInterface/test/testhelpers/testrunner.py index 7a963fe23aca57556022cb70bced13a97547ddd1..161558f5ea6928a36adf7b16954dceea082fa22a 100644 --- a/Framework/PythonInterface/test/testhelpers/testrunner.py +++ b/Framework/PythonInterface/test/testhelpers/testrunner.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + """Provides a runner to execute unit tests with a given runner. It basically sets the sip API to version 2. We can get rid of this diff --git a/Framework/RemoteAlgorithms/inc/MantidRemoteAlgorithms/AbortRemoteJob.h b/Framework/RemoteAlgorithms/inc/MantidRemoteAlgorithms/AbortRemoteJob.h index f14f5278be9b89b4f8e34e30a03511b5d0be5960..367f31a65ecd2fbe9b0c4206b8a8bbd3a0c67eda 100644 --- a/Framework/RemoteAlgorithms/inc/MantidRemoteAlgorithms/AbortRemoteJob.h +++ b/Framework/RemoteAlgorithms/inc/MantidRemoteAlgorithms/AbortRemoteJob.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/RemoteAlgorithms/inc/MantidRemoteAlgorithms/AbortRemoteJob2.h b/Framework/RemoteAlgorithms/inc/MantidRemoteAlgorithms/AbortRemoteJob2.h index d9c1e84e90c9ca2114a16379ee8bb6065dfceeec..548c676d78c56dbd73e5a7998c9138fc445542b8 100644 --- a/Framework/RemoteAlgorithms/inc/MantidRemoteAlgorithms/AbortRemoteJob2.h +++ b/Framework/RemoteAlgorithms/inc/MantidRemoteAlgorithms/AbortRemoteJob2.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/RemoteAlgorithms/inc/MantidRemoteAlgorithms/Authenticate.h b/Framework/RemoteAlgorithms/inc/MantidRemoteAlgorithms/Authenticate.h index 57f04ad9f71f327e521d16e13eed39d7e3f004e8..246dcf33655c61bdf7b07274ccf004cf68eec9cf 100644 --- a/Framework/RemoteAlgorithms/inc/MantidRemoteAlgorithms/Authenticate.h +++ b/Framework/RemoteAlgorithms/inc/MantidRemoteAlgorithms/Authenticate.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/RemoteAlgorithms/inc/MantidRemoteAlgorithms/Authenticate2.h b/Framework/RemoteAlgorithms/inc/MantidRemoteAlgorithms/Authenticate2.h index 7a82f032df3243be90bfaa7cd88df6a54d05a698..63723ab6a270b1d3fba559aee560f40974432c6b 100644 --- a/Framework/RemoteAlgorithms/inc/MantidRemoteAlgorithms/Authenticate2.h +++ b/Framework/RemoteAlgorithms/inc/MantidRemoteAlgorithms/Authenticate2.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/RemoteAlgorithms/inc/MantidRemoteAlgorithms/DownloadRemoteFile.h b/Framework/RemoteAlgorithms/inc/MantidRemoteAlgorithms/DownloadRemoteFile.h index ea0f41f5846d6bc20ee556039520022dfc591b4e..0c776d5e2c88e7db2528efb0c125eb75db70d2d9 100644 --- a/Framework/RemoteAlgorithms/inc/MantidRemoteAlgorithms/DownloadRemoteFile.h +++ b/Framework/RemoteAlgorithms/inc/MantidRemoteAlgorithms/DownloadRemoteFile.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/RemoteAlgorithms/inc/MantidRemoteAlgorithms/DownloadRemoteFile2.h b/Framework/RemoteAlgorithms/inc/MantidRemoteAlgorithms/DownloadRemoteFile2.h index 218da208760f21d85e9b9bce8b2466fdb66a3cf1..8e4e3d7e86287a73e4c0e77489612e9c04951ce5 100644 --- a/Framework/RemoteAlgorithms/inc/MantidRemoteAlgorithms/DownloadRemoteFile2.h +++ b/Framework/RemoteAlgorithms/inc/MantidRemoteAlgorithms/DownloadRemoteFile2.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/RemoteAlgorithms/inc/MantidRemoteAlgorithms/Logout2.h b/Framework/RemoteAlgorithms/inc/MantidRemoteAlgorithms/Logout2.h index 15bc3e6f0f2f3782a9ce07b904b0a537a1d97764..c3aa57726ac7ed8073f86821e3daa82adee70272 100644 --- a/Framework/RemoteAlgorithms/inc/MantidRemoteAlgorithms/Logout2.h +++ b/Framework/RemoteAlgorithms/inc/MantidRemoteAlgorithms/Logout2.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/RemoteAlgorithms/inc/MantidRemoteAlgorithms/QueryAllRemoteJobs.h b/Framework/RemoteAlgorithms/inc/MantidRemoteAlgorithms/QueryAllRemoteJobs.h index 8b6c3e402af7924386ef91dc2cae7de67d9ca58b..58de20f0245bd7ffcea8c15b1208a9d0a95337d8 100644 --- a/Framework/RemoteAlgorithms/inc/MantidRemoteAlgorithms/QueryAllRemoteJobs.h +++ b/Framework/RemoteAlgorithms/inc/MantidRemoteAlgorithms/QueryAllRemoteJobs.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/RemoteAlgorithms/inc/MantidRemoteAlgorithms/QueryAllRemoteJobs2.h b/Framework/RemoteAlgorithms/inc/MantidRemoteAlgorithms/QueryAllRemoteJobs2.h index c3f0667e1a13cc4063f7c2198d5a6e27927e258e..9ed00788c13f24bcedde79f6aeedd07a2ebba825 100644 --- a/Framework/RemoteAlgorithms/inc/MantidRemoteAlgorithms/QueryAllRemoteJobs2.h +++ b/Framework/RemoteAlgorithms/inc/MantidRemoteAlgorithms/QueryAllRemoteJobs2.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/RemoteAlgorithms/inc/MantidRemoteAlgorithms/QueryRemoteFile.h b/Framework/RemoteAlgorithms/inc/MantidRemoteAlgorithms/QueryRemoteFile.h index 1a271ba4af52b3e35cbd9540f76f7f1ce705bf47..9af5b7f8db534713706a402c27972b8d6100c39f 100644 --- a/Framework/RemoteAlgorithms/inc/MantidRemoteAlgorithms/QueryRemoteFile.h +++ b/Framework/RemoteAlgorithms/inc/MantidRemoteAlgorithms/QueryRemoteFile.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/RemoteAlgorithms/inc/MantidRemoteAlgorithms/QueryRemoteFile2.h b/Framework/RemoteAlgorithms/inc/MantidRemoteAlgorithms/QueryRemoteFile2.h index 5cf3e8d1d229254e23b93c78f1caf2f8f19bf8b5..a6b0538e29a62b5d2f4b8827844da211ed9e439b 100644 --- a/Framework/RemoteAlgorithms/inc/MantidRemoteAlgorithms/QueryRemoteFile2.h +++ b/Framework/RemoteAlgorithms/inc/MantidRemoteAlgorithms/QueryRemoteFile2.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/RemoteAlgorithms/inc/MantidRemoteAlgorithms/QueryRemoteJob.h b/Framework/RemoteAlgorithms/inc/MantidRemoteAlgorithms/QueryRemoteJob.h index 869e6da0961cb9940f817bf364299f8c6475d104..0c9e0bc377bc7d2f477caf7a5098694ad56b597e 100644 --- a/Framework/RemoteAlgorithms/inc/MantidRemoteAlgorithms/QueryRemoteJob.h +++ b/Framework/RemoteAlgorithms/inc/MantidRemoteAlgorithms/QueryRemoteJob.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/RemoteAlgorithms/inc/MantidRemoteAlgorithms/QueryRemoteJob2.h b/Framework/RemoteAlgorithms/inc/MantidRemoteAlgorithms/QueryRemoteJob2.h index 0457d881135ef679a20e8d2ea9dd919140cde783..c2e0f56e2f0b8fe9022f47c29c27db6bc6e2128e 100644 --- a/Framework/RemoteAlgorithms/inc/MantidRemoteAlgorithms/QueryRemoteJob2.h +++ b/Framework/RemoteAlgorithms/inc/MantidRemoteAlgorithms/QueryRemoteJob2.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/RemoteAlgorithms/inc/MantidRemoteAlgorithms/StartRemoteTransaction.h b/Framework/RemoteAlgorithms/inc/MantidRemoteAlgorithms/StartRemoteTransaction.h index 45a71a7eb6b16bf860d7ea66ae600a1f93ce865a..bd68a55d9d19bfa4cdf86361dccaafce6b8bc07e 100644 --- a/Framework/RemoteAlgorithms/inc/MantidRemoteAlgorithms/StartRemoteTransaction.h +++ b/Framework/RemoteAlgorithms/inc/MantidRemoteAlgorithms/StartRemoteTransaction.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/RemoteAlgorithms/inc/MantidRemoteAlgorithms/StartRemoteTransaction2.h b/Framework/RemoteAlgorithms/inc/MantidRemoteAlgorithms/StartRemoteTransaction2.h index efe247341bea5bc153fecd3768f747a03dba22a3..6cf4cb0eda1a309084c147a68f3f218c1853f360 100644 --- a/Framework/RemoteAlgorithms/inc/MantidRemoteAlgorithms/StartRemoteTransaction2.h +++ b/Framework/RemoteAlgorithms/inc/MantidRemoteAlgorithms/StartRemoteTransaction2.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/RemoteAlgorithms/inc/MantidRemoteAlgorithms/StopRemoteTransaction.h b/Framework/RemoteAlgorithms/inc/MantidRemoteAlgorithms/StopRemoteTransaction.h index 43b76c038d1047b02af3b316aedbc6ec82d466e1..1d894af050276e1a6dfada69b6c95cbe365c0267 100644 --- a/Framework/RemoteAlgorithms/inc/MantidRemoteAlgorithms/StopRemoteTransaction.h +++ b/Framework/RemoteAlgorithms/inc/MantidRemoteAlgorithms/StopRemoteTransaction.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/RemoteAlgorithms/inc/MantidRemoteAlgorithms/StopRemoteTransaction2.h b/Framework/RemoteAlgorithms/inc/MantidRemoteAlgorithms/StopRemoteTransaction2.h index 7fb08674e19ca74ee6ca044e81348d75b6e1fd51..a581d7ccaac1cd2646a7fef118b8907ae686b068 100644 --- a/Framework/RemoteAlgorithms/inc/MantidRemoteAlgorithms/StopRemoteTransaction2.h +++ b/Framework/RemoteAlgorithms/inc/MantidRemoteAlgorithms/StopRemoteTransaction2.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/RemoteAlgorithms/inc/MantidRemoteAlgorithms/SubmitRemoteJob.h b/Framework/RemoteAlgorithms/inc/MantidRemoteAlgorithms/SubmitRemoteJob.h index 187f35b1b0d78928d992a66db13e6e540b27c777..c7aa1cb7b34fbeb537e2490e28a64e7d273e3821 100644 --- a/Framework/RemoteAlgorithms/inc/MantidRemoteAlgorithms/SubmitRemoteJob.h +++ b/Framework/RemoteAlgorithms/inc/MantidRemoteAlgorithms/SubmitRemoteJob.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/RemoteAlgorithms/inc/MantidRemoteAlgorithms/SubmitRemoteJob2.h b/Framework/RemoteAlgorithms/inc/MantidRemoteAlgorithms/SubmitRemoteJob2.h index 91f0fe6a4ad26caf8285b9c7a466c832a83da0ce..fb7e440162d7795852cfc0990af62550dd1cb3c7 100644 --- a/Framework/RemoteAlgorithms/inc/MantidRemoteAlgorithms/SubmitRemoteJob2.h +++ b/Framework/RemoteAlgorithms/inc/MantidRemoteAlgorithms/SubmitRemoteJob2.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/RemoteAlgorithms/inc/MantidRemoteAlgorithms/UploadRemoteFile.h b/Framework/RemoteAlgorithms/inc/MantidRemoteAlgorithms/UploadRemoteFile.h index 21486dd6ecbf46f818cfebc1cdff4b624cbeb12e..f3995ad3f048b52cab578da95f8aa543adb266d3 100644 --- a/Framework/RemoteAlgorithms/inc/MantidRemoteAlgorithms/UploadRemoteFile.h +++ b/Framework/RemoteAlgorithms/inc/MantidRemoteAlgorithms/UploadRemoteFile.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/RemoteAlgorithms/inc/MantidRemoteAlgorithms/UploadRemoteFile2.h b/Framework/RemoteAlgorithms/inc/MantidRemoteAlgorithms/UploadRemoteFile2.h index 1629cc0733170e3d5feaf89ac024086f06220439..76975820a7a2593f4776aa6b648270c63934fbdc 100644 --- a/Framework/RemoteAlgorithms/inc/MantidRemoteAlgorithms/UploadRemoteFile2.h +++ b/Framework/RemoteAlgorithms/inc/MantidRemoteAlgorithms/UploadRemoteFile2.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/RemoteAlgorithms/src/AbortRemoteJob.cpp b/Framework/RemoteAlgorithms/src/AbortRemoteJob.cpp index 183e9582642d3c3311d0739f8297b5d7a27f64c4..e69f51d6180c5a76542cf97309c2f6958fa13f40 100644 --- a/Framework/RemoteAlgorithms/src/AbortRemoteJob.cpp +++ b/Framework/RemoteAlgorithms/src/AbortRemoteJob.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidRemoteAlgorithms/AbortRemoteJob.h" #include "MantidKernel/ConfigService.h" diff --git a/Framework/RemoteAlgorithms/src/AbortRemoteJob2.cpp b/Framework/RemoteAlgorithms/src/AbortRemoteJob2.cpp index 8020f662041e200c002e0ad661b7b1f00052ed2f..a17b3c994bff1502d01546c5eecb2dacd2a96efb 100644 --- a/Framework/RemoteAlgorithms/src/AbortRemoteJob2.cpp +++ b/Framework/RemoteAlgorithms/src/AbortRemoteJob2.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidRemoteAlgorithms/AbortRemoteJob2.h" #include "MantidAPI/RemoteJobManagerFactory.h" diff --git a/Framework/RemoteAlgorithms/src/Authenticate.cpp b/Framework/RemoteAlgorithms/src/Authenticate.cpp index 0bd5971e62dcae1b28842fc276dda940dd0d0e09..61f32dc4ca8828f7363fb89538ad2e32ea8ed5ae 100644 --- a/Framework/RemoteAlgorithms/src/Authenticate.cpp +++ b/Framework/RemoteAlgorithms/src/Authenticate.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidRemoteAlgorithms/Authenticate.h" #include "MantidKernel/ConfigService.h" diff --git a/Framework/RemoteAlgorithms/src/Authenticate2.cpp b/Framework/RemoteAlgorithms/src/Authenticate2.cpp index d277d6f595c1455e64ae0deb2d7519959c47de83..6f4cd6589dbafdcf8ee6cae4148062c8cfadbfbe 100644 --- a/Framework/RemoteAlgorithms/src/Authenticate2.cpp +++ b/Framework/RemoteAlgorithms/src/Authenticate2.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidRemoteAlgorithms/Authenticate2.h" #include "MantidAPI/RemoteJobManagerFactory.h" diff --git a/Framework/RemoteAlgorithms/src/DownloadRemoteFile.cpp b/Framework/RemoteAlgorithms/src/DownloadRemoteFile.cpp index 3160c125bd67bc2fa46375c9147c084f3f6bcb97..aa2a6039c86c8243ae28745542fec687bd45a406 100644 --- a/Framework/RemoteAlgorithms/src/DownloadRemoteFile.cpp +++ b/Framework/RemoteAlgorithms/src/DownloadRemoteFile.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidRemoteAlgorithms/DownloadRemoteFile.h" #include "MantidKernel/ConfigService.h" diff --git a/Framework/RemoteAlgorithms/src/DownloadRemoteFile2.cpp b/Framework/RemoteAlgorithms/src/DownloadRemoteFile2.cpp index 27f01002ae6c2d84e68f10290c3cd3436a2a98c7..6a75db6460a31cd0aa21f89f18f82f9e80ae5304 100644 --- a/Framework/RemoteAlgorithms/src/DownloadRemoteFile2.cpp +++ b/Framework/RemoteAlgorithms/src/DownloadRemoteFile2.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidRemoteAlgorithms/DownloadRemoteFile2.h" #include "MantidAPI/RemoteJobManagerFactory.h" diff --git a/Framework/RemoteAlgorithms/src/Logout2.cpp b/Framework/RemoteAlgorithms/src/Logout2.cpp index 6611364b8c0fca6de1ef7f674ff084352a8ef2ae..3780d0ae5aecc807d62bafca4d8ea52f0f71c355 100644 --- a/Framework/RemoteAlgorithms/src/Logout2.cpp +++ b/Framework/RemoteAlgorithms/src/Logout2.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidRemoteAlgorithms/Logout2.h" #include "MantidAPI/RemoteJobManagerFactory.h" diff --git a/Framework/RemoteAlgorithms/src/QueryAllRemoteJobs.cpp b/Framework/RemoteAlgorithms/src/QueryAllRemoteJobs.cpp index df9018b82e7975fb528d2782e133d6c47386ce05..8a9c39bab8c72f75460e087dd76cdf78a4cda24f 100644 --- a/Framework/RemoteAlgorithms/src/QueryAllRemoteJobs.cpp +++ b/Framework/RemoteAlgorithms/src/QueryAllRemoteJobs.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidRemoteAlgorithms/QueryAllRemoteJobs.h" #include "MantidKernel/ArrayProperty.h" diff --git a/Framework/RemoteAlgorithms/src/QueryAllRemoteJobs2.cpp b/Framework/RemoteAlgorithms/src/QueryAllRemoteJobs2.cpp index 1bf87152444038441dad218d259d56c1d5be2111..9c3385c7b9bcf578ce5f597e8ad5802f65a37e7c 100644 --- a/Framework/RemoteAlgorithms/src/QueryAllRemoteJobs2.cpp +++ b/Framework/RemoteAlgorithms/src/QueryAllRemoteJobs2.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidRemoteAlgorithms/QueryAllRemoteJobs2.h" #include "MantidAPI/RemoteJobManagerFactory.h" diff --git a/Framework/RemoteAlgorithms/src/QueryRemoteFile.cpp b/Framework/RemoteAlgorithms/src/QueryRemoteFile.cpp index 6108fa4d0c93600ad387c2786c0aaff162d040ab..e9515d4345b845275237c35aa82d9c70aec273d0 100644 --- a/Framework/RemoteAlgorithms/src/QueryRemoteFile.cpp +++ b/Framework/RemoteAlgorithms/src/QueryRemoteFile.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidRemoteAlgorithms/QueryRemoteFile.h" #include "MantidKernel/ArrayProperty.h" diff --git a/Framework/RemoteAlgorithms/src/QueryRemoteFile2.cpp b/Framework/RemoteAlgorithms/src/QueryRemoteFile2.cpp index 39ae3c51ef12f81638233dc25665abeafcd77361..e4441651e27cc900eb1f63711afce4868f6124de 100644 --- a/Framework/RemoteAlgorithms/src/QueryRemoteFile2.cpp +++ b/Framework/RemoteAlgorithms/src/QueryRemoteFile2.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidRemoteAlgorithms/QueryRemoteFile2.h" #include "MantidAPI/RemoteJobManagerFactory.h" diff --git a/Framework/RemoteAlgorithms/src/QueryRemoteJob.cpp b/Framework/RemoteAlgorithms/src/QueryRemoteJob.cpp index 6c8b5da2b9c836ceb85862fc9835261dbb773080..e80a2d02101c7939988359bee0382d3611b646ca 100644 --- a/Framework/RemoteAlgorithms/src/QueryRemoteJob.cpp +++ b/Framework/RemoteAlgorithms/src/QueryRemoteJob.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidRemoteAlgorithms/QueryRemoteJob.h" #include "MantidKernel/ConfigService.h" diff --git a/Framework/RemoteAlgorithms/src/QueryRemoteJob2.cpp b/Framework/RemoteAlgorithms/src/QueryRemoteJob2.cpp index 1e01d1a5db208a41eeebf7ed0eedf62acb972d7c..17bc2e297dd65ef9b53175cb8e143cd7c4442be6 100644 --- a/Framework/RemoteAlgorithms/src/QueryRemoteJob2.cpp +++ b/Framework/RemoteAlgorithms/src/QueryRemoteJob2.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidRemoteAlgorithms/QueryRemoteJob2.h" #include "MantidAPI/RemoteJobManagerFactory.h" diff --git a/Framework/RemoteAlgorithms/src/StartRemoteTransaction.cpp b/Framework/RemoteAlgorithms/src/StartRemoteTransaction.cpp index 3b802075f34ac89ee08fb18140975d1e06503b22..078f3c2d90021ec35f36ea386bfbdb948ab1ab1e 100644 --- a/Framework/RemoteAlgorithms/src/StartRemoteTransaction.cpp +++ b/Framework/RemoteAlgorithms/src/StartRemoteTransaction.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidRemoteAlgorithms/StartRemoteTransaction.h" #include "MantidKernel/ConfigService.h" diff --git a/Framework/RemoteAlgorithms/src/StartRemoteTransaction2.cpp b/Framework/RemoteAlgorithms/src/StartRemoteTransaction2.cpp index 920aa1c6d6bb58f9f72386f4c13b7bcda79480dc..15fbaaeb42eea1ddff34e69582165d1ac25aed6c 100644 --- a/Framework/RemoteAlgorithms/src/StartRemoteTransaction2.cpp +++ b/Framework/RemoteAlgorithms/src/StartRemoteTransaction2.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidRemoteAlgorithms/StartRemoteTransaction2.h" #include "MantidAPI/RemoteJobManagerFactory.h" diff --git a/Framework/RemoteAlgorithms/src/StopRemoteTransaction.cpp b/Framework/RemoteAlgorithms/src/StopRemoteTransaction.cpp index e19e0185b4d57b19197eb266cf0b05b9c3fc7f09..38e6f51b37bbf6c4bbc4b28ca0519aeaa585d6d7 100644 --- a/Framework/RemoteAlgorithms/src/StopRemoteTransaction.cpp +++ b/Framework/RemoteAlgorithms/src/StopRemoteTransaction.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidRemoteAlgorithms/StopRemoteTransaction.h" #include "MantidKernel/ConfigService.h" diff --git a/Framework/RemoteAlgorithms/src/StopRemoteTransaction2.cpp b/Framework/RemoteAlgorithms/src/StopRemoteTransaction2.cpp index 12c4fcfe4fed53cc74efe077496d6847c849b1b0..7ec14eaba30523a7f8c80600b8144479f20b9b58 100644 --- a/Framework/RemoteAlgorithms/src/StopRemoteTransaction2.cpp +++ b/Framework/RemoteAlgorithms/src/StopRemoteTransaction2.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidRemoteAlgorithms/StopRemoteTransaction2.h" #include "MantidAPI/RemoteJobManagerFactory.h" diff --git a/Framework/RemoteAlgorithms/src/SubmitRemoteJob.cpp b/Framework/RemoteAlgorithms/src/SubmitRemoteJob.cpp index 29fe8b3b7a3cee89898b8b7d4bf94dde24bca27e..e66d1ca382db25ffcdd3eaa450ec9718d6695047 100644 --- a/Framework/RemoteAlgorithms/src/SubmitRemoteJob.cpp +++ b/Framework/RemoteAlgorithms/src/SubmitRemoteJob.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidRemoteAlgorithms/SubmitRemoteJob.h" #include "MantidKernel/BoundedValidator.h" diff --git a/Framework/RemoteAlgorithms/src/SubmitRemoteJob2.cpp b/Framework/RemoteAlgorithms/src/SubmitRemoteJob2.cpp index 1973e237b4013d60188ea3df2694098b9e6db7d5..e74ca2804a026e9196b9f8fc27c8e1703526611c 100644 --- a/Framework/RemoteAlgorithms/src/SubmitRemoteJob2.cpp +++ b/Framework/RemoteAlgorithms/src/SubmitRemoteJob2.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidRemoteAlgorithms/SubmitRemoteJob2.h" #include "MantidAPI/RemoteJobManagerFactory.h" diff --git a/Framework/RemoteAlgorithms/src/UploadRemoteFile.cpp b/Framework/RemoteAlgorithms/src/UploadRemoteFile.cpp index f8bba8a39abb5baa7a98da245a1ee9ad9419525c..d5564d369f5c13d08dc7679eca30489a721a063d 100644 --- a/Framework/RemoteAlgorithms/src/UploadRemoteFile.cpp +++ b/Framework/RemoteAlgorithms/src/UploadRemoteFile.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidRemoteAlgorithms/UploadRemoteFile.h" #include "MantidKernel/ConfigService.h" diff --git a/Framework/RemoteAlgorithms/src/UploadRemoteFile2.cpp b/Framework/RemoteAlgorithms/src/UploadRemoteFile2.cpp index f7587a2aeab3a7c332751dfae007ce8a678a16ad..0b0d899222023fac33119989dbf7c92338ab4e84 100644 --- a/Framework/RemoteAlgorithms/src/UploadRemoteFile2.cpp +++ b/Framework/RemoteAlgorithms/src/UploadRemoteFile2.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidRemoteAlgorithms/UploadRemoteFile2.h" #include "MantidAPI/RemoteJobManagerFactory.h" diff --git a/Framework/RemoteAlgorithms/test/AbortRemoteJob2Test.h b/Framework/RemoteAlgorithms/test/AbortRemoteJob2Test.h index 157249928b069fdc21ad0fa752f1d6eac1efff60..c8058bf54c1950667dee61b7d3e84f8dbf43472d 100644 --- a/Framework/RemoteAlgorithms/test/AbortRemoteJob2Test.h +++ b/Framework/RemoteAlgorithms/test/AbortRemoteJob2Test.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/RemoteAlgorithms/test/AbortRemoteJobTest.h b/Framework/RemoteAlgorithms/test/AbortRemoteJobTest.h index 2fdd54251eed297cbe0b48fc7866b9f585edfffd..755ddc17e49f138866b9d90590bfc4689acf87ed 100644 --- a/Framework/RemoteAlgorithms/test/AbortRemoteJobTest.h +++ b/Framework/RemoteAlgorithms/test/AbortRemoteJobTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/RemoteAlgorithms/test/Authenticate2Test.h b/Framework/RemoteAlgorithms/test/Authenticate2Test.h index 37463f2e03d5c55b790db852fe02a47863c8c492..3058c4744f4b66e15e7907d85a1f486bc694d871 100644 --- a/Framework/RemoteAlgorithms/test/Authenticate2Test.h +++ b/Framework/RemoteAlgorithms/test/Authenticate2Test.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/RemoteAlgorithms/test/AuthenticateTest.h b/Framework/RemoteAlgorithms/test/AuthenticateTest.h index 243f40bcf09ba076f8fa99693454e9d64f3c1d06..853defec9282f3772c9cf562f0b7df47fa661aed 100644 --- a/Framework/RemoteAlgorithms/test/AuthenticateTest.h +++ b/Framework/RemoteAlgorithms/test/AuthenticateTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/RemoteAlgorithms/test/CMakeLists.txt b/Framework/RemoteAlgorithms/test/CMakeLists.txt index bf48528c0e4f432bb18823439e804e8f39045286..22512720dbdb50499b92ad946eb435298c91cb9b 100644 --- a/Framework/RemoteAlgorithms/test/CMakeLists.txt +++ b/Framework/RemoteAlgorithms/test/CMakeLists.txt @@ -1,8 +1,7 @@ if(CXXTEST_FOUND) include_directories(SYSTEM ${CXXTEST_INCLUDE_DIR} - ${GMOCK_INCLUDE_DIR} - ${GTEST_INCLUDE_DIR}) +) cxxtest_add_test(RemoteAlgorithmsTest ${TEST_FILES}) target_link_libraries(RemoteAlgorithmsTest @@ -14,8 +13,8 @@ if(CXXTEST_FOUND) RemoteAlgorithms ${Boost_LIBRARIES} ${POCO_LIBRARIES} - ${GMOCK_LIBRARIES} - ${GTEST_LIBRARIES}) + gmock +) add_dependencies(FrameworkTests RemoteAlgorithmsTest) # Test data. Not using any for now. Remember to uncomment if data is added for # these remote alg. tests add_dependencies ( RemoteAlgorithmsTest diff --git a/Framework/RemoteAlgorithms/test/DownloadRemoteFile2Test.h b/Framework/RemoteAlgorithms/test/DownloadRemoteFile2Test.h index f64111d7b9b50bbf5e3569b05b652c88c0494b0d..5e4d27066cb92c7fc068073d69652e32e768499b 100644 --- a/Framework/RemoteAlgorithms/test/DownloadRemoteFile2Test.h +++ b/Framework/RemoteAlgorithms/test/DownloadRemoteFile2Test.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/RemoteAlgorithms/test/DownloadRemoteFileTest.h b/Framework/RemoteAlgorithms/test/DownloadRemoteFileTest.h index 6b243da2fb29cb49ffac2ea92361525c8d32d640..030e732288ca335111718e9b74909450332ef54e 100644 --- a/Framework/RemoteAlgorithms/test/DownloadRemoteFileTest.h +++ b/Framework/RemoteAlgorithms/test/DownloadRemoteFileTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/RemoteAlgorithms/test/Logout2Test.h b/Framework/RemoteAlgorithms/test/Logout2Test.h index 10a34812d2d7ea8d55008c01065ec451cafd8e7d..1c1ac059802430bd422a9d1dd0ac9b199b6a516c 100644 --- a/Framework/RemoteAlgorithms/test/Logout2Test.h +++ b/Framework/RemoteAlgorithms/test/Logout2Test.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/RemoteAlgorithms/test/QueryAllRemoteJobs2Test.h b/Framework/RemoteAlgorithms/test/QueryAllRemoteJobs2Test.h index 627724b86f25d6e01b5c2e516f164c92b9312124..36bf3668e531cb24e182432964ae8ad06e7b3606 100644 --- a/Framework/RemoteAlgorithms/test/QueryAllRemoteJobs2Test.h +++ b/Framework/RemoteAlgorithms/test/QueryAllRemoteJobs2Test.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/RemoteAlgorithms/test/QueryAllRemoteJobsTest.h b/Framework/RemoteAlgorithms/test/QueryAllRemoteJobsTest.h index 694f59798585df707418653969d501acfaf9c01d..ca23d7c155b12d3dbefface8185fee70cd046ad0 100644 --- a/Framework/RemoteAlgorithms/test/QueryAllRemoteJobsTest.h +++ b/Framework/RemoteAlgorithms/test/QueryAllRemoteJobsTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/RemoteAlgorithms/test/QueryRemoteFile2Test.h b/Framework/RemoteAlgorithms/test/QueryRemoteFile2Test.h index f9d2cff6f5bbab124357ec5edb483438c015518c..4cdd1e25f369d196ffc8d018b825ba1468e59cbc 100644 --- a/Framework/RemoteAlgorithms/test/QueryRemoteFile2Test.h +++ b/Framework/RemoteAlgorithms/test/QueryRemoteFile2Test.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/RemoteAlgorithms/test/QueryRemoteFileTest.h b/Framework/RemoteAlgorithms/test/QueryRemoteFileTest.h index 8f096ebbb68519631cb7d8a3aa9819bcf61cc5b7..7d47d08759a1746f48b3a754d70d44a07783f126 100644 --- a/Framework/RemoteAlgorithms/test/QueryRemoteFileTest.h +++ b/Framework/RemoteAlgorithms/test/QueryRemoteFileTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/RemoteAlgorithms/test/QueryRemoteJob2Test.h b/Framework/RemoteAlgorithms/test/QueryRemoteJob2Test.h index 646eceaaa2a13b1bae7cde617c2385d8658b4287..78e800c7b1e4be35b9f4e77b14e593b54232aae6 100644 --- a/Framework/RemoteAlgorithms/test/QueryRemoteJob2Test.h +++ b/Framework/RemoteAlgorithms/test/QueryRemoteJob2Test.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/RemoteAlgorithms/test/QueryRemoteJobTest.h b/Framework/RemoteAlgorithms/test/QueryRemoteJobTest.h index a0a30cfa3980a2b1ba913b5187af265e6ae4fba6..8a666573317262a7837f221931b66213ca36154a 100644 --- a/Framework/RemoteAlgorithms/test/QueryRemoteJobTest.h +++ b/Framework/RemoteAlgorithms/test/QueryRemoteJobTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/RemoteAlgorithms/test/StartRemoteTransaction2Test.h b/Framework/RemoteAlgorithms/test/StartRemoteTransaction2Test.h index 5a56776fb60d24485ca01ae3a1d32f22e87c03e9..c53f3ba32d5d67c805eb8ef4c847f1ca67b6dc00 100644 --- a/Framework/RemoteAlgorithms/test/StartRemoteTransaction2Test.h +++ b/Framework/RemoteAlgorithms/test/StartRemoteTransaction2Test.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/RemoteAlgorithms/test/StartRemoteTransactionTest.h b/Framework/RemoteAlgorithms/test/StartRemoteTransactionTest.h index 1abd1476a2d4ed7c7412aea279d9c51f95aa5887..9f1316259980a0ceddc56362607ebe4144a74125 100644 --- a/Framework/RemoteAlgorithms/test/StartRemoteTransactionTest.h +++ b/Framework/RemoteAlgorithms/test/StartRemoteTransactionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/RemoteAlgorithms/test/StopRemoteTransaction2Test.h b/Framework/RemoteAlgorithms/test/StopRemoteTransaction2Test.h index 920f052ee32aaa9c31767fd695bb8cbb28eaf0c4..7ed8740691018c01a92ca0420d2c84d7df809cbf 100644 --- a/Framework/RemoteAlgorithms/test/StopRemoteTransaction2Test.h +++ b/Framework/RemoteAlgorithms/test/StopRemoteTransaction2Test.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/RemoteAlgorithms/test/StopRemoteTransactionTest.h b/Framework/RemoteAlgorithms/test/StopRemoteTransactionTest.h index e1eabce6db67acc84a8184ae535e284f3f566601..f0820d11731a498e3719f4e85521087a69717c1d 100644 --- a/Framework/RemoteAlgorithms/test/StopRemoteTransactionTest.h +++ b/Framework/RemoteAlgorithms/test/StopRemoteTransactionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/RemoteAlgorithms/test/SubmitRemoteJob2Test.h b/Framework/RemoteAlgorithms/test/SubmitRemoteJob2Test.h index ba1776395c3695c03bb3aa0a1c8db9b4abb38e57..4ad40ff37dbedea9bea235316fdab45ef3443268 100644 --- a/Framework/RemoteAlgorithms/test/SubmitRemoteJob2Test.h +++ b/Framework/RemoteAlgorithms/test/SubmitRemoteJob2Test.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/RemoteAlgorithms/test/SubmitRemoteJobTest.h b/Framework/RemoteAlgorithms/test/SubmitRemoteJobTest.h index 82904b20a5f6c73c34579f01d1a253f212d5f8a4..7fd35d517ccd78cf00a1fc27c972836bf41cb7fd 100644 --- a/Framework/RemoteAlgorithms/test/SubmitRemoteJobTest.h +++ b/Framework/RemoteAlgorithms/test/SubmitRemoteJobTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/RemoteAlgorithms/test/UploadRemoteFile2Test.h b/Framework/RemoteAlgorithms/test/UploadRemoteFile2Test.h index 7761fec0f16aa524df922b9156696f556a013eaf..40a2e39792e93501dcb410c30e2d2cb8896bc21d 100644 --- a/Framework/RemoteAlgorithms/test/UploadRemoteFile2Test.h +++ b/Framework/RemoteAlgorithms/test/UploadRemoteFile2Test.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/RemoteAlgorithms/test/UploadRemoteFileTest.h b/Framework/RemoteAlgorithms/test/UploadRemoteFileTest.h index 70926d83dd5aafadaddf7774ab739548d4014098..b8054cb9a797e1a59110554c7b1a7bab9a445a1f 100644 --- a/Framework/RemoteAlgorithms/test/UploadRemoteFileTest.h +++ b/Framework/RemoteAlgorithms/test/UploadRemoteFileTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/RemoteJobManagers/inc/MantidRemoteJobManagers/MantidWebServiceAPIHelper.h b/Framework/RemoteJobManagers/inc/MantidRemoteJobManagers/MantidWebServiceAPIHelper.h index a5b08bc466909184216d06eefc9c62a48f0c1a62..118dd2fc36bdc8c21ed36d3b94333a20a8abe63f 100644 --- a/Framework/RemoteJobManagers/inc/MantidRemoteJobManagers/MantidWebServiceAPIHelper.h +++ b/Framework/RemoteJobManagers/inc/MantidRemoteJobManagers/MantidWebServiceAPIHelper.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -82,13 +82,13 @@ public: private: // Wraps up some of the boilerplate code needed to execute HTTP GET and POST // requests - void initGetRequest(Poco::Net::HTTPRequest &req, std::string extraPath, - std::string queryString) const; + void initGetRequest(Poco::Net::HTTPRequest &req, const std::string &extraPath, + const std::string &queryString) const; void initPostRequest(Poco::Net::HTTPRequest &req, - std::string extraPath) const; + const std::string &extraPath) const; void initHTTPRequest(Poco::Net::HTTPRequest &req, const std::string &method, - std::string extraPath, - std::string queryString = "") const; + const std::string &extraPath, + const std::string &queryString = "") const; std::string m_displayName; std::string diff --git a/Framework/RemoteJobManagers/inc/MantidRemoteJobManagers/MantidWebServiceAPIJobManager.h b/Framework/RemoteJobManagers/inc/MantidRemoteJobManagers/MantidWebServiceAPIJobManager.h index 2c2935a61792bddf7c01cd6ec9c2e674bd612c5b..74264ff6b6a6e1525bed026314e25ea82ed576a5 100644 --- a/Framework/RemoteJobManagers/inc/MantidRemoteJobManagers/MantidWebServiceAPIJobManager.h +++ b/Framework/RemoteJobManagers/inc/MantidRemoteJobManagers/MantidWebServiceAPIJobManager.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/RemoteJobManagers/src/MantidWebServiceAPIHelper.cpp b/Framework/RemoteJobManagers/src/MantidWebServiceAPIHelper.cpp index bce4eddc99267699855fa375b6ddb81e1d7b20cc..1c45bfde63d45f7c1423886a236ed51585e05919 100644 --- a/Framework/RemoteJobManagers/src/MantidWebServiceAPIHelper.cpp +++ b/Framework/RemoteJobManagers/src/MantidWebServiceAPIHelper.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidRemoteJobManagers/MantidWebServiceAPIHelper.h" #include "MantidKernel/ConfigService.h" @@ -19,6 +19,7 @@ #include <ostream> #include <sstream> +#include <utility> namespace Mantid { namespace RemoteJobManagers { @@ -169,22 +170,22 @@ void MantidWebServiceAPIHelper::clearSessionCookies() { g_cookies.clear(); } // Wrappers for a lot of the boilerplate code needed to perform an HTTPS GET or // POST -void MantidWebServiceAPIHelper::initGetRequest(Poco::Net::HTTPRequest &req, - std::string extraPath, - std::string queryString) const { - return initHTTPRequest(req, Poco::Net::HTTPRequest::HTTP_GET, extraPath, - queryString); +void MantidWebServiceAPIHelper::initGetRequest( + Poco::Net::HTTPRequest &req, const std::string &extraPath, + const std::string &queryString) const { + return initHTTPRequest(req, Poco::Net::HTTPRequest::HTTP_GET, + std::move(extraPath), std::move(queryString)); } -void MantidWebServiceAPIHelper::initPostRequest(Poco::Net::HTTPRequest &req, - std::string extraPath) const { - return initHTTPRequest(req, Poco::Net::HTTPRequest::HTTP_POST, extraPath); +void MantidWebServiceAPIHelper::initPostRequest( + Poco::Net::HTTPRequest &req, const std::string &extraPath) const { + return initHTTPRequest(req, Poco::Net::HTTPRequest::HTTP_POST, + std::move(extraPath)); } -void MantidWebServiceAPIHelper::initHTTPRequest(Poco::Net::HTTPRequest &req, - const std::string &method, - std::string extraPath, - std::string queryString) const { +void MantidWebServiceAPIHelper::initHTTPRequest( + Poco::Net::HTTPRequest &req, const std::string &method, + const std::string &extraPath, const std::string &queryString) const { // Set up the session object m_session.reset(); diff --git a/Framework/RemoteJobManagers/src/MantidWebServiceAPIJobManager.cpp b/Framework/RemoteJobManagers/src/MantidWebServiceAPIJobManager.cpp index de7a375a3aea56815118c5fe3b129fe86a0015b2..cf4aae0db910a8bb0ee6c00fd7ed5f57df39343e 100644 --- a/Framework/RemoteJobManagers/src/MantidWebServiceAPIJobManager.cpp +++ b/Framework/RemoteJobManagers/src/MantidWebServiceAPIJobManager.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidRemoteJobManagers/MantidWebServiceAPIJobManager.h" #include "MantidAPI/RemoteJobManagerFactory.h" diff --git a/Framework/RemoteJobManagers/test/CMakeLists.txt b/Framework/RemoteJobManagers/test/CMakeLists.txt index 390c3ad4f95c7536187e8bf3c2a6578c17936da4..af256fded4dafa333d00b8a384156f35359327c0 100644 --- a/Framework/RemoteJobManagers/test/CMakeLists.txt +++ b/Framework/RemoteJobManagers/test/CMakeLists.txt @@ -1,8 +1,7 @@ if(CXXTEST_FOUND) include_directories(SYSTEM ${CXXTEST_INCLUDE_DIR} - ${GMOCK_INCLUDE_DIR} - ${GTEST_INCLUDE_DIR}) +) cxxtest_add_test(RemoteJobManagersTest ${TEST_FILES}) target_link_libraries(RemoteJobManagersTest @@ -14,8 +13,8 @@ if(CXXTEST_FOUND) RemoteJobManagers ${Boost_LIBRARIES} ${POCO_LIBRARIES} - ${GMOCK_LIBRARIES} - ${GTEST_LIBRARIES}) + gmock +) add_dependencies(FrameworkTests RemoteJobManagersTest) # Test data. Not using any for now. Remember to uncomment if data is added for # these remote job managers add_dependencies ( RemoteJobManagersTest diff --git a/Framework/RemoteJobManagers/test/MantidWebServiceAPIHelperTest.h b/Framework/RemoteJobManagers/test/MantidWebServiceAPIHelperTest.h index 3abe67bb4552e83aa5d1bf76cd7c26208010528f..263953a5b415165fb7ec1eb333b4a62a056b667b 100644 --- a/Framework/RemoteJobManagers/test/MantidWebServiceAPIHelperTest.h +++ b/Framework/RemoteJobManagers/test/MantidWebServiceAPIHelperTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/RemoteJobManagers/test/MantidWebServiceAPIJobManagerTest.h b/Framework/RemoteJobManagers/test/MantidWebServiceAPIJobManagerTest.h index fdeba1335d5bbe21fa8e6004934feb498435cef1..9e0e56c7468e613e2acd108a2985aa5b73dd9754 100644 --- a/Framework/RemoteJobManagers/test/MantidWebServiceAPIJobManagerTest.h +++ b/Framework/RemoteJobManagers/test/MantidWebServiceAPIJobManagerTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/SINQ/inc/MantidSINQ/DllConfig.h b/Framework/SINQ/inc/MantidSINQ/DllConfig.h index 3001644fb91883ad9f6016912720f56788b5b2fc..afd1a6dccace469dc8359d1495afd29428f7ebf8 100644 --- a/Framework/SINQ/inc/MantidSINQ/DllConfig.h +++ b/Framework/SINQ/inc/MantidSINQ/DllConfig.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/SINQ/inc/MantidSINQ/InvertMDDim.h b/Framework/SINQ/inc/MantidSINQ/InvertMDDim.h index 9f4df309f38e826984dbb1c5c2d0e3e4f32ce709..dfc7952fa123e2d3442d251f84bc63f836805a7e 100644 --- a/Framework/SINQ/inc/MantidSINQ/InvertMDDim.h +++ b/Framework/SINQ/inc/MantidSINQ/InvertMDDim.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /** * This Algorithms inverts the dimensions of a MD data set. The @@ -44,13 +44,14 @@ private: /// Execution code void exec() override; - void copyMetaData(Mantid::API::IMDHistoWorkspace_sptr inws, - Mantid::API::IMDHistoWorkspace_sptr outws); - void recurseDim(Mantid::API::IMDHistoWorkspace_sptr inWS, - Mantid::API::IMDHistoWorkspace_sptr outWS, int currentDim, - int *idx, int rank); + void copyMetaData(const Mantid::API::IMDHistoWorkspace_sptr &inws, + const Mantid::API::IMDHistoWorkspace_sptr &outws); + void recurseDim(const Mantid::API::IMDHistoWorkspace_sptr &inWS, + const Mantid::API::IMDHistoWorkspace_sptr &outWS, + int currentDim, int *idx, int rank); - unsigned int calcIndex(Mantid::API::IMDHistoWorkspace_sptr ws, int *dim); - unsigned int calcInvertedIndex(Mantid::API::IMDHistoWorkspace_sptr ws, + unsigned int calcIndex(const Mantid::API::IMDHistoWorkspace_sptr &ws, + int *dim); + unsigned int calcInvertedIndex(const Mantid::API::IMDHistoWorkspace_sptr &ws, int *dim); }; diff --git a/Framework/SINQ/inc/MantidSINQ/LoadFlexiNexus.h b/Framework/SINQ/inc/MantidSINQ/LoadFlexiNexus.h index 232577793c2b5fdb90e6294043a09027844fe95c..297e47d74371c1b88506abb45774c52b78986a4e 100644 --- a/Framework/SINQ/inc/MantidSINQ/LoadFlexiNexus.h +++ b/Framework/SINQ/inc/MantidSINQ/LoadFlexiNexus.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /** * This is a flexible NeXus file loader. It takes as input a filename @@ -64,7 +64,7 @@ private: // A dictionary std::map<std::string, std::string> dictionary; - void loadDictionary(std::string dictionaryFile); + void loadDictionary(const std::string &dictionaryFile); void load2DWorkspace(NeXus::File *fin); @@ -80,10 +80,10 @@ private: std::unordered_set<std::string> populateSpecialMap(); - void addMetaData(NeXus::File *fin, Mantid::API::Workspace_sptr ws, - Mantid::API::ExperimentInfo_sptr info); + void addMetaData(NeXus::File *fin, const Mantid::API::Workspace_sptr &ws, + const Mantid::API::ExperimentInfo_sptr &info); - int safeOpenpath(NeXus::File *fin, std::string path); + int safeOpenpath(NeXus::File *fin, const std::string &path); int calculateCAddress(int *pos, int *dim, int rank); int calculateF77Address(int *pos, int rank); }; diff --git a/Framework/SINQ/inc/MantidSINQ/MDHistoToWorkspace2D.h b/Framework/SINQ/inc/MantidSINQ/MDHistoToWorkspace2D.h index c9baa68b3729c2c17ed2529e3068ab1b00e39c63..b2890b897d05589c0d2df1e427172966b49581ed 100644 --- a/Framework/SINQ/inc/MantidSINQ/MDHistoToWorkspace2D.h +++ b/Framework/SINQ/inc/MantidSINQ/MDHistoToWorkspace2D.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /** * This algorithm flattens a MDHistoWorkspace to a Workspace2D. Mantid has far @@ -51,13 +51,13 @@ private: size_t m_rank; size_t m_currentSpectra; - size_t calculateNSpectra(Mantid::API::IMDHistoWorkspace_sptr inws); - void recurseData(Mantid::API::IMDHistoWorkspace_sptr inWS, - Mantid::DataObjects::Workspace2D_sptr outWS, + size_t calculateNSpectra(const Mantid::API::IMDHistoWorkspace_sptr &inws); + void recurseData(const Mantid::API::IMDHistoWorkspace_sptr &inWS, + const Mantid::DataObjects::Workspace2D_sptr &outWS, size_t currentDim, Mantid::coord_t *pos); - void checkW2D(Mantid::DataObjects::Workspace2D_sptr outWS); + void checkW2D(const Mantid::DataObjects::Workspace2D_sptr &outWS); - void copyMetaData(Mantid::API::IMDHistoWorkspace_sptr inWS, - Mantid::DataObjects::Workspace2D_sptr outWS); + void copyMetaData(const Mantid::API::IMDHistoWorkspace_sptr &inWS, + const Mantid::DataObjects::Workspace2D_sptr &outWS); }; diff --git a/Framework/SINQ/inc/MantidSINQ/PoldiAnalyseResiduals.h b/Framework/SINQ/inc/MantidSINQ/PoldiAnalyseResiduals.h index 78c0ca3f3eba04115ea7588a6d3bce2c58bf15c9..89ddf9e71bc48c8a5afd0863c56e5a96d06d8fa2 100644 --- a/Framework/SINQ/inc/MantidSINQ/PoldiAnalyseResiduals.h +++ b/Framework/SINQ/inc/MantidSINQ/PoldiAnalyseResiduals.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/SINQ/inc/MantidSINQ/PoldiAutoCorrelation5.h b/Framework/SINQ/inc/MantidSINQ/PoldiAutoCorrelation5.h index 8bf85640dc06ed1df6a2e303eceb5f32a37f652c..e4ac09f9774751cd4d5808021694b06d8fd72a14 100644 --- a/Framework/SINQ/inc/MantidSINQ/PoldiAutoCorrelation5.h +++ b/Framework/SINQ/inc/MantidSINQ/PoldiAutoCorrelation5.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -59,8 +59,8 @@ protected: void exec() override; void logConfigurationInformation( - boost::shared_ptr<PoldiDeadWireDecorator> cleanDetector, - PoldiAbstractChopper_sptr chopper); + const boost::shared_ptr<PoldiDeadWireDecorator> &cleanDetector, + const PoldiAbstractChopper_sptr &chopper); private: /// Overwrites Algorithm method. diff --git a/Framework/SINQ/inc/MantidSINQ/PoldiCreatePeaksFromCell.h b/Framework/SINQ/inc/MantidSINQ/PoldiCreatePeaksFromCell.h index 0dc727095f4ae36cc61d12c002eefd2b915b24ee..154db5abb4bae94adc11d347487827deff8d6398 100644 --- a/Framework/SINQ/inc/MantidSINQ/PoldiCreatePeaksFromCell.h +++ b/Framework/SINQ/inc/MantidSINQ/PoldiCreatePeaksFromCell.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/SINQ/inc/MantidSINQ/PoldiFitPeaks1D.h b/Framework/SINQ/inc/MantidSINQ/PoldiFitPeaks1D.h index 4e7cfc7b27b83ba6ce58af87d125f734362ff189..444ff42d500887bad3084f21c478eb521c21e5df 100644 --- a/Framework/SINQ/inc/MantidSINQ/PoldiFitPeaks1D.h +++ b/Framework/SINQ/inc/MantidSINQ/PoldiFitPeaks1D.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -43,9 +43,10 @@ protected: API::IFunction_sptr getPeakProfile(const PoldiPeak_sptr &poldiPeak) const; void - setValuesFromProfileFunction(PoldiPeak_sptr poldiPeak, + setValuesFromProfileFunction(const PoldiPeak_sptr &poldiPeak, const API::IFunction_sptr &fittedFunction) const; - double getFwhmWidthRelation(API::IPeakFunction_sptr peakFunction) const; + double + getFwhmWidthRelation(const API::IPeakFunction_sptr &peakFunction) const; API::IAlgorithm_sptr getFitAlgorithm(const DataObjects::Workspace2D_sptr &dataWorkspace, diff --git a/Framework/SINQ/inc/MantidSINQ/PoldiFitPeaks1D2.h b/Framework/SINQ/inc/MantidSINQ/PoldiFitPeaks1D2.h index 87b01b9c5dc56cfacbc02c0e8e904d220ae6f19f..65138c4e17f01c7f84aca9fb7cf94428e7e57c81 100644 --- a/Framework/SINQ/inc/MantidSINQ/PoldiFitPeaks1D2.h +++ b/Framework/SINQ/inc/MantidSINQ/PoldiFitPeaks1D2.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -106,10 +106,11 @@ protected: API::IFunction_sptr getPeakProfile(const PoldiPeak_sptr &poldiPeak) const; void - setValuesFromProfileFunction(PoldiPeak_sptr poldiPeak, + setValuesFromProfileFunction(const PoldiPeak_sptr &poldiPeak, const API::IFunction_sptr &fittedFunction) const; - double getFwhmWidthRelation(API::IPeakFunction_sptr peakFunction) const; + double + getFwhmWidthRelation(const API::IPeakFunction_sptr &peakFunction) const; API::IAlgorithm_sptr getFitAlgorithm(const DataObjects::Workspace2D_sptr &dataWorkspace, diff --git a/Framework/SINQ/inc/MantidSINQ/PoldiFitPeaks2D.h b/Framework/SINQ/inc/MantidSINQ/PoldiFitPeaks2D.h index a54e4727e8452e18a5e3fc43e26584028c63aabe..62d7459d1f00dedabb4bb2b05521b8af5bdb981e 100644 --- a/Framework/SINQ/inc/MantidSINQ/PoldiFitPeaks2D.h +++ b/Framework/SINQ/inc/MantidSINQ/PoldiFitPeaks2D.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -75,7 +75,7 @@ protected: // Conversion between peaks and functions PoldiPeak_sptr - getPeakFromPeakFunction(API::IPeakFunction_sptr profileFunction, + getPeakFromPeakFunction(const API::IPeakFunction_sptr &profileFunction, const Kernel::V3D &hkl); // Conversion between peak collections and functions @@ -83,11 +83,11 @@ protected: getFunctionFromPeakCollection(const PoldiPeakCollection_sptr &peakCollection); Poldi2DFunction_sptr getFunctionIndividualPeaks( - std::string profileFunctionName, + const std::string &profileFunctionName, const PoldiPeakCollection_sptr &peakCollection) const; Poldi2DFunction_sptr - getFunctionPawley(std::string profileFunctionName, + getFunctionPawley(const std::string &profileFunctionName, const PoldiPeakCollection_sptr &peakCollection); std::string getLatticeSystemFromPointGroup( @@ -131,7 +131,7 @@ protected: API::IFunction_sptr getFunction(const API::IAlgorithm_sptr &fitAlgorithm) const; - void addBackgroundTerms(Poldi2DFunction_sptr poldi2DFunction) const; + void addBackgroundTerms(const Poldi2DFunction_sptr &poldi2DFunction) const; boost::shared_ptr<Kernel::DblMatrix> getLocalCovarianceMatrix( const boost::shared_ptr<const Kernel::DblMatrix> &covarianceMatrix, diff --git a/Framework/SINQ/inc/MantidSINQ/PoldiIndexKnownCompounds.h b/Framework/SINQ/inc/MantidSINQ/PoldiIndexKnownCompounds.h index 2d1abea300f8bb633ec5ff975cff727c439da3b5..c65db85723ed317ee88277ae575d1dee960fab96 100644 --- a/Framework/SINQ/inc/MantidSINQ/PoldiIndexKnownCompounds.h +++ b/Framework/SINQ/inc/MantidSINQ/PoldiIndexKnownCompounds.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/SINQ/inc/MantidSINQ/PoldiPeakSearch.h b/Framework/SINQ/inc/MantidSINQ/PoldiPeakSearch.h index 4760d45a57c3e04b13c308b3ffd635b26d7ef10e..b308644161e3bd327100ab51ff690c4684a6656b 100644 --- a/Framework/SINQ/inc/MantidSINQ/PoldiPeakSearch.h +++ b/Framework/SINQ/inc/MantidSINQ/PoldiPeakSearch.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -62,16 +62,17 @@ protected: MantidVec::const_iterator baseDataStart, MantidVec::const_iterator originalDataStart) const; - UncertainValue - getBackgroundWithSigma(std::list<MantidVec::const_iterator> peakPositions, - const MantidVec &correlationCounts) const; - MantidVec getBackground(std::list<MantidVec::const_iterator> peakPositions, - const MantidVec &correlationCounts) const; + UncertainValue getBackgroundWithSigma( + const std::list<MantidVec::const_iterator> &peakPositions, + const MantidVec &correlationCounts) const; + MantidVec + getBackground(const std::list<MantidVec::const_iterator> &peakPositions, + const MantidVec &correlationCounts) const; bool distanceToPeaksGreaterThanMinimum( std::list<MantidVec::const_iterator> peakPositions, MantidVec::const_iterator point) const; size_t getNumberOfBackgroundPoints( - std::list<MantidVec::const_iterator> peakPositions, + const std::list<MantidVec::const_iterator> &peakPositions, const MantidVec &correlationCounts) const; double getMedianFromSortedVector(MantidVec::const_iterator begin, @@ -95,8 +96,9 @@ protected: MantidVec::const_iterator peakPosition, const MantidVec &xData) const; - void setErrorsOnWorkspace(DataObjects::Workspace2D_sptr correlationWorkspace, - double error) const; + void setErrorsOnWorkspace( + const DataObjects::Workspace2D_sptr &correlationWorkspace, + double error) const; void setMinimumDistance(int newMinimumDistance); void setMinimumPeakHeight(double newMinimumPeakHeight); @@ -104,7 +106,7 @@ protected: static bool vectorElementGreaterThan(MantidVec::const_iterator first, MantidVec::const_iterator second); - bool isLessThanMinimum(PoldiPeak_sptr peak); + bool isLessThanMinimum(const PoldiPeak_sptr &peak); int m_minimumDistance; int m_doubleMinimumDistance; diff --git a/Framework/SINQ/inc/MantidSINQ/PoldiPeakSummary.h b/Framework/SINQ/inc/MantidSINQ/PoldiPeakSummary.h index 7af3b4a2c7d6eaf2cf84f5868b7ea50bb485b42c..0331a90c1b48beeabf8c536e5a969ba8915ac612 100644 --- a/Framework/SINQ/inc/MantidSINQ/PoldiPeakSummary.h +++ b/Framework/SINQ/inc/MantidSINQ/PoldiPeakSummary.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/SINQ/inc/MantidSINQ/PoldiTruncateData.h b/Framework/SINQ/inc/MantidSINQ/PoldiTruncateData.h index 64f014f5618f9d0e0423f3b9138f07bf87de3e5d..da2b9ecd3a72aab3141415d2106cc49edbce7359 100644 --- a/Framework/SINQ/inc/MantidSINQ/PoldiTruncateData.h +++ b/Framework/SINQ/inc/MantidSINQ/PoldiTruncateData.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -42,10 +42,12 @@ public: size_t getActualBinCount(); protected: - void setChopperFromWorkspace(API::MatrixWorkspace_const_sptr workspace); + void + setChopperFromWorkspace(const API::MatrixWorkspace_const_sptr &workspace); void setChopper(PoldiAbstractChopper_sptr chopper); - void setTimeBinWidthFromWorkspace(API::MatrixWorkspace_const_sptr workspace); + void setTimeBinWidthFromWorkspace( + const API::MatrixWorkspace_const_sptr &workspace); void setTimeBinWidth(double timeBinWidth); void setActualBinCount(size_t actualBinCount); @@ -58,16 +60,17 @@ protected: getExtraCountsWorkspace(API::MatrixWorkspace_sptr workspace); API::MatrixWorkspace_sptr - getWorkspaceBelowX(API::MatrixWorkspace_sptr workspace, double x); + getWorkspaceBelowX(const API::MatrixWorkspace_sptr &workspace, double x); API::MatrixWorkspace_sptr - getWorkspaceAboveX(API::MatrixWorkspace_sptr workspace, double x); + getWorkspaceAboveX(const API::MatrixWorkspace_sptr &workspace, double x); API::Algorithm_sptr - getCropAlgorithmForWorkspace(API::MatrixWorkspace_sptr workspace); - API::MatrixWorkspace_sptr getOutputWorkspace(API::Algorithm_sptr algorithm); + getCropAlgorithmForWorkspace(const API::MatrixWorkspace_sptr &workspace); + API::MatrixWorkspace_sptr + getOutputWorkspace(const API::Algorithm_sptr &algorithm); API::MatrixWorkspace_sptr - getSummedSpectra(API::MatrixWorkspace_sptr workspace); + getSummedSpectra(const API::MatrixWorkspace_sptr &workspace); PoldiAbstractChopper_sptr m_chopper; double m_timeBinWidth; diff --git a/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/IPoldiFunction1D.h b/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/IPoldiFunction1D.h index 354156ff41ae4783ff8e692c94dd87f1aee3bb32..29a872fa8c52c6a2067a46c37f8fba1d446e089d 100644 --- a/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/IPoldiFunction1D.h +++ b/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/IPoldiFunction1D.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/MillerIndices.h b/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/MillerIndices.h index 93eb0c4829c84e1bea1af51f9f2ad5db4d49bc1f..f29d4f4b30b4d58657d2f54b3b567b2358676bcc 100644 --- a/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/MillerIndices.h +++ b/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/MillerIndices.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/MillerIndicesIO.h b/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/MillerIndicesIO.h index d1b61d1a69fc480ce28d4e52b00b0a26b5736744..5fa050b24c601195c9828177b524342ff2817f4a 100644 --- a/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/MillerIndicesIO.h +++ b/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/MillerIndicesIO.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/Poldi2DFunction.h b/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/Poldi2DFunction.h index 4fcc570d7aac505edd45b682e706d9f3e5c41407..61c3a8a8dee8f53a49ee5706989408e2e06766e3 100644 --- a/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/Poldi2DFunction.h +++ b/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/Poldi2DFunction.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiAbstractChopper.h b/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiAbstractChopper.h index 003b3f16e35c61be2a2f081a8b83418210c94514..da21286433a83c29f7bcedfdfab97c02304b4c67 100644 --- a/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiAbstractChopper.h +++ b/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiAbstractChopper.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiAbstractDetector.h b/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiAbstractDetector.h index 60a83efe199b92b6fbbc94e528845f3c4388e63d..807da621f4f891959ecc30de044a3c54dae3e0b6 100644 --- a/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiAbstractDetector.h +++ b/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiAbstractDetector.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiAutoCorrelationCore.h b/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiAutoCorrelationCore.h index 7ea72d63cd2927a8d1e2b9a7df7c0afb26c518f7..13035e1615b1490d64d5e9abf2214bbc5ee97c85 100644 --- a/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiAutoCorrelationCore.h +++ b/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiAutoCorrelationCore.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiBasicChopper.h b/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiBasicChopper.h index a76efece298377bda630b452e438659eab87221e..e514f45162754a7771308d904bc4763c8fde0bd3 100644 --- a/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiBasicChopper.h +++ b/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiBasicChopper.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiChopperFactory.h b/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiChopperFactory.h index e5b1d8f82ce9a78ba44dcc77f0a327fba077f0b1..fb82413d7e0ebe80fe6bf8832e8728f1fbf29b6f 100644 --- a/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiChopperFactory.h +++ b/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiChopperFactory.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiConversions.h b/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiConversions.h index aab252ffd6156b181faa2a2fa60f55b40f2ded7d..60518a3672b8e7afd4690fbfea35bc9f446e0933 100644 --- a/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiConversions.h +++ b/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiConversions.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiDGrid.h b/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiDGrid.h index 788cf64475c7f28ff31a3f7e98a6fd8ce5570a5c..9321281cab60e8aff82878f02d65edf608f59d9a 100644 --- a/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiDGrid.h +++ b/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiDGrid.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiDeadWireDecorator.h b/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiDeadWireDecorator.h index 2d70c2ca9e5ce302bc3734eb97e38bda85532ec8..83f317de25e440e0daeeb7ea89c225d17656a9c9 100644 --- a/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiDeadWireDecorator.h +++ b/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiDeadWireDecorator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -30,12 +30,14 @@ namespace Poldi { */ class MANTID_SINQ_DLL PoldiDeadWireDecorator : public PoldiDetectorDecorator { public: - PoldiDeadWireDecorator(std::set<int> deadWires, - boost::shared_ptr<PoldiAbstractDetector> detector = - boost::shared_ptr<PoldiAbstractDetector>()); - PoldiDeadWireDecorator(const Geometry::DetectorInfo &poldiDetectorInfo, - boost::shared_ptr<PoldiAbstractDetector> detector = - boost::shared_ptr<PoldiAbstractDetector>()); + PoldiDeadWireDecorator( + std::set<int> deadWires, + const boost::shared_ptr<PoldiAbstractDetector> &detector = + boost::shared_ptr<PoldiAbstractDetector>()); + PoldiDeadWireDecorator( + const Geometry::DetectorInfo &poldiDetectorInfo, + const boost::shared_ptr<PoldiAbstractDetector> &detector = + boost::shared_ptr<PoldiAbstractDetector>()); void setDeadWires(std::set<int> deadWires); std::set<int> deadWires(); diff --git a/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiDetectorDecorator.h b/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiDetectorDecorator.h index b6acaef15519506b0c4ae5cd33492af09b22afd4..5ae8cf342fcefb242f995c2d2312507a69c2b296 100644 --- a/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiDetectorDecorator.h +++ b/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiDetectorDecorator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiDetectorFactory.h b/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiDetectorFactory.h index fe7421a0a59ff923a1695b173133588f4d3e0563..7fde7ba7170ff8e2a93dcf82dde2fecb2808464c 100644 --- a/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiDetectorFactory.h +++ b/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiDetectorFactory.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiHeliumDetector.h b/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiHeliumDetector.h index ed248ba2c9e3a44a4f91de79366be7a909a03994..c2d798718e8418d111c840c90fe134846ea87abd 100644 --- a/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiHeliumDetector.h +++ b/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiHeliumDetector.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiInstrumentAdapter.h b/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiInstrumentAdapter.h index c8d07968b3d82630059faf1345d35699827528fb..b1e564ee1aaf5d3689a8a02c95e4d1c253b99eb2 100644 --- a/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiInstrumentAdapter.h +++ b/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiInstrumentAdapter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiMockInstrumentHelpers.h b/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiMockInstrumentHelpers.h index 73e5761f5acdf64a07df2fc0d8399f9a1b6bb1c4..06bc132f5e9cd5c29658e4cef0d0caad37ba6234 100644 --- a/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiMockInstrumentHelpers.h +++ b/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiMockInstrumentHelpers.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiPeak.h b/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiPeak.h index bb8b3308fc89fc0860a12c8d4a3395d6e5361f4f..e8ae124c01278e40c5ec4754e5def6388de1f382 100644 --- a/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiPeak.h +++ b/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiPeak.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiPeakCollection.h b/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiPeakCollection.h index 45232fabc507e66ec304e30bf586940466045ff5..04d41ccbd40393a7fd0f80557628f6a33291ec61 100644 --- a/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiPeakCollection.h +++ b/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiPeakCollection.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -84,7 +84,7 @@ protected: std::string getUnitCellStringFromLog(const API::LogManager_sptr &tableLog); std::string getStringValueFromLog(const API::LogManager_sptr &logManager, - std::string valueName); + const std::string &valueName); std::string intensityTypeToString(IntensityType type) const; IntensityType intensityTypeFromString(std::string typeString) const; diff --git a/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiResidualCorrelationCore.h b/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiResidualCorrelationCore.h index ee357083708804577b69c9c6f8d6bd47b925f8e4..f4ca7d938efa5b24b2938000a88565c187afefa2 100644 --- a/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiResidualCorrelationCore.h +++ b/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiResidualCorrelationCore.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiSourceSpectrum.h b/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiSourceSpectrum.h index a469b01ee2678eda110e5cd7efbd6872f8165264..66c3592715d91f916e94108d633e62c998fe54e2 100644 --- a/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiSourceSpectrum.h +++ b/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiSourceSpectrum.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -27,19 +27,19 @@ namespace Poldi { class MANTID_SINQ_DLL PoldiSourceSpectrum { public: - PoldiSourceSpectrum(Kernel::Interpolation spectrum); - PoldiSourceSpectrum(Geometry::Instrument_const_sptr poldiInstrument); + PoldiSourceSpectrum(const Kernel::Interpolation &spectrum); + PoldiSourceSpectrum(const Geometry::Instrument_const_sptr &poldiInstrument); double intensity(double wavelength) const; protected: - void - setSpectrumFromInstrument(Geometry::Instrument_const_sptr poldiInstrument); + void setSpectrumFromInstrument( + const Geometry::Instrument_const_sptr &poldiInstrument); Geometry::IComponent_const_sptr - getSourceComponent(Geometry::Instrument_const_sptr poldiInstrument); - Geometry::Parameter_sptr - getSpectrumParameter(Geometry::IComponent_const_sptr source, - Geometry::ParameterMap_sptr instrumentParameterMap); - void setSpectrum(Geometry::Parameter_sptr spectrumParameter); + getSourceComponent(const Geometry::Instrument_const_sptr &poldiInstrument); + Geometry::Parameter_sptr getSpectrumParameter( + const Geometry::IComponent_const_sptr &source, + const Geometry::ParameterMap_sptr &instrumentParameterMap); + void setSpectrum(const Geometry::Parameter_sptr &spectrumParameter); Kernel::Interpolation m_spectrum; }; diff --git a/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiSpectrumConstantBackground.h b/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiSpectrumConstantBackground.h index a3ff5698629085e31ccf15509d198e2d92838577..02e44ec4c886744efa43c53756a5906c73b7c4d4 100644 --- a/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiSpectrumConstantBackground.h +++ b/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiSpectrumConstantBackground.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiSpectrumDomainFunction.h b/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiSpectrumDomainFunction.h index d0bb27e44ddfef72b5b3e09fc3593c0af42e467c..97b3cd4f28291aecffa82b4f761c46bf2c274795 100644 --- a/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiSpectrumDomainFunction.h +++ b/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiSpectrumDomainFunction.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiSpectrumLinearBackground.h b/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiSpectrumLinearBackground.h index 06cbdc2e64d7cb90e9428e4567d180fc68c2771e..fa09428e9eb9a71e9ebcf54a04d4cc057eb34730 100644 --- a/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiSpectrumLinearBackground.h +++ b/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiSpectrumLinearBackground.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiSpectrumPawleyFunction.h b/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiSpectrumPawleyFunction.h index 52feeac61c33b2bfb11eeeab0c5a510a205e86f9..769ef50637bcb5e4acff947edbac59057007d140 100644 --- a/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiSpectrumPawleyFunction.h +++ b/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiSpectrumPawleyFunction.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiTimeTransformer.h b/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiTimeTransformer.h index 6cfa3768ea73da3e70ba09aec02dbec2696d9949..5501749ddcf9d7f63b2a878eae563a35448c8da5 100644 --- a/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiTimeTransformer.h +++ b/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiTimeTransformer.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/UncertainValue.h b/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/UncertainValue.h index 04b387d76f63b1674efc2fd0d9aa99ef492ce892..af404685be88e72315a486f5adfd9d14750212c7 100644 --- a/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/UncertainValue.h +++ b/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/UncertainValue.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/UncertainValueIO.h b/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/UncertainValueIO.h index c4d7166b7ca94fc85f60b2ee9da1eae201579fba..086a88ab53351484db24dbc6b1efbe5e36e51fa0 100644 --- a/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/UncertainValueIO.h +++ b/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/UncertainValueIO.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/SINQ/inc/MantidSINQ/PrecompiledHeader.h b/Framework/SINQ/inc/MantidSINQ/PrecompiledHeader.h index 7da5a6c9e52c83dcc67a8191790b606f73ce6332..a3455a71ee54555fb3deb26dcd49ba9e0ef6d5fd 100644 --- a/Framework/SINQ/inc/MantidSINQ/PrecompiledHeader.h +++ b/Framework/SINQ/inc/MantidSINQ/PrecompiledHeader.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/SINQ/inc/MantidSINQ/ProjectMD.h b/Framework/SINQ/inc/MantidSINQ/ProjectMD.h index 9f96fe04cefe48a69d614f41cdfda6190a2f958f..76bb71579a5e3ca29bf25faceab3094c0445f1e2 100644 --- a/Framework/SINQ/inc/MantidSINQ/ProjectMD.h +++ b/Framework/SINQ/inc/MantidSINQ/ProjectMD.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /** * This is a little algorithm which can sum a MD dataset along one direction, @@ -43,14 +43,16 @@ private: /// Execution code void exec() override; - void copyMetaData(Mantid::API::IMDHistoWorkspace_sptr inws, - Mantid::API::IMDHistoWorkspace_sptr outws); - void sumData(Mantid::API::IMDHistoWorkspace_sptr inws, - Mantid::API::IMDHistoWorkspace_sptr outws, int *sourceDim, + void copyMetaData(const Mantid::API::IMDHistoWorkspace_sptr &inws, + const Mantid::API::IMDHistoWorkspace_sptr &outws); + void sumData(const Mantid::API::IMDHistoWorkspace_sptr &inws, + const Mantid::API::IMDHistoWorkspace_sptr &outws, int *sourceDim, int *targetDim, int targetDimCount, int dimNo, int start, int end, int currentDim); - double getValue(Mantid::API::IMDHistoWorkspace_sptr ws, int *dim); - void putValue(Mantid::API::IMDHistoWorkspace_sptr ws, int *dim, double val); - unsigned int calcIndex(Mantid::API::IMDHistoWorkspace_sptr ws, int *dim); + double getValue(const Mantid::API::IMDHistoWorkspace_sptr &ws, int *dim); + void putValue(const Mantid::API::IMDHistoWorkspace_sptr &ws, int *dim, + double val); + unsigned int calcIndex(const Mantid::API::IMDHistoWorkspace_sptr &ws, + int *dim); }; diff --git a/Framework/SINQ/inc/MantidSINQ/SINQHMListener.h b/Framework/SINQ/inc/MantidSINQ/SINQHMListener.h index 680f0d404760b96e52d6f6d33c62713b1655a7e8..1c3fa22862425614163c54f1f78620da73bea308 100644 --- a/Framework/SINQ/inc/MantidSINQ/SINQHMListener.h +++ b/Framework/SINQ/inc/MantidSINQ/SINQHMListener.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /* * SINQHMListener.h @@ -52,11 +52,11 @@ private: int dim[3]; // @SINQ we only do 3D HM's, change when more dimensions std::string hmhost; - std::istream &httpRequest(std::string path); + std::istream &httpRequest(const std::string &path); void loadDimensions(); void doSpecialDim(); - void readHMData(Mantid::API::IMDHistoWorkspace_sptr ws); - void recurseDim(int *data, Mantid::API::IMDHistoWorkspace_sptr ws, + void readHMData(const Mantid::API::IMDHistoWorkspace_sptr &ws); + void recurseDim(int *data, const Mantid::API::IMDHistoWorkspace_sptr &ws, int currentDim, Mantid::coord_t *idx); int calculateCAddress(Mantid::coord_t *pos); diff --git a/Framework/SINQ/inc/MantidSINQ/SINQTranspose3D.h b/Framework/SINQ/inc/MantidSINQ/SINQTranspose3D.h index 771815b4328a2f9dd65dc833f8e600a488a08fce..0c64ce7aefb3dd3a90a9dc8325f055a6b6ec2acf 100644 --- a/Framework/SINQ/inc/MantidSINQ/SINQTranspose3D.h +++ b/Framework/SINQ/inc/MantidSINQ/SINQTranspose3D.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /** * This algorithm takes a 3D MD workspace and performs certain axis transposings @@ -54,11 +54,11 @@ private: /// Execution code void exec() override; - void doYXZ(Mantid::API::IMDHistoWorkspace_sptr inws); - void doXZY(Mantid::API::IMDHistoWorkspace_sptr inws); - void doTRICS(Mantid::API::IMDHistoWorkspace_sptr inws); - void doAMOR(Mantid::API::IMDHistoWorkspace_sptr inws); + void doYXZ(const Mantid::API::IMDHistoWorkspace_sptr &inws); + void doXZY(const Mantid::API::IMDHistoWorkspace_sptr &inws); + void doTRICS(const Mantid::API::IMDHistoWorkspace_sptr &inws); + void doAMOR(const Mantid::API::IMDHistoWorkspace_sptr &inws); - void copyMetaData(Mantid::API::IMDHistoWorkspace_sptr inws, - Mantid::API::IMDHistoWorkspace_sptr outws); + void copyMetaData(const Mantid::API::IMDHistoWorkspace_sptr &inws, + const Mantid::API::IMDHistoWorkspace_sptr &outws); }; diff --git a/Framework/SINQ/inc/MantidSINQ/SliceMDHisto.h b/Framework/SINQ/inc/MantidSINQ/SliceMDHisto.h index f8e002fd7c8059a0c016c83fcea04155010fbe3e..22a30baf55d69410b323a508d369ddd82b8f677b 100644 --- a/Framework/SINQ/inc/MantidSINQ/SliceMDHisto.h +++ b/Framework/SINQ/inc/MantidSINQ/SliceMDHisto.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /** * This algorithm takes a MDHistoWorkspace and allows to select a slab out of @@ -48,11 +48,11 @@ private: unsigned int m_rank; std::vector<int> m_dim; - void cutData(Mantid::API::IMDHistoWorkspace_sptr inWS, - Mantid::API::IMDHistoWorkspace_sptr outWS, + void cutData(const Mantid::API::IMDHistoWorkspace_sptr &inWS, + const Mantid::API::IMDHistoWorkspace_sptr &outWS, Mantid::coord_t *sourceDim, Mantid::coord_t *targetDim, std::vector<int> start, std::vector<int> end, unsigned int dim); - void copyMetaData(Mantid::API::IMDHistoWorkspace_sptr inws, - Mantid::API::IMDHistoWorkspace_sptr outws); + void copyMetaData(const Mantid::API::IMDHistoWorkspace_sptr &inws, + const Mantid::API::IMDHistoWorkspace_sptr &outws); }; diff --git a/Framework/SINQ/src/InvertMDDim.cpp b/Framework/SINQ/src/InvertMDDim.cpp index 4a69661aaf5ba7b581fee7046163707e1f6b36fb..f2d8e13a4bfc153f9deb29c531232d59f7f0fa8b 100644 --- a/Framework/SINQ/src/InvertMDDim.cpp +++ b/Framework/SINQ/src/InvertMDDim.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /** * This Algorithms inverts the dimensions of a MD data set. The @@ -62,9 +62,9 @@ void InvertMDDim::exec() { setProperty("OutputWorkspace", outWS); } -void InvertMDDim::recurseDim(IMDHistoWorkspace_sptr inWS, - IMDHistoWorkspace_sptr outWS, int currentDim, - int *idx, int rank) { +void InvertMDDim::recurseDim(const IMDHistoWorkspace_sptr &inWS, + const IMDHistoWorkspace_sptr &outWS, + int currentDim, int *idx, int rank) { boost::shared_ptr<const IMDDimension> dimi = inWS->getDimension(currentDim); if (currentDim == rank - 1) { for (int i = 0; i < static_cast<int>(dimi->getNBins()); i++) { @@ -82,8 +82,9 @@ void InvertMDDim::recurseDim(IMDHistoWorkspace_sptr inWS, } } -void InvertMDDim::copyMetaData(Mantid::API::IMDHistoWorkspace_sptr inws, - Mantid::API::IMDHistoWorkspace_sptr outws) { +void InvertMDDim::copyMetaData( + const Mantid::API::IMDHistoWorkspace_sptr &inws, + const Mantid::API::IMDHistoWorkspace_sptr &outws) { outws->setTitle(inws->getTitle()); ExperimentInfo_sptr info; @@ -97,7 +98,8 @@ void InvertMDDim::copyMetaData(Mantid::API::IMDHistoWorkspace_sptr inws, * IMDHistoWorkspace. * I.e. a proper address calculation from an index array. */ -unsigned int InvertMDDim::calcIndex(IMDHistoWorkspace_sptr ws, int dim[]) { +unsigned int InvertMDDim::calcIndex(const IMDHistoWorkspace_sptr &ws, + int dim[]) { size_t idx = 0; switch (ws->getNumDims()) { case 2: @@ -115,7 +117,7 @@ unsigned int InvertMDDim::calcIndex(IMDHistoWorkspace_sptr ws, int dim[]) { return static_cast<unsigned int>(idx); } -unsigned int InvertMDDim::calcInvertedIndex(IMDHistoWorkspace_sptr ws, +unsigned int InvertMDDim::calcInvertedIndex(const IMDHistoWorkspace_sptr &ws, int dim[]) { size_t idx = 0; switch (ws->getNumDims()) { diff --git a/Framework/SINQ/src/LoadFlexiNexus.cpp b/Framework/SINQ/src/LoadFlexiNexus.cpp index 51fab8ef01b5e5fc257d04ba3aa96c8cfd372dd6..48156e4a8e12f2e367f87d5738920be9bbe28325 100644 --- a/Framework/SINQ/src/LoadFlexiNexus.cpp +++ b/Framework/SINQ/src/LoadFlexiNexus.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidSINQ/LoadFlexiNexus.h" #include "MantidAPI/Axis.h" @@ -71,7 +71,7 @@ void LoadFlexiNexus::exec() { readData(&fin); } -void LoadFlexiNexus::loadDictionary(std::string dictFile) { +void LoadFlexiNexus::loadDictionary(const std::string &dictFile) { std::ifstream in(dictFile.c_str(), std::ifstream::in); std::string line, key, value; @@ -312,8 +312,8 @@ MDHistoDimension_sptr LoadFlexiNexus::makeDimension(NeXus::File *fin, int index, return MDHistoDimension_sptr( new MDHistoDimension(name, name, frame, min, max, length)); } -void LoadFlexiNexus::addMetaData(NeXus::File *fin, Workspace_sptr ws, - ExperimentInfo_sptr info) { +void LoadFlexiNexus::addMetaData(NeXus::File *fin, const Workspace_sptr &ws, + const ExperimentInfo_sptr &info) { std::map<std::string, std::string>::const_iterator it; // assign a title @@ -404,7 +404,7 @@ std::unordered_set<std::string> LoadFlexiNexus::populateSpecialMap() { return specialMap; } -int LoadFlexiNexus::safeOpenpath(NeXus::File *fin, std::string path) { +int LoadFlexiNexus::safeOpenpath(NeXus::File *fin, const std::string &path) { try { fin->openPath(path); } catch (NeXus::Exception &) { diff --git a/Framework/SINQ/src/MDHistoToWorkspace2D.cpp b/Framework/SINQ/src/MDHistoToWorkspace2D.cpp index acad08381b71ea16a87b1be2e17e3d8058484c98..e6761fdd99e7b63f393c87caefcaddd5209813af 100644 --- a/Framework/SINQ/src/MDHistoToWorkspace2D.cpp +++ b/Framework/SINQ/src/MDHistoToWorkspace2D.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /** * This algorithm flattens a MDHistoWorkspace to a Workspace2D. Mantid has far @@ -85,7 +85,8 @@ void MDHistoToWorkspace2D::exec() { setProperty("OutputWorkspace", boost::dynamic_pointer_cast<Workspace>(outWS)); } -size_t MDHistoToWorkspace2D::calculateNSpectra(IMDHistoWorkspace_sptr inWS) { +size_t +MDHistoToWorkspace2D::calculateNSpectra(const IMDHistoWorkspace_sptr &inWS) { size_t nSpectra = 1; for (size_t i = 0; i < m_rank - 1; i++) { boost::shared_ptr<const IMDDimension> dim = inWS->getDimension(i); @@ -94,8 +95,8 @@ size_t MDHistoToWorkspace2D::calculateNSpectra(IMDHistoWorkspace_sptr inWS) { return nSpectra; } -void MDHistoToWorkspace2D::recurseData(IMDHistoWorkspace_sptr inWS, - Workspace2D_sptr outWS, +void MDHistoToWorkspace2D::recurseData(const IMDHistoWorkspace_sptr &inWS, + const Workspace2D_sptr &outWS, size_t currentDim, coord_t *pos) { boost::shared_ptr<const IMDDimension> dim = inWS->getDimension(currentDim); if (currentDim == m_rank - 1) { @@ -128,7 +129,7 @@ void MDHistoToWorkspace2D::recurseData(IMDHistoWorkspace_sptr inWS, } void MDHistoToWorkspace2D::checkW2D( - Mantid::DataObjects::Workspace2D_sptr outWS) { + const Mantid::DataObjects::Workspace2D_sptr &outWS) { size_t nSpectra = outWS->getNumberHistograms(); size_t length = outWS->blocksize(); @@ -155,8 +156,8 @@ void MDHistoToWorkspace2D::checkW2D( } void MDHistoToWorkspace2D::copyMetaData( - Mantid::API::IMDHistoWorkspace_sptr inWS, - Mantid::DataObjects::Workspace2D_sptr outWS) { + const Mantid::API::IMDHistoWorkspace_sptr &inWS, + const Mantid::DataObjects::Workspace2D_sptr &outWS) { if (inWS->getNumExperimentInfo() > 0) { ExperimentInfo_sptr info = inWS->getExperimentInfo(0); outWS->copyExperimentInfoFrom(info.get()); diff --git a/Framework/SINQ/src/PoldiAnalyseResiduals.cpp b/Framework/SINQ/src/PoldiAnalyseResiduals.cpp index 45749e42797d052512ef44fba43ed78c03c501a7..44233b84a71cf9a4e598957af2f44c925a0d4652 100644 --- a/Framework/SINQ/src/PoldiAnalyseResiduals.cpp +++ b/Framework/SINQ/src/PoldiAnalyseResiduals.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidSINQ/PoldiAnalyseResiduals.h" #include "MantidAPI/AlgorithmFactory.h" diff --git a/Framework/SINQ/src/PoldiAutoCorrelation5.cpp b/Framework/SINQ/src/PoldiAutoCorrelation5.cpp index 0ef16fcab1ad6c9eb818618689015aad1c951da1..f40f8a392dac42b9556986e82cf16e9d613c8764 100644 --- a/Framework/SINQ/src/PoldiAutoCorrelation5.cpp +++ b/Framework/SINQ/src/PoldiAutoCorrelation5.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes @@ -58,8 +58,6 @@ void PoldiAutoCorrelation5::init() { new PoldiAutoCorrelationCore(g_log)); } -/** ***************************************************************** */ - /** Executes the algorithm. Reading in the file and creating and populating * the output workspace * @@ -115,8 +113,8 @@ void PoldiAutoCorrelation5::exec() { } void PoldiAutoCorrelation5::logConfigurationInformation( - boost::shared_ptr<PoldiDeadWireDecorator> cleanDetector, - PoldiAbstractChopper_sptr chopper) { + const boost::shared_ptr<PoldiDeadWireDecorator> &cleanDetector, + const PoldiAbstractChopper_sptr &chopper) { if (cleanDetector && chopper) { g_log.information() << "____________________________________________________ \n"; diff --git a/Framework/SINQ/src/PoldiCreatePeaksFromCell.cpp b/Framework/SINQ/src/PoldiCreatePeaksFromCell.cpp index e759eec190e03350539d0c760ff866340dccbca7..776b0436e3f8bbca7811bd6f1064f82c82d2a4e3 100644 --- a/Framework/SINQ/src/PoldiCreatePeaksFromCell.cpp +++ b/Framework/SINQ/src/PoldiCreatePeaksFromCell.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidSINQ/PoldiCreatePeaksFromCell.h" #include "MantidKernel/BoundedValidator.h" diff --git a/Framework/SINQ/src/PoldiFitPeaks1D.cpp b/Framework/SINQ/src/PoldiFitPeaks1D.cpp index 826d306f6148491af9359246c9ac3635707df651..f0cecc14250bdba3708a53bdad4ed853c306735c 100644 --- a/Framework/SINQ/src/PoldiFitPeaks1D.cpp +++ b/Framework/SINQ/src/PoldiFitPeaks1D.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/WorkspaceFactory.h" #include "MantidAPI/WorkspaceGroup.h" @@ -113,7 +113,8 @@ PoldiFitPeaks1D::getPeakProfile(const PoldiPeak_sptr &poldiPeak) const { } void PoldiFitPeaks1D::setValuesFromProfileFunction( - PoldiPeak_sptr poldiPeak, const IFunction_sptr &fittedFunction) const { + const PoldiPeak_sptr &poldiPeak, + const IFunction_sptr &fittedFunction) const { CompositeFunction_sptr totalFunction = boost::dynamic_pointer_cast<CompositeFunction>(fittedFunction); @@ -134,8 +135,8 @@ void PoldiFitPeaks1D::setValuesFromProfileFunction( } } -double -PoldiFitPeaks1D::getFwhmWidthRelation(IPeakFunction_sptr peakFunction) const { +double PoldiFitPeaks1D::getFwhmWidthRelation( + const IPeakFunction_sptr &peakFunction) const { return peakFunction->fwhm() / peakFunction->getParameter(2); } diff --git a/Framework/SINQ/src/PoldiFitPeaks1D2.cpp b/Framework/SINQ/src/PoldiFitPeaks1D2.cpp index 7d63588e3fe22c6f46c87a0c21ff51612c488d09..c6a97a0dc4b502eae13ae9d2bbc7ca659811bf0a 100644 --- a/Framework/SINQ/src/PoldiFitPeaks1D2.cpp +++ b/Framework/SINQ/src/PoldiFitPeaks1D2.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/WorkspaceFactory.h" #include "MantidAPI/WorkspaceGroup.h" @@ -256,7 +256,8 @@ PoldiFitPeaks1D2::getPeakProfile(const PoldiPeak_sptr &poldiPeak) const { } void PoldiFitPeaks1D2::setValuesFromProfileFunction( - PoldiPeak_sptr poldiPeak, const IFunction_sptr &fittedFunction) const { + const PoldiPeak_sptr &poldiPeak, + const IFunction_sptr &fittedFunction) const { IPeakFunction_sptr peakFunction = boost::dynamic_pointer_cast<IPeakFunction>(fittedFunction); @@ -271,8 +272,8 @@ void PoldiFitPeaks1D2::setValuesFromProfileFunction( } } -double -PoldiFitPeaks1D2::getFwhmWidthRelation(IPeakFunction_sptr peakFunction) const { +double PoldiFitPeaks1D2::getFwhmWidthRelation( + const IPeakFunction_sptr &peakFunction) const { return peakFunction->fwhm() / peakFunction->getParameter(2); } diff --git a/Framework/SINQ/src/PoldiFitPeaks2D.cpp b/Framework/SINQ/src/PoldiFitPeaks2D.cpp index 74a4eef6c90ad845d286b2108c55f0d0d1e894e8..e9456e9734ba633b341f9539f2499f1b8d8cd22f 100644 --- a/Framework/SINQ/src/PoldiFitPeaks2D.cpp +++ b/Framework/SINQ/src/PoldiFitPeaks2D.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidSINQ/PoldiFitPeaks2D.h" @@ -381,9 +381,8 @@ PoldiPeakCollection_sptr PoldiFitPeaks2D::getCountPeakCollection( } /// Creates a PoldiPeak from the given profile function/hkl pair. -PoldiPeak_sptr -PoldiFitPeaks2D::getPeakFromPeakFunction(IPeakFunction_sptr profileFunction, - const V3D &hkl) { +PoldiPeak_sptr PoldiFitPeaks2D::getPeakFromPeakFunction( + const IPeakFunction_sptr &profileFunction, const V3D &hkl) { // Use EstimatePeakErrors to calculate errors of FWHM and so on IAlgorithm_sptr errorAlg = createChildAlgorithm("EstimatePeakErrors"); @@ -466,7 +465,7 @@ Poldi2DFunction_sptr PoldiFitPeaks2D::getFunctionFromPeakCollection( * @return :: A Poldi2DFunction with peak profile functions. */ Poldi2DFunction_sptr PoldiFitPeaks2D::getFunctionIndividualPeaks( - std::string profileFunctionName, + const std::string &profileFunctionName, const PoldiPeakCollection_sptr &peakCollection) const { auto mdFunction = boost::make_shared<Poldi2DFunction>(); @@ -519,7 +518,7 @@ Poldi2DFunction_sptr PoldiFitPeaks2D::getFunctionIndividualPeaks( * @return :: A Poldi2DFunction with a PawleyFunction. */ Poldi2DFunction_sptr PoldiFitPeaks2D::getFunctionPawley( - std::string profileFunctionName, + const std::string &profileFunctionName, const PoldiPeakCollection_sptr &peakCollection) { auto mdFunction = boost::make_shared<Poldi2DFunction>(); @@ -1048,7 +1047,7 @@ PoldiFitPeaks2D::getFunction(const IAlgorithm_sptr &fitAlgorithm) const { * @param poldi2DFunction :: Poldi2DFunction to which the background is added. */ void PoldiFitPeaks2D::addBackgroundTerms( - Poldi2DFunction_sptr poldi2DFunction) const { + const Poldi2DFunction_sptr &poldi2DFunction) const { bool addConstantBackground = getProperty("FitConstantBackground"); if (addConstantBackground) { IFunction_sptr constantBackground = diff --git a/Framework/SINQ/src/PoldiIndexKnownCompounds.cpp b/Framework/SINQ/src/PoldiIndexKnownCompounds.cpp index 894bad112135441a068a5bafcd8031dbb299e446..5247e4140fe623ba5230108385cd697d0bd5e7af 100644 --- a/Framework/SINQ/src/PoldiIndexKnownCompounds.cpp +++ b/Framework/SINQ/src/PoldiIndexKnownCompounds.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidSINQ/PoldiIndexKnownCompounds.h" diff --git a/Framework/SINQ/src/PoldiPeakSearch.cpp b/Framework/SINQ/src/PoldiPeakSearch.cpp index abf27d49b0da431b57472010007fc94310eea3d7..6c4dc2453266eda129f6a7bb313db2c27664f847 100644 --- a/Framework/SINQ/src/PoldiPeakSearch.cpp +++ b/Framework/SINQ/src/PoldiPeakSearch.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidSINQ/PoldiPeakSearch.h" @@ -22,6 +22,7 @@ #include <list> #include <numeric> #include <queue> +#include <utility> #include "boost/math/distributions.hpp" @@ -314,7 +315,7 @@ PoldiPeakSearch::getFWHMEstimate(const MantidVec::const_iterator &baseListStart, * @param error :: Error that is set on the workspace. */ void PoldiPeakSearch::setErrorsOnWorkspace( - Workspace2D_sptr correlationWorkspace, double error) const { + const Workspace2D_sptr &correlationWorkspace, double error) const { MantidVec &errors = correlationWorkspace->dataE(0); std::fill(errors.begin(), errors.end(), error); @@ -332,7 +333,7 @@ void PoldiPeakSearch::setErrorsOnWorkspace( * @return Vector only with counts that belong to the background. */ MantidVec PoldiPeakSearch::getBackground( - std::list<MantidVec::const_iterator> peakPositions, + const std::list<MantidVec::const_iterator> &peakPositions, const MantidVec &correlationCounts) const { size_t backgroundPoints = getNumberOfBackgroundPoints(peakPositions, correlationCounts); @@ -366,9 +367,10 @@ MantidVec PoldiPeakSearch::getBackground( * @return Background estimation with error. */ UncertainValue PoldiPeakSearch::getBackgroundWithSigma( - std::list<MantidVec::const_iterator> peakPositions, + const std::list<MantidVec::const_iterator> &peakPositions, const MantidVec &correlationCounts) const { - MantidVec background = getBackground(peakPositions, correlationCounts); + MantidVec background = + getBackground(std::move(peakPositions), correlationCounts); /* Instead of using Mean and Standard deviation, which are appropriate * for data originating from a normal distribution (which is not the case @@ -420,7 +422,7 @@ bool PoldiPeakSearch::distanceToPeaksGreaterThanMinimum( * @return Number of background points. */ size_t PoldiPeakSearch::getNumberOfBackgroundPoints( - std::list<MantidVec::const_iterator> peakPositions, + const std::list<MantidVec::const_iterator> &peakPositions, const MantidVec &correlationCounts) const { /* subtracting 2, to match original algorithm, where * the first and the last point of the spectrum are not @@ -528,7 +530,7 @@ bool PoldiPeakSearch::vectorElementGreaterThan( return *first > *second; } -bool PoldiPeakSearch::isLessThanMinimum(PoldiPeak_sptr peak) { +bool PoldiPeakSearch::isLessThanMinimum(const PoldiPeak_sptr &peak) { return peak->intensity().value() <= m_minimumPeakHeight; } diff --git a/Framework/SINQ/src/PoldiPeakSummary.cpp b/Framework/SINQ/src/PoldiPeakSummary.cpp index 073db977586d5a966545e0cbbc755012dc402f5b..1ce36227ac961615e3cac85c6a23c5eb35575bab 100644 --- a/Framework/SINQ/src/PoldiPeakSummary.cpp +++ b/Framework/SINQ/src/PoldiPeakSummary.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidSINQ/PoldiPeakSummary.h" diff --git a/Framework/SINQ/src/PoldiTruncateData.cpp b/Framework/SINQ/src/PoldiTruncateData.cpp index 0315c4122a1862bd50e9d4a4ab848727d1a5ea53..e94235204433cbe22533dc07a9bd367c137a8c4b 100644 --- a/Framework/SINQ/src/PoldiTruncateData.cpp +++ b/Framework/SINQ/src/PoldiTruncateData.cpp @@ -1,11 +1,13 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + -#include "MantidSINQ/PoldiTruncateData.h" +#include <utility> + #include "MantidAPI/MatrixWorkspace.h" +#include "MantidSINQ/PoldiTruncateData.h" #include "MantidSINQ/PoldiUtilities/PoldiInstrumentAdapter.h" namespace Mantid { @@ -44,7 +46,7 @@ const std::string PoldiTruncateData::summary() const { *definition and log. */ void PoldiTruncateData::setChopperFromWorkspace( - MatrixWorkspace_const_sptr workspace) { + const MatrixWorkspace_const_sptr &workspace) { PoldiInstrumentAdapter poldiInstrument(workspace); setChopper(poldiInstrument.chopper()); } @@ -54,7 +56,7 @@ void PoldiTruncateData::setChopperFromWorkspace( * @param chopper :: POLDI chopper compatible with the measurement. */ void PoldiTruncateData::setChopper(PoldiAbstractChopper_sptr chopper) { - m_chopper = chopper; + m_chopper = std::move(chopper); } /** Extracts timing information from the given MatrixWorkspace. @@ -68,7 +70,7 @@ void PoldiTruncateData::setChopper(PoldiAbstractChopper_sptr chopper) { * @param workspace :: Workspace with POLDI data */ void PoldiTruncateData::setTimeBinWidthFromWorkspace( - MatrixWorkspace_const_sptr workspace) { + const MatrixWorkspace_const_sptr &workspace) { if (!workspace || workspace->getNumberHistograms() < 1) { throw std::invalid_argument( "Workspace does not contain any data. Aborting."); @@ -233,7 +235,7 @@ MatrixWorkspace_sptr PoldiTruncateData::getCroppedWorkspace(MatrixWorkspace_sptr workspace) { double maximumXValue = getMaximumTimeValue(getCalculatedBinCount()); - return getWorkspaceBelowX(workspace, maximumXValue); + return getWorkspaceBelowX(std::move(workspace), maximumXValue); } /** Returns a MatrixWorkspace with all extra counts @@ -260,7 +262,7 @@ MatrixWorkspace_sptr PoldiTruncateData::getExtraCountsWorkspace(MatrixWorkspace_sptr workspace) { double minimumXValue = getMinimumExtraTimeValue(getCalculatedBinCount()); MatrixWorkspace_sptr croppedOutput = - getWorkspaceAboveX(workspace, minimumXValue); + getWorkspaceAboveX(std::move(workspace), minimumXValue); return getSummedSpectra(croppedOutput); } @@ -272,9 +274,9 @@ PoldiTruncateData::getExtraCountsWorkspace(MatrixWorkspace_sptr workspace) { * @return MatrixWorkspace cropped to values with x < specified limit. */ MatrixWorkspace_sptr -PoldiTruncateData::getWorkspaceBelowX(MatrixWorkspace_sptr workspace, +PoldiTruncateData::getWorkspaceBelowX(const MatrixWorkspace_sptr &workspace, double x) { - Algorithm_sptr crop = getCropAlgorithmForWorkspace(workspace); + Algorithm_sptr crop = getCropAlgorithmForWorkspace(std::move(workspace)); crop->setProperty("XMax", x); return getOutputWorkspace(crop); @@ -288,9 +290,9 @@ PoldiTruncateData::getWorkspaceBelowX(MatrixWorkspace_sptr workspace, * @return MatrixWorkspace cropped to values with x >= specified limit. */ MatrixWorkspace_sptr -PoldiTruncateData::getWorkspaceAboveX(MatrixWorkspace_sptr workspace, +PoldiTruncateData::getWorkspaceAboveX(const MatrixWorkspace_sptr &workspace, double x) { - Algorithm_sptr crop = getCropAlgorithmForWorkspace(workspace); + Algorithm_sptr crop = getCropAlgorithmForWorkspace(std::move(workspace)); crop->setProperty("Xmin", x); return getOutputWorkspace(crop); @@ -307,7 +309,7 @@ PoldiTruncateData::getWorkspaceAboveX(MatrixWorkspace_sptr workspace, * @return Pointer to crop algorithm. */ Algorithm_sptr PoldiTruncateData::getCropAlgorithmForWorkspace( - MatrixWorkspace_sptr workspace) { + const MatrixWorkspace_sptr &workspace) { Algorithm_sptr crop = createChildAlgorithm("CropWorkspace"); if (!crop) { @@ -328,7 +330,7 @@ Algorithm_sptr PoldiTruncateData::getCropAlgorithmForWorkspace( * @return MatrixWorkspace stored in algorithm's OutputWorkspace property. */ MatrixWorkspace_sptr -PoldiTruncateData::getOutputWorkspace(Algorithm_sptr algorithm) { +PoldiTruncateData::getOutputWorkspace(const Algorithm_sptr &algorithm) { if (!algorithm || !algorithm->execute()) { throw std::runtime_error("Workspace could not be retrieved successfully."); } @@ -346,7 +348,7 @@ PoldiTruncateData::getOutputWorkspace(Algorithm_sptr algorithm) { * @return MatrixWorkspace with one spectrum which contains all counts. */ MatrixWorkspace_sptr -PoldiTruncateData::getSummedSpectra(MatrixWorkspace_sptr workspace) { +PoldiTruncateData::getSummedSpectra(const MatrixWorkspace_sptr &workspace) { Algorithm_sptr sumSpectra = createChildAlgorithm("SumSpectra"); if (!sumSpectra) { diff --git a/Framework/SINQ/src/PoldiUtilities/MillerIndices.cpp b/Framework/SINQ/src/PoldiUtilities/MillerIndices.cpp index 91f5802e0ab2bc7e3e28a6b134d0a543b3bfaf0e..2657a534302e12197e4744ff9ec80372d479694b 100644 --- a/Framework/SINQ/src/PoldiUtilities/MillerIndices.cpp +++ b/Framework/SINQ/src/PoldiUtilities/MillerIndices.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidSINQ/PoldiUtilities/MillerIndices.h" diff --git a/Framework/SINQ/src/PoldiUtilities/Poldi2DFunction.cpp b/Framework/SINQ/src/PoldiUtilities/Poldi2DFunction.cpp index ea447d4987aeacb0fec60743a677adddc8d20b0e..f578fac06019e1490732b00e48e096077b4799d7 100644 --- a/Framework/SINQ/src/PoldiUtilities/Poldi2DFunction.cpp +++ b/Framework/SINQ/src/PoldiUtilities/Poldi2DFunction.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidSINQ/PoldiUtilities/Poldi2DFunction.h" #include <cmath> diff --git a/Framework/SINQ/src/PoldiUtilities/PoldiAutoCorrelationCore.cpp b/Framework/SINQ/src/PoldiUtilities/PoldiAutoCorrelationCore.cpp index 8f29752f44fcb2bbebb7ae0b5db9f7df622dd9aa..7715659a6b52ecf8006a425fa64ef50162fda99f 100644 --- a/Framework/SINQ/src/PoldiUtilities/PoldiAutoCorrelationCore.cpp +++ b/Framework/SINQ/src/PoldiUtilities/PoldiAutoCorrelationCore.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidSINQ/PoldiUtilities/PoldiAutoCorrelationCore.h" diff --git a/Framework/SINQ/src/PoldiUtilities/PoldiBasicChopper.cpp b/Framework/SINQ/src/PoldiUtilities/PoldiBasicChopper.cpp index 0268730416c44e1ba7ec3037c0f3b62f6012b2be..4d3f406cb7271dddea1a20dce70cf4804960f8f6 100644 --- a/Framework/SINQ/src/PoldiUtilities/PoldiBasicChopper.cpp +++ b/Framework/SINQ/src/PoldiUtilities/PoldiBasicChopper.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidSINQ/PoldiUtilities/PoldiBasicChopper.h" diff --git a/Framework/SINQ/src/PoldiUtilities/PoldiChopperFactory.cpp b/Framework/SINQ/src/PoldiUtilities/PoldiChopperFactory.cpp index 2b7c5bda7bd6d0bb11bef96d57943df8b355c180..321a5e4396759647f8184c153bd16aff0ddf1b13 100644 --- a/Framework/SINQ/src/PoldiUtilities/PoldiChopperFactory.cpp +++ b/Framework/SINQ/src/PoldiUtilities/PoldiChopperFactory.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidSINQ/PoldiUtilities/PoldiChopperFactory.h" diff --git a/Framework/SINQ/src/PoldiUtilities/PoldiConversions.cpp b/Framework/SINQ/src/PoldiUtilities/PoldiConversions.cpp index a9dbc41d64bb63640eb2bd00dce7b4b87baf7f19..5723fcc1422d2e712edb949ce8a8eeb88b7b5d21 100644 --- a/Framework/SINQ/src/PoldiUtilities/PoldiConversions.cpp +++ b/Framework/SINQ/src/PoldiUtilities/PoldiConversions.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidSINQ/PoldiUtilities/PoldiConversions.h" #include "MantidKernel/PhysicalConstants.h" diff --git a/Framework/SINQ/src/PoldiUtilities/PoldiDGrid.cpp b/Framework/SINQ/src/PoldiUtilities/PoldiDGrid.cpp index 54a2439e548f5ab8a09d2ebb3316082f3f79699e..d1dedab391ce2f57adb33ae2bd8833af46bf7b0d 100644 --- a/Framework/SINQ/src/PoldiUtilities/PoldiDGrid.cpp +++ b/Framework/SINQ/src/PoldiUtilities/PoldiDGrid.cpp @@ -1,11 +1,13 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + -#include "MantidSINQ/PoldiUtilities/PoldiDGrid.h" +#include <utility> + #include "MantidSINQ/PoldiUtilities/PoldiConversions.h" +#include "MantidSINQ/PoldiUtilities/PoldiDGrid.h" namespace Mantid { namespace Poldi { @@ -13,18 +15,19 @@ namespace Poldi { PoldiDGrid::PoldiDGrid(boost::shared_ptr<PoldiAbstractDetector> detector, boost::shared_ptr<PoldiAbstractChopper> chopper, double deltaT, std::pair<double, double> wavelengthRange) - : m_detector(detector), m_chopper(chopper), m_deltaT(deltaT), - m_wavelengthRange(wavelengthRange), m_dRangeAsMultiples(), m_deltaD(0.0), - m_dgrid(), m_hasCachedCalculation(false) {} + : m_detector(std::move(detector)), m_chopper(std::move(chopper)), + m_deltaT(deltaT), m_wavelengthRange(wavelengthRange), + m_dRangeAsMultiples(), m_deltaD(0.0), m_dgrid(), + m_hasCachedCalculation(false) {} void PoldiDGrid::setDetector( boost::shared_ptr<PoldiAbstractDetector> newDetector) { - m_detector = newDetector; + m_detector = std::move(newDetector); } void PoldiDGrid::setChopper( boost::shared_ptr<PoldiAbstractChopper> newChopper) { - m_chopper = newChopper; + m_chopper = std::move(newChopper); } void PoldiDGrid::setDeltaT(double newDeltaT) { m_deltaT = newDeltaT; } diff --git a/Framework/SINQ/src/PoldiUtilities/PoldiDeadWireDecorator.cpp b/Framework/SINQ/src/PoldiUtilities/PoldiDeadWireDecorator.cpp index abdcc3da2fb7859a7928974644644391b849f303..96a497e8d9977324e5734433008ffad608eb2ab4 100644 --- a/Framework/SINQ/src/PoldiUtilities/PoldiDeadWireDecorator.cpp +++ b/Framework/SINQ/src/PoldiUtilities/PoldiDeadWireDecorator.cpp @@ -1,13 +1,14 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidSINQ/PoldiUtilities/PoldiDeadWireDecorator.h" #include "MantidGeometry/Instrument/DetectorInfo.h" #include <algorithm> +#include <utility> namespace Mantid { namespace Poldi { @@ -16,15 +17,15 @@ using namespace Geometry; PoldiDeadWireDecorator::PoldiDeadWireDecorator( std::set<int> deadWires, - boost::shared_ptr<Poldi::PoldiAbstractDetector> detector) - : PoldiDetectorDecorator(detector), m_deadWireSet(deadWires), + const boost::shared_ptr<Poldi::PoldiAbstractDetector> &detector) + : PoldiDetectorDecorator(detector), m_deadWireSet(std::move(deadWires)), m_goodElements() { setDecoratedDetector(detector); } PoldiDeadWireDecorator::PoldiDeadWireDecorator( const Geometry::DetectorInfo &poldiDetectorInfo, - boost::shared_ptr<PoldiAbstractDetector> detector) + const boost::shared_ptr<PoldiAbstractDetector> &detector) : PoldiDetectorDecorator(detector), m_deadWireSet(), m_goodElements() { setDecoratedDetector(detector); @@ -42,7 +43,7 @@ PoldiDeadWireDecorator::PoldiDeadWireDecorator( } void PoldiDeadWireDecorator::setDeadWires(std::set<int> deadWires) { - m_deadWireSet = deadWires; + m_deadWireSet = std::move(deadWires); detectorSetHook(); } diff --git a/Framework/SINQ/src/PoldiUtilities/PoldiDetectorDecorator.cpp b/Framework/SINQ/src/PoldiUtilities/PoldiDetectorDecorator.cpp index b5006aa2c610362540681af917f4cc648be50c0d..62cf8b06a98fe7befe1dd74fc09f3e761f26ae0b 100644 --- a/Framework/SINQ/src/PoldiUtilities/PoldiDetectorDecorator.cpp +++ b/Framework/SINQ/src/PoldiUtilities/PoldiDetectorDecorator.cpp @@ -1,9 +1,11 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + +#include <utility> + #include "MantidSINQ/PoldiUtilities/PoldiDetectorDecorator.h" namespace Mantid { @@ -14,12 +16,12 @@ using namespace Geometry; PoldiDetectorDecorator::PoldiDetectorDecorator( boost::shared_ptr<PoldiAbstractDetector> decoratedDetector) : PoldiAbstractDetector(), m_decoratedDetector() { - setDecoratedDetector(decoratedDetector); + setDecoratedDetector(std::move(decoratedDetector)); } void PoldiDetectorDecorator::setDecoratedDetector( boost::shared_ptr<PoldiAbstractDetector> detector) { - m_decoratedDetector = detector; + m_decoratedDetector = std::move(detector); detectorSetHook(); } diff --git a/Framework/SINQ/src/PoldiUtilities/PoldiDetectorFactory.cpp b/Framework/SINQ/src/PoldiUtilities/PoldiDetectorFactory.cpp index 5112a7275c54558a3ac4ad90cde987f9d2f039d5..4213424e8887b55d6b2852ffc3376a5e4b65c593 100644 --- a/Framework/SINQ/src/PoldiUtilities/PoldiDetectorFactory.cpp +++ b/Framework/SINQ/src/PoldiUtilities/PoldiDetectorFactory.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidSINQ/PoldiUtilities/PoldiDetectorFactory.h" diff --git a/Framework/SINQ/src/PoldiUtilities/PoldiHeliumDetector.cpp b/Framework/SINQ/src/PoldiUtilities/PoldiHeliumDetector.cpp index c002f3b5ee7b1d12f475bd62f7c4bff3089e7c3c..3d54bb7402844693c5e0d498f70120246d004dd1 100644 --- a/Framework/SINQ/src/PoldiUtilities/PoldiHeliumDetector.cpp +++ b/Framework/SINQ/src/PoldiUtilities/PoldiHeliumDetector.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidSINQ/PoldiUtilities/PoldiHeliumDetector.h" diff --git a/Framework/SINQ/src/PoldiUtilities/PoldiInstrumentAdapter.cpp b/Framework/SINQ/src/PoldiUtilities/PoldiInstrumentAdapter.cpp index c856c16f9220287ffb49e8707c96986ad401ce24..4cae3e82f9ac7f93e54d83257098c291e6076fe7 100644 --- a/Framework/SINQ/src/PoldiUtilities/PoldiInstrumentAdapter.cpp +++ b/Framework/SINQ/src/PoldiUtilities/PoldiInstrumentAdapter.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidSINQ/PoldiUtilities/PoldiInstrumentAdapter.h" diff --git a/Framework/SINQ/src/PoldiUtilities/PoldiPeak.cpp b/Framework/SINQ/src/PoldiUtilities/PoldiPeak.cpp index c65cab3396d38b68b0d3adf514d81dd4a163e194..8085d49146480f07fe6516eef95ed92b9eec3e05 100644 --- a/Framework/SINQ/src/PoldiUtilities/PoldiPeak.cpp +++ b/Framework/SINQ/src/PoldiUtilities/PoldiPeak.cpp @@ -1,13 +1,14 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidSINQ/PoldiUtilities/PoldiPeak.h" #include <cmath> #include <stdexcept> +#include <utility> namespace Mantid { namespace Poldi { @@ -18,7 +19,7 @@ PoldiPeak_sptr PoldiPeak::clone() const { const MillerIndices &PoldiPeak::hkl() const { return m_hkl; } -void PoldiPeak::setHKL(MillerIndices hkl) { m_hkl = hkl; } +void PoldiPeak::setHKL(MillerIndices hkl) { m_hkl = std::move(hkl); } UncertainValue PoldiPeak::d() const { return m_d; } @@ -118,14 +119,16 @@ PoldiPeak_sptr PoldiPeak::create(double qValue, double intensity) { } PoldiPeak_sptr PoldiPeak::create(MillerIndices hkl, double dValue) { - return PoldiPeak_sptr(new PoldiPeak( - UncertainValue(dValue), UncertainValue(0.0), UncertainValue(0.0), hkl)); + return PoldiPeak_sptr(new PoldiPeak(UncertainValue(dValue), + UncertainValue(0.0), UncertainValue(0.0), + std::move(hkl))); } PoldiPeak_sptr PoldiPeak::create(MillerIndices hkl, UncertainValue dValue, UncertainValue intensity, UncertainValue fwhmRelative) { - return PoldiPeak_sptr(new PoldiPeak(dValue, intensity, fwhmRelative, hkl)); + return PoldiPeak_sptr( + new PoldiPeak(dValue, intensity, fwhmRelative, std::move(hkl))); } bool PoldiPeak::greaterThan(const PoldiPeak_sptr &first, @@ -144,7 +147,7 @@ bool PoldiPeak::lessThan(const PoldiPeak_sptr &first, PoldiPeak::PoldiPeak(UncertainValue d, UncertainValue intensity, UncertainValue fwhm, MillerIndices hkl) - : m_hkl(hkl), m_intensity(intensity) { + : m_hkl(std::move(hkl)), m_intensity(intensity) { setD(d); setFwhm(fwhm, Relative); } diff --git a/Framework/SINQ/src/PoldiUtilities/PoldiPeakCollection.cpp b/Framework/SINQ/src/PoldiUtilities/PoldiPeakCollection.cpp index e5056b714c84a1a11b148a6d8f5ebdfaa634734b..6eb5691a00f8039ad0669f70e3e705253a92b37b 100644 --- a/Framework/SINQ/src/PoldiUtilities/PoldiPeakCollection.cpp +++ b/Framework/SINQ/src/PoldiUtilities/PoldiPeakCollection.cpp @@ -1,14 +1,16 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + -#include "MantidSINQ/PoldiUtilities/PoldiPeakCollection.h" +#include <utility> + #include "MantidAPI/LogManager.h" #include "MantidAPI/TableRow.h" #include "MantidAPI/WorkspaceFactory.h" #include "MantidGeometry/Crystal/PointGroupFactory.h" +#include "MantidSINQ/PoldiUtilities/PoldiPeakCollection.h" #include "MantidGeometry/Crystal/ReflectionGenerator.h" @@ -97,7 +99,7 @@ PoldiPeakCollection::IntensityType PoldiPeakCollection::intensityType() const { void PoldiPeakCollection::setProfileFunctionName( std::string newProfileFunction) { - m_profileFunctionName = newProfileFunction; + m_profileFunctionName = std::move(newProfileFunction); } std::string PoldiPeakCollection::getProfileFunctionName() const { @@ -275,7 +277,7 @@ PoldiPeakCollection::getUnitCellStringFromLog(const LogManager_sptr &tableLog) { std::string PoldiPeakCollection::getStringValueFromLog(const LogManager_sptr &logManager, - std::string valueName) { + const std::string &valueName) { if (logManager->hasProperty(valueName)) { return logManager->getPropertyValueAsType<std::string>(valueName); } @@ -297,7 +299,7 @@ std::string PoldiPeakCollection::intensityTypeToString( PoldiPeakCollection::IntensityType PoldiPeakCollection::intensityTypeFromString(std::string typeString) const { - std::string lowerCaseType(typeString); + std::string lowerCaseType(std::move(typeString)); std::transform(lowerCaseType.begin(), lowerCaseType.end(), lowerCaseType.begin(), ::tolower); diff --git a/Framework/SINQ/src/PoldiUtilities/PoldiResidualCorrelationCore.cpp b/Framework/SINQ/src/PoldiUtilities/PoldiResidualCorrelationCore.cpp index e0d15020744a75171c7c47767154672c0c278681..435870bb4d061b0a5b707c99ec494ff510951687 100644 --- a/Framework/SINQ/src/PoldiUtilities/PoldiResidualCorrelationCore.cpp +++ b/Framework/SINQ/src/PoldiUtilities/PoldiResidualCorrelationCore.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidSINQ/PoldiUtilities/PoldiResidualCorrelationCore.h" #include "MantidKernel/Logger.h" diff --git a/Framework/SINQ/src/PoldiUtilities/PoldiSourceSpectrum.cpp b/Framework/SINQ/src/PoldiUtilities/PoldiSourceSpectrum.cpp index 30644352a81b23e28b592131a5095db35eb2b6c0..ea2be969a91e0c179a498d901e52ad5680fcb820 100644 --- a/Framework/SINQ/src/PoldiUtilities/PoldiSourceSpectrum.cpp +++ b/Framework/SINQ/src/PoldiUtilities/PoldiSourceSpectrum.cpp @@ -1,12 +1,14 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + -#include "MantidSINQ/PoldiUtilities/PoldiSourceSpectrum.h" +#include <utility> + #include "MantidGeometry/Instrument/FitParameter.h" #include "MantidGeometry/Instrument/ParameterMap.h" +#include "MantidSINQ/PoldiUtilities/PoldiSourceSpectrum.h" namespace Mantid { namespace Poldi { @@ -14,12 +16,13 @@ namespace Poldi { using namespace Mantid::Kernel; using namespace Mantid::Geometry; -PoldiSourceSpectrum::PoldiSourceSpectrum(Interpolation spectrum) +PoldiSourceSpectrum::PoldiSourceSpectrum(const Interpolation &spectrum) : m_spectrum(spectrum) {} -PoldiSourceSpectrum::PoldiSourceSpectrum(Instrument_const_sptr poldiInstrument) +PoldiSourceSpectrum::PoldiSourceSpectrum( + const Instrument_const_sptr &poldiInstrument) : m_spectrum() { - setSpectrumFromInstrument(poldiInstrument); + setSpectrumFromInstrument(std::move(poldiInstrument)); } /** Returns the interpolated intensity at the given wavelength @@ -43,7 +46,7 @@ double PoldiSourceSpectrum::intensity(double wavelength) const { *spectrum. */ void PoldiSourceSpectrum::setSpectrumFromInstrument( - Instrument_const_sptr poldiInstrument) { + const Instrument_const_sptr &poldiInstrument) { IComponent_const_sptr source = getSourceComponent(poldiInstrument); Parameter_sptr spectrumParameter = @@ -61,8 +64,8 @@ void PoldiSourceSpectrum::setSpectrumFromInstrument( * @param poldiInstrument :: Instrument with valid POLDI definition * @return Shared pointer to source component */ -IComponent_const_sptr -PoldiSourceSpectrum::getSourceComponent(Instrument_const_sptr poldiInstrument) { +IComponent_const_sptr PoldiSourceSpectrum::getSourceComponent( + const Instrument_const_sptr &poldiInstrument) { IComponent_const_sptr source = poldiInstrument->getComponentByName("source"); if (!source) { @@ -86,7 +89,8 @@ PoldiSourceSpectrum::getSourceComponent(Instrument_const_sptr poldiInstrument) { * @return Shared pointer to Parameter that contains the spectrum. */ Parameter_sptr PoldiSourceSpectrum::getSpectrumParameter( - IComponent_const_sptr source, ParameterMap_sptr instrumentParameterMap) { + const IComponent_const_sptr &source, + const ParameterMap_sptr &instrumentParameterMap) { Parameter_sptr spectrumParameter = instrumentParameterMap->getRecursive( &(*source), "WavelengthDistribution", "fitting"); @@ -107,7 +111,7 @@ Parameter_sptr PoldiSourceSpectrum::getSpectrumParameter( * @param spectrumParameter :: Shared pointer to fitting parameter with lookup *table */ -void PoldiSourceSpectrum::setSpectrum(Parameter_sptr spectrumParameter) { +void PoldiSourceSpectrum::setSpectrum(const Parameter_sptr &spectrumParameter) { if (!spectrumParameter) { throw std::runtime_error("Spectrum parameter pointer is null"); } diff --git a/Framework/SINQ/src/PoldiUtilities/PoldiSpectrumConstantBackground.cpp b/Framework/SINQ/src/PoldiUtilities/PoldiSpectrumConstantBackground.cpp index b8f92b6741f6bffb9426feaf55a72ec46c0ce2bf..8710dbcc098f8c12603f0fd59b61dc156b2b0954 100644 --- a/Framework/SINQ/src/PoldiUtilities/PoldiSpectrumConstantBackground.cpp +++ b/Framework/SINQ/src/PoldiUtilities/PoldiSpectrumConstantBackground.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidSINQ/PoldiUtilities/PoldiSpectrumConstantBackground.h" #include "MantidAPI/FunctionFactory.h" diff --git a/Framework/SINQ/src/PoldiUtilities/PoldiSpectrumDomainFunction.cpp b/Framework/SINQ/src/PoldiUtilities/PoldiSpectrumDomainFunction.cpp index d505029d93c10c753621872f353f8f5122b289de..67ccd0b9a3d061f397ac0f7cb0fe5f42766d9671 100644 --- a/Framework/SINQ/src/PoldiUtilities/PoldiSpectrumDomainFunction.cpp +++ b/Framework/SINQ/src/PoldiUtilities/PoldiSpectrumDomainFunction.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidSINQ/PoldiUtilities/PoldiSpectrumDomainFunction.h" diff --git a/Framework/SINQ/src/PoldiUtilities/PoldiSpectrumLinearBackground.cpp b/Framework/SINQ/src/PoldiUtilities/PoldiSpectrumLinearBackground.cpp index 897e9a5e2a32cb9763e0eb06bc95c890df711692..5bd6ccf67598521ffb03c6dd9614657708a56ee6 100644 --- a/Framework/SINQ/src/PoldiUtilities/PoldiSpectrumLinearBackground.cpp +++ b/Framework/SINQ/src/PoldiUtilities/PoldiSpectrumLinearBackground.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidSINQ/PoldiUtilities/PoldiSpectrumLinearBackground.h" diff --git a/Framework/SINQ/src/PoldiUtilities/PoldiSpectrumPawleyFunction.cpp b/Framework/SINQ/src/PoldiUtilities/PoldiSpectrumPawleyFunction.cpp index e8b11a851e58ce59f4c54e3d5018131308338e7e..7dfd237b311b2d06229897f676a515e16bda0cb7 100644 --- a/Framework/SINQ/src/PoldiUtilities/PoldiSpectrumPawleyFunction.cpp +++ b/Framework/SINQ/src/PoldiUtilities/PoldiSpectrumPawleyFunction.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidSINQ/PoldiUtilities/PoldiSpectrumPawleyFunction.h" #include "MantidAPI/FunctionFactory.h" diff --git a/Framework/SINQ/src/PoldiUtilities/PoldiTimeTransformer.cpp b/Framework/SINQ/src/PoldiUtilities/PoldiTimeTransformer.cpp index 68c10cb7369a6d922e9c985aa4dc644595d30efe..3ed66236c9ff6c76bbf674fd733e63320da6d02a 100644 --- a/Framework/SINQ/src/PoldiUtilities/PoldiTimeTransformer.cpp +++ b/Framework/SINQ/src/PoldiUtilities/PoldiTimeTransformer.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidSINQ/PoldiUtilities/PoldiTimeTransformer.h" #include "boost/make_shared.hpp" diff --git a/Framework/SINQ/src/PoldiUtilities/UncertainValue.cpp b/Framework/SINQ/src/PoldiUtilities/UncertainValue.cpp index 6e608bf10ae514b9fcd19a60074643d82ee3ff5d..61a72254fd817e3d464c02bca495433902354cf8 100644 --- a/Framework/SINQ/src/PoldiUtilities/UncertainValue.cpp +++ b/Framework/SINQ/src/PoldiUtilities/UncertainValue.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidSINQ/PoldiUtilities/UncertainValue.h" #include "boost/format.hpp" diff --git a/Framework/SINQ/src/ProjectMD.cpp b/Framework/SINQ/src/ProjectMD.cpp index 73e39ec2f7f1766478b7d93b485074478222b48b..5036dbc5f360eb826742bff53a0320ba9316356f 100644 --- a/Framework/SINQ/src/ProjectMD.cpp +++ b/Framework/SINQ/src/ProjectMD.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidSINQ/ProjectMD.h" #include "MantidDataObjects/MDHistoWorkspace.h" @@ -89,8 +89,8 @@ void ProjectMD::exec() { // assign the workspace setProperty("OutputWorkspace", outWS); } -void ProjectMD::copyMetaData(Mantid::API::IMDHistoWorkspace_sptr inws, - Mantid::API::IMDHistoWorkspace_sptr outws) { +void ProjectMD::copyMetaData(const Mantid::API::IMDHistoWorkspace_sptr &inws, + const Mantid::API::IMDHistoWorkspace_sptr &outws) { outws->setTitle(inws->getTitle()); ExperimentInfo_sptr info; @@ -109,7 +109,7 @@ void ProjectMD::copyMetaData(Mantid::API::IMDHistoWorkspace_sptr inws, * The documentation actually suggest F77, the code too? * This isolates this from the storage order concern. */ -unsigned int ProjectMD::calcIndex(IMDHistoWorkspace_sptr ws, int dim[]) { +unsigned int ProjectMD::calcIndex(const IMDHistoWorkspace_sptr &ws, int dim[]) { size_t idx = 0; switch (ws->getNumDims()) { case 1: @@ -130,7 +130,7 @@ unsigned int ProjectMD::calcIndex(IMDHistoWorkspace_sptr ws, int dim[]) { return static_cast<unsigned int>(idx); } -double ProjectMD::getValue(IMDHistoWorkspace_sptr ws, int dim[]) { +double ProjectMD::getValue(const IMDHistoWorkspace_sptr &ws, int dim[]) { unsigned int idx = calcIndex(ws, dim); double val = ws->signalAt(idx); // double *a = ws->getSignalArray(); @@ -139,7 +139,8 @@ double ProjectMD::getValue(IMDHistoWorkspace_sptr ws, int dim[]) { // " << dim[1] << "," <<dim[2] <<'\n'; return val; } -void ProjectMD::putValue(IMDHistoWorkspace_sptr ws, int dim[], double value) { +void ProjectMD::putValue(const IMDHistoWorkspace_sptr &ws, int dim[], + double value) { unsigned int idx = calcIndex(ws, dim); // std::cout << "Result index " << idx << " value " << value << " dim= " << // dim[0] << ", " << dim[1] <<", " << dim[2] <<'\n'; @@ -147,8 +148,8 @@ void ProjectMD::putValue(IMDHistoWorkspace_sptr ws, int dim[], double value) { ws->setErrorSquaredAt(idx, value); } -void ProjectMD::sumData(IMDHistoWorkspace_sptr inWS, - IMDHistoWorkspace_sptr outWS, int *sourceDim, +void ProjectMD::sumData(const IMDHistoWorkspace_sptr &inWS, + const IMDHistoWorkspace_sptr &outWS, int *sourceDim, int *targetDim, int targetDimCount, int dimNo, int start, int end, int currentDim) { boost::shared_ptr<const IMDDimension> dimi; diff --git a/Framework/SINQ/src/SINQHMListener.cpp b/Framework/SINQ/src/SINQHMListener.cpp index 835f7cae05aecd707acf974f452e0218a990fb78..58c876d60584a8f56c506c00d1daad52570aaee8 100644 --- a/Framework/SINQ/src/SINQHMListener.cpp +++ b/Framework/SINQ/src/SINQHMListener.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /* * SINQHMListener.cpp @@ -25,6 +25,7 @@ #include <Poco/StreamCopier.h> #include <boost/algorithm/string/trim.hpp> +#include <utility> using namespace Mantid::API; using namespace Mantid::DataObjects; @@ -165,7 +166,7 @@ void SINQHMListener::loadDimensions() { doSpecialDim(); } -std::istream &SINQHMListener::httpRequest(std::string path) { +std::istream &SINQHMListener::httpRequest(const std::string &path) { HTTPRequest req(HTTPRequest::HTTP_GET, path, HTTPMessage::HTTP_1_1); req.setKeepAlive(true); @@ -208,7 +209,7 @@ int SINQHMListener::calculateCAddress(coord_t *pos) { } return result; } -void SINQHMListener::recurseDim(int *data, IMDHistoWorkspace_sptr ws, +void SINQHMListener::recurseDim(int *data, const IMDHistoWorkspace_sptr &ws, int currentDim, coord_t *idx) { if (currentDim == rank) { int Cindex = calculateCAddress(idx); @@ -226,7 +227,7 @@ void SINQHMListener::recurseDim(int *data, IMDHistoWorkspace_sptr ws, } } -void SINQHMListener::readHMData(IMDHistoWorkspace_sptr ws) { +void SINQHMListener::readHMData(const IMDHistoWorkspace_sptr &ws) { int *data = nullptr, length = 1; coord_t *idx; @@ -256,7 +257,7 @@ void SINQHMListener::readHMData(IMDHistoWorkspace_sptr ws) { * why.... */ idx = reinterpret_cast<coord_t *>(malloc(rank * sizeof(coord_t))); - recurseDim(data, ws, 0, idx); + recurseDim(data, std::move(ws), 0, idx); free(data); free(idx); diff --git a/Framework/SINQ/src/SINQTranspose3D.cpp b/Framework/SINQ/src/SINQTranspose3D.cpp index 1f953d91159a72847bcca37c9504654e91d8ef6a..82a4806b5372b335b0afea06db59aa31b8af763a 100644 --- a/Framework/SINQ/src/SINQTranspose3D.cpp +++ b/Framework/SINQ/src/SINQTranspose3D.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidSINQ/SINQTranspose3D.h" #include "MantidDataObjects/MDHistoWorkspace.h" @@ -57,7 +57,7 @@ void SINQTranspose3D::exec() { } } -void SINQTranspose3D::doYXZ(IMDHistoWorkspace_sptr inWS) { +void SINQTranspose3D::doYXZ(const IMDHistoWorkspace_sptr &inWS) { size_t idxIn, idxOut; boost::shared_ptr<const IMDDimension> x, y, z; @@ -92,7 +92,7 @@ void SINQTranspose3D::doYXZ(IMDHistoWorkspace_sptr inWS) { setProperty("OutputWorkspace", outWS); } -void SINQTranspose3D::doXZY(IMDHistoWorkspace_sptr inWS) { +void SINQTranspose3D::doXZY(const IMDHistoWorkspace_sptr &inWS) { size_t idxIn, idxOut; unsigned int xdim, ydim, zdim; @@ -130,7 +130,7 @@ void SINQTranspose3D::doXZY(IMDHistoWorkspace_sptr inWS) { // assign the workspace setProperty("OutputWorkspace", outWS); } -void SINQTranspose3D::doTRICS(IMDHistoWorkspace_sptr inWS) { +void SINQTranspose3D::doTRICS(const IMDHistoWorkspace_sptr &inWS) { size_t idxIn, idxOut; unsigned int xdim, ydim, zdim; @@ -169,7 +169,7 @@ void SINQTranspose3D::doTRICS(IMDHistoWorkspace_sptr inWS) { // assign the workspace setProperty("OutputWorkspace", outWS); } -void SINQTranspose3D::doAMOR(IMDHistoWorkspace_sptr inWS) { +void SINQTranspose3D::doAMOR(const IMDHistoWorkspace_sptr &inWS) { double val; unsigned int xdim, ydim, zdim, idx; @@ -208,8 +208,9 @@ void SINQTranspose3D::doAMOR(IMDHistoWorkspace_sptr inWS) { setProperty("OutputWorkspace", outWS); } -void SINQTranspose3D::copyMetaData(Mantid::API::IMDHistoWorkspace_sptr inws, - Mantid::API::IMDHistoWorkspace_sptr outws) { +void SINQTranspose3D::copyMetaData( + const Mantid::API::IMDHistoWorkspace_sptr &inws, + const Mantid::API::IMDHistoWorkspace_sptr &outws) { outws->setTitle(inws->getTitle()); ExperimentInfo_sptr info; diff --git a/Framework/SINQ/src/SliceMDHisto.cpp b/Framework/SINQ/src/SliceMDHisto.cpp index 54f3981332c55877abae093a6a6f6d29cc2456de..b6e57a138aa2ac59ae986cfa52c15d9a89e46028 100644 --- a/Framework/SINQ/src/SliceMDHisto.cpp +++ b/Framework/SINQ/src/SliceMDHisto.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /** * This algorithm takes a MDHistoWorkspace and allows to select a slab out of @@ -99,8 +99,8 @@ void SliceMDHisto::exec() { setProperty("OutputWorkspace", outWS); } -void SliceMDHisto::cutData(Mantid::API::IMDHistoWorkspace_sptr inWS, - Mantid::API::IMDHistoWorkspace_sptr outWS, +void SliceMDHisto::cutData(const Mantid::API::IMDHistoWorkspace_sptr &inWS, + const Mantid::API::IMDHistoWorkspace_sptr &outWS, Mantid::coord_t *sourceDim, Mantid::coord_t *targetDim, std::vector<int> start, std::vector<int> end, unsigned int dim) { @@ -130,8 +130,9 @@ void SliceMDHisto::cutData(Mantid::API::IMDHistoWorkspace_sptr inWS, } } -void SliceMDHisto::copyMetaData(Mantid::API::IMDHistoWorkspace_sptr inws, - Mantid::API::IMDHistoWorkspace_sptr outws) { +void SliceMDHisto::copyMetaData( + const Mantid::API::IMDHistoWorkspace_sptr &inws, + const Mantid::API::IMDHistoWorkspace_sptr &outws) { outws->setTitle(inws->getTitle()); ExperimentInfo_sptr info; diff --git a/Framework/SINQ/test/CMakeLists.txt b/Framework/SINQ/test/CMakeLists.txt index 0f5edac4af8c6f683cb6977bc5c1fe39444c83a5..d755d9e8f56257b43672ca6c1c486181bdf1d129 100644 --- a/Framework/SINQ/test/CMakeLists.txt +++ b/Framework/SINQ/test/CMakeLists.txt @@ -1,8 +1,7 @@ if(CXXTEST_FOUND) include_directories(SYSTEM ${CXXTEST_INCLUDE_DIR} - ${GMOCK_INCLUDE_DIR} - ${GTEST_INCLUDE_DIR}) +) include_directories(../../CurveFitting/inc ../../MDAlgorithms/inc @@ -26,8 +25,8 @@ if(CXXTEST_FOUND) SINQ CurveFitting ${MANTIDLIBS} - ${GMOCK_LIBRARIES} - ${GTEST_LIBRARIES}) + gmock +) # Test data add_dependencies(PSISINQTest StandardTestData) diff --git a/Framework/SINQ/test/InvertMDDimTest.h b/Framework/SINQ/test/InvertMDDimTest.h index 9bc166b5dc5bc405837ffe61411d9b456c7fb748..5f66a839b9ba7bdb70fdc49b80b5f39fbeb74998 100644 --- a/Framework/SINQ/test/InvertMDDimTest.h +++ b/Framework/SINQ/test/InvertMDDimTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/SINQ/test/LoadFlexiNexusTest.h b/Framework/SINQ/test/LoadFlexiNexusTest.h index c854d4fa8b68c85bd6c2847f7a716b054bf1cad1..951166501ba4a91bbcf5f07bae3ceedd9476d34c 100644 --- a/Framework/SINQ/test/LoadFlexiNexusTest.h +++ b/Framework/SINQ/test/LoadFlexiNexusTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/SINQ/test/MDHistoToWorkspace2DTest.h b/Framework/SINQ/test/MDHistoToWorkspace2DTest.h index 67a9a4a8d768cb8de553c98e4712da38c4a4873a..6f34e1671a544caf61c03a5c7f6e842d28f703c5 100644 --- a/Framework/SINQ/test/MDHistoToWorkspace2DTest.h +++ b/Framework/SINQ/test/MDHistoToWorkspace2DTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/SINQ/test/MillerIndicesIOTest.h b/Framework/SINQ/test/MillerIndicesIOTest.h index 90f4a059367c5c87b656c9948d81830894a9e0ef..bc41bd191f77dbf7dcd3cc48e32c5ecde107e099 100644 --- a/Framework/SINQ/test/MillerIndicesIOTest.h +++ b/Framework/SINQ/test/MillerIndicesIOTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/SINQ/test/MillerIndicesTest.h b/Framework/SINQ/test/MillerIndicesTest.h index fbfc8d6b98492f5fa3fd299ed7ca0f0dec4e12f5..2eaba890a6cfee96f6176ec0019697624fbc6659 100644 --- a/Framework/SINQ/test/MillerIndicesTest.h +++ b/Framework/SINQ/test/MillerIndicesTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/SINQ/test/Poldi2DFunctionTest.h b/Framework/SINQ/test/Poldi2DFunctionTest.h index f8eb0b9250d0e5d6ab7dbba120cadef7308bb33e..28c54a89d4d399ce0d0e4b14a52710a89e489dd4 100644 --- a/Framework/SINQ/test/Poldi2DFunctionTest.h +++ b/Framework/SINQ/test/Poldi2DFunctionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/SINQ/test/PoldiAnalyseResidualsTest.h b/Framework/SINQ/test/PoldiAnalyseResidualsTest.h index e5a5d559b489f72a13210352a7c1ba6940f458bb..8a04cc7ef6b20b39927647ea40fc69e4abcdba8f 100644 --- a/Framework/SINQ/test/PoldiAnalyseResidualsTest.h +++ b/Framework/SINQ/test/PoldiAnalyseResidualsTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/SINQ/test/PoldiAutoCorrelationCoreTest.h b/Framework/SINQ/test/PoldiAutoCorrelationCoreTest.h index e382e5dc5965928c42a1b67e0b23d80778d74cd3..e1ab16b1767a5a2ebd7ba6d0cc9820b040a82070 100644 --- a/Framework/SINQ/test/PoldiAutoCorrelationCoreTest.h +++ b/Framework/SINQ/test/PoldiAutoCorrelationCoreTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/SINQ/test/PoldiBasicChopperTest.h b/Framework/SINQ/test/PoldiBasicChopperTest.h index 067dfd07dcd3d877595ce53b16f865d86dfce386..71727b26de02623702643e098cb1c92903afa554 100644 --- a/Framework/SINQ/test/PoldiBasicChopperTest.h +++ b/Framework/SINQ/test/PoldiBasicChopperTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/SINQ/test/PoldiChopperFactoryTest.h b/Framework/SINQ/test/PoldiChopperFactoryTest.h index 0d1ba36a2a7d54f908878400cb3c2056e3f8b446..4e8e445a5e41b2ea5afa19b2ba7f49613bbb8c13 100644 --- a/Framework/SINQ/test/PoldiChopperFactoryTest.h +++ b/Framework/SINQ/test/PoldiChopperFactoryTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/SINQ/test/PoldiConversionsTest.h b/Framework/SINQ/test/PoldiConversionsTest.h index 7fa8dc3b76ed2ce1bfde209286f6ab59e827f378..df620b3087afa904b7defc84c38c37882fed022f 100644 --- a/Framework/SINQ/test/PoldiConversionsTest.h +++ b/Framework/SINQ/test/PoldiConversionsTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/SINQ/test/PoldiCreatePeaksFromCellTest.h b/Framework/SINQ/test/PoldiCreatePeaksFromCellTest.h index dbc2bd8b1cd2adf09c321c073956efe77844867e..cd808547be3fc7139cdef5a9a49a7a9bf5356507 100644 --- a/Framework/SINQ/test/PoldiCreatePeaksFromCellTest.h +++ b/Framework/SINQ/test/PoldiCreatePeaksFromCellTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/SINQ/test/PoldiDGridTest.h b/Framework/SINQ/test/PoldiDGridTest.h index 690cc56d8ac1f6d280742c27d2cc2f183a491618..7acbe6e061a83ac4fcafb0f9ac947465b8926672 100644 --- a/Framework/SINQ/test/PoldiDGridTest.h +++ b/Framework/SINQ/test/PoldiDGridTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -14,6 +14,7 @@ #include "MantidSINQ/PoldiUtilities/PoldiMockInstrumentHelpers.h" #include <stdexcept> +#include <utility> using ::testing::Return; using namespace Mantid::Poldi; @@ -28,7 +29,8 @@ class TestablePoldiDGrid : public PoldiDGrid { boost::shared_ptr<PoldiAbstractChopper>(), double deltaT = 0.0, std::pair<double, double> wavelengthRange = std::pair<double, double>()) - : PoldiDGrid(detector, chopper, deltaT, wavelengthRange) {} + : PoldiDGrid(std::move(detector), std::move(chopper), deltaT, + wavelengthRange) {} }; class PoldiDGridTest : public CxxTest::TestSuite { diff --git a/Framework/SINQ/test/PoldiDeadWireDecoratorTest.h b/Framework/SINQ/test/PoldiDeadWireDecoratorTest.h index eccfcc8011bb06288dfa6e490c79b43e606c89ed..d61db675a62f8359cc526e966ad027d0fd9b0286 100644 --- a/Framework/SINQ/test/PoldiDeadWireDecoratorTest.h +++ b/Framework/SINQ/test/PoldiDeadWireDecoratorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/SINQ/test/PoldiDetectorDecoratorTest.h b/Framework/SINQ/test/PoldiDetectorDecoratorTest.h index 6bdd31153412b3042ec5f838e94179083bba0c60..30a40b49bec86ec1351260263f8916d844983916 100644 --- a/Framework/SINQ/test/PoldiDetectorDecoratorTest.h +++ b/Framework/SINQ/test/PoldiDetectorDecoratorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/SINQ/test/PoldiDetectorFactoryTest.h b/Framework/SINQ/test/PoldiDetectorFactoryTest.h index 9b9a7f9c719eab2be0b5e381d4d97fbbd1b6e60a..285876372974d7c2d3553d8a9f3fd29492759009 100644 --- a/Framework/SINQ/test/PoldiDetectorFactoryTest.h +++ b/Framework/SINQ/test/PoldiDetectorFactoryTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/SINQ/test/PoldiDetectorTest.h b/Framework/SINQ/test/PoldiDetectorTest.h index f82598e8e5e6e88a074f83ca7c0ae4291afa0055..72a4ba7b6efefd67fe80fd10e9b8c3aab8c9bd16 100644 --- a/Framework/SINQ/test/PoldiDetectorTest.h +++ b/Framework/SINQ/test/PoldiDetectorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/SINQ/test/PoldiFitPeaks1D2Test.h b/Framework/SINQ/test/PoldiFitPeaks1D2Test.h index 1429676b551bba5190d5016996c28222f4cfa1cd..02383969e4347257f7f909dc59a0bfabb4d6a75f 100644 --- a/Framework/SINQ/test/PoldiFitPeaks1D2Test.h +++ b/Framework/SINQ/test/PoldiFitPeaks1D2Test.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/SINQ/test/PoldiFitPeaks1DTest.h b/Framework/SINQ/test/PoldiFitPeaks1DTest.h index 823e7bbbff7342ea2cb3ea59c0e1669b89c94e04..0bb83d2a57533bb8cc428e1c0909cf2b74241486 100644 --- a/Framework/SINQ/test/PoldiFitPeaks1DTest.h +++ b/Framework/SINQ/test/PoldiFitPeaks1DTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/SINQ/test/PoldiFitPeaks2DTest.h b/Framework/SINQ/test/PoldiFitPeaks2DTest.h index 8f583a7538f6dfdef4cd4803ea99574fa152ac52..04b91d797c1a1b94909ed24bf1b69fa0e425407a 100644 --- a/Framework/SINQ/test/PoldiFitPeaks2DTest.h +++ b/Framework/SINQ/test/PoldiFitPeaks2DTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -481,8 +481,8 @@ private: PoldiInstrumentAdapter_sptr m_instrument; PoldiTimeTransformer_sptr m_timeTransformer; - void compareIntensities(PoldiPeakCollection_sptr first, - PoldiPeakCollection_sptr second, + void compareIntensities(const PoldiPeakCollection_sptr &first, + const PoldiPeakCollection_sptr &second, double relativePrecision) { for (size_t i = 0; i < first->peakCount(); ++i) { PoldiPeak_sptr peak = first->peak(i); diff --git a/Framework/SINQ/test/PoldiIndexKnownCompoundsTest.h b/Framework/SINQ/test/PoldiIndexKnownCompoundsTest.h index 4c79cb6974b810f7ebca05c9ba63a1410f118807..045384bd5c828136e6e5a132207d303befd7d6a2 100644 --- a/Framework/SINQ/test/PoldiIndexKnownCompoundsTest.h +++ b/Framework/SINQ/test/PoldiIndexKnownCompoundsTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/SINQ/test/PoldiInstrumentAdapterTest.h b/Framework/SINQ/test/PoldiInstrumentAdapterTest.h index 3bb45f933b3052344644d3350b73e1bd92a64a82..952d1f04869506f2fe873a4b141e6a8878716935 100644 --- a/Framework/SINQ/test/PoldiInstrumentAdapterTest.h +++ b/Framework/SINQ/test/PoldiInstrumentAdapterTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/SINQ/test/PoldiPeakCollectionTest.h b/Framework/SINQ/test/PoldiPeakCollectionTest.h index 5af5428080a855d3f7bb619e31483d3fe1c4b9d1..5dd7d0703cfbc7139d72ea282f9ca83634b7e0ff 100644 --- a/Framework/SINQ/test/PoldiPeakCollectionTest.h +++ b/Framework/SINQ/test/PoldiPeakCollectionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -36,7 +36,7 @@ class TestablePoldiPeakCollection : public PoldiPeakCollection { TestablePoldiPeakCollection() : PoldiPeakCollection() {} - TestablePoldiPeakCollection(TableWorkspace_sptr workspace) + TestablePoldiPeakCollection(const TableWorkspace_sptr &workspace) : PoldiPeakCollection(workspace) {} }; diff --git a/Framework/SINQ/test/PoldiPeakSearchTest.h b/Framework/SINQ/test/PoldiPeakSearchTest.h index 03df428cab2cc8a10068634fd61186b0a08a68c0..e59ff012c212838b178e2bd638162f37d017c832 100644 --- a/Framework/SINQ/test/PoldiPeakSearchTest.h +++ b/Framework/SINQ/test/PoldiPeakSearchTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/SINQ/test/PoldiPeakSummaryTest.h b/Framework/SINQ/test/PoldiPeakSummaryTest.h index 903b39af2ed653e20c892e5b56d816239c2c9ea2..2e0d5c8220899dd18405482eaf6b30c087695cb2 100644 --- a/Framework/SINQ/test/PoldiPeakSummaryTest.h +++ b/Framework/SINQ/test/PoldiPeakSummaryTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/SINQ/test/PoldiPeakTest.h b/Framework/SINQ/test/PoldiPeakTest.h index 1403bdfcd2fc97020e65c929756429cbf178c93a..5cdb3deb3329bfcec39878501efd47cf14462b69 100644 --- a/Framework/SINQ/test/PoldiPeakTest.h +++ b/Framework/SINQ/test/PoldiPeakTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/SINQ/test/PoldiResidualCorrelationCoreTest.h b/Framework/SINQ/test/PoldiResidualCorrelationCoreTest.h index b6b4bdfd14fd118ecaa45c2e01433c9df08e64be..71795b0f5887a212f748c695144219de4a35ff83 100644 --- a/Framework/SINQ/test/PoldiResidualCorrelationCoreTest.h +++ b/Framework/SINQ/test/PoldiResidualCorrelationCoreTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/SINQ/test/PoldiSourceSpectrumTest.h b/Framework/SINQ/test/PoldiSourceSpectrumTest.h index 4f9542d5ef3cca78b8a368e404119345f2bd0618..3a2d2185d484d40d1e962f37f2f1c7e6e7b6491e 100644 --- a/Framework/SINQ/test/PoldiSourceSpectrumTest.h +++ b/Framework/SINQ/test/PoldiSourceSpectrumTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -12,6 +12,7 @@ #include "MantidSINQ/PoldiUtilities/PoldiSourceSpectrum.h" #include <cxxtest/TestSuite.h> #include <stdexcept> +#include <utility> using namespace Mantid::Poldi; using namespace Mantid::Kernel; @@ -97,10 +98,10 @@ private: friend class PoldiSourceSpectrumTest; public: - TestablePoldiSourceSpectrum(Interpolation spectrum = Interpolation()) + TestablePoldiSourceSpectrum(const Interpolation &spectrum = Interpolation()) : PoldiSourceSpectrum(spectrum) {} TestablePoldiSourceSpectrum(Instrument_const_sptr poldiInstrument) - : PoldiSourceSpectrum(poldiInstrument) {} + : PoldiSourceSpectrum(std::move(poldiInstrument)) {} }; }; diff --git a/Framework/SINQ/test/PoldiSpectrumConstantBackgroundTest.h b/Framework/SINQ/test/PoldiSpectrumConstantBackgroundTest.h index 537a265ac0d6f086467f1bc09bd0ec34ecd60bfb..696c33eb62be66753539b40f8ae27d9c08cfdce2 100644 --- a/Framework/SINQ/test/PoldiSpectrumConstantBackgroundTest.h +++ b/Framework/SINQ/test/PoldiSpectrumConstantBackgroundTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/SINQ/test/PoldiSpectrumDomainFunctionTest.h b/Framework/SINQ/test/PoldiSpectrumDomainFunctionTest.h index e32e229383331545c197e8a335af48f2755bcdcb..304c13cff10a954f3d28ba413aec8479de1f104a 100644 --- a/Framework/SINQ/test/PoldiSpectrumDomainFunctionTest.h +++ b/Framework/SINQ/test/PoldiSpectrumDomainFunctionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/SINQ/test/PoldiSpectrumLinearBackgroundTest.h b/Framework/SINQ/test/PoldiSpectrumLinearBackgroundTest.h index a6acd8377e98e8dee3b8c0b4e5d11b1f5133ac74..d7793b1c09961f7ae7c4bc76850822187a9f4d02 100644 --- a/Framework/SINQ/test/PoldiSpectrumLinearBackgroundTest.h +++ b/Framework/SINQ/test/PoldiSpectrumLinearBackgroundTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/SINQ/test/PoldiSpectrumPawleyFunctionTest.h b/Framework/SINQ/test/PoldiSpectrumPawleyFunctionTest.h index 89d84aafcd8cc24faacefa25d91d5957f3a7c79d..cf2ab605e00a0a405de1f936393eb7cfc40cf958 100644 --- a/Framework/SINQ/test/PoldiSpectrumPawleyFunctionTest.h +++ b/Framework/SINQ/test/PoldiSpectrumPawleyFunctionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/SINQ/test/PoldiTimeTransformerTest.h b/Framework/SINQ/test/PoldiTimeTransformerTest.h index 15e96f4bf0c3eb247788a23854626835410e0b1a..fdfa537fa65507c7c2329a6e0aed24b6f7f7cff7 100644 --- a/Framework/SINQ/test/PoldiTimeTransformerTest.h +++ b/Framework/SINQ/test/PoldiTimeTransformerTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/SINQ/test/PoldiTruncateDataTest.h b/Framework/SINQ/test/PoldiTruncateDataTest.h index 1f8d3f7a077250dc3ec876a40cde17eed9440ac3..a5a297c767a013d5abbfb98ae5e01b1c21dd02be 100644 --- a/Framework/SINQ/test/PoldiTruncateDataTest.h +++ b/Framework/SINQ/test/PoldiTruncateDataTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/SINQ/test/ProjectMDTest.h b/Framework/SINQ/test/ProjectMDTest.h index bb847e7da69fa710d81b25049dc7b0a0d31a4f58..be1a7a633842da0b4d2869e042088bfd3f4602e9 100644 --- a/Framework/SINQ/test/ProjectMDTest.h +++ b/Framework/SINQ/test/ProjectMDTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/SINQ/test/SliceMDHistoTest.h b/Framework/SINQ/test/SliceMDHistoTest.h index ed24b3877ef972b0cfd6ab72d27394f5fa3ef85a..d0aa3a6962ee85e3bec2785b41593364a6ebb764 100644 --- a/Framework/SINQ/test/SliceMDHistoTest.h +++ b/Framework/SINQ/test/SliceMDHistoTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/SINQ/test/UncertainValueIOTest.h b/Framework/SINQ/test/UncertainValueIOTest.h index 0f1644fffef05cec767d6475dd7086272e3e83fc..ffc385a08611012121626a299bdbccd34dbba1af 100644 --- a/Framework/SINQ/test/UncertainValueIOTest.h +++ b/Framework/SINQ/test/UncertainValueIOTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/SINQ/test/UncertainValueTest.h b/Framework/SINQ/test/UncertainValueTest.h index b0c5625d3ff80a23cb82e6195951fda2d7173c3a..2a3ea4c2a75985d775aba9c0f2d7069e3026c9e7 100644 --- a/Framework/SINQ/test/UncertainValueTest.h +++ b/Framework/SINQ/test/UncertainValueTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/ScriptRepository/inc/MantidScriptRepository/DllConfig.h b/Framework/ScriptRepository/inc/MantidScriptRepository/DllConfig.h index 075ab63461d0af6165e7b8e75e9122e87a852b15..e75a897d56319179af17cf64bce5670ec04fb691 100644 --- a/Framework/ScriptRepository/inc/MantidScriptRepository/DllConfig.h +++ b/Framework/ScriptRepository/inc/MantidScriptRepository/DllConfig.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/ScriptRepository/inc/MantidScriptRepository/ScriptRepositoryImpl.h b/Framework/ScriptRepository/inc/MantidScriptRepository/ScriptRepositoryImpl.h index 60d363fb1f567c5617095a451c062167f360d992..c6a68c630580f65b3b9b0557221e416839e88b94 100644 --- a/Framework/ScriptRepository/inc/MantidScriptRepository/ScriptRepositoryImpl.h +++ b/Framework/ScriptRepository/inc/MantidScriptRepository/ScriptRepositoryImpl.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -15,7 +15,7 @@ namespace Mantid { namespace API { -void writeJsonFile(const std::string &filename, Json::Value json, +void writeJsonFile(const std::string &filename, const Json::Value &json, const std::string &error); Json::Value readJsonFile(const std::string &filename, const std::string &error); diff --git a/Framework/ScriptRepository/src/ScriptRepositoryImpl.cpp b/Framework/ScriptRepository/src/ScriptRepositoryImpl.cpp index 3ece26d526720bf92f8fb748142510f7fb7ec823..12d7fe2dbf224b8b7bf8a5d16b5a47d1124cfad2 100644 --- a/Framework/ScriptRepository/src/ScriptRepositoryImpl.cpp +++ b/Framework/ScriptRepository/src/ScriptRepositoryImpl.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + // from mantid #include "MantidScriptRepository/ScriptRepositoryImpl.h" @@ -82,7 +82,7 @@ const char *emptyURL = /** Write json object to file */ -void writeJsonFile(const std::string &filename, Json::Value json, +void writeJsonFile(const std::string &filename, const Json::Value &json, const std::string &error) { Poco::FileOutputStream filestream(filename); if (!filestream.good()) { diff --git a/Framework/ScriptRepository/test/CMakeLists.txt b/Framework/ScriptRepository/test/CMakeLists.txt index 8e0c2854a8a366e0075495f7ffdeaffb14d238b1..9872dcb61651de3742ed183e1f861e18f479b694 100644 --- a/Framework/ScriptRepository/test/CMakeLists.txt +++ b/Framework/ScriptRepository/test/CMakeLists.txt @@ -1,8 +1,7 @@ if(CXXTEST_FOUND) include_directories(SYSTEM ${CXXTEST_INCLUDE_DIR} - ${GMOCK_INCLUDE_DIR} - ${GTEST_INCLUDE_DIR}) +) include_directories(../../ScriptRepository/inc) include_directories(../) @@ -17,8 +16,8 @@ if(CXXTEST_FOUND) ScriptRepository ${Boost_LIBRARIES} ${POCO_LIBRARIES} - ${GMOCK_LIBRARIES} - ${GTEST_LIBRARIES}) + gmock +) add_dependencies(FrameworkTests ScriptRepositoryTest) # Add to the 'FrameworkTests' group in VS diff --git a/Framework/ScriptRepository/test/ScriptRepositoryFactoryTest.h b/Framework/ScriptRepository/test/ScriptRepositoryFactoryTest.h index c7d443e6291d0c96d46984086c1a8108323753e6..67fd3190906b59bfe6fdc4e4cdcd7d8fc0902092 100644 --- a/Framework/ScriptRepository/test/ScriptRepositoryFactoryTest.h +++ b/Framework/ScriptRepository/test/ScriptRepositoryFactoryTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/ScriptRepository/test/ScriptRepositoryTestImpl.h b/Framework/ScriptRepository/test/ScriptRepositoryTestImpl.h index 9d25d4e14088f9a13c6d42570dab2e3576cc1e83..93e45055462b5a4843f71e9d91f5ab0183b0a99b 100644 --- a/Framework/ScriptRepository/test/ScriptRepositoryTestImpl.h +++ b/Framework/ScriptRepository/test/ScriptRepositoryTestImpl.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -83,7 +83,8 @@ to simulate changes and new values for the downloading. class ScriptRepositoryImplLocal : public ScriptRepositoryImpl { public: - ScriptRepositoryImplLocal(std::string a = "", std::string b = "") + ScriptRepositoryImplLocal(const std::string &a = "", + const std::string &b = "") : ScriptRepositoryImpl(a, b) { repository_json_content = REPOSITORYJSON; tofconv_readme_content = TOFCONV_README; diff --git a/Framework/TestHelpers/inc/MantidTestHelpers/BinaryOperationMDTestHelper.h b/Framework/TestHelpers/inc/MantidTestHelpers/BinaryOperationMDTestHelper.h index e9e6fca92cc237d38ea84eae093b0369d1c332c3..97ad18fe1e367904d0f6f23e40ae557bea216927 100644 --- a/Framework/TestHelpers/inc/MantidTestHelpers/BinaryOperationMDTestHelper.h +++ b/Framework/TestHelpers/inc/MantidTestHelpers/BinaryOperationMDTestHelper.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /********************************************************************************* * PLEASE READ THIS!!!!!!! @@ -16,17 +16,19 @@ namespace BinaryOperationMDTestHelper { /// Run a binary algorithm. DLLExport Mantid::DataObjects::MDHistoWorkspace_sptr -doTest(std::string algoName, std::string lhs, std::string rhs, - std::string outName, bool succeeds = true, std::string otherProp = "", - std::string otherPropValue = ""); +doTest(const std::string &algoName, const std::string &lhs, + const std::string &rhs, const std::string &outName, bool succeeds = true, + const std::string &otherProp = "", + const std::string &otherPropValue = ""); } // namespace BinaryOperationMDTestHelper namespace UnaryOperationMDTestHelper { /// Run a unary algorithm. DLLExport Mantid::DataObjects::MDHistoWorkspace_sptr -doTest(std::string algoName, std::string inName, std::string outName, - bool succeeds = true, std::string otherProp = "", - std::string otherPropValue = ""); +doTest(const std::string &algoName, const std::string &inName, + const std::string &outName, bool succeeds = true, + const std::string &otherProp = "", + const std::string &otherPropValue = ""); } // namespace UnaryOperationMDTestHelper diff --git a/Framework/TestHelpers/inc/MantidTestHelpers/BoxControllerDummyIO.h b/Framework/TestHelpers/inc/MantidTestHelpers/BoxControllerDummyIO.h index 4d86568c87a798c0876dc25292a60fa72829580f..d8524ac1648756d69cd2429c5604b0945a79f4ce 100644 --- a/Framework/TestHelpers/inc/MantidTestHelpers/BoxControllerDummyIO.h +++ b/Framework/TestHelpers/inc/MantidTestHelpers/BoxControllerDummyIO.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /********************************************************************************* * PLEASE READ THIS!!!!!!! diff --git a/Framework/TestHelpers/inc/MantidTestHelpers/ComponentCreationHelper.h b/Framework/TestHelpers/inc/MantidTestHelpers/ComponentCreationHelper.h index a8cef19596a348ea15a4a269aad8d825cdc90a63..362683a46b8b18c4bd55446f3d1e8cd0bad5a637 100644 --- a/Framework/TestHelpers/inc/MantidTestHelpers/ComponentCreationHelper.h +++ b/Framework/TestHelpers/inc/MantidTestHelpers/ComponentCreationHelper.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /********************************************************************************* * PLEASE READ THIS!!!!!!! @@ -200,7 +200,7 @@ Mantid::Geometry::Instrument_sptr createTestInstrumentCylindrical( void addRectangularBank(Mantid::Geometry::Instrument &testInstrument, int idStart, int pixels, double pixelSpacing, - std::string bankName, + const std::string &bankName, const Mantid::Kernel::V3D &bankPos, const Mantid::Kernel::Quat &bankRot); diff --git a/Framework/TestHelpers/inc/MantidTestHelpers/DataProcessorTestHelper.h b/Framework/TestHelpers/inc/MantidTestHelpers/DataProcessorTestHelper.h index d4cb5026e79f2348b27d4a3a9d8c903ad88ee328..11a86d24311a2f39c7bf22a0c90f66c64d12f841 100644 --- a/Framework/TestHelpers/inc/MantidTestHelpers/DataProcessorTestHelper.h +++ b/Framework/TestHelpers/inc/MantidTestHelpers/DataProcessorTestHelper.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -25,15 +25,15 @@ namespace DataProcessorTestHelper { // Add a property value from a list to the given row data with an optional // prefix -DLLExport void -addPropertyValue(MantidQt::MantidWidgets::DataProcessor::RowData_sptr rowData, - const std::vector<std::string> &list, const size_t index, - const std::string &property, const std::string &prefix = ""); +DLLExport void addPropertyValue( + const MantidQt::MantidWidgets::DataProcessor::RowData_sptr &rowData, + const std::vector<std::string> &list, const size_t index, + const std::string &property, const std::string &prefix = ""); // Add a property value to the given row data -DLLExport void -addPropertyValue(MantidQt::MantidWidgets::DataProcessor::RowData_sptr rowData, - const std::string &property, const std::string &value); +DLLExport void addPropertyValue( + const MantidQt::MantidWidgets::DataProcessor::RowData_sptr &rowData, + const std::string &property, const std::string &value); // Utility to create a row data class from a string list of simple inputs DLLExport MantidQt::MantidWidgets::DataProcessor::RowData_sptr diff --git a/Framework/TestHelpers/inc/MantidTestHelpers/FacilityHelper.h b/Framework/TestHelpers/inc/MantidTestHelpers/FacilityHelper.h index 83aa59d3e3ea4cbd4359d6f86c4b4867fb4fa459..5ec01dfe50f3ceb63981895da652daee6e00701d 100644 --- a/Framework/TestHelpers/inc/MantidTestHelpers/FacilityHelper.h +++ b/Framework/TestHelpers/inc/MantidTestHelpers/FacilityHelper.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /********************************************************************************* * PLEASE READ THIS!!!!!!! diff --git a/Framework/TestHelpers/inc/MantidTestHelpers/FakeObjects.h b/Framework/TestHelpers/inc/MantidTestHelpers/FakeObjects.h index a8ef78b5d2341900547cc8f1188041e6f9503fc4..1b4d7ad274bfdd780b35f3bf4c0ebed7508f94c9 100644 --- a/Framework/TestHelpers/inc/MantidTestHelpers/FakeObjects.h +++ b/Framework/TestHelpers/inc/MantidTestHelpers/FakeObjects.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /********************************************************************************* * PLEASE READ THIS!!!!!!! @@ -728,8 +728,9 @@ public: throw std::runtime_error("Not Implemented"); } - MDHistoWorkspaceTester(MDHistoDimension_sptr dimX, MDHistoDimension_sptr dimY, - MDHistoDimension_sptr dimZ) { + MDHistoWorkspaceTester(const MDHistoDimension_sptr &dimX, + const MDHistoDimension_sptr &dimY, + const MDHistoDimension_sptr &dimZ) { std::vector<IMDDimension_sptr> dimensions{dimX, dimY, dimZ}; initGeometry(dimensions); } diff --git a/Framework/TestHelpers/inc/MantidTestHelpers/FileComparisonHelper.h b/Framework/TestHelpers/inc/MantidTestHelpers/FileComparisonHelper.h index a1292cc407b3d0107b294c8c30cd519bea505f74..5eb3835ce8fc80cb5c45adf08429aa582b4bb927 100644 --- a/Framework/TestHelpers/inc/MantidTestHelpers/FileComparisonHelper.h +++ b/Framework/TestHelpers/inc/MantidTestHelpers/FileComparisonHelper.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/TestHelpers/inc/MantidTestHelpers/FileResource.h b/Framework/TestHelpers/inc/MantidTestHelpers/FileResource.h index bb73e945ccc9b288e90ee1ddf3001afce4eb1708..1f9d22583cd4bf8bda6a017d1c7a247418b8040d 100644 --- a/Framework/TestHelpers/inc/MantidTestHelpers/FileResource.h +++ b/Framework/TestHelpers/inc/MantidTestHelpers/FileResource.h @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - /** RAII: Gives a clean file destination and removes the file when * handle is out of scope. Must be stack allocated. * diff --git a/Framework/TestHelpers/inc/MantidTestHelpers/FunctionCreationHelper.h b/Framework/TestHelpers/inc/MantidTestHelpers/FunctionCreationHelper.h index e76ebd8f41ee3cb953578ef57377dda6dc27cbdd..c381acee8f0685273b7327cdbe9c9a5eef6e3c63 100644 --- a/Framework/TestHelpers/inc/MantidTestHelpers/FunctionCreationHelper.h +++ b/Framework/TestHelpers/inc/MantidTestHelpers/FunctionCreationHelper.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/TestHelpers/inc/MantidTestHelpers/IndirectFitDataCreationHelper.h b/Framework/TestHelpers/inc/MantidTestHelpers/IndirectFitDataCreationHelper.h index 699a255c46d0716dd11e07da160d2947be1c4f99..74d76089c79b63756c3fd4f830c54f5bd764a07b 100644 --- a/Framework/TestHelpers/inc/MantidTestHelpers/IndirectFitDataCreationHelper.h +++ b/Framework/TestHelpers/inc/MantidTestHelpers/IndirectFitDataCreationHelper.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/TestHelpers/inc/MantidTestHelpers/InstrumentCreationHelper.h b/Framework/TestHelpers/inc/MantidTestHelpers/InstrumentCreationHelper.h index 2979476b1f7b91473c88f8c804c59cc8361d482b..be57e0c807179649d815488255705562c8381a5e 100644 --- a/Framework/TestHelpers/inc/MantidTestHelpers/InstrumentCreationHelper.h +++ b/Framework/TestHelpers/inc/MantidTestHelpers/InstrumentCreationHelper.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/TestHelpers/inc/MantidTestHelpers/JSONGeometryParserTestHelper.h b/Framework/TestHelpers/inc/MantidTestHelpers/JSONGeometryParserTestHelper.h index afecbffe757184dd12b23d00367209ae73a24aa4..7155ead333ae893c2995e5b3c77e5e1a595dae1c 100644 --- a/Framework/TestHelpers/inc/MantidTestHelpers/JSONGeometryParserTestHelper.h +++ b/Framework/TestHelpers/inc/MantidTestHelpers/JSONGeometryParserTestHelper.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/TestHelpers/inc/MantidTestHelpers/MDAlgorithmsTestHelper.h b/Framework/TestHelpers/inc/MantidTestHelpers/MDAlgorithmsTestHelper.h index 79f1285ec6497caebd86755712ebf9de57bffaa0..87b06da6f4330d6e32d8ccef0e3781770ed5d44c 100644 --- a/Framework/TestHelpers/inc/MantidTestHelpers/MDAlgorithmsTestHelper.h +++ b/Framework/TestHelpers/inc/MantidTestHelpers/MDAlgorithmsTestHelper.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /********************************************************************************* * PLEASE READ THIS!!!!!!! diff --git a/Framework/TestHelpers/inc/MantidTestHelpers/MDEventsTestHelper.h b/Framework/TestHelpers/inc/MantidTestHelpers/MDEventsTestHelper.h index 178be8a8971e5c2dae94f2c55ddb7ee8340b8dc2..bbeab78161e64ea1af49996b81e75626bcb38acb 100644 --- a/Framework/TestHelpers/inc/MantidTestHelpers/MDEventsTestHelper.h +++ b/Framework/TestHelpers/inc/MantidTestHelpers/MDEventsTestHelper.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /********************************************************************************* * PLEASE READ THIS!!!!!!! @@ -38,8 +38,8 @@ createOutputWorkspace(size_t splitInto) { template <typename MDE, size_t nd> void addMDDimensions( boost::shared_ptr<Mantid::DataObjects::MDEventWorkspace<MDE, nd>> out, - Mantid::coord_t min, Mantid::coord_t max, std::string axisNameFormat, - std::string axisIdFormat) { + Mantid::coord_t min, Mantid::coord_t max, const std::string &axisNameFormat, + const std::string &axisIdFormat) { // Create MDFrame of General Frame type Mantid::Geometry::GeneralFrame frame( @@ -64,8 +64,8 @@ template <typename MDE, size_t nd> void addMDDimensionsWithFrames( boost::shared_ptr<Mantid::DataObjects::MDEventWorkspace<MDE, nd>> out, Mantid::coord_t min, Mantid::coord_t max, - const Mantid::Geometry::MDFrame &frame, std::string axisNameFormat, - std::string axisIdFormat) { + const Mantid::Geometry::MDFrame &frame, const std::string &axisNameFormat, + const std::string &axisIdFormat) { for (size_t d = 0; d < nd; d++) { char name[200]; sprintf(name, axisNameFormat.c_str(), d); @@ -85,7 +85,7 @@ void addMDDimensionsWithIndividualFrames( boost::shared_ptr<Mantid::DataObjects::MDEventWorkspace<MDE, nd>> out, Mantid::coord_t min, Mantid::coord_t max, const std::vector<Mantid::Geometry::MDFrame_sptr> &frame, - std::string axisNameFormat, std::string axisIdFormat) { + const std::string &axisNameFormat, const std::string &axisIdFormat) { for (size_t d = 0; d < nd; d++) { char name[200]; sprintf(name, axisNameFormat.c_str(), d); @@ -172,17 +172,17 @@ makeFakeMDHistoWorkspace(double signal, size_t numDims, size_t numBins = 10, Mantid::DataObjects::MDHistoWorkspace_sptr makeFakeMDHistoWorkspaceWithMDFrame( double signal, size_t numDims, const Mantid::Geometry::MDFrame &frame, size_t numBins = 10, coord_t max = 10.0, double errorSquared = 1.0, - std::string name = "", double numEvents = 1.0); + const std::string &name = "", double numEvents = 1.0); /// More general fake n-dimensionsal MDHistoWorkspace Mantid::DataObjects::MDHistoWorkspace_sptr makeFakeMDHistoWorkspaceGeneral( size_t numDims, double signal, double errorSquared, size_t *numBins, - coord_t *min, coord_t *max, std::string name = ""); + coord_t *min, coord_t *max, const std::string &name = ""); /// More general fake n-dimensionsal MDHistoWorkspace Mantid::DataObjects::MDHistoWorkspace_sptr makeFakeMDHistoWorkspaceGeneral( size_t numDims, double signal, double errorSquared, size_t *numBins, coord_t *min, coord_t *max, std::vector<std::string> names, - std::string name = ""); + const std::string &name = ""); //------------------------------------------------------------------------------------- /** Create a test MDEventWorkspace<nd> . Dimensions are names Axis0, Axis1, etc. @@ -202,7 +202,7 @@ Mantid::DataObjects::MDHistoWorkspace_sptr makeFakeMDHistoWorkspaceGeneral( template <typename MDE, size_t nd> boost::shared_ptr<Mantid::DataObjects::MDEventWorkspace<MDE, nd>> makeAnyMDEW(size_t splitInto, coord_t min, coord_t max, - size_t numEventsPerBox = 0, std::string wsName = "", + size_t numEventsPerBox = 0, const std::string &wsName = "", std::string axisNameFormat = "Axis%d", std::string axisIdFormat = "Axis%d") { // Create bare workspace @@ -242,7 +242,7 @@ boost::shared_ptr<Mantid::DataObjects::MDEventWorkspace<MDE, nd>> makeAnyMDEWWithIndividualFrames( size_t splitInto, coord_t min, coord_t max, std::vector<Mantid::Geometry::MDFrame_sptr> frames, - size_t numEventsPerBox = 0, std::string wsName = "", + size_t numEventsPerBox = 0, const std::string &wsName = "", std::string axisNameFormat = "Axis%d", std::string axisIdFormat = "Axis%d") { // Create bare workspace @@ -283,7 +283,8 @@ template <typename MDE, size_t nd> boost::shared_ptr<Mantid::DataObjects::MDEventWorkspace<MDE, nd>> makeAnyMDEWWithFrames(size_t splitInto, coord_t min, coord_t max, const Mantid::Geometry::MDFrame &frame, - size_t numEventsPerBox = 0, std::string wsName = "", + size_t numEventsPerBox = 0, + const std::string &wsName = "", std::string axisNameFormat = "Axis%d", std::string axisIdFormat = "Axis%d") { // Create bare workspace @@ -499,7 +500,7 @@ static void extents_match(MDBOX box, size_t dim, double min, double max) { TSM_ASSERT_DELTA(dim, box->getExtents(dim).getMax(), max, 1e-6); } -void checkAndDeleteFile(std::string filename); +void checkAndDeleteFile(const std::string &filename); //===================================================================================== //===================================== TEST METHODS diff --git a/Framework/TestHelpers/inc/MantidTestHelpers/MultiDomainFunctionHelper.h b/Framework/TestHelpers/inc/MantidTestHelpers/MultiDomainFunctionHelper.h index 0aae0e60b62d1c043ce3501cd39033186edc0172..a45df9fd51dc6453618a204e67a4165215f859d2 100644 --- a/Framework/TestHelpers/inc/MantidTestHelpers/MultiDomainFunctionHelper.h +++ b/Framework/TestHelpers/inc/MantidTestHelpers/MultiDomainFunctionHelper.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/TestHelpers/inc/MantidTestHelpers/MuonGroupingXMLHelper.h b/Framework/TestHelpers/inc/MantidTestHelpers/MuonGroupingXMLHelper.h index 1409dccf4f379de6158fb08f47f23218d06fdd26..16ce96a552a5e3adc8f7ff99c3edc007b026d26e 100644 --- a/Framework/TestHelpers/inc/MantidTestHelpers/MuonGroupingXMLHelper.h +++ b/Framework/TestHelpers/inc/MantidTestHelpers/MuonGroupingXMLHelper.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/TestHelpers/inc/MantidTestHelpers/MuonWorkspaceCreationHelper.h b/Framework/TestHelpers/inc/MantidTestHelpers/MuonWorkspaceCreationHelper.h index fdbcc6a8e8fa442d016b037dd6d2d163eae8c0ec..2ab74978af4dba52fcb36992bc5be4e0da1cf428 100644 --- a/Framework/TestHelpers/inc/MantidTestHelpers/MuonWorkspaceCreationHelper.h +++ b/Framework/TestHelpers/inc/MantidTestHelpers/MuonWorkspaceCreationHelper.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/TestHelpers/inc/MantidTestHelpers/NexusFileReader.h b/Framework/TestHelpers/inc/MantidTestHelpers/NexusFileReader.h index 8af546dc9073c97a7f3febf37f47f87d509ea1d1..519febe4c98b3b1be20adb12dda0ead3bb04efc8 100644 --- a/Framework/TestHelpers/inc/MantidTestHelpers/NexusFileReader.h +++ b/Framework/TestHelpers/inc/MantidTestHelpers/NexusFileReader.h @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #pragma once #include "MantidNexusGeometry/H5ForwardCompatibility.h" @@ -122,7 +121,7 @@ public: // read a multidimensional dataset and returns vector containing the data template <typename T> std::vector<T> readDataSetMultidimensional(FullNXPath &pathToGroup, - std::string dataSetName) { + const std::string &dataSetName) { std::vector<T> dataInFile; @@ -300,7 +299,7 @@ public: return false; } - bool hasDataset(const std::string dsetName, const FullNXPath &pathToGroup) { + bool hasDataset(const std::string &dsetName, const FullNXPath &pathToGroup) { H5::Group parentGroup = openfullH5Path(pathToGroup); @@ -374,7 +373,7 @@ public: } bool hasAttributeInDataSet( - const std::string dataSetName, const std::string &attrName, + const std::string &dataSetName, const std::string &attrName, const std::string &attrVal, const FullNXPath &pathToGroup /*where the dataset lives*/) { @@ -388,7 +387,7 @@ public: return attributeValue == attrVal; } - bool hasNXAttributeInDataSet(const std::string dataSetName, + bool hasNXAttributeInDataSet(const std::string &dataSetName, const std::string &attrVal, const FullNXPath &pathToGroup) { H5::Attribute attribute; diff --git a/Framework/TestHelpers/inc/MantidTestHelpers/NexusGeometryTestHelpers.h b/Framework/TestHelpers/inc/MantidTestHelpers/NexusGeometryTestHelpers.h index c0e7ee99cd7767acf5b6da7501190d5618eff27c..554a017b455e586ebead20a4cec878d99216e278 100644 --- a/Framework/TestHelpers/inc/MantidTestHelpers/NexusGeometryTestHelpers.h +++ b/Framework/TestHelpers/inc/MantidTestHelpers/NexusGeometryTestHelpers.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/TestHelpers/inc/MantidTestHelpers/NexusTestHelper.h b/Framework/TestHelpers/inc/MantidTestHelpers/NexusTestHelper.h index 32ed327aaf7780f448022badc8a47862be8afbb0..900f65b3b5f68cd432ab428d3e6700f337584772 100644 --- a/Framework/TestHelpers/inc/MantidTestHelpers/NexusTestHelper.h +++ b/Framework/TestHelpers/inc/MantidTestHelpers/NexusTestHelper.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /********************************************************************************* * PLEASE READ THIS!!!!!!! diff --git a/Framework/TestHelpers/inc/MantidTestHelpers/ONCatHelper.h b/Framework/TestHelpers/inc/MantidTestHelpers/ONCatHelper.h index 31d39e0c82ffb590488cad41525ecc2c3302153d..104cb3e9076e9d2281ec6d1338193b48fab83514 100644 --- a/Framework/TestHelpers/inc/MantidTestHelpers/ONCatHelper.h +++ b/Framework/TestHelpers/inc/MantidTestHelpers/ONCatHelper.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/TestHelpers/inc/MantidTestHelpers/ParallelAlgorithmCreation.h b/Framework/TestHelpers/inc/MantidTestHelpers/ParallelAlgorithmCreation.h index fdcee9bc19a1f2db06e13a980ae6a4ab70ac9953..64f3dcb4cbb10718f6c15608f32119980a938d44 100644 --- a/Framework/TestHelpers/inc/MantidTestHelpers/ParallelAlgorithmCreation.h +++ b/Framework/TestHelpers/inc/MantidTestHelpers/ParallelAlgorithmCreation.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/TestHelpers/inc/MantidTestHelpers/ParallelRunner.h b/Framework/TestHelpers/inc/MantidTestHelpers/ParallelRunner.h index eb9aae1f373af624960f397298514696081af470..d4063d09163f4bb78570332503505ae9cefe6ca7 100644 --- a/Framework/TestHelpers/inc/MantidTestHelpers/ParallelRunner.h +++ b/Framework/TestHelpers/inc/MantidTestHelpers/ParallelRunner.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/TestHelpers/inc/MantidTestHelpers/ReflectometryHelper.h b/Framework/TestHelpers/inc/MantidTestHelpers/ReflectometryHelper.h index d96520315ccf85616eaa1838e74b53c3af75fed5..920283ad67428b0fcf89d34bd994561a38592a76 100644 --- a/Framework/TestHelpers/inc/MantidTestHelpers/ReflectometryHelper.h +++ b/Framework/TestHelpers/inc/MantidTestHelpers/ReflectometryHelper.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/TestHelpers/inc/MantidTestHelpers/SANSInstrumentCreationHelper.h b/Framework/TestHelpers/inc/MantidTestHelpers/SANSInstrumentCreationHelper.h index a43a15093f88022ff87d706838d7ca72221ca1e0..65ca02b5c5c6a78cbf1c7f1d7d84bd4527d2e0b4 100644 --- a/Framework/TestHelpers/inc/MantidTestHelpers/SANSInstrumentCreationHelper.h +++ b/Framework/TestHelpers/inc/MantidTestHelpers/SANSInstrumentCreationHelper.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /********************************************************************************* * PLEASE READ THIS!!!!!!! @@ -31,14 +31,14 @@ public: * @param workspace: name of the workspace to be created. */ static Mantid::DataObjects::Workspace2D_sptr - createSANSInstrumentWorkspace(std::string workspace); + createSANSInstrumentWorkspace(const std::string &workspace); /** Run the Child Algorithm LoadInstrument (as for LoadRaw) * @param inst_name :: The name written in the Nexus file * @param workspace :: The workspace to insert the instrument into */ static void runLoadInstrument(const std::string &inst_name, - Mantid::DataObjects::Workspace2D_sptr workspace); + const Mantid::DataObjects::Workspace2D_sptr &workspace); /** * Populate spectra mapping to detector IDs @@ -48,6 +48,6 @@ public: * @param nybins: number of bins in Y */ static void - runLoadMappingTable(Mantid::DataObjects::Workspace2D_sptr workspace, + runLoadMappingTable(const Mantid::DataObjects::Workspace2D_sptr &workspace, int nxbins, int nybins); }; diff --git a/Framework/TestHelpers/inc/MantidTestHelpers/ScopedFileHelper.h b/Framework/TestHelpers/inc/MantidTestHelpers/ScopedFileHelper.h index 07d6aec3c8f69d0d15f7d581ccf3021f57ae9ed8..e47d588ed904a01db6e4ac53ae23d7a73f192622 100644 --- a/Framework/TestHelpers/inc/MantidTestHelpers/ScopedFileHelper.h +++ b/Framework/TestHelpers/inc/MantidTestHelpers/ScopedFileHelper.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once //------------------------------------------------------------------------------ diff --git a/Framework/TestHelpers/inc/MantidTestHelpers/SingleCrystalDiffractionTestHelper.h b/Framework/TestHelpers/inc/MantidTestHelpers/SingleCrystalDiffractionTestHelper.h index 1ea977a92de833c08f317e0c1745289f28c00023..2645d3b0e6f4103351cf746fd2dffe05d3bcf1cd 100644 --- a/Framework/TestHelpers/inc/MantidTestHelpers/SingleCrystalDiffractionTestHelper.h +++ b/Framework/TestHelpers/inc/MantidTestHelpers/SingleCrystalDiffractionTestHelper.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/TestHelpers/inc/MantidTestHelpers/TearDownWorld.h b/Framework/TestHelpers/inc/MantidTestHelpers/TearDownWorld.h index 0ce50096ab621243bb5780cd254721b5c4bafde8..38dd1e125a9bc7540f9a0590181f69aa05127976 100644 --- a/Framework/TestHelpers/inc/MantidTestHelpers/TearDownWorld.h +++ b/Framework/TestHelpers/inc/MantidTestHelpers/TearDownWorld.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/TestHelpers/inc/MantidTestHelpers/WorkspaceCreationHelper.h b/Framework/TestHelpers/inc/MantidTestHelpers/WorkspaceCreationHelper.h index 34c40c87105c130e9bca7bd4642f75666ae269b2..7d1886783063a0b3b48b0c927f80b9d6e6ca00e4 100644 --- a/Framework/TestHelpers/inc/MantidTestHelpers/WorkspaceCreationHelper.h +++ b/Framework/TestHelpers/inc/MantidTestHelpers/WorkspaceCreationHelper.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /********************************************************************************* * PLEASE READ THIS!!!!!!! @@ -170,6 +170,13 @@ Mantid::DataObjects::Workspace2D_sptr create2DWorkspaceBinned(size_t nhist, size_t numVals, double x0 = 0.0, double deltax = 1.0); +/** Create a 2D workspace with this many point-histograms and bins. + * Filled with Y = 2.0 and E = M_SQRT2 + */ +Mantid::DataObjects::Workspace2D_sptr +create2DWorkspacePoints(size_t nhist, size_t numVals, double x0 = 0.0, + double deltax = 1.0); + /** Create a 2D workspace with this many histograms and bins. The bins are * assumed to be non-uniform and given by the input array * Filled with Y = 2.0 and E = sqrt(2.0)w @@ -227,7 +234,7 @@ create2DWorkspaceFromFunction(fT yFunc, int nSpec, double x0, double x1, } /// Add random noise to the signalcreate2DWorkspaceWithFullInstrument -void addNoise(Mantid::API::MatrixWorkspace_sptr ws, double noise, +void addNoise(const Mantid::API::MatrixWorkspace_sptr &ws, double noise, const double lower = -0.5, const double upper = 0.5); /// Create a test workspace with a fully defined instrument. @@ -298,7 +305,8 @@ createWorkspaceSingleValue(double value); Mantid::DataObjects::WorkspaceSingleValue_sptr createWorkspaceSingleValueWithError(double value, double error); /** Perform some finalization on event workspace stuff */ -void eventWorkspace_Finalize(Mantid::DataObjects::EventWorkspace_sptr ew); +void eventWorkspace_Finalize( + const Mantid::DataObjects::EventWorkspace_sptr &ew); /** Create event workspace with: * 500 pixels * 1000 histogrammed bins. @@ -341,22 +349,23 @@ Mantid::API::MatrixWorkspace_sptr createGroupedWorkspace2DWithRingsAndBoxes( size_t RootOfNumHist = 10, int numBins = 10, double binDelta = 1.0); // not strictly creating a workspace, but really helpful to see what one // contains -void displayDataY(Mantid::API::MatrixWorkspace_const_sptr ws); +void displayDataY(const Mantid::API::MatrixWorkspace_const_sptr &ws); // not strictly creating a workspace, but really helpful to see what one // contains -void displayData(Mantid::API::MatrixWorkspace_const_sptr ws); +void displayData(const Mantid::API::MatrixWorkspace_const_sptr &ws); // not strictly creating a workspace, but really helpful to see what one // contains -void displayDataX(Mantid::API::MatrixWorkspace_const_sptr ws); +void displayDataX(const Mantid::API::MatrixWorkspace_const_sptr &ws); // not strictly creating a workspace, but really helpful to see what one // contains -void displayDataE(Mantid::API::MatrixWorkspace_const_sptr ws); +void displayDataE(const Mantid::API::MatrixWorkspace_const_sptr &ws); -void addTSPEntry(Mantid::API::Run &runInfo, std::string name, double val); -void setOrientedLattice(Mantid::API::MatrixWorkspace_sptr ws, double a, +void addTSPEntry(Mantid::API::Run &runInfo, const std::string &name, + double val); +void setOrientedLattice(const Mantid::API::MatrixWorkspace_sptr &ws, double a, double b, double c); -void setGoniometer(Mantid::API::MatrixWorkspace_sptr ws, double phi, double chi, - double omega); +void setGoniometer(const Mantid::API::MatrixWorkspace_sptr &ws, double phi, + double chi, double omega); // create workspace which should be result of homering (transform to energy in // inelastic) @@ -371,9 +380,9 @@ Mantid::API::MatrixWorkspace_sptr createProcessedInelasticWS( const std::vector<double> &azimutal, size_t numBins = 4, double Emin = -10, double Emax = 10, double Ei = 11); -Mantid::DataObjects::EventWorkspace_sptr -createEventWorkspace3(Mantid::DataObjects::EventWorkspace_const_sptr sourceWS, - std::string wsname, Mantid::API::Algorithm *alg); +Mantid::DataObjects::EventWorkspace_sptr createEventWorkspace3( + const Mantid::DataObjects::EventWorkspace_const_sptr &sourceWS, + const std::string &wsname, Mantid::API::Algorithm *alg); /// Function to create a fixed RebinnedOutput workspace Mantid::DataObjects::RebinnedOutput_sptr createRebinnedOutputWorkspace(); @@ -396,7 +405,8 @@ createPeaksWorkspace(const int numPeaks, /**Build table workspace with preprocessed detectors for existing workspace with * instrument */ boost::shared_ptr<Mantid::DataObjects::TableWorkspace> -buildPreprocessedDetectorsWorkspace(Mantid::API::MatrixWorkspace_sptr ws); +buildPreprocessedDetectorsWorkspace( + const Mantid::API::MatrixWorkspace_sptr &ws); // create range of angular detectors positions void create2DAngles(std::vector<double> &L2, std::vector<double> &polar, std::vector<double> &azim, size_t nPolar = 10, @@ -433,7 +443,7 @@ create2DWorkspaceWithReflectometryInstrumentMultiDetector( const int nSpectra = 4, const int nBins = 20, const double deltaX = 5000.0); void createInstrumentForWorkspaceWithDistances( - Mantid::API::MatrixWorkspace_sptr workspace, + const Mantid::API::MatrixWorkspace_sptr &workspace, const Mantid::Kernel::V3D &samplePosition, const Mantid::Kernel::V3D &sourcePosition, const std::vector<Mantid::Kernel::V3D> &detectorPositions); diff --git a/Framework/TestHelpers/src/BinaryOperationMDTestHelper.cpp b/Framework/TestHelpers/src/BinaryOperationMDTestHelper.cpp index 4318aa58c1823399f3171485351981c471b13e64..bce53656bb83b9d81c3d0be4fd313c1451eb481e 100644 --- a/Framework/TestHelpers/src/BinaryOperationMDTestHelper.cpp +++ b/Framework/TestHelpers/src/BinaryOperationMDTestHelper.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /********************************************************************************* * PLEASE READ THIS!!!!!!! @@ -59,10 +59,11 @@ void setUpBinaryOperationMDTestHelper() { } /// Run a binary algorithm. -MDHistoWorkspace_sptr doTest(std::string algoName, std::string lhs, - std::string rhs, std::string outName, - bool succeeds, std::string otherProp, - std::string otherPropValue) { +MDHistoWorkspace_sptr doTest(const std::string &algoName, + const std::string &lhs, const std::string &rhs, + const std::string &outName, bool succeeds, + const std::string &otherProp, + const std::string &otherPropValue) { setUpBinaryOperationMDTestHelper(); IAlgorithm *alg = FrameworkManager::Instance().createAlgorithm(algoName); @@ -94,10 +95,11 @@ MDHistoWorkspace_sptr doTest(std::string algoName, std::string lhs, namespace UnaryOperationMDTestHelper { -MDHistoWorkspace_sptr doTest(std::string algoName, std::string inName, - std::string outName, bool succeeds, - std::string otherProp, - std::string otherPropValue) { +MDHistoWorkspace_sptr doTest(const std::string &algoName, + const std::string &inName, + const std::string &outName, bool succeeds, + const std::string &otherProp, + const std::string &otherPropValue) { MDHistoWorkspace_sptr histo = MDEventsTestHelper::makeFakeMDHistoWorkspace(2.0, 2, 5, 10.0, 2.0); IMDEventWorkspace_sptr event = diff --git a/Framework/TestHelpers/src/BoxControllerDummyIO.cpp b/Framework/TestHelpers/src/BoxControllerDummyIO.cpp index a97ddc0b5ee3775fa20c354784c5ec4b15cfdb7e..2f0455a1d9b9e75c47e695208c3dffd5e87f43ec 100644 --- a/Framework/TestHelpers/src/BoxControllerDummyIO.cpp +++ b/Framework/TestHelpers/src/BoxControllerDummyIO.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /********************************************************************************* * PLEASE READ THIS!!!!!!! diff --git a/Framework/TestHelpers/src/ComponentCreationHelper.cpp b/Framework/TestHelpers/src/ComponentCreationHelper.cpp index 1ef4ed99191063b4fae820db778023406361e47d..b40c9378213386232c7a00fa746ee79542f9d7d0 100644 --- a/Framework/TestHelpers/src/ComponentCreationHelper.cpp +++ b/Framework/TestHelpers/src/ComponentCreationHelper.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /********************************************************************************* * PLEASE READ THIS!!!!!!! @@ -531,7 +531,7 @@ createCylInstrumentWithDetInGivenPositions(const std::vector<double> &L2, //---------------------------------------------------------------------------------------------- void addRectangularBank(Instrument &testInstrument, int idStart, int pixels, - double pixelSpacing, std::string bankName, + double pixelSpacing, const std::string &bankName, const V3D &bankPos, const Quat &bankRot) { const double cylRadius(pixelSpacing / 2); diff --git a/Framework/TestHelpers/src/DataProcessorTestHelper.cpp b/Framework/TestHelpers/src/DataProcessorTestHelper.cpp index 9657684ef58fbf6648a01b2eb8aa321f942f1374..e8074c49288d743cc76fdc1b6d92b3eb640c6bc3 100644 --- a/Framework/TestHelpers/src/DataProcessorTestHelper.cpp +++ b/Framework/TestHelpers/src/DataProcessorTestHelper.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidTestHelpers/DataProcessorTestHelper.h" #include "MantidQtWidgets/Common/DataProcessorUI/TreeData.h" @@ -14,7 +14,7 @@ namespace DataProcessorTestHelper { /* Add a property value from a list to the given row data with an optional * prefix */ -void addPropertyValue(RowData_sptr rowData, +void addPropertyValue(const RowData_sptr &rowData, const std::vector<std::string> &list, const size_t index, const std::string &property, const std::string &prefix) { if (index >= list.size() || list[index].empty()) @@ -28,7 +28,7 @@ void addPropertyValue(RowData_sptr rowData, /* Add a property value to the given row data */ -void addPropertyValue(RowData_sptr rowData, const std::string &property, +void addPropertyValue(const RowData_sptr &rowData, const std::string &property, const std::string &value) { // Set the value and preprocessed value to the given value rowData->setOptionValue(property, value); diff --git a/Framework/TestHelpers/src/FakeObjects.cpp b/Framework/TestHelpers/src/FakeObjects.cpp index 78f35964ec2b91c7f6076aac25dc3a54f5003b52..99781d668fdee6756562867588c5d95b97a69859 100644 --- a/Framework/TestHelpers/src/FakeObjects.cpp +++ b/Framework/TestHelpers/src/FakeObjects.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidTestHelpers/FakeObjects.h" diff --git a/Framework/TestHelpers/src/FileComparisonHelper.cpp b/Framework/TestHelpers/src/FileComparisonHelper.cpp index 49bfe11b16a5f738852ead73a39daf790d78977a..99433616905935f1402d01b7888cff7c0522b814 100644 --- a/Framework/TestHelpers/src/FileComparisonHelper.cpp +++ b/Framework/TestHelpers/src/FileComparisonHelper.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidTestHelpers/FileComparisonHelper.h" diff --git a/Framework/TestHelpers/src/FileResource.cpp b/Framework/TestHelpers/src/FileResource.cpp index feddc230d1c8a6077cf2fdbfe09c67b0ff6681bb..c22ffc5be85322d1f058d7e15bab144ed8fda614 100644 --- a/Framework/TestHelpers/src/FileResource.cpp +++ b/Framework/TestHelpers/src/FileResource.cpp @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #include "MantidTestHelpers/FileResource.h" #include <boost/filesystem.hpp> #include <string> diff --git a/Framework/TestHelpers/src/FunctionCreationHelper.cpp b/Framework/TestHelpers/src/FunctionCreationHelper.cpp index 39a1ede3e4f892230fa8c4fe61a7193a6039b1e2..21bbc4af15f4e0557d4122f9ea0f1c621e00982a 100644 --- a/Framework/TestHelpers/src/FunctionCreationHelper.cpp +++ b/Framework/TestHelpers/src/FunctionCreationHelper.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidTestHelpers/FunctionCreationHelper.h" #include "MantidKernel/Exception.h" diff --git a/Framework/TestHelpers/src/IndirectFitDataCreationHelper.cpp b/Framework/TestHelpers/src/IndirectFitDataCreationHelper.cpp index 33b0e997e580e90978b2e86487a41a02c37b0c2d..7e8d3b5fb48dc32d9362b55c523da865bc1cd5e1 100644 --- a/Framework/TestHelpers/src/IndirectFitDataCreationHelper.cpp +++ b/Framework/TestHelpers/src/IndirectFitDataCreationHelper.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidTestHelpers/IndirectFitDataCreationHelper.h" #include "MantidTestHelpers/WorkspaceCreationHelper.h" diff --git a/Framework/TestHelpers/src/InstrumentCreationHelper.cpp b/Framework/TestHelpers/src/InstrumentCreationHelper.cpp index 526fc09ec708dd70423c7b2cd91912471fbb47f9..d117d710899cc30d375a00723d098581d9c644a2 100644 --- a/Framework/TestHelpers/src/InstrumentCreationHelper.cpp +++ b/Framework/TestHelpers/src/InstrumentCreationHelper.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidTestHelpers/InstrumentCreationHelper.h" diff --git a/Framework/TestHelpers/src/JSONGeometryParserTestHelper.cpp b/Framework/TestHelpers/src/JSONGeometryParserTestHelper.cpp index dbb3ea06e78105a42d2baf565b73305a871b87d1..edf2b4d7ddcaa3ab4695f808b5844848ab0a7a88 100644 --- a/Framework/TestHelpers/src/JSONGeometryParserTestHelper.cpp +++ b/Framework/TestHelpers/src/JSONGeometryParserTestHelper.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidTestHelpers/JSONGeometryParserTestHelper.h" #include "json/json.h" diff --git a/Framework/TestHelpers/src/LoggingCleaner.cpp b/Framework/TestHelpers/src/LoggingCleaner.cpp index a67fa5ca114a27c35925b8549db4bd0adbcc9875..c094ba8f89b2b6e46ee4c74a16a13164afab6f02 100644 --- a/Framework/TestHelpers/src/LoggingCleaner.cpp +++ b/Framework/TestHelpers/src/LoggingCleaner.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/Logger.h" diff --git a/Framework/TestHelpers/src/MDAlgorithmsTestHelper.cpp b/Framework/TestHelpers/src/MDAlgorithmsTestHelper.cpp index e8a6e3010fbda479ee837c44a2c4e08468857b90..b5e2d54b1bb51957346c025c527551f45dad46af 100644 --- a/Framework/TestHelpers/src/MDAlgorithmsTestHelper.cpp +++ b/Framework/TestHelpers/src/MDAlgorithmsTestHelper.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /********************************************************************************* * PLEASE READ THIS!!!!!!! diff --git a/Framework/TestHelpers/src/MDEventsTestHelper.cpp b/Framework/TestHelpers/src/MDEventsTestHelper.cpp index 6410186ffd3658751e20c5c235f23a3061cf8b13..690db659153f7e9bc38b2a19dc87a491ee38b4fa 100644 --- a/Framework/TestHelpers/src/MDEventsTestHelper.cpp +++ b/Framework/TestHelpers/src/MDEventsTestHelper.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /********************************************************************************* * PLEASE READ THIS!!!!!!! @@ -244,10 +244,9 @@ makeFakeMDHistoWorkspace(double signal, size_t numDims, size_t numBins, * @param name :: optional name * @return the MDHisto */ -MDHistoWorkspace_sptr -makeFakeMDHistoWorkspaceGeneral(size_t numDims, double signal, - double errorSquared, size_t *numBins, - coord_t *min, coord_t *max, std::string name) { +MDHistoWorkspace_sptr makeFakeMDHistoWorkspaceGeneral( + size_t numDims, double signal, double errorSquared, size_t *numBins, + coord_t *min, coord_t *max, const std::string &name) { std::vector<std::string> names{"x", "y", "z", "t"}; // Create MDFrame of General Frame type Mantid::Geometry::GeneralFrame frame( @@ -283,7 +282,7 @@ makeFakeMDHistoWorkspaceGeneral(size_t numDims, double signal, MDHistoWorkspace_sptr makeFakeMDHistoWorkspaceGeneral( size_t numDims, double signal, double errorSquared, size_t *numBins, coord_t *min, coord_t *max, std::vector<std::string> names, - std::string name) { + const std::string &name) { std::vector<Mantid::Geometry::MDHistoDimension_sptr> dimensions; // Create MDFrame of General Frame type Mantid::Geometry::GeneralFrame frame( @@ -316,7 +315,7 @@ MDHistoWorkspace_sptr makeFakeMDHistoWorkspaceGeneral( */ Mantid::DataObjects::MDHistoWorkspace_sptr makeFakeMDHistoWorkspaceWithMDFrame( double signal, size_t numDims, const Mantid::Geometry::MDFrame &frame, - size_t numBins, coord_t max, double errorSquared, std::string name, + size_t numBins, coord_t max, double errorSquared, const std::string &name, double numEvents) { // MDHistoWorkspace *ws = nullptr; MDHistoWorkspace_sptr ws_sptr; @@ -365,7 +364,7 @@ Mantid::DataObjects::MDHistoWorkspace_sptr makeFakeMDHistoWorkspaceWithMDFrame( * Delete a file from disk * @param filename : File name to check and delete */ -void checkAndDeleteFile(std::string filename) { +void checkAndDeleteFile(const std::string &filename) { if (!filename.empty()) { if (Poco::File(filename).exists()) { Poco::File(filename).remove(); diff --git a/Framework/TestHelpers/src/MultiDomainFunctionHelper.cpp b/Framework/TestHelpers/src/MultiDomainFunctionHelper.cpp index 517f4694d897be587d0974f91f6d32f8aac147b6..3a226ff1c5003663fceb3729b40687b0688eacc2 100644 --- a/Framework/TestHelpers/src/MultiDomainFunctionHelper.cpp +++ b/Framework/TestHelpers/src/MultiDomainFunctionHelper.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidTestHelpers/MultiDomainFunctionHelper.h" #include "MantidTestHelpers/FakeObjects.h" diff --git a/Framework/TestHelpers/src/MuonGroupingXMLHelper.cpp b/Framework/TestHelpers/src/MuonGroupingXMLHelper.cpp index 6374c12bf68a7b44b257db3563569db4209018df..a155658fe430ff4d96f61b4bde676347a970bc44 100644 --- a/Framework/TestHelpers/src/MuonGroupingXMLHelper.cpp +++ b/Framework/TestHelpers/src/MuonGroupingXMLHelper.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidTestHelpers/MuonGroupingXMLHelper.h" diff --git a/Framework/TestHelpers/src/MuonWorkspaceCreationHelper.cpp b/Framework/TestHelpers/src/MuonWorkspaceCreationHelper.cpp index 285ccd2d22aa93c74cb54a254ceaadbff337aa07..e89c0d26ab2d1e5d07576d30343a0b4d78f6355e 100644 --- a/Framework/TestHelpers/src/MuonWorkspaceCreationHelper.cpp +++ b/Framework/TestHelpers/src/MuonWorkspaceCreationHelper.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidTestHelpers/MuonWorkspaceCreationHelper.h" diff --git a/Framework/TestHelpers/src/NexusGeometryTestHelpers.cpp b/Framework/TestHelpers/src/NexusGeometryTestHelpers.cpp index 78a411dfe14a42873973dc5dec52b102594f73c4..6734c00ff42a6bdbf850bb78d46d08c8163417f2 100644 --- a/Framework/TestHelpers/src/NexusGeometryTestHelpers.cpp +++ b/Framework/TestHelpers/src/NexusGeometryTestHelpers.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidTestHelpers/NexusGeometryTestHelpers.h" #include "MantidGeometry/Objects/IObject.h" diff --git a/Framework/TestHelpers/src/NexusTestHelper.cpp b/Framework/TestHelpers/src/NexusTestHelper.cpp index 5ff3e2a23403513bf0033e13b0b903aa9a05a718..949062d80ca3a11008241841acef39124b524134 100644 --- a/Framework/TestHelpers/src/NexusTestHelper.cpp +++ b/Framework/TestHelpers/src/NexusTestHelper.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /********************************************************************************* * PLEASE READ THIS!!!!!!! diff --git a/Framework/TestHelpers/src/ONCatHelper.cpp b/Framework/TestHelpers/src/ONCatHelper.cpp index de9d39ecbb6744f3382c4ccb9b2deed52a0df386..b22f93a1018285312312e2fba2f6c3937c047829 100644 --- a/Framework/TestHelpers/src/ONCatHelper.cpp +++ b/Framework/TestHelpers/src/ONCatHelper.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidTestHelpers/ONCatHelper.h" diff --git a/Framework/TestHelpers/src/ParallelRunner.cpp b/Framework/TestHelpers/src/ParallelRunner.cpp index b4128c6c77fc43c1266a998a4800c37f56f8d4f4..7b8e01db19506bde4d00c319cac7c1ed96660825 100644 --- a/Framework/TestHelpers/src/ParallelRunner.cpp +++ b/Framework/TestHelpers/src/ParallelRunner.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidTestHelpers/ParallelRunner.h" #include "MantidParallel/ThreadingBackend.h" diff --git a/Framework/TestHelpers/src/ReflectometryHelper.cpp b/Framework/TestHelpers/src/ReflectometryHelper.cpp index 522bc70fc4dc52b47b0cc54fa5d14fffe19a2bc6..91e8a5b59795a8544075404b2671c970cc553dee 100644 --- a/Framework/TestHelpers/src/ReflectometryHelper.cpp +++ b/Framework/TestHelpers/src/ReflectometryHelper.cpp @@ -1,9 +1,11 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + +#include <utility> + #include "MantidTestHelpers/ReflectometryHelper.h" #include "MantidAPI/AlgorithmManager.h" @@ -115,7 +117,8 @@ void prepareInputGroup(std::string const &name, std::string const ¶msType, mkGroup->execute(); } -std::vector<MatrixWorkspace_sptr> groupToVector(WorkspaceGroup_sptr group) { +std::vector<MatrixWorkspace_sptr> +groupToVector(const WorkspaceGroup_sptr &group) { std::vector<MatrixWorkspace_sptr> out; for (size_t i = 0; i < group->size(); ++i) { out.emplace_back( @@ -129,9 +132,9 @@ std::vector<MatrixWorkspace_sptr> retrieveOutWS(std::string const &name) { return groupToVector(group); } -void applyPolarizationEfficiencies(WorkspaceGroup_sptr ws) { +void applyPolarizationEfficiencies(const WorkspaceGroup_sptr &ws) { - auto wss = groupToVector(ws); + auto wss = groupToVector(std::move(ws)); auto Rpp = wss[0]; auto Rpa = wss[1]; auto Rap = wss[2]; diff --git a/Framework/TestHelpers/src/SANSInstrumentCreationHelper.cpp b/Framework/TestHelpers/src/SANSInstrumentCreationHelper.cpp index 58a54125d6ddd5106a5950f5002574555e2f5dc7..a2e26a0b9f948b308f67931d5db7b98c0d3c6f46 100644 --- a/Framework/TestHelpers/src/SANSInstrumentCreationHelper.cpp +++ b/Framework/TestHelpers/src/SANSInstrumentCreationHelper.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /********************************************************************************* * PLEASE READ THIS!!!!!!! @@ -44,7 +44,7 @@ const int SANSInstrumentCreationHelper::nMonitors = 2; * @param workspace: name of the workspace to be created. */ Workspace2D_sptr SANSInstrumentCreationHelper::createSANSInstrumentWorkspace( - std::string workspace) { + const std::string &workspace) { // Create a test workspace with test data with a well defined peak // The test instrument has two monitor channels Workspace2D_sptr ws = WorkspaceCreationHelper::create2DWorkspace123( @@ -67,7 +67,7 @@ Workspace2D_sptr SANSInstrumentCreationHelper::createSANSInstrumentWorkspace( */ void SANSInstrumentCreationHelper::runLoadInstrument( const std::string &inst_name, - Mantid::DataObjects::Workspace2D_sptr workspace) { + const Mantid::DataObjects::Workspace2D_sptr &workspace) { // Determine the search directory for XML instrument definition files (IDFs) // std::string directoryName = // Mantid::Kernel::ConfigService::Instance().getInstrumentDirectory(); @@ -97,7 +97,8 @@ void SANSInstrumentCreationHelper::runLoadInstrument( * @param nybins: number of bins in Y */ void SANSInstrumentCreationHelper::runLoadMappingTable( - Mantid::DataObjects::Workspace2D_sptr workspace, int nxbins, int nybins) { + const Mantid::DataObjects::Workspace2D_sptr &workspace, int nxbins, + int nybins) { // Get the number of monitor channels size_t nMonitors(0); size_t nXbins, nYbins; diff --git a/Framework/TestHelpers/src/ScopedFileHelper.cpp b/Framework/TestHelpers/src/ScopedFileHelper.cpp index 3dd77533f8cfe9e8a3c4fcd32f71aea50f7bcd8e..57cb8f91d5682a4b6d54f195b294298b9f164d3f 100644 --- a/Framework/TestHelpers/src/ScopedFileHelper.cpp +++ b/Framework/TestHelpers/src/ScopedFileHelper.cpp @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - //------------------------------------------------------------------------------ // Includes //------------------------------------------------------------------------------ diff --git a/Framework/TestHelpers/src/SingleCrystalDiffractionTestHelper.cpp b/Framework/TestHelpers/src/SingleCrystalDiffractionTestHelper.cpp index b1ec459c132ceacbd69ab1e658400957f3e91a29..a4e16ff91ec2955f8f7aed9f4df5cc8aea0f4942 100644 --- a/Framework/TestHelpers/src/SingleCrystalDiffractionTestHelper.cpp +++ b/Framework/TestHelpers/src/SingleCrystalDiffractionTestHelper.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /* Test functions for algorithms for single crystal diffraction */ diff --git a/Framework/TestHelpers/src/StartFrameworkManager.cpp b/Framework/TestHelpers/src/StartFrameworkManager.cpp index 0f48bfcc1a20fbe7e0fda599d6ab8fb79bd84df7..e64a9830c91f16ba89dde0871e934f328346064b 100644 --- a/Framework/TestHelpers/src/StartFrameworkManager.cpp +++ b/Framework/TestHelpers/src/StartFrameworkManager.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /** * diff --git a/Framework/TestHelpers/src/TearDownWorld.cpp b/Framework/TestHelpers/src/TearDownWorld.cpp index d6cb94b04bf24244c2810baed1ff7b8bff524ecc..3bbf19d8d6798474d80dc4f2f78ca546aaea38bd 100644 --- a/Framework/TestHelpers/src/TearDownWorld.cpp +++ b/Framework/TestHelpers/src/TearDownWorld.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //----------------------------------------------------------------------------- // Includes diff --git a/Framework/TestHelpers/src/WorkspaceCreationHelper.cpp b/Framework/TestHelpers/src/WorkspaceCreationHelper.cpp index 04a8c90d5ff1b095d7e438e43efa579cff40b4e5..a910ef03d33c26a0c3f5f4d57800e6e8f5928fbf 100644 --- a/Framework/TestHelpers/src/WorkspaceCreationHelper.cpp +++ b/Framework/TestHelpers/src/WorkspaceCreationHelper.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /********************************************************************************* * PLEASE READ THIS!!!!!!! @@ -322,6 +322,17 @@ Workspace2D_sptr create2DWorkspaceBinned(size_t nhist, size_t numVals, return create<Workspace2D>(nhist, Histogram(x, y, e)); } +/** Create a 2D workspace with this many point-histograms and bins. + * Filled with Y = 2.0 and E = M_SQRT2w + */ +Workspace2D_sptr create2DWorkspacePoints(size_t nhist, size_t numVals, + double x0, double deltax) { + Points x(numVals, LinearGenerator(x0, deltax)); + Counts y(numVals, 2); + CountStandardDeviations e(numVals, M_SQRT2); + return create<Workspace2D>(nhist, Histogram(x, y, e)); +} + /** Create a 2D workspace with this many histograms and bins. The bins are * assumed to be non-uniform and given by the input array * Filled with Y = 2.0 and E = M_SQRT2w @@ -355,7 +366,7 @@ Workspace2D_sptr create2DWorkspaceNonUniformlyBinned(int nhist, * @param lower :: The lower bound of the flucation (default=-0.5) * @param upper:: The upper bound of the flucation (default=-0.5) */ -void addNoise(Mantid::API::MatrixWorkspace_sptr ws, double noise, +void addNoise(const Mantid::API::MatrixWorkspace_sptr &ws, double noise, const double lower, const double upper) { const size_t seed(12345); MersenneTwister randGen(seed, lower, upper); @@ -696,7 +707,7 @@ MatrixWorkspace_sptr create2DWorkspaceWithReflectometryInstrumentMultiDetector( } void createInstrumentForWorkspaceWithDistances( - MatrixWorkspace_sptr workspace, const V3D &samplePosition, + const MatrixWorkspace_sptr &workspace, const V3D &samplePosition, const V3D &sourcePosition, const std::vector<V3D> &detectorPositions) { Instrument_sptr instrument = boost::make_shared<Instrument>(); instrument->setReferenceFrame( @@ -728,7 +739,7 @@ WorkspaceSingleValue_sptr createWorkspaceSingleValueWithError(double value, } /** Perform some finalization on event workspace stuff */ -void eventWorkspace_Finalize(EventWorkspace_sptr ew) { +void eventWorkspace_Finalize(const EventWorkspace_sptr &ew) { // get a proton charge ew->mutableRun().integrateProtonCharge(); } @@ -933,7 +944,7 @@ createGroupedWorkspace2DWithRingsAndBoxes(size_t RootOfNumHist, int numBins, // not strictly creating a workspace, but really helpful to see what one // contains -void displayDataY(MatrixWorkspace_const_sptr ws) { +void displayDataY(const MatrixWorkspace_const_sptr &ws) { const size_t numHists = ws->getNumberHistograms(); for (size_t i = 0; i < numHists; ++i) { std::cout << "Histogram " << i << " = "; @@ -944,11 +955,13 @@ void displayDataY(MatrixWorkspace_const_sptr ws) { std::cout << '\n'; } } -void displayData(MatrixWorkspace_const_sptr ws) { displayDataX(ws); } +void displayData(const MatrixWorkspace_const_sptr &ws) { + displayDataX(std::move(ws)); +} // not strictly creating a workspace, but really helpful to see what one // contains -void displayDataX(MatrixWorkspace_const_sptr ws) { +void displayDataX(const MatrixWorkspace_const_sptr &ws) { const size_t numHists = ws->getNumberHistograms(); for (size_t i = 0; i < numHists; ++i) { std::cout << "Histogram " << i << " = "; @@ -962,7 +975,7 @@ void displayDataX(MatrixWorkspace_const_sptr ws) { // not strictly creating a workspace, but really helpful to see what one // contains -void displayDataE(MatrixWorkspace_const_sptr ws) { +void displayDataE(const MatrixWorkspace_const_sptr &ws) { const size_t numHists = ws->getNumberHistograms(); for (size_t i = 0; i < numHists; ++i) { std::cout << "Histogram " << i << " = "; @@ -981,7 +994,7 @@ void displayDataE(MatrixWorkspace_const_sptr ws) { * @param name :: property name * @param val :: value */ -void addTSPEntry(Run &runInfo, std::string name, double val) { +void addTSPEntry(Run &runInfo, const std::string &name, double val) { TimeSeriesProperty<double> *tsp; tsp = new TimeSeriesProperty<double>(name); tsp->addValue("2011-05-24T00:00:00", val); @@ -997,7 +1010,7 @@ void addTSPEntry(Run &runInfo, std::string name, double val) { * @param b :: lattice length * @param c :: lattice length */ -void setOrientedLattice(Mantid::API::MatrixWorkspace_sptr ws, double a, +void setOrientedLattice(const Mantid::API::MatrixWorkspace_sptr &ws, double a, double b, double c) { ws->mutableSample().setOrientedLattice( std::make_unique<OrientedLattice>(a, b, c, 90., 90., 90.)); @@ -1011,8 +1024,8 @@ void setOrientedLattice(Mantid::API::MatrixWorkspace_sptr ws, double a, * @param chi :: +X rotation angle (deg) * @param omega :: +Y rotation angle (deg) */ -void setGoniometer(Mantid::API::MatrixWorkspace_sptr ws, double phi, double chi, - double omega) { +void setGoniometer(const Mantid::API::MatrixWorkspace_sptr &ws, double phi, + double chi, double omega) { addTSPEntry(ws->mutableRun(), "phi", phi); addTSPEntry(ws->mutableRun(), "chi", chi); addTSPEntry(ws->mutableRun(), "omega", omega); @@ -1140,9 +1153,9 @@ createProcessedInelasticWS(const std::vector<double> &L2, * The new workspace should be exactly the same as the source workspace but * without any events */ -Mantid::DataObjects::EventWorkspace_sptr -createEventWorkspace3(Mantid::DataObjects::EventWorkspace_const_sptr sourceWS, - std::string wsname, API::Algorithm *alg) { +Mantid::DataObjects::EventWorkspace_sptr createEventWorkspace3( + const Mantid::DataObjects::EventWorkspace_const_sptr &sourceWS, + const std::string &wsname, API::Algorithm *alg) { UNUSED_ARG(wsname); // 1. Initialize:use dummy numbers for arguments, for event workspace it // doesn't matter @@ -1463,7 +1476,8 @@ void processDetectorsPositions(const API::MatrixWorkspace_const_sptr &inputWS, } boost::shared_ptr<Mantid::DataObjects::TableWorkspace> -buildPreprocessedDetectorsWorkspace(Mantid::API::MatrixWorkspace_sptr ws) { +buildPreprocessedDetectorsWorkspace( + const Mantid::API::MatrixWorkspace_sptr &ws) { Mantid::DataObjects::TableWorkspace_sptr DetPos = createTableWorkspace(ws); auto Ei = ws->run().getPropertyValueAsType<double>("Ei"); processDetectorsPositions(ws, DetPos, Ei); diff --git a/Framework/Types/inc/MantidTypes/Core/DateAndTime.h b/Framework/Types/inc/MantidTypes/Core/DateAndTime.h index cef3af7103cdfbefe59eb199c88f7ce91b2166ec..d0f48450d1cf5da393540848471f6f4999bf819f 100644 --- a/Framework/Types/inc/MantidTypes/Core/DateAndTime.h +++ b/Framework/Types/inc/MantidTypes/Core/DateAndTime.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -45,9 +45,9 @@ public: DateAndTime(const int32_t seconds, const int32_t nanoseconds); DateAndTime(const int64_t seconds, const int64_t nanoseconds); DateAndTime(const std::string &ISO8601_string); - DateAndTime(const boost::posix_time::ptime _ptime); + DateAndTime(const boost::posix_time::ptime &_ptime); - void set_from_ptime(boost::posix_time::ptime _ptime); + void set_from_ptime(const boost::posix_time::ptime &_ptime); boost::posix_time::ptime to_ptime() const; void set_from_time_t(std::time_t _timet); @@ -59,7 +59,7 @@ public: void setFromISO8601(const std::string &str); std::string toSimpleString() const; std::string - toFormattedString(const std::string format = "%Y-%b-%d %H:%M:%S") const; + toFormattedString(const std::string &format = "%Y-%b-%d %H:%M:%S") const; std::string toISO8601String() const; /// Stream output operator @@ -112,7 +112,7 @@ public: static DateAndTime getCurrentTime(); static DateAndTime maximum(); static DateAndTime minimum(); - static double secondsFromDuration(time_duration duration); + static double secondsFromDuration(const time_duration &duration); static time_duration durationFromSeconds(double duration); static int64_t nanosecondsFromDuration(const time_duration &td); static int64_t nanosecondsFromSeconds(double sec); diff --git a/Framework/Types/inc/MantidTypes/Core/DateAndTimeHelpers.h b/Framework/Types/inc/MantidTypes/Core/DateAndTimeHelpers.h index 528ff100db649533dcc355ee5b17e2a3a623eb78..19a0cbfae0d58617c057e767766c547ee87e7a70 100644 --- a/Framework/Types/inc/MantidTypes/Core/DateAndTimeHelpers.h +++ b/Framework/Types/inc/MantidTypes/Core/DateAndTimeHelpers.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Types/inc/MantidTypes/Event/TofEvent.h b/Framework/Types/inc/MantidTypes/Event/TofEvent.h index db131ba8a9264913f54fb3c8993ca4ea4e0aa6e1..ef1997ee4e4c7d553de8e6f58be06a98dd10da04 100644 --- a/Framework/Types/inc/MantidTypes/Event/TofEvent.h +++ b/Framework/Types/inc/MantidTypes/Event/TofEvent.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Types/inc/MantidTypes/SpectrumDefinition.h b/Framework/Types/inc/MantidTypes/SpectrumDefinition.h index 7e2a8cb2dbc25b1b93c227bd3f15f7164745ecac..6501024697cd3215b21c51bb551570884104dad5 100644 --- a/Framework/Types/inc/MantidTypes/SpectrumDefinition.h +++ b/Framework/Types/inc/MantidTypes/SpectrumDefinition.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Types/src/Core/DateAndTime.cpp b/Framework/Types/src/Core/DateAndTime.cpp index d64835cba9e541f7ecfbb61caa22c32d6259f7ed..3b6c1c9884e19dec72d23ca6b96b09802e4a4d3d 100644 --- a/Framework/Types/src/Core/DateAndTime.cpp +++ b/Framework/Types/src/Core/DateAndTime.cpp @@ -133,7 +133,7 @@ DateAndTime::DateAndTime(const std::string &ISO8601_string) : _nanoseconds(0) { /** Construct time from a boost::posix_time::ptime. * @param _ptime :: boost::posix_time::ptime */ -DateAndTime::DateAndTime(const boost::posix_time::ptime _ptime) +DateAndTime::DateAndTime(const boost::posix_time::ptime &_ptime) : _nanoseconds(0) { this->set_from_ptime(_ptime); } @@ -207,7 +207,7 @@ boost::posix_time::ptime DateAndTime::to_ptime() const { * * @param _ptime :: boost::posix_time::ptime date and time. */ -void DateAndTime::set_from_ptime(boost::posix_time::ptime _ptime) { +void DateAndTime::set_from_ptime(const boost::posix_time::ptime &_ptime) { if (_ptime.is_special()) { // --- SPECIAL VALUES! ---- if (_ptime.is_infinity() || _ptime.is_pos_infinity()) @@ -452,7 +452,7 @@ std::string DateAndTime::toSimpleString() const { * @param format : format for strftime(). Default "%Y-%b-%d %H:%M:%S" * @return date as string, formatted as requested */ -std::string DateAndTime::toFormattedString(const std::string format) const { +std::string DateAndTime::toFormattedString(const std::string &format) const { char buffer[25]; std::tm date_as_tm = this->to_tm(); strftime(buffer, 25, format.c_str(), &date_as_tm); @@ -688,7 +688,7 @@ DateAndTime DateAndTime::getCurrentTime() { * Return the number of seconds in a time_duration, as a double, including * fractional seconds. */ -double DateAndTime::secondsFromDuration(time_duration duration) { +double DateAndTime::secondsFromDuration(const time_duration &duration) { #ifdef BOOST_DATE_TIME_HAS_NANOSECONDS // Nanosecond resolution return static_cast<double>(duration.total_nanoseconds()) / 1e9; diff --git a/Framework/Types/src/Core/DateAndTimeHelpers.cpp b/Framework/Types/src/Core/DateAndTimeHelpers.cpp index 902698318804c407a3be8b26399921a1563f7a87..fd22b5bd6108419cccf81df3d17cf18473636913 100644 --- a/Framework/Types/src/Core/DateAndTimeHelpers.cpp +++ b/Framework/Types/src/Core/DateAndTimeHelpers.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidTypes/Core/DateAndTimeHelpers.h" diff --git a/Framework/Types/src/Event/TofEvent.cpp b/Framework/Types/src/Event/TofEvent.cpp index 13ba3c1d53f5fc71c23613fc86138aab6ffad2fe..de179e2ab7d626e119ae48d8901f2109c995f9da 100644 --- a/Framework/Types/src/Event/TofEvent.cpp +++ b/Framework/Types/src/Event/TofEvent.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidTypes/Event/TofEvent.h" diff --git a/Framework/Types/test/CMakeLists.txt b/Framework/Types/test/CMakeLists.txt index a9a094dae34f5d0b22f046af74d9b23fd86ef8c3..52250697865490e687fd831fdfdc359c3d0d9603 100644 --- a/Framework/Types/test/CMakeLists.txt +++ b/Framework/Types/test/CMakeLists.txt @@ -1,8 +1,7 @@ if(CXXTEST_FOUND) include_directories(SYSTEM ${CXXTEST_INCLUDE_DIR} - ${GMOCK_INCLUDE_DIR} - ${GTEST_INCLUDE_DIR}) +) cxxtest_add_test(TypesTest ${TEST_FILES} ${GMOCK_TEST_FILES}) target_link_libraries(TypesTest @@ -10,8 +9,8 @@ if(CXXTEST_FOUND) ${TCMALLOC_LIBRARIES_LINKTIME} Types ${Boost_LIBRARIES} - ${GMOCK_LIBRARIES} - ${GTEST_LIBRARIES}) + gmock +) add_dependencies(FrameworkTests TypesTest) # Add to the 'FrameworkTests' group in VS diff --git a/Framework/Types/test/DateAndTimeHelpersTest.h b/Framework/Types/test/DateAndTimeHelpersTest.h index 798f35a91c0947817e35ad27800754d1bf135fc1..7b017db52ae0a79ae147b648fe8fa490d5e5ad80 100644 --- a/Framework/Types/test/DateAndTimeHelpersTest.h +++ b/Framework/Types/test/DateAndTimeHelpersTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Types/test/DateAndTimeTest.h b/Framework/Types/test/DateAndTimeTest.h index b0fe70d005b03af365a415cdf01d585007e1ab10..1f0557d5d408660cf0596e814ec5310c0f5d3751 100644 --- a/Framework/Types/test/DateAndTimeTest.h +++ b/Framework/Types/test/DateAndTimeTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /* * DateAndTimeTest.h diff --git a/Framework/Types/test/SpectrumDefinitionTest.h b/Framework/Types/test/SpectrumDefinitionTest.h index 1d5da7ddd32df1b9f487bbfb040176b6a3483fe9..4e1e07b3c5955e0f5afbbc8d6f87aa71316526ff 100644 --- a/Framework/Types/test/SpectrumDefinitionTest.h +++ b/Framework/Types/test/SpectrumDefinitionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/Types/test/TofEventTest.h b/Framework/Types/test/TofEventTest.h index fe7da39ade9f54c6ab21ba3fc51cf96e9c3c4b7b..be977426cf93a9065cd62aa5581641f285d6f579 100644 --- a/Framework/Types/test/TofEventTest.h +++ b/Framework/Types/test/TofEventTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/AlignAndFocusPowder.h b/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/AlignAndFocusPowder.h index a7c6961c4ff510eae4f38b92d4f7b0f0f6bc11c1..a82e1e84769e364e8948d896d428ae534ac5f6a2 100644 --- a/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/AlignAndFocusPowder.h +++ b/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/AlignAndFocusPowder.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -75,23 +75,22 @@ private: const std::string &groupFilename); API::MatrixWorkspace_sptr rebin(API::MatrixWorkspace_sptr matrixws); - API::MatrixWorkspace_sptr conjoinWorkspaces(API::MatrixWorkspace_sptr ws1, - API::MatrixWorkspace_sptr ws2, - size_t offset); + API::MatrixWorkspace_sptr + conjoinWorkspaces(const API::MatrixWorkspace_sptr &ws1, + const API::MatrixWorkspace_sptr &ws2, size_t offset); /// Call diffraction focus to a matrix workspace. API::MatrixWorkspace_sptr diffractionFocus(API::MatrixWorkspace_sptr ws); /// Convert units API::MatrixWorkspace_sptr convertUnits(API::MatrixWorkspace_sptr matrixws, - std::string target); + const std::string &target); /// Call edit instrument geometry - API::MatrixWorkspace_sptr editInstrument(API::MatrixWorkspace_sptr ws, - std::vector<double> polars, - std::vector<specnum_t> specids, - std::vector<double> l2s, - std::vector<double> phis); + API::MatrixWorkspace_sptr editInstrument( + API::MatrixWorkspace_sptr ws, const std::vector<double> &polars, + const std::vector<specnum_t> &specids, const std::vector<double> &l2s, + const std::vector<double> &phis); void convertOffsetsToCal(DataObjects::OffsetsWorkspace_sptr &offsetsWS); double getVecPropertyFromPmOrSelf(const std::string &name, std::vector<double> &avec); @@ -123,7 +122,7 @@ private: double tmin{0.0}; double tmax{0.0}; bool m_preserveEvents{false}; - void doSortEvents(Mantid::API::Workspace_sptr ws); + void doSortEvents(const Mantid::API::Workspace_sptr &ws); /// Low resolution TOF matrix workspace API::MatrixWorkspace_sptr m_lowResW; diff --git a/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/ComputeSensitivity.h b/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/ComputeSensitivity.h index 20270458a3fb0d4d2a8f6a691012a26406723797..e2b68f6c13dd7645667d2e922c6e5418eede5e87 100644 --- a/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/ComputeSensitivity.h +++ b/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/ComputeSensitivity.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/DgsAbsoluteUnitsReduction.h b/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/DgsAbsoluteUnitsReduction.h index fd0112f6d609371fd4739885bb6cde910261a4ec..bb5c460b84ffa12724dc4a0882ca7c6304a44d71 100644 --- a/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/DgsAbsoluteUnitsReduction.h +++ b/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/DgsAbsoluteUnitsReduction.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/DgsConvertToEnergyTransfer.h b/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/DgsConvertToEnergyTransfer.h index 90d57bd5216a9d6b23b57600cce010fc05072269..aea653a2abf8659feb873bdf4ffa83a020176b41 100644 --- a/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/DgsConvertToEnergyTransfer.h +++ b/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/DgsConvertToEnergyTransfer.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/DgsDiagnose.h b/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/DgsDiagnose.h index 49522b534d524c4eb55c055cbc9210676e239fb9..c3f1f4d35c2e6e14c66676f957bd7cf1d0b593e9 100644 --- a/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/DgsDiagnose.h +++ b/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/DgsDiagnose.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/DgsPreprocessData.h b/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/DgsPreprocessData.h index e12286a8da88da409023f439ff54e0cbf11acfcb..ec740cde1be24751a7949838f95cbe8c72af4f49 100644 --- a/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/DgsPreprocessData.h +++ b/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/DgsPreprocessData.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/DgsProcessDetectorVanadium.h b/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/DgsProcessDetectorVanadium.h index cfdab2bd65ef8172034ebfab9a505cd7624d1089..45094c328d28a4e425bd315149e49be8aa8d72df 100644 --- a/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/DgsProcessDetectorVanadium.h +++ b/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/DgsProcessDetectorVanadium.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/DgsReduction.h b/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/DgsReduction.h index 4fb3ce26a405b7980f4bd55e2fcbcf73d8aadfb7..6ed48dc7a615f473c699e2cb4e5c03233f128b3e 100644 --- a/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/DgsReduction.h +++ b/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/DgsReduction.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -32,12 +32,13 @@ public: private: void init() override; void exec() override; - API::Workspace_sptr loadInputData(const std::string prop, + API::Workspace_sptr loadInputData(const std::string &prop, const bool mustLoad = true); - API::MatrixWorkspace_sptr loadGroupingFile(const std::string prop); + API::MatrixWorkspace_sptr loadGroupingFile(const std::string &prop); API::MatrixWorkspace_sptr loadHardMask(); - double getParameter(std::string algParam, API::MatrixWorkspace_sptr ws, - std::string altParam); + double getParameter(const std::string &algParam, + const API::MatrixWorkspace_sptr &ws, + const std::string &altParam); boost::shared_ptr<Kernel::PropertyManager> reductionManager; }; diff --git a/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/DgsRemap.h b/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/DgsRemap.h index 3994c996c3a2e767cf10f7fd432ad474809d92e0..52e054f871e8c628619975904cda8fd2e2108bff 100644 --- a/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/DgsRemap.h +++ b/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/DgsRemap.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -30,9 +30,9 @@ public: private: void init() override; void exec() override; - void execGrouping(API::MatrixWorkspace_sptr iWS, + void execGrouping(const API::MatrixWorkspace_sptr &iWS, API::MatrixWorkspace_sptr &oWS); - void execMasking(API::MatrixWorkspace_sptr iWS); + void execMasking(const API::MatrixWorkspace_sptr &iWS); }; } // namespace WorkflowAlgorithms diff --git a/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/EQSANSDarkCurrentSubtraction.h b/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/EQSANSDarkCurrentSubtraction.h index b8f3ee9098f246c3c89da99cc93102923e0d0b27..a68e2c84e8d1efe83fb9160cce1a95febd9e244c 100644 --- a/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/EQSANSDarkCurrentSubtraction.h +++ b/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/EQSANSDarkCurrentSubtraction.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/EQSANSDarkCurrentSubtraction2.h b/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/EQSANSDarkCurrentSubtraction2.h index 639ca09d17490fad93c58baa87569f0dd1eadb09..c22ef397032768dea6fba441db2d186c1e59a538 100644 --- a/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/EQSANSDarkCurrentSubtraction2.h +++ b/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/EQSANSDarkCurrentSubtraction2.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/EQSANSInstrument.h b/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/EQSANSInstrument.h index 9c57e159b50c98b387ec41064fa1cd1193867b1c..9482d96bbb4f0d7d3644abdeb0ec98e5c291967e 100644 --- a/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/EQSANSInstrument.h +++ b/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/EQSANSInstrument.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -24,17 +24,17 @@ const double default_slit_positions[3][8] = { {0.0, 10.0, 10.0, 15.0, 15.0, 20.0, 20.0, 40.0}}; double readInstrumentParameter(const std::string ¶meter, - API::MatrixWorkspace_sptr dataWS); + const API::MatrixWorkspace_sptr &dataWS); int getDetectorFromPixel(const int &pixel_x, const int &pixel_y, - API::MatrixWorkspace_sptr dataWS); + const API::MatrixWorkspace_sptr &dataWS); void getCoordinateFromPixel(const double &pixel_x, const double &pixel_y, - API::MatrixWorkspace_sptr dataWS, double &x, + const API::MatrixWorkspace_sptr &dataWS, double &x, double &y); void getPixelFromCoordinate(const double &x, const double &y, - API::MatrixWorkspace_sptr dataWS, double &pixel_x, - double &pixel_y); -void getDefaultBeamCenter(API::MatrixWorkspace_sptr dataWS, double &pixel_x, - double &pixel_y); + const API::MatrixWorkspace_sptr &dataWS, + double &pixel_x, double &pixel_y); +void getDefaultBeamCenter(const API::MatrixWorkspace_sptr &dataWS, + double &pixel_x, double &pixel_y); } // namespace EQSANSInstrument } // namespace WorkflowAlgorithms diff --git a/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/EQSANSLoad.h b/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/EQSANSLoad.h index 987daedf25357dcb001112cec8096d29c1f4fc9d..56c22be660a2513091d5621998796e29e0454e86 100644 --- a/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/EQSANSLoad.h +++ b/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/EQSANSLoad.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/EQSANSMonitorTOF.h b/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/EQSANSMonitorTOF.h index 220917df1bc849a4be4fdfdb5e7b7a38fb88eba1..18c9ef46276c20020cba6aecb8dfab4ae9385c68 100644 --- a/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/EQSANSMonitorTOF.h +++ b/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/EQSANSMonitorTOF.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -52,7 +52,7 @@ private: void exec() override; /// Compute TOF offset - double getTofOffset(API::MatrixWorkspace_const_sptr inputWS, + double getTofOffset(const API::MatrixWorkspace_const_sptr &inputWS, bool frame_skipping, double source_to_monitor); }; diff --git a/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/EQSANSPatchSensitivity.h b/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/EQSANSPatchSensitivity.h index 51fce466d93a03f9897c5232afb05fd1bf876aa8..2942eb6e430024e82c79acef90fafdc65aeff37e 100644 --- a/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/EQSANSPatchSensitivity.h +++ b/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/EQSANSPatchSensitivity.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/EQSANSQ2D.h b/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/EQSANSQ2D.h index 51b829835cabee82a30d0045d1503eda59aaada3..1446cd15fd424c4249e13b69e8fd243c49ae1da4 100644 --- a/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/EQSANSQ2D.h +++ b/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/EQSANSQ2D.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/ExtractQENSMembers.h b/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/ExtractQENSMembers.h index 5879307133378114faf96552f3748517534c6aa3..18dd6e576e96802cdea0dfce2dd8eb4aee8a4538 100644 --- a/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/ExtractQENSMembers.h +++ b/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/ExtractQENSMembers.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -33,7 +33,7 @@ private: getQValues(const std::vector<Mantid::API::MatrixWorkspace_sptr> &workspaces); std::vector<std::string> - getAxisLabels(Mantid::API::MatrixWorkspace_sptr workspace, + getAxisLabels(const Mantid::API::MatrixWorkspace_sptr &workspace, size_t axisIndex) const; std::vector<std::string> @@ -41,20 +41,21 @@ private: const std::vector<std::string> &newNames) const; Mantid::API::MatrixWorkspace_sptr - extractSpectrum(Mantid::API::MatrixWorkspace_sptr inputWS, size_t spectrum); + extractSpectrum(const Mantid::API::MatrixWorkspace_sptr &inputWS, + size_t spectrum); Mantid::API::MatrixWorkspace_sptr - appendSpectra(Mantid::API::MatrixWorkspace_sptr inputWS, - Mantid::API::MatrixWorkspace_sptr spectraWorkspace); + appendSpectra(const Mantid::API::MatrixWorkspace_sptr &inputWS, + const Mantid::API::MatrixWorkspace_sptr &spectraWorkspace); Mantid::API::WorkspaceGroup_sptr groupWorkspaces(const std::vector<std::string> &workspaceNames); std::vector<Mantid::API::MatrixWorkspace_sptr> - createMembersWorkspaces(Mantid::API::MatrixWorkspace_sptr initialWS, + createMembersWorkspaces(const Mantid::API::MatrixWorkspace_sptr &initialWS, const std::vector<std::string> &members); - void appendToMembers(Mantid::API::MatrixWorkspace_sptr resultWS, + void appendToMembers(const Mantid::API::MatrixWorkspace_sptr &resultWS, std::vector<Mantid::API::MatrixWorkspace_sptr> &members); void setNumericAxis( diff --git a/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/HFIRDarkCurrentSubtraction.h b/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/HFIRDarkCurrentSubtraction.h index 0ada7e180a3888ddbe8526c6009e332e3a95cf1f..61d45c8c2be64632468474f52e16e005ed4a68e3 100644 --- a/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/HFIRDarkCurrentSubtraction.h +++ b/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/HFIRDarkCurrentSubtraction.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -59,7 +59,7 @@ private: void init() override; /// Execution code void exec() override; - double getCountingTime(API::MatrixWorkspace_sptr inputWS); + double getCountingTime(const API::MatrixWorkspace_sptr &inputWS); static const int DEFAULT_MONITOR_ID = 0; static const int DEFAULT_TIMER_ID = 1; diff --git a/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/HFIRInstrument.h b/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/HFIRInstrument.h index 2cbc0bcafa4481a83857b964631d93775494dfcf..76d24d463d60c1bb58bd227d24b67cf75a65d828 100644 --- a/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/HFIRInstrument.h +++ b/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/HFIRInstrument.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -20,18 +20,18 @@ namespace HFIRInstrument { */ double readInstrumentParameter(const std::string ¶meter, - API::MatrixWorkspace_sptr dataWS); + const API::MatrixWorkspace_sptr &dataWS); int getDetectorFromPixel(const int &pixel_x, const int &pixel_y, - API::MatrixWorkspace_sptr dataWS); + const API::MatrixWorkspace_sptr &dataWS); void getCoordinateFromPixel(const double &pixel_x, const double &pixel_y, - API::MatrixWorkspace_sptr dataWS, double &x, + const API::MatrixWorkspace_sptr &dataWS, double &x, double &y); void getPixelFromCoordinate(const double &x, const double &y, - API::MatrixWorkspace_sptr dataWS, double &pixel_x, - double &pixel_y); -void getDefaultBeamCenter(API::MatrixWorkspace_sptr dataWS, double &pixel_x, - double &pixel_y); -double getSourceToSampleDistance(API::MatrixWorkspace_sptr dataWS); + const API::MatrixWorkspace_sptr &dataWS, + double &pixel_x, double &pixel_y); +void getDefaultBeamCenter(const API::MatrixWorkspace_sptr &dataWS, + double &pixel_x, double &pixel_y); +double getSourceToSampleDistance(const API::MatrixWorkspace_sptr &dataWS); } // namespace HFIRInstrument } // namespace WorkflowAlgorithms diff --git a/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/HFIRLoad.h b/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/HFIRLoad.h index 086ea315a590578b2b06b8142799a4b355b196c1..c4a1c2a2d9fb380799cf2a76bbbe3ceb288db941 100644 --- a/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/HFIRLoad.h +++ b/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/HFIRLoad.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/HFIRSANSNormalise.h b/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/HFIRSANSNormalise.h index 1303552e955564cb4201c07ab8521e25700fd9ab..175adf016153e63eba15e995430e240e1ba9ad4f 100644 --- a/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/HFIRSANSNormalise.h +++ b/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/HFIRSANSNormalise.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/IMuonAsymmetryCalculator.h b/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/IMuonAsymmetryCalculator.h index 004b4e8b4dc4911d566519bff875157ed50286f6..17b9d84bb998d18f53a3d170727736e06da2c573 100644 --- a/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/IMuonAsymmetryCalculator.h +++ b/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/IMuonAsymmetryCalculator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -20,9 +20,9 @@ namespace WorkflowAlgorithms { */ class DLLExport IMuonAsymmetryCalculator { public: - IMuonAsymmetryCalculator(const API::WorkspaceGroup_sptr inputWS, - const std::vector<int> summedPeriods, - const std::vector<int> subtractedPeriods); + IMuonAsymmetryCalculator(const API::WorkspaceGroup_sptr &inputWS, + const std::vector<int> &summedPeriods, + const std::vector<int> &subtractedPeriods); virtual ~IMuonAsymmetryCalculator() = default; /// Overridden in derived classes to perform asymmetry calculation virtual API::MatrixWorkspace_sptr calculate() const = 0; diff --git a/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/LoadEventAndCompress.h b/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/LoadEventAndCompress.h index 3dbfe3ef9596c5d3cf40c627a270ee8d682cd25a..8125008f69e941b6b7b808d0e1909da68d09165d 100644 --- a/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/LoadEventAndCompress.h +++ b/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/LoadEventAndCompress.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/MuonGroupAsymmetryCalculator.h b/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/MuonGroupAsymmetryCalculator.h index bb991fb6e3c597ce05df93417daeea9f69bbe83e..9c9294fce63c81dbce292b90571a721faa540348 100644 --- a/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/MuonGroupAsymmetryCalculator.h +++ b/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/MuonGroupAsymmetryCalculator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -16,12 +16,12 @@ namespace WorkflowAlgorithms { */ class DLLExport MuonGroupAsymmetryCalculator : public MuonGroupCalculator { public: - MuonGroupAsymmetryCalculator(const API::WorkspaceGroup_sptr inputWS, - const std::vector<int> summedPeriods, - const std::vector<int> subtractedPeriods, + MuonGroupAsymmetryCalculator(const API::WorkspaceGroup_sptr &inputWS, + const std::vector<int> &summedPeriods, + const std::vector<int> &subtractedPeriods, const int groupIndex, const double start = 0.0, const double end = 30.0, - const std::string wsName = ""); + const std::string &wsName = ""); /// Performs group asymmetry calculation API::MatrixWorkspace_sptr calculate() const override; diff --git a/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/MuonGroupCalculator.h b/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/MuonGroupCalculator.h index 8207c736fff5976ad7895f77b6906b64b9a06e82..145e64d2dc951b7d7abb8e3bc669123d0fda9de1 100644 --- a/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/MuonGroupCalculator.h +++ b/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/MuonGroupCalculator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -15,12 +15,12 @@ namespace WorkflowAlgorithms { */ class DLLExport MuonGroupCalculator : public IMuonAsymmetryCalculator { public: - MuonGroupCalculator(const Mantid::API::WorkspaceGroup_sptr inputWS, - const std::vector<int> summedPeriods, - const std::vector<int> subtractedPeriods, + MuonGroupCalculator(const Mantid::API::WorkspaceGroup_sptr &inputWS, + const std::vector<int> &summedPeriods, + const std::vector<int> &subtractedPeriods, const int groupIndex); void setStartEnd(const double start, const double end); - void setWSName(const std::string wsName); + void setWSName(const std::string &wsName); protected: /// Workspace index of the group to analyse diff --git a/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/MuonGroupCountsCalculator.h b/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/MuonGroupCountsCalculator.h index 838cc7589fdeb4286944a53dba17f7a048510b54..7065beb04fd34086b10e0b710450c98494aa545e 100644 --- a/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/MuonGroupCountsCalculator.h +++ b/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/MuonGroupCountsCalculator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -16,9 +16,9 @@ namespace WorkflowAlgorithms { */ class DLLExport MuonGroupCountsCalculator : public MuonGroupCalculator { public: - MuonGroupCountsCalculator(const Mantid::API::WorkspaceGroup_sptr inputWS, - const std::vector<int> summedPeriods, - const std::vector<int> subtractedPeriods, + MuonGroupCountsCalculator(const Mantid::API::WorkspaceGroup_sptr &inputWS, + const std::vector<int> &summedPeriods, + const std::vector<int> &subtractedPeriods, const int groupIndex); /// Performs group counts calculation Mantid::API::MatrixWorkspace_sptr calculate() const override; diff --git a/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/MuonPairAsymmetryCalculator.h b/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/MuonPairAsymmetryCalculator.h index 6d787f9515d87544510ef39c967e5290bc8aa073..00d978d8757e8cf3a66fc4e7b248bce340db6e3a 100644 --- a/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/MuonPairAsymmetryCalculator.h +++ b/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/MuonPairAsymmetryCalculator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -16,9 +16,9 @@ namespace WorkflowAlgorithms { */ class DLLExport MuonPairAsymmetryCalculator : public IMuonAsymmetryCalculator { public: - MuonPairAsymmetryCalculator(const API::WorkspaceGroup_sptr inputWS, - const std::vector<int> summedPeriods, - const std::vector<int> subtractedPeriods, + MuonPairAsymmetryCalculator(const API::WorkspaceGroup_sptr &inputWS, + const std::vector<int> &summedPeriods, + const std::vector<int> &subtractedPeriods, const int firstPairIndex, const int secondPairIndex, const double alpha = 1); diff --git a/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/MuonProcess.h b/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/MuonProcess.h index 2eb91a9f88c51fba55bc544392cb462e8ea8dd85..7489a3e35a1f45809fe3288ffcfd92f13870f739 100644 --- a/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/MuonProcess.h +++ b/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/MuonProcess.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -39,12 +39,12 @@ private: /// Groups specified workspace group according to specified /// DetectorGroupingTable. API::WorkspaceGroup_sptr - groupWorkspaces(API::WorkspaceGroup_sptr wsGroup, - DataObjects::TableWorkspace_sptr grouping); + groupWorkspaces(const API::WorkspaceGroup_sptr &wsGroup, + const DataObjects::TableWorkspace_sptr &grouping); /// Applies dead time correction to the workspace group. - API::WorkspaceGroup_sptr applyDTC(API::WorkspaceGroup_sptr wsGroup, - DataObjects::TableWorkspace_sptr dt); + API::WorkspaceGroup_sptr applyDTC(const API::WorkspaceGroup_sptr &wsGroup, + const DataObjects::TableWorkspace_sptr &dt); /// Applies offset, crops and rebin the workspace according to specified /// params @@ -52,8 +52,9 @@ private: double loadedTimeZero); /// Applies offset, crops and rebins all workspaces in the group - API::WorkspaceGroup_sptr correctWorkspaces(API::WorkspaceGroup_sptr wsGroup, - double loadedTimeZero); + API::WorkspaceGroup_sptr + correctWorkspaces(const API::WorkspaceGroup_sptr &wsGroup, + double loadedTimeZero); /// Builds an error message from a list of invalid periods std::string buildErrorString(const std::vector<int> &invalidPeriods) const; diff --git a/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/PrecompiledHeader.h b/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/PrecompiledHeader.h index 07e788656980af829b0f47db2885f6a9d63e5e24..474d919e1b5280ac13d1d8a5a79d9de40be49ef0 100644 --- a/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/PrecompiledHeader.h +++ b/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/PrecompiledHeader.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/ProcessIndirectFitParameters.h b/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/ProcessIndirectFitParameters.h index be79a465135ad43f5eadca18e5b19fe49de97c9b..f3bf7abb88407151f080aecf212880e97d183262 100644 --- a/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/ProcessIndirectFitParameters.h +++ b/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/ProcessIndirectFitParameters.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/RefRoi.h b/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/RefRoi.h index e2bd55c7ad89d2802e20a14d483b080bc96dd023..6bf70c76f160c48813a9c300c90bd2d8da096eeb 100644 --- a/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/RefRoi.h +++ b/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/RefRoi.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/SANSBeamFinder.h b/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/SANSBeamFinder.h index 6954fe12ca6ddd2d9ef1be5d25b08a97a2e49963..4e5ade301355d87dd43635c7a67562f29ad3e135 100644 --- a/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/SANSBeamFinder.h +++ b/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/SANSBeamFinder.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -40,8 +40,8 @@ private: void exec() override; API::MatrixWorkspace_sptr loadBeamFinderFile(const std::string &beamCenterFile); - void maskEdges(API::MatrixWorkspace_sptr beamCenterWS, int high, int low, - int left, int right, + void maskEdges(const API::MatrixWorkspace_sptr &beamCenterWS, int high, + int low, int left, int right, const std::string &componentName = "detector1"); boost::shared_ptr<Kernel::PropertyManager> m_reductionManager; diff --git a/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/SANSBeamFluxCorrection.h b/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/SANSBeamFluxCorrection.h index e5ddc4091e05ee414ca512457efd5c272a698ea5..3e65783730052e5af66f306b050b72b66c32543e 100644 --- a/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/SANSBeamFluxCorrection.h +++ b/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/SANSBeamFluxCorrection.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/SANSSensitivityCorrection.h b/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/SANSSensitivityCorrection.h index 8577dd9cddd017a14bf238aeb63c981ac9461a69..6550d5293085244c4479dacff45c6bfa98f2da8c 100644 --- a/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/SANSSensitivityCorrection.h +++ b/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/SANSSensitivityCorrection.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/SANSSolidAngleCorrection.h b/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/SANSSolidAngleCorrection.h index 275c5d24ddc27f87e00fbaded6927f84f5d52bdf..6c0acd4de44956f7b72560574f0e17f54c77371e 100644 --- a/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/SANSSolidAngleCorrection.h +++ b/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/SANSSolidAngleCorrection.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/SetupEQSANSReduction.h b/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/SetupEQSANSReduction.h index 4aa53a46ff109cc4f7d137e87a705f9b4d74a994..fc5e6f053b362dd2f521697b78100a92112c41d3 100644 --- a/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/SetupEQSANSReduction.h +++ b/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/SetupEQSANSReduction.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -39,12 +39,12 @@ private: /// Execution code void exec() override; std::string _findFile(std::string dataRun); - void - setupSensitivity(boost::shared_ptr<Kernel::PropertyManager> reductionManager); + void setupSensitivity( + const boost::shared_ptr<Kernel::PropertyManager> &reductionManager); void setupTransmission( - boost::shared_ptr<Kernel::PropertyManager> reductionManager); - void - setupBackground(boost::shared_ptr<Kernel::PropertyManager> reductionManager); + const boost::shared_ptr<Kernel::PropertyManager> &reductionManager); + void setupBackground( + const boost::shared_ptr<Kernel::PropertyManager> &reductionManager); }; } // namespace WorkflowAlgorithms diff --git a/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/SetupHFIRReduction.h b/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/SetupHFIRReduction.h index 6070d9b1b4eea8553f97f7db5a038cdabca388bc..e3f63b5d70f999f40d05edc2a8ceb8fd1edcb4fa 100644 --- a/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/SetupHFIRReduction.h +++ b/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/SetupHFIRReduction.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -40,11 +40,11 @@ private: /// Execution code void exec() override; void setupTransmission( - boost::shared_ptr<Kernel::PropertyManager> reductionManager); - void - setupBackground(boost::shared_ptr<Kernel::PropertyManager> reductionManager); - void - setupSensitivity(boost::shared_ptr<Kernel::PropertyManager> reductionManager); + const boost::shared_ptr<Kernel::PropertyManager> &reductionManager); + void setupBackground( + const boost::shared_ptr<Kernel::PropertyManager> &reductionManager); + void setupSensitivity( + const boost::shared_ptr<Kernel::PropertyManager> &reductionManager); }; } // namespace WorkflowAlgorithms diff --git a/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/SofTwoThetaTOF.h b/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/SofTwoThetaTOF.h index bbb383171e9f235d6f3a444bd62bbb422a246667..503bc8d99f71660736ba501316d55807ee4e9bd1 100644 --- a/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/SofTwoThetaTOF.h +++ b/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/SofTwoThetaTOF.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/StepScan.h b/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/StepScan.h index 11cbc689376b2b8cfda22ae934afd274c4a786b2..7fec136646bb02cb8ff59ec1a1681605cf7b5f74 100644 --- a/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/StepScan.h +++ b/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/StepScan.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -35,13 +35,13 @@ private: void exec() override; DataObjects::EventWorkspace_sptr - getMonitorWorkspace(API::MatrixWorkspace_sptr inputWS); + getMonitorWorkspace(const API::MatrixWorkspace_sptr &inputWS); DataObjects::EventWorkspace_sptr - cloneInputWorkspace(API::Workspace_sptr inputWS); - void runMaskDetectors(API::MatrixWorkspace_sptr inputWS, - API::MatrixWorkspace_sptr maskWS); - void runFilterByXValue(API::MatrixWorkspace_sptr inputWS, const double xmin, - const double xmax); + cloneInputWorkspace(const API::Workspace_sptr &inputWS); + void runMaskDetectors(const API::MatrixWorkspace_sptr &inputWS, + const API::MatrixWorkspace_sptr &maskWS); + void runFilterByXValue(const API::MatrixWorkspace_sptr &inputWS, + const double xmin, const double xmax); }; } // namespace WorkflowAlgorithms diff --git a/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/WorkflowAlgorithmHelpers.h b/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/WorkflowAlgorithmHelpers.h index 128991a837b04e686062b095ce36797e39f2d86c..0187d5527471af5d7b450717fa875ae3aca4d4e6 100644 --- a/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/WorkflowAlgorithmHelpers.h +++ b/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/WorkflowAlgorithmHelpers.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/WorkflowAlgorithms/src/AlignAndFocusPowder.cpp b/Framework/WorkflowAlgorithms/src/AlignAndFocusPowder.cpp index 19a2cfbfcb27f09e8642d18c85e63967a8daeb10..2a5961d7306cdf1606d0a423863598c8149bc5b2 100644 --- a/Framework/WorkflowAlgorithms/src/AlignAndFocusPowder.cpp +++ b/Framework/WorkflowAlgorithms/src/AlignAndFocusPowder.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidWorkflowAlgorithms/AlignAndFocusPowder.h" #include "MantidAPI/AnalysisDataService.h" @@ -823,9 +823,9 @@ void AlignAndFocusPowder::exec() { /** Call edit instrument geometry */ API::MatrixWorkspace_sptr AlignAndFocusPowder::editInstrument( - API::MatrixWorkspace_sptr ws, std::vector<double> polars, - std::vector<specnum_t> specids, std::vector<double> l2s, - std::vector<double> phis) { + API::MatrixWorkspace_sptr ws, const std::vector<double> &polars, + const std::vector<specnum_t> &specids, const std::vector<double> &l2s, + const std::vector<double> &phis) { g_log.information() << "running EditInstrumentGeometry started at " << Types::Core::DateAndTime::getCurrentTime() << "\n"; @@ -884,7 +884,7 @@ AlignAndFocusPowder::diffractionFocus(API::MatrixWorkspace_sptr ws) { */ API::MatrixWorkspace_sptr AlignAndFocusPowder::convertUnits(API::MatrixWorkspace_sptr matrixws, - std::string target) { + const std::string &target) { g_log.information() << "running ConvertUnits(Target=" << target << ") started at " << Types::Core::DateAndTime::getCurrentTime() << "\n"; @@ -955,8 +955,8 @@ AlignAndFocusPowder::rebin(API::MatrixWorkspace_sptr matrixws) { /** Add workspace2 to workspace1 by adding spectrum. */ MatrixWorkspace_sptr -AlignAndFocusPowder::conjoinWorkspaces(API::MatrixWorkspace_sptr ws1, - API::MatrixWorkspace_sptr ws2, +AlignAndFocusPowder::conjoinWorkspaces(const API::MatrixWorkspace_sptr &ws1, + const API::MatrixWorkspace_sptr &ws2, size_t offset) { // Get information from ws1: maximum spectrum number, and store original // spectrum Nos @@ -1129,7 +1129,7 @@ void AlignAndFocusPowder::loadCalFile(const std::string &calFilename, * * @param ws :: any Workspace. Does nothing if not EventWorkspace. */ -void AlignAndFocusPowder::doSortEvents(Mantid::API::Workspace_sptr ws) { +void AlignAndFocusPowder::doSortEvents(const Mantid::API::Workspace_sptr &ws) { EventWorkspace_sptr eventWS = boost::dynamic_pointer_cast<EventWorkspace>(ws); if (!eventWS) return; diff --git a/Framework/WorkflowAlgorithms/src/ComputeSensitivity.cpp b/Framework/WorkflowAlgorithms/src/ComputeSensitivity.cpp index 6b98d0d874cc7f5caebb235632131fb8ccdfdd29..b8dcc3bf7728968ec63db85a89547c0aed42c04c 100644 --- a/Framework/WorkflowAlgorithms/src/ComputeSensitivity.cpp +++ b/Framework/WorkflowAlgorithms/src/ComputeSensitivity.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/Framework/WorkflowAlgorithms/src/DgsAbsoluteUnitsReduction.cpp b/Framework/WorkflowAlgorithms/src/DgsAbsoluteUnitsReduction.cpp index f96cfc82424549465e3dcb803d1d7d1aaf196d61..63b13d7bf9e69b3bdf34db9e91eda555c1b3f511 100644 --- a/Framework/WorkflowAlgorithms/src/DgsAbsoluteUnitsReduction.cpp +++ b/Framework/WorkflowAlgorithms/src/DgsAbsoluteUnitsReduction.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidWorkflowAlgorithms/DgsAbsoluteUnitsReduction.h" #include "MantidAPI/MatrixWorkspace.h" diff --git a/Framework/WorkflowAlgorithms/src/DgsConvertToEnergyTransfer.cpp b/Framework/WorkflowAlgorithms/src/DgsConvertToEnergyTransfer.cpp index 9db495f43be83ee6e6f01b629028a4cb745e26b6..cfefc7acedc3fa6aa4b9f8168ea521f515e04da4 100644 --- a/Framework/WorkflowAlgorithms/src/DgsConvertToEnergyTransfer.cpp +++ b/Framework/WorkflowAlgorithms/src/DgsConvertToEnergyTransfer.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidWorkflowAlgorithms/DgsConvertToEnergyTransfer.h" #include "MantidAPI/MatrixWorkspace.h" diff --git a/Framework/WorkflowAlgorithms/src/DgsDiagnose.cpp b/Framework/WorkflowAlgorithms/src/DgsDiagnose.cpp index ae764856dac4e69803e5ca2b35ca2e9dde85d3eb..261023f31470630a869c3bb39d39fa4d8c3b5311 100644 --- a/Framework/WorkflowAlgorithms/src/DgsDiagnose.cpp +++ b/Framework/WorkflowAlgorithms/src/DgsDiagnose.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidWorkflowAlgorithms/DgsDiagnose.h" #include "MantidDataObjects/MaskWorkspace.h" diff --git a/Framework/WorkflowAlgorithms/src/DgsPreprocessData.cpp b/Framework/WorkflowAlgorithms/src/DgsPreprocessData.cpp index 4c0461546a80800adbf768fde3259d807357f8ca..7fc20ba733eeefc8d1c6c63a2d506c21225ab301 100644 --- a/Framework/WorkflowAlgorithms/src/DgsPreprocessData.cpp +++ b/Framework/WorkflowAlgorithms/src/DgsPreprocessData.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidWorkflowAlgorithms/DgsPreprocessData.h" #include "MantidAPI/AlgorithmManager.h" diff --git a/Framework/WorkflowAlgorithms/src/DgsProcessDetectorVanadium.cpp b/Framework/WorkflowAlgorithms/src/DgsProcessDetectorVanadium.cpp index e342eb578b99e07de8b23ea3e28beca3f1169c67..1b590f7ba424fb49c14a353997bfa5aa89218353 100644 --- a/Framework/WorkflowAlgorithms/src/DgsProcessDetectorVanadium.cpp +++ b/Framework/WorkflowAlgorithms/src/DgsProcessDetectorVanadium.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidWorkflowAlgorithms/DgsProcessDetectorVanadium.h" #include "MantidAPI/MatrixWorkspace.h" diff --git a/Framework/WorkflowAlgorithms/src/DgsReduction.cpp b/Framework/WorkflowAlgorithms/src/DgsReduction.cpp index f2620e7e9ec90cab7dbb6e1cbfe8fa3c837e84bf..0f1c20578807a83cec7cf92bd25685691a1a1298 100644 --- a/Framework/WorkflowAlgorithms/src/DgsReduction.cpp +++ b/Framework/WorkflowAlgorithms/src/DgsReduction.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidWorkflowAlgorithms/DgsReduction.h" @@ -566,7 +566,7 @@ void DgsReduction::init() { * Create a workspace by either loading a file or using an existing * workspace. */ -Workspace_sptr DgsReduction::loadInputData(const std::string prop, +Workspace_sptr DgsReduction::loadInputData(const std::string &prop, const bool mustLoad) { g_log.debug() << "MustLoad = " << mustLoad << '\n'; Workspace_sptr inputWS; @@ -648,7 +648,7 @@ MatrixWorkspace_sptr DgsReduction::loadHardMask() { } } -MatrixWorkspace_sptr DgsReduction::loadGroupingFile(const std::string prop) { +MatrixWorkspace_sptr DgsReduction::loadGroupingFile(const std::string &prop) { const std::string propName = prop + "GroupingFile"; const std::string groupFile = this->getProperty(propName); if (groupFile.empty()) { @@ -672,8 +672,9 @@ MatrixWorkspace_sptr DgsReduction::loadGroupingFile(const std::string prop) { } } -double DgsReduction::getParameter(std::string algParam, MatrixWorkspace_sptr ws, - std::string altParam) { +double DgsReduction::getParameter(const std::string &algParam, + const MatrixWorkspace_sptr &ws, + const std::string &altParam) { double param = this->getProperty(algParam); if (EMPTY_DBL() == param) { param = ws->getInstrument()->getNumberParameter(altParam)[0]; diff --git a/Framework/WorkflowAlgorithms/src/DgsRemap.cpp b/Framework/WorkflowAlgorithms/src/DgsRemap.cpp index c157d57cef04e703fc9934b00c9c96cef543c9ea..dc3a07d689405d7795d87f7245828114544bd4e8 100644 --- a/Framework/WorkflowAlgorithms/src/DgsRemap.cpp +++ b/Framework/WorkflowAlgorithms/src/DgsRemap.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidWorkflowAlgorithms/DgsRemap.h" #include "MantidAPI/FileProperty.h" @@ -74,7 +74,7 @@ void DgsRemap::exec() { this->setProperty("OutputWorkspace", outputWS); } -void DgsRemap::execMasking(MatrixWorkspace_sptr iWS) { +void DgsRemap::execMasking(const MatrixWorkspace_sptr &iWS) { MatrixWorkspace_sptr maskWS = this->getProperty("MaskWorkspace"); if (maskWS) { IAlgorithm_sptr mask = this->createChildAlgorithm("MaskDetectors"); @@ -84,7 +84,7 @@ void DgsRemap::execMasking(MatrixWorkspace_sptr iWS) { } } -void DgsRemap::execGrouping(MatrixWorkspace_sptr iWS, +void DgsRemap::execGrouping(const MatrixWorkspace_sptr &iWS, MatrixWorkspace_sptr &oWS) { MatrixWorkspace_sptr groupWS = this->getProperty("GroupingWorkspace"); std::string oldGroupingFile = this->getProperty("OldGroupingFile"); diff --git a/Framework/WorkflowAlgorithms/src/EQSANSDarkCurrentSubtraction.cpp b/Framework/WorkflowAlgorithms/src/EQSANSDarkCurrentSubtraction.cpp index c5eab3b5da2ff8e686aced8d47d450f14fd215fe..59e436bc0d73456e08e90e66182e60a68e6eb390 100644 --- a/Framework/WorkflowAlgorithms/src/EQSANSDarkCurrentSubtraction.cpp +++ b/Framework/WorkflowAlgorithms/src/EQSANSDarkCurrentSubtraction.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidWorkflowAlgorithms/EQSANSDarkCurrentSubtraction.h" #include "MantidAPI/AlgorithmProperty.h" diff --git a/Framework/WorkflowAlgorithms/src/EQSANSDarkCurrentSubtraction2.cpp b/Framework/WorkflowAlgorithms/src/EQSANSDarkCurrentSubtraction2.cpp index 99b492d1772c5b210d3de030f9b72cb9182f08df..d2d07d35d49b862bd786c4cb5fd164f772db0051 100644 --- a/Framework/WorkflowAlgorithms/src/EQSANSDarkCurrentSubtraction2.cpp +++ b/Framework/WorkflowAlgorithms/src/EQSANSDarkCurrentSubtraction2.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidWorkflowAlgorithms/EQSANSDarkCurrentSubtraction2.h" #include "MantidAPI/AlgorithmProperty.h" diff --git a/Framework/WorkflowAlgorithms/src/EQSANSInstrument.cpp b/Framework/WorkflowAlgorithms/src/EQSANSInstrument.cpp index 426948730fbf6918f2609411a892c518dbe7542b..a775a38f9fcd5c79039451f165203be61e68b64f 100644 --- a/Framework/WorkflowAlgorithms/src/EQSANSInstrument.cpp +++ b/Framework/WorkflowAlgorithms/src/EQSANSInstrument.cpp @@ -1,16 +1,18 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes //---------------------------------------------------------------------- -#include "MantidWorkflowAlgorithms/EQSANSInstrument.h" +#include <utility> + #include "MantidDataObjects/EventWorkspace.h" #include "MantidGeometry/Instrument.h" #include "MantidKernel/Exception.h" +#include "MantidWorkflowAlgorithms/EQSANSInstrument.h" namespace Mantid { namespace WorkflowAlgorithms { @@ -24,7 +26,7 @@ namespace EQSANSInstrument { * Read a parameter from the instrument description */ double readInstrumentParameter(const std::string ¶meter, - API::MatrixWorkspace_sptr dataWS) { + const API::MatrixWorkspace_sptr &dataWS) { std::vector<double> pars = dataWS->getInstrument()->getNumberParameter(parameter); if (pars.empty()) @@ -37,9 +39,9 @@ double readInstrumentParameter(const std::string ¶meter, * Return the detector ID corresponding to the [x,y] pixel coordinates. */ int getDetectorFromPixel(const int &pixel_x, const int &pixel_y, - API::MatrixWorkspace_sptr dataWS) { - int ny_pixels = - static_cast<int>(readInstrumentParameter("number-of-y-pixels", dataWS)); + const API::MatrixWorkspace_sptr &dataWS) { + int ny_pixels = static_cast<int>( + readInstrumentParameter("number-of-y-pixels", std::move(dataWS))); return ny_pixels * pixel_x + pixel_y; } @@ -48,7 +50,7 @@ int getDetectorFromPixel(const int &pixel_x, const int &pixel_y, * given pixel coordinates [m]. */ void getCoordinateFromPixel(const double &pixel_x, const double &pixel_y, - API::MatrixWorkspace_sptr dataWS, double &x, + const API::MatrixWorkspace_sptr &dataWS, double &x, double &y) { const int nx_pixels = static_cast<int>(readInstrumentParameter("number-of-x-pixels", dataWS)); @@ -68,8 +70,8 @@ void getCoordinateFromPixel(const double &pixel_x, const double &pixel_y, * @param y: real-space y coordinate [m] */ void getPixelFromCoordinate(const double &x, const double &y, - API::MatrixWorkspace_sptr dataWS, double &pixel_x, - double &pixel_y) { + const API::MatrixWorkspace_sptr &dataWS, + double &pixel_x, double &pixel_y) { const int nx_pixels = static_cast<int>(readInstrumentParameter("number-of-x-pixels", dataWS)); const int ny_pixels = @@ -84,9 +86,9 @@ void getPixelFromCoordinate(const double &x, const double &y, * Returns the default beam center position, or the pixel location * of real-space coordinates (0,0). */ -void getDefaultBeamCenter(API::MatrixWorkspace_sptr dataWS, double &pixel_x, - double &pixel_y) { - getPixelFromCoordinate(0.0, 0.0, dataWS, pixel_x, pixel_y); +void getDefaultBeamCenter(const API::MatrixWorkspace_sptr &dataWS, + double &pixel_x, double &pixel_y) { + getPixelFromCoordinate(0.0, 0.0, std::move(dataWS), pixel_x, pixel_y); } } // namespace EQSANSInstrument diff --git a/Framework/WorkflowAlgorithms/src/EQSANSLoad.cpp b/Framework/WorkflowAlgorithms/src/EQSANSLoad.cpp index 89c61aa90321bf8460fa14b877f839f4f1fdadd2..67d70ac8cf4c51981ddb433e6342a14acf01e531 100644 --- a/Framework/WorkflowAlgorithms/src/EQSANSLoad.cpp +++ b/Framework/WorkflowAlgorithms/src/EQSANSLoad.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidWorkflowAlgorithms/EQSANSLoad.h" #include "MantidAPI/AlgorithmProperty.h" @@ -120,7 +120,7 @@ void EQSANSLoad::init() { /// Returns the value of a run property from a given workspace /// @param inputWS :: input workspace /// @param pname :: name of the property to retrieve -double getRunPropertyDbl(MatrixWorkspace_sptr inputWS, +double getRunPropertyDbl(const MatrixWorkspace_sptr &inputWS, const std::string &pname) { Mantid::Kernel::Property *prop = inputWS->run().getProperty(pname); auto *dp = dynamic_cast<Mantid::Kernel::PropertyWithValue<double> *>(prop); diff --git a/Framework/WorkflowAlgorithms/src/EQSANSMonitorTOF.cpp b/Framework/WorkflowAlgorithms/src/EQSANSMonitorTOF.cpp index d311651a666615638671aa2754e2cd8490ea95be..a35a04e1d8d8d163255be226a737f500f9ce5067 100644 --- a/Framework/WorkflowAlgorithms/src/EQSANSMonitorTOF.cpp +++ b/Framework/WorkflowAlgorithms/src/EQSANSMonitorTOF.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidWorkflowAlgorithms/EQSANSMonitorTOF.h" #include "MantidAPI/Run.h" @@ -190,7 +190,7 @@ void EQSANSMonitorTOF::exec() { setProperty("OutputWorkspace", outputWS); } -double EQSANSMonitorTOF::getTofOffset(MatrixWorkspace_const_sptr inputWS, +double EQSANSMonitorTOF::getTofOffset(const MatrixWorkspace_const_sptr &inputWS, bool frame_skipping, double source_to_monitor) { //# Storage for chopper information read from the logs diff --git a/Framework/WorkflowAlgorithms/src/EQSANSPatchSensitivity.cpp b/Framework/WorkflowAlgorithms/src/EQSANSPatchSensitivity.cpp index a02ea021e56293841e454bf74a503431909d9a69..94f9e31b088b7a2d8495a4e12295df44bc57eee2 100644 --- a/Framework/WorkflowAlgorithms/src/EQSANSPatchSensitivity.cpp +++ b/Framework/WorkflowAlgorithms/src/EQSANSPatchSensitivity.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidWorkflowAlgorithms/EQSANSPatchSensitivity.h" #include "MantidAPI/MatrixWorkspace.h" diff --git a/Framework/WorkflowAlgorithms/src/EQSANSQ2D.cpp b/Framework/WorkflowAlgorithms/src/EQSANSQ2D.cpp index fe855abc925d9159d29e04b55dd38d22f4fec8bd..e28de98b3f7d4b2f40e5a86178174b04729f0a04 100644 --- a/Framework/WorkflowAlgorithms/src/EQSANSQ2D.cpp +++ b/Framework/WorkflowAlgorithms/src/EQSANSQ2D.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidWorkflowAlgorithms/EQSANSQ2D.h" #include "MantidAPI/Run.h" @@ -39,7 +39,8 @@ void EQSANSQ2D::init() { /// Returns the value of a run property from a given workspace /// @param inputWS :: input workspace /// @param pname :: name of the property to retrieve -double getRunProperty(MatrixWorkspace_sptr inputWS, const std::string &pname) { +double getRunProperty(const MatrixWorkspace_sptr &inputWS, + const std::string &pname) { return inputWS->run().getPropertyValueAsType<double>(pname); } diff --git a/Framework/WorkflowAlgorithms/src/ExtractQENSMembers.cpp b/Framework/WorkflowAlgorithms/src/ExtractQENSMembers.cpp index 524667d9e4bbb7ae9ff7c9c13294104a7b4d59dc..097629278935e881245e1f9ca681f0419f00458f 100644 --- a/Framework/WorkflowAlgorithms/src/ExtractQENSMembers.cpp +++ b/Framework/WorkflowAlgorithms/src/ExtractQENSMembers.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidWorkflowAlgorithms/ExtractQENSMembers.h" @@ -158,7 +158,7 @@ std::vector<double> ExtractQENSMembers::getQValues( * @return The retrieved axis labels. */ std::vector<std::string> -ExtractQENSMembers::getAxisLabels(MatrixWorkspace_sptr workspace, +ExtractQENSMembers::getAxisLabels(const MatrixWorkspace_sptr &workspace, size_t axisIndex) const { auto axis = workspace->getAxis(axisIndex); std::vector<std::string> labels; @@ -201,7 +201,7 @@ std::vector<std::string> ExtractQENSMembers::renameConvolvedMembers( * @return A workspace containing the extracted spectrum. */ MatrixWorkspace_sptr -ExtractQENSMembers::extractSpectrum(MatrixWorkspace_sptr inputWS, +ExtractQENSMembers::extractSpectrum(const MatrixWorkspace_sptr &inputWS, size_t spectrum) { auto extractAlg = createChildAlgorithm("ExtractSpectra", -1.0, -1.0, false); extractAlg->setProperty("InputWorkspace", inputWS); @@ -221,9 +221,9 @@ ExtractQENSMembers::extractSpectrum(MatrixWorkspace_sptr inputWS, * @param inputWS The input workspace to append to. * @param spectraWorkspace The workspace whose spectra to append. */ -MatrixWorkspace_sptr -ExtractQENSMembers::appendSpectra(MatrixWorkspace_sptr inputWS, - MatrixWorkspace_sptr spectraWorkspace) { +MatrixWorkspace_sptr ExtractQENSMembers::appendSpectra( + const MatrixWorkspace_sptr &inputWS, + const MatrixWorkspace_sptr &spectraWorkspace) { auto appendAlg = createChildAlgorithm("AppendSpectra", -1.0, -1.0, false); appendAlg->setProperty("InputWorkspace1", inputWS); appendAlg->setProperty("InputWorkspace2", spectraWorkspace); @@ -256,7 +256,8 @@ WorkspaceGroup_sptr ExtractQENSMembers::groupWorkspaces( * @return A vector of the created members workspaces. */ std::vector<MatrixWorkspace_sptr> ExtractQENSMembers::createMembersWorkspaces( - MatrixWorkspace_sptr initialWS, const std::vector<std::string> &members) { + const MatrixWorkspace_sptr &initialWS, + const std::vector<std::string> &members) { std::vector<MatrixWorkspace_sptr> memberWorkspaces; memberWorkspaces.reserve(members.size()); for (auto i = 0u; i < members.size(); ++i) @@ -272,7 +273,7 @@ std::vector<MatrixWorkspace_sptr> ExtractQENSMembers::createMembersWorkspaces( * @param members A vector containing the member workspaces. */ void ExtractQENSMembers::appendToMembers( - MatrixWorkspace_sptr resultWS, + const MatrixWorkspace_sptr &resultWS, std::vector<Mantid::API::MatrixWorkspace_sptr> &members) { for (auto i = 0u; i < members.size(); ++i) members[i] = appendSpectra(members[i], extractSpectrum(resultWS, i)); diff --git a/Framework/WorkflowAlgorithms/src/HFIRDarkCurrentSubtraction.cpp b/Framework/WorkflowAlgorithms/src/HFIRDarkCurrentSubtraction.cpp index bcebb19881b1f7fcab1113d17b89692bfa1f50ca..ea3bf5f6c296d06a475aa1c5ee7e410ae8af9d74 100644 --- a/Framework/WorkflowAlgorithms/src/HFIRDarkCurrentSubtraction.cpp +++ b/Framework/WorkflowAlgorithms/src/HFIRDarkCurrentSubtraction.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidWorkflowAlgorithms/HFIRDarkCurrentSubtraction.h" #include "MantidAPI/AlgorithmProperty.h" @@ -157,8 +157,8 @@ void HFIRDarkCurrentSubtraction::exec() { /// Get the counting time from a workspace /// @param inputWS :: workspace to read the counting time from -double -HFIRDarkCurrentSubtraction::getCountingTime(MatrixWorkspace_sptr inputWS) { +double HFIRDarkCurrentSubtraction::getCountingTime( + const MatrixWorkspace_sptr &inputWS) { // First, look whether we have the information in the log if (inputWS->run().hasProperty("timer")) { return inputWS->run().getPropertyValueAsType<double>("timer"); diff --git a/Framework/WorkflowAlgorithms/src/HFIRInstrument.cpp b/Framework/WorkflowAlgorithms/src/HFIRInstrument.cpp index 09f9cb2f8594310cc7561918b56cd4ade9c4f365..1063baa7a96692c6428c4d86b79d5744682613f3 100644 --- a/Framework/WorkflowAlgorithms/src/HFIRInstrument.cpp +++ b/Framework/WorkflowAlgorithms/src/HFIRInstrument.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidWorkflowAlgorithms/HFIRInstrument.h" #include "MantidAPI/Run.h" @@ -21,6 +21,7 @@ #include <boost/regex.hpp> #include <boost/shared_array.hpp> #include <boost/shared_ptr.hpp> +#include <utility> namespace Mantid { namespace WorkflowAlgorithms { @@ -34,7 +35,7 @@ namespace HFIRInstrument { * Read a parameter from the instrument description */ double readInstrumentParameter(const std::string ¶meter, - API::MatrixWorkspace_sptr dataWS) { + const API::MatrixWorkspace_sptr &dataWS) { std::vector<double> pars = dataWS->getInstrument()->getNumberParameter(parameter); if (pars.empty()) @@ -47,7 +48,7 @@ double readInstrumentParameter(const std::string ¶meter, * Return the detector ID corresponding to the [x,y] pixel coordinates. */ int getDetectorFromPixel(const int &pixel_x, const int &pixel_y, - API::MatrixWorkspace_sptr dataWS) { + const API::MatrixWorkspace_sptr &dataWS) { UNUSED_ARG(dataWS); return 1000000 + 1000 * pixel_x + pixel_y; } @@ -57,7 +58,7 @@ int getDetectorFromPixel(const int &pixel_x, const int &pixel_y, * given pixel coordinates [m]. */ void getCoordinateFromPixel(const double &pixel_x, const double &pixel_y, - API::MatrixWorkspace_sptr dataWS, double &x, + const API::MatrixWorkspace_sptr &dataWS, double &x, double &y) { const int nx_pixels = static_cast<int>(readInstrumentParameter("number-of-x-pixels", dataWS)); @@ -78,8 +79,8 @@ void getCoordinateFromPixel(const double &pixel_x, const double &pixel_y, * */ void getPixelFromCoordinate(const double &x, const double &y, - API::MatrixWorkspace_sptr dataWS, double &pixel_x, - double &pixel_y) { + const API::MatrixWorkspace_sptr &dataWS, + double &pixel_x, double &pixel_y) { const int nx_pixels = static_cast<int>(readInstrumentParameter("number-of-x-pixels", dataWS)); const int ny_pixels = @@ -94,9 +95,9 @@ void getPixelFromCoordinate(const double &x, const double &y, * Returns the default beam center position, or the pixel location * of real-space coordinates (0,0). */ -void getDefaultBeamCenter(API::MatrixWorkspace_sptr dataWS, double &pixel_x, - double &pixel_y) { - getPixelFromCoordinate(0.0, 0.0, dataWS, pixel_x, pixel_y); +void getDefaultBeamCenter(const API::MatrixWorkspace_sptr &dataWS, + double &pixel_x, double &pixel_y) { + getPixelFromCoordinate(0.0, 0.0, std::move(dataWS), pixel_x, pixel_y); } /* @@ -106,7 +107,7 @@ void getDefaultBeamCenter(API::MatrixWorkspace_sptr dataWS, double &pixel_x, * defined in instrument parameters file as "aperture-distances" * and sums "Header/sample_aperture_to_flange" */ -double getSourceToSampleDistance(API::MatrixWorkspace_sptr dataWS) { +double getSourceToSampleDistance(const API::MatrixWorkspace_sptr &dataWS) { double sourceToSampleDistance; diff --git a/Framework/WorkflowAlgorithms/src/HFIRLoad.cpp b/Framework/WorkflowAlgorithms/src/HFIRLoad.cpp index eb9a9c13c4633e40793be0d81c2bb4b9fcb8c218..6928d5ca6ab3b40710cdf5b7586995878ac13900 100644 --- a/Framework/WorkflowAlgorithms/src/HFIRLoad.cpp +++ b/Framework/WorkflowAlgorithms/src/HFIRLoad.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include <string> diff --git a/Framework/WorkflowAlgorithms/src/HFIRSANSNormalise.cpp b/Framework/WorkflowAlgorithms/src/HFIRSANSNormalise.cpp index ab06bf21f4d767cec5fa4d16d55d775d46809eaa..5434ad5f7451a70ced4d7b513968d5e983a9f5a4 100644 --- a/Framework/WorkflowAlgorithms/src/HFIRSANSNormalise.cpp +++ b/Framework/WorkflowAlgorithms/src/HFIRSANSNormalise.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidWorkflowAlgorithms/HFIRSANSNormalise.h" #include "MantidAPI/MatrixWorkspace.h" diff --git a/Framework/WorkflowAlgorithms/src/IMuonAsymmetryCalculator.cpp b/Framework/WorkflowAlgorithms/src/IMuonAsymmetryCalculator.cpp index 06bf00b7b2114b0df37515d28c18e8d91131775b..369be06715826c5f00f97dfecb54da4524d22bfe 100644 --- a/Framework/WorkflowAlgorithms/src/IMuonAsymmetryCalculator.cpp +++ b/Framework/WorkflowAlgorithms/src/IMuonAsymmetryCalculator.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidWorkflowAlgorithms/IMuonAsymmetryCalculator.h" @@ -25,8 +25,8 @@ namespace WorkflowAlgorithms { * from summed periods */ IMuonAsymmetryCalculator::IMuonAsymmetryCalculator( - const WorkspaceGroup_sptr inputWS, const std::vector<int> summedPeriods, - const std::vector<int> subtractedPeriods) + const WorkspaceGroup_sptr &inputWS, const std::vector<int> &summedPeriods, + const std::vector<int> &subtractedPeriods) : m_inputWS(inputWS), m_summedPeriods(summedPeriods), m_subtractedPeriods(subtractedPeriods) {} diff --git a/Framework/WorkflowAlgorithms/src/LoadEventAndCompress.cpp b/Framework/WorkflowAlgorithms/src/LoadEventAndCompress.cpp index 06bc63733a004657d7a09f8910ddf46d722f3532..9ed9a22262627030c85f5fc8dda3681ba777ba00 100644 --- a/Framework/WorkflowAlgorithms/src/LoadEventAndCompress.cpp +++ b/Framework/WorkflowAlgorithms/src/LoadEventAndCompress.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidWorkflowAlgorithms/LoadEventAndCompress.h" #include "MantidAPI/AlgorithmManager.h" diff --git a/Framework/WorkflowAlgorithms/src/MuonGroupAsymmetryCalculator.cpp b/Framework/WorkflowAlgorithms/src/MuonGroupAsymmetryCalculator.cpp index ce8fe19bbc61a739a3c240652cda0d10fb42ed24..92a15201ad5f3713e43e53b73e8250d7877d23a5 100644 --- a/Framework/WorkflowAlgorithms/src/MuonGroupAsymmetryCalculator.cpp +++ b/Framework/WorkflowAlgorithms/src/MuonGroupAsymmetryCalculator.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidWorkflowAlgorithms/MuonGroupAsymmetryCalculator.h" #include "MantidAPI/AnalysisDataService.h" @@ -33,10 +33,10 @@ namespace WorkflowAlgorithms { * @param wsName :: the name of the workspace (for normalization table) */ MuonGroupAsymmetryCalculator::MuonGroupAsymmetryCalculator( - const Mantid::API::WorkspaceGroup_sptr inputWS, - const std::vector<int> summedPeriods, - const std::vector<int> subtractedPeriods, const int groupIndex, - const double start, const double end, const std::string wsName) + const Mantid::API::WorkspaceGroup_sptr &inputWS, + const std::vector<int> &summedPeriods, + const std::vector<int> &subtractedPeriods, const int groupIndex, + const double start, const double end, const std::string &wsName) : MuonGroupCalculator(inputWS, summedPeriods, subtractedPeriods, groupIndex) { MuonGroupCalculator::setStartEnd(start, end); diff --git a/Framework/WorkflowAlgorithms/src/MuonGroupCalculator.cpp b/Framework/WorkflowAlgorithms/src/MuonGroupCalculator.cpp index 01364ad2cf8bf618ac47ca01689c6b4fb21cf9fd..4dc4d1ec99635bae8638d7c0a6688564841782c0 100644 --- a/Framework/WorkflowAlgorithms/src/MuonGroupCalculator.cpp +++ b/Framework/WorkflowAlgorithms/src/MuonGroupCalculator.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidWorkflowAlgorithms/MuonGroupCalculator.h" @@ -19,16 +19,16 @@ namespace WorkflowAlgorithms { * @param groupIndex :: [input] Workspace index of the group to analyse */ MuonGroupCalculator::MuonGroupCalculator( - const Mantid::API::WorkspaceGroup_sptr inputWS, - const std::vector<int> summedPeriods, - const std::vector<int> subtractedPeriods, const int groupIndex) + const Mantid::API::WorkspaceGroup_sptr &inputWS, + const std::vector<int> &summedPeriods, + const std::vector<int> &subtractedPeriods, const int groupIndex) : IMuonAsymmetryCalculator(inputWS, summedPeriods, subtractedPeriods), m_groupIndex(groupIndex) {} void MuonGroupCalculator::setStartEnd(const double start, const double end) { m_startX = start; m_endX = end; } -void MuonGroupCalculator::setWSName(const std::string wsName) { +void MuonGroupCalculator::setWSName(const std::string &wsName) { m_wsName = wsName; } } // namespace WorkflowAlgorithms diff --git a/Framework/WorkflowAlgorithms/src/MuonGroupCountsCalculator.cpp b/Framework/WorkflowAlgorithms/src/MuonGroupCountsCalculator.cpp index 8af2b26686488602003261fb39558ce4ce123061..0d50f9124dcad767385f13bc34bd27a0310f08bd 100644 --- a/Framework/WorkflowAlgorithms/src/MuonGroupCountsCalculator.cpp +++ b/Framework/WorkflowAlgorithms/src/MuonGroupCountsCalculator.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidWorkflowAlgorithms/MuonGroupCountsCalculator.h" @@ -21,9 +21,9 @@ namespace WorkflowAlgorithms { * @param groupIndex :: [input] Workspace index of the group to analyse */ MuonGroupCountsCalculator::MuonGroupCountsCalculator( - const Mantid::API::WorkspaceGroup_sptr inputWS, - const std::vector<int> summedPeriods, - const std::vector<int> subtractedPeriods, const int groupIndex) + const Mantid::API::WorkspaceGroup_sptr &inputWS, + const std::vector<int> &summedPeriods, + const std::vector<int> &subtractedPeriods, const int groupIndex) : MuonGroupCalculator(inputWS, summedPeriods, subtractedPeriods, groupIndex) {} diff --git a/Framework/WorkflowAlgorithms/src/MuonPairAsymmetryCalculator.cpp b/Framework/WorkflowAlgorithms/src/MuonPairAsymmetryCalculator.cpp index 41fab29a3b25c1e4b0fe23c28df52647ef8c346d..e51b7ca8a64a24782ec36e38f271f4f9e663d570 100644 --- a/Framework/WorkflowAlgorithms/src/MuonPairAsymmetryCalculator.cpp +++ b/Framework/WorkflowAlgorithms/src/MuonPairAsymmetryCalculator.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidWorkflowAlgorithms/MuonPairAsymmetryCalculator.h" @@ -27,9 +27,9 @@ namespace WorkflowAlgorithms { * @param alpha :: [input] Alpha (balance) value of the pair */ MuonPairAsymmetryCalculator::MuonPairAsymmetryCalculator( - const API::WorkspaceGroup_sptr inputWS, - const std::vector<int> summedPeriods, - const std::vector<int> subtractedPeriods, const int firstPairIndex, + const API::WorkspaceGroup_sptr &inputWS, + const std::vector<int> &summedPeriods, + const std::vector<int> &subtractedPeriods, const int firstPairIndex, const int secondPairIndex, const double alpha) : IMuonAsymmetryCalculator(inputWS, summedPeriods, subtractedPeriods), m_alpha(alpha), m_firstPairIndex(firstPairIndex), diff --git a/Framework/WorkflowAlgorithms/src/MuonProcess.cpp b/Framework/WorkflowAlgorithms/src/MuonProcess.cpp index 8c3b228d6e1dece74d3a1b8f17f5d36acea6756b..414e9abca8345caf738baff73778cd980acd2349 100644 --- a/Framework/WorkflowAlgorithms/src/MuonProcess.cpp +++ b/Framework/WorkflowAlgorithms/src/MuonProcess.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidWorkflowAlgorithms/MuonProcess.h" @@ -218,8 +218,9 @@ void MuonProcess::exec() { * @param grouping :: Detector grouping table to use * @return Grouped workspaces */ -WorkspaceGroup_sptr MuonProcess::groupWorkspaces(WorkspaceGroup_sptr wsGroup, - TableWorkspace_sptr grouping) { +WorkspaceGroup_sptr +MuonProcess::groupWorkspaces(const WorkspaceGroup_sptr &wsGroup, + const TableWorkspace_sptr &grouping) { WorkspaceGroup_sptr outWS = boost::make_shared<WorkspaceGroup>(); for (int i = 0; i < wsGroup->getNumberOfEntries(); i++) { auto ws = boost::dynamic_pointer_cast<MatrixWorkspace>(wsGroup->getItem(i)); @@ -242,8 +243,8 @@ WorkspaceGroup_sptr MuonProcess::groupWorkspaces(WorkspaceGroup_sptr wsGroup, * @param dt :: Dead time table to use * @return Corrected workspace group */ -WorkspaceGroup_sptr MuonProcess::applyDTC(WorkspaceGroup_sptr wsGroup, - TableWorkspace_sptr dt) { +WorkspaceGroup_sptr MuonProcess::applyDTC(const WorkspaceGroup_sptr &wsGroup, + const TableWorkspace_sptr &dt) { WorkspaceGroup_sptr outWS = boost::make_shared<WorkspaceGroup>(); for (int i = 0; i < wsGroup->getNumberOfEntries(); i++) { auto ws = boost::dynamic_pointer_cast<MatrixWorkspace>(wsGroup->getItem(i)); @@ -273,8 +274,9 @@ WorkspaceGroup_sptr MuonProcess::applyDTC(WorkspaceGroup_sptr wsGroup, * offset * @return Corrected workspaces */ -WorkspaceGroup_sptr MuonProcess::correctWorkspaces(WorkspaceGroup_sptr wsGroup, - double loadedTimeZero) { +WorkspaceGroup_sptr +MuonProcess::correctWorkspaces(const WorkspaceGroup_sptr &wsGroup, + double loadedTimeZero) { WorkspaceGroup_sptr outWS = boost::make_shared<WorkspaceGroup>(); for (int i = 0; i < wsGroup->getNumberOfEntries(); i++) { auto ws = boost::dynamic_pointer_cast<MatrixWorkspace>(wsGroup->getItem(i)); diff --git a/Framework/WorkflowAlgorithms/src/ProcessIndirectFitParameters.cpp b/Framework/WorkflowAlgorithms/src/ProcessIndirectFitParameters.cpp index 60fe863b6465cddaccd09dd0bcdcca9c333828d1..8da85b6f7c7236e919537b24cf70ea6874dd0ca5 100644 --- a/Framework/WorkflowAlgorithms/src/ProcessIndirectFitParameters.cpp +++ b/Framework/WorkflowAlgorithms/src/ProcessIndirectFitParameters.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidWorkflowAlgorithms/ProcessIndirectFitParameters.h" @@ -80,7 +80,7 @@ void extractColumnValues(Column const &column, std::size_t startRow, template <typename T, typename OutputIterator> void extractValuesFromColumns(std::size_t startRow, std::size_t endRow, - std::vector<Column_const_sptr> columns, + const std::vector<Column_const_sptr> &columns, OutputIterator outputIt) { for (auto &&column : columns) extractColumnValues<T>(*column, startRow, endRow, outputIt); @@ -104,7 +104,9 @@ std::vector<double> getNumericColumnValuesOrIndices(Column const &column, return getIncrementingSequence(0.0, length); } -std::string getColumnName(Column_const_sptr column) { return column->name(); } +std::string getColumnName(const Column_const_sptr &column) { + return column->name(); +} std::vector<std::string> extractColumnNames(std::vector<Column_const_sptr> const &columns) { diff --git a/Framework/WorkflowAlgorithms/src/RefRoi.cpp b/Framework/WorkflowAlgorithms/src/RefRoi.cpp index b339aa55479af6206f3668e0674d821afe798703..d1423149c302f82031e4ec90c665486891276bd2 100644 --- a/Framework/WorkflowAlgorithms/src/RefRoi.cpp +++ b/Framework/WorkflowAlgorithms/src/RefRoi.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidWorkflowAlgorithms/RefRoi.h" #include "MantidAPI/Axis.h" diff --git a/Framework/WorkflowAlgorithms/src/SANSBeamFinder.cpp b/Framework/WorkflowAlgorithms/src/SANSBeamFinder.cpp index 557964e8b21ba24a776e5256a9ee4a24480ed466..7b1eab7f3d375a11aad37904f38435cdd5f7240d 100644 --- a/Framework/WorkflowAlgorithms/src/SANSBeamFinder.cpp +++ b/Framework/WorkflowAlgorithms/src/SANSBeamFinder.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidWorkflowAlgorithms/SANSBeamFinder.h" #include "MantidAPI/AlgorithmProperty.h" @@ -246,8 +246,8 @@ void SANSBeamFinder::exec() { * 2016/05/06 : this only works for RectangularDetector * */ -void SANSBeamFinder::maskEdges(MatrixWorkspace_sptr beamCenterWS, int high, - int low, int left, int right, +void SANSBeamFinder::maskEdges(const MatrixWorkspace_sptr &beamCenterWS, + int high, int low, int left, int right, const std::string &componentName) { auto instrument = beamCenterWS->getInstrument(); diff --git a/Framework/WorkflowAlgorithms/src/SANSBeamFluxCorrection.cpp b/Framework/WorkflowAlgorithms/src/SANSBeamFluxCorrection.cpp index e39bfc3601467fde864c757a3fe58fe337fd20bc..9f20465e286e866c351b834fb752819a694fe9b0 100644 --- a/Framework/WorkflowAlgorithms/src/SANSBeamFluxCorrection.cpp +++ b/Framework/WorkflowAlgorithms/src/SANSBeamFluxCorrection.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidWorkflowAlgorithms/SANSBeamFluxCorrection.h" #include "MantidAPI/AlgorithmProperty.h" diff --git a/Framework/WorkflowAlgorithms/src/SANSSensitivityCorrection.cpp b/Framework/WorkflowAlgorithms/src/SANSSensitivityCorrection.cpp index c6234a198b9e331d214279a6b9ffd06ef2c2f7da..f8cbf4fcc91f35d90510d2e3d2cd35a26faf7a6f 100644 --- a/Framework/WorkflowAlgorithms/src/SANSSensitivityCorrection.cpp +++ b/Framework/WorkflowAlgorithms/src/SANSSensitivityCorrection.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidWorkflowAlgorithms/SANSSensitivityCorrection.h" #include "MantidAPI/AlgorithmManager.h" diff --git a/Framework/WorkflowAlgorithms/src/SANSSolidAngleCorrection.cpp b/Framework/WorkflowAlgorithms/src/SANSSolidAngleCorrection.cpp index d23c562b5487b8739ab53667120c1111e3cda1c2..ce8af333a80eda0eee4f1724979df2e832c4c7c2 100644 --- a/Framework/WorkflowAlgorithms/src/SANSSolidAngleCorrection.cpp +++ b/Framework/WorkflowAlgorithms/src/SANSSolidAngleCorrection.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidWorkflowAlgorithms/SANSSolidAngleCorrection.h" #include "MantidAPI/AlgorithmProperty.h" diff --git a/Framework/WorkflowAlgorithms/src/SetupEQSANSReduction.cpp b/Framework/WorkflowAlgorithms/src/SetupEQSANSReduction.cpp index ed91c3def57473d97bbf6150ddcb1f8f2a2371d8..3b364ee50b6a5d618ddad8af53bafd3d2464a592 100644 --- a/Framework/WorkflowAlgorithms/src/SetupEQSANSReduction.cpp +++ b/Framework/WorkflowAlgorithms/src/SetupEQSANSReduction.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes @@ -890,7 +890,7 @@ void SetupEQSANSReduction::exec() { } void SetupEQSANSReduction::setupSensitivity( - boost::shared_ptr<PropertyManager> reductionManager) { + const boost::shared_ptr<PropertyManager> &reductionManager) { const std::string reductionManagerName = getProperty("ReductionProperties"); const std::string sensitivityFile = getPropertyValue("SensitivityFile"); @@ -957,7 +957,7 @@ void SetupEQSANSReduction::setupSensitivity( } } void SetupEQSANSReduction::setupTransmission( - boost::shared_ptr<PropertyManager> reductionManager) { + const boost::shared_ptr<PropertyManager> &reductionManager) { const std::string reductionManagerName = getProperty("ReductionProperties"); // Transmission options const bool thetaDependentTrans = getProperty("ThetaDependentTransmission"); @@ -1042,7 +1042,7 @@ void SetupEQSANSReduction::setupTransmission( } void SetupEQSANSReduction::setupBackground( - boost::shared_ptr<PropertyManager> reductionManager) { + const boost::shared_ptr<PropertyManager> &reductionManager) { const std::string reductionManagerName = getProperty("ReductionProperties"); // Background const std::string backgroundFile = getPropertyValue("BackgroundFiles"); diff --git a/Framework/WorkflowAlgorithms/src/SetupHFIRReduction.cpp b/Framework/WorkflowAlgorithms/src/SetupHFIRReduction.cpp index c88c09828c2cae8ee74c3587905b26176992063e..dfb032453ad2074d79c4bb60d394b2399b9923d9 100644 --- a/Framework/WorkflowAlgorithms/src/SetupHFIRReduction.cpp +++ b/Framework/WorkflowAlgorithms/src/SetupHFIRReduction.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes @@ -904,7 +904,7 @@ void SetupHFIRReduction::exec() { } void SetupHFIRReduction::setupSensitivity( - boost::shared_ptr<PropertyManager> reductionManager) { + const boost::shared_ptr<PropertyManager> &reductionManager) { const std::string reductionManagerName = getProperty("ReductionProperties"); const std::string sensitivityFile = getPropertyValue("SensitivityFile"); @@ -994,7 +994,7 @@ void SetupHFIRReduction::setupSensitivity( } void SetupHFIRReduction::setupBackground( - boost::shared_ptr<PropertyManager> reductionManager) { + const boost::shared_ptr<PropertyManager> &reductionManager) { const std::string reductionManagerName = getProperty("ReductionProperties"); // Background const std::string backgroundFile = getPropertyValue("BackgroundFiles"); @@ -1112,7 +1112,7 @@ void SetupHFIRReduction::setupBackground( } void SetupHFIRReduction::setupTransmission( - boost::shared_ptr<PropertyManager> reductionManager) { + const boost::shared_ptr<PropertyManager> &reductionManager) { const std::string reductionManagerName = getProperty("ReductionProperties"); // Transmission options const bool thetaDependentTrans = getProperty("ThetaDependentTransmission"); diff --git a/Framework/WorkflowAlgorithms/src/SofTwoThetaTOF.cpp b/Framework/WorkflowAlgorithms/src/SofTwoThetaTOF.cpp index 2bccf31cd4a0eff2404d80760aaf2bf8b573b359..429c34aedd453a301dcf937a7a697642e0286260 100644 --- a/Framework/WorkflowAlgorithms/src/SofTwoThetaTOF.cpp +++ b/Framework/WorkflowAlgorithms/src/SofTwoThetaTOF.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidWorkflowAlgorithms/SofTwoThetaTOF.h" diff --git a/Framework/WorkflowAlgorithms/src/StepScan.cpp b/Framework/WorkflowAlgorithms/src/StepScan.cpp index de98cd56ebd6e075f1f643786f25433fa2209625..3efd351eca42d2ec861de0eab65c9db81de0572f 100644 --- a/Framework/WorkflowAlgorithms/src/StepScan.cpp +++ b/Framework/WorkflowAlgorithms/src/StepScan.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidWorkflowAlgorithms/StepScan.h" #include "MantidAPI/ITableWorkspace.h" @@ -114,14 +114,14 @@ void StepScan::exec() { * pointer. */ DataObjects::EventWorkspace_sptr -StepScan::getMonitorWorkspace(API::MatrixWorkspace_sptr inputWS) { +StepScan::getMonitorWorkspace(const API::MatrixWorkspace_sptr &inputWS) { // See if there's a monitor workspace inside the input one return boost::dynamic_pointer_cast<DataObjects::EventWorkspace>( inputWS->monitorWorkspace()); } DataObjects::EventWorkspace_sptr -StepScan::cloneInputWorkspace(API::Workspace_sptr inputWS) { +StepScan::cloneInputWorkspace(const API::Workspace_sptr &inputWS) { IAlgorithm_sptr clone = createChildAlgorithm("CloneWorkspace"); clone->setProperty("InputWorkspace", inputWS); clone->executeAsChildAlg(); @@ -134,8 +134,8 @@ StepScan::cloneInputWorkspace(API::Workspace_sptr inputWS) { * @param inputWS The input workspace * @param maskWS A masking workspace */ -void StepScan::runMaskDetectors(MatrixWorkspace_sptr inputWS, - MatrixWorkspace_sptr maskWS) { +void StepScan::runMaskDetectors(const MatrixWorkspace_sptr &inputWS, + const MatrixWorkspace_sptr &maskWS) { IAlgorithm_sptr maskingAlg = createChildAlgorithm("MaskDetectors"); maskingAlg->setProperty<MatrixWorkspace_sptr>("Workspace", inputWS); maskingAlg->setProperty<MatrixWorkspace_sptr>("MaskedWorkspace", maskWS); @@ -147,7 +147,7 @@ void StepScan::runMaskDetectors(MatrixWorkspace_sptr inputWS, * @param xmin The minimum value of the filter * @param xmax The maximum value of the filter */ -void StepScan::runFilterByXValue(MatrixWorkspace_sptr inputWS, +void StepScan::runFilterByXValue(const MatrixWorkspace_sptr &inputWS, const double xmin, const double xmax) { std::string rangeUnit = getProperty("RangeUnit"); // Run ConvertUnits on the input workspace if xmin/max were given in a diff --git a/Framework/WorkflowAlgorithms/src/WorkflowAlgorithmHelpers.cpp b/Framework/WorkflowAlgorithms/src/WorkflowAlgorithmHelpers.cpp index 2cf8306ff33102b63137e846e505a9b07e7e78ab..6484f949eb628759a46d34e817510bc171647217 100644 --- a/Framework/WorkflowAlgorithms/src/WorkflowAlgorithmHelpers.cpp +++ b/Framework/WorkflowAlgorithms/src/WorkflowAlgorithmHelpers.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidWorkflowAlgorithms/WorkflowAlgorithmHelpers.h" diff --git a/Framework/WorkflowAlgorithms/test/AlignAndFocusPowderTest.h b/Framework/WorkflowAlgorithms/test/AlignAndFocusPowderTest.h index b303b06e701cbbdf59c8ed307047729e13ee6199..f3c3cd481e0ceb2bb98add6a1c5bc8d6aa70e123 100644 --- a/Framework/WorkflowAlgorithms/test/AlignAndFocusPowderTest.h +++ b/Framework/WorkflowAlgorithms/test/AlignAndFocusPowderTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -692,7 +692,8 @@ public: } /* Utility functions */ - void loadDiffCal(std::string calfilename, bool group, bool cal, bool mask) { + void loadDiffCal(const std::string &calfilename, bool group, bool cal, + bool mask) { LoadDiffCal loadDiffAlg; loadDiffAlg.initialize(); loadDiffAlg.setPropertyValue("Filename", calfilename); @@ -704,7 +705,7 @@ public: loadDiffAlg.execute(); } - void groupAllBanks(std::string m_inputWS) { + void groupAllBanks(const std::string &m_inputWS) { CreateGroupingWorkspace groupAlg; groupAlg.initialize(); groupAlg.setPropertyValue("InputWorkspace", m_inputWS); @@ -713,7 +714,7 @@ public: groupAlg.execute(); } - void rebin(std::string params, bool preserveEvents = true) { + void rebin(const std::string ¶ms, bool preserveEvents = true) { Rebin rebin; rebin.initialize(); rebin.setPropertyValue("InputWorkspace", m_inputWS); @@ -734,8 +735,9 @@ public: resamplexAlg.execute(); } - std::string createArgForNumberHistograms(double val, MatrixWorkspace_sptr ws, - std::string delimiter = ",") { + std::string createArgForNumberHistograms(double val, + const MatrixWorkspace_sptr &ws, + const std::string &delimiter = ",") { std::vector<std::string> vec; for (size_t i = 0; i < ws->getNumberHistograms(); i++) vec.emplace_back(boost::lexical_cast<std::string>(val)); diff --git a/Framework/WorkflowAlgorithms/test/EQSANSQ2DTest.py b/Framework/WorkflowAlgorithms/test/EQSANSQ2DTest.py index 8e0d44b23542de30ab50fa7bbce280e717affb9f..6c6357131540866ba2267f12fdd8974ef0269cd1 100644 --- a/Framework/WorkflowAlgorithms/test/EQSANSQ2DTest.py +++ b/Framework/WorkflowAlgorithms/test/EQSANSQ2DTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + import unittest from mantid.simpleapi import * diff --git a/Framework/WorkflowAlgorithms/test/ExtractQENSMembersTest.h b/Framework/WorkflowAlgorithms/test/ExtractQENSMembersTest.h index 0b08d3021540dd9335a3c0575d807f52bcd141a8..b3e725f6513114743b65be3a754e74feb4f17606 100644 --- a/Framework/WorkflowAlgorithms/test/ExtractQENSMembersTest.h +++ b/Framework/WorkflowAlgorithms/test/ExtractQENSMembersTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -26,6 +26,7 @@ #include <algorithm> #include <memory> #include <random> +#include <utility> using Mantid::Algorithms::ExtractQENSMembers; @@ -94,7 +95,7 @@ public: } private: - void checkMembersOutput(WorkspaceGroup_sptr membersWorkspace, + void checkMembersOutput(const WorkspaceGroup_sptr &membersWorkspace, const std::vector<std::string> &members, const std::string &outputName, size_t numSpectra, const std::vector<double> &dataX) const { @@ -112,31 +113,32 @@ private: } } - WorkspaceGroup_sptr extractMembers(MatrixWorkspace_sptr inputWs, - WorkspaceGroup_sptr resultGroupWs, + WorkspaceGroup_sptr extractMembers(const MatrixWorkspace_sptr &inputWs, + const WorkspaceGroup_sptr &resultGroupWs, const std::string &outputWsName) const { - auto extractAlgorithm = - extractMembersAlgorithm(inputWs, resultGroupWs, outputWsName); + auto extractAlgorithm = extractMembersAlgorithm( + std::move(inputWs), std::move(resultGroupWs), outputWsName); extractAlgorithm->execute(); return AnalysisDataService::Instance().retrieveWS<WorkspaceGroup>( outputWsName); } WorkspaceGroup_sptr - extractMembers(MatrixWorkspace_sptr inputWs, - WorkspaceGroup_sptr resultGroupWs, + extractMembers(const MatrixWorkspace_sptr &inputWs, + const WorkspaceGroup_sptr &resultGroupWs, const std::vector<std::string> &convolvedMembers, const std::string &outputWsName) const { - auto extractAlgorithm = extractMembersAlgorithm( - inputWs, resultGroupWs, convolvedMembers, outputWsName); + auto extractAlgorithm = + extractMembersAlgorithm(std::move(inputWs), std::move(resultGroupWs), + convolvedMembers, outputWsName); extractAlgorithm->execute(); return AnalysisDataService::Instance().retrieveWS<WorkspaceGroup>( outputWsName); } IAlgorithm_sptr - extractMembersAlgorithm(MatrixWorkspace_sptr inputWs, - WorkspaceGroup_sptr resultGroupWs, + extractMembersAlgorithm(const MatrixWorkspace_sptr &inputWs, + const WorkspaceGroup_sptr &resultGroupWs, const std::string &outputWsName) const { auto extractMembersAlg = AlgorithmManager::Instance().create("ExtractQENSMembers"); @@ -147,8 +149,8 @@ private: } IAlgorithm_sptr - extractMembersAlgorithm(MatrixWorkspace_sptr inputWs, - WorkspaceGroup_sptr resultGroupWs, + extractMembersAlgorithm(const MatrixWorkspace_sptr &inputWs, + const WorkspaceGroup_sptr &resultGroupWs, const std::vector<std::string> &convolvedMembers, const std::string &outputWsName) const { auto extractMembersAlg = @@ -205,9 +207,11 @@ private: return createWorkspace->getProperty("OutputWorkspace"); } - MatrixWorkspace_sptr appendSpectra(MatrixWorkspace_sptr workspace, - MatrixWorkspace_sptr spectraWS) const { - auto appendAlgorithm = appendSpectraAlgorithm(workspace, spectraWS); + MatrixWorkspace_sptr + appendSpectra(const MatrixWorkspace_sptr &workspace, + const MatrixWorkspace_sptr &spectraWS) const { + auto appendAlgorithm = + appendSpectraAlgorithm(std::move(workspace), std::move(spectraWS)); appendAlgorithm->execute(); return appendAlgorithm->getProperty("OutputWorkspace"); } @@ -257,8 +261,9 @@ private: return createWorkspace; } - IAlgorithm_sptr appendSpectraAlgorithm(MatrixWorkspace_sptr workspace, - MatrixWorkspace_sptr spectraWS) const { + IAlgorithm_sptr + appendSpectraAlgorithm(const MatrixWorkspace_sptr &workspace, + const MatrixWorkspace_sptr &spectraWS) const { auto appendAlgorithm = AlgorithmManager::Instance().create("AppendSpectra"); appendAlgorithm->setChild(true); appendAlgorithm->setProperty("InputWorkspace1", workspace); diff --git a/Framework/WorkflowAlgorithms/test/HFIRLoadTest.h b/Framework/WorkflowAlgorithms/test/HFIRLoadTest.h index 77d6b306cd1bb7bee176e7d17b1625160374e10e..b814b3de004aaba435391ceddc2d742c9329237a 100644 --- a/Framework/WorkflowAlgorithms/test/HFIRLoadTest.h +++ b/Framework/WorkflowAlgorithms/test/HFIRLoadTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/WorkflowAlgorithms/test/IMuonAsymmetryCalculatorTest.h b/Framework/WorkflowAlgorithms/test/IMuonAsymmetryCalculatorTest.h index 153c8c8212b313b3b606a16f00d352b1d06e716f..aa72889fcc5415450969b78cc310ee322d0e9e88 100644 --- a/Framework/WorkflowAlgorithms/test/IMuonAsymmetryCalculatorTest.h +++ b/Framework/WorkflowAlgorithms/test/IMuonAsymmetryCalculatorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/WorkflowAlgorithms/test/LoadEventAndCompressTest.h b/Framework/WorkflowAlgorithms/test/LoadEventAndCompressTest.h index bca168ae7eeb06c273887751308c471dab1c3a81..3d7d1d269cf055e7c7486b6a2099bb757db65318 100644 --- a/Framework/WorkflowAlgorithms/test/LoadEventAndCompressTest.h +++ b/Framework/WorkflowAlgorithms/test/LoadEventAndCompressTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/WorkflowAlgorithms/test/MuonProcessTest.h b/Framework/WorkflowAlgorithms/test/MuonProcessTest.h index 2682f2d1956e002d8c36d3af3a43cb27d5d7ee23..3cadd24cc0bdc0bd914307c62eb6cffbd9a96e14 100644 --- a/Framework/WorkflowAlgorithms/test/MuonProcessTest.h +++ b/Framework/WorkflowAlgorithms/test/MuonProcessTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/WorkflowAlgorithms/test/PrecompiledHeader.h b/Framework/WorkflowAlgorithms/test/PrecompiledHeader.h index 2938ffd0a3e091e68eeb75289179e3af4211b5a3..e6fdf6551cbda585cc789772079a0760cddd669b 100644 --- a/Framework/WorkflowAlgorithms/test/PrecompiledHeader.h +++ b/Framework/WorkflowAlgorithms/test/PrecompiledHeader.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/WorkflowAlgorithms/test/ProcessIndirectFitParametersTest.h b/Framework/WorkflowAlgorithms/test/ProcessIndirectFitParametersTest.h index 4a622de45231af1120f38e3631aafa2e6684722c..504bda99ee14d9d8677355d87e3cec6c0a2f8277 100644 --- a/Framework/WorkflowAlgorithms/test/ProcessIndirectFitParametersTest.h +++ b/Framework/WorkflowAlgorithms/test/ProcessIndirectFitParametersTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/WorkflowAlgorithms/test/SANSBeamFluxCorrectionTest.py b/Framework/WorkflowAlgorithms/test/SANSBeamFluxCorrectionTest.py index 3b6ac874c048df35cae6b5df6cd93d8651132a56..5ead9e9fdc2d7bd10e9a5a8b41c0bebbe267a1ed 100644 --- a/Framework/WorkflowAlgorithms/test/SANSBeamFluxCorrectionTest.py +++ b/Framework/WorkflowAlgorithms/test/SANSBeamFluxCorrectionTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + import unittest import mantid diff --git a/Framework/WorkflowAlgorithms/test/SANSSolidAngleCorrectionTest.h b/Framework/WorkflowAlgorithms/test/SANSSolidAngleCorrectionTest.h index 803c87b641bac5568474b0adbe3069769521f01e..05b93fdfdf1501e16632039dcd716aa4bddd742c 100644 --- a/Framework/WorkflowAlgorithms/test/SANSSolidAngleCorrectionTest.h +++ b/Framework/WorkflowAlgorithms/test/SANSSolidAngleCorrectionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/WorkflowAlgorithms/test/SofTwoThetaTOFTest.h b/Framework/WorkflowAlgorithms/test/SofTwoThetaTOFTest.h index 9011a6109a1383af73fd6561b2300a7caa96a1dd..a9830aab27d84559003891ef7be039ebff06d9c0 100644 --- a/Framework/WorkflowAlgorithms/test/SofTwoThetaTOFTest.h +++ b/Framework/WorkflowAlgorithms/test/SofTwoThetaTOFTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Framework/WorkflowAlgorithms/test/StepScanTest.h b/Framework/WorkflowAlgorithms/test/StepScanTest.h index 99c22c83eded5f145ccb51a396d734081111be70..765d3fe2b2a42816eda8af0f8987bfb1402a6d61 100644 --- a/Framework/WorkflowAlgorithms/test/StepScanTest.h +++ b/Framework/WorkflowAlgorithms/test/StepScanTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/MantidPlot/ipython_widget/__init__.py b/MantidPlot/ipython_widget/__init__.py index 4f837dccc8527ba1152ed8ce91dee53d49ae4187..1300e7ee5ed5416e7f3eacd883017afe7047c7f7 100644 --- a/MantidPlot/ipython_widget/__init__.py +++ b/MantidPlot/ipython_widget/__init__.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/MantidPlot/ipython_widget/mantid_ipython_widget.py b/MantidPlot/ipython_widget/mantid_ipython_widget.py index 1db19db04451d36f6222875d0e3f21346218eff4..2ab0a34db9f252e8a1843b5e9499a92edddf2216 100644 --- a/MantidPlot/ipython_widget/mantid_ipython_widget.py +++ b/MantidPlot/ipython_widget/mantid_ipython_widget.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/MantidPlot/mantid_qt_settings_editor.py b/MantidPlot/mantid_qt_settings_editor.py index fb77e12479efeff87d09117c53f8d0ecff4b5547..7f89c6a0ef93396fce0db096871862da8912ecd9 100755 --- a/MantidPlot/mantid_qt_settings_editor.py +++ b/MantidPlot/mantid_qt_settings_editor.py @@ -1,10 +1,9 @@ #!/usr/bin/python - # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # diff --git a/MantidPlot/mantidplot.py b/MantidPlot/mantidplot.py index dba4b7c8de752fab05d62bac358858e4e5f31e52..a81905468499164d37fd50aa50ca14a91ce544de 100644 --- a/MantidPlot/mantidplot.py +++ b/MantidPlot/mantidplot.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #------------------------------------------------------------------- # mantidplot.py diff --git a/MantidPlot/mantidplotrc.py b/MantidPlot/mantidplotrc.py index a0c455c11bcb615618653aad67b60ea94286c64c..1b463a9c7f2cdd7c4c20b6d5d3a3f1cfa8ae06f5 100644 --- a/MantidPlot/mantidplotrc.py +++ b/MantidPlot/mantidplotrc.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #------------------------------------------------------------------------------- # mantidplotrc.py diff --git a/MantidPlot/package_python_macports.py b/MantidPlot/package_python_macports.py index 6d721ffb93c4b0a0b90a5ff8bb3776ba01d81710..f67bab73af08ca1dc5bc0cfd99147e37826f9e38 100755 --- a/MantidPlot/package_python_macports.py +++ b/MantidPlot/package_python_macports.py @@ -2,8 +2,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + """ Script to pack the python libraries diff --git a/MantidPlot/pymantidplot/__init__.py b/MantidPlot/pymantidplot/__init__.py index e90d13f7a0ef6b1acf172c9bcf7d886a2ff7c8b5..c8d9a29887ba5a7c2e1b81a5f3035d0131b95417 100644 --- a/MantidPlot/pymantidplot/__init__.py +++ b/MantidPlot/pymantidplot/__init__.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + """ MantidPlot module to gain access to plotting functions etc. diff --git a/MantidPlot/pymantidplot/mpl/__init__.py b/MantidPlot/pymantidplot/mpl/__init__.py index d2cfb75232dfb59fac674e2b49dba356e18ebbc1..ffedf5d542e31f4d22d7833e9c94f5003f02b3cb 100644 --- a/MantidPlot/pymantidplot/mpl/__init__.py +++ b/MantidPlot/pymantidplot/mpl/__init__.py @@ -1,6 +1,6 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + diff --git a/MantidPlot/pymantidplot/mpl/backend_mtdqt4agg.py b/MantidPlot/pymantidplot/mpl/backend_mtdqt4agg.py index e32a6c6f8b609be44c934a5ec74a212601e2c2a2..5fc30c9d8e030be57c0df89a3c85d75b8ca21154 100644 --- a/MantidPlot/pymantidplot/mpl/backend_mtdqt4agg.py +++ b/MantidPlot/pymantidplot/mpl/backend_mtdqt4agg.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + """ Matplotlib backend for MantidPlot. diff --git a/MantidPlot/pymantidplot/proxies.py b/MantidPlot/pymantidplot/proxies.py index 32fc8e8b03262bf909780b8ff35295390841f2d7..617b336c94729fa3b12fad9e00bb30f1bd269a7f 100644 --- a/MantidPlot/pymantidplot/proxies.py +++ b/MantidPlot/pymantidplot/proxies.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + """ Module containing classes that act as proxies to the various MantidPlot gui objects that are diff --git a/MantidPlot/pymantidplot/qtiplot.py b/MantidPlot/pymantidplot/qtiplot.py index 084c8de118ae15af7089e15dc92b530c755a0eb2..9a3ebdf99bed5bd2b582129e9f229b4923196bc7 100644 --- a/MantidPlot/pymantidplot/qtiplot.py +++ b/MantidPlot/pymantidplot/qtiplot.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + """ MantidPlot module with functions specific to the traditional, diff --git a/MantidPlot/src/ApplicationWindow.cpp b/MantidPlot/src/ApplicationWindow.cpp index a403111cc381f952ab5a9833f4f60e0c5a4aac4f..b5af9c6165523e02640d09044a7c2cc83e04dbee 100644 --- a/MantidPlot/src/ApplicationWindow.cpp +++ b/MantidPlot/src/ApplicationWindow.cpp @@ -180,6 +180,7 @@ #include <gsl/gsl_sort.h> #include <boost/regex.hpp> +#include <utility> #include <Poco/Path.h> @@ -3161,7 +3162,7 @@ void ApplicationWindow::initTable(Table *w, const QString &caption) { * base */ TableStatistics *ApplicationWindow::newTableStatistics(Table *base, int type, - QList<int> target, + const QList<int> &target, const QString &caption) { TableStatistics *s = new TableStatistics(scriptingEnv(), this, base, (TableStatistics::Type)type, target); @@ -4231,7 +4232,7 @@ void ApplicationWindow::importASCII( const QString &local_column_separator, int local_ignored_lines, bool local_rename_columns, bool local_strip_spaces, bool local_simplify_spaces, bool local_import_comments, - bool update_dec_separators, QLocale local_separators, + bool update_dec_separators, const QLocale &local_separators, const QString &local_comment_string, bool import_read_only, int endLineChar, const QString &sepforloadAscii) { if (files.isEmpty()) @@ -6158,7 +6159,7 @@ void ApplicationWindow::loadDataFile() { saveSettings(); // save new list of recent files } -void ApplicationWindow::loadDataFileByName(QString fn) { +void ApplicationWindow::loadDataFileByName(const QString &fn) { QFileInfo fnInfo(fn); AlgorithmInputHistory::Instance().setPreviousDirectory( fnInfo.absoluteDir().path()); @@ -13709,7 +13710,7 @@ void ApplicationWindow::updateRecentProjectsList() { recentProjects[i]); } -void ApplicationWindow::updateRecentFilesList(QString fname) { +void ApplicationWindow::updateRecentFilesList(const QString &fname) { if (!fname.isEmpty()) { recentFiles.removeAll(fname); recentFiles.push_front(fname); @@ -16791,8 +16792,8 @@ bool ApplicationWindow::isOfType(const QObject *obj, * @param sourceFile The full path to the .project file * @return True is loading was successful, false otherwise */ -bool ApplicationWindow::loadProjectRecovery(std::string sourceFile, - std::string recoveryFolder) { +bool ApplicationWindow::loadProjectRecovery(const std::string &sourceFile, + const std::string &recoveryFolder) { // Wait on this thread until scriptWindow is finished (Should be a seperate // thread) do { @@ -16801,7 +16802,7 @@ bool ApplicationWindow::loadProjectRecovery(std::string sourceFile, const bool isRecovery = true; ProjectSerialiser projectWriter(this, isRecovery); // File version is not applicable to project recovery - so set to 0 - const auto loadSuccess = projectWriter.load(sourceFile, 0); + const auto loadSuccess = projectWriter.load(std::move(sourceFile), 0); // Handle the removal of old checkpoints and start project saving again Poco::Path deletePath(recoveryFolder); @@ -16820,7 +16821,7 @@ bool ApplicationWindow::loadProjectRecovery(std::string sourceFile, * @param destination:: The full path to write the recovery file to * @return True if saving is successful, false otherwise */ -bool ApplicationWindow::saveProjectRecovery(std::string destination) { +bool ApplicationWindow::saveProjectRecovery(const std::string &destination) { const bool isRecovery = true; ProjectSerialiser projectWriter(this, isRecovery); return projectWriter.save(QString::fromStdString(destination)); diff --git a/MantidPlot/src/ApplicationWindow.h b/MantidPlot/src/ApplicationWindow.h index 0bc349a2f26071d732fd8fb884a755a10ed4ffb2..df62345d86aab9087af8c83b884fdd53c9dd98d7 100644 --- a/MantidPlot/src/ApplicationWindow.h +++ b/MantidPlot/src/ApplicationWindow.h @@ -233,7 +233,7 @@ public slots: /// Load mantid data files using generic load algorithm, opening user dialog void loadDataFile(); /// Load mantid data files (generic load algorithm) - void loadDataFileByName(QString fn); + void loadDataFileByName(const QString &fn); /// Open from the list of recent files void openRecentFile(QAction *action); @@ -492,7 +492,7 @@ public slots: int local_ignored_lines, bool local_rename_columns, bool local_strip_spaces, bool local_simplify_spaces, bool local_import_comments, bool update_dec_separators, - QLocale local_separators, + const QLocale &local_separators, const QString &local_comment_string, bool import_read_only, int endLineChar, const QString &sepforloadAscii); void exportAllTables(const QString &sep, bool colNames, bool colComments, @@ -503,7 +503,7 @@ public slots: //! recalculate selected cells of current table void recalculateTable(); - TableStatistics *newTableStatistics(Table *base, int type, QList<int>, + TableStatistics *newTableStatistics(Table *base, int type, const QList<int> &, const QString &caption = QString::null); //@} @@ -916,7 +916,7 @@ public slots: void updateRecentProjectsList(); //! Inserts file name in the list of recent files (if fname not empty) and // updates the "recent files" menu - void updateRecentFilesList(QString fname = ""); + void updateRecentFilesList(const QString &fname = ""); //! Open QtiPlot homepage in external browser void showHomePage(); //! Open bug tracking system at berliOS in external browser @@ -1123,11 +1123,12 @@ public slots: bool isOfType(const QObject *obj, const char *toCompare) const; - bool loadProjectRecovery(std::string sourceFile, std::string recoveryFolder); + bool loadProjectRecovery(const std::string &sourceFile, + const std::string &recoveryFolder); // The string must be copied from the other thread in saveProjectRecovery /// Saves the current project as part of recovery auto saving - bool saveProjectRecovery(std::string destination); + bool saveProjectRecovery(const std::string &destination); /// Checks for and attempts project recovery if required void checkForProjectRecovery(); diff --git a/MantidPlot/src/AssociationsDialog.cpp b/MantidPlot/src/AssociationsDialog.cpp index c2f5329ef7b454fb781d78851d8b622b62db79d0..88be52400b02868861f3c38c48c90cd91dc662c3 100644 --- a/MantidPlot/src/AssociationsDialog.cpp +++ b/MantidPlot/src/AssociationsDialog.cpp @@ -45,8 +45,9 @@ #include <QMessageBox> #include <QPushButton> #include <QTableWidget> +#include <utility> -AssociationsDialog::AssociationsDialog(Graph *g, Qt::WFlags fl) +AssociationsDialog::AssociationsDialog(Graph *g, const Qt::WFlags &fl) : QDialog(g, fl) { setObjectName("AssociationsDialog"); setWindowTitle(tr("MantidPlot - Plot Associations")); @@ -192,7 +193,7 @@ QString AssociationsDialog::plotAssociation(const QString &text) { } void AssociationsDialog::initTablesList(QList<MdiSubWindow *> lst, int curve) { - tables = lst; + tables = std::move(lst); active_table = nullptr; if (curve < 0 || curve >= static_cast<int>(associations->count())) diff --git a/MantidPlot/src/AssociationsDialog.h b/MantidPlot/src/AssociationsDialog.h index d247ba76570159944f0422160f9774c42431c848..502b6f6df429ebdc7bc436ff106e5983e5144701 100644 --- a/MantidPlot/src/AssociationsDialog.h +++ b/MantidPlot/src/AssociationsDialog.h @@ -46,7 +46,7 @@ class AssociationsDialog : public QDialog { Q_OBJECT public: - AssociationsDialog(Graph *g, Qt::WFlags fl = nullptr); + AssociationsDialog(Graph *g, const Qt::WFlags &fl = nullptr); void initTablesList(QList<MdiSubWindow *> lst, int curve); diff --git a/MantidPlot/src/AxesDialog.cpp b/MantidPlot/src/AxesDialog.cpp index 8548910e0720d35d931f9177eeefb32704387316..912115a736a1ad8132d46528fc6f14dfd4e570a5 100644 --- a/MantidPlot/src/AxesDialog.cpp +++ b/MantidPlot/src/AxesDialog.cpp @@ -1496,7 +1496,7 @@ Mantid::Kernel::Logger g_log("AxisDialog"); * @param g :: the graph the dialog is settign the options for * @param fl :: The QT flags for this window */ -AxesDialog::AxesDialog(ApplicationWindow *app, Graph *g, Qt::WFlags fl) +AxesDialog::AxesDialog(ApplicationWindow *app, Graph *g, const Qt::WFlags &fl) : QDialog(g, fl), m_app(app), m_graph(g) { QPixmap image4((const char **)image4_data); QPixmap image5((const char **)image5_data); diff --git a/MantidPlot/src/AxesDialog.h b/MantidPlot/src/AxesDialog.h index 2c22a6e3db8e899ebada3fd6f071e38bf3945c94..5396b1fcdf6a9d7495dba3f9e76624400f0635f8 100644 --- a/MantidPlot/src/AxesDialog.h +++ b/MantidPlot/src/AxesDialog.h @@ -71,7 +71,7 @@ class AxesDialog : public QDialog { Q_OBJECT public: - AxesDialog(ApplicationWindow *app, Graph *g, Qt::WFlags fl = nullptr); + AxesDialog(ApplicationWindow *app, Graph *g, const Qt::WFlags &fl = nullptr); ~AxesDialog() override; public slots: diff --git a/MantidPlot/src/AxisDetails.cpp b/MantidPlot/src/AxisDetails.cpp index a4f20dc0234562b45ec9006f6951cc9bd77e2fb5..15232361ad8dba4be4244e2ba88ee93d8fb066ea 100644 --- a/MantidPlot/src/AxisDetails.cpp +++ b/MantidPlot/src/AxisDetails.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //--------------------------- // Includes diff --git a/MantidPlot/src/AxisDetails.h b/MantidPlot/src/AxisDetails.h index dd99ccec56609993d0b606af4af8e66c16512a02..436ae0f8dca1400bd351fa266a2bd5af8eb7d55c 100644 --- a/MantidPlot/src/AxisDetails.h +++ b/MantidPlot/src/AxisDetails.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /** This class holds the widgets that hold the details for each axis so the contents diff --git a/MantidPlot/src/BoxCurve.h b/MantidPlot/src/BoxCurve.h index 55f8019398dbbf1c4c7ba68ce9610f23308cfef9..edc1839f79e6e63e1ced972cba9bcea9d9cd4873 100644 --- a/MantidPlot/src/BoxCurve.h +++ b/MantidPlot/src/BoxCurve.h @@ -33,6 +33,8 @@ #include <qwt_plot.h> #include <qwt_symbol.h> +#include <utility> + //! Box curve class BoxCurve : public DataCurve { public: @@ -97,7 +99,7 @@ private: class QwtSingleArrayData : public QwtData { public: QwtSingleArrayData(const double x, QwtArray<double> y, size_t) { - d_y = y; + d_y = std::move(y); d_x = x; }; diff --git a/MantidPlot/src/ColorMapDialog.cpp b/MantidPlot/src/ColorMapDialog.cpp index ec3bd737efdb263d9ca698c27a3041f6cfc06c7d..e161f8a3505d93a0a7bd47f2fb537532e4d4434f 100644 --- a/MantidPlot/src/ColorMapDialog.cpp +++ b/MantidPlot/src/ColorMapDialog.cpp @@ -33,7 +33,7 @@ #include <QLayout> #include <QPushButton> -ColorMapDialog::ColorMapDialog(QWidget *parent, Qt::WFlags fl) +ColorMapDialog::ColorMapDialog(QWidget *parent, const Qt::WFlags &fl) : QDialog(parent, fl), applyBtn(nullptr), closeBtn(nullptr), editor(nullptr), d_matrix(nullptr) { setObjectName("ColorMapDialog"); diff --git a/MantidPlot/src/ColorMapDialog.h b/MantidPlot/src/ColorMapDialog.h index 916b1a9d156f6f0e2fec4168c8d99182bed6eb40..27811a06fefee45b381e1749f55ed4ee5f0199f1 100644 --- a/MantidPlot/src/ColorMapDialog.h +++ b/MantidPlot/src/ColorMapDialog.h @@ -37,7 +37,7 @@ class ColorMapDialog : public QDialog { Q_OBJECT public: - ColorMapDialog(QWidget *parent = nullptr, Qt::WFlags fl = nullptr); + ColorMapDialog(QWidget *parent = nullptr, const Qt::WFlags &fl = nullptr); void setMatrix(Matrix *m); protected slots: diff --git a/MantidPlot/src/ConfigDialog.cpp b/MantidPlot/src/ConfigDialog.cpp index 92fd15419a6677bc93e7c4bd5baf987d1bdbaf6b..5e6fb1596b8d98fab61fbfbf97d46982f7a3bbcf 100644 --- a/MantidPlot/src/ConfigDialog.cpp +++ b/MantidPlot/src/ConfigDialog.cpp @@ -1541,7 +1541,7 @@ void ConfigDialog::correctTreePatrialTicks(QTreeWidgetItem &topLevelCat) { } QTreeWidgetItem * -ConfigDialog::createCheckedTreeItem(QString name, +ConfigDialog::createCheckedTreeItem(const QString &name, Qt::CheckState checkBoxState) { QTreeWidgetItem *item = new QTreeWidgetItem(QStringList(name)); item->setFlags(item->flags() | Qt::ItemIsUserCheckable); diff --git a/MantidPlot/src/ConfigDialog.h b/MantidPlot/src/ConfigDialog.h index 669c79f9e914c9d65df70840e58e5f98436b81e2..e68e6907f6595ebe8a78dbecde6e5e4528601242 100644 --- a/MantidPlot/src/ConfigDialog.h +++ b/MantidPlot/src/ConfigDialog.h @@ -178,7 +178,7 @@ private: void updateMdPlottingSettings(); void setupMdPlottingConnections(); - QTreeWidgetItem *createCheckedTreeItem(QString name, + QTreeWidgetItem *createCheckedTreeItem(const QString &name, Qt::CheckState checkBoxState); QStringList buildHiddenCategoryString(QTreeWidgetItem *parent = nullptr); diff --git a/MantidPlot/src/CurveRangeDialog.cpp b/MantidPlot/src/CurveRangeDialog.cpp index ab2062f8313f8e11abbd77c1190bc9552796206a..0f2159bdb3b854df48b2bc65113cf7e7457b548a 100644 --- a/MantidPlot/src/CurveRangeDialog.cpp +++ b/MantidPlot/src/CurveRangeDialog.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /*************************************************************************** File : CurveRangeDialog.cpp @@ -27,7 +27,7 @@ #include <QPushButton> #include <QSpinBox> -CurveRangeDialog::CurveRangeDialog(QWidget *parent, Qt::WFlags fl) +CurveRangeDialog::CurveRangeDialog(QWidget *parent, const Qt::WFlags &fl) : QDialog(parent, fl), d_curve(nullptr), d_graph(nullptr) { setWindowTitle(tr("MantidPlot - Plot range")); setObjectName("CurveRangeDialog"); diff --git a/MantidPlot/src/CurveRangeDialog.h b/MantidPlot/src/CurveRangeDialog.h index 3d15437c7c9b6e91d1bf41400296fb10e1a8a5fd..28749672cab67d1850eff60b74bc6fd71fef661f 100644 --- a/MantidPlot/src/CurveRangeDialog.h +++ b/MantidPlot/src/CurveRangeDialog.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /*************************************************************************** File : CurveRangeDialog.h @@ -30,7 +30,7 @@ class CurveRangeDialog : public QDialog { Q_OBJECT public: - CurveRangeDialog(QWidget *parent = nullptr, Qt::WFlags fl = nullptr); + CurveRangeDialog(QWidget *parent = nullptr, const Qt::WFlags &fl = nullptr); public slots: void setCurveToModify(Graph *g, int curve); diff --git a/MantidPlot/src/CurvesDialog.cpp b/MantidPlot/src/CurvesDialog.cpp index 9c4b51f0fc4e85e7b488b25edb639ed5564e9184..0539402541b780e71049a0ed4ce79e1d71663851 100644 --- a/MantidPlot/src/CurvesDialog.cpp +++ b/MantidPlot/src/CurvesDialog.cpp @@ -56,7 +56,8 @@ using namespace MantidQt::API; -CurvesDialog::CurvesDialog(ApplicationWindow *app, Graph *g, Qt::WFlags fl) +CurvesDialog::CurvesDialog(ApplicationWindow *app, Graph *g, + const Qt::WFlags &fl) : QDialog(g, fl), d_app(app), d_graph(g) { if (!app) { throw std::logic_error( diff --git a/MantidPlot/src/CurvesDialog.h b/MantidPlot/src/CurvesDialog.h index 90fb0c8a74ec07498243dc5d1552669b84651eef..9d113a1a1dc7638b6fc426b594db7b61c5bf9310 100644 --- a/MantidPlot/src/CurvesDialog.h +++ b/MantidPlot/src/CurvesDialog.h @@ -45,7 +45,8 @@ class CurvesDialog : public QDialog { Q_OBJECT public: - CurvesDialog(ApplicationWindow *app, Graph *g, Qt::WFlags fl = nullptr); + CurvesDialog(ApplicationWindow *app, Graph *g, + const Qt::WFlags &fl = nullptr); ~CurvesDialog() override; private slots: diff --git a/MantidPlot/src/CustomActionDialog.cpp b/MantidPlot/src/CustomActionDialog.cpp index 19d57fcd6fe429057b05e8e975f4175690567614..51b62e93ba6f33012cb8316c05e7b07f444f1ad5 100644 --- a/MantidPlot/src/CustomActionDialog.cpp +++ b/MantidPlot/src/CustomActionDialog.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /*************************************************************************** File : CustomActionDialog.cpp @@ -36,7 +36,7 @@ #include <QShortcut> #include <QToolBar> -CustomActionDialog::CustomActionDialog(QWidget *parent, Qt::WFlags fl) +CustomActionDialog::CustomActionDialog(QWidget *parent, const Qt::WFlags &fl) : QDialog(parent, fl) { setWindowTitle(tr("MantidPlot") + " - " + tr("Add Custom Action")); diff --git a/MantidPlot/src/CustomActionDialog.h b/MantidPlot/src/CustomActionDialog.h index 7952b11f8f8a4295df30f2cc8a9968a95aa55b72..bc7d4c3aa4a49ea50c847108e451fe5f4fc3b241 100644 --- a/MantidPlot/src/CustomActionDialog.h +++ b/MantidPlot/src/CustomActionDialog.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /*************************************************************************** File : CustomActionDialog.h @@ -38,7 +38,7 @@ public: * @param parent :: parent widget (must be the application window!= * @param fl :: window flags */ - CustomActionDialog(QWidget *parent, Qt::WFlags fl = nullptr); + CustomActionDialog(QWidget *parent, const Qt::WFlags &fl = nullptr); private slots: void chooseIcon(); diff --git a/MantidPlot/src/DataSetDialog.cpp b/MantidPlot/src/DataSetDialog.cpp index 4a498d9a3b9717f251b287f211128712f2a7a650..b488801c6bec307e8135c14a1e821e9807097d28 100644 --- a/MantidPlot/src/DataSetDialog.cpp +++ b/MantidPlot/src/DataSetDialog.cpp @@ -40,7 +40,7 @@ #include <QVBoxLayout> DataSetDialog::DataSetDialog(const QString &text, ApplicationWindow *app, - Graph *g, Qt::WFlags fl) + Graph *g, const Qt::WFlags &fl) : QDialog(g, fl), d_app(app), d_graph(g) { setAttribute(Qt::WA_DeleteOnClose); setWindowTitle(tr("MantidPlot - Select data set")); diff --git a/MantidPlot/src/DataSetDialog.h b/MantidPlot/src/DataSetDialog.h index dc60ab2abdfd6102b61c8f859e2b42442c630161..ebb4b7657ec0d3891d29deb1f2115e2d89f99915 100644 --- a/MantidPlot/src/DataSetDialog.h +++ b/MantidPlot/src/DataSetDialog.h @@ -45,7 +45,7 @@ class DataSetDialog : public QDialog { public: DataSetDialog(const QString &text, ApplicationWindow *app, Graph *g = nullptr, - Qt::WFlags fl = nullptr); + const Qt::WFlags &fl = nullptr); public slots: void accept() override; diff --git a/MantidPlot/src/DockedWindow.cpp b/MantidPlot/src/DockedWindow.cpp index db9ba85cca9b88b7b8bf618c6735b1e896c910cb..8030c1ab03d102cea4c70288c2d686a2bf98f9e1 100644 --- a/MantidPlot/src/DockedWindow.cpp +++ b/MantidPlot/src/DockedWindow.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "DockedWindow.h" #include "ApplicationWindow.h" diff --git a/MantidPlot/src/DockedWindow.h b/MantidPlot/src/DockedWindow.h index 56d26caeb509d125244e0ccdb14c28f924c07608..d14913e85e5929f65adbd3e82271c5f1e12507ac 100644 --- a/MantidPlot/src/DockedWindow.h +++ b/MantidPlot/src/DockedWindow.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/MantidPlot/src/ErrDialog.cpp b/MantidPlot/src/ErrDialog.cpp index addd11bef981d196c650afee560db67272f17094..47597ad6dbac4af06db1f79695ce97530416e6cd 100644 --- a/MantidPlot/src/ErrDialog.cpp +++ b/MantidPlot/src/ErrDialog.cpp @@ -45,7 +45,7 @@ #include <QVBoxLayout> #include <QWidget> -ErrDialog::ErrDialog(ApplicationWindow *parent, Qt::WFlags fl) +ErrDialog::ErrDialog(ApplicationWindow *parent, const Qt::WFlags &fl) : QDialog(parent, fl) { setFocusPolicy(Qt::StrongFocus); setSizeGripEnabled(true); @@ -166,7 +166,7 @@ void ErrDialog::setCurveNames(const QStringList &names) { nameLabel->addItems(names); } -void ErrDialog::setSrcTables(QList<MdiSubWindow *> tables) { +void ErrDialog::setSrcTables(const QList<MdiSubWindow *> &tables) { if (tables.isEmpty()) return; diff --git a/MantidPlot/src/ErrDialog.h b/MantidPlot/src/ErrDialog.h index 84287351570a7fc6cce13848a036048683ab51f7..83ac907e708391c41ee26df6f484ca801197988a 100644 --- a/MantidPlot/src/ErrDialog.h +++ b/MantidPlot/src/ErrDialog.h @@ -52,7 +52,7 @@ public: * @param parent :: parent widget * @param fl :: window flags */ - ErrDialog(ApplicationWindow *parent, Qt::WFlags fl = nullptr); + ErrDialog(ApplicationWindow *parent, const Qt::WFlags &fl = nullptr); private: QLabel *textLabel1; @@ -82,7 +82,7 @@ public slots: //! Supply the dialog with a curves list void setCurveNames(const QStringList &names); //! Supply the dialog with a tables list - void setSrcTables(QList<MdiSubWindow *> tables); + void setSrcTables(const QList<MdiSubWindow *> &tables); //! Select a table void selectSrcTable(int tabnr); diff --git a/MantidPlot/src/ExpDecayDialog.cpp b/MantidPlot/src/ExpDecayDialog.cpp index d39b38573f46c998e9ad400862941c3370baa372..e13b229a77d9397ab0f82c79ca1063ed240736f3 100644 --- a/MantidPlot/src/ExpDecayDialog.cpp +++ b/MantidPlot/src/ExpDecayDialog.cpp @@ -43,7 +43,7 @@ #include <QMessageBox> #include <QPushButton> -ExpDecayDialog::ExpDecayDialog(int type, QWidget *parent, Qt::WFlags fl) +ExpDecayDialog::ExpDecayDialog(int type, QWidget *parent, const Qt::WFlags &fl) : QDialog(parent, fl), fitter(nullptr), graph(nullptr), buttonFit(nullptr), buttonCancel(nullptr), boxName(nullptr), boxAmplitude(nullptr), boxFirst(nullptr), boxSecond(nullptr), boxThird(nullptr), diff --git a/MantidPlot/src/ExpDecayDialog.h b/MantidPlot/src/ExpDecayDialog.h index 8c3b04102aef8dda106cb7be411ec4d8fff45269..217f8c9d991a04498f9ffc10cdbe560d91466ac5 100644 --- a/MantidPlot/src/ExpDecayDialog.h +++ b/MantidPlot/src/ExpDecayDialog.h @@ -44,7 +44,8 @@ class ExpDecayDialog : public QDialog { Q_OBJECT public: - ExpDecayDialog(int type, QWidget *parent = nullptr, Qt::WFlags fl = nullptr); + ExpDecayDialog(int type, QWidget *parent = nullptr, + const Qt::WFlags &fl = nullptr); public slots: void fit(); diff --git a/MantidPlot/src/ExportDialog.cpp b/MantidPlot/src/ExportDialog.cpp index 514ac1e30d72c906bf3c3287332bbd80b77b5d78..9ed732b74092dcea0a2d662008380c380dbef2d8 100644 --- a/MantidPlot/src/ExportDialog.cpp +++ b/MantidPlot/src/ExportDialog.cpp @@ -39,7 +39,7 @@ #include <QPushButton> ExportDialog::ExportDialog(const QString &tableName, QWidget *parent, - Qt::WFlags fl) + const Qt::WFlags &fl) : QDialog(parent, fl) { setWindowTitle(tr("MantidPlot - Export ASCII")); setSizeGripEnabled(true); diff --git a/MantidPlot/src/ExportDialog.h b/MantidPlot/src/ExportDialog.h index 2d135b20e0d7a8978162101a99db31c505d7a568..bd5f0a65f9720fb39c4ba9e7db7acc9d0e4033c1 100644 --- a/MantidPlot/src/ExportDialog.h +++ b/MantidPlot/src/ExportDialog.h @@ -47,7 +47,7 @@ public: * @param fl :: window flags */ ExportDialog(const QString &tableName, QWidget *parent = nullptr, - Qt::WFlags fl = nullptr); + const Qt::WFlags &fl = nullptr); private: void closeEvent(QCloseEvent *) override; diff --git a/MantidPlot/src/FFT.cpp b/MantidPlot/src/FFT.cpp index 4e74a1d59583a2682ff1978f532961f52163f5cc..7ae18215212a6f9dc763253b4bb3f967f7145dcc 100644 --- a/MantidPlot/src/FFT.cpp +++ b/MantidPlot/src/FFT.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /*************************************************************************** File : FFT.cpp diff --git a/MantidPlot/src/FFT.h b/MantidPlot/src/FFT.h index 85381f9306e007f0aef1abffbe45eb933c499e82..12d41b466ea0635577437f600bdc3670edca8243 100644 --- a/MantidPlot/src/FFT.h +++ b/MantidPlot/src/FFT.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /*************************************************************************** File : FFT.h diff --git a/MantidPlot/src/FFTDialog.cpp b/MantidPlot/src/FFTDialog.cpp index 6b529eed2df9c14f848b4542c0410731e6e9238a..3f0be090532e5ac80829ede8122d8d01be7a5562 100644 --- a/MantidPlot/src/FFTDialog.cpp +++ b/MantidPlot/src/FFTDialog.cpp @@ -49,7 +49,7 @@ #include <QPushButton> #include <QRadioButton> -FFTDialog::FFTDialog(int type, QWidget *parent, Qt::WFlags fl) +FFTDialog::FFTDialog(int type, QWidget *parent, const Qt::WFlags &fl) : QDialog(parent, fl), buttonOK(nullptr), buttonCancel(nullptr), forwardBtn(nullptr), backwardBtn(nullptr), boxName(nullptr), boxReal(nullptr), boxImaginary(nullptr), boxSampling(nullptr), diff --git a/MantidPlot/src/FFTDialog.h b/MantidPlot/src/FFTDialog.h index 9e92aaa6980dd03da6dc318b00bd185ee7ef4fcc..4e4ddb1d828155af185f2fd472c965ec85da99f0 100644 --- a/MantidPlot/src/FFTDialog.h +++ b/MantidPlot/src/FFTDialog.h @@ -47,7 +47,8 @@ class FFTDialog : public QDialog { public: enum DataType { onGraph = 0, onTable = 1, onMatrix = 2 }; - FFTDialog(int type, QWidget *parent = nullptr, Qt::WFlags fl = nullptr); + FFTDialog(int type, QWidget *parent = nullptr, + const Qt::WFlags &fl = nullptr); public slots: void setGraph(Graph *g); diff --git a/MantidPlot/src/FilterDialog.cpp b/MantidPlot/src/FilterDialog.cpp index 43dfe6aba9a0e79dc245f10e53fb787d3732ed27..b078fb7dad093da08c006ae5f63510a0da4abd62 100644 --- a/MantidPlot/src/FilterDialog.cpp +++ b/MantidPlot/src/FilterDialog.cpp @@ -42,7 +42,7 @@ #include <QMessageBox> #include <QPushButton> -FilterDialog::FilterDialog(int type, QWidget *parent, Qt::WFlags fl) +FilterDialog::FilterDialog(int type, QWidget *parent, const Qt::WFlags &fl) : QDialog(parent, fl), graph(nullptr), buttonFilter(nullptr), buttonCancel(nullptr), boxName(nullptr), boxOffset(nullptr), boxStart(nullptr), boxEnd(nullptr), boxColor(nullptr) { diff --git a/MantidPlot/src/FilterDialog.h b/MantidPlot/src/FilterDialog.h index da87c9004897fcea96bf2369eb90e235550ed88a..c361fe97851159d7925adff7ef49c9501b2b8f31 100644 --- a/MantidPlot/src/FilterDialog.h +++ b/MantidPlot/src/FilterDialog.h @@ -43,7 +43,8 @@ class FilterDialog : public QDialog { Q_OBJECT public: - FilterDialog(int type, QWidget *parent = nullptr, Qt::WFlags fl = nullptr); + FilterDialog(int type, QWidget *parent = nullptr, + const Qt::WFlags &fl = nullptr); public slots: void setGraph(Graph *g); diff --git a/MantidPlot/src/FindDialog.cpp b/MantidPlot/src/FindDialog.cpp index e1ff277bd3b3dca260ed65b10df5ff888db47309..9fddeefb9b53d9819d210c03b286088c603b230f 100644 --- a/MantidPlot/src/FindDialog.cpp +++ b/MantidPlot/src/FindDialog.cpp @@ -41,7 +41,8 @@ #include <QRegExp> #include <QVBoxLayout> -FindDialog::FindDialog(QWidget *parent, Qt::WFlags fl) : QDialog(parent, fl) { +FindDialog::FindDialog(QWidget *parent, const Qt::WFlags &fl) + : QDialog(parent, fl) { setWindowTitle(tr("MantidPlot") + " - " + tr("Find")); setSizeGripEnabled(true); diff --git a/MantidPlot/src/FindDialog.h b/MantidPlot/src/FindDialog.h index 53a86644a516a41772da1680b055d32947558be2..3b74832f7a1e76cc11d988c7b0d78c6e3faa9191 100644 --- a/MantidPlot/src/FindDialog.h +++ b/MantidPlot/src/FindDialog.h @@ -42,7 +42,7 @@ class FindDialog : public QDialog { Q_OBJECT public: - FindDialog(QWidget *parent = nullptr, Qt::WFlags fl = nullptr); + FindDialog(QWidget *parent = nullptr, const Qt::WFlags &fl = nullptr); ~FindDialog() override; private: diff --git a/MantidPlot/src/Fit.cpp b/MantidPlot/src/Fit.cpp index cb5e784266cd0ae8865e13da4e1c898844ecfca3..c7e882ed3908dc0c60645ac90e2549da30b24221 100644 --- a/MantidPlot/src/Fit.cpp +++ b/MantidPlot/src/Fit.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2006 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /*************************************************************************** File : Fit.cpp diff --git a/MantidPlot/src/Fit.h b/MantidPlot/src/Fit.h index 5facf7821c3887e56fef1a0cdb98affde422b02d..4b70ffdf37d6affacebc4e2766b265eba9255463 100644 --- a/MantidPlot/src/Fit.h +++ b/MantidPlot/src/Fit.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2006 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /*************************************************************************** File : Fit.h diff --git a/MantidPlot/src/FitDialog.cpp b/MantidPlot/src/FitDialog.cpp index 7fd7e50cc1da60ea4f1f4b7d5c47115e05bacd1b..7524d652aed067759c22e32135ce8970557d16c7 100644 --- a/MantidPlot/src/FitDialog.cpp +++ b/MantidPlot/src/FitDialog.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2004 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /*************************************************************************** File : FitDialog.cpp @@ -56,7 +56,7 @@ using namespace MantidQt::API; -FitDialog::FitDialog(Graph *g, QWidget *parent, Qt::WFlags fl) +FitDialog::FitDialog(Graph *g, QWidget *parent, const Qt::WFlags &fl) : QDialog(parent, fl) { setObjectName("FitDialog"); setWindowTitle(tr("MantidPlot - Fit Wizard")); @@ -1215,7 +1215,7 @@ void FitDialog::changeDataRange() { boxTo->setValue(qMax(start, end)); } -void FitDialog::setSrcTables(QList<MdiSubWindow *> tables) { +void FitDialog::setSrcTables(const QList<MdiSubWindow *> &tables) { if (tables.isEmpty()) { tableNamesBox->addItem(tr("No data tables")); colNamesBox->addItem(tr("No data tables")); diff --git a/MantidPlot/src/FitDialog.h b/MantidPlot/src/FitDialog.h index 5d1c957c06b5a410591daf1cf7af99d8c744c78f..664ee1aac000a7d70dfa74accd1eb1dab8a6dc21 100644 --- a/MantidPlot/src/FitDialog.h +++ b/MantidPlot/src/FitDialog.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2004 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /*************************************************************************** File : FitDialog.h @@ -44,9 +44,10 @@ class FitDialog : public QDialog { Q_OBJECT public: - FitDialog(Graph *g, QWidget *parent = nullptr, Qt::WFlags fl = nullptr); + FitDialog(Graph *g, QWidget *parent = nullptr, + const Qt::WFlags &fl = nullptr); - void setSrcTables(QList<MdiSubWindow *> tables); + void setSrcTables(const QList<MdiSubWindow *> &tables); protected: void closeEvent(QCloseEvent *e) override; diff --git a/MantidPlot/src/FitModelHandler.cpp b/MantidPlot/src/FitModelHandler.cpp index 233a2f8485e5adbb8dbe1020fc0bb0840585f21e..a6516ac3d2cf1a76361dfeed92e7ed5ce502b639 100644 --- a/MantidPlot/src/FitModelHandler.cpp +++ b/MantidPlot/src/FitModelHandler.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /*************************************************************************** File : FitModelHandler.cpp diff --git a/MantidPlot/src/FitModelHandler.h b/MantidPlot/src/FitModelHandler.h index 56f38128f385866a95dee2c8f1e2d0908c263d6a..cdd3e07b2c91a4f85ac7b4f47e85c50e3adde768 100644 --- a/MantidPlot/src/FitModelHandler.h +++ b/MantidPlot/src/FitModelHandler.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /*************************************************************************** File : FitModelHandler.h diff --git a/MantidPlot/src/FloatingWindow.cpp b/MantidPlot/src/FloatingWindow.cpp index 2b9072a9330e409dd2b52981d2d09b6bbd6680af..5a21ef17e6ab463fa37f50506cff79bf203de5f4 100644 --- a/MantidPlot/src/FloatingWindow.cpp +++ b/MantidPlot/src/FloatingWindow.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "FloatingWindow.h" #include "ApplicationWindow.h" @@ -24,7 +24,8 @@ /** * Constructor. */ -FloatingWindow::FloatingWindow(ApplicationWindow *appWindow, Qt::WindowFlags f) +FloatingWindow::FloatingWindow(ApplicationWindow *appWindow, + const Qt::WindowFlags &f) : #ifdef Q_OS_WIN QMainWindow(appWindow, f), diff --git a/MantidPlot/src/FloatingWindow.h b/MantidPlot/src/FloatingWindow.h index 8ee73b04fce18e56a560159c8a877b04fda6e528..29bd00795552bbdbb23ed5934c9a7a04ce8792d4 100644 --- a/MantidPlot/src/FloatingWindow.h +++ b/MantidPlot/src/FloatingWindow.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -19,7 +19,8 @@ class QSize; class FloatingWindow : public QMainWindow { Q_OBJECT public: - FloatingWindow(ApplicationWindow *appWindow, Qt::WindowFlags f = nullptr); + FloatingWindow(ApplicationWindow *appWindow, + const Qt::WindowFlags &f = nullptr); ~FloatingWindow() override; void setStaysOnTopFlag(); void removeStaysOnTopFlag(); diff --git a/MantidPlot/src/FunctionCurve.cpp b/MantidPlot/src/FunctionCurve.cpp index 0d658b286bf99ff411c09a373e45db170af2c31e..6ee0f4231f9d35133e736ebe150b5ecd87a668ac 100644 --- a/MantidPlot/src/FunctionCurve.cpp +++ b/MantidPlot/src/FunctionCurve.cpp @@ -243,8 +243,9 @@ void FunctionCurve::loadData(int points) { * @param wi :: An index of a histogram with the data. * @param peakRadius :: A peak radius to pass to the domain. */ -void FunctionCurve::loadMantidData(Mantid::API::MatrixWorkspace_const_sptr ws, - size_t wi, int peakRadius) { +void FunctionCurve::loadMantidData( + const Mantid::API::MatrixWorkspace_const_sptr &ws, size_t wi, + int peakRadius) { if (!d_variable.isEmpty() || d_formulas.isEmpty() || d_formulas[0] != "Mantid") return; diff --git a/MantidPlot/src/FunctionCurve.h b/MantidPlot/src/FunctionCurve.h index 6e4bb863f8fd0f190823f9cf551125153f7aacea..d92cfdfb8e1c48a9f93dfbc7210ba001111b98b6 100644 --- a/MantidPlot/src/FunctionCurve.h +++ b/MantidPlot/src/FunctionCurve.h @@ -84,8 +84,9 @@ public: void loadData(int points = 0); - void loadMantidData(boost::shared_ptr<const Mantid::API::MatrixWorkspace> ws, - size_t wi, int peakRadius = 0); + void loadMantidData( + const boost::shared_ptr<const Mantid::API::MatrixWorkspace> &ws, + size_t wi, int peakRadius = 0); /// No error bars on this curve: Always return an empty list. QList<ErrorBarSettings *> errorBarSettingsList() const override { diff --git a/MantidPlot/src/FunctionDialog.cpp b/MantidPlot/src/FunctionDialog.cpp index c21971bc176dd9784a439701ae4713f3e02f939a..b40241efae5ab093f5203a7bcb29c4ea96c4bb97 100644 --- a/MantidPlot/src/FunctionDialog.cpp +++ b/MantidPlot/src/FunctionDialog.cpp @@ -44,7 +44,8 @@ #include <QTextEdit> #include <QWidget> -FunctionDialog::FunctionDialog(ApplicationWindow *app, Graph *g, Qt::WFlags fl) +FunctionDialog::FunctionDialog(ApplicationWindow *app, Graph *g, + const Qt::WFlags &fl) : QDialog(g, fl), d_app(app), graph(g) { setObjectName("FunctionDialog"); setWindowTitle(tr("MantidPlot - Add function curve")); diff --git a/MantidPlot/src/FunctionDialog.h b/MantidPlot/src/FunctionDialog.h index 69389b2ff243042c766e6524eeced65c3f422dcf..f7a420196549b131ed3996f5f4253a1d4fc926a0 100644 --- a/MantidPlot/src/FunctionDialog.h +++ b/MantidPlot/src/FunctionDialog.h @@ -47,7 +47,7 @@ class FunctionDialog : public QDialog { public: FunctionDialog(ApplicationWindow *app, Graph *g = nullptr, - Qt::WFlags fl = nullptr); + const Qt::WFlags &fl = nullptr); protected: QComboBox *boxXFunction; diff --git a/MantidPlot/src/Graph.cpp b/MantidPlot/src/Graph.cpp index 632d8d90f5674fe49b7d93b677ade6a7c6407d05..07c10ddf1f89e48ee1526def97ea03e1480c1ebe 100644 --- a/MantidPlot/src/Graph.cpp +++ b/MantidPlot/src/Graph.cpp @@ -126,7 +126,8 @@ namespace { Mantid::Kernel::Logger g_log("Graph"); } // namespace -Graph::Graph(int x, int y, int width, int height, QWidget *parent, Qt::WFlags f) +Graph::Graph(int x, int y, int width, int height, QWidget *parent, + const Qt::WFlags &f) : QWidget(parent, f) { setWindowFlags(f); n_curves = 0; @@ -1183,7 +1184,7 @@ void Graph::setScale(QwtPlot::Axis axis, ScaleTransformation::Type scaleType) { * @param axis :: the scale to change either QwtPlot::xBottom or QwtPlot::yLeft * @param logOrLin :: either "log" or "linear" */ -void Graph::setScale(QwtPlot::Axis axis, QString logOrLin) { +void Graph::setScale(QwtPlot::Axis axis, const QString &logOrLin) { if (logOrLin == "log") { setScale(axis, ScaleTransformation::Log10); } else if (logOrLin == "linear") { @@ -2842,7 +2843,7 @@ PlotCurve *Graph::insertCurve(Table *w, const QString &xColName, return c; } -PlotCurve *Graph::insertCurve(QString workspaceName, int index, bool err, +PlotCurve *Graph::insertCurve(const QString &workspaceName, int index, bool err, GraphOptions::CurveType style, bool distribution) { return (new MantidMatrixCurve(workspaceName, this, index, @@ -4954,7 +4955,7 @@ void Graph::setCurveLineColor(int curveIndex, int colorIndex) { } } -void Graph::setCurveLineColor(int curveIndex, QColor qColor) { +void Graph::setCurveLineColor(int curveIndex, const QColor &qColor) { QwtPlotCurve *c = curve(curveIndex); if (c) { QPen pen = c->pen(); diff --git a/MantidPlot/src/Graph.h b/MantidPlot/src/Graph.h index 30d7f397b380f59eb1dd07ab48095ba2b3024718..075294f31896773bce78ece4bf61562a1433f922 100644 --- a/MantidPlot/src/Graph.h +++ b/MantidPlot/src/Graph.h @@ -158,7 +158,7 @@ class Graph : public QWidget { public: Graph(int x = 0, int y = 0, int width = 500, int height = 400, - QWidget *parent = nullptr, Qt::WFlags f = nullptr); + QWidget *parent = nullptr, const Qt::WFlags &f = nullptr); ~Graph() override; enum Ticks { NoTicks = 0, Out = 1, InOut = 2, In = 3 }; @@ -265,7 +265,7 @@ public slots: const QString &yColName, int style, int startRow = 0, int endRow = -1); PlotCurve * - insertCurve(QString workspaceName, int index, bool err = false, + insertCurve(const QString &workspaceName, int index, bool err = false, GraphOptions::CurveType style = GraphOptions::Unspecified, bool distribution = false); PlotCurve *insertCurve(PlotCurve *c, int lineWidth = -1, @@ -338,7 +338,7 @@ public slots: void setCurveStyle(int index, int s); void setCurveFullRange(int curveIndex); void setCurveLineColor(int curveIndex, int colorIndex); - void setCurveLineColor(int curveIndex, QColor qColor); + void setCurveLineColor(int curveIndex, const QColor &qColor); void setCurveLineStyle(int curveIndex, Qt::PenStyle style); void setCurveLineWidth(int curveIndex, double width); void setGrayScale(); @@ -417,7 +417,7 @@ public slots: bool log10AfterBreak = false, int breakWidth = 4, bool breakDecoration = true, double nth_power = 2.0); void setScale(QwtPlot::Axis axis, ScaleTransformation::Type scaleType); - void setScale(QwtPlot::Axis axis, QString logOrLin); + void setScale(QwtPlot::Axis axis, const QString &logOrLin); double axisStep(int axis) { return d_user_step[axis]; }; //! Set the axis scale void setAxisScale(int axis, double start, double end, int scaleType = -1, diff --git a/MantidPlot/src/Graph3D.cpp b/MantidPlot/src/Graph3D.cpp index 44a3a86a628cd82b894d37c3e3739db319df568c..1521f5326e8303b577261f04db13060eef958614 100644 --- a/MantidPlot/src/Graph3D.cpp +++ b/MantidPlot/src/Graph3D.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2004 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /*************************************************************************** File : Graph3D.cpp @@ -107,7 +107,7 @@ Triple UserParametricSurface::operator()(double u, double v) { } Graph3D::Graph3D(const QString &label, QWidget *parent, const char *name, - Qt::WFlags f) + const Qt::WFlags &f) : MdiSubWindow(parent, label, name, f) { initPlot(); } @@ -2346,7 +2346,7 @@ void Graph3D::setDataColorMap(const QString &fileName) { sp->updateGL(); } -bool Graph3D::openColorMap(ColorVector &cv, QString fname) { +bool Graph3D::openColorMap(ColorVector &cv, const QString &fname) { if (fname.isEmpty()) return false; diff --git a/MantidPlot/src/Graph3D.h b/MantidPlot/src/Graph3D.h index cc9551d6bd56375c5c30fbb735fb351fe53606a7..f326a107fac740e1a39c7b6b735858c156fc0055 100644 --- a/MantidPlot/src/Graph3D.h +++ b/MantidPlot/src/Graph3D.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2004 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /*************************************************************************** File : Graph3D.h @@ -55,7 +55,7 @@ class Graph3D : public MdiSubWindow { public: Graph3D(const QString &label, QWidget *parent, const char *name = nullptr, - Qt::WFlags f = nullptr); + const Qt::WFlags &f = nullptr); ~Graph3D() override; void initPlot(); @@ -317,7 +317,7 @@ public slots: QString colorMap() { return color_map; }; void setDataColorMap(const QString &fileName); - bool openColorMap(Qwt3D::ColorVector &cv, QString fname); + bool openColorMap(Qwt3D::ColorVector &cv, const QString &fname); void setMeshColor(const QColor &); void setAxesColor(const QColor &); diff --git a/MantidPlot/src/Grid.cpp b/MantidPlot/src/Grid.cpp index 395d2ed3cbaa7ba987f897744211117880fe6b30..10c633e925d73a63ca3e425be93611687afdbe35 100644 --- a/MantidPlot/src/Grid.cpp +++ b/MantidPlot/src/Grid.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /*************************************************************************** File : Grid.cpp diff --git a/MantidPlot/src/Grid.h b/MantidPlot/src/Grid.h index bd13b2f2b7a2ee43c1070dac5be2820b918f2339..c2e20787398057843fb067bd76fd18abbc9d34ee 100644 --- a/MantidPlot/src/Grid.h +++ b/MantidPlot/src/Grid.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /*************************************************************************** File : Grid.h diff --git a/MantidPlot/src/GridDetails.cpp b/MantidPlot/src/GridDetails.cpp index 24999f7286050662ce0df13b99dbe29dc49d19ac..c1ab4ca7a4b319022618b6311494f5d2b05af07e 100644 --- a/MantidPlot/src/GridDetails.cpp +++ b/MantidPlot/src/GridDetails.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //--------------------------- // Includes diff --git a/MantidPlot/src/GridDetails.h b/MantidPlot/src/GridDetails.h index 75911a57b70c6799f0995ce3f598fa092395cb6f..a77f3c12f186dd6d5962afa28e4e1e04594ac282 100644 --- a/MantidPlot/src/GridDetails.h +++ b/MantidPlot/src/GridDetails.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /** This class holds the widgets that hold the details for each axis so the contents diff --git a/MantidPlot/src/ImageDialog.cpp b/MantidPlot/src/ImageDialog.cpp index ecc129c8d7f2af941377f750ba437ea484d2d07b..437b6dd5ab53dddeb4664cb35057d866de0e3bad 100644 --- a/MantidPlot/src/ImageDialog.cpp +++ b/MantidPlot/src/ImageDialog.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2006 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /*************************************************************************** File : ImageDialog.cpp @@ -21,7 +21,7 @@ #include <QLabel> #include <QLayout> -ImageDialog::ImageDialog(QWidget *parent, Qt::WFlags fl) +ImageDialog::ImageDialog(QWidget *parent, const Qt::WFlags &fl) : QDialog(parent, fl), aspect_ratio(1.) { setObjectName("ImageDialog"); setWindowTitle(tr("MantidPlot - Image Geometry")); diff --git a/MantidPlot/src/ImageDialog.h b/MantidPlot/src/ImageDialog.h index a5936852a96fe0a455a9119cdaeaee884b31570b..db5ccc0dcd2294bc20462b2c129f80b6cc7e3203 100644 --- a/MantidPlot/src/ImageDialog.h +++ b/MantidPlot/src/ImageDialog.h @@ -39,7 +39,7 @@ class ImageDialog : public QDialog { Q_OBJECT public: - ImageDialog(QWidget *parent = nullptr, Qt::WFlags fl = nullptr); + ImageDialog(QWidget *parent = nullptr, const Qt::WFlags &fl = nullptr); void setOrigin(const QPoint &o); void setSize(const QSize &size); diff --git a/MantidPlot/src/ImageExportDialog.cpp b/MantidPlot/src/ImageExportDialog.cpp index 9d0b967b9f37052ba8d5965603a949379d0880d7..dad44dcbdaa09d49e8b4c1bf4fb3b029f427eae8 100644 --- a/MantidPlot/src/ImageExportDialog.cpp +++ b/MantidPlot/src/ImageExportDialog.cpp @@ -42,7 +42,7 @@ #include <QStackedWidget> ImageExportDialog::ImageExportDialog(QWidget *parent, bool vector_options, - bool extended, Qt::WFlags flags) + bool extended, const Qt::WFlags &flags) : ExtensibleFileDialog(parent, extended, flags) { setWindowTitle(tr("MantidPlot - Choose a filename to save under")); setAcceptMode(QFileDialog::AcceptSave); diff --git a/MantidPlot/src/ImageExportDialog.h b/MantidPlot/src/ImageExportDialog.h index 20a4f0118ec8125374567673134cf7626d2d97e4..8c23e08525bd41842bd23559055a6d11e510f377 100644 --- a/MantidPlot/src/ImageExportDialog.h +++ b/MantidPlot/src/ImageExportDialog.h @@ -75,8 +75,8 @@ public: */ ImageExportDialog(QWidget *parent = nullptr, bool vector_options = true, bool extended = true, - Qt::WFlags flags = Qt::WindowCloseButtonHint | - Qt::WindowType::WindowTitleHint); + const Qt::WFlags &flags = Qt::WindowCloseButtonHint | + Qt::WindowType::WindowTitleHint); //! For vector formats: returns the output resolution the user selected, // defaulting to the screen resolution. int resolution() const { return d_resolution->value(); } diff --git a/MantidPlot/src/ImportASCIIDialog.cpp b/MantidPlot/src/ImportASCIIDialog.cpp index bd87d3897dbd421bb4982e6e918116252cceaa32..ee04b06f672f9fd6551db46eb2792fbf687248bf 100644 --- a/MantidPlot/src/ImportASCIIDialog.cpp +++ b/MantidPlot/src/ImportASCIIDialog.cpp @@ -50,7 +50,7 @@ #include <gsl/gsl_math.h> ImportASCIIDialog::ImportASCIIDialog(bool new_windows_only, QWidget *parent, - bool extended, Qt::WFlags flags) + bool extended, const Qt::WFlags &flags) : ExtensibleFileDialog(parent, extended, flags) { setWindowTitle(tr("MantidPlot - Import ASCII File(s)")); diff --git a/MantidPlot/src/ImportASCIIDialog.h b/MantidPlot/src/ImportASCIIDialog.h index cb767e331b6fcbc19d096c5bb6acbcfff379d26f..5b8b3e0e2b91b9030de820ae1ffd63f5df4dfd3b 100644 --- a/MantidPlot/src/ImportASCIIDialog.h +++ b/MantidPlot/src/ImportASCIIDialog.h @@ -117,8 +117,8 @@ public: */ ImportASCIIDialog(bool new_windows_only, QWidget *parent = nullptr, bool extended = true, - Qt::WFlags flags = Qt::WindowCloseButtonHint | - Qt::WindowType::WindowTitleHint); + const Qt::WFlags &flags = Qt::WindowCloseButtonHint | + Qt::WindowType::WindowTitleHint); //! Return the selected import mode /** diff --git a/MantidPlot/src/IntDialog.cpp b/MantidPlot/src/IntDialog.cpp index bc9edb76b73a4c599653b5f85d81b86c1539a924..d072c34e0f9c4bb5d1fc9486b7408ed5064d64e3 100644 --- a/MantidPlot/src/IntDialog.cpp +++ b/MantidPlot/src/IntDialog.cpp @@ -41,7 +41,7 @@ #include <QSpinBox> #include <QTextEdit> -IntDialog::IntDialog(QWidget *parent, Graph *g, Qt::WFlags fl) +IntDialog::IntDialog(QWidget *parent, Graph *g, const Qt::WFlags &fl) : QDialog(parent, fl), d_graph(g) { setObjectName("IntegrationDialog"); setAttribute(Qt::WA_DeleteOnClose); diff --git a/MantidPlot/src/IntDialog.h b/MantidPlot/src/IntDialog.h index 9036ec6136ae6b8297cf7a8e823d5cb3aac65bdd..f4e4257bb158d2ea262dc61077cb4d4b71a57985 100644 --- a/MantidPlot/src/IntDialog.h +++ b/MantidPlot/src/IntDialog.h @@ -44,7 +44,7 @@ class IntDialog : public QDialog { public: IntDialog(QWidget *parent = nullptr, Graph *g = nullptr, - Qt::WFlags fl = nullptr); + const Qt::WFlags &fl = nullptr); public slots: void accept() override; diff --git a/MantidPlot/src/InterpolationDialog.cpp b/MantidPlot/src/InterpolationDialog.cpp index 071c38c945376320d831c0599b4cab9f0423efb8..54a9bb20dfcc7a6ad00cfd753bbf13c48cc40b77 100644 --- a/MantidPlot/src/InterpolationDialog.cpp +++ b/MantidPlot/src/InterpolationDialog.cpp @@ -42,7 +42,7 @@ #include <QPushButton> #include <QSpinBox> -InterpolationDialog::InterpolationDialog(QWidget *parent, Qt::WFlags fl) +InterpolationDialog::InterpolationDialog(QWidget *parent, const Qt::WFlags &fl) : QDialog(parent, fl), graph(nullptr) { setObjectName("InterpolationDialog"); setWindowTitle(tr("MantidPlot - Interpolation Options")); diff --git a/MantidPlot/src/InterpolationDialog.h b/MantidPlot/src/InterpolationDialog.h index 9008dddd68f704f80dfa3411afe9d65ff1309aaf..837dbf5702f3c8740f5800dddbb4bd756016d9b9 100644 --- a/MantidPlot/src/InterpolationDialog.h +++ b/MantidPlot/src/InterpolationDialog.h @@ -43,7 +43,8 @@ class InterpolationDialog : public QDialog { Q_OBJECT public: - InterpolationDialog(QWidget *parent = nullptr, Qt::WFlags fl = nullptr); + InterpolationDialog(QWidget *parent = nullptr, + const Qt::WFlags &fl = nullptr); public slots: void activateCurve(const QString &curveName); diff --git a/MantidPlot/src/LabelTool.cpp b/MantidPlot/src/LabelTool.cpp index 2e7d55ab7d5e6e6fb2aa4fc55e0dc3d2f7a22589..8753607c3c127dbe717887141acd0df38f546013 100644 --- a/MantidPlot/src/LabelTool.cpp +++ b/MantidPlot/src/LabelTool.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "LabelTool.h" // MantidPlot diff --git a/MantidPlot/src/LabelTool.h b/MantidPlot/src/LabelTool.h index e9a636e6168aa9db2d0a3eba921e19a0b4e81f78..99e80261966d61b445ee6dcc1f1bf5bd0462fdec 100644 --- a/MantidPlot/src/LabelTool.h +++ b/MantidPlot/src/LabelTool.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/MantidPlot/src/LayerDialog.cpp b/MantidPlot/src/LayerDialog.cpp index a80d84a5710db658472ec0e27928ac08d5681c4d..f2a43002f88b1faaa35d4fc5b4f6791d9de6c04b 100644 --- a/MantidPlot/src/LayerDialog.cpp +++ b/MantidPlot/src/LayerDialog.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2004 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /*************************************************************************** File : LayerDialog.cpp @@ -29,7 +29,7 @@ #include <QPushButton> #include <QSpinBox> -LayerDialog::LayerDialog(QWidget *parent, Qt::WFlags fl) +LayerDialog::LayerDialog(QWidget *parent, const Qt::WFlags &fl) : QDialog(parent, fl), multi_layer(nullptr) { setObjectName("LayerDialog"); setWindowTitle(tr("MantidPlot - Arrange Layers")); diff --git a/MantidPlot/src/LayerDialog.h b/MantidPlot/src/LayerDialog.h index eb92769560ffded68072773917debb61986a912f..71967c37e4c436a034ece6a4c8553ded552763e4 100644 --- a/MantidPlot/src/LayerDialog.h +++ b/MantidPlot/src/LayerDialog.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2004 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /*************************************************************************** File : LayerDialog.h @@ -30,7 +30,7 @@ class LayerDialog : public QDialog { Q_OBJECT public: - LayerDialog(QWidget *parent = nullptr, Qt::WFlags fl = nullptr); + LayerDialog(QWidget *parent = nullptr, const Qt::WFlags &fl = nullptr); void setMultiLayer(MultiLayer *g); protected slots: diff --git a/MantidPlot/src/LegendWidget.cpp b/MantidPlot/src/LegendWidget.cpp index 32b95f60d24f62c6c74f1a105d18384b49fc7e7a..84afca5d7b7ecd07f9a2fb8648e7a6685a2e37aa 100644 --- a/MantidPlot/src/LegendWidget.cpp +++ b/MantidPlot/src/LegendWidget.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /*************************************************************************** File : LegendWidget.cpp diff --git a/MantidPlot/src/LegendWidget.h b/MantidPlot/src/LegendWidget.h index 827f2e35fb8b0df41b1c5847c0f0cede85abd459..7be4c91008625667fd3b39c7685bee40b1b7ff8b 100644 --- a/MantidPlot/src/LegendWidget.h +++ b/MantidPlot/src/LegendWidget.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /*************************************************************************** File : LegendWidget.h diff --git a/MantidPlot/src/LineDialog.cpp b/MantidPlot/src/LineDialog.cpp index 6aebb51934e46448f8c6fb5f876cc6b57b92e768..afef704cd36dbc34256394a0891d4f2d75f2bd3c 100644 --- a/MantidPlot/src/LineDialog.cpp +++ b/MantidPlot/src/LineDialog.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2006 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /*************************************************************************** File : LineDialog.cpp @@ -29,7 +29,7 @@ #include <QGroupBox> #include <QSpinBox> -LineDialog::LineDialog(ArrowMarker *line, QWidget *parent, Qt::WFlags fl) +LineDialog::LineDialog(ArrowMarker *line, QWidget *parent, const Qt::WFlags &fl) : QDialog(parent, fl) { unitBox = nullptr; diff --git a/MantidPlot/src/LineDialog.h b/MantidPlot/src/LineDialog.h index 7dde6b3a1f5bfb0707c8991ae569f01165cd35c0..875243a061855f39ef222a03d2dbfd117731d6cf 100644 --- a/MantidPlot/src/LineDialog.h +++ b/MantidPlot/src/LineDialog.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2006 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /*************************************************************************** File : LineDialog.h @@ -36,7 +36,7 @@ class LineDialog : public QDialog { public: LineDialog(ArrowMarker *line, QWidget *parent = nullptr, - Qt::WFlags fl = nullptr); + const Qt::WFlags &fl = nullptr); enum Unit { ScaleCoordinates, Pixels }; diff --git a/MantidPlot/src/LogisticFit.cpp b/MantidPlot/src/LogisticFit.cpp index f66bc2c57896167cc12567d56a3c149bdbbe1644..8ebdc84dfb7972ca7db7a4a27c999c0c9db4c511 100644 --- a/MantidPlot/src/LogisticFit.cpp +++ b/MantidPlot/src/LogisticFit.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /*************************************************************************** File : LogisticFit.cpp diff --git a/MantidPlot/src/LogisticFit.h b/MantidPlot/src/LogisticFit.h index 163ff3909f74311700b2fb428227f8f26b77da67..e6874668a204d5969e63ddf35d117873bc312ae1 100644 --- a/MantidPlot/src/LogisticFit.h +++ b/MantidPlot/src/LogisticFit.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /*************************************************************************** File : LogisticFit.h diff --git a/MantidPlot/src/Mantid/AlgorithmDockWidget.cpp b/MantidPlot/src/Mantid/AlgorithmDockWidget.cpp index 8ae8fa134de5ad6d34e78221f20e3223b9710fbc..303094d312009b7ae5349637367059490b27f24a 100644 --- a/MantidPlot/src/Mantid/AlgorithmDockWidget.cpp +++ b/MantidPlot/src/Mantid/AlgorithmDockWidget.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "AlgorithmDockWidget.h" #include "MantidUI.h" diff --git a/MantidPlot/src/Mantid/AlgorithmDockWidget.h b/MantidPlot/src/Mantid/AlgorithmDockWidget.h index 15ae52a164cc47754cb46c2862ad78845246b64c..40a966b96ca7396aa4602d86003ab3ae959f2bf7 100644 --- a/MantidPlot/src/Mantid/AlgorithmDockWidget.h +++ b/MantidPlot/src/Mantid/AlgorithmDockWidget.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/MantidPlot/src/Mantid/AlgorithmMonitor.cpp b/MantidPlot/src/Mantid/AlgorithmMonitor.cpp index 35c71e377ea2180947db6621a599e0a309f8a9ed..b090ed4438f4a76d951e74f2d3d0703a8e6fdb86 100644 --- a/MantidPlot/src/Mantid/AlgorithmMonitor.cpp +++ b/MantidPlot/src/Mantid/AlgorithmMonitor.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "AlgorithmMonitor.h" #include "MantidAPI/AlgorithmManager.h" @@ -58,7 +58,7 @@ AlgorithmMonitor::~AlgorithmMonitor() { * * @param alg :: algorithm to monitor. */ -void AlgorithmMonitor::add(Mantid::API::IAlgorithm_sptr alg) { +void AlgorithmMonitor::add(const Mantid::API::IAlgorithm_sptr &alg) { lock(); alg->addObserver(m_finishedObserver); alg->addObserver(m_errorObserver); diff --git a/MantidPlot/src/Mantid/AlgorithmMonitor.h b/MantidPlot/src/Mantid/AlgorithmMonitor.h index ba05b59b34db1d5fe7dcce7010c61f8606d5cacf..aea9f1db805a44c4d69722266fc7d429aa27545c 100644 --- a/MantidPlot/src/Mantid/AlgorithmMonitor.h +++ b/MantidPlot/src/Mantid/AlgorithmMonitor.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -34,7 +34,7 @@ public: /// Destructor ~AlgorithmMonitor() override; /// Add algorithm to monitor - void add(Mantid::API::IAlgorithm_sptr alg); + void add(const Mantid::API::IAlgorithm_sptr &alg); /// Removes stopped algorithm void remove(const Mantid::API::IAlgorithm *alg); @@ -116,7 +116,7 @@ private: class AlgButton : public QPushButton { Q_OBJECT public: - AlgButton(const QString &text, Mantid::API::IAlgorithm_sptr alg) + AlgButton(const QString &text, const Mantid::API::IAlgorithm_sptr &alg) : QPushButton(text), m_alg(alg->getAlgorithmID()) { connect(this, SIGNAL(clicked()), this, SLOT(sendClicked())); } diff --git a/MantidPlot/src/Mantid/ErrorBarSettings.cpp b/MantidPlot/src/Mantid/ErrorBarSettings.cpp index 3fc376277b30fae3093c0127e71b9e63c155cfd0..2a40361a9beb4d488cf77f66693c1ec94f0ff4e8 100644 --- a/MantidPlot/src/Mantid/ErrorBarSettings.cpp +++ b/MantidPlot/src/Mantid/ErrorBarSettings.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "ErrorBarSettings.h" #include <cassert> diff --git a/MantidPlot/src/Mantid/ErrorBarSettings.h b/MantidPlot/src/Mantid/ErrorBarSettings.h index 8d0ce7d6bd30a2b8ffbf8cfc9b9e1483dc40a995..37c2c5808ab3dd730e5d2bb8bacb453a71fb0ca1 100644 --- a/MantidPlot/src/Mantid/ErrorBarSettings.h +++ b/MantidPlot/src/Mantid/ErrorBarSettings.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/MantidPlot/src/Mantid/FirstTimeSetup.cpp b/MantidPlot/src/Mantid/FirstTimeSetup.cpp index 97bc1502c172bd4678ab2b88b9ebbc7e3240e434..a23ba9fe288d3aa06a164ce1863e66c04c27775b 100644 --- a/MantidPlot/src/Mantid/FirstTimeSetup.cpp +++ b/MantidPlot/src/Mantid/FirstTimeSetup.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "FirstTimeSetup.h" #include "MantidKernel/ConfigService.h" diff --git a/MantidPlot/src/Mantid/FirstTimeSetup.h b/MantidPlot/src/Mantid/FirstTimeSetup.h index c6b8e8cbf58f23bd0036fac0f53c793982914e6d..45b72ba727b9e96dabe9545bc9b94e9898979b7a 100644 --- a/MantidPlot/src/Mantid/FirstTimeSetup.h +++ b/MantidPlot/src/Mantid/FirstTimeSetup.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/MantidPlot/src/Mantid/FitParameterTie.cpp b/MantidPlot/src/Mantid/FitParameterTie.cpp index 63e3d8b52a2df043ae9836124d4fce1a1b804021..dbf91658842ffcab9472894cc1ef90bc7c8cd8af 100644 --- a/MantidPlot/src/Mantid/FitParameterTie.cpp +++ b/MantidPlot/src/Mantid/FitParameterTie.cpp @@ -1,18 +1,19 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "FitParameterTie.h" #include "MantidAPI/CompositeFunction.h" #include <QRegExp> #include <stdexcept> +#include <utility> /// Constructor FitParameterTie::FitParameterTie( boost::shared_ptr<Mantid::API::CompositeFunction> cf) - : m_compositeFunction(cf), m_prop(nullptr) {} + : m_compositeFunction(std::move(cf)), m_prop(nullptr) {} /// Destructor FitParameterTie::~FitParameterTie() { diff --git a/MantidPlot/src/Mantid/FitParameterTie.h b/MantidPlot/src/Mantid/FitParameterTie.h index 9cd4808b962151a74a7ec34e497610e00c4e0275..c57f79492d959202da0ae61d418bfac2a5418358 100644 --- a/MantidPlot/src/Mantid/FitParameterTie.h +++ b/MantidPlot/src/Mantid/FitParameterTie.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/MantidPlot/src/Mantid/IFunctionWrapper.cpp b/MantidPlot/src/Mantid/IFunctionWrapper.cpp index 786c1b2d76f066bbb2c8a57b7542b8cffc93b411..eb2943a0ad0414955f900d148208fa81bca5c58e 100644 --- a/MantidPlot/src/Mantid/IFunctionWrapper.cpp +++ b/MantidPlot/src/Mantid/IFunctionWrapper.cpp @@ -1,10 +1,13 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "IFunctionWrapper.h" + +#include <utility> + #include "MantidAPI/CompositeFunction.h" #include "MantidAPI/FunctionFactory.h" #include "MantidAPI/IPeakFunction.h" @@ -27,7 +30,7 @@ void IFunctionWrapper::setFunction(const QString &name) { void IFunctionWrapper::setFunction( boost::shared_ptr<Mantid::API::IFunction> function) { - m_function = function; + m_function = std::move(function); m_compositeFunction = boost::dynamic_pointer_cast<Mantid::API::CompositeFunction>(m_function); m_peakFunction = diff --git a/MantidPlot/src/Mantid/IFunctionWrapper.h b/MantidPlot/src/Mantid/IFunctionWrapper.h index 58910fa4609757d91114a50035fb71126bcca9f2..38172c25445ec2fb5e5ee9e0d18776e92645ccc6 100644 --- a/MantidPlot/src/Mantid/IFunctionWrapper.h +++ b/MantidPlot/src/Mantid/IFunctionWrapper.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/MantidPlot/src/Mantid/IMantidMatrixExtensionHandler.h b/MantidPlot/src/Mantid/IMantidMatrixExtensionHandler.h index fdcaca203996b97d9475f8bd45c4e7027634ba02..37388b5b8ab1d48c5934a92aef6f006538dacfaa 100644 --- a/MantidPlot/src/Mantid/IMantidMatrixExtensionHandler.h +++ b/MantidPlot/src/Mantid/IMantidMatrixExtensionHandler.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/MantidPlot/src/Mantid/ImportWorkspaceDlg.cpp b/MantidPlot/src/Mantid/ImportWorkspaceDlg.cpp index 0fa586fd50663eceec2930e537e0eea37e613a99..07a7cd0448d0b26341ac3ecb08573023376c55fd 100644 --- a/MantidPlot/src/Mantid/ImportWorkspaceDlg.cpp +++ b/MantidPlot/src/Mantid/ImportWorkspaceDlg.cpp @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #include <QtGui> #include <qfiledialog.h> diff --git a/MantidPlot/src/Mantid/ImportWorkspaceDlg.h b/MantidPlot/src/Mantid/ImportWorkspaceDlg.h index 5df8011788a9bcce2122db2736f321ea6b8b339d..14c1022bbcadaf499a6211632e563d634e98c90a 100644 --- a/MantidPlot/src/Mantid/ImportWorkspaceDlg.h +++ b/MantidPlot/src/Mantid/ImportWorkspaceDlg.h @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #pragma once #include <QDialog> diff --git a/MantidPlot/src/Mantid/InputHistory.cpp b/MantidPlot/src/Mantid/InputHistory.cpp index d2da4257c970ca4920a6121217f27722f5a4e2c9..1879698a2cf776197f346d4a1e2e7fd900d1d9b1 100644 --- a/MantidPlot/src/Mantid/InputHistory.cpp +++ b/MantidPlot/src/Mantid/InputHistory.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "InputHistory.h" #include "MantidAPI/Algorithm.h" @@ -68,7 +68,8 @@ void InputHistoryImpl::save() { Upadates the non-default algorithm properties in the history. @param alg :: Pointer to the algorthm */ -void InputHistoryImpl::updateAlgorithm(Mantid::API::IAlgorithm_sptr alg) { +void InputHistoryImpl::updateAlgorithm( + const Mantid::API::IAlgorithm_sptr &alg) { const std::vector<Property *> &props = alg->getProperties(); QList<PropertyData> prop_hist_list; for (std::vector<Property *>::const_iterator prop = props.begin(); diff --git a/MantidPlot/src/Mantid/InputHistory.h b/MantidPlot/src/Mantid/InputHistory.h index 5888b39d3dfe6f48a699ed3eab3bdd2aeb20df36..1841b5e9bf004c98d9c222fcff3199b82dcd5cd7 100644 --- a/MantidPlot/src/Mantid/InputHistory.h +++ b/MantidPlot/src/Mantid/InputHistory.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -38,7 +38,7 @@ class InputHistoryImpl { public: InputHistoryImpl(const InputHistoryImpl &) = delete; InputHistoryImpl &operator=(const InputHistoryImpl &) = delete; - void updateAlgorithm(Mantid::API::IAlgorithm_sptr alg); + void updateAlgorithm(const Mantid::API::IAlgorithm_sptr &alg); /// The name:value map of non-default properties with which algorithm algName /// was called last time. QMap<QString, QString> algorithmProperties(const QString &algName); diff --git a/MantidPlot/src/Mantid/InstrumentWidget/InstrumentWindow.cpp b/MantidPlot/src/Mantid/InstrumentWidget/InstrumentWindow.cpp index 408de306a833fccfb32e4dc40eb3677a23a57570..68b3c2bdc15b6858b48affb41245b825dce45058 100644 --- a/MantidPlot/src/Mantid/InstrumentWidget/InstrumentWindow.cpp +++ b/MantidPlot/src/Mantid/InstrumentWidget/InstrumentWindow.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "InstrumentWindow.h" #include "ApplicationWindow.h" diff --git a/MantidPlot/src/Mantid/InstrumentWidget/InstrumentWindow.h b/MantidPlot/src/Mantid/InstrumentWidget/InstrumentWindow.h index f7d956076507894e5428b4563b833d7c1631fb81..93c5d4979433c319f00be4d02d5dc06163b7bec1 100644 --- a/MantidPlot/src/Mantid/InstrumentWidget/InstrumentWindow.h +++ b/MantidPlot/src/Mantid/InstrumentWidget/InstrumentWindow.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/MantidPlot/src/Mantid/LabelToolLogValuesDialog.cpp b/MantidPlot/src/Mantid/LabelToolLogValuesDialog.cpp index 3037d0f38d3e3acd66e7d03f4891200eb36562b9..521ed90a3dddaaa8d3ff4f68b4a0064462f14e22 100644 --- a/MantidPlot/src/Mantid/LabelToolLogValuesDialog.cpp +++ b/MantidPlot/src/Mantid/LabelToolLogValuesDialog.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------- // Includes @@ -41,7 +41,7 @@ using namespace Mantid::Kernel; */ LabelToolLogValuesDialog::LabelToolLogValuesDialog(const QString &wsname, QWidget *parentContainer, - Qt::WFlags flags, + const Qt::WFlags &flags, size_t experimentInfoIndex) : SampleLogDialogBase(wsname, parentContainer, flags, experimentInfoIndex) { diff --git a/MantidPlot/src/Mantid/LabelToolLogValuesDialog.h b/MantidPlot/src/Mantid/LabelToolLogValuesDialog.h index 7fd33f1cbe00a187fb10869e6dd555f356de4cb7..45fcb520f76bf585c9be36e912675582f4093732 100644 --- a/MantidPlot/src/Mantid/LabelToolLogValuesDialog.h +++ b/MantidPlot/src/Mantid/LabelToolLogValuesDialog.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -38,7 +38,7 @@ class LabelToolLogValuesDialog : public SampleLogDialogBase { public: /// Constructor LabelToolLogValuesDialog(const QString &wsname, QWidget *parentContainer, - Qt::WFlags flags = nullptr, + const Qt::WFlags &flags = nullptr, size_t experimentInfoIndex = 0); virtual ~LabelToolLogValuesDialog() override; diff --git a/MantidPlot/src/Mantid/ManageCustomMenus.cpp b/MantidPlot/src/Mantid/ManageCustomMenus.cpp index ef0f7942f188ddfd33de7507dfc095d8f8956507..8242d688d999a177d2efacf8996d64472148ac0b 100644 --- a/MantidPlot/src/Mantid/ManageCustomMenus.cpp +++ b/MantidPlot/src/Mantid/ManageCustomMenus.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "ManageCustomMenus.h" #include "../ApplicationWindow.h" diff --git a/MantidPlot/src/Mantid/ManageCustomMenus.h b/MantidPlot/src/Mantid/ManageCustomMenus.h index 1e3905d8970e1f83af3eba833a373465a6201098..45331f0fa409978088b9aab6ec6e27a2534d5fc2 100644 --- a/MantidPlot/src/Mantid/ManageCustomMenus.h +++ b/MantidPlot/src/Mantid/ManageCustomMenus.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/MantidPlot/src/Mantid/ManageInterfaceCategories.cpp b/MantidPlot/src/Mantid/ManageInterfaceCategories.cpp index 60eb68b82e655aa77528c2180cc974d06aadd8cc..61e5097080bd25bc5bf5e527aa27f48ef3e7505e 100644 --- a/MantidPlot/src/Mantid/ManageInterfaceCategories.cpp +++ b/MantidPlot/src/Mantid/ManageInterfaceCategories.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "ManageInterfaceCategories.h" #include "../ApplicationWindow.h" diff --git a/MantidPlot/src/Mantid/ManageInterfaceCategories.h b/MantidPlot/src/Mantid/ManageInterfaceCategories.h index eda1c1e92857edea24ec040b25b3190e5bb42802..a19b0e5bcd0b002d105797fc1f6055d10b4eab60 100644 --- a/MantidPlot/src/Mantid/ManageInterfaceCategories.h +++ b/MantidPlot/src/Mantid/ManageInterfaceCategories.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/MantidPlot/src/Mantid/MantidAbout.cpp b/MantidPlot/src/Mantid/MantidAbout.cpp index 1e1634a0e86bc3783fac6b613aa231d6261f3fb9..b682c3133bd52886f7d1e66fd38a61bc58d3a41b 100644 --- a/MantidPlot/src/Mantid/MantidAbout.cpp +++ b/MantidPlot/src/Mantid/MantidAbout.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAbout.h" #include "MantidKernel/MantidVersion.h" diff --git a/MantidPlot/src/Mantid/MantidAbout.h b/MantidPlot/src/Mantid/MantidAbout.h index a3f59165bad261df948e14ff215227e220cdc0b5..9d429d71bb63b06d9df0a9d9805a5483dd6c98ae 100644 --- a/MantidPlot/src/Mantid/MantidAbout.h +++ b/MantidPlot/src/Mantid/MantidAbout.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/MantidPlot/src/Mantid/MantidApplication.cpp b/MantidPlot/src/Mantid/MantidApplication.cpp index 84fd9d330afa58cf5318ec586fe8c87add14810c..17fa5370465c4d9b320b304f0aac6fb58c90cc0c 100644 --- a/MantidPlot/src/Mantid/MantidApplication.cpp +++ b/MantidPlot/src/Mantid/MantidApplication.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //============================= // MantidApplciation definitions @@ -39,8 +39,8 @@ MantidApplication::MantidApplication(int &argc, char **argv) } void MantidApplication::errorHandling(bool continueWork, int share, - QString name, QString email, - QString textbox) { + const QString &name, const QString &email, + const QString &textbox) { if (share == 0) { Mantid::Kernel::ErrorReporter errorReporter( "mantidplot", Mantid::Kernel::UsageService::Instance().getUpTime(), "", diff --git a/MantidPlot/src/Mantid/MantidApplication.h b/MantidPlot/src/Mantid/MantidApplication.h index 395a567c8b89dcfd315b00359238cf0294513f6b..dd8e64600a96aa8e072b3e6c1c1c1226f89c866e 100644 --- a/MantidPlot/src/Mantid/MantidApplication.h +++ b/MantidPlot/src/Mantid/MantidApplication.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -20,6 +20,6 @@ public: signals: bool runAsPythonScript(const QString &code); public slots: - void errorHandling(bool continueWork, int sharing, QString name, - QString email, QString textbox); + void errorHandling(bool continueWork, int sharing, const QString &name, + const QString &email, const QString &textbox); }; diff --git a/MantidPlot/src/Mantid/MantidCurve.cpp b/MantidPlot/src/Mantid/MantidCurve.cpp index de736b265a469c831ebe7c4de4d74e87b05e7179..46af6a699f84487260fcf0ad43074a62762589c2 100644 --- a/MantidPlot/src/Mantid/MantidCurve.cpp +++ b/MantidPlot/src/Mantid/MantidCurve.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidCurve.h" diff --git a/MantidPlot/src/Mantid/MantidCurve.h b/MantidPlot/src/Mantid/MantidCurve.h index 72d0fab7b7c1c84c2d4c9524a6445cfc56054835..207f20d05073223c6831e18238b58d34936e11c6 100644 --- a/MantidPlot/src/Mantid/MantidCurve.h +++ b/MantidPlot/src/Mantid/MantidCurve.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/MantidPlot/src/Mantid/MantidMDCurve.cpp b/MantidPlot/src/Mantid/MantidMDCurve.cpp index 7b1ae59e7b04b6a84e38f932f423d3eab249a223..83d2acbb3743756d680875df4b058d474ff47aa8 100644 --- a/MantidPlot/src/Mantid/MantidMDCurve.cpp +++ b/MantidPlot/src/Mantid/MantidMDCurve.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDCurve.h" #include "../ApplicationWindow.h" diff --git a/MantidPlot/src/Mantid/MantidMDCurve.h b/MantidPlot/src/Mantid/MantidMDCurve.h index 5cbf9ab54f508b16466bbd05cef7b401dd577e7f..00125ca3678c87f165d4d18cb7d617b96a10934c 100644 --- a/MantidPlot/src/Mantid/MantidMDCurve.h +++ b/MantidPlot/src/Mantid/MantidMDCurve.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/MantidPlot/src/Mantid/MantidMDCurveDialog.cpp b/MantidPlot/src/Mantid/MantidMDCurveDialog.cpp index 53d217b9489d69a69dd4b4994cfa8e18cd57da6f..d05d007ccede3b0f0ffb6a07c288c93401c4b4d1 100644 --- a/MantidPlot/src/Mantid/MantidMDCurveDialog.cpp +++ b/MantidPlot/src/Mantid/MantidMDCurveDialog.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMDCurveDialog.h" #include "MantidAPI/AnalysisDataService.h" @@ -12,7 +12,7 @@ using Mantid::API::AnalysisDataService; using Mantid::API::IMDWorkspace; using Mantid::API::IMDWorkspace_sptr; -MantidMDCurveDialog::MantidMDCurveDialog(QWidget *parent, QString wsName) +MantidMDCurveDialog::MantidMDCurveDialog(QWidget *parent, const QString &wsName) : QDialog(parent), m_wsName(wsName) { ui.setupUi(this); m_lineOptions = new LinePlotOptions(this); diff --git a/MantidPlot/src/Mantid/MantidMDCurveDialog.h b/MantidPlot/src/Mantid/MantidMDCurveDialog.h index 293bb7c06f130b1ad6427bf3dabfffdd5cce017d..d2ba68801cbc62e66b62875e20177bcc3069f901 100644 --- a/MantidPlot/src/Mantid/MantidMDCurveDialog.h +++ b/MantidPlot/src/Mantid/MantidMDCurveDialog.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -17,7 +17,8 @@ class MantidMDCurveDialog : public QDialog { Q_OBJECT public: - MantidMDCurveDialog(QWidget *parent = nullptr, QString wsName = QString()); + MantidMDCurveDialog(QWidget *parent = nullptr, + const QString &wsName = QString()); ~MantidMDCurveDialog() override; LinePlotOptions *getLineOptionsWidget() { return m_lineOptions; } diff --git a/MantidPlot/src/Mantid/MantidMatrix.cpp b/MantidPlot/src/Mantid/MantidMatrix.cpp index c4616843ddc6c63238954b7fe7ee2762557dde7f..453512d4305eb6dadb2363311a2b02b5c033b8ac 100644 --- a/MantidPlot/src/Mantid/MantidMatrix.cpp +++ b/MantidPlot/src/Mantid/MantidMatrix.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMatrix.h" #include "../ApplicationWindow.h" @@ -91,7 +91,7 @@ int modelTypeToInt(MantidMatrixModel::Type type) { } } // namespace -MantidMatrix::MantidMatrix(Mantid::API::MatrixWorkspace_const_sptr ws, +MantidMatrix::MantidMatrix(const Mantid::API::MatrixWorkspace_const_sptr &ws, QWidget *parent, const QString &label, const QString &name, int start, int end) : MdiSubWindow(parent, label, name, nullptr), WorkspaceObserver(), @@ -213,8 +213,8 @@ void MantidMatrix::viewChanged(int index) { } } -void MantidMatrix::setup(Mantid::API::MatrixWorkspace_const_sptr ws, int start, - int end) { +void MantidMatrix::setup(const Mantid::API::MatrixWorkspace_const_sptr &ws, + int start, int end) { if (!ws) { QMessageBox::critical(nullptr, "WorkspaceMatrixModel error", "2D workspace expected."); @@ -997,7 +997,8 @@ void MantidMatrix::afterReplaceHandle( } } -void MantidMatrix::changeWorkspace(Mantid::API::MatrixWorkspace_sptr ws) { +void MantidMatrix::changeWorkspace( + const Mantid::API::MatrixWorkspace_sptr &ws) { if (m_workspaceTotalHist != static_cast<int>(ws->getNumberHistograms()) || m_cols != static_cast<int>(ws->blocksize())) { closeDependants(); @@ -1171,7 +1172,8 @@ void MantidMatrix::goToTab(const QString &name) { */ const std::string &MantidMatrix::getWorkspaceName() { return m_strName; } -void findYRange(MatrixWorkspace_const_sptr ws, double &miny, double &maxy) { +void findYRange(const MatrixWorkspace_const_sptr &ws, double &miny, + double &maxy) { // this is here to fill m_min and m_max with numbers that aren't nan miny = std::numeric_limits<double>::max(); maxy = std::numeric_limits<double>::lowest(); @@ -1349,7 +1351,8 @@ void MantidMatrix::setupNewExtension(MantidMatrixModel::Type type) { * Update the existing extensions * @param ws: the new workspace */ -void MantidMatrix::updateExtensions(Mantid::API::MatrixWorkspace_sptr ws) { +void MantidMatrix::updateExtensions( + const Mantid::API::MatrixWorkspace_sptr &ws) { auto it = m_extensions.begin(); while (it != m_extensions.cend()) { auto type = it->first; diff --git a/MantidPlot/src/Mantid/MantidMatrix.h b/MantidPlot/src/Mantid/MantidMatrix.h index 49baba1ba5b676efc1c00e3c04764013289774e2..8cb759dddb931f60e11378b806787ffe9f799c8a 100644 --- a/MantidPlot/src/Mantid/MantidMatrix.h +++ b/MantidPlot/src/Mantid/MantidMatrix.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -56,7 +56,7 @@ class ProjectData; * @param miny :: Variable to receive the minimum value. * @param maxy :: Variable to receive the maximum value. */ -void findYRange(Mantid::API::MatrixWorkspace_const_sptr ws, double &miny, +void findYRange(const Mantid::API::MatrixWorkspace_const_sptr &ws, double &miny, double &maxy); /** MantidMatrix is the class that represents a Qtiplot window for displaying @@ -70,9 +70,9 @@ class MantidMatrix : public MdiSubWindow, MantidQt::API::WorkspaceObserver { Q_OBJECT public: - MantidMatrix(Mantid::API::MatrixWorkspace_const_sptr ws, QWidget *parent, - const QString &label, const QString &name = QString(), - int start = -1, int end = -1); + MantidMatrix(const Mantid::API::MatrixWorkspace_const_sptr &ws, + QWidget *parent, const QString &label, + const QString &name = QString(), int start = -1, int end = -1); void connectTableView(QTableView *, MantidMatrixModel *); MantidMatrixModel *model() { return m_modelY; } @@ -173,7 +173,7 @@ signals: public slots: - void changeWorkspace(Mantid::API::MatrixWorkspace_sptr ws); + void changeWorkspace(const Mantid::API::MatrixWorkspace_sptr &ws); void closeMatrix(); //! Return the width of all columns @@ -245,7 +245,7 @@ public slots: void setMatrixProperties(); protected: - void setup(Mantid::API::MatrixWorkspace_const_sptr ws, int start = -1, + void setup(const Mantid::API::MatrixWorkspace_const_sptr &ws, int start = -1, int end = -1); ApplicationWindow *m_appWindow; @@ -308,7 +308,7 @@ private: /// Hook up a MantidMatrixExtension void setupNewExtension(MantidMatrixModel::Type type); /// Update the existing extensions - void updateExtensions(Mantid::API::MatrixWorkspace_sptr ws); + void updateExtensions(const Mantid::API::MatrixWorkspace_sptr &ws); /// ExtensioRequest handler MantidMatrixExtensionRequest m_extensionRequest; diff --git a/MantidPlot/src/Mantid/MantidMatrixCurve.cpp b/MantidPlot/src/Mantid/MantidMatrixCurve.cpp index 7d0aa76c673b12bcaddd37fc597301927260f8a7..dead95e8e3836f6591b8c7bcf49bc344a2509571 100644 --- a/MantidPlot/src/Mantid/MantidMatrixCurve.cpp +++ b/MantidPlot/src/Mantid/MantidMatrixCurve.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMatrixCurve.h" @@ -289,7 +289,7 @@ void MantidMatrixCurve::itemChanged() { */ QString MantidMatrixCurve::createCurveName( const QString &prefix, - const boost::shared_ptr<const Mantid::API::MatrixWorkspace> ws) { + const boost::shared_ptr<const Mantid::API::MatrixWorkspace> &ws) { QString name = ""; if (prefix.isEmpty()) diff --git a/MantidPlot/src/Mantid/MantidMatrixCurve.h b/MantidPlot/src/Mantid/MantidMatrixCurve.h index 8fe65045a4e78ab7a4cf37c7c89d7efc2ffc0b5d..20af7ed6aca3caf4ea0c7e9529848bea01712da7 100644 --- a/MantidPlot/src/Mantid/MantidMatrixCurve.h +++ b/MantidPlot/src/Mantid/MantidMatrixCurve.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -145,7 +145,7 @@ private: /// Make the curve name QString createCurveName( const QString &prefix, - const boost::shared_ptr<const Mantid::API::MatrixWorkspace> ws); + const boost::shared_ptr<const Mantid::API::MatrixWorkspace> &ws); QString m_wsName; ///< Workspace name. If empty the ws isn't in the data service diff --git a/MantidPlot/src/Mantid/MantidMatrixDialog.cpp b/MantidPlot/src/Mantid/MantidMatrixDialog.cpp index 848077f15b8fee99fdd56d9cd5e391ee1c336508..d27ab3a758dd9263bb73a5580ed02bcad7b9e118 100644 --- a/MantidPlot/src/Mantid/MantidMatrixDialog.cpp +++ b/MantidPlot/src/Mantid/MantidMatrixDialog.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMatrixDialog.h" #include "MantidMatrix.h" @@ -15,7 +15,7 @@ #include <QPushButton> #include <QSpinBox> -MantidMatrixDialog::MantidMatrixDialog(QWidget *parent, Qt::WFlags fl) +MantidMatrixDialog::MantidMatrixDialog(QWidget *parent, const Qt::WFlags &fl) : QDialog(parent, fl), d_matrix(nullptr) { setWindowTitle(tr("MantidPlot - Matrix Properties")); diff --git a/MantidPlot/src/Mantid/MantidMatrixDialog.h b/MantidPlot/src/Mantid/MantidMatrixDialog.h index 95bfa0dc73aadc487ccbcfeb707f296b74f7edb2..9b2fcb113a85c2e415c45f0f4134fa470645d4b3 100644 --- a/MantidPlot/src/Mantid/MantidMatrixDialog.h +++ b/MantidPlot/src/Mantid/MantidMatrixDialog.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -25,7 +25,7 @@ public: * @param parent :: parent widget * @param fl :: window flags */ - MantidMatrixDialog(QWidget *parent = nullptr, Qt::WFlags fl = nullptr); + MantidMatrixDialog(QWidget *parent = nullptr, const Qt::WFlags &fl = nullptr); void setMatrix(MantidMatrix *m); private slots: diff --git a/MantidPlot/src/Mantid/MantidMatrixDxExtensionHandler.cpp b/MantidPlot/src/Mantid/MantidMatrixDxExtensionHandler.cpp index 9423b473e8f543a4c5281ccfbabb04506589c12f..2d41a5e6ad8f37839bf5b194bc5b1feb04ab98d8 100644 --- a/MantidPlot/src/Mantid/MantidMatrixDxExtensionHandler.cpp +++ b/MantidPlot/src/Mantid/MantidMatrixDxExtensionHandler.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMatrixDxExtensionHandler.h" #include "Preferences.h" diff --git a/MantidPlot/src/Mantid/MantidMatrixDxExtensionHandler.h b/MantidPlot/src/Mantid/MantidMatrixDxExtensionHandler.h index dbd89ddd01ea11a51cac03e04bc6733760c860a6..f7fc41e2b26dfbf82edd27cf181bef4ce4c0e94d 100644 --- a/MantidPlot/src/Mantid/MantidMatrixDxExtensionHandler.h +++ b/MantidPlot/src/Mantid/MantidMatrixDxExtensionHandler.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/MantidPlot/src/Mantid/MantidMatrixExtensionRequest.cpp b/MantidPlot/src/Mantid/MantidMatrixExtensionRequest.cpp index fb5e736e8fc126d79261c3a077d7d2af23cfb609..fe011c21b075a1fe7fb8fe75ff70af5009d65f9d 100644 --- a/MantidPlot/src/Mantid/MantidMatrixExtensionRequest.cpp +++ b/MantidPlot/src/Mantid/MantidMatrixExtensionRequest.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMatrixExtensionRequest.h" #include "MantidKernel/Logger.h" diff --git a/MantidPlot/src/Mantid/MantidMatrixExtensionRequest.h b/MantidPlot/src/Mantid/MantidMatrixExtensionRequest.h index 8372847e6feb6a0dc7ec2ab016356461c659ee45..c72fea170d4bac7aada8af22796125fab78c8e84 100644 --- a/MantidPlot/src/Mantid/MantidMatrixExtensionRequest.h +++ b/MantidPlot/src/Mantid/MantidMatrixExtensionRequest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/MantidPlot/src/Mantid/MantidMatrixFunction.cpp b/MantidPlot/src/Mantid/MantidMatrixFunction.cpp index a7881d6a59ae21639102a86314ea6cb56fd7cbf5..761c6ef7321afad80d22db82b0790bd7ea2f420b 100644 --- a/MantidPlot/src/Mantid/MantidMatrixFunction.cpp +++ b/MantidPlot/src/Mantid/MantidMatrixFunction.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMatrixFunction.h" diff --git a/MantidPlot/src/Mantid/MantidMatrixFunction.h b/MantidPlot/src/Mantid/MantidMatrixFunction.h index 0ec3ef14172e262ca61703f4e145830fa47da34a..b0efa259eb9a630798fa1d06f1e9671a64f086ee 100644 --- a/MantidPlot/src/Mantid/MantidMatrixFunction.h +++ b/MantidPlot/src/Mantid/MantidMatrixFunction.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/MantidPlot/src/Mantid/MantidMatrixModel.cpp b/MantidPlot/src/Mantid/MantidMatrixModel.cpp index e82720a79982ebb6a069aacf6d2c279742821c73..f7d7d70366b66db87a6d15597be945ffc3768711 100644 --- a/MantidPlot/src/Mantid/MantidMatrixModel.cpp +++ b/MantidPlot/src/Mantid/MantidMatrixModel.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidMatrixModel.h" #include "MantidAPI/BinEdgeAxis.h" diff --git a/MantidPlot/src/Mantid/MantidMatrixModel.h b/MantidPlot/src/Mantid/MantidMatrixModel.h index c59c6da0f6ccf504e20e496d854cfadd5d54609b..3306184fb23f3d3cbeaf9b382772614255076e59 100644 --- a/MantidPlot/src/Mantid/MantidMatrixModel.h +++ b/MantidPlot/src/Mantid/MantidMatrixModel.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/MantidPlot/src/Mantid/MantidMatrixNullExtensionHandler.h b/MantidPlot/src/Mantid/MantidMatrixNullExtensionHandler.h index e57e967306c717fb42f14dd30cd81836daa4dba2..66af9266c4c121144d805c9d10fd1bda545797b2 100644 --- a/MantidPlot/src/Mantid/MantidMatrixNullExtensionHandler.h +++ b/MantidPlot/src/Mantid/MantidMatrixNullExtensionHandler.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/MantidPlot/src/Mantid/MantidMatrixTabExtension.h b/MantidPlot/src/Mantid/MantidMatrixTabExtension.h index f09d553c02a7179892cd813bd995a04b7b9b314c..36c0cf2b0a30e608846799e3ba88993384c1fb2f 100644 --- a/MantidPlot/src/Mantid/MantidMatrixTabExtension.h +++ b/MantidPlot/src/Mantid/MantidMatrixTabExtension.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -15,7 +15,7 @@ * Holds the information for a new tab. */ struct MantidMatrixTabExtension { - MantidMatrixTabExtension(QString label, QTableView *tableView, + MantidMatrixTabExtension(const QString &&label, QTableView *tableView, MantidMatrixModel *model, MantidMatrixModel::Type type) : label(label), tableView(tableView), model(model), type(type) {} diff --git a/MantidPlot/src/Mantid/MantidPlotUtilities.cpp b/MantidPlot/src/Mantid/MantidPlotUtilities.cpp index c98a09b5f79b6746a3e84e4cf297f3ffa60a024b..1ba840af005c314325d55ddf40c3a137b9b5faf3 100644 --- a/MantidPlot/src/Mantid/MantidPlotUtilities.cpp +++ b/MantidPlot/src/Mantid/MantidPlotUtilities.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidPlotUtilities.h" diff --git a/MantidPlot/src/Mantid/MantidPlotUtilities.h b/MantidPlot/src/Mantid/MantidPlotUtilities.h index 0b78021ab26ad991bba74401e97cd90469103b6a..80ae241e0ec5238bbf96b3896121ded8345774c7 100644 --- a/MantidPlot/src/Mantid/MantidPlotUtilities.h +++ b/MantidPlot/src/Mantid/MantidPlotUtilities.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/MantidPlot/src/Mantid/MantidSampleLogDialog.cpp b/MantidPlot/src/Mantid/MantidSampleLogDialog.cpp index 63b6b8431baac3fcf888faf8d220016aa5bb1006..6421dc566e22e06ff928f2ce4a4287515d0523f7 100644 --- a/MantidPlot/src/Mantid/MantidSampleLogDialog.cpp +++ b/MantidPlot/src/Mantid/MantidSampleLogDialog.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------- // Includes @@ -35,7 +35,8 @@ using namespace Mantid::Kernel; * ExperimentInfo objects. Should only be non-zero for MDWorkspaces. */ MantidSampleLogDialog::MantidSampleLogDialog(const QString &wsname, - MantidUI *mui, Qt::WFlags flags, + MantidUI *mui, + const Qt::WFlags &flags, size_t experimentInfoIndex) : SampleLogDialogBase(wsname, mui->appWindow(), flags, experimentInfoIndex), m_mantidUI(mui) { diff --git a/MantidPlot/src/Mantid/MantidSampleLogDialog.h b/MantidPlot/src/Mantid/MantidSampleLogDialog.h index 8e1fa9ba8a13fb155da668537b6abf80d613cef0..810c0d8f51c7ab1dc2bc24cedee509327cad0cfb 100644 --- a/MantidPlot/src/Mantid/MantidSampleLogDialog.h +++ b/MantidPlot/src/Mantid/MantidSampleLogDialog.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -39,7 +39,7 @@ class MantidSampleLogDialog : public SampleLogDialogBase { public: /// Constructor MantidSampleLogDialog(const QString &wsname, MantidUI *mui, - Qt::WFlags flags = nullptr, + const Qt::WFlags &flags = nullptr, size_t experimentInfoIndex = 0); /// Destructor diff --git a/MantidPlot/src/Mantid/MantidSampleMaterialDialog.cpp b/MantidPlot/src/Mantid/MantidSampleMaterialDialog.cpp index 71ca5aebf8013e00ecd853aeed6116ead95e21c3..ca345897ded3e31e3095c4f9563871b3612697e3 100644 --- a/MantidPlot/src/Mantid/MantidSampleMaterialDialog.cpp +++ b/MantidPlot/src/Mantid/MantidSampleMaterialDialog.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidSampleMaterialDialog.h" @@ -29,7 +29,7 @@ using namespace Mantid::Kernel; */ MantidSampleMaterialDialog::MantidSampleMaterialDialog(const QString &wsName, MantidUI *mtdUI, - Qt::WFlags flags) + const Qt::WFlags &flags) : QDialog(mtdUI->appWindow(), flags), m_wsName(wsName), m_mantidUI(mtdUI) { m_uiForm.setupUi(this); diff --git a/MantidPlot/src/Mantid/MantidSampleMaterialDialog.h b/MantidPlot/src/Mantid/MantidSampleMaterialDialog.h index 5937fa0eeeaee498a8b464ba3f65c2e66ad3bdc9..9dc60cedfaee57abf4ad664b01f9d5e1c18d88bb 100644 --- a/MantidPlot/src/Mantid/MantidSampleMaterialDialog.h +++ b/MantidPlot/src/Mantid/MantidSampleMaterialDialog.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -34,7 +34,7 @@ class MantidSampleMaterialDialog : public QDialog, public: MantidSampleMaterialDialog(const QString &wsName, MantidUI *mtdUI, - Qt::WFlags flags = nullptr); + const Qt::WFlags &flags = nullptr); public slots: void updateMaterial(); diff --git a/MantidPlot/src/Mantid/MantidSurfaceContourPlotGenerator.cpp b/MantidPlot/src/Mantid/MantidSurfaceContourPlotGenerator.cpp index d4062f7ea8b655f47006fd11b41e4a3e6e09820c..e4b152c7ddcd4fb979c04ded7a0a93bcc96c3039 100644 --- a/MantidPlot/src/Mantid/MantidSurfaceContourPlotGenerator.cpp +++ b/MantidPlot/src/Mantid/MantidSurfaceContourPlotGenerator.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidSurfaceContourPlotGenerator.h" diff --git a/MantidPlot/src/Mantid/MantidSurfaceContourPlotGenerator.h b/MantidPlot/src/Mantid/MantidSurfaceContourPlotGenerator.h index 3b24b56db6dc627ec85d8a612e04375f63d61889..0c070482170f9d4c1a98fd96520e44002293e147 100644 --- a/MantidPlot/src/Mantid/MantidSurfaceContourPlotGenerator.h +++ b/MantidPlot/src/Mantid/MantidSurfaceContourPlotGenerator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/MantidPlot/src/Mantid/MantidTable.cpp b/MantidPlot/src/Mantid/MantidTable.cpp index de7fca3e4824045a84a2e30254a5669c4a8480f0..da323c473bf284e5a52ebc12b6e7e62c359be7c0 100644 --- a/MantidPlot/src/Mantid/MantidTable.cpp +++ b/MantidPlot/src/Mantid/MantidTable.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include <iomanip> #include <limits> @@ -34,7 +34,7 @@ using namespace MantidQt::API; * @return the MantidTable created */ MantidTable::MantidTable(ScriptingEnv *env, - Mantid::API::ITableWorkspace_sptr ws, + const Mantid::API::ITableWorkspace_sptr &ws, const QString &label, ApplicationWindow *parent, bool transpose) : Table(env, diff --git a/MantidPlot/src/Mantid/MantidTable.h b/MantidPlot/src/Mantid/MantidTable.h index 8935e81ca9573df4d0a7f38c443ec68e98be1b02..a88a12b6612efdf39368b29d3d5cb47e9088bdc7 100644 --- a/MantidPlot/src/Mantid/MantidTable.h +++ b/MantidPlot/src/Mantid/MantidTable.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -17,7 +17,7 @@ class MantidTable : public Table, public MantidQt::API::WorkspaceObserver { Q_OBJECT public: - MantidTable(ScriptingEnv *env, Mantid::API::ITableWorkspace_sptr ws, + MantidTable(ScriptingEnv *env, const Mantid::API::ITableWorkspace_sptr &ws, const QString &label, ApplicationWindow *parent, bool transpose = false); diff --git a/MantidPlot/src/Mantid/MantidUI.cpp b/MantidPlot/src/Mantid/MantidUI.cpp index b90cee8621f44b52db10610d3859ce7aab7f9bb8..8f6158ce4c5c0e78a55922088bfef9c1dc74d4f8 100644 --- a/MantidPlot/src/Mantid/MantidUI.cpp +++ b/MantidPlot/src/Mantid/MantidUI.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidUI.h" #include "AlgorithmDockWidget.h" @@ -1716,7 +1716,7 @@ void MantidUI::executeAlgorithm(Mantid::API::IAlgorithm_sptr alg) { * This creates an algorithm dialog (the default property entry thingie). */ MantidQt::API::AlgorithmDialog * -MantidUI::createAlgorithmDialog(Mantid::API::IAlgorithm_sptr alg) { +MantidUI::createAlgorithmDialog(const Mantid::API::IAlgorithm_sptr &alg) { QHash<QString, QString> presets; QStringList enabled; @@ -1759,7 +1759,7 @@ MantidUI::createAlgorithmDialog(Mantid::API::IAlgorithm_sptr alg) { * @param algorithm :: A pointer to the algorithm instance */ QString MantidUI::findInputWorkspaceProperty( - Mantid::API::IAlgorithm_sptr algorithm) const { + const Mantid::API::IAlgorithm_sptr &algorithm) const { // Iterate through the properties and find the first input one std::vector<Mantid::Kernel::Property *> props = algorithm->getProperties(); std::vector<Mantid::Kernel::Property *>::const_iterator pend = props.end(); @@ -2974,7 +2974,7 @@ MultiLayer *MantidUI::createGraphFromTable(Table *t, int type) { */ void MantidUI::setUpBinGraph( MultiLayer *ml, const QString &Name, - Mantid::API::MatrixWorkspace_const_sptr workspace) { + const Mantid::API::MatrixWorkspace_const_sptr &workspace) { Graph *g = ml->activeGraph(); g->setTitle(tr("Workspace ") + Name); QString xtitle; @@ -3742,7 +3742,8 @@ MultiLayer *MantidUI::plotSubplots(const QStringList &wsNames, } Table *MantidUI::createTableFromBins( - const QString &wsName, Mantid::API::MatrixWorkspace_const_sptr workspace, + const QString &wsName, + const Mantid::API::MatrixWorkspace_const_sptr &workspace, const QList<int> &bins, bool errs, int fromRow, int toRow) { if (bins.empty()) return nullptr; diff --git a/MantidPlot/src/Mantid/MantidUI.h b/MantidPlot/src/Mantid/MantidUI.h index 96eb08bffda274ef24dbc8944e83084c79cfd6ec..a19385119f6136a636d5b68e61bfc0e39e058a77 100644 --- a/MantidPlot/src/Mantid/MantidUI.h +++ b/MantidPlot/src/Mantid/MantidUI.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -310,15 +310,17 @@ public slots: bool errs = true); // Set properties of a 1d graph which plots data from a workspace - static void setUpBinGraph(MultiLayer *ml, const QString &wsName, - Mantid::API::MatrixWorkspace_const_sptr workspace); + static void + setUpBinGraph(MultiLayer *ml, const QString &wsName, + const Mantid::API::MatrixWorkspace_const_sptr &workspace); // Copy to a Table Y-values (and Err-values if errs==true) of bins with // indeces from i0 to i1 (inclusive) from a workspace - Table *createTableFromBins(const QString &wsName, - Mantid::API::MatrixWorkspace_const_sptr workspace, - const QList<int> &bins, bool errs = true, - int fromRow = -1, int toRow = -1); + Table * + createTableFromBins(const QString &wsName, + const Mantid::API::MatrixWorkspace_const_sptr &workspace, + const QList<int> &bins, bool errs = true, + int fromRow = -1, int toRow = -1); // Copies selected columns (time bins) in a MantidMatrix to a Table Table *createTableFromSelectedColumns(MantidMatrix *m, bool errs); @@ -499,8 +501,8 @@ public slots: void executeAlgorithm(Mantid::API::IAlgorithm_sptr alg) override; // Find the name of the first input workspace for an algorithm - QString - findInputWorkspaceProperty(Mantid::API::IAlgorithm_sptr algorithm) const; + QString findInputWorkspaceProperty( + const Mantid::API::IAlgorithm_sptr &algorithm) const; // Show Qt critical error message box void showCritical(const QString &) override; // Show the dialog monitoring currently running algorithms @@ -595,7 +597,7 @@ private: /// This creates an algorithm dialog. MantidQt::API::AlgorithmDialog * - createAlgorithmDialog(Mantid::API::IAlgorithm_sptr alg); + createAlgorithmDialog(const Mantid::API::IAlgorithm_sptr &alg); /// This method accepts user inputs and executes loadraw/load nexus /// algorithm diff --git a/MantidPlot/src/Mantid/MatrixWorkspaceCurve.cpp b/MantidPlot/src/Mantid/MatrixWorkspaceCurve.cpp index 672484a441f9f285335bddb416d0a6c9afcd6dc7..4fa8f41e6759e8dc0baf31aa67538caae8c37f1b 100644 --- a/MantidPlot/src/Mantid/MatrixWorkspaceCurve.cpp +++ b/MantidPlot/src/Mantid/MatrixWorkspaceCurve.cpp @@ -1,6 +1,6 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + diff --git a/MantidPlot/src/Mantid/MatrixWorkspaceCurve.h b/MantidPlot/src/Mantid/MatrixWorkspaceCurve.h index 672484a441f9f285335bddb416d0a6c9afcd6dc7..4fa8f41e6759e8dc0baf31aa67538caae8c37f1b 100644 --- a/MantidPlot/src/Mantid/MatrixWorkspaceCurve.h +++ b/MantidPlot/src/Mantid/MatrixWorkspaceCurve.h @@ -1,6 +1,6 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + diff --git a/MantidPlot/src/Mantid/PeakPickerTool.cpp b/MantidPlot/src/Mantid/PeakPickerTool.cpp index fa4d74c399493a4616f6f4a79fc14b3e05ca872b..7dec8b965a94dc0b6715529e14e29cf3a037f817 100644 --- a/MantidPlot/src/Mantid/PeakPickerTool.cpp +++ b/MantidPlot/src/Mantid/PeakPickerTool.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "PeakPickerTool.h" #include "../FunctionCurve.h" @@ -316,8 +316,8 @@ bool PeakPickerTool::eventFilter(QObject *obj, QEvent *event) { return QwtPlotPicker::eventFilter(obj, event); } -void PeakPickerTool::windowStateChanged(Qt::WindowStates, - Qt::WindowStates newState) { +void PeakPickerTool::windowStateChanged(const Qt::WindowStates &, + const Qt::WindowStates &newState) { (void)newState; } @@ -766,9 +766,6 @@ void PeakPickerTool::addPeak() { } } -/** - * - */ void PeakPickerTool::addPeakAt(int x, int y) { // x - axis is #2, y - is #0 double c = d_graph->plotWidget()->invTransform(2, x); diff --git a/MantidPlot/src/Mantid/PeakPickerTool.h b/MantidPlot/src/Mantid/PeakPickerTool.h index 640b442d484a3528bd0bc9b9d218703a68cb7fbc..bf1b5bae9c45593b8e5d5f0fab1dee15369e0419 100644 --- a/MantidPlot/src/Mantid/PeakPickerTool.h +++ b/MantidPlot/src/Mantid/PeakPickerTool.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -81,7 +81,8 @@ public: bool isInitialized() const { return m_init; } public slots: - void windowStateChanged(Qt::WindowStates oldState, Qt::WindowStates newState); + void windowStateChanged(const Qt::WindowStates &oldState, + const Qt::WindowStates &newState); signals: void peakChanged(); diff --git a/MantidPlot/src/Mantid/Preferences.cpp b/MantidPlot/src/Mantid/Preferences.cpp index f7631aa71afe3be7fe7a98c96734a2660f93522f..657902b8b0bcf094f1d37f32d80c0edb0e496a78 100644 --- a/MantidPlot/src/Mantid/Preferences.cpp +++ b/MantidPlot/src/Mantid/Preferences.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "Preferences.h" #include <QSettings> diff --git a/MantidPlot/src/Mantid/Preferences.h b/MantidPlot/src/Mantid/Preferences.h index 0d7c7d41ef7e454be6c514f99e858fb3e45e455d..2c5e0be7b227491b5ec323d2fec4644416ff711f 100644 --- a/MantidPlot/src/Mantid/Preferences.h +++ b/MantidPlot/src/Mantid/Preferences.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/MantidPlot/src/Mantid/RemoveErrorsDialog.cpp b/MantidPlot/src/Mantid/RemoveErrorsDialog.cpp index b03999c5b18b1bb543a86d12f4da270419fc9eea..1d514397ad3b10223966ab572ee084143c0b7b42 100644 --- a/MantidPlot/src/Mantid/RemoveErrorsDialog.cpp +++ b/MantidPlot/src/Mantid/RemoveErrorsDialog.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "RemoveErrorsDialog.h" #include "ui_RemoveErrorsDialog.h" diff --git a/MantidPlot/src/Mantid/RemoveErrorsDialog.h b/MantidPlot/src/Mantid/RemoveErrorsDialog.h index 1dbdfd6fa3603e832ca83f78b479123e6bc7ef93..6215788bd9a409f5bf7851f44a4a16bada1a71d9 100644 --- a/MantidPlot/src/Mantid/RemoveErrorsDialog.h +++ b/MantidPlot/src/Mantid/RemoveErrorsDialog.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/MantidPlot/src/Mantid/ReportUsageDisableDialog.cpp b/MantidPlot/src/Mantid/ReportUsageDisableDialog.cpp index fed79377dd01520fb313b8f9a2b0f6254b4863ee..171b950607f441f0f719b24471aa1906d53376dc 100644 --- a/MantidPlot/src/Mantid/ReportUsageDisableDialog.cpp +++ b/MantidPlot/src/Mantid/ReportUsageDisableDialog.cpp @@ -1,3 +1,9 @@ +// Mantid Repository : https://github.com/mantidproject/mantid +// +// Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS +// SPDX - License - Identifier: GPL - 3.0 + #include "ReportUsageDisableDialog.h" #include "FirstTimeSetup.h" #include <QHBoxLayout> diff --git a/MantidPlot/src/Mantid/ReportUsageDisableDialog.h b/MantidPlot/src/Mantid/ReportUsageDisableDialog.h index ac41a9bafbe87b080fdd1ac1994feb600a1e7dcd..55ae49d079ddf2beb5b29efbaff0b7fddb061195 100644 --- a/MantidPlot/src/Mantid/ReportUsageDisableDialog.h +++ b/MantidPlot/src/Mantid/ReportUsageDisableDialog.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/MantidPlot/src/Mantid/SampleLogDialogBase.cpp b/MantidPlot/src/Mantid/SampleLogDialogBase.cpp index badf176e7acfcd6993843fb4664447b9f6108a39..d9d150c0e264134d2c69ee17d5093dd362c146e7 100644 --- a/MantidPlot/src/Mantid/SampleLogDialogBase.cpp +++ b/MantidPlot/src/Mantid/SampleLogDialogBase.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "SampleLogDialogBase.h" @@ -50,7 +50,7 @@ using namespace Mantid::Kernel; */ SampleLogDialogBase::SampleLogDialogBase(const QString &wsname, QWidget *parentContainer, - Qt::WFlags flags, + const Qt::WFlags &flags, size_t experimentInfoIndex) : QDialog(parentContainer, flags), m_tree(new QTreeWidget()), m_parentContainer(parentContainer), m_wsname(wsname.toStdString()), diff --git a/MantidPlot/src/Mantid/SampleLogDialogBase.h b/MantidPlot/src/Mantid/SampleLogDialogBase.h index c6ce9a444b513ff112513d8652f8b5a5c9b3f859..216f180f856ba4bf833c011f3026c218bab9c613 100644 --- a/MantidPlot/src/Mantid/SampleLogDialogBase.h +++ b/MantidPlot/src/Mantid/SampleLogDialogBase.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -47,7 +47,7 @@ class SampleLogDialogBase : public QDialog { public: /// Constructor SampleLogDialogBase(const QString &wsname, QWidget *parentContainer, - Qt::WFlags flags = nullptr, + const Qt::WFlags &flags = nullptr, size_t experimentInfoIndex = 0); /// Virtual Destructor for derived classes diff --git a/MantidPlot/src/Mantid/UserFitFunctionDialog.cpp b/MantidPlot/src/Mantid/UserFitFunctionDialog.cpp index 1f4af3f8e2e0b6528bd024473f33b753a2307291..c2eb9ef4446167cb56e4511c5b24d6ba9fcd7e44 100644 --- a/MantidPlot/src/Mantid/UserFitFunctionDialog.cpp +++ b/MantidPlot/src/Mantid/UserFitFunctionDialog.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //--------------------------------------- // Includes diff --git a/MantidPlot/src/Mantid/UserFitFunctionDialog.h b/MantidPlot/src/Mantid/UserFitFunctionDialog.h index 78d09c1a1b60a6897814bb949f3d87e5d21b15b2..01004cd50921b3e475adcc27394ec94faf8b564f 100644 --- a/MantidPlot/src/Mantid/UserFitFunctionDialog.h +++ b/MantidPlot/src/Mantid/UserFitFunctionDialog.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/MantidPlot/src/Matrix.cpp b/MantidPlot/src/Matrix.cpp index 6d96fad55cda39a3cb4fe67362b1a1b09982fd56..79de07d76efdd2aeb79303ff1d9a36098214fd66 100644 --- a/MantidPlot/src/Matrix.cpp +++ b/MantidPlot/src/Matrix.cpp @@ -76,7 +76,7 @@ using namespace Mantid; using namespace MantidQt::API; Matrix::Matrix(ScriptingEnv *env, const QString &label, QWidget *parent, - const QString &name, Qt::WFlags f) + const QString &name, const Qt::WFlags &f) : MdiSubWindow(parent, label, name, f), Scripted(env), d_matrix_model(nullptr), m_bk_color(), d_stack(nullptr), d_table_view(nullptr), imageLabel(nullptr), formula_str(), txt_format(), @@ -91,7 +91,7 @@ Matrix::Matrix(ScriptingEnv *env, const QString &label, QWidget *parent, } Matrix::Matrix(ScriptingEnv *env, int r, int c, const QString &label, - QWidget *parent, const QString &name, Qt::WFlags f) + QWidget *parent, const QString &name, const Qt::WFlags &f) : MdiSubWindow(parent, label, name, f), Scripted(env), d_matrix_model(nullptr), m_bk_color(), d_stack(nullptr), d_table_view(nullptr), imageLabel(nullptr), formula_str(), txt_format(), @@ -107,7 +107,7 @@ Matrix::Matrix(ScriptingEnv *env, int r, int c, const QString &label, } Matrix::Matrix(ScriptingEnv *env, const QImage &image, const QString &label, - QWidget *parent, const QString &name, Qt::WFlags f) + QWidget *parent, const QString &name, const Qt::WFlags &f) : MdiSubWindow(parent, label, name, f), Scripted(env), d_matrix_model(nullptr), m_bk_color(), d_stack(nullptr), d_table_view(nullptr), imageLabel(nullptr), formula_str(), diff --git a/MantidPlot/src/Matrix.h b/MantidPlot/src/Matrix.h index 5d15ee80410f97feb3227b32212e4bc06f63a87e..7713504f713e355a03ae1bd39a37beb263e12da1 100644 --- a/MantidPlot/src/Matrix.h +++ b/MantidPlot/src/Matrix.h @@ -65,7 +65,7 @@ class Matrix : public MdiSubWindow, public Scripted { protected: Matrix(ScriptingEnv *env, const QString &label, QWidget *parent, - const QString &name = QString(), Qt::WFlags f = nullptr); + const QString &name = QString(), const Qt::WFlags &f = nullptr); public: /** @@ -81,10 +81,10 @@ public: * @param f :: window flags */ Matrix(ScriptingEnv *env, int r, int c, const QString &label, QWidget *parent, - const QString &name = QString(), Qt::WFlags f = nullptr); + const QString &name = QString(), const Qt::WFlags &f = nullptr); Matrix(ScriptingEnv *env, const QImage &image, const QString &label, QWidget *parent, const QString &name = QString(), - Qt::WFlags f = nullptr); + const Qt::WFlags &f = nullptr); ~Matrix() override; enum Operation { diff --git a/MantidPlot/src/MatrixCommand.cpp b/MantidPlot/src/MatrixCommand.cpp index 1521d62d50f19a9105766ca2118bbf3df787aada..8d34cf7a1abc45b19d5f2979fe2ec8f485fc45c2 100644 --- a/MantidPlot/src/MatrixCommand.cpp +++ b/MantidPlot/src/MatrixCommand.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /*************************************************************************** File : MatrixCommand.cpp diff --git a/MantidPlot/src/MatrixCommand.h b/MantidPlot/src/MatrixCommand.h index 337b18de7f852ec5cce386ca9b548975a4faf240..551b66a9ad9ffdbe9de0bcfca11ed53486d62f46 100644 --- a/MantidPlot/src/MatrixCommand.h +++ b/MantidPlot/src/MatrixCommand.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /*************************************************************************** File : MatrixCommand.h diff --git a/MantidPlot/src/MatrixDialog.cpp b/MantidPlot/src/MatrixDialog.cpp index e92ee708c33a3c65dd17c49d659815c478502243..fdcf06258d99bd21ef0369e67931efaef214fadd 100644 --- a/MantidPlot/src/MatrixDialog.cpp +++ b/MantidPlot/src/MatrixDialog.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2006 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /*************************************************************************** File : MatrixDialog.cpp @@ -26,7 +26,7 @@ #include <QPushButton> #include <QSpinBox> -MatrixDialog::MatrixDialog(QWidget *parent, Qt::WFlags fl) +MatrixDialog::MatrixDialog(QWidget *parent, const Qt::WFlags &fl) : QDialog(parent, fl), d_matrix(nullptr) { setWindowTitle(tr("MantidPlot - Matrix Properties")); diff --git a/MantidPlot/src/MatrixDialog.h b/MantidPlot/src/MatrixDialog.h index 380c926b12be8c2a1ab8d02cfb7ba2a2090afe77..9a14b47ffd1a31bb5c8f1ad7f9a3ca7ce3c00462 100644 --- a/MantidPlot/src/MatrixDialog.h +++ b/MantidPlot/src/MatrixDialog.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2006 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /*************************************************************************** File : MatrixDialog.h @@ -34,7 +34,7 @@ public: * @param parent :: parent widget * @param fl :: window flags */ - MatrixDialog(QWidget *parent = nullptr, Qt::WFlags fl = nullptr); + MatrixDialog(QWidget *parent = nullptr, const Qt::WFlags &fl = nullptr); void setMatrix(Matrix *m); private slots: diff --git a/MantidPlot/src/MatrixModel.cpp b/MantidPlot/src/MatrixModel.cpp index ca7a40d753de8415cd6afbc5643e94f0ed0c2c1b..efc1440ecfe6b800d7307ecf9fe8f6f6ffa880c9 100644 --- a/MantidPlot/src/MatrixModel.cpp +++ b/MantidPlot/src/MatrixModel.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /*************************************************************************** File : MatrixModel.cpp diff --git a/MantidPlot/src/MatrixModel.h b/MantidPlot/src/MatrixModel.h index 25d70aa326d2d6aa9ca78d49f9b6b91a5676d80c..e23684091ec9d1f8a39b3fac1b0226fc199ce645 100644 --- a/MantidPlot/src/MatrixModel.h +++ b/MantidPlot/src/MatrixModel.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /*************************************************************************** File : MatrixModel.h diff --git a/MantidPlot/src/MatrixSizeDialog.cpp b/MantidPlot/src/MatrixSizeDialog.cpp index f520d6aaa5cef2bb7628795ef2c513f795eb0224..3993bd3b396255a85a071453b0ae5b2c9b6a3841 100644 --- a/MantidPlot/src/MatrixSizeDialog.cpp +++ b/MantidPlot/src/MatrixSizeDialog.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2004 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /*************************************************************************** File : MatrixSizeDialog.cpp @@ -26,7 +26,8 @@ #include <QPushButton> #include <QSpinBox> -MatrixSizeDialog::MatrixSizeDialog(Matrix *m, QWidget *parent, Qt::WFlags fl) +MatrixSizeDialog::MatrixSizeDialog(Matrix *m, QWidget *parent, + const Qt::WFlags &fl) : QDialog(parent, fl), d_matrix(m) { setWindowTitle(tr("MantidPlot - Matrix Dimensions")); diff --git a/MantidPlot/src/MatrixSizeDialog.h b/MantidPlot/src/MatrixSizeDialog.h index 7fdd7e1c9bc6712b22d467673e3977c7c2be3143..2fdb1eb92ba6fa8fd5a7d0d7327d089e84cda19a 100644 --- a/MantidPlot/src/MatrixSizeDialog.h +++ b/MantidPlot/src/MatrixSizeDialog.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2004 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /*************************************************************************** File : MatrixSizeDialog.h @@ -36,7 +36,7 @@ public: * @param fl :: window flags */ MatrixSizeDialog(Matrix *m, QWidget *parent = nullptr, - Qt::WFlags fl = nullptr); + const Qt::WFlags &fl = nullptr); private slots: //! Accept changes and quit diff --git a/MantidPlot/src/MatrixValuesDialog.cpp b/MantidPlot/src/MatrixValuesDialog.cpp index 1f5925bd7613f9f5b354440cd6a86cfcef9358df..a4cd794e38f99cc1abdb518c77c3e37cdc1ccacb 100644 --- a/MantidPlot/src/MatrixValuesDialog.cpp +++ b/MantidPlot/src/MatrixValuesDialog.cpp @@ -47,7 +47,7 @@ #endif MatrixValuesDialog::MatrixValuesDialog(ScriptingEnv *env, QWidget *parent, - Qt::WFlags fl) + const Qt::WFlags &fl) : QDialog(parent, fl), Scripted(env), matrix(nullptr) { setObjectName("MatrixValuesDialog"); setWindowTitle(tr("MantidPlot - Set Matrix Values")); diff --git a/MantidPlot/src/MatrixValuesDialog.h b/MantidPlot/src/MatrixValuesDialog.h index 4db565ffb01dc94ba2e4ed9faa426d72d2616410..ea5e401346f1c84f6127fbc4ad2e3be457163f17 100644 --- a/MantidPlot/src/MatrixValuesDialog.h +++ b/MantidPlot/src/MatrixValuesDialog.h @@ -50,7 +50,7 @@ class MatrixValuesDialog : public QDialog, public Scripted { public: MatrixValuesDialog(ScriptingEnv *env, QWidget *parent = nullptr, - Qt::WFlags fl = nullptr); + const Qt::WFlags &fl = nullptr); void setMatrix(Matrix *m); private slots: diff --git a/MantidPlot/src/MdPlottingCmapsProvider.cpp b/MantidPlot/src/MdPlottingCmapsProvider.cpp index 5d00248172e5bce424d34fd540615921f9344451..f2075d55506b21ce255bcf161dc9c1bcb240d232 100644 --- a/MantidPlot/src/MdPlottingCmapsProvider.cpp +++ b/MantidPlot/src/MdPlottingCmapsProvider.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include <QDir> #include <QStringList> @@ -90,7 +90,7 @@ void MdPlottingCmapsProvider::getColorMapsForVSI(QStringList &colorMapNames) { void MdPlottingCmapsProvider::appendAllFileNamesForFileType( QStringList &colorMapNames, QStringList &colorMapFiles, - QString colorMapDirectory, QString fileType) { + const QString &colorMapDirectory, const QString &fileType) { QDir directory(colorMapDirectory); QStringList filter(QString("*.%1").arg(fileType)); @@ -105,7 +105,7 @@ void MdPlottingCmapsProvider::appendAllFileNamesForFileType( std::vector<int> MdPlottingCmapsProvider::getSliceViewerIndicesForCommonColorMaps( - QStringList colorMapNamesSliceViewer, QStringList colorMapNamesVsi) { + QStringList colorMapNamesSliceViewer, const QStringList &colorMapNamesVsi) { int index = 0; std::vector<int> indexVector; diff --git a/MantidPlot/src/MdPlottingCmapsProvider.h b/MantidPlot/src/MdPlottingCmapsProvider.h index 36b25ff9152ec357c1f8808fd4c18c21219bddff..7c8a40e8532bb2552092de53979bc1b9423ec7aa 100644 --- a/MantidPlot/src/MdPlottingCmapsProvider.h +++ b/MantidPlot/src/MdPlottingCmapsProvider.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -52,8 +52,8 @@ private: */ void appendAllFileNamesForFileType(QStringList &colorMapNames, QStringList &colorMapFiles, - QString colorMapDirectory, - QString fileType); + const QString &colorMapDirectory, + const QString &fileType); /** * Compare the colormap names of the Slice Viewer and the VSI and extract all @@ -65,5 +65,5 @@ private: */ std::vector<int> getSliceViewerIndicesForCommonColorMaps(QStringList colorMapNamesSliceViewer, - QStringList colorMapNamesVsi); + const QStringList &colorMapNamesVsi); }; diff --git a/MantidPlot/src/MdiSubWindow.cpp b/MantidPlot/src/MdiSubWindow.cpp index fd422b069e77c89950997cd8fbe5199c2b90c3b6..5d1f5ef9b7a8c5d5a851c3ed6153c8776038daad 100644 --- a/MantidPlot/src/MdiSubWindow.cpp +++ b/MantidPlot/src/MdiSubWindow.cpp @@ -52,7 +52,7 @@ using std::string; using namespace Mantid; MdiSubWindow::MdiSubWindow(QWidget *parent, const QString &label, - const QString &name, Qt::WFlags f) + const QString &name, const Qt::WFlags &f) : MdiSubWindowParent_t(parent, f), d_app(static_cast<ApplicationWindow *>(parent)), d_folder(d_app->currentFolder()), d_label(label), d_status(Normal), @@ -70,7 +70,7 @@ MdiSubWindow::MdiSubWindow() d_min_restore_size(QSize()) {} void MdiSubWindow::init(QWidget *parent, const QString &label, - const QString &name, Qt::WFlags flags) { + const QString &name, const Qt::WFlags &flags) { setParent(parent); setObjectName(name); setName(name); diff --git a/MantidPlot/src/MdiSubWindow.h b/MantidPlot/src/MdiSubWindow.h index 87c7330c64179e098c9f247ac5a5fe675647d664..b2575cf0a8b0ce1aa3b26480652620cae5bd5a3a 100644 --- a/MantidPlot/src/MdiSubWindow.h +++ b/MantidPlot/src/MdiSubWindow.h @@ -49,7 +49,7 @@ class Folder; class MdiSubWindowParent_t : public QFrame { Q_OBJECT public: - MdiSubWindowParent_t(QWidget *parent, Qt::WFlags f = nullptr) + MdiSubWindowParent_t(QWidget *parent, const Qt::WFlags &f = nullptr) : QFrame(parent, f), m_widget(nullptr) {} void setWidget(QWidget *w) { if (w == nullptr) { // removing widget @@ -124,13 +124,13 @@ public: * \sa setCaptionPolicy(), captionPolicy() */ MdiSubWindow(QWidget *parent, const QString &label = QString(), - const QString &name = QString(), Qt::WFlags f = nullptr); + const QString &name = QString(), const Qt::WFlags &f = nullptr); MdiSubWindow(); /// Setup the window without constructor void init(QWidget *parent, const QString &label, const QString &name, - Qt::WFlags flags); + const Qt::WFlags &flags); //! Possible window captions. enum CaptionPolicy { diff --git a/MantidPlot/src/MenuWithToolTips.cpp b/MantidPlot/src/MenuWithToolTips.cpp index 14e48383377dfbc6aeb1e7a8968222a07b982016..5821a36cd90b8ea0b9ab3434a93c233623c3504d 100644 --- a/MantidPlot/src/MenuWithToolTips.cpp +++ b/MantidPlot/src/MenuWithToolTips.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MenuWithToolTips.h" diff --git a/MantidPlot/src/MenuWithToolTips.h b/MantidPlot/src/MenuWithToolTips.h index a33ddd27a7caf4f82b1c7f4660300f3eb7a3cd3b..00d269b351c55f4b9bb854dad87991387cc88360 100644 --- a/MantidPlot/src/MenuWithToolTips.h +++ b/MantidPlot/src/MenuWithToolTips.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/MantidPlot/src/MultiLayer.cpp b/MantidPlot/src/MultiLayer.cpp index 13ea8f39184ad2d23a120b1d1df3cbfdaf74d277..f9e07ea5f817de2611c8569ccb9f97252d01076e 100644 --- a/MantidPlot/src/MultiLayer.cpp +++ b/MantidPlot/src/MultiLayer.cpp @@ -113,7 +113,8 @@ void LayerButton::mouseDoubleClickEvent(QMouseEvent *) { } MultiLayer::MultiLayer(QWidget *parent, int layers, int rows, int cols, - const QString &label, const char *name, Qt::WFlags f) + const QString &label, const char *name, + const Qt::WFlags &f) : MdiSubWindow(parent, label, name, f), active_graph(nullptr), d_cols(cols), d_rows(rows), graph_width(500), graph_height(400), colsSpace(5), rowsSpace(5), left_margin(5), right_margin(5), top_margin(5), diff --git a/MantidPlot/src/MultiLayer.h b/MantidPlot/src/MultiLayer.h index ad453f12b188d91cd64b856fa7e5c5ce84cc576f..b0ce909fd8666127c0da4a9c1162925af88164c6 100644 --- a/MantidPlot/src/MultiLayer.h +++ b/MantidPlot/src/MultiLayer.h @@ -82,7 +82,7 @@ class MultiLayer : public MdiSubWindow { public: MultiLayer(QWidget *parent, int layers = 1, int rows = 1, int cols = 1, const QString &label = "", const char *name = nullptr, - Qt::WFlags f = nullptr); + const Qt::WFlags &f = nullptr); ~MultiLayer() override; /// Get the window type as a string diff --git a/MantidPlot/src/MultiTabScriptInterpreter.cpp b/MantidPlot/src/MultiTabScriptInterpreter.cpp index 1046f6d5052a0d8a1cea387670b40004866f2c55..170216c4f12016c4693688169272de2fbddf07e3 100644 --- a/MantidPlot/src/MultiTabScriptInterpreter.cpp +++ b/MantidPlot/src/MultiTabScriptInterpreter.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //----------------------------------------------------- // Includes @@ -304,8 +304,6 @@ void MultiTabScriptInterpreter::evaluate() { QMessageBox::information(this, "MantidPlot", "Evaluate is not implemented."); } -/** - */ void MultiTabScriptInterpreter::clearScriptVariables() { m_current->clearVariables(); } diff --git a/MantidPlot/src/MultiTabScriptInterpreter.h b/MantidPlot/src/MultiTabScriptInterpreter.h index 710018f499ace818f19c2ba7da1ab5605aa5c637..efe282e264fd5887459c6d100aa4f76fe195628c 100644 --- a/MantidPlot/src/MultiTabScriptInterpreter.h +++ b/MantidPlot/src/MultiTabScriptInterpreter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/MantidPlot/src/MyParser.h b/MantidPlot/src/MyParser.h index 9d91ce503054375817d1ad095f76eff0a1246851..7c3ae0b835dab3f893b9114c092df083091d8f3a 100644 --- a/MantidPlot/src/MyParser.h +++ b/MantidPlot/src/MyParser.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2006 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /*************************************************************************** File : MyParser.h diff --git a/MantidPlot/src/NonLinearFit.cpp b/MantidPlot/src/NonLinearFit.cpp index 4f4e3e663c31a54f7b5793466785e19e4a04db1b..72f6483aef0f4799f76153c47d44608117947728 100644 --- a/MantidPlot/src/NonLinearFit.cpp +++ b/MantidPlot/src/NonLinearFit.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2006 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /*************************************************************************** File : NonLinearFit.cpp diff --git a/MantidPlot/src/Note.cpp b/MantidPlot/src/Note.cpp index 51dd908bec782c521379afa66754ee8bef0087bc..ca70a44a87aacc685127fb804a81fc126617ef07 100644 --- a/MantidPlot/src/Note.cpp +++ b/MantidPlot/src/Note.cpp @@ -50,7 +50,7 @@ DECLARE_WINDOW(Note) using namespace Mantid; Note::Note(const QString &label, QWidget *parent, const QString &name, - Qt::WFlags f) + const Qt::WFlags &f) : MdiSubWindow(parent, label, name, f) { te = new QTextEdit(this); te->setObjectName(name); diff --git a/MantidPlot/src/Note.h b/MantidPlot/src/Note.h index d338954d35661a873d29b53a80eac6ccbb8d28b4..e724c86c9ae95d0de2fcd8e40f0036e6752e71b0 100644 --- a/MantidPlot/src/Note.h +++ b/MantidPlot/src/Note.h @@ -45,7 +45,7 @@ class Note : public MdiSubWindow { public: Note(const QString &label, QWidget *parent, const QString &name = QString(), - Qt::WFlags f = nullptr); + const Qt::WFlags &f = nullptr); ~Note() override{}; static MantidQt::API::IProjectSerialisable * diff --git a/MantidPlot/src/Plot3DDialog.cpp b/MantidPlot/src/Plot3DDialog.cpp index 44e1cac3bebf76e46848d581412bdd93bf062754..eedff1758176b13ef436475beff0cf33a447ce22 100644 --- a/MantidPlot/src/Plot3DDialog.cpp +++ b/MantidPlot/src/Plot3DDialog.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2004 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /*************************************************************************** File : Plot3DDialog.cpp @@ -46,7 +46,7 @@ using Mantid::Kernel::ConfigService; -Plot3DDialog::Plot3DDialog(QWidget *parent, Qt::WFlags fl) +Plot3DDialog::Plot3DDialog(QWidget *parent, const Qt::WFlags &fl) : QDialog(parent, fl) { setObjectName("Plot3DDialog"); setWindowTitle(tr("MantidPlot - Surface Plot Options")); diff --git a/MantidPlot/src/Plot3DDialog.h b/MantidPlot/src/Plot3DDialog.h index 99ed126b8f1b0fe0edf012c3026016f4b52f3bce..f8a6a179edf4d0b82cb22baca38c00add951fab4 100644 --- a/MantidPlot/src/Plot3DDialog.h +++ b/MantidPlot/src/Plot3DDialog.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2004 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /*************************************************************************** File : Plot3DDialog.h @@ -41,7 +41,7 @@ class Plot3DDialog : public QDialog { Q_OBJECT public: - Plot3DDialog(QWidget *parent, Qt::WFlags fl = nullptr); + Plot3DDialog(QWidget *parent, const Qt::WFlags &fl = nullptr); void setPlot(Graph3D *); void showTitleTab(); diff --git a/MantidPlot/src/PlotDialog.cpp b/MantidPlot/src/PlotDialog.cpp index 933f04a338a81b5ed619617a2953ff90c922630c..5ca24067fa4fbfc4613a4499e2c13f2d0c4843e2 100644 --- a/MantidPlot/src/PlotDialog.cpp +++ b/MantidPlot/src/PlotDialog.cpp @@ -75,7 +75,7 @@ using Mantid::Kernel::ConfigService; using namespace MantidQt::API; PlotDialog::PlotDialog(bool showExtended, ApplicationWindow *app, - MultiLayer *ml, Qt::WFlags fl) + MultiLayer *ml, const Qt::WFlags &fl) : QDialog(ml, fl), d_app(app), d_ml(nullptr) { setObjectName("PlotDialog"); setWindowTitle(tr("MantidPlot - Plot details")); diff --git a/MantidPlot/src/PlotDialog.h b/MantidPlot/src/PlotDialog.h index beb8d8a62a29ea88227bb497153835efe78d6000..a1d7a4175197797b6508d8072c3c1351e651d588 100644 --- a/MantidPlot/src/PlotDialog.h +++ b/MantidPlot/src/PlotDialog.h @@ -69,7 +69,7 @@ class PlotDialog : public QDialog { public: PlotDialog(bool showExtended, ApplicationWindow *app, MultiLayer *ml, - Qt::WFlags fl = nullptr); + const Qt::WFlags &fl = nullptr); void initFonts(const QFont &titlefont, const QFont &axesfont, const QFont &numbersfont, const QFont &legendfont); void insertColumnsList(const QStringList &names) { columnNames = names; }; diff --git a/MantidPlot/src/PlotWizard.cpp b/MantidPlot/src/PlotWizard.cpp index e181c6d17808b9520ab9253212716a5f8d395a5d..4d7db635cb44656d0fb8a9994a2efd7cb71fe4b6 100644 --- a/MantidPlot/src/PlotWizard.cpp +++ b/MantidPlot/src/PlotWizard.cpp @@ -37,7 +37,8 @@ #include <QGroupBox> #include <QListWidget> -PlotWizard::PlotWizard(QWidget *parent, Qt::WFlags fl) : QDialog(parent, fl) { +PlotWizard::PlotWizard(QWidget *parent, const Qt::WFlags &fl) + : QDialog(parent, fl) { setWindowTitle(tr("MantidPlot - Select Columns to Plot")); setSizeGripEnabled(true); diff --git a/MantidPlot/src/PlotWizard.h b/MantidPlot/src/PlotWizard.h index e7e69ff2ef4319d7aabcae886fa9eff355d05829..cb68e8867ed89783c36a80c7c97255c7705633a8 100644 --- a/MantidPlot/src/PlotWizard.h +++ b/MantidPlot/src/PlotWizard.h @@ -46,7 +46,7 @@ public: * @param parent :: parent widget * @param fl :: Qt window flags */ - PlotWizard(QWidget *parent = nullptr, Qt::WFlags fl = nullptr); + PlotWizard(QWidget *parent = nullptr, const Qt::WFlags &fl = nullptr); private: //! Button "Plot" diff --git a/MantidPlot/src/PolynomFitDialog.cpp b/MantidPlot/src/PolynomFitDialog.cpp index c06057a329063938c6d00574c0718ae4bad5b5f2..8d950fcfdace5b77d80e980da293cb610e1d7124 100644 --- a/MantidPlot/src/PolynomFitDialog.cpp +++ b/MantidPlot/src/PolynomFitDialog.cpp @@ -38,7 +38,7 @@ #include <QMessageBox> #include <QSpinBox> -PolynomFitDialog::PolynomFitDialog(QWidget *parent, Qt::WFlags fl) +PolynomFitDialog::PolynomFitDialog(QWidget *parent, const Qt::WFlags &fl) : QDialog(parent, fl), graph(nullptr) { setObjectName("PolynomFitDialog"); setWindowTitle(tr("MantidPlot - Polynomial Fit Options")); diff --git a/MantidPlot/src/PolynomFitDialog.h b/MantidPlot/src/PolynomFitDialog.h index 148607e92d58efcd95e9f12022af1769b6207ae0..7a1d51c1daf8a7c55d57e1ff33449559353acf8a 100644 --- a/MantidPlot/src/PolynomFitDialog.h +++ b/MantidPlot/src/PolynomFitDialog.h @@ -44,7 +44,7 @@ class PolynomFitDialog : public QDialog { Q_OBJECT public: - PolynomFitDialog(QWidget *parent = nullptr, Qt::WFlags fl = nullptr); + PolynomFitDialog(QWidget *parent = nullptr, const Qt::WFlags &fl = nullptr); public slots: void fit(); diff --git a/MantidPlot/src/PrecompiledHeader.h b/MantidPlot/src/PrecompiledHeader.h index 30dfb0d84f894f42025dd1ae001682e90c9b7d86..ac96630e9489864d19cb094192a8d143b3e132c1 100644 --- a/MantidPlot/src/PrecompiledHeader.h +++ b/MantidPlot/src/PrecompiledHeader.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/MantidPlot/src/Processes.cpp b/MantidPlot/src/Processes.cpp index 9c1721e3d6f175ac604c85aefbe84da6a365d1c7..92723188e4c696c81eb01e441a32973c236525ea 100644 --- a/MantidPlot/src/Processes.cpp +++ b/MantidPlot/src/Processes.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "Processes.h" @@ -24,7 +24,7 @@ namespace { -bool isOtherInstance(int64_t otherPID, QString otherExeName) { +bool isOtherInstance(int64_t otherPID, const QString &otherExeName) { static const int64_t ourPID(QCoreApplication::applicationPid()); if (otherPID == ourPID) return false; diff --git a/MantidPlot/src/Processes.h b/MantidPlot/src/Processes.h index c8c2736146c0e3b1f5e9b2820bad24e217f9d217..24291afab738630d66698178976c63651f628c78 100644 --- a/MantidPlot/src/Processes.h +++ b/MantidPlot/src/Processes.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/MantidPlot/src/ProjectRecovery.cpp b/MantidPlot/src/ProjectRecovery.cpp index 131eb06af79472867a6f89ca0089dbf5fc0bad97..7007e0d5a7bf9cf6aa27b603cc4f950f576cc371 100644 --- a/MantidPlot/src/ProjectRecovery.cpp +++ b/MantidPlot/src/ProjectRecovery.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "ProjectRecovery.h" @@ -339,7 +339,8 @@ bool ProjectRecovery::checkForRecovery() const noexcept { } } -bool ProjectRecovery::clearAllCheckpoints(Poco::Path path) const noexcept { +bool ProjectRecovery::clearAllCheckpoints(const Poco::Path &path) const + noexcept { try { Poco::File(path).remove(true); return true; diff --git a/MantidPlot/src/ProjectRecovery.h b/MantidPlot/src/ProjectRecovery.h index a28c45600c97dc2e8d24f0122585262b2afd138d..bc323123d21a490384d0dbde04cc201731310b14 100644 --- a/MantidPlot/src/ProjectRecovery.h +++ b/MantidPlot/src/ProjectRecovery.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -47,7 +47,7 @@ public: bool checkForRecovery() const noexcept; /// Clears all checkpoints in the existing folder at the given path - bool clearAllCheckpoints(Poco::Path path) const noexcept; + bool clearAllCheckpoints(const Poco::Path &path) const noexcept; /// Clears all checkpoints in the existing folder at the given path bool clearAllUnusedCheckpoints() const noexcept; diff --git a/MantidPlot/src/ProjectRecoveryGUIs/ProjectRecoveryModel.cpp b/MantidPlot/src/ProjectRecoveryGUIs/ProjectRecoveryModel.cpp index 8442c7853055420f192689a521716d7581033ace..d505805ab151077a2427dbe71b312b1cdad136e6 100644 --- a/MantidPlot/src/ProjectRecoveryGUIs/ProjectRecoveryModel.cpp +++ b/MantidPlot/src/ProjectRecoveryGUIs/ProjectRecoveryModel.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "ProjectRecoveryModel.h" #include "MantidAPI/AlgorithmManager.h" diff --git a/MantidPlot/src/ProjectRecoveryGUIs/ProjectRecoveryModel.h b/MantidPlot/src/ProjectRecoveryGUIs/ProjectRecoveryModel.h index 9e72180570662eaa9cd6e0319b966b98b7d1738e..c8e92ba4aa6da1ce893dd13e273cc485fc35aefc 100644 --- a/MantidPlot/src/ProjectRecoveryGUIs/ProjectRecoveryModel.h +++ b/MantidPlot/src/ProjectRecoveryGUIs/ProjectRecoveryModel.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/MantidPlot/src/ProjectRecoveryGUIs/ProjectRecoveryPresenter.cpp b/MantidPlot/src/ProjectRecoveryGUIs/ProjectRecoveryPresenter.cpp index 73d1b64b01217bae0b35abda2c673b7d8cc755f1..373bc8294b584e9708942122343f59eb332c2a98 100644 --- a/MantidPlot/src/ProjectRecoveryGUIs/ProjectRecoveryPresenter.cpp +++ b/MantidPlot/src/ProjectRecoveryGUIs/ProjectRecoveryPresenter.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "ProjectRecoveryPresenter.h" #include "ApplicationWindow.h" diff --git a/MantidPlot/src/ProjectRecoveryGUIs/ProjectRecoveryPresenter.h b/MantidPlot/src/ProjectRecoveryGUIs/ProjectRecoveryPresenter.h index 50563910e651c1e3803d1f75280e7d8c7eba626c..700bfba3566c77ddb3535cc7ffef42856f5b5562 100644 --- a/MantidPlot/src/ProjectRecoveryGUIs/ProjectRecoveryPresenter.h +++ b/MantidPlot/src/ProjectRecoveryGUIs/ProjectRecoveryPresenter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/MantidPlot/src/ProjectRecoveryGUIs/ProjectRecoveryView.cpp b/MantidPlot/src/ProjectRecoveryGUIs/ProjectRecoveryView.cpp index 4d92f4753af7e2b25f18ed5c7c67859c4df67e75..8b9b6a90bee74941505494ca769bcd848fa6ae79 100644 --- a/MantidPlot/src/ProjectRecoveryGUIs/ProjectRecoveryView.cpp +++ b/MantidPlot/src/ProjectRecoveryGUIs/ProjectRecoveryView.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "ProjectRecoveryView.h" #include "ApplicationWindow.h" diff --git a/MantidPlot/src/ProjectRecoveryGUIs/ProjectRecoveryView.h b/MantidPlot/src/ProjectRecoveryGUIs/ProjectRecoveryView.h index 4553c5bb08a68ae6029874c029937e2c7fda057b..ab012edda29327efe83552fea212fef3477ea5f4 100644 --- a/MantidPlot/src/ProjectRecoveryGUIs/ProjectRecoveryView.h +++ b/MantidPlot/src/ProjectRecoveryGUIs/ProjectRecoveryView.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/MantidPlot/src/ProjectRecoveryGUIs/RecoveryFailureView.cpp b/MantidPlot/src/ProjectRecoveryGUIs/RecoveryFailureView.cpp index f6cc6b9229dc8a89f71d27e123782f9aecc052df..13b386710b3b3aba02f8fad8b66e00b4f3632f4b 100644 --- a/MantidPlot/src/ProjectRecoveryGUIs/RecoveryFailureView.cpp +++ b/MantidPlot/src/ProjectRecoveryGUIs/RecoveryFailureView.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "RecoveryFailureView.h" #include "ApplicationWindow.h" diff --git a/MantidPlot/src/ProjectRecoveryGUIs/RecoveryFailureView.h b/MantidPlot/src/ProjectRecoveryGUIs/RecoveryFailureView.h index 3fc779cc9d20cdf77a540903e92399140a3d0db9..9db0de3efa6530a2180fc924c0170cf54e9471b4 100644 --- a/MantidPlot/src/ProjectRecoveryGUIs/RecoveryFailureView.h +++ b/MantidPlot/src/ProjectRecoveryGUIs/RecoveryFailureView.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/MantidPlot/src/ProjectRecoveryGUIs/RecoveryThread.cpp b/MantidPlot/src/ProjectRecoveryGUIs/RecoveryThread.cpp index a1e6ad6fb759ef4649097b88641afd7e43b5eb9e..8a340ec6128f1312fc6a6a1d4769c4eb69d9999e 100644 --- a/MantidPlot/src/ProjectRecoveryGUIs/RecoveryThread.cpp +++ b/MantidPlot/src/ProjectRecoveryGUIs/RecoveryThread.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "RecoveryThread.h" #include "ProjectRecovery.h" diff --git a/MantidPlot/src/ProjectRecoveryGUIs/RecoveryThread.h b/MantidPlot/src/ProjectRecoveryGUIs/RecoveryThread.h index ad01ab61fe3556e268c09d6c77aaef6dbbc06e5d..e004a0a77d19335439b136a007299621c9a7e4e2 100644 --- a/MantidPlot/src/ProjectRecoveryGUIs/RecoveryThread.h +++ b/MantidPlot/src/ProjectRecoveryGUIs/RecoveryThread.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/MantidPlot/src/ProjectSaveView.cpp b/MantidPlot/src/ProjectSaveView.cpp index 0b8a041762b676d9f3b2d5ce1bbe1937f4a63697..aad7ae7584c49b79ee05c3879a7819b0721b5f4a 100644 --- a/MantidPlot/src/ProjectSaveView.cpp +++ b/MantidPlot/src/ProjectSaveView.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/IProjectSerialisable.h" #include "MantidQtWidgets/Common/ProjectSavePresenter.h" diff --git a/MantidPlot/src/ProjectSaveView.h b/MantidPlot/src/ProjectSaveView.h index 14f217f56dbf15b03fa1e6a96a2b19d1bee7f3ea..998854777492e719759f55d8ad852f5b159eda14 100644 --- a/MantidPlot/src/ProjectSaveView.h +++ b/MantidPlot/src/ProjectSaveView.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/MantidPlot/src/ProjectSerialiser.cpp b/MantidPlot/src/ProjectSerialiser.cpp index fbdbc0ec422074c044edbaf1eda442f5d0451674..3cfbb334e7c6bb34d74b51ddab44bc4396706c7c 100644 --- a/MantidPlot/src/ProjectSerialiser.cpp +++ b/MantidPlot/src/ProjectSerialiser.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + // clang-format off #include "PythonScripting.h" @@ -220,7 +220,7 @@ bool ProjectSerialiser::save(const QString &projectName, bool compress, * folder. (Default True) * @return True is loading was successful, otherwise false */ -bool ProjectSerialiser::load(std::string filepath, const int fileVersion, +bool ProjectSerialiser::load(const std::string &filepath, const int fileVersion, const bool isTopLevel) { // We have to accept std::string to maintain Python compatibility auto qfilePath = QString::fromStdString(filepath); diff --git a/MantidPlot/src/ProjectSerialiser.h b/MantidPlot/src/ProjectSerialiser.h index 61dd4c82171c43e43d8a68aaed1270055d36ec55..7ef131461b2a734cd11e176a8655a3f4b8cd6498 100644 --- a/MantidPlot/src/ProjectSerialiser.h +++ b/MantidPlot/src/ProjectSerialiser.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -59,7 +59,7 @@ public: bool save(const QString &projectName, bool compress = false, bool saveAll = true); /// Load a project file from disk - bool load(std::string filepath, const int fileVersion, + bool load(const std::string &filepath, const int fileVersion, const bool isTopLevel = true); /// Open the script window and load scripts from string void openScriptWindow(const QStringList &files); diff --git a/MantidPlot/src/PythonScript.cpp b/MantidPlot/src/PythonScript.cpp index 6f26d83b33c4c42bab28320f0e8a8aaf95861700..a09644d2005e66f9a4faffee814061ea16142d4e 100644 --- a/MantidPlot/src/PythonScript.cpp +++ b/MantidPlot/src/PythonScript.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2006 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /*************************************************************************** File : PythonScript.cpp diff --git a/MantidPlot/src/PythonScript.h b/MantidPlot/src/PythonScript.h index f5a5871db4d075f91c669fd33a8d86778888c07b..bda04817955b4e60f912ef6a2f89ed7305f2f0ee 100644 --- a/MantidPlot/src/PythonScript.h +++ b/MantidPlot/src/PythonScript.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2006 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /*************************************************************************** File : PythonScript.h diff --git a/MantidPlot/src/PythonScripting.cpp b/MantidPlot/src/PythonScripting.cpp index b1f4d80d1759d23f657ec161eb968df199be2e14..3339d048df8238a547c2850aa2026f667de5d2e5 100644 --- a/MantidPlot/src/PythonScripting.cpp +++ b/MantidPlot/src/PythonScripting.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2006 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /*************************************************************************** File : PythonScripting.cpp diff --git a/MantidPlot/src/PythonScripting.h b/MantidPlot/src/PythonScripting.h index 5023de4238522b640ae6019cd538d213fd2de31b..aa5ffd4ab08c88d77d6ebb263c1e4299609eaace 100644 --- a/MantidPlot/src/PythonScripting.h +++ b/MantidPlot/src/PythonScripting.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2006 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /*************************************************************************** File : PythonScripting.h diff --git a/MantidPlot/src/QwtPieCurve.cpp b/MantidPlot/src/QwtPieCurve.cpp index 212d79424e598d46daea4165de0f971d0621a95a..d8940ec2439ebdc0a5401b2dd8e3131f6973270c 100644 --- a/MantidPlot/src/QwtPieCurve.cpp +++ b/MantidPlot/src/QwtPieCurve.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2004 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /*************************************************************************** File : QwtPieCurve.cpp diff --git a/MantidPlot/src/QwtPieCurve.h b/MantidPlot/src/QwtPieCurve.h index a793273021f849ae52a45c73283e054358bce536..328d3ac8f262d1142344ce00d25721a026d2e92f 100644 --- a/MantidPlot/src/QwtPieCurve.h +++ b/MantidPlot/src/QwtPieCurve.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2004 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /*************************************************************************** File : QwtPieCurve.h diff --git a/MantidPlot/src/RenameWindowDialog.cpp b/MantidPlot/src/RenameWindowDialog.cpp index e717cf0ec27ae05555c28d5d2e91012dfe2982d5..0fde8040217f54a9bd6235b6f96603f75c9d9a2a 100644 --- a/MantidPlot/src/RenameWindowDialog.cpp +++ b/MantidPlot/src/RenameWindowDialog.cpp @@ -37,7 +37,7 @@ #include <QMessageBox> #include <QRadioButton> -RenameWindowDialog::RenameWindowDialog(QWidget *parent, Qt::WFlags fl) +RenameWindowDialog::RenameWindowDialog(QWidget *parent, const Qt::WFlags &fl) : QDialog(parent, fl) { setWindowTitle(tr("MantidPlot - Rename Window")); diff --git a/MantidPlot/src/RenameWindowDialog.h b/MantidPlot/src/RenameWindowDialog.h index 2307e1af7f3e77c8c7c2839feb3de008b04b2533..87efc06339dd8c9efd9612a1755451a7933ebd5a 100644 --- a/MantidPlot/src/RenameWindowDialog.h +++ b/MantidPlot/src/RenameWindowDialog.h @@ -47,7 +47,7 @@ class RenameWindowDialog : public QDialog { Q_OBJECT public: - RenameWindowDialog(QWidget *parent = nullptr, Qt::WFlags fl = nullptr); + RenameWindowDialog(QWidget *parent = nullptr, const Qt::WFlags &fl = nullptr); private: QPushButton *buttonOk; diff --git a/MantidPlot/src/ScaleDetails.cpp b/MantidPlot/src/ScaleDetails.cpp index a8646fb5210e234ba1a932d4e042265e0a7d3f8b..0f183674451da9fdcc373968477df9a6ad007546 100644 --- a/MantidPlot/src/ScaleDetails.cpp +++ b/MantidPlot/src/ScaleDetails.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //--------------------------- // Includes diff --git a/MantidPlot/src/ScaleDetails.h b/MantidPlot/src/ScaleDetails.h index b5d03318d488747dc4ca7484e0151775be9cfbd1..31dcd4851b1141c0a880719404164dc3540bdd59 100644 --- a/MantidPlot/src/ScaleDetails.h +++ b/MantidPlot/src/ScaleDetails.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /** This class holds the widgets that hold the details for each axis so the contents diff --git a/MantidPlot/src/ScaleDraw.cpp b/MantidPlot/src/ScaleDraw.cpp index 66a2ded13104697c42dee8fc3ca722d0af729a9e..8736b1bd941a61886ad0f7e18d7ac04334d5e44e 100644 --- a/MantidPlot/src/ScaleDraw.cpp +++ b/MantidPlot/src/ScaleDraw.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2006 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /*************************************************************************** File : ScaleDraw.cpp diff --git a/MantidPlot/src/ScaleDraw.h b/MantidPlot/src/ScaleDraw.h index 20b97063f98d413bc5ebb603db9156b4a4cb7157..b0d9191d9af7dcc8e1fc00145854c78daddf1486 100644 --- a/MantidPlot/src/ScaleDraw.h +++ b/MantidPlot/src/ScaleDraw.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2006 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /*************************************************************************** File : ScaleDraw.h diff --git a/MantidPlot/src/ScalePicker.cpp b/MantidPlot/src/ScalePicker.cpp index ed03f3352f6332fa044f9c8c4bd61c80ee935838..812e713e9d86a3bf204ceda521b83b2b32588ffd 100644 --- a/MantidPlot/src/ScalePicker.cpp +++ b/MantidPlot/src/ScalePicker.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /*************************************************************************** File : ScalePicker.cpp diff --git a/MantidPlot/src/ScalePicker.h b/MantidPlot/src/ScalePicker.h index 472be2c34614a1b1b65ce8856b886e96f0c327e4..3e5e65b229375040755135ef0b99e6db526b9d18 100644 --- a/MantidPlot/src/ScalePicker.h +++ b/MantidPlot/src/ScalePicker.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /*************************************************************************** File : ScalePicker.h diff --git a/MantidPlot/src/ScriptCode.cpp b/MantidPlot/src/ScriptCode.cpp index c5ea2c6cc63e230f49ce2998928799ceee4b5ccd..3ac1bee0b03182172fc87ab5d6b7493d34efb588 100644 --- a/MantidPlot/src/ScriptCode.cpp +++ b/MantidPlot/src/ScriptCode.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "ScriptCode.h" #include <boost/regex.hpp> diff --git a/MantidPlot/src/ScriptCode.h b/MantidPlot/src/ScriptCode.h index ad5fb449288eb93bd9d5adc5930d51f9e2e9fcc2..65a742bd071dbffe738998c4af706f3e4d4e85de 100644 --- a/MantidPlot/src/ScriptCode.h +++ b/MantidPlot/src/ScriptCode.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/MantidPlot/src/ScriptFileInterpreter.cpp b/MantidPlot/src/ScriptFileInterpreter.cpp index e6ace4c7972aa60b7bffb472daa71061e9dc018b..96a31c67030f2e39956d612c6f6bc530ecece02a 100644 --- a/MantidPlot/src/ScriptFileInterpreter.cpp +++ b/MantidPlot/src/ScriptFileInterpreter.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "ScriptFileInterpreter.h" #include "MantidQtWidgets/Common/ScriptEditor.h" @@ -379,8 +379,6 @@ void ScriptFileInterpreter::executeSelection(const Script::ExecutionMode mode) { */ void ScriptFileInterpreter::abort() { m_runner->abort(); } -/** - */ void ScriptFileInterpreter::clearVariables() { m_runner->clearLocals(); } /// Toggles the progress reports on/off diff --git a/MantidPlot/src/ScriptFileInterpreter.h b/MantidPlot/src/ScriptFileInterpreter.h index b443ee9bf72bba2f5b55c4039d1f7a890cf38a94..a22d4dab61a793eb9b165d564b30473c9be8b120 100644 --- a/MantidPlot/src/ScriptFileInterpreter.h +++ b/MantidPlot/src/ScriptFileInterpreter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/MantidPlot/src/ScriptOutputDisplay.cpp b/MantidPlot/src/ScriptOutputDisplay.cpp index e654fca92a2d950186725ffc202661533645b62a..60bc6a81d92e0834cd312a6d6b9b4f0907ea5051 100644 --- a/MantidPlot/src/ScriptOutputDisplay.cpp +++ b/MantidPlot/src/ScriptOutputDisplay.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "ScriptOutputDisplay.h" #include "TextFileIO.h" diff --git a/MantidPlot/src/ScriptOutputDisplay.h b/MantidPlot/src/ScriptOutputDisplay.h index 667f85c32db35e514e768d128f951cdd8ff255a2..776f947bdb50a6421e3a31d7aeaa8635fc90bd19 100644 --- a/MantidPlot/src/ScriptOutputDisplay.h +++ b/MantidPlot/src/ScriptOutputDisplay.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/MantidPlot/src/Scripted.cpp b/MantidPlot/src/Scripted.cpp index 7027de49f70eb7085c4574e91ca0272d36733041..676b8fbc02a5ae40130145159204bc19e093fe88 100644 --- a/MantidPlot/src/Scripted.cpp +++ b/MantidPlot/src/Scripted.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //------------------------------------- // Includes diff --git a/MantidPlot/src/Scripted.h b/MantidPlot/src/Scripted.h index b5b39cd2474c97e0a2cf0da31a875a9f96887902..8204f1ba85dca4627f678b61b700e9b7f530db05 100644 --- a/MantidPlot/src/Scripted.h +++ b/MantidPlot/src/Scripted.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/MantidPlot/src/ScriptingLangDialog.cpp b/MantidPlot/src/ScriptingLangDialog.cpp index 58308238c79c30cc6fdff502c7bc6b28db296cfa..4ee342dd39c5daf7eb4d57710acef340e6e97c78 100644 --- a/MantidPlot/src/ScriptingLangDialog.cpp +++ b/MantidPlot/src/ScriptingLangDialog.cpp @@ -37,7 +37,7 @@ ScriptingLangDialog::ScriptingLangDialog(ScriptingEnv *env, ApplicationWindow *parent, - Qt::WFlags fl) + const Qt::WFlags &fl) : QDialog(parent, fl), Scripted(env) { setWindowTitle(tr("MantidPlot - Select scripting language")); diff --git a/MantidPlot/src/ScriptingLangDialog.h b/MantidPlot/src/ScriptingLangDialog.h index 1dc8dba2cdd226d7b9b3e2b9c8af31b3a0400d82..780c6ba9861cd1f6d4a1f1662b976917de4b48eb 100644 --- a/MantidPlot/src/ScriptingLangDialog.h +++ b/MantidPlot/src/ScriptingLangDialog.h @@ -43,7 +43,7 @@ class ScriptingLangDialog : public QDialog, public Scripted { public: ScriptingLangDialog(ScriptingEnv *env, ApplicationWindow *parent, - Qt::WFlags fl = nullptr); + const Qt::WFlags &fl = nullptr); public slots: void updateLangList(); diff --git a/MantidPlot/src/ScriptingWindow.cpp b/MantidPlot/src/ScriptingWindow.cpp index e4bb23f22a53117359419b34d0637c79677f81b5..2288aa924714f01b98b840b184da8ccde334c12b 100644 --- a/MantidPlot/src/ScriptingWindow.cpp +++ b/MantidPlot/src/ScriptingWindow.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //------------------------------------------- // Includes @@ -319,8 +319,6 @@ void ScriptingWindow::populateHelpMenu() { m_helpMenu->addAction(m_showPythonHelp); } -/** - */ void ScriptingWindow::updateWindowFlags() { Qt::WindowFlags flags = Qt::Window; if (m_alwaysOnTop->isChecked()) { @@ -421,8 +419,6 @@ void ScriptingWindow::executeSelection() { */ void ScriptingWindow::abortCurrent() { m_manager->abortCurrentScript(); } -/** - */ void ScriptingWindow::clearScriptVariables() { m_manager->clearScriptVariables(); } diff --git a/MantidPlot/src/ScriptingWindow.h b/MantidPlot/src/ScriptingWindow.h index f66d634d6ed14ec60d7bdd49b2b7f2a0725324bc..65c5c861c5b7e45467e37bc66c3dd3a01142f20e 100644 --- a/MantidPlot/src/ScriptingWindow.h +++ b/MantidPlot/src/ScriptingWindow.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/MantidPlot/src/SendToProgramDialog.cpp b/MantidPlot/src/SendToProgramDialog.cpp index 15a15e09b4f3caf531b5045ca5cdbc03d75fcc97..dd72797177637d5fcfe30c3df395e8bae379ba17 100644 --- a/MantidPlot/src/SendToProgramDialog.cpp +++ b/MantidPlot/src/SendToProgramDialog.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "SendToProgramDialog.h" #include "ConfigDialog.h" @@ -31,7 +31,7 @@ using namespace MantidQt::API; /** * Constructor when adding a new program to the send to list */ -SendToProgramDialog::SendToProgramDialog(QWidget *parent, Qt::WFlags fl) +SendToProgramDialog::SendToProgramDialog(QWidget *parent, const Qt::WFlags &fl) : QDialog(parent, fl), validName(false), validTarget(false), validSaveUsing(false) { m_uiform.setupUi(this); @@ -61,8 +61,9 @@ SendToProgramDialog::SendToProgramDialog(QWidget *parent, Qt::WFlags fl) * Constructor when editing a program settings */ SendToProgramDialog::SendToProgramDialog( - QWidget *parent, QString programName, - std::map<std::string, std::string> programKeysAndDetails, Qt::WFlags fl) + QWidget *parent, const QString &programName, + std::map<std::string, std::string> programKeysAndDetails, + const Qt::WFlags &fl) : QDialog(parent, fl), validName(true), validTarget(true), validSaveUsing(true) { m_uiform.setupUi(this); diff --git a/MantidPlot/src/SendToProgramDialog.h b/MantidPlot/src/SendToProgramDialog.h index 20c1e43686d586921db501fd4762e7750a3c42c1..1e16fc996abd1abdfba0ee8d0e2fd40d291fb0fb 100644 --- a/MantidPlot/src/SendToProgramDialog.h +++ b/MantidPlot/src/SendToProgramDialog.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -26,10 +26,10 @@ class SendToProgramDialog : public QDialog { Q_OBJECT public: - SendToProgramDialog(QWidget *parent, Qt::WFlags fl = nullptr); - SendToProgramDialog(QWidget *parent, QString programName, + SendToProgramDialog(QWidget *parent, const Qt::WFlags &fl = nullptr); + SendToProgramDialog(QWidget *parent, const QString &programName, std::map<std::string, std::string> programKeysAndDetails, - Qt::WFlags fl = nullptr); + const Qt::WFlags &fl = nullptr); std::pair<std::string, std::map<std::string, std::string>> getSettings() const; diff --git a/MantidPlot/src/SetColValuesDialog.cpp b/MantidPlot/src/SetColValuesDialog.cpp index a04958664203f33cbf845fe1e7d366bfb76480a5..969f46337c3b24c1e801c2e0adc122a5456ead55 100644 --- a/MantidPlot/src/SetColValuesDialog.cpp +++ b/MantidPlot/src/SetColValuesDialog.cpp @@ -50,7 +50,7 @@ #endif SetColValuesDialog::SetColValuesDialog(ScriptingEnv *env, Table *t, - Qt::WFlags fl) + const Qt::WFlags &fl) : QDialog(t, fl), Scripted(env) { setObjectName("SetColValuesDialog"); setWindowTitle(tr("MantidPlot - Set column values")); diff --git a/MantidPlot/src/SetColValuesDialog.h b/MantidPlot/src/SetColValuesDialog.h index 9732f19ff59d51fb3bf0d0a108865fbb0422c812..65be95aec42f88a53e158f143bd20a96f920555d 100644 --- a/MantidPlot/src/SetColValuesDialog.h +++ b/MantidPlot/src/SetColValuesDialog.h @@ -52,7 +52,8 @@ class SetColValuesDialog : public QDialog, public Scripted { Q_OBJECT public: - SetColValuesDialog(ScriptingEnv *env, Table *t, Qt::WFlags fl = nullptr); + SetColValuesDialog(ScriptingEnv *env, Table *t, + const Qt::WFlags &fl = nullptr); private slots: bool apply(); diff --git a/MantidPlot/src/SigmoidalFit.cpp b/MantidPlot/src/SigmoidalFit.cpp index 01519bc2502c607a17ca5b9bd19dd3bd38d784a4..dbc1c5c06d290c75d86132f56d2346d4bda6c724 100644 --- a/MantidPlot/src/SigmoidalFit.cpp +++ b/MantidPlot/src/SigmoidalFit.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /*************************************************************************** File : SigmoidalFit.cpp diff --git a/MantidPlot/src/SigmoidalFit.h b/MantidPlot/src/SigmoidalFit.h index 4f277c310a69b8ed3165bdd4bbdb9cec9c4f3dff..b2725a5e7f6b5785d2664b4cff1f8b475558c878 100644 --- a/MantidPlot/src/SigmoidalFit.h +++ b/MantidPlot/src/SigmoidalFit.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /*************************************************************************** File : SigmoidalFit.h diff --git a/MantidPlot/src/SmoothCurveDialog.cpp b/MantidPlot/src/SmoothCurveDialog.cpp index 1881bb953b86272117e382c6820e466ccfc4ef40..83d941b1166b1f19db86658086aeea994b641c0a 100644 --- a/MantidPlot/src/SmoothCurveDialog.cpp +++ b/MantidPlot/src/SmoothCurveDialog.cpp @@ -42,7 +42,8 @@ #include <QPushButton> #include <QSpinBox> -SmoothCurveDialog::SmoothCurveDialog(int method, QWidget *parent, Qt::WFlags fl) +SmoothCurveDialog::SmoothCurveDialog(int method, QWidget *parent, + const Qt::WFlags &fl) : QDialog(parent, fl), graph(nullptr), boxPointsLeft(nullptr), boxPointsRight(nullptr), boxOrder(nullptr) { smooth_method = method; diff --git a/MantidPlot/src/SmoothCurveDialog.h b/MantidPlot/src/SmoothCurveDialog.h index 644f417a1fa5b5b79e45cb9fa45442e5abf67d1f..e5e9048ce28d295a5ce4cda4e0e5ea4cac959bd9 100644 --- a/MantidPlot/src/SmoothCurveDialog.h +++ b/MantidPlot/src/SmoothCurveDialog.h @@ -43,7 +43,7 @@ class SmoothCurveDialog : public QDialog { public: SmoothCurveDialog(int method, QWidget *parent = nullptr, - Qt::WFlags fl = nullptr); + const Qt::WFlags &fl = nullptr); public slots: void setGraph(Graph *g); diff --git a/MantidPlot/src/SmoothFilter.cpp b/MantidPlot/src/SmoothFilter.cpp index 9b3bc8d4941db590da6ff43152bc173e9baed552..11529e7224aad857deabd8ca6e1d034eeec50902 100644 --- a/MantidPlot/src/SmoothFilter.cpp +++ b/MantidPlot/src/SmoothFilter.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /*************************************************************************** File : SmoothFilter.cpp diff --git a/MantidPlot/src/SmoothFilter.h b/MantidPlot/src/SmoothFilter.h index b559db1f99953f18f930723a7b4003f0d61ae7cf..4f61e62e7d7caeedf9443da6769dc20520435afa 100644 --- a/MantidPlot/src/SmoothFilter.h +++ b/MantidPlot/src/SmoothFilter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /*************************************************************************** File : SmoothFilter.h diff --git a/MantidPlot/src/SortDialog.cpp b/MantidPlot/src/SortDialog.cpp index 4914069e850538758fc35b068c9fb5c84a8891e7..8e422cbcc3d968ed78be05372176ebf1e9f95cf8 100644 --- a/MantidPlot/src/SortDialog.cpp +++ b/MantidPlot/src/SortDialog.cpp @@ -36,7 +36,8 @@ #include <QLayout> #include <QPushButton> -SortDialog::SortDialog(QWidget *parent, Qt::WFlags fl) : QDialog(parent, fl) { +SortDialog::SortDialog(QWidget *parent, const Qt::WFlags &fl) + : QDialog(parent, fl) { setWindowTitle(tr("MantidPlot - Sorting Options")); setSizeGripEnabled(true); diff --git a/MantidPlot/src/SortDialog.h b/MantidPlot/src/SortDialog.h index 42ce2a3e622898ec5b5f448e600d6dbc761e0422..6773e9bb1fd47f79d0de4746b979b62c52f1433c 100644 --- a/MantidPlot/src/SortDialog.h +++ b/MantidPlot/src/SortDialog.h @@ -39,7 +39,7 @@ class SortDialog : public QDialog { Q_OBJECT public: - SortDialog(QWidget *parent = nullptr, Qt::WFlags fl = nullptr); + SortDialog(QWidget *parent = nullptr, const Qt::WFlags &fl = nullptr); void insertColumnsList(const QStringList &cols); private slots: diff --git a/MantidPlot/src/Spectrogram.cpp b/MantidPlot/src/Spectrogram.cpp index 3d60e8bc3894a3fb0c225686fb5cff80989c5d61..8c02a539d938d6fb9827d372a731dabca31ef679 100644 --- a/MantidPlot/src/Spectrogram.cpp +++ b/MantidPlot/src/Spectrogram.cpp @@ -49,6 +49,7 @@ #include "MantidQtWidgets/Common/TSVSerialiser.h" #include <numeric> +#include <utility> Spectrogram::Spectrogram() : QObject(), QwtPlotSpectrogram(), d_color_map_pen(false), @@ -694,7 +695,7 @@ void Spectrogram::loadSettings() { * This method saves the selectcolrmap file name to membervaraible */ void Spectrogram::setColorMapFileName(QString colormapName) { - mCurrentColorMap = colormapName; + mCurrentColorMap = std::move(colormapName); } QwtDoubleRect Spectrogram::boundingRect() const { return d_matrix ? d_matrix->boundingRect() : data().boundingRect(); @@ -707,7 +708,7 @@ double Spectrogram::getMinPositiveValue() const { } void Spectrogram::setContourPenList(QList<QPen> lst) { - d_pen_list = lst; + d_pen_list = std::move(lst); setDefaultContourPen(Qt::NoPen); d_color_map_pen = false; } diff --git a/MantidPlot/src/SurfaceDialog.cpp b/MantidPlot/src/SurfaceDialog.cpp index 6cdd0c33c1a255aece46130489c8fd1d21022c81..812bde0ca580b0e3e1d73f1c44783509b8438192 100644 --- a/MantidPlot/src/SurfaceDialog.cpp +++ b/MantidPlot/src/SurfaceDialog.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2006 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /*************************************************************************** File : SurfaceDialog.cpp @@ -34,7 +34,7 @@ #include <QSpinBox> #include <QStackedWidget> -SurfaceDialog::SurfaceDialog(QWidget *parent, Qt::WFlags fl) +SurfaceDialog::SurfaceDialog(QWidget *parent, const Qt::WFlags &fl) : QDialog(parent, fl) { setObjectName("SurfaceDialog"); setWindowTitle(tr("MantidPlot - Define surface plot")); diff --git a/MantidPlot/src/SurfaceDialog.h b/MantidPlot/src/SurfaceDialog.h index 9b01bde75bb5c414e82ebb22c58665fe55e3fc06..239a4ae773745654669c94be3b227be6b82f8783 100644 --- a/MantidPlot/src/SurfaceDialog.h +++ b/MantidPlot/src/SurfaceDialog.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2006 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /*************************************************************************** File : SurfaceDialog.h @@ -32,7 +32,7 @@ class SurfaceDialog : public QDialog { Q_OBJECT public: - SurfaceDialog(QWidget *parent = nullptr, Qt::WFlags fl = nullptr); + SurfaceDialog(QWidget *parent = nullptr, const Qt::WFlags &fl = nullptr); public slots: void accept() override; diff --git a/MantidPlot/src/Table.cpp b/MantidPlot/src/Table.cpp index 77a64b210d3752c16b4d78266a2f3ddf36d354dd..606c439cc61bb73f0f604720df53e0106e8338c8 100644 --- a/MantidPlot/src/Table.cpp +++ b/MantidPlot/src/Table.cpp @@ -73,7 +73,7 @@ using namespace Mantid; using namespace MantidQt::API; Table::Table(ScriptingEnv *env, int rows, int cols, const QString &label, - QWidget *parent, const QString &name, Qt::WFlags f) + QWidget *parent, const QString &name, const Qt::WFlags &f) : MdiSubWindow(parent, label, name, f), Scripted(env) { selectedCol = -1; d_saved_cells = nullptr; @@ -2002,7 +2002,7 @@ void Table::loadHeader(QStringList header) { setHeaderColType(); } -void Table::setHeader(QStringList header) { +void Table::setHeader(const QStringList &header) { col_label = header; setHeaderColType(); } @@ -3267,7 +3267,7 @@ void Table::recordSelection() { * @param alignment :: [input] Alignment flags to give the cell */ void Table::setTextAlignment(int row, int col, - QFlags<Qt::AlignmentFlag> alignment) { + const QFlags<Qt::AlignmentFlag> &alignment) { auto *cell = d_table->item(row, col); if (cell) { cell->setTextAlignment(alignment); diff --git a/MantidPlot/src/Table.h b/MantidPlot/src/Table.h index e81b3bc679523386b085e04de447c5ebce8fad66..434bb77f1c2078917aca9023420383a2b82bb44d 100644 --- a/MantidPlot/src/Table.h +++ b/MantidPlot/src/Table.h @@ -33,6 +33,9 @@ #include <QTableWidget> #include <QVarLengthArray> +#include <utility> + +#include <utility> #include "Graph.h" #include "MdiSubWindow.h" @@ -116,7 +119,7 @@ public: }; Table(ScriptingEnv *env, int r, int c, const QString &label, QWidget *parent, - const QString &name = QString(), Qt::WFlags f = nullptr); + const QString &name = QString(), const Qt::WFlags &f = nullptr); int topSelectedRow() const { return d_table->topSelectedRow(); } int bottomSelectedRow() const { return d_table->bottomSelectedRow(); } @@ -160,13 +163,14 @@ public slots: bool rightColumns = false); QList<int> plotDesignations() { return col_plot_type; }; - void setHeader(QStringList header); + void setHeader(const QStringList &header); void loadHeader(QStringList header); void setHeaderColType(); void setText(int row, int col, const QString &text); void setRandomValues(); void setAscValues(); - void setTextAlignment(int row, int col, QFlags<Qt::AlignmentFlag> alignment); + void setTextAlignment(int row, int col, + const QFlags<Qt::AlignmentFlag> &alignment); virtual void cellEdited(int, int col); void moveCurrentCell(); @@ -339,7 +343,7 @@ public slots: int columnType(int col) { return colTypes[col]; }; QList<int> columnTypes() { return colTypes; }; - void setColumnTypes(QList<int> ctl) { colTypes = ctl; }; + void setColumnTypes(QList<int> ctl) { colTypes = std::move(std::move(ctl)); }; void setColumnTypes(const QStringList &ctl); void setColumnType(int col, ColType val) { colTypes[col] = val; } diff --git a/MantidPlot/src/TableDialog.cpp b/MantidPlot/src/TableDialog.cpp index 546de53ec27cf47369e92622dea158d0f0edbe55..b7a10b34342c0364964fbe5310ca63565133db6c 100644 --- a/MantidPlot/src/TableDialog.cpp +++ b/MantidPlot/src/TableDialog.cpp @@ -45,7 +45,8 @@ #include <QSpinBox> #include <QTextEdit> -TableDialog::TableDialog(Table *t, Qt::WFlags fl) : QDialog(t, fl), d_table(t) { +TableDialog::TableDialog(Table *t, const Qt::WFlags &fl) + : QDialog(t, fl), d_table(t) { setObjectName("TableDialog"); setWindowTitle(tr("MantidPlot - Column options")); setSizeGripEnabled(true); diff --git a/MantidPlot/src/TableDialog.h b/MantidPlot/src/TableDialog.h index 0ddef50ab45ff6dc0dad8591103afcd637d4a519..5fc8b09dcc8d2c3b388a8bb5b93f518c9ea5d390 100644 --- a/MantidPlot/src/TableDialog.h +++ b/MantidPlot/src/TableDialog.h @@ -44,7 +44,7 @@ class TableDialog : public QDialog { Q_OBJECT public: - TableDialog(Table *t, Qt::WFlags fl = nullptr); + TableDialog(Table *t, const Qt::WFlags &fl = nullptr); private slots: void prevColumn(); diff --git a/MantidPlot/src/TableStatistics.cpp b/MantidPlot/src/TableStatistics.cpp index 98e09f7a1b043b6146d25f08ce2fce4d414ac9d9..fc6bbb93f3e42686b82b2d252ac89ea195a66a1b 100644 --- a/MantidPlot/src/TableStatistics.cpp +++ b/MantidPlot/src/TableStatistics.cpp @@ -47,7 +47,7 @@ DECLARE_WINDOW(TableStatistics) using namespace Mantid; TableStatistics::TableStatistics(ScriptingEnv *env, QWidget *parent, - Table *base, Type t, QList<int> targets) + Table *base, Type t, const QList<int> &targets) : Table(env, 1, 1, "", parent, ""), d_base(base), d_type(t), d_targets(targets) { diff --git a/MantidPlot/src/TableStatistics.h b/MantidPlot/src/TableStatistics.h index 0877b0e7be658b632ed2654801f3c311a3a33151..f489cc3db1f18c83cab8ba78ba46e73031df9751 100644 --- a/MantidPlot/src/TableStatistics.h +++ b/MantidPlot/src/TableStatistics.h @@ -43,7 +43,7 @@ public: //! supported statistics types enum Type { row, column }; TableStatistics(ScriptingEnv *env, QWidget *parent, Table *base, Type, - QList<int> targets); + const QList<int> &targets); //! return the type of statistics Type type() const { return d_type; } //! return the base table of which statistics are displayed diff --git a/MantidPlot/src/TextDialog.cpp b/MantidPlot/src/TextDialog.cpp index 62a2da5fb0e8b64486dd526d26d28c7841d57f60..255bf8398dbd138c307fe97bb05725c7baefaeb1 100644 --- a/MantidPlot/src/TextDialog.cpp +++ b/MantidPlot/src/TextDialog.cpp @@ -47,7 +47,7 @@ #include <qwt_scale_widget.h> -TextDialog::TextDialog(TextType type, QWidget *parent, Qt::WFlags fl) +TextDialog::TextDialog(TextType type, QWidget *parent, const Qt::WFlags &fl) : QDialog(parent, fl) { setAttribute(Qt::WA_DeleteOnClose); setWindowTitle(tr("MantidPlot - Text options")); diff --git a/MantidPlot/src/TextDialog.h b/MantidPlot/src/TextDialog.h index 28b7fecf68ef6930781255f9e561f7ec689c2381..59bbbd53dd3edcc47f0713279c46ccc6f615ca01 100644 --- a/MantidPlot/src/TextDialog.h +++ b/MantidPlot/src/TextDialog.h @@ -62,7 +62,8 @@ public: * @param parent :: parent widget * @param fl :: window flags */ - TextDialog(TextType type, QWidget *parent = nullptr, Qt::WFlags fl = nullptr); + TextDialog(TextType type, QWidget *parent = nullptr, + const Qt::WFlags &fl = nullptr); //! Return axis label alignment /** diff --git a/MantidPlot/src/TextEditor.cpp b/MantidPlot/src/TextEditor.cpp index 548a039019bca54f6481745d12892d4e28859e8a..b827d9046346b45df8f020ce7c7056c06d94e4b8 100644 --- a/MantidPlot/src/TextEditor.cpp +++ b/MantidPlot/src/TextEditor.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /*************************************************************************** File : TextEditor.cpp diff --git a/MantidPlot/src/TextEditor.h b/MantidPlot/src/TextEditor.h index a7af8929624e969813fabf237a746ca1004866c8..0e5ed5a59fb45b684f70804eb290b83c3df3cb85 100644 --- a/MantidPlot/src/TextEditor.h +++ b/MantidPlot/src/TextEditor.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /*************************************************************************** File : TextEditor.cpp diff --git a/MantidPlot/src/TextFileIO.cpp b/MantidPlot/src/TextFileIO.cpp index e548bf1d3aa8c0b32c4bbcba49f7e6fd55ad72e6..3e0085c4f12c13bee323e69af2fc001c3de08db4 100644 --- a/MantidPlot/src/TextFileIO.cpp +++ b/MantidPlot/src/TextFileIO.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "TextFileIO.h" #include "MantidQtWidgets/Common/FileDialogHandler.h" @@ -16,7 +16,8 @@ /** * Construct an object with a list of file filters */ -TextFileIO::TextFileIO(QStringList fileFilters) : m_filters(fileFilters) {} +TextFileIO::TextFileIO(const QStringList &fileFilters) + : m_filters(fileFilters) {} /** * Save to a file diff --git a/MantidPlot/src/TextFileIO.h b/MantidPlot/src/TextFileIO.h index 86268b8fe0420945db29798f0ca93ff5ae36c645..1c4b36c6bebf0802d1f64c3724955e8bc1e89195 100644 --- a/MantidPlot/src/TextFileIO.h +++ b/MantidPlot/src/TextFileIO.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -16,7 +16,7 @@ class TextFileIO { public: /// Construct the object with a list of file filters - explicit TextFileIO(QStringList fileFilters = QStringList()); + explicit TextFileIO(const QStringList &fileFilters = QStringList()); /// Save to a file bool save(const QString &txt, const QString &filename) const; diff --git a/MantidPlot/src/TiledWindow.cpp b/MantidPlot/src/TiledWindow.cpp index a9dc42e60c1c887967df6d5e1cb98cabd4b16628..46925af38084a218cb818107378e75247182af8d 100644 --- a/MantidPlot/src/TiledWindow.cpp +++ b/MantidPlot/src/TiledWindow.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "TiledWindow.h" #include "ApplicationWindow.h" @@ -76,8 +76,6 @@ void Tile::removeWidget() { m_widget = nullptr; } -/** - */ void Tile::paintEvent(QPaintEvent *ev) { QPainter painter(this); QRect bkGround = this->rect().adjusted(0, 0, -1, -1); @@ -217,7 +215,7 @@ InnerWidget *getInnerWidget(QWidget *w) { */ TiledWindow::TiledWindow(QWidget *parent, const QString &label, const QString &name, int nrows, int ncols, - Qt::WFlags f) + const Qt::WFlags &f) : MdiSubWindow(parent, label, name, f), m_scrollArea(nullptr), m_layout(nullptr), m_buttonPressed(false) { connect(this, SIGNAL(dropAtPositionQueued(MdiSubWindow *, QPoint, bool)), diff --git a/MantidPlot/src/TiledWindow.h b/MantidPlot/src/TiledWindow.h index 4b493cce5048379ca37c0aa02b3bd51560e1ae20..49df22a9e90743a2c29bb9c658f2b7b0d3241747 100644 --- a/MantidPlot/src/TiledWindow.h +++ b/MantidPlot/src/TiledWindow.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -30,7 +30,7 @@ class TiledWindow : public MdiSubWindow { public: TiledWindow(QWidget *parent, const QString &label, const QString &name = QString(), int nrows = 1, int ncols = 1, - Qt::WFlags f = nullptr); + const Qt::WFlags &f = nullptr); /// Populate a menu with actions void populateMenu(QMenu *menu); diff --git a/MantidPlot/src/TitlePicker.cpp b/MantidPlot/src/TitlePicker.cpp index a94af00e1f5ca45a01bb8334a47ac8a2cb8ea355..9d34262b6ec94534d42113116dee2021d450f76f 100644 --- a/MantidPlot/src/TitlePicker.cpp +++ b/MantidPlot/src/TitlePicker.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /*************************************************************************** File : TitlePicker.cpp diff --git a/MantidPlot/src/TitlePicker.h b/MantidPlot/src/TitlePicker.h index 1f4ffb7afdbe697444296998d355a10bedc02a8a..8f39a0efafa0c1e85fa291f545c17342389a7efc 100644 --- a/MantidPlot/src/TitlePicker.h +++ b/MantidPlot/src/TitlePicker.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /*************************************************************************** File : TitlePicker.h diff --git a/MantidPlot/src/UserFunction.cpp b/MantidPlot/src/UserFunction.cpp index 35acc8d58d7f54665ff4fd2f8eed6da5dd5367dd..d5af7527a7e21439f7ff0df768950687f9749a01 100644 --- a/MantidPlot/src/UserFunction.cpp +++ b/MantidPlot/src/UserFunction.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #ifdef _WIN32 #pragma warning(disable : 4251) diff --git a/MantidPlot/src/UserFunction.h b/MantidPlot/src/UserFunction.h index 15578d3945eaa78e4892b2c55be64f48e7f6c8f9..47f680d4b6790b9ad54bff95944472d61aafaf2a 100644 --- a/MantidPlot/src/UserFunction.h +++ b/MantidPlot/src/UserFunction.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/MantidPlot/src/WindowFactory.cpp b/MantidPlot/src/WindowFactory.cpp index 84fe2f4d30e76fc91466e1da0f79fad111e91e68..d864840b1c0ea83a888ce82bf2290814e298adf7 100644 --- a/MantidPlot/src/WindowFactory.cpp +++ b/MantidPlot/src/WindowFactory.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "WindowFactory.h" diff --git a/MantidPlot/src/WindowFactory.h b/MantidPlot/src/WindowFactory.h index 4d6c79c4a88a2440b8f0c5dc348da04b1d8560b1..62a2f96d41d571c94943936daa457a00393e9c22 100644 --- a/MantidPlot/src/WindowFactory.h +++ b/MantidPlot/src/WindowFactory.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/MantidPlot/src/analysis/fft2D.cpp b/MantidPlot/src/analysis/fft2D.cpp index 0b8cd4b7be0d08e3a7559a15db64468ae24c0e3d..b771a9b84c55dd8342d9b4cdf17c3ef7fc19b867 100644 --- a/MantidPlot/src/analysis/fft2D.cpp +++ b/MantidPlot/src/analysis/fft2D.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /*************************************************************************** File : fft2D.cpp diff --git a/MantidPlot/src/analysis/fft2D.h b/MantidPlot/src/analysis/fft2D.h index 953cc3c30bd2c0757c7ed1593622870ef7710305..fa8e435f1da226c03ada5cf62ec6c1137217bdb7 100644 --- a/MantidPlot/src/analysis/fft2D.h +++ b/MantidPlot/src/analysis/fft2D.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /*************************************************************************** File : fft2D.h diff --git a/MantidPlot/src/cursors.h b/MantidPlot/src/cursors.h index d7c35585f2d0e4a0311d5220a4b384407ed67833..a292e225c881c4478aa94efca1e842f4a1b76a82 100644 --- a/MantidPlot/src/cursors.h +++ b/MantidPlot/src/cursors.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /*************************************************************************** File : cursors.h diff --git a/MantidPlot/src/fit_gsl.cpp b/MantidPlot/src/fit_gsl.cpp index 0de48290e7a939fbea53a41aca983e0204968c33..7fadded8220fc6dc0e1b9904c665abd68e0b8bc9 100644 --- a/MantidPlot/src/fit_gsl.cpp +++ b/MantidPlot/src/fit_gsl.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "fit_gsl.h" #include "MyParser.h" diff --git a/MantidPlot/src/fit_gsl.h b/MantidPlot/src/fit_gsl.h index 1d0d033116cf9ebd8892d3ab813e522653790536..48b95d30082122e045409a97ad6e9aa15030f63e 100644 --- a/MantidPlot/src/fit_gsl.h +++ b/MantidPlot/src/fit_gsl.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/MantidPlot/src/lib/include/CollapsiveGroupBox.h b/MantidPlot/src/lib/include/CollapsiveGroupBox.h index 376dbcea725a66b7fc1f35040a094ed72565f880..d12545d06877bf253c87fb4beb9b597d82a5f1f2 100644 --- a/MantidPlot/src/lib/include/CollapsiveGroupBox.h +++ b/MantidPlot/src/lib/include/CollapsiveGroupBox.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /*************************************************************************** File : CollapsiveGroupBox.h diff --git a/MantidPlot/src/lib/include/ExtensibleFileDialog.h b/MantidPlot/src/lib/include/ExtensibleFileDialog.h index 0dcea4e15f3a39760105d384de8d5ed30120a8fc..6162c67f713dbd465ef49928370091de38f86b82 100644 --- a/MantidPlot/src/lib/include/ExtensibleFileDialog.h +++ b/MantidPlot/src/lib/include/ExtensibleFileDialog.h @@ -54,9 +54,10 @@ public: * \param extended flag: show/hide the advanced options on start-up * \param flags window flags */ - ExtensibleFileDialog(QWidget *parent = nullptr, bool extended = true, - Qt::WFlags flags = Qt::WindowCloseButtonHint | - Qt::WindowType::WindowTitleHint); + ExtensibleFileDialog( + QWidget *parent = nullptr, bool extended = true, + const Qt::WFlags &flags = Qt::WindowCloseButtonHint | + Qt::WindowType::WindowTitleHint); //! Set the extension widget to be displayed when the user presses the toggle // button. void setExtensionWidget(QWidget *extension); diff --git a/MantidPlot/src/lib/include/PenStyleBox.h b/MantidPlot/src/lib/include/PenStyleBox.h index 5c28d72c150838b8126aae9c4c0f398c1e9e00c8..248386be3a635ec3350b5dc67be3e3697a7dfca7 100644 --- a/MantidPlot/src/lib/include/PenStyleBox.h +++ b/MantidPlot/src/lib/include/PenStyleBox.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /*************************************************************************** File : PenStyleBox.h diff --git a/MantidPlot/src/lib/include/SymbolBox.h b/MantidPlot/src/lib/include/SymbolBox.h index 8f760a5b1659430e2a998358789390267ab6a904..318e98ded762219c7d7564bf8221b356edf1361c 100644 --- a/MantidPlot/src/lib/include/SymbolBox.h +++ b/MantidPlot/src/lib/include/SymbolBox.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2006 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /*************************************************************************** File : SymbolBox.h diff --git a/MantidPlot/src/lib/include/SymbolDialog.h b/MantidPlot/src/lib/include/SymbolDialog.h index 659cc9c3095aeaa400e0d0838cb9febfcaf8218a..e8aaf0f03a1d5eee32b0004a78585b88a758b29f 100644 --- a/MantidPlot/src/lib/include/SymbolDialog.h +++ b/MantidPlot/src/lib/include/SymbolDialog.h @@ -62,7 +62,7 @@ public: * \param fl window flags */ SymbolDialog(CharSet charSet, QWidget *parent = nullptr, - Qt::WFlags fl = nullptr); + const Qt::WFlags &fl = nullptr); private: //! Show lowercase Greek characters diff --git a/MantidPlot/src/lib/src/CollapsiveGroupBox.cpp b/MantidPlot/src/lib/src/CollapsiveGroupBox.cpp index d15fc563e3b39d6c12e002287a5b57324ce49a74..399ad281b02b5ff62217265abb43ef6b6e8727a3 100644 --- a/MantidPlot/src/lib/src/CollapsiveGroupBox.cpp +++ b/MantidPlot/src/lib/src/CollapsiveGroupBox.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /*************************************************************************** File : CollapsiveGroupBox.cpp diff --git a/MantidPlot/src/lib/src/ExtensibleFileDialog.cpp b/MantidPlot/src/lib/src/ExtensibleFileDialog.cpp index 71a0cecd62fd3e13453b87f98830a7a606cd3902..4a189d275001c051bc188c9e3c79de29d8aa8c38 100644 --- a/MantidPlot/src/lib/src/ExtensibleFileDialog.cpp +++ b/MantidPlot/src/lib/src/ExtensibleFileDialog.cpp @@ -35,7 +35,7 @@ #include <QUrl> ExtensibleFileDialog::ExtensibleFileDialog(QWidget *parent, bool extended, - Qt::WFlags flags) + const Qt::WFlags &flags) : QFileDialog(parent, flags) { d_extension = nullptr; d_extension_row = 0; diff --git a/MantidPlot/src/lib/src/PenStyleBox.cpp b/MantidPlot/src/lib/src/PenStyleBox.cpp index bdf51ab755f672cce87b26eaa88a55e663bfe2fa..347593d805582d3f8f9fe14eee3f13ac75146370 100644 --- a/MantidPlot/src/lib/src/PenStyleBox.cpp +++ b/MantidPlot/src/lib/src/PenStyleBox.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2008 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /*************************************************************************** File : PenStyleBox.cpp diff --git a/MantidPlot/src/lib/src/SymbolBox.cpp b/MantidPlot/src/lib/src/SymbolBox.cpp index 13d103ba36372de914650cb2e2c8c8916e2cfbad..370155ad3010f70d6ac388c5897a6cc204d6757e 100644 --- a/MantidPlot/src/lib/src/SymbolBox.cpp +++ b/MantidPlot/src/lib/src/SymbolBox.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2006 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /*************************************************************************** File : SymbolBox.cpp diff --git a/MantidPlot/src/lib/src/SymbolDialog.cpp b/MantidPlot/src/lib/src/SymbolDialog.cpp index 812744badd640d0cb6d2dd5bc4f4207da00f64b2..3029e085474350c7d50a8846715d73ca7b0ebcce 100644 --- a/MantidPlot/src/lib/src/SymbolDialog.cpp +++ b/MantidPlot/src/lib/src/SymbolDialog.cpp @@ -38,7 +38,8 @@ #include <QSizePolicy> #include <QTextCodec> -SymbolDialog::SymbolDialog(CharSet charSet, QWidget *parent, Qt::WFlags fl) +SymbolDialog::SymbolDialog(CharSet charSet, QWidget *parent, + const Qt::WFlags &fl) : QDialog(parent, fl) { setAttribute(Qt::WA_DeleteOnClose); setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); diff --git a/MantidPlot/src/nrutil.cpp b/MantidPlot/src/nrutil.cpp index 1b0d52e37da0ad84da2dca49e0af3ee25bd5fb60..a4fe885e3b445cfcb4548bd0e613a464a7aa3c10 100644 --- a/MantidPlot/src/nrutil.cpp +++ b/MantidPlot/src/nrutil.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include <cmath> #include <cstddef> diff --git a/MantidPlot/src/nrutil.h b/MantidPlot/src/nrutil.h index 824022bf63128050f8ef488b39b5cc7b73f6f92b..493ecbac1d9a0de3f18474f56280864e321c5cef 100644 --- a/MantidPlot/src/nrutil.h +++ b/MantidPlot/src/nrutil.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/MantidPlot/src/origin/OPJFile.h b/MantidPlot/src/origin/OPJFile.h index 7bbecb120a7b7ed3c88ed669759074e9f7b47644..61aa4550ec67946bfbab159c0424e003ece4aa35 100644 --- a/MantidPlot/src/origin/OPJFile.h +++ b/MantidPlot/src/origin/OPJFile.h @@ -37,6 +37,8 @@ #include "tree.hh" #include <string> +#include <utility> + #include <vector> struct rect { @@ -67,8 +69,8 @@ struct originWindow { originWindow(std::string _name = "", std::string _label = "", bool _bHidden = false) - : name(_name), label(_label), objectID(0), bHidden(_bHidden), - state(Normal), title(Both), creation_date(0.0), + : name(std::move(_name)), label(std::move(_label)), objectID(0), + bHidden(_bHidden), state(Normal), title(Both), creation_date(0.0), modification_date(0.0){}; }; struct originData { @@ -97,9 +99,10 @@ struct spreadColumn { int index; std::vector<originData> odata; spreadColumn(std::string _name = "", int _index = 0) - : name(_name), type(NONE), value_type(0), value_type_specification(0), - significant_digits(6), decimal_places(6), numeric_display_type(0), - command(""), comment(""), width(8), index(_index){}; + : name(std::move(_name)), type(NONE), value_type(0), + value_type_specification(0), significant_digits(6), decimal_places(6), + numeric_display_type(0), command(""), comment(""), width(8), + index(_index){}; }; struct spreadSheet : public originWindow { @@ -108,8 +111,8 @@ struct spreadSheet : public originWindow { bool bMultisheet; std::vector<spreadColumn> column; spreadSheet(std::string _name = "") - : originWindow(_name), maxRows(0), bLoose(true), bMultisheet(false), - column(){}; + : originWindow(std::move(_name)), maxRows(0), bLoose(true), + bMultisheet(false), column(){}; }; struct excel : public originWindow { @@ -118,8 +121,8 @@ struct excel : public originWindow { std::vector<spreadSheet> sheet; excel(std::string _name = "", std::string _label = "", int _maxRows = 0, bool _bHidden = false, bool _bLoose = true) - : originWindow(_name, _label, _bHidden), maxRows(_maxRows), - bLoose(_bLoose){}; + : originWindow(std::move(_name), std::move(_label), _bHidden), + maxRows(_maxRows), bLoose(_bLoose){}; }; struct matrix : public originWindow { @@ -139,7 +142,7 @@ struct matrix : public originWindow { HeaderViewType header; std::vector<double> data; matrix(std::string _name = "", int _index = 0) - : originWindow(_name), nr_rows(0), nr_cols(0), + : originWindow(std::move(_name)), nr_rows(0), nr_cols(0), value_type_specification(0), significant_digits(6), decimal_places(6), numeric_display_type(0), command(""), width(8), index(_index), view(DataView), header(ColumnRow){}; @@ -154,8 +157,8 @@ struct function { int points; int index; function(std::string _name = "", int _index = 0) - : name(_name), type(0), formula(""), begin(0.0), end(0.0), points(0), - index(_index){}; + : name(std::move(_name)), type(0), formula(""), begin(0.0), end(0.0), + points(0), index(_index){}; }; struct text { @@ -414,12 +417,13 @@ struct graph : public originWindow { unsigned short width; unsigned short height; - graph(std::string _name = "") : originWindow(_name), width(0), height(0){}; + graph(std::string _name = "") + : originWindow(std::move(_name)), width(0), height(0){}; }; struct note : public originWindow { std::string text; - note(std::string _name = "") : originWindow(_name){}; + note(std::string _name = "") : originWindow(std::move(_name)){}; }; struct projectNode { @@ -430,7 +434,7 @@ struct projectNode { projectNode(std::string _name = "", int _type = 0, double _creation_date = 0.0, double _modification_date = 0.0) - : type(_type), name(_name), creation_date(_creation_date), + : type(_type), name(std::move(_name)), creation_date(_creation_date), modification_date(_modification_date){}; }; diff --git a/MantidPlot/src/pixmaps_helper.py b/MantidPlot/src/pixmaps_helper.py index e64a1b71cf385b912ad0f893fbf537529f6efaaf..2af477927e7c4f3a7fcc9263475999fb84b2df27 100644 --- a/MantidPlot/src/pixmaps_helper.py +++ b/MantidPlot/src/pixmaps_helper.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + """Helper file for pixmaps.cpp""" diff --git a/MantidPlot/src/resource.h b/MantidPlot/src/resource.h index 861fb0fa313e871a774c2513ac9e20dd7262f541..854c3ab5058d29f099a1743ae07dd6f4afda6f8f 100644 --- a/MantidPlot/src/resource.h +++ b/MantidPlot/src/resource.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //{{NO_DEPENDENCIES}} // Microsoft Developer Studio generated include file. diff --git a/MantidPlot/test/MantidPlot1DPlotTest.py b/MantidPlot/test/MantidPlot1DPlotTest.py index ac01338631f233af5b786e1d619d45c47fd268b2..f1668d20496cf22070da94930c9a531cc1fea503 100644 --- a/MantidPlot/test/MantidPlot1DPlotTest.py +++ b/MantidPlot/test/MantidPlot1DPlotTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + """ Test of basic 1D plotting methods in MantidPlot diff --git a/MantidPlot/test/MantidPlot2DPlotTest.py b/MantidPlot/test/MantidPlot2DPlotTest.py index 48102c5f5cda6a751ecd7a9fb455abd4d9e841cc..7e6cff9433f10674ec56ef0d873c5cce0514ede6 100644 --- a/MantidPlot/test/MantidPlot2DPlotTest.py +++ b/MantidPlot/test/MantidPlot2DPlotTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + """ Test of basic 2D plotting methods in MantidPlot diff --git a/MantidPlot/test/MantidPlotAlgorithmDialogTest.py b/MantidPlot/test/MantidPlotAlgorithmDialogTest.py index 3cccb11543c42569e4aabec390d6575a3bd6e00d..4f19b3c390cefd1d0c3100023195ae8a379e54db 100644 --- a/MantidPlot/test/MantidPlotAlgorithmDialogTest.py +++ b/MantidPlot/test/MantidPlotAlgorithmDialogTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + """ Test generation of Algorithm Dialogs diff --git a/MantidPlot/test/MantidPlotFoldersTest.py b/MantidPlot/test/MantidPlotFoldersTest.py index c163cf68fa6cb092af36319a83ec06e22cc6a75d..ec1802d09dd8a4ab0144677ad54a8786640a1655 100644 --- a/MantidPlot/test/MantidPlotFoldersTest.py +++ b/MantidPlot/test/MantidPlotFoldersTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + """ Test creating, switching and deleting diff --git a/MantidPlot/test/MantidPlotInputArgsCheck.py b/MantidPlot/test/MantidPlotInputArgsCheck.py index 33bd403118cffd13b14d728dd2e7628b0dc8484b..c68753298a9da3de539c65b76776fa937188fad3 100644 --- a/MantidPlot/test/MantidPlotInputArgsCheck.py +++ b/MantidPlot/test/MantidPlotInputArgsCheck.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + """ Test robust handling of input arguments to plotSpectrum, plotBin, and plotMD diff --git a/MantidPlot/test/MantidPlotInstrumentViewTest.py b/MantidPlot/test/MantidPlotInstrumentViewTest.py index 1e856d83ed623878af95db022dfc0ee27a54e199..a02d327623887b4e731e9c72163096ab0c1d9b63 100644 --- a/MantidPlot/test/MantidPlotInstrumentViewTest.py +++ b/MantidPlot/test/MantidPlotInstrumentViewTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + """ Test the interaction with the instrument view. diff --git a/MantidPlot/test/MantidPlotMatplotlibTest.py b/MantidPlot/test/MantidPlotMatplotlibTest.py index 960ae0399ed94e44c731819c4ced70ee0753298e..6da54072598409c10c7beb80c64cdf26cdcaecb9 100644 --- a/MantidPlot/test/MantidPlotMatplotlibTest.py +++ b/MantidPlot/test/MantidPlotMatplotlibTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + """ Test matplotlib plotting for MantidPlot. Without our custom backend matplotlib graphs crash MantidPlot. diff --git a/MantidPlot/test/MantidPlotMdiSubWindowTest.py b/MantidPlot/test/MantidPlotMdiSubWindowTest.py index 1dabe3d15bbd3ca6ab10e312c90e61d4fd6721e7..5d6ea07a79129be3bbc74427f01dafc4279b62d6 100644 --- a/MantidPlot/test/MantidPlotMdiSubWindowTest.py +++ b/MantidPlot/test/MantidPlotMdiSubWindowTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + """ Test of basic 1D plotting methods in MantidPlot diff --git a/MantidPlot/test/MantidPlotPVPythonTest.py b/MantidPlot/test/MantidPlotPVPythonTest.py index fc32c1ad39e0cf5e4e2ed41da5c6530397a9467b..ddfbdb2ff1a32116f3911ec039a78aa023cb6aab 100644 --- a/MantidPlot/test/MantidPlotPVPythonTest.py +++ b/MantidPlot/test/MantidPlotPVPythonTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + """ Test one can import paraview.simple in MantidPlot diff --git a/MantidPlot/test/MantidPlotProjectRecovery.py b/MantidPlot/test/MantidPlotProjectRecovery.py index 755aef40761fd1b2a2656b399b26ccafb3cc43e7..f87074aae32d077486fdf4163b7949e5eac31f3a 100644 --- a/MantidPlot/test/MantidPlotProjectRecovery.py +++ b/MantidPlot/test/MantidPlotProjectRecovery.py @@ -1,3 +1,9 @@ +# Mantid Repository : https://github.com/mantidproject/mantid +# +# Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS +# SPDX - License - Identifier: GPL - 3.0 + import mantidplottests import os import platform diff --git a/MantidPlot/test/MantidPlotProjectSerialiseTest.py b/MantidPlot/test/MantidPlotProjectSerialiseTest.py index ce2ec3f486412099d926aa98be9e8e56f582375f..00095c5bbeb9eecc60733e465154400339550614 100644 --- a/MantidPlot/test/MantidPlotProjectSerialiseTest.py +++ b/MantidPlot/test/MantidPlotProjectSerialiseTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + """ Test of basic project saving and loading diff --git a/MantidPlot/test/MantidPlotProxiesTest.py b/MantidPlot/test/MantidPlotProxiesTest.py index ea2d280e0b0c39265d23f7566a3710f748d5650b..5381331d7c71767668f145cc1cb8255104d622e8 100644 --- a/MantidPlot/test/MantidPlotProxiesTest.py +++ b/MantidPlot/test/MantidPlotProxiesTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + """ Test the use of proxy objects in MantidPlot that diff --git a/MantidPlot/test/MantidPlotPythonImportTest.py b/MantidPlot/test/MantidPlotPythonImportTest.py index bacd369a4fcf1f7d7035f8a51d8c0006b316d986..07a2ce21eece7b0d26db8a935ee19cd5385e072b 100644 --- a/MantidPlot/test/MantidPlotPythonImportTest.py +++ b/MantidPlot/test/MantidPlotPythonImportTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + """ Test script to see if Mantid starts Python correctly diff --git a/MantidPlot/test/MantidPlotSliceViewerTest.py b/MantidPlot/test/MantidPlotSliceViewerTest.py index 54f7d8b8d701a06ef253b5ff9cd4234c34ee6904..f24410a6d1b8281de9480d46b19fc2ff3ba227b8 100644 --- a/MantidPlot/test/MantidPlotSliceViewerTest.py +++ b/MantidPlot/test/MantidPlotSliceViewerTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + """ Test script for running python commands within MantidPlot. This will test the interface to SliceViewer widgets. diff --git a/MantidPlot/test/MantidPlotTiledWindowTest.py b/MantidPlot/test/MantidPlotTiledWindowTest.py index 18d585452131827e452a273e1331061b7900cbb6..b432a786bbf0ad70134eb34ec9c1344a0eb96066 100644 --- a/MantidPlot/test/MantidPlotTiledWindowTest.py +++ b/MantidPlot/test/MantidPlotTiledWindowTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + """ Test the TiledWindow functionality diff --git a/MantidPlot/test/TSVSerialiserTest.py b/MantidPlot/test/TSVSerialiserTest.py index 2072dea44a4f4245e4c436e66a0efe4df92b5c67..67563bba6daa0a0ce08e562958f07819545a73c2 100644 --- a/MantidPlot/test/TSVSerialiserTest.py +++ b/MantidPlot/test/TSVSerialiserTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + import mantidqtpython import mantidplottests diff --git a/MantidPlot/test/mantidplottests.py b/MantidPlot/test/mantidplottests.py index f1436205ce0e028cda88a30fef201bb4f67bc3f2..a9da33b4cdd5aa35f21576b761fdf542e94cf9d5 100644 --- a/MantidPlot/test/mantidplottests.py +++ b/MantidPlot/test/mantidplottests.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + """ Utility functions for running python test scripts diff --git a/Testing/PerformanceTests/analysis.py b/Testing/PerformanceTests/analysis.py index f7c6b2da3252e4ab0283a9fd825d49ca3ed1a6d6..45bc99f50c9477c7fd6b6945e587c307252423ee 100644 --- a/Testing/PerformanceTests/analysis.py +++ b/Testing/PerformanceTests/analysis.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + """ Module containing functions for test performance analysis, plotting, and saving diff --git a/Testing/PerformanceTests/analysis_mpl.py b/Testing/PerformanceTests/analysis_mpl.py index 593e151594eb4b05fb90b6fd3133de1f07f7d810..d5b8427b1bfb2d05ef27f0b3c119012b5ba50b7c 100644 --- a/Testing/PerformanceTests/analysis_mpl.py +++ b/Testing/PerformanceTests/analysis_mpl.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + """ Module containing functions for test performance analysis, plotting, and saving diff --git a/Testing/PerformanceTests/check_performance.py b/Testing/PerformanceTests/check_performance.py index 215817ccb2f243a2084a06bbf79e1555c58d63f9..b27cab549044774c5eecb4ea6e571c1cb1a3bd6d 100755 --- a/Testing/PerformanceTests/check_performance.py +++ b/Testing/PerformanceTests/check_performance.py @@ -2,8 +2,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + """ This module checks a SQL database to determine whether performance in a particular test has dropped. diff --git a/Testing/PerformanceTests/make_report.py b/Testing/PerformanceTests/make_report.py index 769f995de0cac11ab4ea27be36560765db0245c3..2ecc868288acb3c086540650223062215de0faa4 100755 --- a/Testing/PerformanceTests/make_report.py +++ b/Testing/PerformanceTests/make_report.py @@ -1,10 +1,9 @@ #!/usr/bin/env python - # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + import argparse import sys diff --git a/Testing/PerformanceTests/reporters.py b/Testing/PerformanceTests/reporters.py index 6fe25f65bd8111c3a51c3389a7a58f0b16722f1e..493d9769929f97f0d45cd46722a783a3e0c02ed8 100644 --- a/Testing/PerformanceTests/reporters.py +++ b/Testing/PerformanceTests/reporters.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + import os import sys diff --git a/Testing/PerformanceTests/secureemail.py b/Testing/PerformanceTests/secureemail.py index 0c9f782b773272bad8ae86fb6d870fe503d4172e..e58f3d80e92decd36ba7f8af2cbd951038062d1b 100644 --- a/Testing/PerformanceTests/secureemail.py +++ b/Testing/PerformanceTests/secureemail.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + import smtplib import argparse diff --git a/Testing/PerformanceTests/setup.py b/Testing/PerformanceTests/setup.py index 321e3a1ce182344039ae4a64ab0a5283d03a0e90..fefefe23b232fdf4b61c745ee9a4a01703d192a1 100644 --- a/Testing/PerformanceTests/setup.py +++ b/Testing/PerformanceTests/setup.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + """ Script to perform set up necessary for the SQL database of system tests. diff --git a/Testing/PerformanceTests/sqlresults.py b/Testing/PerformanceTests/sqlresults.py index 4ac20f89aef729543b1fa85b63b4fec54a871c3d..bdb6de9750c2219d921afb9b1797f99c5b54438e 100644 --- a/Testing/PerformanceTests/sqlresults.py +++ b/Testing/PerformanceTests/sqlresults.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) from six.moves import range diff --git a/Testing/PerformanceTests/testresult.py b/Testing/PerformanceTests/testresult.py index a6bca3d3d2e40a607335d5f866d6a9b47e2f4796..533b6536e03eb1b6c863244c79f224a073ca231f 100644 --- a/Testing/PerformanceTests/testresult.py +++ b/Testing/PerformanceTests/testresult.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + ''' Data object for a TestResult diff --git a/Testing/PerformanceTests/xunit_to_sql.py b/Testing/PerformanceTests/xunit_to_sql.py index a7d35115cd2cdb19e9d826b6b0abd03fd01e5292..e530ae505ce5a14022dec49a24071c6f4c10dfdc 100755 --- a/Testing/PerformanceTests/xunit_to_sql.py +++ b/Testing/PerformanceTests/xunit_to_sql.py @@ -2,8 +2,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + """ Module to convert XUnit XML to SQL database of test results of the same type used by python system tests """ diff --git a/Testing/SystemTests/lib/systemtests/algorithm_decorator.py b/Testing/SystemTests/lib/systemtests/algorithm_decorator.py index efa3afcb7e9e45cbfdf950d28cefb24335b8b793..0d16aa02ddba6c3071db511121600fe6439675cd 100644 --- a/Testing/SystemTests/lib/systemtests/algorithm_decorator.py +++ b/Testing/SystemTests/lib/systemtests/algorithm_decorator.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + import inspect import re diff --git a/Testing/SystemTests/lib/systemtests/systemtesting.py b/Testing/SystemTests/lib/systemtests/systemtesting.py index d89f80919d5e12595ef4ca3d8e7b633acf157404..fe2d60a02daa19d046706fcf3912a70c7dfa282a 100644 --- a/Testing/SystemTests/lib/systemtests/systemtesting.py +++ b/Testing/SystemTests/lib/systemtests/systemtesting.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + """ Mantid system testing framework. This module contains all of the necessary code diff --git a/Testing/SystemTests/lib/systemtests/xmlreporter.py b/Testing/SystemTests/lib/systemtests/xmlreporter.py index fd08f08e0d075533f613373be6edb55e851e77ce..bcfe0d98a31bf94256f1f5da77323c666750aef7 100644 --- a/Testing/SystemTests/lib/systemtests/xmlreporter.py +++ b/Testing/SystemTests/lib/systemtests/xmlreporter.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) import os diff --git a/Testing/SystemTests/scripts/InstallerTests.py b/Testing/SystemTests/scripts/InstallerTests.py index 0137d1c13e721e408105f6a616ae16bbeb09fd72..3f33057f878b9e5a156c0ce299c2b3cb8992a426 100644 --- a/Testing/SystemTests/scripts/InstallerTests.py +++ b/Testing/SystemTests/scripts/InstallerTests.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) """Finds a package, installs it and runs the tests against it. diff --git a/Testing/SystemTests/scripts/mantidinstaller.py b/Testing/SystemTests/scripts/mantidinstaller.py index f3bfb7e025b07abede724392f2d565e7b1c13a1d..4b589a0f27696af45bf6ed54ed0b10892cc8e012 100644 --- a/Testing/SystemTests/scripts/mantidinstaller.py +++ b/Testing/SystemTests/scripts/mantidinstaller.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) """Defines classes for handling installation diff --git a/Testing/SystemTests/scripts/performance/analysis.py b/Testing/SystemTests/scripts/performance/analysis.py index 1b0a7f29a8138ef8c35d17e0b92355cf06112656..2654be90a0188185ac6973f76b865b79f67da75a 100644 --- a/Testing/SystemTests/scripts/performance/analysis.py +++ b/Testing/SystemTests/scripts/performance/analysis.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + """ Module containing functions for test performance analysis, plotting, and saving diff --git a/Testing/SystemTests/scripts/performance/make_report.py b/Testing/SystemTests/scripts/performance/make_report.py index ee414608607f2b2f9734a91aa7d65b24e9cafb45..22692208835df8917735cb7fa90c9a8ccc99762e 100755 --- a/Testing/SystemTests/scripts/performance/make_report.py +++ b/Testing/SystemTests/scripts/performance/make_report.py @@ -1,10 +1,9 @@ #!/usr/bin/env python - # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + import argparse import sys diff --git a/Testing/SystemTests/scripts/performance/reporters.py b/Testing/SystemTests/scripts/performance/reporters.py index 110fd5c9efc790f2825346d01c92e987fa55fd43..9fdfa73fae65028241a89fbc292cf9947de0be89 100644 --- a/Testing/SystemTests/scripts/performance/reporters.py +++ b/Testing/SystemTests/scripts/performance/reporters.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + import os import sys diff --git a/Testing/SystemTests/scripts/performance/sqlresults.py b/Testing/SystemTests/scripts/performance/sqlresults.py index e9a5bbda6fe89a4862eb5d254b11d144c1820509..ed4d530cb3c9cc7f3fd694ffcca7cd94252ea2eb 100644 --- a/Testing/SystemTests/scripts/performance/sqlresults.py +++ b/Testing/SystemTests/scripts/performance/sqlresults.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) from six.moves import range diff --git a/Testing/SystemTests/scripts/performance/testresult.py b/Testing/SystemTests/scripts/performance/testresult.py index faea43c16b3a489e836eeac86d150fddc3962f83..224df9adaba5808880086e6dc626d41f179e3844 100644 --- a/Testing/SystemTests/scripts/performance/testresult.py +++ b/Testing/SystemTests/scripts/performance/testresult.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + ''' Data object for a TestResult diff --git a/Testing/SystemTests/scripts/performance/xunit_to_sql.py b/Testing/SystemTests/scripts/performance/xunit_to_sql.py index 7d8442dfda058b12cf1e3086baae75eaae60f6eb..536e4378ae1e39715f1e9ae4f78daab5cbb22d56 100755 --- a/Testing/SystemTests/scripts/performance/xunit_to_sql.py +++ b/Testing/SystemTests/scripts/performance/xunit_to_sql.py @@ -2,8 +2,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + """ Module to convert XUnit XML to SQL database of test results of the same type used by python system tests """ diff --git a/Testing/SystemTests/scripts/runSystemTests.py b/Testing/SystemTests/scripts/runSystemTests.py index fe21f2103d320b786aa5fd215da6f5d65d1288d3..641d723a0415a0919255e6a06af1dcedd5f2b399 100755 --- a/Testing/SystemTests/scripts/runSystemTests.py +++ b/Testing/SystemTests/scripts/runSystemTests.py @@ -1,10 +1,9 @@ #!/usr/bin/env python - # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Testing/SystemTests/scripts/systemtest.bat.in b/Testing/SystemTests/scripts/systemtest.bat.in index 79ec7cb087d02f647ec7d2da89577a2030a8ff8f..e93b13d0349c19cc56203edc9939deaa5ce346c6 100644 --- a/Testing/SystemTests/scripts/systemtest.bat.in +++ b/Testing/SystemTests/scripts/systemtest.bat.in @@ -1,8 +1,8 @@ :: Mantid Repository : https://github.com/mantidproject/mantid :: :: Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -:: NScD Oak Ridge National Laboratory, European Spallation Source -:: & Institut Laue - Langevin +:: NScD Oak Ridge National Laboratory, European Spallation Source, +:: Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS :: SPDX - License - Identifier: GPL - 3.0 + @echo off :: Wrapper script to launch the system tests for a development build. diff --git a/Testing/SystemTests/scripts/systemtest.in b/Testing/SystemTests/scripts/systemtest.in index e4e31b89e7de56826c1dbc5638386ba3298a9f5e..f6b55b048932845f1d766b0d9901ef606b69594d 100755 --- a/Testing/SystemTests/scripts/systemtest.in +++ b/Testing/SystemTests/scripts/systemtest.in @@ -2,9 +2,9 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin -# SPDX - License - Identifier: GPL - 3.0 + +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS +# SPDX - License - Identifier: GPL - 3.0 + # Wrapper script to launch the system tests for a development build. # # It uses the mantidpython launch script to run the tests. All arguments to diff --git a/Testing/SystemTests/tests/analysis/ARCSReductionTest.py b/Testing/SystemTests/tests/analysis/ARCSReductionTest.py index 4001d0efd4f788ff2b40e6f6eff67f26c931865e..afa6a1d343f1e628d68d07b9ea5cb0283ec65b3a 100644 --- a/Testing/SystemTests/tests/analysis/ARCSReductionTest.py +++ b/Testing/SystemTests/tests/analysis/ARCSReductionTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,invalid-name """ diff --git a/Testing/SystemTests/tests/analysis/AbinsTest.py b/Testing/SystemTests/tests/analysis/AbinsTest.py index b13bb4113e6e9b987e7bd2f8cd5a59461cf9966a..0201954fbf1e3063aac61777648295c977fbd749 100644 --- a/Testing/SystemTests/tests/analysis/AbinsTest.py +++ b/Testing/SystemTests/tests/analysis/AbinsTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) import systemtesting diff --git a/Testing/SystemTests/tests/analysis/AlignAndFocusPowderFromFilesTest.py b/Testing/SystemTests/tests/analysis/AlignAndFocusPowderFromFilesTest.py index 915a230162351bad9b8ba96664c7d9f934136671..8372806fbb06762fda8d6d32586e219742714ff9 100644 --- a/Testing/SystemTests/tests/analysis/AlignAndFocusPowderFromFilesTest.py +++ b/Testing/SystemTests/tests/analysis/AlignAndFocusPowderFromFilesTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,invalid-name,attribute-defined-outside-init import systemtesting diff --git a/Testing/SystemTests/tests/analysis/BASISTest.py b/Testing/SystemTests/tests/analysis/BASISTest.py index 35b7c4516b07990c035bb9a1aeb3958ebb0b892e..5f3fd867b0db7c1bfa28f3d000427a5f08e992f8 100644 --- a/Testing/SystemTests/tests/analysis/BASISTest.py +++ b/Testing/SystemTests/tests/analysis/BASISTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Testing/SystemTests/tests/analysis/BilbySANSDataProcessorTest.py b/Testing/SystemTests/tests/analysis/BilbySANSDataProcessorTest.py index 2a522c66646600428c1faf28259441b3e541f62c..3c10edae98685a112ba2cde25ceed404a7fa20c8 100644 --- a/Testing/SystemTests/tests/analysis/BilbySANSDataProcessorTest.py +++ b/Testing/SystemTests/tests/analysis/BilbySANSDataProcessorTest.py @@ -1,10 +1,9 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + - from __future__ import (absolute_import, division, print_function) import systemtesting from BilbyReductionScript import RunBilbyReduction diff --git a/Testing/SystemTests/tests/analysis/BuildSQWTest.py b/Testing/SystemTests/tests/analysis/BuildSQWTest.py index 1c2c4ef4f877d48dda12b0308fbf313e1da032d4..4b041e1d8d4f696acedcd2449a224dc1c8daff78 100644 --- a/Testing/SystemTests/tests/analysis/BuildSQWTest.py +++ b/Testing/SystemTests/tests/analysis/BuildSQWTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=invalid-name,super-on-old-class """ diff --git a/Testing/SystemTests/tests/analysis/CNCSReductionTest.py b/Testing/SystemTests/tests/analysis/CNCSReductionTest.py index bfc7ac727a1a719887195d1c42663f496dd0e94a..c4dfd13f16a09766b36b816abe8acdec131e1e56 100644 --- a/Testing/SystemTests/tests/analysis/CNCSReductionTest.py +++ b/Testing/SystemTests/tests/analysis/CNCSReductionTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,invalid-name """ diff --git a/Testing/SystemTests/tests/analysis/CRISPLoadingTest.py b/Testing/SystemTests/tests/analysis/CRISPLoadingTest.py index 3966e2e331f16ba1f1f022452a955c7f74ab6f19..dab0cd186996ecf3439459b93fe06aa5b640d463 100644 --- a/Testing/SystemTests/tests/analysis/CRISPLoadingTest.py +++ b/Testing/SystemTests/tests/analysis/CRISPLoadingTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) from LoadAndCheckBase import * diff --git a/Testing/SystemTests/tests/analysis/CalMuonDeadTimeTest.py b/Testing/SystemTests/tests/analysis/CalMuonDeadTimeTest.py index 74a2ad9b6afe38caf483c5efd6d8a6c12aec9b3d..066ebb6b1bceac60fc366cba38a04a796c9980b5 100644 --- a/Testing/SystemTests/tests/analysis/CalMuonDeadTimeTest.py +++ b/Testing/SystemTests/tests/analysis/CalMuonDeadTimeTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,attribute-defined-outside-init import systemtesting diff --git a/Testing/SystemTests/tests/analysis/CalibrateRectangularDetector_Test.py b/Testing/SystemTests/tests/analysis/CalibrateRectangularDetector_Test.py index 5d3a9cc04e4964341a979ab8351dd7a3d07543bf..0d81439462b866c84cd4c629cdacff393c1a766c 100644 --- a/Testing/SystemTests/tests/analysis/CalibrateRectangularDetector_Test.py +++ b/Testing/SystemTests/tests/analysis/CalibrateRectangularDetector_Test.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=invalid-name,no-init,attribute-defined-outside-init from __future__ import (absolute_import, division, print_function) diff --git a/Testing/SystemTests/tests/analysis/CodeConventions.py b/Testing/SystemTests/tests/analysis/CodeConventions.py index 0475ade9434597dbd3d6b00f7be7d4c3cd71a26d..a9bd3f22393321463c45f54df269cea93a5832d1 100644 --- a/Testing/SystemTests/tests/analysis/CodeConventions.py +++ b/Testing/SystemTests/tests/analysis/CodeConventions.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init from __future__ import (absolute_import, division, print_function) diff --git a/Testing/SystemTests/tests/analysis/CompressEvents.py b/Testing/SystemTests/tests/analysis/CompressEvents.py index 6daf350767c67aae03e353e1262271ac6ee595bc..4e1c9434d6f6491d2d1f8ba9e28c201af8be2101 100644 --- a/Testing/SystemTests/tests/analysis/CompressEvents.py +++ b/Testing/SystemTests/tests/analysis/CompressEvents.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,invalid-name,attribute-defined-outside-init import systemtesting diff --git a/Testing/SystemTests/tests/analysis/ConvToMDCompareDefaultVsIndexing.py b/Testing/SystemTests/tests/analysis/ConvToMDCompareDefaultVsIndexing.py index a6867e465db34e34ee6b19d524c5dabd895ad798..00117babdfc918e52b6dd0eb43b6732971f00b3e 100644 --- a/Testing/SystemTests/tests/analysis/ConvToMDCompareDefaultVsIndexing.py +++ b/Testing/SystemTests/tests/analysis/ConvToMDCompareDefaultVsIndexing.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init diff --git a/Testing/SystemTests/tests/analysis/ConvertHFIRSCDtoMDETest.py b/Testing/SystemTests/tests/analysis/ConvertHFIRSCDtoMDETest.py index ccc8351b65146810d26ecda14bcf40737f7f9ac3..7c2cd3a6703d19956df806b5936cec0f872030f9 100644 --- a/Testing/SystemTests/tests/analysis/ConvertHFIRSCDtoMDETest.py +++ b/Testing/SystemTests/tests/analysis/ConvertHFIRSCDtoMDETest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + import systemtesting import numpy as np diff --git a/Testing/SystemTests/tests/analysis/ConvertMultipleRunsToSingleCrystalMDTest.py b/Testing/SystemTests/tests/analysis/ConvertMultipleRunsToSingleCrystalMDTest.py index 71eaeafdf0bfaf52eda8b08c987fb44e3ed65691..458a5430eefa97893eb2b55276b5ca81ab6aa6e6 100644 --- a/Testing/SystemTests/tests/analysis/ConvertMultipleRunsToSingleCrystalMDTest.py +++ b/Testing/SystemTests/tests/analysis/ConvertMultipleRunsToSingleCrystalMDTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + import systemtesting from mantid.simpleapi import ConvertMultipleRunsToSingleCrystalMD, Load, AlgorithmManager, SaveMD diff --git a/Testing/SystemTests/tests/analysis/ConvertToMDworkflow.py b/Testing/SystemTests/tests/analysis/ConvertToMDworkflow.py index 1a839520fa60d0f68d66bf33e8a545c19e198756..c8885d6b5b36de0dd9e9640216474670b32cbe81 100644 --- a/Testing/SystemTests/tests/analysis/ConvertToMDworkflow.py +++ b/Testing/SystemTests/tests/analysis/ConvertToMDworkflow.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init from __future__ import (absolute_import, division, print_function) diff --git a/Testing/SystemTests/tests/analysis/ConvertWANDSCDtoQTest.py b/Testing/SystemTests/tests/analysis/ConvertWANDSCDtoQTest.py index 93a816d8d6ca426b118ca76cd85c0e956653befc..24b7afd8ec0d0a7d3473a5d1ca8eb438d86d6b5f 100644 --- a/Testing/SystemTests/tests/analysis/ConvertWANDSCDtoQTest.py +++ b/Testing/SystemTests/tests/analysis/ConvertWANDSCDtoQTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + import systemtesting import numpy as np diff --git a/Testing/SystemTests/tests/analysis/CountReflectionsTest.py b/Testing/SystemTests/tests/analysis/CountReflectionsTest.py index feff6bd5bfe06d591eb9a90ded64f4af8d24c2ce..6d1ed6b7ca7bdd5bf149f2d3d7d2f6a41246d8a4 100644 --- a/Testing/SystemTests/tests/analysis/CountReflectionsTest.py +++ b/Testing/SystemTests/tests/analysis/CountReflectionsTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) import systemtesting diff --git a/Testing/SystemTests/tests/analysis/CrystalFieldPythonInterface.py b/Testing/SystemTests/tests/analysis/CrystalFieldPythonInterface.py index 1767551aa7b91e986d3c8ee8a72d533225a16e29..99063a73212bb8e83b306b683f4fc99b817e16e6 100644 --- a/Testing/SystemTests/tests/analysis/CrystalFieldPythonInterface.py +++ b/Testing/SystemTests/tests/analysis/CrystalFieldPythonInterface.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init from systemtesting import MantidSystemTest diff --git a/Testing/SystemTests/tests/analysis/DOSTest.py b/Testing/SystemTests/tests/analysis/DOSTest.py index 9f14c3d4e1aedaa616685aaabf333dbe42c00ef4..5534dbfc9c3e5439ff000bb596f7369de25e2814 100644 --- a/Testing/SystemTests/tests/analysis/DOSTest.py +++ b/Testing/SystemTests/tests/analysis/DOSTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,attribute-defined-outside-init from __future__ import (absolute_import, division, print_function) diff --git a/Testing/SystemTests/tests/analysis/Diffraction_Workflow_Test.py b/Testing/SystemTests/tests/analysis/Diffraction_Workflow_Test.py index 2b20add2cf9a7f8e11a60c145a94061497101a9c..bf399cb583ae0832e2d2c82e9e81be5e2293f324 100644 --- a/Testing/SystemTests/tests/analysis/Diffraction_Workflow_Test.py +++ b/Testing/SystemTests/tests/analysis/Diffraction_Workflow_Test.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=invalid-name,no-init """ diff --git a/Testing/SystemTests/tests/analysis/DirectInelasticDiagnostic.py b/Testing/SystemTests/tests/analysis/DirectInelasticDiagnostic.py index 0c7bebad0f77aaebe707f15f591834a253364cf3..35b6dbcdcf29e7845e9b596e0ecf02a66faafb68 100644 --- a/Testing/SystemTests/tests/analysis/DirectInelasticDiagnostic.py +++ b/Testing/SystemTests/tests/analysis/DirectInelasticDiagnostic.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init import os diff --git a/Testing/SystemTests/tests/analysis/DirectInelasticDiagnostic2.py b/Testing/SystemTests/tests/analysis/DirectInelasticDiagnostic2.py index d9956f0ba07345ae30afe37a34275f2fa84d83ed..bf569483a6765694657f0f36df7deb6296c6031f 100644 --- a/Testing/SystemTests/tests/analysis/DirectInelasticDiagnostic2.py +++ b/Testing/SystemTests/tests/analysis/DirectInelasticDiagnostic2.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) #pylint: disable=invalid-name,no-init diff --git a/Testing/SystemTests/tests/analysis/EQSANSBeamCenterAPIv2.py b/Testing/SystemTests/tests/analysis/EQSANSBeamCenterAPIv2.py index 91bf7ad96d125e0c6be5a5140b2684bc4903654c..fbebadbad58e846e010c636f44d550d3455e553f 100644 --- a/Testing/SystemTests/tests/analysis/EQSANSBeamCenterAPIv2.py +++ b/Testing/SystemTests/tests/analysis/EQSANSBeamCenterAPIv2.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,attribute-defined-outside-init import systemtesting diff --git a/Testing/SystemTests/tests/analysis/EQSANSDarkCurrentAPIv2.py b/Testing/SystemTests/tests/analysis/EQSANSDarkCurrentAPIv2.py index ccef446cfe3fd85d75288caeb85524e36c0bc4a9..7ff8bc58f6035ac1958891d0b7d366566498e09a 100644 --- a/Testing/SystemTests/tests/analysis/EQSANSDarkCurrentAPIv2.py +++ b/Testing/SystemTests/tests/analysis/EQSANSDarkCurrentAPIv2.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,attribute-defined-outside-init import systemtesting diff --git a/Testing/SystemTests/tests/analysis/EQSANSEffAPIv2.py b/Testing/SystemTests/tests/analysis/EQSANSEffAPIv2.py index 6f4317b10a47a0666f11599e2ec111a25d03bd05..1dba76fd9bc60e731f44951b4649919367556e72 100644 --- a/Testing/SystemTests/tests/analysis/EQSANSEffAPIv2.py +++ b/Testing/SystemTests/tests/analysis/EQSANSEffAPIv2.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,attribute-defined-outside-init import systemtesting diff --git a/Testing/SystemTests/tests/analysis/EQSANSFlatTestAPIv2.py b/Testing/SystemTests/tests/analysis/EQSANSFlatTestAPIv2.py index d6ec6ed04fec8a37c7f315967d8464b6bc97001e..584e59d819a95e090b5c471018224df7a70c750a 100644 --- a/Testing/SystemTests/tests/analysis/EQSANSFlatTestAPIv2.py +++ b/Testing/SystemTests/tests/analysis/EQSANSFlatTestAPIv2.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,attribute-defined-outside-init import systemtesting diff --git a/Testing/SystemTests/tests/analysis/EQSANSIQOutputAPIv2.py b/Testing/SystemTests/tests/analysis/EQSANSIQOutputAPIv2.py index 80c7df86a24d0a53596ceef828c7380ff5ceac1f..928e96618731bbcdca77eaaf225504e05561b158 100644 --- a/Testing/SystemTests/tests/analysis/EQSANSIQOutputAPIv2.py +++ b/Testing/SystemTests/tests/analysis/EQSANSIQOutputAPIv2.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,invalid-name,attribute-defined-outside-init from __future__ import (absolute_import, division, print_function) diff --git a/Testing/SystemTests/tests/analysis/EQSANSNormalisationAPIv2.py b/Testing/SystemTests/tests/analysis/EQSANSNormalisationAPIv2.py index 2d75b3423a85d565b90c714f8e70e5277bbc715c..56ad6b38d08c7b02097af6c0575e665e04770bb2 100644 --- a/Testing/SystemTests/tests/analysis/EQSANSNormalisationAPIv2.py +++ b/Testing/SystemTests/tests/analysis/EQSANSNormalisationAPIv2.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,invalid-name import systemtesting diff --git a/Testing/SystemTests/tests/analysis/EQSANSProcessedEffAPIv2.py b/Testing/SystemTests/tests/analysis/EQSANSProcessedEffAPIv2.py index 1b5ff363424d8e6a97ae17c8fbb9c4bd8eaa5b58..6bed524e048eaf1364de981a3999d63caaea834d 100644 --- a/Testing/SystemTests/tests/analysis/EQSANSProcessedEffAPIv2.py +++ b/Testing/SystemTests/tests/analysis/EQSANSProcessedEffAPIv2.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,attribute-defined-outside-init import systemtesting diff --git a/Testing/SystemTests/tests/analysis/EQSANSSolidAPIv2.py b/Testing/SystemTests/tests/analysis/EQSANSSolidAPIv2.py index ef6ee1b1e230b9228d2301d46cd61a7e783dd45f..c6477b2dc744c73fe428633fc5aabf89c514be2e 100644 --- a/Testing/SystemTests/tests/analysis/EQSANSSolidAPIv2.py +++ b/Testing/SystemTests/tests/analysis/EQSANSSolidAPIv2.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,attribute-defined-outside-init from __future__ import (absolute_import, division, print_function) diff --git a/Testing/SystemTests/tests/analysis/EQSANSTOFStructureTest.py b/Testing/SystemTests/tests/analysis/EQSANSTOFStructureTest.py index 9c8e1638ebed41a870e20bd16a3056bb834e2ff0..150e7be401276324d0b052e6b5a5e9bd5db490da 100644 --- a/Testing/SystemTests/tests/analysis/EQSANSTOFStructureTest.py +++ b/Testing/SystemTests/tests/analysis/EQSANSTOFStructureTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,attribute-defined-outside-init diff --git a/Testing/SystemTests/tests/analysis/EQSANSTransAPIv2.py b/Testing/SystemTests/tests/analysis/EQSANSTransAPIv2.py index 1cd510259eff69b0514e33a1ffe257aa8969fa48..9948de2796af600c4b3e9e1cd2258e3fb88af701 100644 --- a/Testing/SystemTests/tests/analysis/EQSANSTransAPIv2.py +++ b/Testing/SystemTests/tests/analysis/EQSANSTransAPIv2.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,attribute-defined-outside-init import systemtesting diff --git a/Testing/SystemTests/tests/analysis/EllipsoidIntegr.py b/Testing/SystemTests/tests/analysis/EllipsoidIntegr.py index 10a97183c43880e6b7ca0f8f68e56d3776d7c054..54c924ea4ea3e634b1a744509ba302f773d98cc2 100644 --- a/Testing/SystemTests/tests/analysis/EllipsoidIntegr.py +++ b/Testing/SystemTests/tests/analysis/EllipsoidIntegr.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=no-init # File: EllipsoidIntegr.py diff --git a/Testing/SystemTests/tests/analysis/EnggCalibrationTest.py b/Testing/SystemTests/tests/analysis/EnggCalibrationTest.py index a469e269a1811f4518105a5ede2ff357bd5c8a8a..48a3bf557c0e0d862144346542428af99f0bac9f 100644 --- a/Testing/SystemTests/tests/analysis/EnggCalibrationTest.py +++ b/Testing/SystemTests/tests/analysis/EnggCalibrationTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=no-init import systemtesting diff --git a/Testing/SystemTests/tests/analysis/EnginXScriptTest.py b/Testing/SystemTests/tests/analysis/EnginXScriptTest.py index 738d71b8ff37742c231dc3e1f19e8c2c75c6af86..078ded2ee25261231fd27d5614bc22dd02b4471e 100644 --- a/Testing/SystemTests/tests/analysis/EnginXScriptTest.py +++ b/Testing/SystemTests/tests/analysis/EnginXScriptTest.py @@ -1,10 +1,9 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + - from __future__ import (absolute_import, division, print_function) import os import shutil diff --git a/Testing/SystemTests/tests/analysis/FilteredLoadvsLoadThenFilter.py b/Testing/SystemTests/tests/analysis/FilteredLoadvsLoadThenFilter.py index 0bbce6068236a97089c2e853adb7661c1fdad468..fbf030643c2a967f25c3602041432f59663388a1 100644 --- a/Testing/SystemTests/tests/analysis/FilteredLoadvsLoadThenFilter.py +++ b/Testing/SystemTests/tests/analysis/FilteredLoadvsLoadThenFilter.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init import systemtesting diff --git a/Testing/SystemTests/tests/analysis/FindSatellitePeaksTest.py b/Testing/SystemTests/tests/analysis/FindSatellitePeaksTest.py index b1a0b72d83835121feff86b7a99c013b32d1f06a..52cff074d1bd985ea98c60b5ab8a85aed6fdea2d 100644 --- a/Testing/SystemTests/tests/analysis/FindSatellitePeaksTest.py +++ b/Testing/SystemTests/tests/analysis/FindSatellitePeaksTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from mantid.simpleapi import FindSatellitePeaks, Load import unittest diff --git a/Testing/SystemTests/tests/analysis/FlatPlatePaalmanPingsCorrectionTest.py b/Testing/SystemTests/tests/analysis/FlatPlatePaalmanPingsCorrectionTest.py index 814eaf68e4e07b10c3b6745f9620453895a9ada4..33e065d52d7425e1895fb705aac103114ad33b43 100644 --- a/Testing/SystemTests/tests/analysis/FlatPlatePaalmanPingsCorrectionTest.py +++ b/Testing/SystemTests/tests/analysis/FlatPlatePaalmanPingsCorrectionTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + import systemtesting from mantid.simpleapi import * diff --git a/Testing/SystemTests/tests/analysis/GSASIIRefineFitPeaksTest.py b/Testing/SystemTests/tests/analysis/GSASIIRefineFitPeaksTest.py index 22fdd14d2ff5c6e873b683915c6d992b2c84f1c1..53954c27557f1a9bb1eceb674e09ac2d647c2b19 100644 --- a/Testing/SystemTests/tests/analysis/GSASIIRefineFitPeaksTest.py +++ b/Testing/SystemTests/tests/analysis/GSASIIRefineFitPeaksTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) from abc import ABCMeta, abstractmethod diff --git a/Testing/SystemTests/tests/analysis/GUIStartupTest.py b/Testing/SystemTests/tests/analysis/GUIStartupTest.py index fb2e24e8e261ae735fc3448106a7fb60825b56cf..73efbf4fef27dd2349a57512ba1013945971a368 100644 --- a/Testing/SystemTests/tests/analysis/GUIStartupTest.py +++ b/Testing/SystemTests/tests/analysis/GUIStartupTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) import os diff --git a/Testing/SystemTests/tests/analysis/GetEiT0atSNSSystemTest.py b/Testing/SystemTests/tests/analysis/GetEiT0atSNSSystemTest.py index 06de251ac368fd70042611377a77e657443e5113..eaf4d184fda96e811a91a50ad686c4fff8464fdc 100644 --- a/Testing/SystemTests/tests/analysis/GetEiT0atSNSSystemTest.py +++ b/Testing/SystemTests/tests/analysis/GetEiT0atSNSSystemTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init """ diff --git a/Testing/SystemTests/tests/analysis/GetQsInQENSDataSystemTest.py b/Testing/SystemTests/tests/analysis/GetQsInQENSDataSystemTest.py index a9c4b5583c7b5753ff90a0da338970da71122633..975910657019d39be35e6a5dc7d1ef99ba9dec61 100644 --- a/Testing/SystemTests/tests/analysis/GetQsInQENSDataSystemTest.py +++ b/Testing/SystemTests/tests/analysis/GetQsInQENSDataSystemTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init """ diff --git a/Testing/SystemTests/tests/analysis/HFIRBackgroundAPIv2.py b/Testing/SystemTests/tests/analysis/HFIRBackgroundAPIv2.py index 0b24e7991df507ac8ff454a2181a619b8388f169..26b159ca7f6ca774f7dc7adea78101191574b00c 100644 --- a/Testing/SystemTests/tests/analysis/HFIRBackgroundAPIv2.py +++ b/Testing/SystemTests/tests/analysis/HFIRBackgroundAPIv2.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,attribute-defined-outside-init import systemtesting diff --git a/Testing/SystemTests/tests/analysis/HFIREffAPIv2.py b/Testing/SystemTests/tests/analysis/HFIREffAPIv2.py index 9571cbc9d046e02350991ad848189a8461645bd1..a7aa82589f6dbdbb8d8255aa6d3a2b5c70bb355c 100644 --- a/Testing/SystemTests/tests/analysis/HFIREffAPIv2.py +++ b/Testing/SystemTests/tests/analysis/HFIREffAPIv2.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,attribute-defined-outside-init import systemtesting diff --git a/Testing/SystemTests/tests/analysis/HFIRReductionAPIv2.py b/Testing/SystemTests/tests/analysis/HFIRReductionAPIv2.py index 6227f112d87e5c6c14a04d035e827905b806c31a..14b3797d9d155374bdd8184867cb1f5805419a35 100644 --- a/Testing/SystemTests/tests/analysis/HFIRReductionAPIv2.py +++ b/Testing/SystemTests/tests/analysis/HFIRReductionAPIv2.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,attribute-defined-outside-init import systemtesting diff --git a/Testing/SystemTests/tests/analysis/HFIRTestsAPIv2.py b/Testing/SystemTests/tests/analysis/HFIRTestsAPIv2.py index 0a32b8ebd54439056e2717d2e7552a29bd340216..f20d6fe3bfd76f082510d9c8fb9244aeaeb62cc9 100644 --- a/Testing/SystemTests/tests/analysis/HFIRTestsAPIv2.py +++ b/Testing/SystemTests/tests/analysis/HFIRTestsAPIv2.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: # disable=invalid-name,no-init,bad-builtin,attribute-defined-outside-init,protected-access,too-many-arguments diff --git a/Testing/SystemTests/tests/analysis/HFIRTransAPIv2.py b/Testing/SystemTests/tests/analysis/HFIRTransAPIv2.py index 2ef4b702eedd8231183181255d096fb112983132..6f851777cf58dd07f0b780717dd0dfe32a689f12 100644 --- a/Testing/SystemTests/tests/analysis/HFIRTransAPIv2.py +++ b/Testing/SystemTests/tests/analysis/HFIRTransAPIv2.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,attribute-defined-outside-init import systemtesting diff --git a/Testing/SystemTests/tests/analysis/HYSPECReductionTest.py b/Testing/SystemTests/tests/analysis/HYSPECReductionTest.py index e051dd1ab48b841d77d2a345f02d41c115dff426..1ffccc455731735001fbe199fddc68ddf38afa7a 100644 --- a/Testing/SystemTests/tests/analysis/HYSPECReductionTest.py +++ b/Testing/SystemTests/tests/analysis/HYSPECReductionTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init """ diff --git a/Testing/SystemTests/tests/analysis/ILLDetectorEfficiencyCorUserTest.py b/Testing/SystemTests/tests/analysis/ILLDetectorEfficiencyCorUserTest.py index 255d5dfec622ae936d17e8f4bc9db7be2d12f458..fe96ca2f448fd4bebd3db54a56ee92c242f710ea 100644 --- a/Testing/SystemTests/tests/analysis/ILLDetectorEfficiencyCorUserTest.py +++ b/Testing/SystemTests/tests/analysis/ILLDetectorEfficiencyCorUserTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Testing/SystemTests/tests/analysis/ILLDirectGeometryReductionTest.py b/Testing/SystemTests/tests/analysis/ILLDirectGeometryReductionTest.py index 02fb92adb7d797303336c2f644d1823615d08c50..d4462d82145e6a6283d663127884a89a45c0a041 100644 --- a/Testing/SystemTests/tests/analysis/ILLDirectGeometryReductionTest.py +++ b/Testing/SystemTests/tests/analysis/ILLDirectGeometryReductionTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Testing/SystemTests/tests/analysis/ILLIndirectEnergyTransferBATS.py b/Testing/SystemTests/tests/analysis/ILLIndirectEnergyTransferBATS.py index 0b024f4d95aa3d47adf1cea2e1773a67498faf30..b6e9257d89196be37ed93bfb7b3ef90f8c009363 100644 --- a/Testing/SystemTests/tests/analysis/ILLIndirectEnergyTransferBATS.py +++ b/Testing/SystemTests/tests/analysis/ILLIndirectEnergyTransferBATS.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + import systemtesting from mantid.simpleapi import GroupWorkspaces, IndirectILLEnergyTransfer, config diff --git a/Testing/SystemTests/tests/analysis/ILLIndirectReductionFWS.py b/Testing/SystemTests/tests/analysis/ILLIndirectReductionFWS.py index 58777e41d25be1ca47753481c5811867c6794b21..e1bbdd6966a0245e32d9047e3c5083b675f82ab6 100644 --- a/Testing/SystemTests/tests/analysis/ILLIndirectReductionFWS.py +++ b/Testing/SystemTests/tests/analysis/ILLIndirectReductionFWS.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + import systemtesting from mantid.simpleapi import CompareWorkspaces, LoadNexusProcessed, IndirectILLReductionFWS diff --git a/Testing/SystemTests/tests/analysis/ILLIndirectReductionQENS.py b/Testing/SystemTests/tests/analysis/ILLIndirectReductionQENS.py index 986bf25ed3ae4b059be330decc17202fba0b2c48..1358f551bd55325368cca7416d78c0feb020587c 100644 --- a/Testing/SystemTests/tests/analysis/ILLIndirectReductionQENS.py +++ b/Testing/SystemTests/tests/analysis/ILLIndirectReductionQENS.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + import systemtesting from mantid.simpleapi import IndirectILLReductionQENS, Plus, CompareWorkspaces, GroupWorkspaces, Scale diff --git a/Testing/SystemTests/tests/analysis/ILLPowderD2BEfficiencyTest.py b/Testing/SystemTests/tests/analysis/ILLPowderD2BEfficiencyTest.py index de9c0e5baebbc989452fc42a8694d50835077c96..07f9f82ca7039021a0ad9c4684589606f6c0e7ad 100644 --- a/Testing/SystemTests/tests/analysis/ILLPowderD2BEfficiencyTest.py +++ b/Testing/SystemTests/tests/analysis/ILLPowderD2BEfficiencyTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Testing/SystemTests/tests/analysis/ILLPowderDetectorScanTest.py b/Testing/SystemTests/tests/analysis/ILLPowderDetectorScanTest.py index d80a358640ce1fadd81c94cd210dba3c7ecee50e..6862da7fc68810f6ee263960b2a45413795f6d36 100644 --- a/Testing/SystemTests/tests/analysis/ILLPowderDetectorScanTest.py +++ b/Testing/SystemTests/tests/analysis/ILLPowderDetectorScanTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Testing/SystemTests/tests/analysis/ILLPowderEfficiencyClosureTest.py b/Testing/SystemTests/tests/analysis/ILLPowderEfficiencyClosureTest.py index b7fb45a975d8b8093fa9b596aac5d2c4e27d45a6..e73e60c4ca1569c50e3af18a911c8e7c1db7ddea 100644 --- a/Testing/SystemTests/tests/analysis/ILLPowderEfficiencyClosureTest.py +++ b/Testing/SystemTests/tests/analysis/ILLPowderEfficiencyClosureTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Testing/SystemTests/tests/analysis/ILLPowderEfficiencyTest.py b/Testing/SystemTests/tests/analysis/ILLPowderEfficiencyTest.py index 70b7a7636382f86aa15878de7184c8e0c983f64a..efab9cef6ae31a0129afe878ed8bed060fa2616b 100644 --- a/Testing/SystemTests/tests/analysis/ILLPowderEfficiencyTest.py +++ b/Testing/SystemTests/tests/analysis/ILLPowderEfficiencyTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Testing/SystemTests/tests/analysis/ILLPowderLoadDetectorScanTest.py b/Testing/SystemTests/tests/analysis/ILLPowderLoadDetectorScanTest.py index 9b61ced696ef50ca46fab2aef4c0a61cfbd06a26..723dd9d5c76c92a85f781c86beba0682dec3e909 100644 --- a/Testing/SystemTests/tests/analysis/ILLPowderLoadDetectorScanTest.py +++ b/Testing/SystemTests/tests/analysis/ILLPowderLoadDetectorScanTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + import systemtesting diff --git a/Testing/SystemTests/tests/analysis/ILLPowderParameterScanTest.py b/Testing/SystemTests/tests/analysis/ILLPowderParameterScanTest.py index b2fa7870b4d20e643fd1b0595e0927fa6af99e70..a98317f161ef9aef4a4b730d32285e6b71a6bec8 100644 --- a/Testing/SystemTests/tests/analysis/ILLPowderParameterScanTest.py +++ b/Testing/SystemTests/tests/analysis/ILLPowderParameterScanTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Testing/SystemTests/tests/analysis/ILLReflAutoProcessTest.py b/Testing/SystemTests/tests/analysis/ILLReflAutoProcessTest.py index 183aa196e9efa0f5d02b8ab9af58b41a4a0b1c6e..9b71506c5e19e4575e4034a74eb8173246e40793 100644 --- a/Testing/SystemTests/tests/analysis/ILLReflAutoProcessTest.py +++ b/Testing/SystemTests/tests/analysis/ILLReflAutoProcessTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Testing/SystemTests/tests/analysis/INTERLoadingTest.py b/Testing/SystemTests/tests/analysis/INTERLoadingTest.py index e2fdc2373c4a762fc334177bc7f16a346968be2f..65827675a379893dd532611597b1c80da3467538 100644 --- a/Testing/SystemTests/tests/analysis/INTERLoadingTest.py +++ b/Testing/SystemTests/tests/analysis/INTERLoadingTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init from LoadAndCheckBase import * diff --git a/Testing/SystemTests/tests/analysis/INTERReductionTest.py b/Testing/SystemTests/tests/analysis/INTERReductionTest.py index 327b823d1d2b0e18afa7847838b7999e351d1a3f..9e7034d56af5354b2af553abd2f5d26d13e15813 100644 --- a/Testing/SystemTests/tests/analysis/INTERReductionTest.py +++ b/Testing/SystemTests/tests/analysis/INTERReductionTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + """ System Test for ISIS Reflectometry reduction diff --git a/Testing/SystemTests/tests/analysis/ISISDirectInelastic.py b/Testing/SystemTests/tests/analysis/ISISDirectInelastic.py index b8fa89646d973cff89e705149b6ea9e60ba00181..4a20e2f4295ebd945aaa186505d63d91115a07ad 100644 --- a/Testing/SystemTests/tests/analysis/ISISDirectInelastic.py +++ b/Testing/SystemTests/tests/analysis/ISISDirectInelastic.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init from __future__ import (absolute_import, division, print_function) diff --git a/Testing/SystemTests/tests/analysis/ISISDirectReductionComponents.py b/Testing/SystemTests/tests/analysis/ISISDirectReductionComponents.py index 21c5d0b066b4188bf41ecafd10ee7269a0c0f3a0..7c94af5a1dd94d699e0f370e8cff9a9cf2d5cab7 100644 --- a/Testing/SystemTests/tests/analysis/ISISDirectReductionComponents.py +++ b/Testing/SystemTests/tests/analysis/ISISDirectReductionComponents.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=invalid-name from __future__ import (absolute_import, division, print_function) diff --git a/Testing/SystemTests/tests/analysis/ISISIndirectAnalysisTest.py b/Testing/SystemTests/tests/analysis/ISISIndirectAnalysisTest.py index ca5b70fdcca6dfc828f570b4f3d2364d2fdb73cf..739df8c87bbf434aa696a9b4a3287e925586de74 100644 --- a/Testing/SystemTests/tests/analysis/ISISIndirectAnalysisTest.py +++ b/Testing/SystemTests/tests/analysis/ISISIndirectAnalysisTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,attribute-defined-outside-init import systemtesting diff --git a/Testing/SystemTests/tests/analysis/ISISIndirectBayesTest.py b/Testing/SystemTests/tests/analysis/ISISIndirectBayesTest.py index 5a98f29c7deafffa49a4d8d8961ac26cc57d6c6a..1ad59163af653ec9e3c6d12a3402186baff27028 100644 --- a/Testing/SystemTests/tests/analysis/ISISIndirectBayesTest.py +++ b/Testing/SystemTests/tests/analysis/ISISIndirectBayesTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,attribute-defined-outside-init, too-few-public-methods from __future__ import (absolute_import, division, print_function) diff --git a/Testing/SystemTests/tests/analysis/ISISIndirectInelastic.py b/Testing/SystemTests/tests/analysis/ISISIndirectInelastic.py index 6c0b093041398572f1bac48b5dbf9ee4fe9a1f1c..090c193822efee69035f6b9fbe52fa720097b4f9 100644 --- a/Testing/SystemTests/tests/analysis/ISISIndirectInelastic.py +++ b/Testing/SystemTests/tests/analysis/ISISIndirectInelastic.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,invalid-name,attribute-defined-outside-init,too-many-lines #pylint: disable=too-many-instance-attributes,non-parent-init-called,abstract-method,too-few-public-methods diff --git a/Testing/SystemTests/tests/analysis/ISISIndirectLoadAsciiTest.py b/Testing/SystemTests/tests/analysis/ISISIndirectLoadAsciiTest.py index 6d858ab6776b69b5ec94b5d27a8292a14e4c3bfc..370e2abd3cdf1a9bc19c6669ae2158f76c2d99d8 100644 --- a/Testing/SystemTests/tests/analysis/ISISIndirectLoadAsciiTest.py +++ b/Testing/SystemTests/tests/analysis/ISISIndirectLoadAsciiTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,attribute-defined-outside-init from __future__ import (absolute_import, division, print_function) diff --git a/Testing/SystemTests/tests/analysis/ISISIndirectSimulationTest.py b/Testing/SystemTests/tests/analysis/ISISIndirectSimulationTest.py index e6e40997b2583c7edfee9f99f956e4e919405abf..28ffe767b136643f3b770cda73efd72116c1f374 100644 --- a/Testing/SystemTests/tests/analysis/ISISIndirectSimulationTest.py +++ b/Testing/SystemTests/tests/analysis/ISISIndirectSimulationTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,attribute-defined-outside-init from __future__ import (absolute_import, division, print_function) diff --git a/Testing/SystemTests/tests/analysis/ISISLoadingEventData.py b/Testing/SystemTests/tests/analysis/ISISLoadingEventData.py index 6cc28ccc6a45ac1aa2f818b3e27783942d9c7f45..2b5615eb3d14b5bb7eb7414c10a57916e9335cfa 100644 --- a/Testing/SystemTests/tests/analysis/ISISLoadingEventData.py +++ b/Testing/SystemTests/tests/analysis/ISISLoadingEventData.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init import systemtesting diff --git a/Testing/SystemTests/tests/analysis/ISISMuonAnalysis.py b/Testing/SystemTests/tests/analysis/ISISMuonAnalysis.py index 9f74adee4b7eaafb9bc5fd5caf25debb5064c002..6f4cd225177151e29f0e8a0193d4eaa794beefa1 100644 --- a/Testing/SystemTests/tests/analysis/ISISMuonAnalysis.py +++ b/Testing/SystemTests/tests/analysis/ISISMuonAnalysis.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,invalid-name,attribute-defined-outside-init,too-many-instance-attributes,too-few-public-methods from __future__ import (absolute_import, division, print_function) diff --git a/Testing/SystemTests/tests/analysis/ISISMuonAnalysisGrouping.py b/Testing/SystemTests/tests/analysis/ISISMuonAnalysisGrouping.py index 331d2a425b4e9735e35ace0cbf7f42dad7e23a01..6331a0ea99959cac8238fc0686eb04820fe07315 100644 --- a/Testing/SystemTests/tests/analysis/ISISMuonAnalysisGrouping.py +++ b/Testing/SystemTests/tests/analysis/ISISMuonAnalysisGrouping.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,attribute-defined-outside-init,too-many-instance-attributes,too-few-public-methods from __future__ import (absolute_import, division, print_function) diff --git a/Testing/SystemTests/tests/analysis/ISISReflInstrumentIDFTest.py b/Testing/SystemTests/tests/analysis/ISISReflInstrumentIDFTest.py index 7d1f94129a083ea25debcbbaf58776120d045f07..e6cf63637416e9d268abb632b262a4f04953cb27 100644 --- a/Testing/SystemTests/tests/analysis/ISISReflInstrumentIDFTest.py +++ b/Testing/SystemTests/tests/analysis/ISISReflInstrumentIDFTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,invalid-name,too-few-public-methods """ diff --git a/Testing/SystemTests/tests/analysis/ISISReflectometryAutoreductionTest.py b/Testing/SystemTests/tests/analysis/ISISReflectometryAutoreductionTest.py index b12a1e599455a9f2278fc7e447f38e190b0bacbe..4fea8fb3695b9ed5ff8ee3b15a47ac4588ee9c63 100644 --- a/Testing/SystemTests/tests/analysis/ISISReflectometryAutoreductionTest.py +++ b/Testing/SystemTests/tests/analysis/ISISReflectometryAutoreductionTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + """ System Test for ISIS Reflectometry autoreduction diff --git a/Testing/SystemTests/tests/analysis/ISISReflectometryWorkflowBase.py b/Testing/SystemTests/tests/analysis/ISISReflectometryWorkflowBase.py index 3b86b7f49f573419f57a606ffa7a17ef7fcf48e6..ecf743351845b5ef95477b50c8657a1de0bb46c7 100644 --- a/Testing/SystemTests/tests/analysis/ISISReflectometryWorkflowBase.py +++ b/Testing/SystemTests/tests/analysis/ISISReflectometryWorkflowBase.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + """ System Test for ISIS Reflectometry reduction diff --git a/Testing/SystemTests/tests/analysis/ISISReflectometryWorkflowPreprocessingTest.py b/Testing/SystemTests/tests/analysis/ISISReflectometryWorkflowPreprocessingTest.py index 6a0d07a649edfbc42bd9612735ef64520f56dee2..c906d57f4992634c7ffcffd701ff9f726c62633b 100644 --- a/Testing/SystemTests/tests/analysis/ISISReflectometryWorkflowPreprocessingTest.py +++ b/Testing/SystemTests/tests/analysis/ISISReflectometryWorkflowPreprocessingTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + """ System Test for ISIS Reflectometry autoreduction diff --git a/Testing/SystemTests/tests/analysis/ISISReflectometryWorkflowSlicingTest.py b/Testing/SystemTests/tests/analysis/ISISReflectometryWorkflowSlicingTest.py index 0921f32bdbd1f7c97a4b73b23f0cd986f2c63f87..0a25ccb0a670bb1b0cd41c9577d183562e2ea901 100644 --- a/Testing/SystemTests/tests/analysis/ISISReflectometryWorkflowSlicingTest.py +++ b/Testing/SystemTests/tests/analysis/ISISReflectometryWorkflowSlicingTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from ISISReflectometryWorkflowBase import * import systemtesting diff --git a/Testing/SystemTests/tests/analysis/ISIS_LETReduction.py b/Testing/SystemTests/tests/analysis/ISIS_LETReduction.py index ea33a9ac66c3077994a558cb77e09736d1a7511c..54747617c29d76ea71790a416318790a056ae827 100644 --- a/Testing/SystemTests/tests/analysis/ISIS_LETReduction.py +++ b/Testing/SystemTests/tests/analysis/ISIS_LETReduction.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=invalid-name """ Sample LET reduction script """ diff --git a/Testing/SystemTests/tests/analysis/ISIS_MAPS_DGSReduction.py b/Testing/SystemTests/tests/analysis/ISIS_MAPS_DGSReduction.py index a8077cc3ea1c6ca04eba4a7e69f94d6444d36e4f..2d5c07756555bb8fe7bc2511af81c85484dc09dd 100644 --- a/Testing/SystemTests/tests/analysis/ISIS_MAPS_DGSReduction.py +++ b/Testing/SystemTests/tests/analysis/ISIS_MAPS_DGSReduction.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=invalid-name """ Sample MAPS reduction scrip """ diff --git a/Testing/SystemTests/tests/analysis/ISIS_MERLINReduction.py b/Testing/SystemTests/tests/analysis/ISIS_MERLINReduction.py index e3c79a0ffbb440db361412c17733c53b6ac8b5d3..dc5a919eee948be1f3682a9886d1151f21fb5dc6 100644 --- a/Testing/SystemTests/tests/analysis/ISIS_MERLINReduction.py +++ b/Testing/SystemTests/tests/analysis/ISIS_MERLINReduction.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=invalid-name """ Sample MERLIN reduction scrip """ diff --git a/Testing/SystemTests/tests/analysis/ISIS_MariReduction.py b/Testing/SystemTests/tests/analysis/ISIS_MariReduction.py index 61a86f5f8267625b8e25a037416c54434bea5796..bcbeb5e0b3344daeb90532a8ed945ba2ae30e3c4 100644 --- a/Testing/SystemTests/tests/analysis/ISIS_MariReduction.py +++ b/Testing/SystemTests/tests/analysis/ISIS_MariReduction.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=invalid-name """ Sample MARI reduction scrip used in testing ReductionWrapper """ diff --git a/Testing/SystemTests/tests/analysis/ISIS_PowderGemTest.py b/Testing/SystemTests/tests/analysis/ISIS_PowderGemTest.py index 124c3e687451c32722a2a8e7ffdbb3bfaf32ba4f..a5202313cb861a03f5bfb9329282b13454e70691 100644 --- a/Testing/SystemTests/tests/analysis/ISIS_PowderGemTest.py +++ b/Testing/SystemTests/tests/analysis/ISIS_PowderGemTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Testing/SystemTests/tests/analysis/ISIS_PowderHRPDTest.py b/Testing/SystemTests/tests/analysis/ISIS_PowderHRPDTest.py index 1b47b32a1f9ba2350ed50d8d9684eab57cd1d2eb..ced0d1ff131beb7a963c3816b300a6cea13d6949 100644 --- a/Testing/SystemTests/tests/analysis/ISIS_PowderHRPDTest.py +++ b/Testing/SystemTests/tests/analysis/ISIS_PowderHRPDTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Testing/SystemTests/tests/analysis/ISIS_PowderPearlTest.py b/Testing/SystemTests/tests/analysis/ISIS_PowderPearlTest.py index 2baa37d731cf2f2a2278bb3134dfe94ebcd4b05c..42d64ef90d06a727dbb3d8ab82e4c207a421e524 100644 --- a/Testing/SystemTests/tests/analysis/ISIS_PowderPearlTest.py +++ b/Testing/SystemTests/tests/analysis/ISIS_PowderPearlTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Testing/SystemTests/tests/analysis/ISIS_PowderPolarisTest.py b/Testing/SystemTests/tests/analysis/ISIS_PowderPolarisTest.py index a38d58126db67cf6f49256f681a17aa0fd31ce49..4dc45f8bf01fba19fd58326b71dbbd5473f15254 100644 --- a/Testing/SystemTests/tests/analysis/ISIS_PowderPolarisTest.py +++ b/Testing/SystemTests/tests/analysis/ISIS_PowderPolarisTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Testing/SystemTests/tests/analysis/ISIS_WISHPowderReductionTest.py b/Testing/SystemTests/tests/analysis/ISIS_WISHPowderReductionTest.py index 4ba684cc963dc3248e6c2449aceb11b7f4c3f765..576d8852d6fdad91e28cf5ad83cfb8101b1d281d 100644 --- a/Testing/SystemTests/tests/analysis/ISIS_WISHPowderReductionTest.py +++ b/Testing/SystemTests/tests/analysis/ISIS_WISHPowderReductionTest.py @@ -1,3 +1,9 @@ +# Mantid Repository : https://github.com/mantidproject/mantid +# +# Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS +# SPDX - License - Identifier: GPL - 3.0 + from systemtesting import MantidSystemTest from wish.reduce import Wish diff --git a/Testing/SystemTests/tests/analysis/ISIS_WISHSingleCrystalReduction.py b/Testing/SystemTests/tests/analysis/ISIS_WISHSingleCrystalReduction.py index c7a794c97003d051a1384765c7b8acae1f8c5cd5..71c7fcf809139a7cfa2c683f8fb130d840420b97 100644 --- a/Testing/SystemTests/tests/analysis/ISIS_WISHSingleCrystalReduction.py +++ b/Testing/SystemTests/tests/analysis/ISIS_WISHSingleCrystalReduction.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from collections import namedtuple from systemtesting import MantidSystemTest diff --git a/Testing/SystemTests/tests/analysis/IndirectDiffractionTests.py b/Testing/SystemTests/tests/analysis/IndirectDiffractionTests.py index 74dba80c9ad6ce2ac6080b2b0621ce8d64abe74e..8165d9f397d2b7b5a28f2e95556197c7ac3ee464 100644 --- a/Testing/SystemTests/tests/analysis/IndirectDiffractionTests.py +++ b/Testing/SystemTests/tests/analysis/IndirectDiffractionTests.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,non-parent-init-called,too-few-public-methods # non-parent-init-called is disabled to remove false positives from a bug in pyLint < 1.4 diff --git a/Testing/SystemTests/tests/analysis/IndirectQuickRunTest.py b/Testing/SystemTests/tests/analysis/IndirectQuickRunTest.py index 32fc670f977101285128116dfa2d70466657fdfc..397f77f285e22a0ee4c62d16e60565805dfbfe2c 100644 --- a/Testing/SystemTests/tests/analysis/IndirectQuickRunTest.py +++ b/Testing/SystemTests/tests/analysis/IndirectQuickRunTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Testing/SystemTests/tests/analysis/L2QScriptTest.py b/Testing/SystemTests/tests/analysis/L2QScriptTest.py index a8c23dcd08ee9ff0f9eaac8189962f183b918ec6..b80308fa469001b3bf5eeb845025e2389161c2ad 100644 --- a/Testing/SystemTests/tests/analysis/L2QScriptTest.py +++ b/Testing/SystemTests/tests/analysis/L2QScriptTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,invalid-name diff --git a/Testing/SystemTests/tests/analysis/LRPrimaryFractionTest.py b/Testing/SystemTests/tests/analysis/LRPrimaryFractionTest.py index eab3fda172c656b2fa1a07864f84164774d0f840..22a8299a177841dc80399a0aac6f6e9eab5f5ee1 100644 --- a/Testing/SystemTests/tests/analysis/LRPrimaryFractionTest.py +++ b/Testing/SystemTests/tests/analysis/LRPrimaryFractionTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,attribute-defined-outside-init import systemtesting diff --git a/Testing/SystemTests/tests/analysis/LRScalingFactorsTest.py b/Testing/SystemTests/tests/analysis/LRScalingFactorsTest.py index 7491139d4dab5ab7a1b69c3329788ba2c294836b..54fa5e53e9079293df06d2fdb8d10ae81193f613 100644 --- a/Testing/SystemTests/tests/analysis/LRScalingFactorsTest.py +++ b/Testing/SystemTests/tests/analysis/LRScalingFactorsTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,attribute-defined-outside-init import systemtesting diff --git a/Testing/SystemTests/tests/analysis/LinkedUBs_Test.py b/Testing/SystemTests/tests/analysis/LinkedUBs_Test.py index 1abc30b13dd55cd1b1299c5af56134977b08391e..2107e4d37b3696cd004cbea6a190959b27181c65 100644 --- a/Testing/SystemTests/tests/analysis/LinkedUBs_Test.py +++ b/Testing/SystemTests/tests/analysis/LinkedUBs_Test.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=invalid-name,no-init # System test that loads short SXD numors and runs LinkedUBs. diff --git a/Testing/SystemTests/tests/analysis/LiquidsReflectometryReductionTest.py b/Testing/SystemTests/tests/analysis/LiquidsReflectometryReductionTest.py index f5eb6ddfc90ba559c11eded9f845bf09372e8867..a100c7d5adcff8dadc34b6e6972bd5d1ebc3207c 100644 --- a/Testing/SystemTests/tests/analysis/LiquidsReflectometryReductionTest.py +++ b/Testing/SystemTests/tests/analysis/LiquidsReflectometryReductionTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,attribute-defined-outside-init import os diff --git a/Testing/SystemTests/tests/analysis/LiquidsReflectometryReductionWithBackgroundTest.py b/Testing/SystemTests/tests/analysis/LiquidsReflectometryReductionWithBackgroundTest.py index aa4e590e45e14535f113b18a0335d19485175830..b1b7b73933fddf52ceef38a2164bffaf0aef0a5d 100644 --- a/Testing/SystemTests/tests/analysis/LiquidsReflectometryReductionWithBackgroundTest.py +++ b/Testing/SystemTests/tests/analysis/LiquidsReflectometryReductionWithBackgroundTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init import systemtesting diff --git a/Testing/SystemTests/tests/analysis/LoadAndCheckBase.py b/Testing/SystemTests/tests/analysis/LoadAndCheckBase.py index 7555068c9af1ac1430b181a0c469a2102ba47a30..6efd57d980f1293e4b201232ea720918815c97fc 100644 --- a/Testing/SystemTests/tests/analysis/LoadAndCheckBase.py +++ b/Testing/SystemTests/tests/analysis/LoadAndCheckBase.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,invalid-name """ diff --git a/Testing/SystemTests/tests/analysis/LoadEmbeddedInstrumentInfo.py b/Testing/SystemTests/tests/analysis/LoadEmbeddedInstrumentInfo.py index 337db9d87ca0aa1015e6a2efe7f61a6814eb1b55..a7ae9866610de40f60d09948af7874922e5a3f74 100644 --- a/Testing/SystemTests/tests/analysis/LoadEmbeddedInstrumentInfo.py +++ b/Testing/SystemTests/tests/analysis/LoadEmbeddedInstrumentInfo.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init import systemtesting diff --git a/Testing/SystemTests/tests/analysis/LoadExedTest.py b/Testing/SystemTests/tests/analysis/LoadExedTest.py index 6b68fb2a80cf29539932c6ac650a774eb6ae00b3..530289c0ced512225b11aa5a954c94545c91223c 100644 --- a/Testing/SystemTests/tests/analysis/LoadExedTest.py +++ b/Testing/SystemTests/tests/analysis/LoadExedTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=invalid-name,no-init,too-many-public-methods,too-many-arguments from __future__ import (absolute_import, division, print_function) diff --git a/Testing/SystemTests/tests/analysis/LoadLotsOfFiles.py b/Testing/SystemTests/tests/analysis/LoadLotsOfFiles.py index a515fb27bf9dbc817926cb3fde862dbb41eddcb1..52be91c318ed51192fa98b611f855421f9dc9cc8 100644 --- a/Testing/SystemTests/tests/analysis/LoadLotsOfFiles.py +++ b/Testing/SystemTests/tests/analysis/LoadLotsOfFiles.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=invalid-name,no-init from __future__ import (absolute_import, division, print_function) diff --git a/Testing/SystemTests/tests/analysis/LoadLotsOfInstruments.py b/Testing/SystemTests/tests/analysis/LoadLotsOfInstruments.py index 31d86aa0c70262ad4976f5b769fe1b38fc8a87a9..d58fa443b22e014d48a9b7ff0b2ace3b6fdbc02c 100644 --- a/Testing/SystemTests/tests/analysis/LoadLotsOfInstruments.py +++ b/Testing/SystemTests/tests/analysis/LoadLotsOfInstruments.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=no-init,invalid-name,too-few-public-methods from __future__ import (absolute_import, division, print_function) diff --git a/Testing/SystemTests/tests/analysis/LoadMuonNexusTest.py b/Testing/SystemTests/tests/analysis/LoadMuonNexusTest.py index 3d7d4debba280fb9189c280a50f0519f40205232..76cb3212f19df2c928cc3a5bfb6875e8c079bcfb 100644 --- a/Testing/SystemTests/tests/analysis/LoadMuonNexusTest.py +++ b/Testing/SystemTests/tests/analysis/LoadMuonNexusTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init import systemtesting diff --git a/Testing/SystemTests/tests/analysis/LoadTest.py b/Testing/SystemTests/tests/analysis/LoadTest.py index 8c4f89ec182307699ed91672b344525de5e1fa98..72fe225ec70721410dc9c68b3a651aa9439ea48a 100644 --- a/Testing/SystemTests/tests/analysis/LoadTest.py +++ b/Testing/SystemTests/tests/analysis/LoadTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,invalid-name """ diff --git a/Testing/SystemTests/tests/analysis/LoadVesuvioTest.py b/Testing/SystemTests/tests/analysis/LoadVesuvioTest.py index ebae5dd90c5709614169439b91cfed5e288b0790..f03b9634a9d2cb2a78f80430e3c1897a8765c0e5 100644 --- a/Testing/SystemTests/tests/analysis/LoadVesuvioTest.py +++ b/Testing/SystemTests/tests/analysis/LoadVesuvioTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=invalid-name,no-init,too-many-public-methods,too-many-arguments from __future__ import (absolute_import, division, print_function) diff --git a/Testing/SystemTests/tests/analysis/MDNormCORELLITest.py b/Testing/SystemTests/tests/analysis/MDNormCORELLITest.py index 6d914f8324f8016e046d94088d7d484810c48711..f34d84c4a5955bd34f7ba072890b04ec1e33ccd0 100644 --- a/Testing/SystemTests/tests/analysis/MDNormCORELLITest.py +++ b/Testing/SystemTests/tests/analysis/MDNormCORELLITest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init diff --git a/Testing/SystemTests/tests/analysis/MDNormHYSPECTest.py b/Testing/SystemTests/tests/analysis/MDNormHYSPECTest.py index 95a3dfafa6e38428bad0a59207653558f55ef2e1..ae2a4c9578f1a69172bb1186efbbafd74e6b8ead 100644 --- a/Testing/SystemTests/tests/analysis/MDNormHYSPECTest.py +++ b/Testing/SystemTests/tests/analysis/MDNormHYSPECTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init diff --git a/Testing/SystemTests/tests/analysis/MDWorkspaceTests.py b/Testing/SystemTests/tests/analysis/MDWorkspaceTests.py index 5402d0138c25b81021a8a25932457ba9a73ee72a..bdff0a744c9885021ab1c58d335f577353d78edd 100644 --- a/Testing/SystemTests/tests/analysis/MDWorkspaceTests.py +++ b/Testing/SystemTests/tests/analysis/MDWorkspaceTests.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,invalid-name """ diff --git a/Testing/SystemTests/tests/analysis/MagnetismReflectometryReductionTest.py b/Testing/SystemTests/tests/analysis/MagnetismReflectometryReductionTest.py index f6f5129c423b505c9c21ee3ebcd74c1071ed32cd..5b3d1d327b0a12d6093188e8f1f656909a5998b1 100644 --- a/Testing/SystemTests/tests/analysis/MagnetismReflectometryReductionTest.py +++ b/Testing/SystemTests/tests/analysis/MagnetismReflectometryReductionTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,attribute-defined-outside-init import systemtesting diff --git a/Testing/SystemTests/tests/analysis/MaxEntTest.py b/Testing/SystemTests/tests/analysis/MaxEntTest.py index 104af169306c16042eb576acd7cfff4e87da0928..ea91433a986eb9fea67e9fe21665ba9907fb88a1 100644 --- a/Testing/SystemTests/tests/analysis/MaxEntTest.py +++ b/Testing/SystemTests/tests/analysis/MaxEntTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,attribute-defined-outside-init import systemtesting diff --git a/Testing/SystemTests/tests/analysis/MuonFFTTest.py b/Testing/SystemTests/tests/analysis/MuonFFTTest.py index da3de886f66d23d82d3f6aab89e6977a39dcbebe..aaf5806964be30f7c50938f55b6ef8baac0f2db1 100644 --- a/Testing/SystemTests/tests/analysis/MuonFFTTest.py +++ b/Testing/SystemTests/tests/analysis/MuonFFTTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,attribute-defined-outside-init import systemtesting diff --git a/Testing/SystemTests/tests/analysis/MuonKerenFittingTest.py b/Testing/SystemTests/tests/analysis/MuonKerenFittingTest.py index 354a701a07e6c0731990eace1eae2c5fd1e58caf..212ed9e4e1fd515681b2efc8bec227ecea070e13 100644 --- a/Testing/SystemTests/tests/analysis/MuonKerenFittingTest.py +++ b/Testing/SystemTests/tests/analysis/MuonKerenFittingTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,attribute-defined-outside-init,too-few-public-methods import systemtesting diff --git a/Testing/SystemTests/tests/analysis/MuonMaxEntTest.py b/Testing/SystemTests/tests/analysis/MuonMaxEntTest.py index 8f2b3d556d0f0bf2c7be024dc767fe22ea4c3e92..848962ec944f1073cc3e3a96450ccdb6fe1a4877 100644 --- a/Testing/SystemTests/tests/analysis/MuonMaxEntTest.py +++ b/Testing/SystemTests/tests/analysis/MuonMaxEntTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=no-init,attribute-defined-outside-init import systemtesting diff --git a/Testing/SystemTests/tests/analysis/MuonProcessTest.py b/Testing/SystemTests/tests/analysis/MuonProcessTest.py index 45d5be8b1510d277f420829dd02b906e861e0009..5d5144902da791b737397d4eec6bacb1e2b3b52b 100644 --- a/Testing/SystemTests/tests/analysis/MuonProcessTest.py +++ b/Testing/SystemTests/tests/analysis/MuonProcessTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init import systemtesting diff --git a/Testing/SystemTests/tests/analysis/OFFSPECLoadingTest.py b/Testing/SystemTests/tests/analysis/OFFSPECLoadingTest.py index d06f43dc19cce3814f6dc64679a2041fc0e7d51c..5fa1a1b9c5e896b6aba4a17b5663ba22bd7c5396 100644 --- a/Testing/SystemTests/tests/analysis/OFFSPECLoadingTest.py +++ b/Testing/SystemTests/tests/analysis/OFFSPECLoadingTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init from LoadAndCheckBase import * diff --git a/Testing/SystemTests/tests/analysis/POLDIAnalyseResidualsTest.py b/Testing/SystemTests/tests/analysis/POLDIAnalyseResidualsTest.py index 36ee1e08f4b87b2fdd7f6df60da83d327cd31744..b165db8642af9e767c8a85854c7254055e104a41 100644 --- a/Testing/SystemTests/tests/analysis/POLDIAnalyseResidualsTest.py +++ b/Testing/SystemTests/tests/analysis/POLDIAnalyseResidualsTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init import systemtesting diff --git a/Testing/SystemTests/tests/analysis/POLDIAutoCorrelationTest.py b/Testing/SystemTests/tests/analysis/POLDIAutoCorrelationTest.py index 60dd463bfed7a6efa903764bc4ea49a4f42fd070..f6512755680e50b14c986615a8f5468880d7a8ac 100644 --- a/Testing/SystemTests/tests/analysis/POLDIAutoCorrelationTest.py +++ b/Testing/SystemTests/tests/analysis/POLDIAutoCorrelationTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init import systemtesting diff --git a/Testing/SystemTests/tests/analysis/POLDICreatePeaksFromCellTest.py b/Testing/SystemTests/tests/analysis/POLDICreatePeaksFromCellTest.py index 7d78c636c26b664116218a0dc68945a831fdae6a..681a1dd4bb63b1dadabcfebeca6d7bad0415727a 100644 --- a/Testing/SystemTests/tests/analysis/POLDICreatePeaksFromCellTest.py +++ b/Testing/SystemTests/tests/analysis/POLDICreatePeaksFromCellTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=no-init,invalid-name,too-many-locals,too-few-public-methods from __future__ import (absolute_import, division, print_function) diff --git a/Testing/SystemTests/tests/analysis/POLDIDataAnalysisTest.py b/Testing/SystemTests/tests/analysis/POLDIDataAnalysisTest.py index da28eaaf8e28a89de5f20c575d5d5dfa2d0b089d..26418969031c01a30f096c41ab29c43ba4a0aa6f 100644 --- a/Testing/SystemTests/tests/analysis/POLDIDataAnalysisTest.py +++ b/Testing/SystemTests/tests/analysis/POLDIDataAnalysisTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=no-init,invalid-name,too-many-locals,too-few-public-methods import systemtesting diff --git a/Testing/SystemTests/tests/analysis/POLDIFitPeaks1DTest.py b/Testing/SystemTests/tests/analysis/POLDIFitPeaks1DTest.py index a7d0bf7ddf69d719581cdca515270928a39ed34c..9f0b190f65fc53615dc2f16e9d76735cb3701543 100644 --- a/Testing/SystemTests/tests/analysis/POLDIFitPeaks1DTest.py +++ b/Testing/SystemTests/tests/analysis/POLDIFitPeaks1DTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init from __future__ import (absolute_import, division, print_function) diff --git a/Testing/SystemTests/tests/analysis/POLDIFitPeaks2DTest.py b/Testing/SystemTests/tests/analysis/POLDIFitPeaks2DTest.py index b1609ed8712e1da022fb09d1e6c902a82c850a5e..150b55b0447e95b999624116a8481347147e407a 100644 --- a/Testing/SystemTests/tests/analysis/POLDIFitPeaks2DTest.py +++ b/Testing/SystemTests/tests/analysis/POLDIFitPeaks2DTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=no-init,invalid-name,too-many-locals,too-few-public-methods from __future__ import (absolute_import, division, print_function) diff --git a/Testing/SystemTests/tests/analysis/POLDILoadRunsTest.py b/Testing/SystemTests/tests/analysis/POLDILoadRunsTest.py index 7b61374d8490c909bd7984ff170ccde94722d8f9..9ffe00c2edab980ae148ffdc8ed33b6bf3ec1a97 100644 --- a/Testing/SystemTests/tests/analysis/POLDILoadRunsTest.py +++ b/Testing/SystemTests/tests/analysis/POLDILoadRunsTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=no-init,invalid-name,bare-except import systemtesting diff --git a/Testing/SystemTests/tests/analysis/POLDIMergeTest.py b/Testing/SystemTests/tests/analysis/POLDIMergeTest.py index 9c284dfeef870221e06ac7ce590fbe42e4ab8dcb..aa4ad64166a3ed4954f8fb5c66ae2295f2af6018 100644 --- a/Testing/SystemTests/tests/analysis/POLDIMergeTest.py +++ b/Testing/SystemTests/tests/analysis/POLDIMergeTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init import systemtesting diff --git a/Testing/SystemTests/tests/analysis/POLDIPeakSearchTest.py b/Testing/SystemTests/tests/analysis/POLDIPeakSearchTest.py index a078e9c9d79061fe8dffef529a77228af7d591bb..e7fa6d47acd5f92e43ccbfea4221f8f1c21f5d96 100644 --- a/Testing/SystemTests/tests/analysis/POLDIPeakSearchTest.py +++ b/Testing/SystemTests/tests/analysis/POLDIPeakSearchTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init import systemtesting diff --git a/Testing/SystemTests/tests/analysis/POLDITruncateDataTest.py b/Testing/SystemTests/tests/analysis/POLDITruncateDataTest.py index d2485782d02d52de5af070617b76071d03633bd1..b4c8e1213df4652b0b21f5d85c95ec9053759b96 100644 --- a/Testing/SystemTests/tests/analysis/POLDITruncateDataTest.py +++ b/Testing/SystemTests/tests/analysis/POLDITruncateDataTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,invalid-name import systemtesting diff --git a/Testing/SystemTests/tests/analysis/POLREFLoadingTest.py b/Testing/SystemTests/tests/analysis/POLREFLoadingTest.py index 0ad2aafa83cb99ff2402bacd430c82d660a4f631..03e8c441d04aecae910bde07663de821de718953 100644 --- a/Testing/SystemTests/tests/analysis/POLREFLoadingTest.py +++ b/Testing/SystemTests/tests/analysis/POLREFLoadingTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init from LoadAndCheckBase import * diff --git a/Testing/SystemTests/tests/analysis/PVPythonTest.py b/Testing/SystemTests/tests/analysis/PVPythonTest.py index a6e3ed184729da5110102cce9df31afb1fddc537..164073e2964a27c0262c46539c9eb2475e03d8de 100644 --- a/Testing/SystemTests/tests/analysis/PVPythonTest.py +++ b/Testing/SystemTests/tests/analysis/PVPythonTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=W0232,R0903 import sys diff --git a/Testing/SystemTests/tests/analysis/Peak2ConvCell_Test.py b/Testing/SystemTests/tests/analysis/Peak2ConvCell_Test.py index 16268d7689e129cb519363920d4a11ddbdd37cbc..45b539145507a96a1a700ad9c90953a776119cb5 100644 --- a/Testing/SystemTests/tests/analysis/Peak2ConvCell_Test.py +++ b/Testing/SystemTests/tests/analysis/Peak2ConvCell_Test.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=invalid-name,no-init,too-many-arguments,too-many-branches, unused-variable,too-many-return-statements # This script creates numerous PeaksWorkspaces for different Crystal Types and Centerings. Random errors diff --git a/Testing/SystemTests/tests/analysis/PolrefExample.py b/Testing/SystemTests/tests/analysis/PolrefExample.py index ed593a2c1ddb604f8dde85d1865723d0d6d0b36e..9917a6de0163405875e964d94477745ce2de3d31 100644 --- a/Testing/SystemTests/tests/analysis/PolrefExample.py +++ b/Testing/SystemTests/tests/analysis/PolrefExample.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init import systemtesting diff --git a/Testing/SystemTests/tests/analysis/PowderDiffProfileCalibrateTest.py b/Testing/SystemTests/tests/analysis/PowderDiffProfileCalibrateTest.py index 8261408d5e1a71dfb8ed5d95517e9d9aff912156..0dc688183327c3ac8e099d207726c61442aad1f7 100644 --- a/Testing/SystemTests/tests/analysis/PowderDiffProfileCalibrateTest.py +++ b/Testing/SystemTests/tests/analysis/PowderDiffProfileCalibrateTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=invalid-name,no-init ######################################################################## diff --git a/Testing/SystemTests/tests/analysis/PredictPeaksTest.py b/Testing/SystemTests/tests/analysis/PredictPeaksTest.py index cddfb3944983af1eb3da790590d6307eb6a8558b..744877aababc49adcef8c6d56a813ef5fde19fd7 100644 --- a/Testing/SystemTests/tests/analysis/PredictPeaksTest.py +++ b/Testing/SystemTests/tests/analysis/PredictPeaksTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=no-init,too-few-public-methods import systemtesting diff --git a/Testing/SystemTests/tests/analysis/QENSGlobalFitTeixeiraWaterSQE.py b/Testing/SystemTests/tests/analysis/QENSGlobalFitTeixeiraWaterSQE.py index ad5beeca9209ea2606c9ebbf474df2594c73e0c3..4b33526eb53968ee49fe2bd99e440f128bde73b7 100644 --- a/Testing/SystemTests/tests/analysis/QENSGlobalFitTeixeiraWaterSQE.py +++ b/Testing/SystemTests/tests/analysis/QENSGlobalFitTeixeiraWaterSQE.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init """ diff --git a/Testing/SystemTests/tests/analysis/RawVNexus.py b/Testing/SystemTests/tests/analysis/RawVNexus.py index 649e4a64900ae4d8fe152c1d2b7bceefcd9990f9..bb8713d28cfd1c045beefc303e2926e338c75037 100644 --- a/Testing/SystemTests/tests/analysis/RawVNexus.py +++ b/Testing/SystemTests/tests/analysis/RawVNexus.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,unused-variable import systemtesting diff --git a/Testing/SystemTests/tests/analysis/ReduceOneSCD_Run.py b/Testing/SystemTests/tests/analysis/ReduceOneSCD_Run.py index 3de4c4340603170ab561c5d0697a7987e270aa35..11135c5e5fb8dde70e00738579eb2aa608e7700c 100644 --- a/Testing/SystemTests/tests/analysis/ReduceOneSCD_Run.py +++ b/Testing/SystemTests/tests/analysis/ReduceOneSCD_Run.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=invalid-name,no-init,too-many-locals # File: ReduceOneSCD_Run.py diff --git a/Testing/SystemTests/tests/analysis/RefRoi.py b/Testing/SystemTests/tests/analysis/RefRoi.py index 931b9fb9e90975e88666ea548fe14685dc25af7d..dd7d549331902b7d4c5c95b30e16894d1ddfd386 100644 --- a/Testing/SystemTests/tests/analysis/RefRoi.py +++ b/Testing/SystemTests/tests/analysis/RefRoi.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init import systemtesting diff --git a/Testing/SystemTests/tests/analysis/ReflectometryFloodCorrection.py b/Testing/SystemTests/tests/analysis/ReflectometryFloodCorrection.py index 20ad5bd709bcceec5809ae71edda14c3d9fcf37c..7fd1d0d1256c1858ea2b657aef8c9c9b691e1ac1 100644 --- a/Testing/SystemTests/tests/analysis/ReflectometryFloodCorrection.py +++ b/Testing/SystemTests/tests/analysis/ReflectometryFloodCorrection.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init import systemtesting diff --git a/Testing/SystemTests/tests/analysis/ReflectometryISIS.py b/Testing/SystemTests/tests/analysis/ReflectometryISIS.py index 235f7562d101672bb07641467cfa5f433036b72c..993f502e81a268e5405f6ceb58ad372f66c1e10f 100644 --- a/Testing/SystemTests/tests/analysis/ReflectometryISIS.py +++ b/Testing/SystemTests/tests/analysis/ReflectometryISIS.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,invalid-name """ diff --git a/Testing/SystemTests/tests/analysis/ReflectometryQuickCombineMulti.py b/Testing/SystemTests/tests/analysis/ReflectometryQuickCombineMulti.py index fcbc64e892325a9efe8dba114af5587b87339395..302e56f26d6fe6819ab1a0105f29733b1ae0c5a6 100644 --- a/Testing/SystemTests/tests/analysis/ReflectometryQuickCombineMulti.py +++ b/Testing/SystemTests/tests/analysis/ReflectometryQuickCombineMulti.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init import systemtesting diff --git a/Testing/SystemTests/tests/analysis/ReflectometryQuickMultiDetector.py b/Testing/SystemTests/tests/analysis/ReflectometryQuickMultiDetector.py index 4e946a9a975ab3f2cba0ee463c38aca387774fca..640b213fa5528937996a237bb0ede97f80f46f3f 100644 --- a/Testing/SystemTests/tests/analysis/ReflectometryQuickMultiDetector.py +++ b/Testing/SystemTests/tests/analysis/ReflectometryQuickMultiDetector.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,invalid-name import systemtesting diff --git a/Testing/SystemTests/tests/analysis/ReflectometryQuickPointDetector.py b/Testing/SystemTests/tests/analysis/ReflectometryQuickPointDetector.py index bd48e695c461e5f49f4ac547f5f2cc968b9ea651..ec8890a99e061b53cda363debee672c73bd8c28b 100644 --- a/Testing/SystemTests/tests/analysis/ReflectometryQuickPointDetector.py +++ b/Testing/SystemTests/tests/analysis/ReflectometryQuickPointDetector.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init import systemtesting diff --git a/Testing/SystemTests/tests/analysis/ReflectometryQuickPointDetectorMakeTransmission.py b/Testing/SystemTests/tests/analysis/ReflectometryQuickPointDetectorMakeTransmission.py index ec5c811cdc1dd66e4e8591acc013d4478e154b34..b8819ef65d7bda10c834b6b958d6e5fbac267f64 100644 --- a/Testing/SystemTests/tests/analysis/ReflectometryQuickPointDetectorMakeTransmission.py +++ b/Testing/SystemTests/tests/analysis/ReflectometryQuickPointDetectorMakeTransmission.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init import systemtesting diff --git a/Testing/SystemTests/tests/analysis/RelectometryInstrumentSignedThetaTest.py b/Testing/SystemTests/tests/analysis/RelectometryInstrumentSignedThetaTest.py index 0a6b0d6db3dd87f592d3e4480bdc38e881111d40..c3dcb4463c6fd0ee19b018cb34c69480e4a9fd63 100644 --- a/Testing/SystemTests/tests/analysis/RelectometryInstrumentSignedThetaTest.py +++ b/Testing/SystemTests/tests/analysis/RelectometryInstrumentSignedThetaTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,invalid-name, line-too-long """ diff --git a/Testing/SystemTests/tests/analysis/ReuseExistingCalibration.py b/Testing/SystemTests/tests/analysis/ReuseExistingCalibration.py index f0f3e23cc17f1cb557d092f320dfe4e16ebe638e..0ba0842ed1c1403f7b78caed36446dba48e50e7f 100644 --- a/Testing/SystemTests/tests/analysis/ReuseExistingCalibration.py +++ b/Testing/SystemTests/tests/analysis/ReuseExistingCalibration.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init """ diff --git a/Testing/SystemTests/tests/analysis/SANS2DBatch.py b/Testing/SystemTests/tests/analysis/SANS2DBatch.py index 578bbc926b529787157cc4ff1cafabf9e1e566cb..95c02eb57abb0f6a4c7a36449943b54d280b579b 100644 --- a/Testing/SystemTests/tests/analysis/SANS2DBatch.py +++ b/Testing/SystemTests/tests/analysis/SANS2DBatch.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,attribute-defined-outside-init diff --git a/Testing/SystemTests/tests/analysis/SANS2DBatchTest_V2.py b/Testing/SystemTests/tests/analysis/SANS2DBatchTest_V2.py index 53a3938972bb8deb2c186e39d0e1a962cadad2f3..3a9e223056541e5548a72554a1a6d00e2b4c081a 100644 --- a/Testing/SystemTests/tests/analysis/SANS2DBatchTest_V2.py +++ b/Testing/SystemTests/tests/analysis/SANS2DBatchTest_V2.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,attribute-defined-outside-init diff --git a/Testing/SystemTests/tests/analysis/SANS2DFrontNoGrav.py b/Testing/SystemTests/tests/analysis/SANS2DFrontNoGrav.py index 1ab89ea475ec44376e69ee72e143580f66b9049e..bb78811248b865a80ffe62a6940a0729c48bbcc7 100644 --- a/Testing/SystemTests/tests/analysis/SANS2DFrontNoGrav.py +++ b/Testing/SystemTests/tests/analysis/SANS2DFrontNoGrav.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init diff --git a/Testing/SystemTests/tests/analysis/SANS2DFrontNoGrav_V2.py b/Testing/SystemTests/tests/analysis/SANS2DFrontNoGrav_V2.py index a92da7fbd9a7d8c7e78486839c5913612f93d792..9a645e4cf005bda095bad3e19ebadc1c42629747 100644 --- a/Testing/SystemTests/tests/analysis/SANS2DFrontNoGrav_V2.py +++ b/Testing/SystemTests/tests/analysis/SANS2DFrontNoGrav_V2.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init from __future__ import (absolute_import, division, print_function) diff --git a/Testing/SystemTests/tests/analysis/SANS2DLOQReloadWorkspaces.py b/Testing/SystemTests/tests/analysis/SANS2DLOQReloadWorkspaces.py index cd56dae6a88af81e84c1a1883ea0065d11ec1f38..270d6648e1d696094e1276836c71638130812281 100644 --- a/Testing/SystemTests/tests/analysis/SANS2DLOQReloadWorkspaces.py +++ b/Testing/SystemTests/tests/analysis/SANS2DLOQReloadWorkspaces.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=invalid-name,no-init from __future__ import (absolute_import, division, print_function) diff --git a/Testing/SystemTests/tests/analysis/SANS2DLimitEventsTime.py b/Testing/SystemTests/tests/analysis/SANS2DLimitEventsTime.py index c466614cdb60495271798a4ec11cefc639e2ebb5..547acfe505c5b1c840d4479e28a418c20f6c159c 100644 --- a/Testing/SystemTests/tests/analysis/SANS2DLimitEventsTime.py +++ b/Testing/SystemTests/tests/analysis/SANS2DLimitEventsTime.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init diff --git a/Testing/SystemTests/tests/analysis/SANS2DLimitEventsTime_V2.py b/Testing/SystemTests/tests/analysis/SANS2DLimitEventsTime_V2.py index d86f9c599c9bacaa3ae084edb79bc39db2b6328f..53328e62be3f40012d26474c79285d33e7a85fb5 100644 --- a/Testing/SystemTests/tests/analysis/SANS2DLimitEventsTime_V2.py +++ b/Testing/SystemTests/tests/analysis/SANS2DLimitEventsTime_V2.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init diff --git a/Testing/SystemTests/tests/analysis/SANS2DMultiPeriod.py b/Testing/SystemTests/tests/analysis/SANS2DMultiPeriod.py index 426fe9caa9f77b1d03b388d669006e03be00e541..6c2fd280a4ff65c9655d4bc4ae089a07fad669b6 100644 --- a/Testing/SystemTests/tests/analysis/SANS2DMultiPeriod.py +++ b/Testing/SystemTests/tests/analysis/SANS2DMultiPeriod.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,too-few-public-methods diff --git a/Testing/SystemTests/tests/analysis/SANS2DMultiPeriodAddFiles.py b/Testing/SystemTests/tests/analysis/SANS2DMultiPeriodAddFiles.py index 475056b0555290316937448958cd3b8119d38aaf..dada802fb1914b9c1c49ba46ce9f6a0013b03308 100644 --- a/Testing/SystemTests/tests/analysis/SANS2DMultiPeriodAddFiles.py +++ b/Testing/SystemTests/tests/analysis/SANS2DMultiPeriodAddFiles.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init from __future__ import (absolute_import, division, print_function) diff --git a/Testing/SystemTests/tests/analysis/SANS2DMultiPeriodAddFilesTest_V2.py b/Testing/SystemTests/tests/analysis/SANS2DMultiPeriodAddFilesTest_V2.py index 28a81b8c5885ef810ca594d25a445607720b8cb7..0d2879054c0b3cb7cfad45bf81d6aff1b07ac7a4 100644 --- a/Testing/SystemTests/tests/analysis/SANS2DMultiPeriodAddFilesTest_V2.py +++ b/Testing/SystemTests/tests/analysis/SANS2DMultiPeriodAddFilesTest_V2.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init diff --git a/Testing/SystemTests/tests/analysis/SANS2DMultiPeriod_V2.py b/Testing/SystemTests/tests/analysis/SANS2DMultiPeriod_V2.py index 99c6c05e3c6067b7fdeb79104b95106c14d6d92f..0d83c73d6285531bfdda3058eb3b8c4206e59e55 100644 --- a/Testing/SystemTests/tests/analysis/SANS2DMultiPeriod_V2.py +++ b/Testing/SystemTests/tests/analysis/SANS2DMultiPeriod_V2.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,too-few-public-methods diff --git a/Testing/SystemTests/tests/analysis/SANS2DReductionGUI.py b/Testing/SystemTests/tests/analysis/SANS2DReductionGUI.py index 1c3b388bee6ab62ecd5edbe57852b337b6009caa..63dc3e11feba66546fa380cdef0aadc01f424fd9 100644 --- a/Testing/SystemTests/tests/analysis/SANS2DReductionGUI.py +++ b/Testing/SystemTests/tests/analysis/SANS2DReductionGUI.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=invalid-name,attribute-defined-outside-init """ diff --git a/Testing/SystemTests/tests/analysis/SANS2DReductionGUIAdded.py b/Testing/SystemTests/tests/analysis/SANS2DReductionGUIAdded.py index 56051d217dc15c09f66dd09c5c6a618d2e9cd841..db1f889e3eb84cce579a69b644408caed1699dde 100644 --- a/Testing/SystemTests/tests/analysis/SANS2DReductionGUIAdded.py +++ b/Testing/SystemTests/tests/analysis/SANS2DReductionGUIAdded.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=invalid-name diff --git a/Testing/SystemTests/tests/analysis/SANS2DReductionGUIAddedTest_V2.py b/Testing/SystemTests/tests/analysis/SANS2DReductionGUIAddedTest_V2.py index 2e7892875e78ecda493730495850c56560b66f29..ff15655636707e1677845746702d048fefbdf949 100644 --- a/Testing/SystemTests/tests/analysis/SANS2DReductionGUIAddedTest_V2.py +++ b/Testing/SystemTests/tests/analysis/SANS2DReductionGUIAddedTest_V2.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=invalid-name diff --git a/Testing/SystemTests/tests/analysis/SANS2DReductionGUI_V2.py b/Testing/SystemTests/tests/analysis/SANS2DReductionGUI_V2.py index 4134052a01ed025d63310a692ffb1e3ec047eae9..7d4233374efc409668013b1c8c31a8334758421b 100644 --- a/Testing/SystemTests/tests/analysis/SANS2DReductionGUI_V2.py +++ b/Testing/SystemTests/tests/analysis/SANS2DReductionGUI_V2.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=invalid-name,attribute-defined-outside-init """ diff --git a/Testing/SystemTests/tests/analysis/SANS2DSearchCentreGUI.py b/Testing/SystemTests/tests/analysis/SANS2DSearchCentreGUI.py index fbd87d1a6aae4bf3d8a50845d0c8c6f8c13578fc..f6a2c995799b74501b834f6898268901ea592bfa 100644 --- a/Testing/SystemTests/tests/analysis/SANS2DSearchCentreGUI.py +++ b/Testing/SystemTests/tests/analysis/SANS2DSearchCentreGUI.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=invalid-name diff --git a/Testing/SystemTests/tests/analysis/SANS2DSlicing.py b/Testing/SystemTests/tests/analysis/SANS2DSlicing.py index e6ec9ebf14d7e40e26148ce58acc5961792afea3..31003fa3e89770b59ac95ee865cdec10042ea456 100644 --- a/Testing/SystemTests/tests/analysis/SANS2DSlicing.py +++ b/Testing/SystemTests/tests/analysis/SANS2DSlicing.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=invalid-name,attribute-defined-outside-init diff --git a/Testing/SystemTests/tests/analysis/SANS2DSlicingTest_V2.py b/Testing/SystemTests/tests/analysis/SANS2DSlicingTest_V2.py index 88026a6dc8c42c80f81c89ec996989832f35358f..691487e97eba38d03df5f4bccbc2b63a2f321fcd 100644 --- a/Testing/SystemTests/tests/analysis/SANS2DSlicingTest_V2.py +++ b/Testing/SystemTests/tests/analysis/SANS2DSlicingTest_V2.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=invalid-name,attribute-defined-outside-init diff --git a/Testing/SystemTests/tests/analysis/SANS2DWaveloops.py b/Testing/SystemTests/tests/analysis/SANS2DWaveloops.py index 7412ba5841495295f7b33864bb07e6fa74713079..426cf71f621a23d20e3d94b73323881c538b9f76 100644 --- a/Testing/SystemTests/tests/analysis/SANS2DWaveloops.py +++ b/Testing/SystemTests/tests/analysis/SANS2DWaveloops.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init diff --git a/Testing/SystemTests/tests/analysis/SANS2DWaveloopsTest_V2.py b/Testing/SystemTests/tests/analysis/SANS2DWaveloopsTest_V2.py index 4a422b5b7c8a97376ffb38f533ecc48b940e63ee..27f2bb0525cb39b6aa275d434cd4f30b2e0b0bb4 100644 --- a/Testing/SystemTests/tests/analysis/SANS2DWaveloopsTest_V2.py +++ b/Testing/SystemTests/tests/analysis/SANS2DWaveloopsTest_V2.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init from __future__ import (absolute_import, division, print_function) diff --git a/Testing/SystemTests/tests/analysis/SANSBatchReductionTest.py b/Testing/SystemTests/tests/analysis/SANSBatchReductionTest.py index 82c494cd4ebb24a0c790ce371da91273a1ec8410..9e4a98f452847e23d2e9ede41e8a5e70f910e38e 100644 --- a/Testing/SystemTests/tests/analysis/SANSBatchReductionTest.py +++ b/Testing/SystemTests/tests/analysis/SANSBatchReductionTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=too-many-public-methods, invalid-name, too-many-arguments from __future__ import (absolute_import, division, print_function) diff --git a/Testing/SystemTests/tests/analysis/SANSBeamCentreFinderCoreTest.py b/Testing/SystemTests/tests/analysis/SANSBeamCentreFinderCoreTest.py index 35951c133cc30385ad02c51d8b66c7c138c0f2d7..6aba9a0c48fe2fe67b1ab3514c824dd2571b5076 100644 --- a/Testing/SystemTests/tests/analysis/SANSBeamCentreFinderCoreTest.py +++ b/Testing/SystemTests/tests/analysis/SANSBeamCentreFinderCoreTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=too-many-public-methods, invalid-name, too-many-arguments diff --git a/Testing/SystemTests/tests/analysis/SANSCentreSample.py b/Testing/SystemTests/tests/analysis/SANSCentreSample.py index 078e54c6e1d725131530ba5eacf52432e246987a..bf6cbca41ee0a05ab4767e30484be7a85bf8f224 100644 --- a/Testing/SystemTests/tests/analysis/SANSCentreSample.py +++ b/Testing/SystemTests/tests/analysis/SANSCentreSample.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init diff --git a/Testing/SystemTests/tests/analysis/SANSDarkRunSubtractionTest.py b/Testing/SystemTests/tests/analysis/SANSDarkRunSubtractionTest.py index d4847929372e4ce1d20491ae2ea78348280c464e..e66a5cc48abddc2ed35cd2a9ccd96593ac358e84 100644 --- a/Testing/SystemTests/tests/analysis/SANSDarkRunSubtractionTest.py +++ b/Testing/SystemTests/tests/analysis/SANSDarkRunSubtractionTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init #pylint: disable=invalid-name diff --git a/Testing/SystemTests/tests/analysis/SANSDiagnosticPageTest.py b/Testing/SystemTests/tests/analysis/SANSDiagnosticPageTest.py index 56b1d0103981a2dbaddb660784a02c50eace943d..17b37bd2ca5a35d5fb959a101139ab1747223076 100644 --- a/Testing/SystemTests/tests/analysis/SANSDiagnosticPageTest.py +++ b/Testing/SystemTests/tests/analysis/SANSDiagnosticPageTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=too-many-public-methods, invalid-name, too-many-arguments diff --git a/Testing/SystemTests/tests/analysis/SANSFileChecking.py b/Testing/SystemTests/tests/analysis/SANSFileChecking.py index a8af507956687c1527d8fdd2a7b050245e65c31c..e9953522b2c8cf9fb0f46edfa97ecfab5fe3d784 100644 --- a/Testing/SystemTests/tests/analysis/SANSFileChecking.py +++ b/Testing/SystemTests/tests/analysis/SANSFileChecking.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=invalid-name,no-init #pylint: disable=too-many-public-methods diff --git a/Testing/SystemTests/tests/analysis/SANSILLAbsoluteScaleTest.py b/Testing/SystemTests/tests/analysis/SANSILLAbsoluteScaleTest.py index cf39d92a6b431973b2077cbb05db00883eb92f4a..0690c3989203dd48b8564f1a0674175df963955c 100644 --- a/Testing/SystemTests/tests/analysis/SANSILLAbsoluteScaleTest.py +++ b/Testing/SystemTests/tests/analysis/SANSILLAbsoluteScaleTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Testing/SystemTests/tests/analysis/SANSILLAutoProcessTest.py b/Testing/SystemTests/tests/analysis/SANSILLAutoProcessTest.py index a68d7cb8637b5daa6051030003e0629731f50d3a..0e6d54b9abf7181b25617e9e8685597cbb4f59f0 100644 --- a/Testing/SystemTests/tests/analysis/SANSILLAutoProcessTest.py +++ b/Testing/SystemTests/tests/analysis/SANSILLAutoProcessTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Testing/SystemTests/tests/analysis/SANSILLReductionTest.py b/Testing/SystemTests/tests/analysis/SANSILLReductionTest.py index 583a9ad25c310928c1aa98141e0f303ad56abb5f..bea24b0aac0db00485f5aca390273b6182ca6f5e 100644 --- a/Testing/SystemTests/tests/analysis/SANSILLReductionTest.py +++ b/Testing/SystemTests/tests/analysis/SANSILLReductionTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/Testing/SystemTests/tests/analysis/SANSLOQAddBatch.py b/Testing/SystemTests/tests/analysis/SANSLOQAddBatch.py index 4c94fdfcc18cf4ea06c5e7b74c50d8286021b6af..a80df8d4d6230011b28571ce737c9bc3ebee9791 100644 --- a/Testing/SystemTests/tests/analysis/SANSLOQAddBatch.py +++ b/Testing/SystemTests/tests/analysis/SANSLOQAddBatch.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,invalid-name,attribute-defined-outside-init from __future__ import (absolute_import, division, print_function) diff --git a/Testing/SystemTests/tests/analysis/SANSLOQBatch.py b/Testing/SystemTests/tests/analysis/SANSLOQBatch.py index 5f704191ac34e51f5698423b0d1b8eb35f30fbeb..17c23c1785fa255cfae29778efd37a42c90c88a9 100644 --- a/Testing/SystemTests/tests/analysis/SANSLOQBatch.py +++ b/Testing/SystemTests/tests/analysis/SANSLOQBatch.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init diff --git a/Testing/SystemTests/tests/analysis/SANSLOQBatch_V2.py b/Testing/SystemTests/tests/analysis/SANSLOQBatch_V2.py index a0ae22f2cf822b92194e47297ce2605a27b0411d..e0334f1e94cf01049caed5bde6b58985011a1a4e 100644 --- a/Testing/SystemTests/tests/analysis/SANSLOQBatch_V2.py +++ b/Testing/SystemTests/tests/analysis/SANSLOQBatch_V2.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=no-init diff --git a/Testing/SystemTests/tests/analysis/SANSLOQCan2D.py b/Testing/SystemTests/tests/analysis/SANSLOQCan2D.py index 491a9315c2f1281828cb79541d7726ebd5842bea..5b9736978925314cc1cf486f0a9b54715d40e05f 100644 --- a/Testing/SystemTests/tests/analysis/SANSLOQCan2D.py +++ b/Testing/SystemTests/tests/analysis/SANSLOQCan2D.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init diff --git a/Testing/SystemTests/tests/analysis/SANSLOQCan2D_V2.py b/Testing/SystemTests/tests/analysis/SANSLOQCan2D_V2.py index 7fc1bcdbaea5bcec7cde0bd8b00e790dbd76ee75..d9c6ad67bb440ebe743115543516c640fd7cacb9 100644 --- a/Testing/SystemTests/tests/analysis/SANSLOQCan2D_V2.py +++ b/Testing/SystemTests/tests/analysis/SANSLOQCan2D_V2.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init diff --git a/Testing/SystemTests/tests/analysis/SANSLOQCentreNoGrav.py b/Testing/SystemTests/tests/analysis/SANSLOQCentreNoGrav.py index 5ecd4f3c90a4b17e69fbfbab1418f18fdff59f2c..36ce185baa572ece700f5d20fe83a769650e2f90 100644 --- a/Testing/SystemTests/tests/analysis/SANSLOQCentreNoGrav.py +++ b/Testing/SystemTests/tests/analysis/SANSLOQCentreNoGrav.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init from __future__ import (absolute_import, division, print_function) diff --git a/Testing/SystemTests/tests/analysis/SANSLOQReductionGUI.py b/Testing/SystemTests/tests/analysis/SANSLOQReductionGUI.py index 8402c934fd7483b5fcb856b6bdd083b63f76fe4e..0c6b834ddcf3fd58b5a2359a6b0dd9ec60e1f450 100644 --- a/Testing/SystemTests/tests/analysis/SANSLOQReductionGUI.py +++ b/Testing/SystemTests/tests/analysis/SANSLOQReductionGUI.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=attribute-defined-outside-init diff --git a/Testing/SystemTests/tests/analysis/SANSLOQReductionGUITest_V2.py b/Testing/SystemTests/tests/analysis/SANSLOQReductionGUITest_V2.py index 123d1792217ac0fbea0941720f0b09e53c89cf2d..4ee325c93ac85e67a9b78c6613a9c9b7b5ede928 100644 --- a/Testing/SystemTests/tests/analysis/SANSLOQReductionGUITest_V2.py +++ b/Testing/SystemTests/tests/analysis/SANSLOQReductionGUITest_V2.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=attribute-defined-outside-init from __future__ import (absolute_import, division, print_function) diff --git a/Testing/SystemTests/tests/analysis/SANSLOQTransFitWorkspace2D.py b/Testing/SystemTests/tests/analysis/SANSLOQTransFitWorkspace2D.py index fbc16e249414e7feefa05d9ea69e18966868a299..b2e9670faeb53fa401c0633a7961cdb25a5bce0b 100644 --- a/Testing/SystemTests/tests/analysis/SANSLOQTransFitWorkspace2D.py +++ b/Testing/SystemTests/tests/analysis/SANSLOQTransFitWorkspace2D.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init diff --git a/Testing/SystemTests/tests/analysis/SANSLOWCentreNoGrav_V2.py b/Testing/SystemTests/tests/analysis/SANSLOWCentreNoGrav_V2.py index 685227ed6e8afaf73ae57cbbecfbf03a8fd40b92..7e259d2bf3598fad63578a1d07a579c08e11158d 100644 --- a/Testing/SystemTests/tests/analysis/SANSLOWCentreNoGrav_V2.py +++ b/Testing/SystemTests/tests/analysis/SANSLOWCentreNoGrav_V2.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init from __future__ import (absolute_import, division, print_function) diff --git a/Testing/SystemTests/tests/analysis/SANSLoadTest.py b/Testing/SystemTests/tests/analysis/SANSLoadTest.py index eb17dc8fc14152a097527110fe37475a0c1311a8..241b311156301933b9030ed02d378b17282fc910 100644 --- a/Testing/SystemTests/tests/analysis/SANSLoadTest.py +++ b/Testing/SystemTests/tests/analysis/SANSLoadTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=too-many-public-methods, invalid-name, too-many-arguments diff --git a/Testing/SystemTests/tests/analysis/SANSLoadersTest.py b/Testing/SystemTests/tests/analysis/SANSLoadersTest.py index cb55ed98b5f0635823fd5570ebabd94255b649a4..2164482b6cdbe1bdb541e469b75c9a0a6ee1f58d 100644 --- a/Testing/SystemTests/tests/analysis/SANSLoadersTest.py +++ b/Testing/SystemTests/tests/analysis/SANSLoadersTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=invalid-name,no-init """ diff --git a/Testing/SystemTests/tests/analysis/SANSMergedDetectorsTest.py b/Testing/SystemTests/tests/analysis/SANSMergedDetectorsTest.py index 72e41cc7f01d9655d3a40742f208ad8ed9851394..93c86a7f091e8588e5cdace2832f4f2c15f35298 100644 --- a/Testing/SystemTests/tests/analysis/SANSMergedDetectorsTest.py +++ b/Testing/SystemTests/tests/analysis/SANSMergedDetectorsTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=invalid-name diff --git a/Testing/SystemTests/tests/analysis/SANSMergedDetectorsTest_V2.py b/Testing/SystemTests/tests/analysis/SANSMergedDetectorsTest_V2.py index 3466da42662b902cc839622a7a3aac6daa29fc6d..7576e67bbfa2524f3e5c2b75ea5e0fb2d004acbe 100644 --- a/Testing/SystemTests/tests/analysis/SANSMergedDetectorsTest_V2.py +++ b/Testing/SystemTests/tests/analysis/SANSMergedDetectorsTest_V2.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=invalid-name diff --git a/Testing/SystemTests/tests/analysis/SANSQResolutionTest.py b/Testing/SystemTests/tests/analysis/SANSQResolutionTest.py index 6aec5cf722c5c01483b77da2d1df4b0ad5a7a77c..465452367795e72997834ce76ab9fd60a7884cdf 100644 --- a/Testing/SystemTests/tests/analysis/SANSQResolutionTest.py +++ b/Testing/SystemTests/tests/analysis/SANSQResolutionTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init diff --git a/Testing/SystemTests/tests/analysis/SANSReductionCoreTest.py b/Testing/SystemTests/tests/analysis/SANSReductionCoreTest.py index 01ed460e327f9f588ed6a16aa88525ce2c358775..6d76e23a0cd2bdf2e755afab7febc31f3e74b02f 100644 --- a/Testing/SystemTests/tests/analysis/SANSReductionCoreTest.py +++ b/Testing/SystemTests/tests/analysis/SANSReductionCoreTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=too-many-public-methods, invalid-name, too-many-arguments diff --git a/Testing/SystemTests/tests/analysis/SANSSaveTest.py b/Testing/SystemTests/tests/analysis/SANSSaveTest.py index c8763c0b652b5d035d181d3414b3970edcb0b768..20e0947e7fbfa6e386df0d31e7512f116774286c 100644 --- a/Testing/SystemTests/tests/analysis/SANSSaveTest.py +++ b/Testing/SystemTests/tests/analysis/SANSSaveTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=too-many-public-methods, invalid-name, too-many-arguments diff --git a/Testing/SystemTests/tests/analysis/SANSSingleReductionTest.py b/Testing/SystemTests/tests/analysis/SANSSingleReductionTest.py index 435c68bc87041cab1799069cb87b0bc891b395e5..fdf418b6bec85f8c97a5581539aaecc56c6d46d4 100644 --- a/Testing/SystemTests/tests/analysis/SANSSingleReductionTest.py +++ b/Testing/SystemTests/tests/analysis/SANSSingleReductionTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=too-many-public-methods, invalid-name, too-many-arguments diff --git a/Testing/SystemTests/tests/analysis/SANSUtilityTest.py b/Testing/SystemTests/tests/analysis/SANSUtilityTest.py index 4fe6383dc2998202a9d0e384d96b3832249eeb73..fd733cb52f8695b69c74b176f3ccaf15804f9cb9 100644 --- a/Testing/SystemTests/tests/analysis/SANSUtilityTest.py +++ b/Testing/SystemTests/tests/analysis/SANSUtilityTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=invalid-name,no-init,too-few-public-methods diff --git a/Testing/SystemTests/tests/analysis/SANSWorkspaceTypeTest.py b/Testing/SystemTests/tests/analysis/SANSWorkspaceTypeTest.py index 13fe7f4530449665680a8fba322277f6be75aba1..7d9088f995f87792087ea6bdee73ce7e8da73de7 100644 --- a/Testing/SystemTests/tests/analysis/SANSWorkspaceTypeTest.py +++ b/Testing/SystemTests/tests/analysis/SANSWorkspaceTypeTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=invalid-name,no-init from __future__ import (absolute_import, division, print_function) diff --git a/Testing/SystemTests/tests/analysis/SEQUOIAreduction.py b/Testing/SystemTests/tests/analysis/SEQUOIAreduction.py index 51bbd274092ee4799a9d54787c599f12934c823d..836843de73370406b8fa8e741ff8b273fed584bc 100644 --- a/Testing/SystemTests/tests/analysis/SEQUOIAreduction.py +++ b/Testing/SystemTests/tests/analysis/SEQUOIAreduction.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,invalid-name """ diff --git a/Testing/SystemTests/tests/analysis/SNAPRedux.py b/Testing/SystemTests/tests/analysis/SNAPRedux.py index 286b8b4c365b8e56d3f8b0561e7b67a765000407..5388dcdd86adcfb2101ff13b1fcde63d89cefdd9 100644 --- a/Testing/SystemTests/tests/analysis/SNAPRedux.py +++ b/Testing/SystemTests/tests/analysis/SNAPRedux.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,invalid-name,attribute-defined-outside-init from __future__ import (absolute_import, division, print_function) diff --git a/Testing/SystemTests/tests/analysis/SNSConvertToMDTest.py b/Testing/SystemTests/tests/analysis/SNSConvertToMDTest.py index 079d2913089515ce0cdfe868f2ea4ad6a3a5db4a..9b1f1591c9a1a43a1c16df313db71d2599a0687a 100644 --- a/Testing/SystemTests/tests/analysis/SNSConvertToMDTest.py +++ b/Testing/SystemTests/tests/analysis/SNSConvertToMDTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=invalid-name,no-init from __future__ import (absolute_import, division, print_function) diff --git a/Testing/SystemTests/tests/analysis/SNSPowderRedux.py b/Testing/SystemTests/tests/analysis/SNSPowderRedux.py index 0d4d043215dc19e42af1af9d8051ba775c53f012..1e3472868682021c32e3885da5e1fb40a268a9b2 100644 --- a/Testing/SystemTests/tests/analysis/SNSPowderRedux.py +++ b/Testing/SystemTests/tests/analysis/SNSPowderRedux.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,invalid-name,attribute-defined-outside-init import systemtesting diff --git a/Testing/SystemTests/tests/analysis/SXDAnalysis.py b/Testing/SystemTests/tests/analysis/SXDAnalysis.py index 8b53ea9fad284b1d01b0386d86843e786d2a867b..7f838c5cddbc2892cd615264c2e03d0c0bb07c96 100644 --- a/Testing/SystemTests/tests/analysis/SXDAnalysis.py +++ b/Testing/SystemTests/tests/analysis/SXDAnalysis.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,invalid-name from __future__ import (absolute_import, division, print_function) diff --git a/Testing/SystemTests/tests/analysis/SaveLoadNexusProcessed.py b/Testing/SystemTests/tests/analysis/SaveLoadNexusProcessed.py index ee309ae14ac7566871beaa94a7311ae74748636e..d610fa0e76a627c09ed0d7228d742a875afcbb3b 100644 --- a/Testing/SystemTests/tests/analysis/SaveLoadNexusProcessed.py +++ b/Testing/SystemTests/tests/analysis/SaveLoadNexusProcessed.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from abc import ABCMeta, abstractmethod import os diff --git a/Testing/SystemTests/tests/analysis/SaveNexusTest.py b/Testing/SystemTests/tests/analysis/SaveNexusTest.py index 2cf6fed88787d8b695c3635738577094c1e199df..7fafd4e1122f2f843affcf5275902e522d050eb8 100644 --- a/Testing/SystemTests/tests/analysis/SaveNexusTest.py +++ b/Testing/SystemTests/tests/analysis/SaveNexusTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,invalid-name,too-few-public-methods from __future__ import (absolute_import, division, print_function) diff --git a/Testing/SystemTests/tests/analysis/SingleCrystalDiffuseReductionTest.py b/Testing/SystemTests/tests/analysis/SingleCrystalDiffuseReductionTest.py index 44009b49ecb2ae00bad246ef6a6f1710386d4842..a37278b2425dd46b85a94dcd86d1e6ad14f8fe02 100644 --- a/Testing/SystemTests/tests/analysis/SingleCrystalDiffuseReductionTest.py +++ b/Testing/SystemTests/tests/analysis/SingleCrystalDiffuseReductionTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + import systemtesting from mantid.simpleapi import SingleCrystalDiffuseReduction, Load, AlgorithmManager, SaveMD diff --git a/Testing/SystemTests/tests/analysis/SortHKLTest.py b/Testing/SystemTests/tests/analysis/SortHKLTest.py index 82dfd93a934245874e8946fe6dbd3a25bf0e4dd8..8397ed79742836c8341058fc768b6ff395b66e68 100644 --- a/Testing/SystemTests/tests/analysis/SortHKLTest.py +++ b/Testing/SystemTests/tests/analysis/SortHKLTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=no-init,attribute-defined-outside-init from __future__ import (absolute_import, division, print_function) diff --git a/Testing/SystemTests/tests/analysis/SpaceGroupFactoryTest.py b/Testing/SystemTests/tests/analysis/SpaceGroupFactoryTest.py index 156a9757aaf99beb5ba144042876efdfa7dbf83e..428ca565e8094bc2c0f52350685f2e5fd9d49e85 100644 --- a/Testing/SystemTests/tests/analysis/SpaceGroupFactoryTest.py +++ b/Testing/SystemTests/tests/analysis/SpaceGroupFactoryTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=no-init from __future__ import (absolute_import, division, print_function) diff --git a/Testing/SystemTests/tests/analysis/SpaceGroupReflectionConditionsTest.py b/Testing/SystemTests/tests/analysis/SpaceGroupReflectionConditionsTest.py index 5476bdb8c47ccb109239c2c9e6dcc46ec978d182..2027daf0f38eeb71efbc7365da56071f8e4ad8d9 100644 --- a/Testing/SystemTests/tests/analysis/SpaceGroupReflectionConditionsTest.py +++ b/Testing/SystemTests/tests/analysis/SpaceGroupReflectionConditionsTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=no-init,invalid-name from __future__ import (absolute_import, division, print_function) diff --git a/Testing/SystemTests/tests/analysis/SpaceGroupUnitCellTest.py b/Testing/SystemTests/tests/analysis/SpaceGroupUnitCellTest.py index 1bb2592af28ea1dbc112835aa5200c192ff587bc..6e425ef8391182e1e1a407a76aeb0c3c035baa03 100644 --- a/Testing/SystemTests/tests/analysis/SpaceGroupUnitCellTest.py +++ b/Testing/SystemTests/tests/analysis/SpaceGroupUnitCellTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=no-init,invalid-name from __future__ import (absolute_import, division, print_function) diff --git a/Testing/SystemTests/tests/analysis/SphinxWarnings.py b/Testing/SystemTests/tests/analysis/SphinxWarnings.py index 80381eca225db7ce22c08a3bf95f928bb0e60c0a..50fbcdfc65bc3e580d0411d1e7a6e2436de1a7a7 100644 --- a/Testing/SystemTests/tests/analysis/SphinxWarnings.py +++ b/Testing/SystemTests/tests/analysis/SphinxWarnings.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=invalid-name """ diff --git a/Testing/SystemTests/tests/analysis/SplineSmoothingTest.py b/Testing/SystemTests/tests/analysis/SplineSmoothingTest.py index bb6de521205c1aed0a8fa8ed87dcb6e7539f3106..6128f0b82e615f5c9aebd5a152cca305045fb992 100644 --- a/Testing/SystemTests/tests/analysis/SplineSmoothingTest.py +++ b/Testing/SystemTests/tests/analysis/SplineSmoothingTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=no-init,attribute-defined-outside-init,too-many-public-methods diff --git a/Testing/SystemTests/tests/analysis/StepScan.py b/Testing/SystemTests/tests/analysis/StepScan.py index e29c26b828d6635b65674868e860f2ea11d5ff5f..87e975ca54585f37ee5e1f5058469ec439f85087 100644 --- a/Testing/SystemTests/tests/analysis/StepScan.py +++ b/Testing/SystemTests/tests/analysis/StepScan.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init import systemtesting diff --git a/Testing/SystemTests/tests/analysis/SurfLoadingTest.py b/Testing/SystemTests/tests/analysis/SurfLoadingTest.py index 042d1aff4e6baec5187009843efe4cee5c618650..1871838f2ad0d9c881e1884918fcf4cbd29ee642 100644 --- a/Testing/SystemTests/tests/analysis/SurfLoadingTest.py +++ b/Testing/SystemTests/tests/analysis/SurfLoadingTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init from __future__ import (absolute_import, division, print_function) diff --git a/Testing/SystemTests/tests/analysis/TOPAZPeakFinding.py b/Testing/SystemTests/tests/analysis/TOPAZPeakFinding.py index 71132d6d154c79fe111062d8d45180891174e609..7300e8ee4f15d267c94243e59b45bf457a9df57a 100644 --- a/Testing/SystemTests/tests/analysis/TOPAZPeakFinding.py +++ b/Testing/SystemTests/tests/analysis/TOPAZPeakFinding.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,invalid-name """ diff --git a/Testing/SystemTests/tests/analysis/UnweightedLeastSquaresTest.py b/Testing/SystemTests/tests/analysis/UnweightedLeastSquaresTest.py index 3761dd6679a42d29f7d23aa43c5411a303de04f4..4a8d8ea6164062e5c01ec042113921bbc1fdc4be 100644 --- a/Testing/SystemTests/tests/analysis/UnweightedLeastSquaresTest.py +++ b/Testing/SystemTests/tests/analysis/UnweightedLeastSquaresTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=no-init,invalid-name,too-few-public-methods # diff --git a/Testing/SystemTests/tests/analysis/ValidateInstrumentDir.py b/Testing/SystemTests/tests/analysis/ValidateInstrumentDir.py index de86b57a08d5649d5b3fee3d0134587bae298235..6472bc1d7f6766609400c9b33b5a49afbf6e8ddd 100644 --- a/Testing/SystemTests/tests/analysis/ValidateInstrumentDir.py +++ b/Testing/SystemTests/tests/analysis/ValidateInstrumentDir.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=invalid-name #pylint: disable=no-init diff --git a/Testing/SystemTests/tests/analysis/VesuvioCommandsTest.py b/Testing/SystemTests/tests/analysis/VesuvioCommandsTest.py index d644399e71c14d4feb7bdd8b7e34ca7d369f6126..84bbefaf91bb04b5706505be64adb595d9147faa 100644 --- a/Testing/SystemTests/tests/analysis/VesuvioCommandsTest.py +++ b/Testing/SystemTests/tests/analysis/VesuvioCommandsTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=no-init """These are more integration tests as they will require that the test data is available diff --git a/Testing/SystemTests/tests/analysis/VesuvioCorrectionsTest.py b/Testing/SystemTests/tests/analysis/VesuvioCorrectionsTest.py index 91dbe91026d8a06717e1d3285c77d4f8e0bdf024..ca13d12c374eebbbb22fb326f287f780b9468aea 100644 --- a/Testing/SystemTests/tests/analysis/VesuvioCorrectionsTest.py +++ b/Testing/SystemTests/tests/analysis/VesuvioCorrectionsTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=too-many-public-methods,invalid-name,no-init diff --git a/Testing/SystemTests/tests/analysis/VesuvioFittingTest.py b/Testing/SystemTests/tests/analysis/VesuvioFittingTest.py index bd103ccc91a2bfdbac176d13709a5476f4bc9ea2..134362504d03d9f9385df6acf35c7a6f39111035 100644 --- a/Testing/SystemTests/tests/analysis/VesuvioFittingTest.py +++ b/Testing/SystemTests/tests/analysis/VesuvioFittingTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=invalid-name,no-init,attribute-defined-outside-init import systemtesting diff --git a/Testing/SystemTests/tests/analysis/VesuvioLoadingTest.py b/Testing/SystemTests/tests/analysis/VesuvioLoadingTest.py index b25017bdca73a6c606fc1e446e2245cb8ee3ec3f..a19bc21daf83f5f4063f92a6bf9c94327ef9f9b9 100644 --- a/Testing/SystemTests/tests/analysis/VesuvioLoadingTest.py +++ b/Testing/SystemTests/tests/analysis/VesuvioLoadingTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=no-init """These are more integration tests as they will require that the test data is available diff --git a/Testing/SystemTests/tests/analysis/WeightedLeastSquaresTest.py b/Testing/SystemTests/tests/analysis/WeightedLeastSquaresTest.py index 7b8efe3b3c862ca6f2790d3e0b5cd9bb78d7496e..d3b59981ca6af5544140268f66721c6c00f2fd7e 100644 --- a/Testing/SystemTests/tests/analysis/WeightedLeastSquaresTest.py +++ b/Testing/SystemTests/tests/analysis/WeightedLeastSquaresTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=no-init,too-few-public-methods # diff --git a/Testing/SystemTests/tests/analysis/WishAnalysis.py b/Testing/SystemTests/tests/analysis/WishAnalysis.py index dc4047d0e0e384df00222a8344eca052d189b0c6..ef01000e099bc78de7a5a6d661bf2ba49c5c447d 100644 --- a/Testing/SystemTests/tests/analysis/WishAnalysis.py +++ b/Testing/SystemTests/tests/analysis/WishAnalysis.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init import systemtesting diff --git a/Testing/SystemTests/tests/analysis/WishCalibrate.py b/Testing/SystemTests/tests/analysis/WishCalibrate.py index 8c5d27cad3d779bd9f685ac0949c16c7da1bec01..133c9410c08679b111e3e30ab898386147f2d7c3 100644 --- a/Testing/SystemTests/tests/analysis/WishCalibrate.py +++ b/Testing/SystemTests/tests/analysis/WishCalibrate.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) import filecmp diff --git a/Testing/SystemTests/tests/analysis/WishDiffuseScattering.py b/Testing/SystemTests/tests/analysis/WishDiffuseScattering.py index 02fc0f6344424e203f367e220be71f7524f8fcf5..291062becd9b9bb7d9fb22665069a7688238caa4 100644 --- a/Testing/SystemTests/tests/analysis/WishDiffuseScattering.py +++ b/Testing/SystemTests/tests/analysis/WishDiffuseScattering.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init """ diff --git a/Testing/SystemTests/tests/analysis/WishMasking.py b/Testing/SystemTests/tests/analysis/WishMasking.py index b6d8adbb4c43e2a6d871df083abc88a1eb2c4372..e583061c0747aae5173def243f074cef43af99fd 100644 --- a/Testing/SystemTests/tests/analysis/WishMasking.py +++ b/Testing/SystemTests/tests/analysis/WishMasking.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,invalid-name """ diff --git a/Testing/SystemTests/tests/analysis/complexShapeAbsorptionsTest.py b/Testing/SystemTests/tests/analysis/complexShapeAbsorptionsTest.py index 3b77fb0a3d3e8b6cd1c904f2de21d79ee8b55d9f..b8444723c997ea87493eb38d0ea8d4f8c0f7137c 100644 --- a/Testing/SystemTests/tests/analysis/complexShapeAbsorptionsTest.py +++ b/Testing/SystemTests/tests/analysis/complexShapeAbsorptionsTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) import systemtesting diff --git a/Testing/Tools/cxxtest/build_tools/SCons/cxxtest.py b/Testing/Tools/cxxtest/build_tools/SCons/cxxtest.py index 2a697c8ed5054e2284b587abd70e5fb678aedaf8..0c374d567aed0e62635d3be33b431a8f887a3ce9 100644 --- a/Testing/Tools/cxxtest/build_tools/SCons/cxxtest.py +++ b/Testing/Tools/cxxtest/build_tools/SCons/cxxtest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # coding=UTF-8 # diff --git a/Testing/Tools/cxxtest/build_tools/SCons/test/default_env/TestDef.py b/Testing/Tools/cxxtest/build_tools/SCons/test/default_env/TestDef.py index 73013c6eeebf05fa1595e0df549fea74bf49fab7..c5a71f8c9d3ddc01d87e270eab82fe0b7b72ee92 100644 --- a/Testing/Tools/cxxtest/build_tools/SCons/test/default_env/TestDef.py +++ b/Testing/Tools/cxxtest/build_tools/SCons/test/default_env/TestDef.py @@ -1,10 +1,9 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + - expect_success = True type = 'scons' links = { diff --git a/Testing/Tools/cxxtest/build_tools/SCons/test/empty_source_list/TestDef.py b/Testing/Tools/cxxtest/build_tools/SCons/test/empty_source_list/TestDef.py index 25d2a7b057826813afa755b8ebcb20f6c6c5b6ee..ae10317d1a6bae455893c38326d059d3f964c64c 100644 --- a/Testing/Tools/cxxtest/build_tools/SCons/test/empty_source_list/TestDef.py +++ b/Testing/Tools/cxxtest/build_tools/SCons/test/empty_source_list/TestDef.py @@ -1,8 +1,7 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + - links = {'cxxtest' : '../../../../'} diff --git a/Testing/Tools/cxxtest/build_tools/SCons/test/empty_source_list/test_bar.t.h b/Testing/Tools/cxxtest/build_tools/SCons/test/empty_source_list/test_bar.t.h index 8286523daec85231f9711208873866c31deb93a8..907d28642ceb53578fd6e0e2713ed75718bc3182 100644 --- a/Testing/Tools/cxxtest/build_tools/SCons/test/empty_source_list/test_bar.t.h +++ b/Testing/Tools/cxxtest/build_tools/SCons/test/empty_source_list/test_bar.t.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once /** diff --git a/Testing/Tools/cxxtest/build_tools/SCons/test/empty_source_list/test_foo.t.h b/Testing/Tools/cxxtest/build_tools/SCons/test/empty_source_list/test_foo.t.h index c490d0faaa2b66e8539ec24c391a4614982f8350..2c5dbb7f9597ca59f27b68ec3e5af21a3d2bb698 100644 --- a/Testing/Tools/cxxtest/build_tools/SCons/test/empty_source_list/test_foo.t.h +++ b/Testing/Tools/cxxtest/build_tools/SCons/test/empty_source_list/test_foo.t.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once /** diff --git a/Testing/Tools/cxxtest/build_tools/SCons/test/eprouvette.py b/Testing/Tools/cxxtest/build_tools/SCons/test/eprouvette.py index 89fd19dec38857bbc4930b0541d221e0c9015651..fe78125a853520991ae442e439587a15d4af66c8 100755 --- a/Testing/Tools/cxxtest/build_tools/SCons/test/eprouvette.py +++ b/Testing/Tools/cxxtest/build_tools/SCons/test/eprouvette.py @@ -2,8 +2,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # vim: encoding=utf-8 diff --git a/Testing/Tools/cxxtest/build_tools/SCons/test/expanding_#/TestDef.py b/Testing/Tools/cxxtest/build_tools/SCons/test/expanding_#/TestDef.py index feaef7e64f0be45adf2d524d7af5a6282fca42da..50704dc4218823685016940bbb4018377b8748b8 100644 --- a/Testing/Tools/cxxtest/build_tools/SCons/test/expanding_#/TestDef.py +++ b/Testing/Tools/cxxtest/build_tools/SCons/test/expanding_#/TestDef.py @@ -1,8 +1,7 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + - links = {'src' : '../../../../test'} diff --git a/Testing/Tools/cxxtest/build_tools/SCons/test/globbing/TestDef.py b/Testing/Tools/cxxtest/build_tools/SCons/test/globbing/TestDef.py index 25d2a7b057826813afa755b8ebcb20f6c6c5b6ee..ae10317d1a6bae455893c38326d059d3f964c64c 100644 --- a/Testing/Tools/cxxtest/build_tools/SCons/test/globbing/TestDef.py +++ b/Testing/Tools/cxxtest/build_tools/SCons/test/globbing/TestDef.py @@ -1,8 +1,7 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + - links = {'cxxtest' : '../../../../'} diff --git a/Testing/Tools/cxxtest/build_tools/SCons/test/globbing/src/requirement.cpp b/Testing/Tools/cxxtest/build_tools/SCons/test/globbing/src/requirement.cpp index be190123fadc611d0e337661a787ef140f95eceb..7af72c7e1ae158d443bd9101c642644727f171ee 100644 --- a/Testing/Tools/cxxtest/build_tools/SCons/test/globbing/src/requirement.cpp +++ b/Testing/Tools/cxxtest/build_tools/SCons/test/globbing/src/requirement.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /** * @file requirement.cpp diff --git a/Testing/Tools/cxxtest/build_tools/SCons/test/globbing/src/requirement.h b/Testing/Tools/cxxtest/build_tools/SCons/test/globbing/src/requirement.h index fba8b73c39df74fa17111eac9bfbf31f7267306f..f174b30a981e9c4f9ef3ccad8fcecab4a27cd971 100644 --- a/Testing/Tools/cxxtest/build_tools/SCons/test/globbing/src/requirement.h +++ b/Testing/Tools/cxxtest/build_tools/SCons/test/globbing/src/requirement.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once /** diff --git a/Testing/Tools/cxxtest/build_tools/SCons/test/globbing/src/test_bar.t.h b/Testing/Tools/cxxtest/build_tools/SCons/test/globbing/src/test_bar.t.h index 0965be32cb5d079c33ac5e7b09081873a7a797ce..5075f6e6775fdd1edb1887251c93488e1f20a585 100644 --- a/Testing/Tools/cxxtest/build_tools/SCons/test/globbing/src/test_bar.t.h +++ b/Testing/Tools/cxxtest/build_tools/SCons/test/globbing/src/test_bar.t.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once /** diff --git a/Testing/Tools/cxxtest/build_tools/SCons/test/globbing/src/test_foo.t.h b/Testing/Tools/cxxtest/build_tools/SCons/test/globbing/src/test_foo.t.h index f05ef8a593cb13602718dbddfff7c19d7dceaba6..5b5ff47efc7d9d77b511e294b9b28f4a15f05de5 100644 --- a/Testing/Tools/cxxtest/build_tools/SCons/test/globbing/src/test_foo.t.h +++ b/Testing/Tools/cxxtest/build_tools/SCons/test/globbing/src/test_foo.t.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once /** diff --git a/Testing/Tools/cxxtest/build_tools/SCons/test/globbing_edmundo/TestDef.py b/Testing/Tools/cxxtest/build_tools/SCons/test/globbing_edmundo/TestDef.py index b1c4bf0164916aa47ec199515e6b9b1cef20ce55..ae10317d1a6bae455893c38326d059d3f964c64c 100644 --- a/Testing/Tools/cxxtest/build_tools/SCons/test/globbing_edmundo/TestDef.py +++ b/Testing/Tools/cxxtest/build_tools/SCons/test/globbing_edmundo/TestDef.py @@ -1,7 +1,7 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + links = {'cxxtest' : '../../../../'} diff --git a/Testing/Tools/cxxtest/build_tools/SCons/test/globbing_edmundo/hello.hh b/Testing/Tools/cxxtest/build_tools/SCons/test/globbing_edmundo/hello.hh index cbfcf3b4e89cc1a6ebf677e112e86ee58ef05933..c9b19816ed1693121f996104c67cbc6efc09e985 100644 --- a/Testing/Tools/cxxtest/build_tools/SCons/test/globbing_edmundo/hello.hh +++ b/Testing/Tools/cxxtest/build_tools/SCons/test/globbing_edmundo/hello.hh @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /** * \file diff --git a/Testing/Tools/cxxtest/build_tools/SCons/test/globbing_edmundo/hellotest.t.h b/Testing/Tools/cxxtest/build_tools/SCons/test/globbing_edmundo/hellotest.t.h index f40b74277075f2fe0011a370c40271ff95a23e07..a14d9fa31fbddc470f44a4559dabfc959852cd64 100644 --- a/Testing/Tools/cxxtest/build_tools/SCons/test/globbing_edmundo/hellotest.t.h +++ b/Testing/Tools/cxxtest/build_tools/SCons/test/globbing_edmundo/hellotest.t.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /** * \file diff --git a/Testing/Tools/cxxtest/build_tools/SCons/test/globbing_edmundo/main.cpp b/Testing/Tools/cxxtest/build_tools/SCons/test/globbing_edmundo/main.cpp index 9711de8a045a9570b57b1bd130cc0c314e77276c..f17af4d07890c523eb16cbee01f77eebb12d29af 100644 --- a/Testing/Tools/cxxtest/build_tools/SCons/test/globbing_edmundo/main.cpp +++ b/Testing/Tools/cxxtest/build_tools/SCons/test/globbing_edmundo/main.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /** * \file diff --git a/Testing/Tools/cxxtest/build_tools/SCons/test/include_CCFLAGS/TestDef.py b/Testing/Tools/cxxtest/build_tools/SCons/test/include_CCFLAGS/TestDef.py index b1c4bf0164916aa47ec199515e6b9b1cef20ce55..ae10317d1a6bae455893c38326d059d3f964c64c 100644 --- a/Testing/Tools/cxxtest/build_tools/SCons/test/include_CCFLAGS/TestDef.py +++ b/Testing/Tools/cxxtest/build_tools/SCons/test/include_CCFLAGS/TestDef.py @@ -1,7 +1,7 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + links = {'cxxtest' : '../../../../'} diff --git a/Testing/Tools/cxxtest/build_tools/SCons/test/include_CCFLAGS/src/not-with-pedantic.h b/Testing/Tools/cxxtest/build_tools/SCons/test/include_CCFLAGS/src/not-with-pedantic.h index 79e10ea6791de1f62ce0c5d59e007fc86dd1e4f1..7cb6806ee0344e8a7457193160b682dfb98229ae 100644 --- a/Testing/Tools/cxxtest/build_tools/SCons/test/include_CCFLAGS/src/not-with-pedantic.h +++ b/Testing/Tools/cxxtest/build_tools/SCons/test/include_CCFLAGS/src/not-with-pedantic.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /** * @file not-with-pedantic.h diff --git a/Testing/Tools/cxxtest/build_tools/SCons/test/include_CCFLAGS/src/only_with_ansi.t.h b/Testing/Tools/cxxtest/build_tools/SCons/test/include_CCFLAGS/src/only_with_ansi.t.h index d19a359f9f2cb66abe5d336b578871cbafa47800..b72722d3c5de54de55983db3a0c0cf2bde013ca2 100644 --- a/Testing/Tools/cxxtest/build_tools/SCons/test/include_CCFLAGS/src/only_with_ansi.t.h +++ b/Testing/Tools/cxxtest/build_tools/SCons/test/include_CCFLAGS/src/only_with_ansi.t.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /** * @file only_with_ansi.t.h diff --git a/Testing/Tools/cxxtest/build_tools/SCons/test/include_CXXFLAGS/TestDef.py b/Testing/Tools/cxxtest/build_tools/SCons/test/include_CXXFLAGS/TestDef.py index 25d2a7b057826813afa755b8ebcb20f6c6c5b6ee..ae10317d1a6bae455893c38326d059d3f964c64c 100644 --- a/Testing/Tools/cxxtest/build_tools/SCons/test/include_CXXFLAGS/TestDef.py +++ b/Testing/Tools/cxxtest/build_tools/SCons/test/include_CXXFLAGS/TestDef.py @@ -1,8 +1,7 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + - links = {'cxxtest' : '../../../../'} diff --git a/Testing/Tools/cxxtest/build_tools/SCons/test/include_CXXFLAGS/src/not-with-pedantic.h b/Testing/Tools/cxxtest/build_tools/SCons/test/include_CXXFLAGS/src/not-with-pedantic.h index f85b0c8d655b39f8bf0272c6a0443939299afa14..8abe00512ad3c94081540f85f215819808d303ea 100644 --- a/Testing/Tools/cxxtest/build_tools/SCons/test/include_CXXFLAGS/src/not-with-pedantic.h +++ b/Testing/Tools/cxxtest/build_tools/SCons/test/include_CXXFLAGS/src/not-with-pedantic.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /** * @file not-with-pedantic.h diff --git a/Testing/Tools/cxxtest/build_tools/SCons/test/multifile_tests/TestDef.py b/Testing/Tools/cxxtest/build_tools/SCons/test/multifile_tests/TestDef.py index 25d2a7b057826813afa755b8ebcb20f6c6c5b6ee..ae10317d1a6bae455893c38326d059d3f964c64c 100644 --- a/Testing/Tools/cxxtest/build_tools/SCons/test/multifile_tests/TestDef.py +++ b/Testing/Tools/cxxtest/build_tools/SCons/test/multifile_tests/TestDef.py @@ -1,8 +1,7 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + - links = {'cxxtest' : '../../../../'} diff --git a/Testing/Tools/cxxtest/build_tools/SCons/test/multifile_tests/src/requirement.cpp b/Testing/Tools/cxxtest/build_tools/SCons/test/multifile_tests/src/requirement.cpp index be190123fadc611d0e337661a787ef140f95eceb..7af72c7e1ae158d443bd9101c642644727f171ee 100644 --- a/Testing/Tools/cxxtest/build_tools/SCons/test/multifile_tests/src/requirement.cpp +++ b/Testing/Tools/cxxtest/build_tools/SCons/test/multifile_tests/src/requirement.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /** * @file requirement.cpp diff --git a/Testing/Tools/cxxtest/build_tools/SCons/test/multifile_tests/src/requirement.h b/Testing/Tools/cxxtest/build_tools/SCons/test/multifile_tests/src/requirement.h index fba8b73c39df74fa17111eac9bfbf31f7267306f..f174b30a981e9c4f9ef3ccad8fcecab4a27cd971 100644 --- a/Testing/Tools/cxxtest/build_tools/SCons/test/multifile_tests/src/requirement.h +++ b/Testing/Tools/cxxtest/build_tools/SCons/test/multifile_tests/src/requirement.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once /** diff --git a/Testing/Tools/cxxtest/build_tools/SCons/test/multifile_tests/src/test_bar.t.h b/Testing/Tools/cxxtest/build_tools/SCons/test/multifile_tests/src/test_bar.t.h index 0965be32cb5d079c33ac5e7b09081873a7a797ce..5075f6e6775fdd1edb1887251c93488e1f20a585 100644 --- a/Testing/Tools/cxxtest/build_tools/SCons/test/multifile_tests/src/test_bar.t.h +++ b/Testing/Tools/cxxtest/build_tools/SCons/test/multifile_tests/src/test_bar.t.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once /** diff --git a/Testing/Tools/cxxtest/build_tools/SCons/test/multifile_tests/src/test_foo.t.h b/Testing/Tools/cxxtest/build_tools/SCons/test/multifile_tests/src/test_foo.t.h index f05ef8a593cb13602718dbddfff7c19d7dceaba6..5b5ff47efc7d9d77b511e294b9b28f4a15f05de5 100644 --- a/Testing/Tools/cxxtest/build_tools/SCons/test/multifile_tests/src/test_foo.t.h +++ b/Testing/Tools/cxxtest/build_tools/SCons/test/multifile_tests/src/test_foo.t.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once /** diff --git a/Testing/Tools/cxxtest/build_tools/SCons/test/need_cpppath/TestDef.py b/Testing/Tools/cxxtest/build_tools/SCons/test/need_cpppath/TestDef.py index d2cfb75232dfb59fac674e2b49dba356e18ebbc1..ffedf5d542e31f4d22d7833e9c94f5003f02b3cb 100644 --- a/Testing/Tools/cxxtest/build_tools/SCons/test/need_cpppath/TestDef.py +++ b/Testing/Tools/cxxtest/build_tools/SCons/test/need_cpppath/TestDef.py @@ -1,6 +1,6 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + diff --git a/Testing/Tools/cxxtest/build_tools/SCons/test/need_cpppath/src/cpppath.t.h b/Testing/Tools/cxxtest/build_tools/SCons/test/need_cpppath/src/cpppath.t.h index a4b4487bde7af9f37992203e9c3c5950e461f969..d972b86bdbd3104cdfc94ea73613b788565e8e23 100644 --- a/Testing/Tools/cxxtest/build_tools/SCons/test/need_cpppath/src/cpppath.t.h +++ b/Testing/Tools/cxxtest/build_tools/SCons/test/need_cpppath/src/cpppath.t.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Testing/Tools/cxxtest/build_tools/SCons/test/need_cpppath/src/cpppathdir/include.h b/Testing/Tools/cxxtest/build_tools/SCons/test/need_cpppath/src/cpppathdir/include.h index 222c2e3ec87a8c200235242a19934be1535a841e..a489e52264dcbf55e362c97d488ce82bf6ebc03a 100644 --- a/Testing/Tools/cxxtest/build_tools/SCons/test/need_cpppath/src/cpppathdir/include.h +++ b/Testing/Tools/cxxtest/build_tools/SCons/test/need_cpppath/src/cpppathdir/include.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once /** diff --git a/Testing/Tools/cxxtest/build_tools/SCons/test/nonstandard_cxxtest_dir/TestDef.py b/Testing/Tools/cxxtest/build_tools/SCons/test/nonstandard_cxxtest_dir/TestDef.py index 57af210a6761879e0a7fae84b7583fa16a174466..5c062581603b6b9e180ca11d6b0b68000c92e5d1 100644 --- a/Testing/Tools/cxxtest/build_tools/SCons/test/nonstandard_cxxtest_dir/TestDef.py +++ b/Testing/Tools/cxxtest/build_tools/SCons/test/nonstandard_cxxtest_dir/TestDef.py @@ -1,8 +1,7 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + - links = {'src' : '../../../../test/'} diff --git a/Testing/Tools/cxxtest/build_tools/SCons/test/printer_propagation/TestDef.py b/Testing/Tools/cxxtest/build_tools/SCons/test/printer_propagation/TestDef.py index d2cfb75232dfb59fac674e2b49dba356e18ebbc1..ffedf5d542e31f4d22d7833e9c94f5003f02b3cb 100644 --- a/Testing/Tools/cxxtest/build_tools/SCons/test/printer_propagation/TestDef.py +++ b/Testing/Tools/cxxtest/build_tools/SCons/test/printer_propagation/TestDef.py @@ -1,6 +1,6 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + diff --git a/Testing/Tools/cxxtest/build_tools/SCons/test/printer_propagation/cxxtest/CrazyRunner.h b/Testing/Tools/cxxtest/build_tools/SCons/test/printer_propagation/cxxtest/CrazyRunner.h index bdfcfc31f7ebe8a9a96f0dd2d8b0c79da8ba9b74..fbae6c88fe4c55cfdbfba5b3c81bbe63882c5784 100644 --- a/Testing/Tools/cxxtest/build_tools/SCons/test/printer_propagation/cxxtest/CrazyRunner.h +++ b/Testing/Tools/cxxtest/build_tools/SCons/test/printer_propagation/cxxtest/CrazyRunner.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Testing/Tools/cxxtest/build_tools/SCons/test/printer_propagation/src/failtest.t.h b/Testing/Tools/cxxtest/build_tools/SCons/test/printer_propagation/src/failtest.t.h index dddb5c73647c0a4fead14be36291ad6b59b360ce..58c027ad0111d5c17f8013fa696b991c18bc3e51 100644 --- a/Testing/Tools/cxxtest/build_tools/SCons/test/printer_propagation/src/failtest.t.h +++ b/Testing/Tools/cxxtest/build_tools/SCons/test/printer_propagation/src/failtest.t.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Testing/Tools/cxxtest/build_tools/SCons/test/recursive_sources/TestDef.py b/Testing/Tools/cxxtest/build_tools/SCons/test/recursive_sources/TestDef.py index b1c4bf0164916aa47ec199515e6b9b1cef20ce55..ae10317d1a6bae455893c38326d059d3f964c64c 100644 --- a/Testing/Tools/cxxtest/build_tools/SCons/test/recursive_sources/TestDef.py +++ b/Testing/Tools/cxxtest/build_tools/SCons/test/recursive_sources/TestDef.py @@ -1,7 +1,7 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + links = {'cxxtest' : '../../../../'} diff --git a/Testing/Tools/cxxtest/build_tools/SCons/test/recursive_sources/src/requirement.cpp b/Testing/Tools/cxxtest/build_tools/SCons/test/recursive_sources/src/requirement.cpp index be190123fadc611d0e337661a787ef140f95eceb..7af72c7e1ae158d443bd9101c642644727f171ee 100644 --- a/Testing/Tools/cxxtest/build_tools/SCons/test/recursive_sources/src/requirement.cpp +++ b/Testing/Tools/cxxtest/build_tools/SCons/test/recursive_sources/src/requirement.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /** * @file requirement.cpp diff --git a/Testing/Tools/cxxtest/build_tools/SCons/test/recursive_sources/src/requirement.h b/Testing/Tools/cxxtest/build_tools/SCons/test/recursive_sources/src/requirement.h index fba8b73c39df74fa17111eac9bfbf31f7267306f..f174b30a981e9c4f9ef3ccad8fcecab4a27cd971 100644 --- a/Testing/Tools/cxxtest/build_tools/SCons/test/recursive_sources/src/requirement.h +++ b/Testing/Tools/cxxtest/build_tools/SCons/test/recursive_sources/src/requirement.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once /** diff --git a/Testing/Tools/cxxtest/build_tools/SCons/test/recursive_sources/src/test_bar.t.h b/Testing/Tools/cxxtest/build_tools/SCons/test/recursive_sources/src/test_bar.t.h index 0965be32cb5d079c33ac5e7b09081873a7a797ce..5075f6e6775fdd1edb1887251c93488e1f20a585 100644 --- a/Testing/Tools/cxxtest/build_tools/SCons/test/recursive_sources/src/test_bar.t.h +++ b/Testing/Tools/cxxtest/build_tools/SCons/test/recursive_sources/src/test_bar.t.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once /** diff --git a/Testing/Tools/cxxtest/build_tools/SCons/test/recursive_sources/src/test_foo.t.h b/Testing/Tools/cxxtest/build_tools/SCons/test/recursive_sources/src/test_foo.t.h index f05ef8a593cb13602718dbddfff7c19d7dceaba6..5b5ff47efc7d9d77b511e294b9b28f4a15f05de5 100644 --- a/Testing/Tools/cxxtest/build_tools/SCons/test/recursive_sources/src/test_foo.t.h +++ b/Testing/Tools/cxxtest/build_tools/SCons/test/recursive_sources/src/test_foo.t.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once /** diff --git a/Testing/Tools/cxxtest/build_tools/SCons/test/string_cpppath/TestDef.py b/Testing/Tools/cxxtest/build_tools/SCons/test/string_cpppath/TestDef.py index d2cfb75232dfb59fac674e2b49dba356e18ebbc1..ffedf5d542e31f4d22d7833e9c94f5003f02b3cb 100644 --- a/Testing/Tools/cxxtest/build_tools/SCons/test/string_cpppath/TestDef.py +++ b/Testing/Tools/cxxtest/build_tools/SCons/test/string_cpppath/TestDef.py @@ -1,6 +1,6 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + diff --git a/Testing/Tools/cxxtest/build_tools/SCons/test/string_cpppath/src/cpppath.t.h b/Testing/Tools/cxxtest/build_tools/SCons/test/string_cpppath/src/cpppath.t.h index a4b4487bde7af9f37992203e9c3c5950e461f969..d972b86bdbd3104cdfc94ea73613b788565e8e23 100644 --- a/Testing/Tools/cxxtest/build_tools/SCons/test/string_cpppath/src/cpppath.t.h +++ b/Testing/Tools/cxxtest/build_tools/SCons/test/string_cpppath/src/cpppath.t.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Testing/Tools/cxxtest/build_tools/SCons/test/string_cpppath/src/cpppathdir/include.h b/Testing/Tools/cxxtest/build_tools/SCons/test/string_cpppath/src/cpppathdir/include.h index 222c2e3ec87a8c200235242a19934be1535a841e..a489e52264dcbf55e362c97d488ce82bf6ebc03a 100644 --- a/Testing/Tools/cxxtest/build_tools/SCons/test/string_cpppath/src/cpppathdir/include.h +++ b/Testing/Tools/cxxtest/build_tools/SCons/test/string_cpppath/src/cpppathdir/include.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once /** diff --git a/Testing/Tools/cxxtest/build_tools/SCons/test/target_syntax/TestDef.py b/Testing/Tools/cxxtest/build_tools/SCons/test/target_syntax/TestDef.py index d2cfb75232dfb59fac674e2b49dba356e18ebbc1..ffedf5d542e31f4d22d7833e9c94f5003f02b3cb 100644 --- a/Testing/Tools/cxxtest/build_tools/SCons/test/target_syntax/TestDef.py +++ b/Testing/Tools/cxxtest/build_tools/SCons/test/target_syntax/TestDef.py @@ -1,6 +1,6 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + diff --git a/Testing/Tools/cxxtest/build_tools/SCons/test/target_syntax/src/cpppath.t.h b/Testing/Tools/cxxtest/build_tools/SCons/test/target_syntax/src/cpppath.t.h index a4b4487bde7af9f37992203e9c3c5950e461f969..d972b86bdbd3104cdfc94ea73613b788565e8e23 100644 --- a/Testing/Tools/cxxtest/build_tools/SCons/test/target_syntax/src/cpppath.t.h +++ b/Testing/Tools/cxxtest/build_tools/SCons/test/target_syntax/src/cpppath.t.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Testing/Tools/cxxtest/build_tools/SCons/test/target_syntax/src/cpppathdir/include.h b/Testing/Tools/cxxtest/build_tools/SCons/test/target_syntax/src/cpppathdir/include.h index 222c2e3ec87a8c200235242a19934be1535a841e..a489e52264dcbf55e362c97d488ce82bf6ebc03a 100644 --- a/Testing/Tools/cxxtest/build_tools/SCons/test/target_syntax/src/cpppathdir/include.h +++ b/Testing/Tools/cxxtest/build_tools/SCons/test/target_syntax/src/cpppathdir/include.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once /** diff --git a/Testing/Tools/cxxtest/cxxtest/Descriptions.cpp b/Testing/Tools/cxxtest/cxxtest/Descriptions.cpp index dc92f2889c2f63c0f5f134b19721b2c47f40fae0..0a11f0b0f02e40c17ce9587533930943d5f85548 100644 --- a/Testing/Tools/cxxtest/cxxtest/Descriptions.cpp +++ b/Testing/Tools/cxxtest/cxxtest/Descriptions.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #ifndef __cxxtest__Descriptions_cpp__ #define __cxxtest__Descriptions_cpp__ diff --git a/Testing/Tools/cxxtest/cxxtest/Descriptions.h b/Testing/Tools/cxxtest/cxxtest/Descriptions.h index a86e787e0cd490c9598d92891b20ce6a5877f358..3de60f4091046c414446a096778c2abfca1c5dc0 100644 --- a/Testing/Tools/cxxtest/cxxtest/Descriptions.h +++ b/Testing/Tools/cxxtest/cxxtest/Descriptions.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Testing/Tools/cxxtest/cxxtest/DummyDescriptions.cpp b/Testing/Tools/cxxtest/cxxtest/DummyDescriptions.cpp index ae5316eb390ca07402c797e9d6730427bd18d7fd..cd0dde1cc0cc888fc18117b05dfe93536da1c964 100644 --- a/Testing/Tools/cxxtest/cxxtest/DummyDescriptions.cpp +++ b/Testing/Tools/cxxtest/cxxtest/DummyDescriptions.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include <cxxtest/DummyDescriptions.h> diff --git a/Testing/Tools/cxxtest/cxxtest/DummyDescriptions.h b/Testing/Tools/cxxtest/cxxtest/DummyDescriptions.h index 4c4fe5e4d8789dc0e6698bbc0e67e880ce93d89a..d4f4a39df5ac73d57d93576da7d7a4bbdb35b21d 100644 --- a/Testing/Tools/cxxtest/cxxtest/DummyDescriptions.h +++ b/Testing/Tools/cxxtest/cxxtest/DummyDescriptions.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Testing/Tools/cxxtest/cxxtest/ErrorPrinter.h b/Testing/Tools/cxxtest/cxxtest/ErrorPrinter.h index 18a0d7c539bc019b5265a273b090794d5cbfad50..289290747fa0da3e711550a6c9af53003f9b75e0 100644 --- a/Testing/Tools/cxxtest/cxxtest/ErrorPrinter.h +++ b/Testing/Tools/cxxtest/cxxtest/ErrorPrinter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Testing/Tools/cxxtest/cxxtest/GlobalFixture.cpp b/Testing/Tools/cxxtest/cxxtest/GlobalFixture.cpp index 0274fd01f58156db91603ac82ec97f54a013c4a8..686039311146612628a158a83fc7194ca3b82b74 100644 --- a/Testing/Tools/cxxtest/cxxtest/GlobalFixture.cpp +++ b/Testing/Tools/cxxtest/cxxtest/GlobalFixture.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #ifndef __cxxtest__GlobalFixture_cpp__ #define __cxxtest__GlobalFixture_cpp__ diff --git a/Testing/Tools/cxxtest/cxxtest/GlobalFixture.h b/Testing/Tools/cxxtest/cxxtest/GlobalFixture.h index b32bd2e3529e0e99427ee7ad4b727f5ed6c8dd87..cc5bf5dcdd37e9cb2548c9afad6ae0548dba769b 100644 --- a/Testing/Tools/cxxtest/cxxtest/GlobalFixture.h +++ b/Testing/Tools/cxxtest/cxxtest/GlobalFixture.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Testing/Tools/cxxtest/cxxtest/LinkedList.cpp b/Testing/Tools/cxxtest/cxxtest/LinkedList.cpp index e667d6c0bd2b17becf4893ddf4a257a2d86aa305..cd73cd2289ed4f4633daa5d56f020da38c6d75b7 100644 --- a/Testing/Tools/cxxtest/cxxtest/LinkedList.cpp +++ b/Testing/Tools/cxxtest/cxxtest/LinkedList.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #ifndef __cxxtest__LinkedList_cpp__ #define __cxxtest__LinkedList_cpp__ diff --git a/Testing/Tools/cxxtest/cxxtest/LinkedList.h b/Testing/Tools/cxxtest/cxxtest/LinkedList.h index 05a4d7261c83257f7360a0a0681e43acdf5f573a..a126db44a15036ec1441c55614983b5386c49b8f 100644 --- a/Testing/Tools/cxxtest/cxxtest/LinkedList.h +++ b/Testing/Tools/cxxtest/cxxtest/LinkedList.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Testing/Tools/cxxtest/cxxtest/MantidFormatter.h b/Testing/Tools/cxxtest/cxxtest/MantidFormatter.h index 528d97f41472dff13326370b6b2024e1e21a5a42..00389cbc6cc7fbcd3a0ee727992a136a03748922 100644 --- a/Testing/Tools/cxxtest/cxxtest/MantidFormatter.h +++ b/Testing/Tools/cxxtest/cxxtest/MantidFormatter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Testing/Tools/cxxtest/cxxtest/MantidPrinter.h b/Testing/Tools/cxxtest/cxxtest/MantidPrinter.h index 68cbaf44666f694efb2f061a0fd4a8b2aa15556f..e4fdfed17e7bb39aa550d5883ed3d8f4bfdb9b00 100644 --- a/Testing/Tools/cxxtest/cxxtest/MantidPrinter.h +++ b/Testing/Tools/cxxtest/cxxtest/MantidPrinter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Testing/Tools/cxxtest/cxxtest/Mock.h b/Testing/Tools/cxxtest/cxxtest/Mock.h index 537a3407080012fa2142ac2c68c26e2de11ee9b6..158c968375cb54b831b2604d8bd4e09ed2a4108e 100644 --- a/Testing/Tools/cxxtest/cxxtest/Mock.h +++ b/Testing/Tools/cxxtest/cxxtest/Mock.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Testing/Tools/cxxtest/cxxtest/ParenPrinter.h b/Testing/Tools/cxxtest/cxxtest/ParenPrinter.h index 212c2bd03591e13a9a1f14c3bab72258e5fca3a2..b7f5c543a06a6ef4ab01337756d498575b4d9358 100644 --- a/Testing/Tools/cxxtest/cxxtest/ParenPrinter.h +++ b/Testing/Tools/cxxtest/cxxtest/ParenPrinter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Testing/Tools/cxxtest/cxxtest/QtGui.h b/Testing/Tools/cxxtest/cxxtest/QtGui.h index 14d61c5e993da07dd740ea8ec86bdaa8deb807f7..c8b0acba3b4e97acf504dab74757c8214825adaf 100644 --- a/Testing/Tools/cxxtest/cxxtest/QtGui.h +++ b/Testing/Tools/cxxtest/cxxtest/QtGui.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Testing/Tools/cxxtest/cxxtest/RealDescriptions.cpp b/Testing/Tools/cxxtest/cxxtest/RealDescriptions.cpp index 119db891797d0771345514c010f0b1c22c38ee17..0b89b4d0eaed995aab68f2e7655a527c914189d1 100644 --- a/Testing/Tools/cxxtest/cxxtest/RealDescriptions.cpp +++ b/Testing/Tools/cxxtest/cxxtest/RealDescriptions.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #ifndef __cxxtest__RealDescriptions_cpp__ #define __cxxtest__RealDescriptions_cpp__ diff --git a/Testing/Tools/cxxtest/cxxtest/RealDescriptions.h b/Testing/Tools/cxxtest/cxxtest/RealDescriptions.h index 444d14c6ef241d065125ee9fd85f6d0472e14844..460488037b163eb57b59ed9ed9301044efc8c22a 100644 --- a/Testing/Tools/cxxtest/cxxtest/RealDescriptions.h +++ b/Testing/Tools/cxxtest/cxxtest/RealDescriptions.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Testing/Tools/cxxtest/cxxtest/Root.cpp b/Testing/Tools/cxxtest/cxxtest/Root.cpp index da1c2cef4bc8ad60a76eed678dd2311f9685bd57..8dea55c1086205f3f39fb8e5a3f81e0c1f52e968 100644 --- a/Testing/Tools/cxxtest/cxxtest/Root.cpp +++ b/Testing/Tools/cxxtest/cxxtest/Root.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #ifndef __cxxtest__Root_cpp__ #define __cxxtest__Root_cpp__ diff --git a/Testing/Tools/cxxtest/cxxtest/SelfTest.h b/Testing/Tools/cxxtest/cxxtest/SelfTest.h index 258d4d2be12c6f646c8d9d352ada5ad18bcdea27..f2681e1d111af2688e7e3cb6deb5b189ca5e223d 100644 --- a/Testing/Tools/cxxtest/cxxtest/SelfTest.h +++ b/Testing/Tools/cxxtest/cxxtest/SelfTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Testing/Tools/cxxtest/cxxtest/StdHeaders.h b/Testing/Tools/cxxtest/cxxtest/StdHeaders.h index 5a6822e83a9c86259e86386d5b2ead9def20fa43..c213588e0a9624ee6d48ecbb448c36091ae8b642 100644 --- a/Testing/Tools/cxxtest/cxxtest/StdHeaders.h +++ b/Testing/Tools/cxxtest/cxxtest/StdHeaders.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Testing/Tools/cxxtest/cxxtest/StdValueTraits.h b/Testing/Tools/cxxtest/cxxtest/StdValueTraits.h index 9b7b266774e46af9b5b114a2bc701e5190c4d3c4..d0909608415be06df7169b29caf74868dbfa956e 100644 --- a/Testing/Tools/cxxtest/cxxtest/StdValueTraits.h +++ b/Testing/Tools/cxxtest/cxxtest/StdValueTraits.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Testing/Tools/cxxtest/cxxtest/StdioFilePrinter.h b/Testing/Tools/cxxtest/cxxtest/StdioFilePrinter.h index 7ee0ba95d8ec6434d320155e6d5d2c03ac2c69ac..11eef1a19b4144021866cdacc387d6e44194263f 100644 --- a/Testing/Tools/cxxtest/cxxtest/StdioFilePrinter.h +++ b/Testing/Tools/cxxtest/cxxtest/StdioFilePrinter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Testing/Tools/cxxtest/cxxtest/StdioPrinter.h b/Testing/Tools/cxxtest/cxxtest/StdioPrinter.h index 11aa722d2c03efdd1e328271c4b25561cae02836..5bf21e767b732daf3423ec56528553dc37f954b4 100644 --- a/Testing/Tools/cxxtest/cxxtest/StdioPrinter.h +++ b/Testing/Tools/cxxtest/cxxtest/StdioPrinter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Testing/Tools/cxxtest/cxxtest/TeeListener.h b/Testing/Tools/cxxtest/cxxtest/TeeListener.h index 137c8fa0e49b8ac7c5b0629f4b0762e7a5efbb50..b8ff8641e34082ae38ce9c36874f88a1936d56a6 100644 --- a/Testing/Tools/cxxtest/cxxtest/TeeListener.h +++ b/Testing/Tools/cxxtest/cxxtest/TeeListener.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Testing/Tools/cxxtest/cxxtest/TestRunner.h b/Testing/Tools/cxxtest/cxxtest/TestRunner.h index 6c7e84fa2c76cda7d5e0fd861d57d83c661cbeeb..7987c166a779b2dca17ec0cc8f22974baf8acfe1 100644 --- a/Testing/Tools/cxxtest/cxxtest/TestRunner.h +++ b/Testing/Tools/cxxtest/cxxtest/TestRunner.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Testing/Tools/cxxtest/cxxtest/ValueTraits.cpp b/Testing/Tools/cxxtest/cxxtest/ValueTraits.cpp index 06f64c4cddc9ed393069aad9333a61c1fc5b88bc..83793913a9a74989c6f9f26f6e87f1136ed60d19 100644 --- a/Testing/Tools/cxxtest/cxxtest/ValueTraits.cpp +++ b/Testing/Tools/cxxtest/cxxtest/ValueTraits.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #ifndef __cxxtest__ValueTraits_cpp__ #define __cxxtest__ValueTraits_cpp__ diff --git a/Testing/Tools/cxxtest/cxxtest/ValueTraits.h b/Testing/Tools/cxxtest/cxxtest/ValueTraits.h index f449b3f8a4c9085225fb01f580d9cb683ea34566..dcb24cb432b9d44e59368e770dbeef1e9b04b164 100644 --- a/Testing/Tools/cxxtest/cxxtest/ValueTraits.h +++ b/Testing/Tools/cxxtest/cxxtest/ValueTraits.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Testing/Tools/cxxtest/cxxtest/Win32Gui.h b/Testing/Tools/cxxtest/cxxtest/Win32Gui.h index 8b1a7d5bd4187afd6c8976aa9420fc00c911592d..25fba524f6f6a159cc4a5f172dcc8c00f6c5a134 100644 --- a/Testing/Tools/cxxtest/cxxtest/Win32Gui.h +++ b/Testing/Tools/cxxtest/cxxtest/Win32Gui.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Testing/Tools/cxxtest/cxxtest/WrappedTestSuite.h b/Testing/Tools/cxxtest/cxxtest/WrappedTestSuite.h index 55a3742d91dde92abe29f8a5447a836c8e0b9752..9c56687c7f2419067bfd688d1cbea7aa9b4d4d0c 100644 --- a/Testing/Tools/cxxtest/cxxtest/WrappedTestSuite.h +++ b/Testing/Tools/cxxtest/cxxtest/WrappedTestSuite.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Testing/Tools/cxxtest/cxxtest/X11Gui.h b/Testing/Tools/cxxtest/cxxtest/X11Gui.h index 468e6f4cd9837a6814c4167220ea1acc21ad1d2e..ed191c82359f3e441b7dc60d0a7e65fdcc3ecae6 100644 --- a/Testing/Tools/cxxtest/cxxtest/X11Gui.h +++ b/Testing/Tools/cxxtest/cxxtest/X11Gui.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Testing/Tools/cxxtest/cxxtest/YesNoRunner.h b/Testing/Tools/cxxtest/cxxtest/YesNoRunner.h index 874664ab7d62e729f6ca6efb641f59a191bfc3d4..cc3da7179c9998937f1933f8a3e3a0cd4a906ac0 100644 --- a/Testing/Tools/cxxtest/cxxtest/YesNoRunner.h +++ b/Testing/Tools/cxxtest/cxxtest/YesNoRunner.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Testing/Tools/cxxtest/python/cxxtest/__init__.py b/Testing/Tools/cxxtest/python/cxxtest/__init__.py index c0205df734ac57d8a280ec3bb80477d244f57fd7..6f8eacbd412ac25d6c767ac8c9dce0dbfe25293c 100644 --- a/Testing/Tools/cxxtest/python/cxxtest/__init__.py +++ b/Testing/Tools/cxxtest/python/cxxtest/__init__.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + """cxxtest: A Python package that supports the CxxTest test framework for C/C++. diff --git a/Testing/Tools/cxxtest/python/cxxtest/__release__.py b/Testing/Tools/cxxtest/python/cxxtest/__release__.py index 360512b465169f785c2efe757e534185edde8c5a..e7730be8121dbbdea62f7bee21dad879f8d1d1ce 100644 --- a/Testing/Tools/cxxtest/python/cxxtest/__release__.py +++ b/Testing/Tools/cxxtest/python/cxxtest/__release__.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + """ Release Information for cxxtest """ diff --git a/Testing/Tools/cxxtest/python/ez_setup.py b/Testing/Tools/cxxtest/python/ez_setup.py index 4e4593af9384880c4feed4d799e61f091c120ebc..e3c8b490682058c0419d727dd5dad0c36c95c8cf 100755 --- a/Testing/Tools/cxxtest/python/ez_setup.py +++ b/Testing/Tools/cxxtest/python/ez_setup.py @@ -2,8 +2,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + """Bootstrap setuptools installation diff --git a/Testing/Tools/cxxtest/python/setup.py b/Testing/Tools/cxxtest/python/setup.py index 30fd0de07e7904df127a2365ea7212b41916778b..20503db310da6b8e480154382a563d5f99cb6ed2 100644 --- a/Testing/Tools/cxxtest/python/setup.py +++ b/Testing/Tools/cxxtest/python/setup.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + """ Script to generate the installer for cxxtest. diff --git a/Testing/Tools/cxxtest/sample/CreatedTest.h b/Testing/Tools/cxxtest/sample/CreatedTest.h index ca4aa28863080ff6aec736057f914c0540401030..95100e385628c216223d19ceb3a507665c8f316f 100644 --- a/Testing/Tools/cxxtest/sample/CreatedTest.h +++ b/Testing/Tools/cxxtest/sample/CreatedTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Testing/Tools/cxxtest/sample/DeltaTest.h b/Testing/Tools/cxxtest/sample/DeltaTest.h index 226bf0fd0a810c437aad4aa7f34e16bdf416eda8..dddf12cced738199f476058f0a7522a1b0049418 100644 --- a/Testing/Tools/cxxtest/sample/DeltaTest.h +++ b/Testing/Tools/cxxtest/sample/DeltaTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Testing/Tools/cxxtest/sample/EnumTraits.h b/Testing/Tools/cxxtest/sample/EnumTraits.h index 9ced025fef1f5b087dfc7f27c9cbb42d9a155c14..e1179d92dad6d4ea7c57210762f23d70d007686c 100644 --- a/Testing/Tools/cxxtest/sample/EnumTraits.h +++ b/Testing/Tools/cxxtest/sample/EnumTraits.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + // // This is a test of CxxTest's ValueTraits for enumerations. diff --git a/Testing/Tools/cxxtest/sample/ExceptionTest.h b/Testing/Tools/cxxtest/sample/ExceptionTest.h index 4311df1f41a77fe2f97e348c5c8b690aeec8414a..17c9986ebdc5e0f93cb2401ddd212d13fd0672ee 100644 --- a/Testing/Tools/cxxtest/sample/ExceptionTest.h +++ b/Testing/Tools/cxxtest/sample/ExceptionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Testing/Tools/cxxtest/sample/FixtureTest.h b/Testing/Tools/cxxtest/sample/FixtureTest.h index e3043b65c44203aba75372c34f8db9d7e8863315..3ff7994bd6f5d9d7a64aab7849459bb1400ed8cb 100644 --- a/Testing/Tools/cxxtest/sample/FixtureTest.h +++ b/Testing/Tools/cxxtest/sample/FixtureTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Testing/Tools/cxxtest/sample/MessageTest.h b/Testing/Tools/cxxtest/sample/MessageTest.h index 3f3653d84ff335348267913fedc7fcf940d95bf9..b883fce7bc35f8a67cefc790198872347b1db446 100644 --- a/Testing/Tools/cxxtest/sample/MessageTest.h +++ b/Testing/Tools/cxxtest/sample/MessageTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Testing/Tools/cxxtest/sample/SCons/include/stack.h b/Testing/Tools/cxxtest/sample/SCons/include/stack.h index df46dc76b192fe1b75a947fc92eacce647c85cfa..229498ed590fd4b119f00c9ee2c2b67a95c50748 100644 --- a/Testing/Tools/cxxtest/sample/SCons/include/stack.h +++ b/Testing/Tools/cxxtest/sample/SCons/include/stack.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Testing/Tools/cxxtest/sample/SCons/tests/stack_test.h b/Testing/Tools/cxxtest/sample/SCons/tests/stack_test.h index d52e33af8a0f474eedbfd40f069fbaf63fe3c339..9727d58d563df3deb97c4fe6a67490d223664b0a 100644 --- a/Testing/Tools/cxxtest/sample/SCons/tests/stack_test.h +++ b/Testing/Tools/cxxtest/sample/SCons/tests/stack_test.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Testing/Tools/cxxtest/sample/SimpleTest.h b/Testing/Tools/cxxtest/sample/SimpleTest.h index dc526f8fb1b741370cc802364eb36e49088b7c78..775122059f6c5c6ffa66c8e230f8c371fbe23665 100644 --- a/Testing/Tools/cxxtest/sample/SimpleTest.h +++ b/Testing/Tools/cxxtest/sample/SimpleTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Testing/Tools/cxxtest/sample/TraitsTest.h b/Testing/Tools/cxxtest/sample/TraitsTest.h index 4d5cd8a0e52f492d62ead29345ccdd7a85e04fa5..12a95225d353735d3bb5dc3f400b590d95ce3505 100644 --- a/Testing/Tools/cxxtest/sample/TraitsTest.h +++ b/Testing/Tools/cxxtest/sample/TraitsTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Testing/Tools/cxxtest/sample/gui/GreenYellowRed.h b/Testing/Tools/cxxtest/sample/gui/GreenYellowRed.h index 3ac8ae92858b6eb5a473587a9869c81169e008e1..999f9e9522bbe548d9fc53b868b6a433bd546b9f 100644 --- a/Testing/Tools/cxxtest/sample/gui/GreenYellowRed.h +++ b/Testing/Tools/cxxtest/sample/gui/GreenYellowRed.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include <cxxtest/TestSuite.h> diff --git a/Testing/Tools/cxxtest/sample/mock/Dice.cpp b/Testing/Tools/cxxtest/sample/mock/Dice.cpp index 6640ff8758acca7a71085af6e52bf800bc3d53dd..1e3900957e2f300a9cd48a02b898b91004a505e5 100644 --- a/Testing/Tools/cxxtest/sample/mock/Dice.cpp +++ b/Testing/Tools/cxxtest/sample/mock/Dice.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include <T/stdlib.h> #include "Dice.h" diff --git a/Testing/Tools/cxxtest/sample/mock/Dice.h b/Testing/Tools/cxxtest/sample/mock/Dice.h index cfe3ea425fd8c298acfe816b826b92ea8c2c0a66..6026172f591ec88d090f40cac127c2769728a88c 100644 --- a/Testing/Tools/cxxtest/sample/mock/Dice.h +++ b/Testing/Tools/cxxtest/sample/mock/Dice.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Testing/Tools/cxxtest/sample/mock/MockStdlib.h b/Testing/Tools/cxxtest/sample/mock/MockStdlib.h index 5091152053e3b48891eeb00e38c539cad02ea1c4..0375f728dbf647ecb8c8f4f1c2f57d863b78fe58 100644 --- a/Testing/Tools/cxxtest/sample/mock/MockStdlib.h +++ b/Testing/Tools/cxxtest/sample/mock/MockStdlib.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include <T/stdlib.h> diff --git a/Testing/Tools/cxxtest/sample/mock/T/stdlib.h b/Testing/Tools/cxxtest/sample/mock/T/stdlib.h index fd4f033debd7d1fa4b3cdaf2353ca1d88ca4f621..5a2c830f8482108a2f708ce0196713b64f116b84 100644 --- a/Testing/Tools/cxxtest/sample/mock/T/stdlib.h +++ b/Testing/Tools/cxxtest/sample/mock/T/stdlib.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Testing/Tools/cxxtest/sample/mock/TestDice.h b/Testing/Tools/cxxtest/sample/mock/TestDice.h index a817c6ecfacb257d155c3722381737d25e0b8570..b457636ad16e884236e5a1ff9d8e335fa1e3cbde 100644 --- a/Testing/Tools/cxxtest/sample/mock/TestDice.h +++ b/Testing/Tools/cxxtest/sample/mock/TestDice.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include <cxxtest/TestSuite.h> #include "Dice.h" diff --git a/Testing/Tools/cxxtest/sample/mock/mock_stdlib.cpp b/Testing/Tools/cxxtest/sample/mock/mock_stdlib.cpp index 0d8e6a633c00ac0b2533c5d97bbf02ec4e542b8d..bc890ba490098ad2180d465bea1446dad1b22552 100644 --- a/Testing/Tools/cxxtest/sample/mock/mock_stdlib.cpp +++ b/Testing/Tools/cxxtest/sample/mock/mock_stdlib.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #define CXXTEST_MOCK_TEST_SOURCE_FILE #include <T/stdlib.h> diff --git a/Testing/Tools/cxxtest/sample/mock/real_stdlib.cpp b/Testing/Tools/cxxtest/sample/mock/real_stdlib.cpp index 61bf60597151d3846aa7651d89f52414a292243b..1a00a5e0fa0d295a8a757319c5d6bbdbcff81fe4 100644 --- a/Testing/Tools/cxxtest/sample/mock/real_stdlib.cpp +++ b/Testing/Tools/cxxtest/sample/mock/real_stdlib.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #define CXXTEST_MOCK_REAL_SOURCE_FILE #include <T/stdlib.h> diff --git a/Testing/Tools/cxxtest/sample/mock/roll.cpp b/Testing/Tools/cxxtest/sample/mock/roll.cpp index 58b189b120e9fa8534cdc8d70c2f662f5990a300..ab68506366a1f0be623a7a7baae78f2277f827e1 100644 --- a/Testing/Tools/cxxtest/sample/mock/roll.cpp +++ b/Testing/Tools/cxxtest/sample/mock/roll.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include <stdio.h> #include "Dice.h" diff --git a/Testing/Tools/cxxtest/sample/yes_no_runner.cpp b/Testing/Tools/cxxtest/sample/yes_no_runner.cpp index c9da618eae0c1ad1cc8c7e43c04d9a645713ade0..5b338f2ac4e6e96207e7986d641b2e8f1be1e428 100644 --- a/Testing/Tools/cxxtest/sample/yes_no_runner.cpp +++ b/Testing/Tools/cxxtest/sample/yes_no_runner.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + // // A sample program that uses class YesNoRunner to run all the tests diff --git a/Testing/Tools/cxxtest/test/AborterNoThrow.h b/Testing/Tools/cxxtest/test/AborterNoThrow.h index c1e50e30ff61e094159dacfc9efe4ea46cd70a88..a7e3d08cf086b92b04b1f1712962ab890d052cf8 100644 --- a/Testing/Tools/cxxtest/test/AborterNoThrow.h +++ b/Testing/Tools/cxxtest/test/AborterNoThrow.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include <cxxtest/TestSuite.h> diff --git a/Testing/Tools/cxxtest/test/BadTest.h b/Testing/Tools/cxxtest/test/BadTest.h index e68112d0c918a53d808501cab1470f14c8873b70..5cc4642e23462217e91ba2544824c36ad5d5f8c4 100644 --- a/Testing/Tools/cxxtest/test/BadTest.h +++ b/Testing/Tools/cxxtest/test/BadTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include <cxxtest/TestSuite.h> diff --git a/Testing/Tools/cxxtest/test/Comments.h b/Testing/Tools/cxxtest/test/Comments.h index 8c25bf127cef41a1cba74bb7885acd233bebb93f..f5f8ce3133e3ada096612f35501f5742dd67ba95 100644 --- a/Testing/Tools/cxxtest/test/Comments.h +++ b/Testing/Tools/cxxtest/test/Comments.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include <cxxtest/TestSuite.h> diff --git a/Testing/Tools/cxxtest/test/DeepAbort.h b/Testing/Tools/cxxtest/test/DeepAbort.h index e0ed09e0e89fcac1413cc0d598fb81a951d393b5..ae092bfc8b964bf374a624ea918b42c4c7cb78f2 100644 --- a/Testing/Tools/cxxtest/test/DeepAbort.h +++ b/Testing/Tools/cxxtest/test/DeepAbort.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include <cxxtest/TestSuite.h> diff --git a/Testing/Tools/cxxtest/test/DefaultAbort.h b/Testing/Tools/cxxtest/test/DefaultAbort.h index 980dcf55da9fb6e1eaa84f122cd9fb2cb1cd5c23..587e500c56291e3aaf73abbffe5ef152c9973480 100644 --- a/Testing/Tools/cxxtest/test/DefaultAbort.h +++ b/Testing/Tools/cxxtest/test/DefaultAbort.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #define CXXTEST_HAVE_EH #define CXXTEST_ABORT_TEST_ON_FAIL diff --git a/Testing/Tools/cxxtest/test/DefaultTraits.h b/Testing/Tools/cxxtest/test/DefaultTraits.h index 32432ec3cf239476b31d2b45041261cd2de4cfca..1917df991a6857f75d585f162636c436c63ed121 100644 --- a/Testing/Tools/cxxtest/test/DefaultTraits.h +++ b/Testing/Tools/cxxtest/test/DefaultTraits.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include <cxxtest/TestSuite.h> diff --git a/Testing/Tools/cxxtest/test/DoubleCall.h b/Testing/Tools/cxxtest/test/DoubleCall.h index d4a75bb071e78b9c43691a5355b004d0913a3772..5255fed60ec1a53261babad9855d0fe6c586c736 100644 --- a/Testing/Tools/cxxtest/test/DoubleCall.h +++ b/Testing/Tools/cxxtest/test/DoubleCall.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include <cxxtest/TestSuite.h> diff --git a/Testing/Tools/cxxtest/test/DynamicAbort.h b/Testing/Tools/cxxtest/test/DynamicAbort.h index 5d3898d9c711b24f18969dfbc727dba8e71ea54d..a2b7f8f35443f6a7f22d2a9a4a4a949fa440a00f 100644 --- a/Testing/Tools/cxxtest/test/DynamicAbort.h +++ b/Testing/Tools/cxxtest/test/DynamicAbort.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include <cxxtest/TestSuite.h> diff --git a/Testing/Tools/cxxtest/test/DynamicMax.h b/Testing/Tools/cxxtest/test/DynamicMax.h index cba478d6d8e19d8e3194b122ac75f4c0f790f048..78aa4cb931999c80bc47400eef2b4d312d86b98f 100644 --- a/Testing/Tools/cxxtest/test/DynamicMax.h +++ b/Testing/Tools/cxxtest/test/DynamicMax.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include <cxxtest/TestSuite.h> diff --git a/Testing/Tools/cxxtest/test/EmptySuite.h b/Testing/Tools/cxxtest/test/EmptySuite.h index 2e942e62cd39b1420857a284ed9d80e33cc5bfa9..25790ee16dee60926337dcf7005d4bafe728b5f9 100644 --- a/Testing/Tools/cxxtest/test/EmptySuite.h +++ b/Testing/Tools/cxxtest/test/EmptySuite.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include <cxxtest/TestSuite.h> diff --git a/Testing/Tools/cxxtest/test/Exceptions.h b/Testing/Tools/cxxtest/test/Exceptions.h index 49339b16b50dc66fbd3889976e84296b03cac340..e92bd88f0afa0f29d0bec1495a73b738096b31dc 100644 --- a/Testing/Tools/cxxtest/test/Exceptions.h +++ b/Testing/Tools/cxxtest/test/Exceptions.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include <cxxtest/TestSuite.h> diff --git a/Testing/Tools/cxxtest/test/Factor.h b/Testing/Tools/cxxtest/test/Factor.h index a9eac4f68d8f119d259f6ad75d37da2afec1f82d..88ca18bd1bb2400049c8a27574573a4603b919ac 100644 --- a/Testing/Tools/cxxtest/test/Factor.h +++ b/Testing/Tools/cxxtest/test/Factor.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + // // This file is used to test WorldDescription::strTotalTests() diff --git a/Testing/Tools/cxxtest/test/ForceNoEh.h b/Testing/Tools/cxxtest/test/ForceNoEh.h index 6f40281d863198d90008e2808b4655426edaced5..55d864e61561f699c6a77cfd6e52667ab6e6abcc 100644 --- a/Testing/Tools/cxxtest/test/ForceNoEh.h +++ b/Testing/Tools/cxxtest/test/ForceNoEh.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include <cxxtest/TestSuite.h> diff --git a/Testing/Tools/cxxtest/test/GfSetUpFails.h b/Testing/Tools/cxxtest/test/GfSetUpFails.h index ae684c53510b5081ea34b9979213b8faa2de3ada..88041b6dd856056167710880a707dd59bad992cf 100644 --- a/Testing/Tools/cxxtest/test/GfSetUpFails.h +++ b/Testing/Tools/cxxtest/test/GfSetUpFails.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + // // This file tests what happens when GlobalFixture::setUp() fails diff --git a/Testing/Tools/cxxtest/test/GfSetUpThrows.h b/Testing/Tools/cxxtest/test/GfSetUpThrows.h index df10b8d1c194695da67f66d280eb3e5a1a0827a5..240356e0ce0c8e3c6d4f7a7d96cdb4990e491e4a 100644 --- a/Testing/Tools/cxxtest/test/GfSetUpThrows.h +++ b/Testing/Tools/cxxtest/test/GfSetUpThrows.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + // // This file tests what happens when GlobalFixture::setUp() throws diff --git a/Testing/Tools/cxxtest/test/GfTearDownFails.h b/Testing/Tools/cxxtest/test/GfTearDownFails.h index 453cdd6884a6385b6eaa806475823d8be4f5abea..c8fb28bcf1985eb973585af2340c05a797f3cfc9 100644 --- a/Testing/Tools/cxxtest/test/GfTearDownFails.h +++ b/Testing/Tools/cxxtest/test/GfTearDownFails.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + // // This file tests what happens when GlobalFixture::tearDown() fails diff --git a/Testing/Tools/cxxtest/test/GfTearDownThrows.h b/Testing/Tools/cxxtest/test/GfTearDownThrows.h index 525e7bf44f20c51c0cf71991ac660118abac7137..23680beaa67e387bd5ffbaf5ac629198b74d5e3d 100644 --- a/Testing/Tools/cxxtest/test/GfTearDownThrows.h +++ b/Testing/Tools/cxxtest/test/GfTearDownThrows.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + // // This file tests what happens when GlobalFixture::tearDown() throws diff --git a/Testing/Tools/cxxtest/test/GlobalFixtures.h b/Testing/Tools/cxxtest/test/GlobalFixtures.h index 964f89dec829b95d17aef43ef4c6033e0f31302e..f27429f2f5c9e8da2e001926a166d3ba4ea91fce 100644 --- a/Testing/Tools/cxxtest/test/GlobalFixtures.h +++ b/Testing/Tools/cxxtest/test/GlobalFixtures.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + // // This file tests CxxTest global fixtures diff --git a/Testing/Tools/cxxtest/test/GoodSuite.h b/Testing/Tools/cxxtest/test/GoodSuite.h index 37e4ac5a78a5a7355543b182c474aa9d36acab92..2f1fdd3452ada3f6898acf76700b2b5dbbc54753 100644 --- a/Testing/Tools/cxxtest/test/GoodSuite.h +++ b/Testing/Tools/cxxtest/test/GoodSuite.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include <cxxtest/TestSuite.h> #include <math.h> diff --git a/Testing/Tools/cxxtest/test/GuiWait.h b/Testing/Tools/cxxtest/test/GuiWait.h index e5e162cccb7beacc9d062e13b6051fc273d520f0..1ee8a4c75040370ef42bb856825c631296e82222 100644 --- a/Testing/Tools/cxxtest/test/GuiWait.h +++ b/Testing/Tools/cxxtest/test/GuiWait.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Testing/Tools/cxxtest/test/HaveStd.h b/Testing/Tools/cxxtest/test/HaveStd.h index 9db6011622bab6a2c78b0faa1e4850853f6ae234..235b6e468f854ecb3e7c9615431c76e3b2b16f0f 100644 --- a/Testing/Tools/cxxtest/test/HaveStd.h +++ b/Testing/Tools/cxxtest/test/HaveStd.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include <cxxtest/TestSuite.h> diff --git a/Testing/Tools/cxxtest/test/IncludeTest.h b/Testing/Tools/cxxtest/test/IncludeTest.h index dc362745ab058c85aac4ed397a9a71296863b44c..f6f4a27f757469e717d480442f288e3946a3e520 100644 --- a/Testing/Tools/cxxtest/test/IncludeTest.h +++ b/Testing/Tools/cxxtest/test/IncludeTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include <cxxtest/TestSuite.h> diff --git a/Testing/Tools/cxxtest/test/Int64.h b/Testing/Tools/cxxtest/test/Int64.h index 37f71409073f6a83ab1f8435b647e4a109abfe25..d08e4204de2c173af2518b224f161417a19ab79f 100644 --- a/Testing/Tools/cxxtest/test/Int64.h +++ b/Testing/Tools/cxxtest/test/Int64.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include <cxxtest/TestSuite.h> diff --git a/Testing/Tools/cxxtest/test/LessThanEquals.h b/Testing/Tools/cxxtest/test/LessThanEquals.h index 4d2b166e4f4dea7ac29732438be2125bdcee44b4..685a016a2a84eada8d0d6643a578a2a4d420de0c 100644 --- a/Testing/Tools/cxxtest/test/LessThanEquals.h +++ b/Testing/Tools/cxxtest/test/LessThanEquals.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include <cxxtest/TestSuite.h> diff --git a/Testing/Tools/cxxtest/test/LongLong.h b/Testing/Tools/cxxtest/test/LongLong.h index 2ed84a17671594040c5ef99c830a86ab2e5a8e06..e60885570d285b6b6371b146e862705f8b3b5cde 100644 --- a/Testing/Tools/cxxtest/test/LongLong.h +++ b/Testing/Tools/cxxtest/test/LongLong.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include <cxxtest/TestSuite.h> diff --git a/Testing/Tools/cxxtest/test/LongTraits.h b/Testing/Tools/cxxtest/test/LongTraits.h index 318a94250d431d195802f8b097c927a541fe1de5..a18d800af24607e5c5535425ff2bb18681e64586 100644 --- a/Testing/Tools/cxxtest/test/LongTraits.h +++ b/Testing/Tools/cxxtest/test/LongTraits.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + // // This include file is used to test the --include option diff --git a/Testing/Tools/cxxtest/test/MaxDump.h b/Testing/Tools/cxxtest/test/MaxDump.h index 695a58d658095a55974d1f7cda53106ccb58f01f..eb227ce11daacac69effc7820e17f0f1d1d12af1 100644 --- a/Testing/Tools/cxxtest/test/MaxDump.h +++ b/Testing/Tools/cxxtest/test/MaxDump.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + // // CXXTEST_MAX_DUMP_SIZE is the maximum number of bytes to dump in TS_ASSERT_SAME_DATA diff --git a/Testing/Tools/cxxtest/test/MockTest.h b/Testing/Tools/cxxtest/test/MockTest.h index e887bb6d16b3595ad58f576a681c0278fbbb63ae..276a6714bf11b81900e5990c93ebb846da6d8d49 100644 --- a/Testing/Tools/cxxtest/test/MockTest.h +++ b/Testing/Tools/cxxtest/test/MockTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + // // This is a test of CxxTest's Mock framework (not a mock test). diff --git a/Testing/Tools/cxxtest/test/NoEh.h b/Testing/Tools/cxxtest/test/NoEh.h index a3e344f0adb0d1d304b302c6880874289ab75901..c61a9104ccd4270c414dd7e10c39a7c34da89caf 100644 --- a/Testing/Tools/cxxtest/test/NoEh.h +++ b/Testing/Tools/cxxtest/test/NoEh.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include <cxxtest/TestSuite.h> diff --git a/Testing/Tools/cxxtest/test/Part1.h b/Testing/Tools/cxxtest/test/Part1.h index ff04fdb787bc118d2d196c041d7485b826cd1ead..60cbc884beabadc0f880bc76e9240476b41cc4e5 100644 --- a/Testing/Tools/cxxtest/test/Part1.h +++ b/Testing/Tools/cxxtest/test/Part1.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include <cxxtest/TestSuite.h> diff --git a/Testing/Tools/cxxtest/test/Part2.h b/Testing/Tools/cxxtest/test/Part2.h index 746a3c716e3c3d2680053c5c78a8feb5b8f48738..9cab605ef2c456cd9462e18ea50fdaec12b26603 100644 --- a/Testing/Tools/cxxtest/test/Part2.h +++ b/Testing/Tools/cxxtest/test/Part2.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include <cxxtest/TestSuite.h> diff --git a/Testing/Tools/cxxtest/test/Relation.h b/Testing/Tools/cxxtest/test/Relation.h index 285eb2c10ffb2811c4ce78fb5a8ab073974df453..ef1272f9681f67193c654e4ceb1140675ce75a55 100644 --- a/Testing/Tools/cxxtest/test/Relation.h +++ b/Testing/Tools/cxxtest/test/Relation.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include <cxxtest/TestSuite.h> diff --git a/Testing/Tools/cxxtest/test/SameData.h b/Testing/Tools/cxxtest/test/SameData.h index 2874fcbbfe7c13e8e45664200dc00a8b74ad15e1..7eb52f335f912e2152701c0372fdfc0a92c07d19 100644 --- a/Testing/Tools/cxxtest/test/SameData.h +++ b/Testing/Tools/cxxtest/test/SameData.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include <cxxtest/TestSuite.h> diff --git a/Testing/Tools/cxxtest/test/SameZero.h b/Testing/Tools/cxxtest/test/SameZero.h index 7f35351c6d906f02a0f70319efeca3d312a34add..b05619b96ac956170db7454e2ae1b718aeadb129 100644 --- a/Testing/Tools/cxxtest/test/SameZero.h +++ b/Testing/Tools/cxxtest/test/SameZero.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include <cxxtest/TestSuite.h> diff --git a/Testing/Tools/cxxtest/test/SetUpWorldFails.h b/Testing/Tools/cxxtest/test/SetUpWorldFails.h index 7a2b5b39851da70febe49b8751e0d4e1258ce5a8..5e2e09e4a70201f6e2da13bd8af8b983f29c1fe8 100644 --- a/Testing/Tools/cxxtest/test/SetUpWorldFails.h +++ b/Testing/Tools/cxxtest/test/SetUpWorldFails.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + // // This file tests what happens when setUpWorld() fails diff --git a/Testing/Tools/cxxtest/test/SetUpWorldThrows.h b/Testing/Tools/cxxtest/test/SetUpWorldThrows.h index 1aabdd01f204cecf010106363af86ff32b5ecb9b..a0ec87de126426d486f83b9d3ae279c507d027e3 100644 --- a/Testing/Tools/cxxtest/test/SetUpWorldThrows.h +++ b/Testing/Tools/cxxtest/test/SetUpWorldThrows.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + // // This file tests what happens when setUpWorld() throws an exception diff --git a/Testing/Tools/cxxtest/test/Something.h b/Testing/Tools/cxxtest/test/Something.h index ccd89c2e9117c875a99810c5c97a6b2002e6d826..40c2bddffe3f86c0f25fa80d3e7d8669f0e39572 100644 --- a/Testing/Tools/cxxtest/test/Something.h +++ b/Testing/Tools/cxxtest/test/Something.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include <string> diff --git a/Testing/Tools/cxxtest/test/StlTraits.h b/Testing/Tools/cxxtest/test/StlTraits.h index b8645c8c26af2dc26c80b6273ad49246be7719c8..7453042369c1ce08e2decf08667d3394dd597566 100644 --- a/Testing/Tools/cxxtest/test/StlTraits.h +++ b/Testing/Tools/cxxtest/test/StlTraits.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include <cxxtest/TestSuite.h> diff --git a/Testing/Tools/cxxtest/test/TearDownWorldFails.h b/Testing/Tools/cxxtest/test/TearDownWorldFails.h index 99d25f9e56f9595ba1811ee20e727c008d175e46..46404b52bd120a92552e58642b7c163cdfdac4a5 100644 --- a/Testing/Tools/cxxtest/test/TearDownWorldFails.h +++ b/Testing/Tools/cxxtest/test/TearDownWorldFails.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + // // This file tests what happens when GlobalFixture::tearDownWorld() fails diff --git a/Testing/Tools/cxxtest/test/TearDownWorldThrows.h b/Testing/Tools/cxxtest/test/TearDownWorldThrows.h index 0ff323122a3e39e4948c9d837860d46205a8cbdf..ac9e0ebd523efdbaeccc3e8105866e64054d6bf3 100644 --- a/Testing/Tools/cxxtest/test/TearDownWorldThrows.h +++ b/Testing/Tools/cxxtest/test/TearDownWorldThrows.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + // // This file tests what happens when GlobalFixture::tearDownWorld() throws diff --git a/Testing/Tools/cxxtest/test/ThrowNoStd.h b/Testing/Tools/cxxtest/test/ThrowNoStd.h index fe8b512a3a6096eb8c4eb9ad03099c8435f5e1e3..1a50ac38abaa89524ac14ea58d3e6d8b3e83655f 100644 --- a/Testing/Tools/cxxtest/test/ThrowNoStd.h +++ b/Testing/Tools/cxxtest/test/ThrowNoStd.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include <cxxtest/TestSuite.h> diff --git a/Testing/Tools/cxxtest/test/ThrowsAssert.h b/Testing/Tools/cxxtest/test/ThrowsAssert.h index 71f2f75d62f36a5fe95b6563e07d23c998c8f797..20de24f6702e3d6143c009ddee91e59ead7e87b9 100644 --- a/Testing/Tools/cxxtest/test/ThrowsAssert.h +++ b/Testing/Tools/cxxtest/test/ThrowsAssert.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include <cxxtest/TestSuite.h> diff --git a/Testing/Tools/cxxtest/test/TraitsTest.h b/Testing/Tools/cxxtest/test/TraitsTest.h index 58179d7103b7a107f86f50fa3f517bcb106a92d8..ee6c9a78d353a4d7f5de8c067ab796d29b4d9ebc 100644 --- a/Testing/Tools/cxxtest/test/TraitsTest.h +++ b/Testing/Tools/cxxtest/test/TraitsTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #define CXXTEST_HAVE_STD #include <cxxtest/TestSuite.h> diff --git a/Testing/Tools/cxxtest/test/Tsm.h b/Testing/Tools/cxxtest/test/Tsm.h index 442206c64c9bf362188507e505b26c3992041666..f7eb5647974b900403511fe5b7f82a5d3a19ebab 100644 --- a/Testing/Tools/cxxtest/test/Tsm.h +++ b/Testing/Tools/cxxtest/test/Tsm.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include <cxxtest/TestSuite.h> diff --git a/Testing/Tools/cxxtest/test/UserTraits.h b/Testing/Tools/cxxtest/test/UserTraits.h index 835773a624e2b459ae34636bbaeeb663dc883755..3435ec3eedcb5cc260cebfa4ca1af1386c7c9277 100644 --- a/Testing/Tools/cxxtest/test/UserTraits.h +++ b/Testing/Tools/cxxtest/test/UserTraits.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + // // This sample demonstrates rolling your own ValueTraits. diff --git a/Testing/Tools/cxxtest/test/VoidTraits.h b/Testing/Tools/cxxtest/test/VoidTraits.h index 1eba309917b0cbfc97c259bb82c2717dfbb2292e..a6aabf42361d73e531c19dd619769861362437d8 100644 --- a/Testing/Tools/cxxtest/test/VoidTraits.h +++ b/Testing/Tools/cxxtest/test/VoidTraits.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + // // This include file is used to test the --include option diff --git a/Testing/Tools/cxxtest/test/WideCharTest.h b/Testing/Tools/cxxtest/test/WideCharTest.h index 52d1e87e05a7bd5f56e303f970a40d300dfad5da..da64be087bc1a3cf3594edad8cf833521b9c4f37 100644 --- a/Testing/Tools/cxxtest/test/WideCharTest.h +++ b/Testing/Tools/cxxtest/test/WideCharTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #define CXXTEST_HAVE_STD #include <cxxtest/TestSuite.h> diff --git a/Testing/Tools/cxxtest/test/WorldFixtures.h b/Testing/Tools/cxxtest/test/WorldFixtures.h index 5f4bd8e7b8cf3ba9cdcc19986ab72a848b431028..2a68356287d80794ae00be71c709aed01b2967f5 100644 --- a/Testing/Tools/cxxtest/test/WorldFixtures.h +++ b/Testing/Tools/cxxtest/test/WorldFixtures.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + // // This file tests CxxTest global fixtures setUpWorld()/tearDownWorld() diff --git a/Testing/Tools/cxxtest/test/anything.cpp b/Testing/Tools/cxxtest/test/anything.cpp index 70dc141f62265802046c9974c3b3a04b9af2f4a8..adb00b3285d6243ca61c2b49af08566018fbacb4 100644 --- a/Testing/Tools/cxxtest/test/anything.cpp +++ b/Testing/Tools/cxxtest/test/anything.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + // This simple source file is just used to verify that the compiler works diff --git a/Testing/Tools/cxxtest/test/cxxtest/DummyGui.h b/Testing/Tools/cxxtest/test/cxxtest/DummyGui.h index 70f0068e6997401484b60aad947e34df40adbb9f..03bd976671fea5f85e431c840c8566b59d5ab4ea 100644 --- a/Testing/Tools/cxxtest/test/cxxtest/DummyGui.h +++ b/Testing/Tools/cxxtest/test/cxxtest/DummyGui.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Testing/Tools/cxxtest/test/fake/X11/Xlib.h b/Testing/Tools/cxxtest/test/fake/X11/Xlib.h index 509bc5c5153235c94b12012c15a9eee493c2b7f9..d5a8ab26441df0cb88db3f1ea63e15e8bea8eefd 100644 --- a/Testing/Tools/cxxtest/test/fake/X11/Xlib.h +++ b/Testing/Tools/cxxtest/test/fake/X11/Xlib.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + // Fake Xlib.h diff --git a/Testing/Tools/cxxtest/test/fake/X11/Xutil.h b/Testing/Tools/cxxtest/test/fake/X11/Xutil.h index e5ef7851c19c347e05b15d9080bb7a879a7bc149..1592ca0e60482b541a134760788db4805997c8b3 100644 --- a/Testing/Tools/cxxtest/test/fake/X11/Xutil.h +++ b/Testing/Tools/cxxtest/test/fake/X11/Xutil.h @@ -1,7 +1,7 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + // Fake Xutil.h diff --git a/Testing/Tools/cxxtest/test/fake/commctrl.h b/Testing/Tools/cxxtest/test/fake/commctrl.h index 5cfd4ae1261cd28354dedbb7d91c7f3c30bcdfe0..7ad38546172c77c85e701ad49ce5cfb351361a50 100644 --- a/Testing/Tools/cxxtest/test/fake/commctrl.h +++ b/Testing/Tools/cxxtest/test/fake/commctrl.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Testing/Tools/cxxtest/test/fake/qapplication.h b/Testing/Tools/cxxtest/test/fake/qapplication.h index 0d3f51bc5254e1a91b8851d50513f6a915eb827c..37c88ad939ac1dec2d34c2d86d9422eaba6d0a99 100644 --- a/Testing/Tools/cxxtest/test/fake/qapplication.h +++ b/Testing/Tools/cxxtest/test/fake/qapplication.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + // fake QApplication diff --git a/Testing/Tools/cxxtest/test/fake/qglobal.h b/Testing/Tools/cxxtest/test/fake/qglobal.h index b1979f81a3bfff2a0dbd44f795aba4b9a217484f..ceef402bdcea1ee381d5055cf9eabf4561ad43dd 100644 --- a/Testing/Tools/cxxtest/test/fake/qglobal.h +++ b/Testing/Tools/cxxtest/test/fake/qglobal.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + // fake qglobal.h #define QT_VERSION 0x030000 diff --git a/Testing/Tools/cxxtest/test/fake/qlabel.h b/Testing/Tools/cxxtest/test/fake/qlabel.h index d82afe3a84b9acfeae5409f9b0c90368b87f8f0e..5cfb9b9e0064338941d92f27d557f1ddba6ba9b8 100644 --- a/Testing/Tools/cxxtest/test/fake/qlabel.h +++ b/Testing/Tools/cxxtest/test/fake/qlabel.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + // fake QLabel #include <qstring.h> diff --git a/Testing/Tools/cxxtest/test/fake/qlayout.h b/Testing/Tools/cxxtest/test/fake/qlayout.h index 9910aed7815c45191cf6ff1bf4355c418ef2877c..2090c8234b91802b1db04821d723a3c29ee02011 100644 --- a/Testing/Tools/cxxtest/test/fake/qlayout.h +++ b/Testing/Tools/cxxtest/test/fake/qlayout.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + // fake qlayout.h diff --git a/Testing/Tools/cxxtest/test/fake/qmessagebox.h b/Testing/Tools/cxxtest/test/fake/qmessagebox.h index c7b72aca264875327a59fbdcaa6066aa37e602a5..19493538b6f0c405325941f36df6caa5cba04bb2 100644 --- a/Testing/Tools/cxxtest/test/fake/qmessagebox.h +++ b/Testing/Tools/cxxtest/test/fake/qmessagebox.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + // fake qmessagebox.h diff --git a/Testing/Tools/cxxtest/test/fake/qpixmap.h b/Testing/Tools/cxxtest/test/fake/qpixmap.h index db2890a7cae4ff1419ecc424bebe1426da5a7ddb..39bf03e02c4b5c43e97154d6db3ac803a92685e6 100644 --- a/Testing/Tools/cxxtest/test/fake/qpixmap.h +++ b/Testing/Tools/cxxtest/test/fake/qpixmap.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + // fake qpixmap.h diff --git a/Testing/Tools/cxxtest/test/fake/qprogressbar.h b/Testing/Tools/cxxtest/test/fake/qprogressbar.h index 9b1d13876e12ffdac06489f12358c49892e6cc64..25b4925f5de926700cc1ba7ae11287848a764d12 100644 --- a/Testing/Tools/cxxtest/test/fake/qprogressbar.h +++ b/Testing/Tools/cxxtest/test/fake/qprogressbar.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + // fake qprogressbar.h diff --git a/Testing/Tools/cxxtest/test/fake/qstatusbar.h b/Testing/Tools/cxxtest/test/fake/qstatusbar.h index f595bc7e0bd334d297e2396fbb454b072c72770d..83a33de0693b6432c2653075a67a1411a56760db 100644 --- a/Testing/Tools/cxxtest/test/fake/qstatusbar.h +++ b/Testing/Tools/cxxtest/test/fake/qstatusbar.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + // fake qstatusbar.h diff --git a/Testing/Tools/cxxtest/test/fake/qstring.h b/Testing/Tools/cxxtest/test/fake/qstring.h index fb5fe691fb64aae7f11af271c5ca2867b6127db9..a8f9b6ce7a56d98da8d60e104b245760199c9c5c 100644 --- a/Testing/Tools/cxxtest/test/fake/qstring.h +++ b/Testing/Tools/cxxtest/test/fake/qstring.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + // fake qstring.h #pragma once diff --git a/Testing/Tools/cxxtest/test/fake/qwidget.h b/Testing/Tools/cxxtest/test/fake/qwidget.h index 4462f9bc9c17d23c1ef0f281e7b0921b3bcfedfc..2c4bdca110067b6ebb40923802c49640bbf8949e 100644 --- a/Testing/Tools/cxxtest/test/fake/qwidget.h +++ b/Testing/Tools/cxxtest/test/fake/qwidget.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + // fake qwidget.h #pragma once diff --git a/Testing/Tools/cxxtest/test/fake/windows.h b/Testing/Tools/cxxtest/test/fake/windows.h index fb87c5d01c2b96c8707e4b174de123fe1b7ca8ab..141a28926549dd8f993a27f5044b389fe33df23e 100644 --- a/Testing/Tools/cxxtest/test/fake/windows.h +++ b/Testing/Tools/cxxtest/test/fake/windows.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Testing/Tools/cxxtest/test/int64.cpp b/Testing/Tools/cxxtest/test/int64.cpp index 24b06d932251f631bcdf8d27314f5baf8c052625..bdc7d623a5a93ecd6c6d6a23a317e10252155210 100644 --- a/Testing/Tools/cxxtest/test/int64.cpp +++ b/Testing/Tools/cxxtest/test/int64.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + // // This program is used to check if the compiler supports __int64 diff --git a/Testing/Tools/cxxtest/test/longlong.cpp b/Testing/Tools/cxxtest/test/longlong.cpp index 9da49b9f59c1fca891efec2bf270c3c088dc54bf..9a1c26f0c1311f1bad25ba70e23160b5c52cbc7e 100644 --- a/Testing/Tools/cxxtest/test/longlong.cpp +++ b/Testing/Tools/cxxtest/test/longlong.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + // // This program is used to check if the compiler supports "long long" diff --git a/Testing/Tools/cxxtest/test/main.cpp b/Testing/Tools/cxxtest/test/main.cpp index 947f884c2bb81a5131a9804dc9afa9bff5f0f916..f71f9fcfedfb1c391fc5dc3ca2b8dd2d755f1fb1 100644 --- a/Testing/Tools/cxxtest/test/main.cpp +++ b/Testing/Tools/cxxtest/test/main.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include <cxxtest/TestRunner.h> #include <cxxtest/TestListener.h> diff --git a/Testing/Tools/cxxtest/test/stpltpl.cpp b/Testing/Tools/cxxtest/test/stpltpl.cpp index ff57f7df2b89f824d12ecedaff5589df55923e85..7f1dd74a5dffeb7cdd9e3c00c5410a247a143af1 100644 --- a/Testing/Tools/cxxtest/test/stpltpl.cpp +++ b/Testing/Tools/cxxtest/test/stpltpl.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include <cxxtest/Flags.h> diff --git a/Testing/Tools/cxxtest/test/tpltpl.cpp b/Testing/Tools/cxxtest/test/tpltpl.cpp index eb595a91a2b5da2facb2b4bc12507239eb1bd23a..027b8892291b2de7953637b85af748db07d0e0c9 100644 --- a/Testing/Tools/cxxtest/test/tpltpl.cpp +++ b/Testing/Tools/cxxtest/test/tpltpl.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include <cxxtest/Flags.h> diff --git a/Testing/Tools/cxxtest/test/unit/LinkedList_test.t.h b/Testing/Tools/cxxtest/test/unit/LinkedList_test.t.h index f2018d0369edb1d39283dc869b10012a5083b320..08e64aa2eab2d901c1688cb1eb126a36fee0a6b1 100644 --- a/Testing/Tools/cxxtest/test/unit/LinkedList_test.t.h +++ b/Testing/Tools/cxxtest/test/unit/LinkedList_test.t.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/Testing/Tools/cxxtest/test/wchar.cpp b/Testing/Tools/cxxtest/test/wchar.cpp index fb0daae295b9b4a43551a717681433c4aa9c1a93..01073e53a54129f8b6d5a834d970684bc7ca650e 100644 --- a/Testing/Tools/cxxtest/test/wchar.cpp +++ b/Testing/Tools/cxxtest/test/wchar.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + // // This program is used to check if the compiler supports basic_string<wchar_t> diff --git a/Testing/Tools/generatetestmain.py b/Testing/Tools/generatetestmain.py index 2fddf405c2d4c9389cde27e3ffb93b9b39e861b0..c9996378c5e9043456424618c02c31609d2a0688 100755 --- a/Testing/Tools/generatetestmain.py +++ b/Testing/Tools/generatetestmain.py @@ -2,8 +2,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + VERSION = "1.0" diff --git a/buildconfig/CMake/Bootstrap.cmake b/buildconfig/CMake/Bootstrap.cmake index f3da2c3fc3cbb832fc9d79a754a348368316c6bb..940906e2e5032412b1e08c391cdb60b365783567 100644 --- a/buildconfig/CMake/Bootstrap.cmake +++ b/buildconfig/CMake/Bootstrap.cmake @@ -113,6 +113,7 @@ if(MSVC) "The location of the pythonw executable. This suppresses the new terminal window on startup" FORCE ) + set(THIRD_PARTY_BIN "${THIRD_PARTY_DIR}/bin;${THIRD_PARTY_DIR}/lib/qt4/bin;${THIRD_PARTY_DIR}/lib/qt5/bin;${MSVC_PYTHON_EXECUTABLE_DIR}" ) diff --git a/buildconfig/CMake/CommonSetup.cmake b/buildconfig/CMake/CommonSetup.cmake index 7b8afb4f47508b143d1f7a6d5e08371047a81b7d..efdba625bf9e7db8b87a1553793587f8ab577baf 100644 --- a/buildconfig/CMake/CommonSetup.cmake +++ b/buildconfig/CMake/CommonSetup.cmake @@ -19,6 +19,21 @@ if(NOT CMAKE_CONFIGURATION_TYPES) endif() endif() +find_package(CxxTest) +if(CXXTEST_FOUND) + add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND}) + make_directory(${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Testing) + message(STATUS "Added target ('check') for unit tests") +else() + message(STATUS "Could NOT find CxxTest - unit testing not available") +endif() + +# Avoid the linker failing by including GTest before marking all libs as shared +# and before we set our warning flags in GNUSetup +include(GoogleTest) +include(PyUnitTest) +enable_testing() + # We want shared libraries everywhere set(BUILD_SHARED_LIBS On) @@ -371,19 +386,6 @@ include(PylintSetup) # Set up the unit tests target # ############################################################################## -find_package(CxxTest) -if(CXXTEST_FOUND) - add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND}) - make_directory(${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Testing) - message(STATUS "Added target ('check') for unit tests") -else() - message(STATUS "Could NOT find CxxTest - unit testing not available") -endif() - -include(GoogleTest) -include(PyUnitTest) -enable_testing() - # GUI testing via Squish find_package(Squish) if(SQUISH_FOUND) diff --git a/buildconfig/CMake/CppCheckSetup.cmake b/buildconfig/CMake/CppCheckSetup.cmake index 75d183a1a1004b0dc9d44e46e89a15ab336502f8..cf1df3315898c12266a409d1cb05b766c0bf4780 100644 --- a/buildconfig/CMake/CppCheckSetup.cmake +++ b/buildconfig/CMake/CppCheckSetup.cmake @@ -1,133 +1,28 @@ find_package ( Cppcheck ) if ( CPPCHECK_EXECUTABLE ) - set ( CPPCHECK_SOURCE_DIRS - Framework - MantidPlot - qt/paraview_ext - qt/scientific_interfaces - qt/widgets/common - qt/widgets/instrumentView - qt/widgets/mplcpp - ) - option ( CPPCHECK_USE_INCLUDE_DIRS "Use specified include directories. WARNING: cppcheck will run significantly slower." ) + # We must export the compile commands for cppcheck to be able to check + # everything correctly + set(CMAKE_EXPORT_COMPILE_COMMANDS ON) - set ( CPPCHECK_INCLUDE_DIRS - Framework/Algorithms/inc - Framework/PythonInterface/inc - Framework/Nexus/inc - Framework/MPIAlgorithms/inc - Framework/MDAlgorithms/inc - Framework/DataHandling/inc - Framework/WorkflowAlgorithms/inc - Framework/MDEvents/inc - Framework/DataObjects/inc - Framework/Geometry/inc - Framework/ICat/inc - Framework/CurveFitting/inc - Framework/API/inc - Framework/TestHelpers/inc - Framework/Crystal/inc - Framework/Kernel/inc - qt/paraview_ext/VatesAPI/inc - qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc - qt/paraview_ext/VatesSimpleGui/QtWidgets/inc - qt/widgets/common/inc - qt/widgets/factory/inc - qt/widgets/instrumentview/inc - qt/widgets/refdetectrview/inc - qt/widgets/sliceviewer/inc - qt/widgets/spectrumviewer/inc - qt/widgets/plugins/algorithm_dialogs/inc - qt/widgets/plugins/designer/inc - qt/scientific_interfaces - ) - - set ( CPPCHECK_EXCLUDES - Framework/LiveData/src/ISIS/DAE/ - Framework/LiveData/src/Kafka/private/Schema/ - Framework/DataHandling/src/LoadRaw/ - Framework/ICat/inc/MantidICat/ICat3/GSoapGenerated/ - Framework/ICat/src/ICat3/GSoapGenerated/ - Framework/ICat/src/ICat3/ICat3GSoapGenerated.cpp - Framework/ICat/inc/MantidICat/ICat4/GSoapGenerated/ - Framework/ICat/src/ICat4/GSoapGenerated/ - Framework/ICat/src/ICat4/ICat4GSoapGenerated.cpp - Framework/ICat/src/GSoap/ - Framework/ICat/src/GSoap.cpp - Framework/Kernel/src/ANN/ - Framework/Kernel/src/ANN_complete.cpp - Framework/Kernel/src/Math/Optimization/SLSQPMinimizer.cpp - MantidPlot/src/nrutil.cpp - MantidPlot/src/origin/OPJFile.cpp - MantidPlot/src/zlib123/minigzip.c - Framework/SINQ/src/PoldiPeakFit.cpp - qt/widgets/common/src/QtPropertyBrowser/ - qt/widgets/common/inc/MantidQtWidgets/Common/QtPropertyBrowser/ - ) - - # Header files to be ignored require different handling - set ( CPPCHECK_HEADER_EXCLUDES - Framework/LiveData/src/Kafka/private/Schema/ba57_run_info_generated.h - Framework/LiveData/src/Kafka/private/Schema/df12_det_spec_map_generated.h - Framework/LiveData/src/Kafka/private/Schema/ev42_events_generated.h - Framework/LiveData/src/Kafka/private/Schema/fwdi_forwarder_internal_generated.h - Framework/LiveData/src/Kafka/private/Schema/f142_logdata_generated.h - Framework/LiveData/src/Kafka/private/Schema/is84_isis_events_generated.h - Framework/LiveData/src/Kafka/private/Schema/flatbuffers/base.h - Framework/LiveData/src/Kafka/private/Schema/flatbuffers/flatbuffers.h - Framework/LiveData/src/Kafka/private/Schema/flatbuffers/stl_emulation.h - MantidPlot/src/origin/OPJFile.h - MantidPlot/src/origin/tree.hh - ) + configure_file(${CMAKE_SOURCE_DIR}/buildconfig/CMake/CppCheck_Suppressions.txt.in ${CMAKE_BINARY_DIR}/CppCheck_Suppressions.txt) # setup the standard arguments + set ( CPPCHECK_ARGS --enable=all --inline-suppr --max-configs=120 + --suppressions-list=${CMAKE_BINARY_DIR}/CppCheck_Suppressions.txt + --project=${CMAKE_BINARY_DIR}/compile_commands.json + # Force cppcheck to check when we use project-wide macros + -DDLLExport= + -DMANTID_ALGORITHMS_DLL= + ) + set (_cppcheck_args "${CPPCHECK_ARGS}") list ( APPEND _cppcheck_args ${CPPCHECK_TEMPLATE_ARG} ) if ( CPPCHECK_NUM_THREADS GREATER 0) list ( APPEND _cppcheck_args -j ${CPPCHECK_NUM_THREADS} ) endif ( CPPCHECK_NUM_THREADS GREATER 0) - # process list of include/exclude directories - set (_cppcheck_source_dirs) - foreach (_dir ${CPPCHECK_SOURCE_DIRS} ) - set ( _tmpdir "${CMAKE_SOURCE_DIR}/${_dir}" ) - if ( EXISTS ${_tmpdir} ) - list ( APPEND _cppcheck_source_dirs ${_tmpdir} ) - endif () - endforeach() - - set (_cppcheck_includes) - foreach( _dir ${CPPCHECK_INCLUDE_DIRS} ) - set ( _tmpdir "${CMAKE_SOURCE_DIR}/${_dir}" ) - if ( EXISTS ${_tmpdir} ) - list ( APPEND _cppcheck_includes -I ${_tmpdir} ) - endif () - endforeach() - if (CPPCHECK_USE_INCLUDE_DIRS) - list ( APPEND _cppcheck_args ${_cppcheck_includes} ) - endif (CPPCHECK_USE_INCLUDE_DIRS) - - set (_cppcheck_excludes) - foreach( _file ${CPPCHECK_EXCLUDES} ) - set ( _tmp "${CMAKE_SOURCE_DIR}/${_file}" ) - if ( EXISTS ${_tmp} ) - list ( APPEND _cppcheck_excludes -i ${_tmp} ) - endif () - endforeach() - list ( APPEND _cppcheck_args ${_cppcheck_excludes} ) - - # Handle header files in the required manner - set (_cppcheck_header_excludes) - foreach( _file ${CPPCHECK_HEADER_EXCLUDES} ) - set ( _tmp "${CMAKE_SOURCE_DIR}/${_file}" ) - if ( EXISTS ${_tmp} ) - list ( APPEND _cppcheck_header_excludes --suppress=*:${_tmp} ) - endif() - endforeach() - list ( APPEND _cppcheck_args ${_cppcheck_header_excludes} ) - # put the finishing bits on the final command call set (_cppcheck_xml_args) if (CPPCHECK_GENERATE_XML) @@ -136,10 +31,12 @@ if ( CPPCHECK_EXECUTABLE ) list( APPEND _cppcheck_xml_args ${_cppcheck_source_dirs} ) endif (CPPCHECK_GENERATE_XML) + + # generate the target if (NOT TARGET cppcheck) add_custom_target ( cppcheck - COMMAND ${CPPCHECK_EXECUTABLE} ${_cppcheck_args} ${_cppcheck_header_excludes} ${_cppcheck_xml_args} + COMMAND ${CPPCHECK_EXECUTABLE} ${_cppcheck_args} ${_cppcheck_xml_args} WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} COMMENT "Running cppcheck" ) diff --git a/buildconfig/CMake/CppCheck_Suppressions.txt b/buildconfig/CMake/CppCheck_Suppressions.txt deleted file mode 100644 index 8ea3af11393379dcf667cea4c56c76b7da6ad5cd..0000000000000000000000000000000000000000 --- a/buildconfig/CMake/CppCheck_Suppressions.txt +++ /dev/null @@ -1,14 +0,0 @@ -// suppress specific rule in specific files -// NOTE this needs the full path to the file, so would need this file to be generated by cmake -// as different build servers have different starts to the file path -// Example: -// memsetClassFloat:/Users/builder/Jenkins/workspace/cppcheck-1.72/Framework/DataHandling/src/LoadRaw/isisraw.h - - -// suppress in all files - BE CAREFUL not to leave trailing spaces after the rule id. or empty lines -// For a library this is not a problem per se -// unusedFunction -// cppcheck has problems handling the number of pre-processor definitions used in the DLL_EXPORTs -class_X_Y -// the exported functions are not used in the cpp land -unusedFunction:Framework/PythonInterface/mantid/*/src/Exports/*.cpp diff --git a/buildconfig/CMake/CppCheck_Suppressions.txt.in b/buildconfig/CMake/CppCheck_Suppressions.txt.in new file mode 100644 index 0000000000000000000000000000000000000000..f60bde7ca6c07350da914bd49f6587cc984566e3 --- /dev/null +++ b/buildconfig/CMake/CppCheck_Suppressions.txt.in @@ -0,0 +1,104 @@ +// suppress specific rule in specific files +// NOTE this needs the full path to the file, so would need this file to be generated by cmake +// as different build servers have different starts to the file path + +// -------- Project Wide ------------------ + +// Hide warnings about using explicit keyword constructors as we have "too many" +// and automated clang-tidy breaks a couple of implicit conversions we use widely +noExplicitConstructor + +// Hide warnings about shadowed members for inheritance. Typically "m_log" with Algorithm +duplInheritedMember + +// We have some potentially uninitialized member vars but too many to fix at the moment +uninitMemberVar + +// Around 100 of these exist where noConstructor is present +noConstructor + +// Pre-processor Directives, such as #error, which are upstream anyway +preprocessorErrorDirective + +// ---------- cppcheck 1.90 Transition ------- +unmatchedSuppression + +// If-init not supported +syntaxError:${CMAKE_SOURCE_DIR}/Framework/API/src/MatrixWorkspace.cpp + +// --- To be added back ------ +//cstyleCase:*${CMAKE_SOURCE_DIR}/MantidPlot + +// A large number of copying instead of pass by ref were picked up by clang-tidy, but around 200 remain +//passedByValue + +// Cppcheck struggles with some inheritance chains, some of these might be true though +//unusedPrivateFunction + +// Nice to have, not need to have at the moment +//useInitializationList + +// Libs we have in-source +// *:${CMAKE_SOURCE_DIR}/Framework/DataObjects/inc/MantidDataObjects/MortonIndex/* + +// ---------- Individual suppressions ----------------- + +// Mantid Plot specific ones we probably won't fix before removal + +*:${CMAKE_SOURCE_DIR}/MantidPlot/src/origin/tree.hh +*:${CMAKE_SOURCE_DIR}/MantidPlot/src/nrutil.cpp + +pureVirtualCall:${CMAKE_SOURCE_DIR}/qt/scientific_interfaces/Indirect/IndirectBayesTab.cpp +pureVirtualCall:${CMAKE_SOURCE_DIR}/qt/scientific_interfaces/Indirect/IndirectBayesTab.h + +// Macro expansion means this is incorrectly flagged on Unix +redundantAssignment:${CMAKE_SOURCE_DIR}/Framework/DataHandling/src/LoadRaw/isisraw.cpp + +// Ref binding means Cppcheck can't see these are used +unreadVariable:${CMAKE_SOURCE_DIR}/Framework/Algorithms/src/MaskBinsIf.cpp + +// --------- Missing copy assignment / constructors ------------------- +// We don't want more creeping in so just mark these one by one + +copyCtorAndEqOperator:${CMAKE_SOURCE_DIR}/Framework/API/inc/MantidAPI/BoxController.h +copyCtorAndEqOperator:${CMAKE_SOURCE_DIR}/Framework/API/inc/MantidAPI/ExperimentInfo.h +copyCtorAndEqOperator:${CMAKE_SOURCE_DIR}/Framework/API/inc/MantidAPI/IFunction.h +copyCtorAndEqOperator:${CMAKE_SOURCE_DIR}/Framework/API/inc/MantidAPI/MDGeometry.h +copyCtorAndEqOperator:${CMAKE_SOURCE_DIR}/Framework/API/inc/MantidAPI/MultipleExperimentInfos.h +copyCtorAndEqOperator:${CMAKE_SOURCE_DIR}/Framework/API/inc/MantidAPI/SingleValueParameter.h +copyCtorAndEqOperator:${CMAKE_SOURCE_DIR}/Framework/API/inc/MantidAPI/VectorParameter.h + +copyCtorAndEqOperator:${CMAKE_SOURCE_DIR}/Framework/Catalog/inc/MantidCatalog/ONCat.h +copyCtorAndEqOperator:${CMAKE_SOURCE_DIR}/Framework/Catalog/inc/MantidCatalog/ONCatEntity.h + +copyCtorAndEqOperator:${CMAKE_SOURCE_DIR}/Framework/Crystal/inc/MantidCrystal/IndexSXPeaks.h +copyCtorAndEqOperator:${CMAKE_SOURCE_DIR}/Framework/Crystal/inc/MantidCrystal/IntegratePeakTimeSlices.h + +copyCtorAndEqOperator:${CMAKE_SOURCE_DIR}/Framework/Geometry/inc/MantidGeometry/Instrument/CompAssembly.h +copyCtorAndEqOperator:${CMAKE_SOURCE_DIR}/Framework/Geometry/inc/MantidGeometry/Instrument/Container.h +copyCtorAndEqOperator:${CMAKE_SOURCE_DIR}/Framework/Geometry/inc/MantidGeometry/Instrument/ObjCompAssembly.h +copyCtorAndEqOperator:${CMAKE_SOURCE_DIR}/Framework/Geometry/inc/MantidGeometry/Rendering/GeometryHandler.h + +copyCtorAndEqOperator:${CMAKE_SOURCE_DIR}/qt/widgets/plotting/inc/MantidQtWidgets/Plotting/Qwt/QwtWorkspaceBinData.h +copyCtorAndEqOperator:${CMAKE_SOURCE_DIR}/qt/widgets/plotting/inc/MantidQtWidgets/Plotting/Qwt/QwtWorkspaceSpectrumData.h + +noCopyConstructor:${CMAKE_SOURCE_DIR}/Framework/DataHandling/inc/MantidDataHandling/BankPulseTimes.h +noCopyConstructor:${CMAKE_SOURCE_DIR}/Framework/DataHandling/src/LoadRaw/isisraw.h +noCopyConstructor:${CMAKE_SOURCE_DIR}/Framework/Geometry/inc/MantidGeometry/Rendering/vtkGeometryCacheWriter.h + +// ----------------- Upstream libs --------------- + +// Always ignore bin dir +*:*${CMAKE_BINARY_DIR}/* + +// For some reason upstream libs sometimes end up in the check results +*:*/usr/include/* + +// All ANN files as they are upstream anyway +*:*${CMAKE_SOURCE_DIR}/Framework/Kernel/src/ANN/* + +// Libs we have in-source +*:${CMAKE_SOURCE_DIR}/Framework/ICat/src/GSoap/* +*:${CMAKE_SOURCE_DIR}/Framework/ICat/src/ICat3/GSoapGenerated/* +*:${CMAKE_SOURCE_DIR}/Framework/ICat/src/ICat4/GSoapGenerated/* +*:${CMAKE_SOURCE_DIR}/MantidPlot/src/zlib123/* diff --git a/buildconfig/CMake/FindCppcheck.cmake b/buildconfig/CMake/FindCppcheck.cmake index fad22793cb0533a477cdb92d454e4c8e37c9ece9..89bb0b88ec5e512df5d147450bf3893b278e7cf0 100644 --- a/buildconfig/CMake/FindCppcheck.cmake +++ b/buildconfig/CMake/FindCppcheck.cmake @@ -61,15 +61,6 @@ if(CPPCHECK_EXECUTABLE) endif() mark_as_advanced(CPPCHECK_EXECUTABLE) -if(CPPCHECK_EXECUTABLE) - if (${CPPCHECK_VERSION} VERSION_LESS 1.71) - set ( CPPCHECK_ARGS --enable=all --inline-suppr --max-configs=120 - --suppressions ${CMAKE_CURRENT_SOURCE_DIR}/buildconfig/CMake/CppCheck_Suppressions.txt ) - else() - set ( CPPCHECK_ARGS --enable=all --inline-suppr --max-configs=120 - --suppressions-list=${CMAKE_CURRENT_SOURCE_DIR}/buildconfig/CMake/CppCheck_Suppressions.txt ) - endif() -endif() set ( CPPCHECK_NUM_THREADS 0 CACHE STRING "Number of threads to use when running cppcheck" ) set ( CPPCHECK_GENERATE_XML OFF CACHE BOOL "Generate xml output files from cppcheck" ) diff --git a/buildconfig/CMake/FindCxxTest.cmake b/buildconfig/CMake/FindCxxTest.cmake index d88bbdd42c8bd0c64aa8d148be3f74148e8b2e68..ffb3dad5f08348f62abea9cbf66b1bae3e16beb0 100644 --- a/buildconfig/CMake/FindCxxTest.cmake +++ b/buildconfig/CMake/FindCxxTest.cmake @@ -180,26 +180,43 @@ macro(CXXTEST_ADD_TEST _cxxtest_testname) add_test ( NAME ${_cxxtest_separate_name} COMMAND ${CMAKE_COMMAND} -E chdir "${CMAKE_BINARY_DIR}/bin/Testing" $<TARGET_FILE:${_cxxtest_testname}> ${_suitename} ) - set_tests_properties ( ${_cxxtest_separate_name} PROPERTIES - TIMEOUT ${TESTING_TIMEOUT} ) - if (CXXTEST_ADD_PERFORMANCE) - # ------ Performance test version ------- - # Name of the possibly-existing Performance test suite - set( _performance_suite_name "${_suitename}Performance" ) - # Read the contents of the header file - FILE( READ ${part} _file_contents ) - # Is that suite defined in there at all? - STRING(REGEX MATCH ${_performance_suite_name} _search_res ${_file_contents} ) - if (NOT "${_search_res}" STREQUAL "") - set( _cxxtest_separate_name "${_cxxtest_testname}_${_performance_suite_name}") - add_test ( NAME ${_cxxtest_separate_name} - COMMAND ${CMAKE_COMMAND} -E chdir "${CMAKE_BINARY_DIR}/bin/Testing" - $<TARGET_FILE:${_cxxtest_testname}> ${_performance_suite_name} ) set_tests_properties ( ${_cxxtest_separate_name} PROPERTIES TIMEOUT ${TESTING_TIMEOUT} ) - endif () - endif () + + if (CXXTEST_ADD_PERFORMANCE) + # ------ Performance test version ------- + # Name of the possibly-existing Performance test suite + set( _performance_suite_name "${_suitename}Performance" ) + # Read the contents of the header file + FILE( READ ${part} _file_contents ) + # Is that suite defined in there at all? + STRING(REGEX MATCH ${_performance_suite_name} _search_res ${_file_contents} ) + if (NOT "${_search_res}" STREQUAL "") + set( _cxxtest_separate_name "${_cxxtest_testname}_${_performance_suite_name}") + add_test ( NAME ${_cxxtest_separate_name} + COMMAND ${CMAKE_COMMAND} -E chdir "${CMAKE_BINARY_DIR}/bin/Testing" + $<TARGET_FILE:${_cxxtest_testname}> ${_performance_suite_name} ) + set_tests_properties ( ${_cxxtest_separate_name} PROPERTIES + TIMEOUT ${TESTING_TIMEOUT} ) + endif () + endif () + + set( SUPPRESSIONS_DIR "${CMAKE_SOURCE_DIR}/tools/Sanitizer" ) + if ( USE_SANITIZERS_LOWER STREQUAL "address" ) + # See dev docs on sanitizers for details on why verify_asan_link is false + # Trying to quote these options causes the quotation to be forwarded + set(_ASAN_OPTS "suppressions=${SUPPRESSIONS_DIR}/Address.supp:detect_stack_use_after_return=true") + set_property( TEST ${_cxxtest_separate_name} APPEND PROPERTY + ENVIRONMENT ASAN_OPTIONS=${_ASAN_OPTS} ) + + set( _LSAN_OPTS "suppressions=${SUPPRESSIONS_DIR}/Leak.supp" ) + set_property( TEST ${_cxxtest_separate_name} APPEND PROPERTY + ENVIRONMENT LSAN_OPTIONS=${_LSAN_OPTS} ) + + endif() + + endforeach ( part ${ARGN} ) endmacro(CXXTEST_ADD_TEST) diff --git a/buildconfig/CMake/GNUSetup.cmake b/buildconfig/CMake/GNUSetup.cmake index a129359016f7638690fb3151163728a3066d8fd1..6fbf75cc72463dfdd66c5b771be881331951a6e2 100644 --- a/buildconfig/CMake/GNUSetup.cmake +++ b/buildconfig/CMake/GNUSetup.cmake @@ -72,39 +72,6 @@ endif() # Add some options for debug build to help the Zoom profiler add_compile_options ( $<$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>:-fno-omit-frame-pointer> ) -option(WITH_ASAN "Enable address sanitizer" OFF) -if(WITH_ASAN) - message(STATUS "enabling address sanitizer") - add_compile_options(-fno-omit-frame-pointer -fno-common -fsanitize=address) - set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -fsanitize=address" ) - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=address") - set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fsanitize=address") -endif() - -option(WITH_TSAN "Enable thread sanitizer" OFF) -if(WITH_TSAN) - message(STATUS "enabling thread sanitizer") - add_compile_options(-fno-omit-frame-pointer -fno-common -fsanitize=thread) - set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -fsanitize=thread" ) - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=thread") - set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fsanitize=thread") -endif() - -option(WITH_UBSAN "Enable undefined behavior sanitizer" OFF) -if(WITH_UBSAN) - message(STATUS "enabling undefined behavior sanitizers") - set( UBSAN_NO_RECOVER "-fno-sanitize-recover") - if ( CMAKE_COMPILER_IS_GNUCXX AND GCC_COMPILER_VERSION VERSION_LESS "5.1.0") - set( UBSAN_NO_RECOVER "") - endif() - # vptr check is generating a lot of false positives, hiding other more serious warnings. - set(SAN_FLAGS "-fno-omit-frame-pointer -fno-common -fsanitize=undefined -fno-sanitize=vptr ${UBSAN_NO_RECOVER}") - add_compile_options(-fno-omit-frame-pointer -fno-common -fsanitize=undefined -fno-sanitize=vptr ${UBSAN_NO_RECOVER}) - set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${SAN_FLAGS}" ) - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${SAN_FLAGS}" ) - set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${SAN_FLAGS}" ) -endif() - # XCode isn't picking up the c++ standard by CMAKE_CXX_STANDARD if(CMAKE_GENERATOR STREQUAL Xcode) set ( CMAKE_XCODE_ATTRIBUTE_OTHER_CPLUSPLUSFLAGS "${GNUFLAGS} -Woverloaded-virtual -fno-operator-names") diff --git a/buildconfig/CMake/GoogleTest.cmake b/buildconfig/CMake/GoogleTest.cmake index 39d8748fbb07c2957d6dadbc3d67cddf48b42d35..9b1a42d0e62239af2a6f66efbb9ea19f936ad5f6 100644 --- a/buildconfig/CMake/GoogleTest.cmake +++ b/buildconfig/CMake/GoogleTest.cmake @@ -1,74 +1,37 @@ # Find the Google Mock headers and libraries # GMOCK_INCLUDE_DIR where to find gmock.h -# GMOCK_FOUND If false, do not try to use Google Mock # Make gtest_version available everywhere -set (gtest_version "1.8.0" CACHE INTERNAL "") +set (gtest_version "1.10.0" CACHE INTERNAL "") -option(USE_SYSTEM_GTEST "Use the system installed GTest - v${gtest_version}?" OFF) +include(FetchContent) -if(USE_SYSTEM_GTEST) - message(STATUS "Using system gtest - currently untested") - find_package(GTest ${gtest_version} EXACT REQUIRED) - find_package(GMock ${gtest_version} EXACT REQUIRED) -else() - message(STATUS "Using gtest in ExternalProject") +# Prevent overriding the parent project's compiler/linker +# settings on Windows. Force overwrites previous cache value. +set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) - # Prevent overriding the parent project's compiler/linker - # settings on Windows. Force overwrites previous cache value. - set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) +FetchContent_Declare( + googletest + GIT_REPOSITORY https://github.com/google/googletest.git + GIT_TAG release-1.10.0 + GIT_SHALLOW TRUE +) - # Download and unpack googletest at configure time - configure_file(${CMAKE_SOURCE_DIR}/buildconfig/CMake/GoogleTest.in - ${CMAKE_BINARY_DIR}/googletest-download/CMakeLists.txt @ONLY) - execute_process(COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" -DCMAKE_SYSTEM_VERSION=${CMAKE_SYSTEM_VERSION} . - RESULT_VARIABLE result - WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/googletest-download ) - if(result) - message(FATAL_ERROR "CMake step for googletest failed: ${result}") - endif() - execute_process(COMMAND ${CMAKE_COMMAND} --build . - RESULT_VARIABLE result - WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/googletest-download ) - if(result) - message(FATAL_ERROR "Build step for googletest failed: ${result}") - endif() - - # Add googletest directly to our build. This defines - # the gtest and gtest_main targets. - add_subdirectory(${CMAKE_BINARY_DIR}/googletest-src - ${CMAKE_BINARY_DIR}/googletest-build) - - # Hide targets from "all" and put them in the UnitTests folder in MSVS - foreach( target_var gmock gtest gmock_main gtest_main ) - set_target_properties( ${target_var} - PROPERTIES EXCLUDE_FROM_ALL TRUE - FOLDER "UnitTests/gmock" ) - endforeach() - - set( GMOCK_LIB gmock ) - set( GMOCK_LIB_DEBUG gmock ) - set( GMOCK_LIBRARIES optimized ${GMOCK_LIB} debug ${GMOCK_LIB_DEBUG} ) - set( GTEST_LIB gtest ) - set( GTEST_LIB_DEBUG gtest ) - set( GTEST_LIBRARIES optimized ${GTEST_LIB} debug ${GTEST_LIB_DEBUG} ) - - find_path ( GMOCK_INCLUDE_DIR gmock/gmock.h - PATHS ${CMAKE_BINARY_DIR}/googletest-src/googlemock/include - NO_DEFAULT_PATH ) - find_path ( GTEST_INCLUDE_DIR gtest/gtest.h - PATHS ${CMAKE_BINARY_DIR}/googletest-src/googletest/include - NO_DEFAULT_PATH ) - - - # handle the QUIETLY and REQUIRED arguments and set GMOCK_FOUND to TRUE if - # all listed variables are TRUE - include ( FindPackageHandleStandardArgs ) - find_package_handle_standard_args( GMOCK DEFAULT_MSG GMOCK_INCLUDE_DIR - GMOCK_LIBRARIES ) - find_package_handle_standard_args( GTEST DEFAULT_MSG GTEST_INCLUDE_DIR - GTEST_LIBRARIES ) - - mark_as_advanced ( GMOCK_INCLUDE_DIR GMOCK_LIB GMOCK_LIB_DEBUG ) - mark_as_advanced ( GTEST_INCLUDE_DIR GTEST_LIB GTEST_LIB_DEBUG ) +FetchContent_GetProperties(googletest) +if(NOT googletest_POPULATED) + FetchContent_Populate(googletest) + add_subdirectory(${googletest_SOURCE_DIR} ${googletest_BINARY_DIR} EXCLUDE_FROM_ALL) endif() + +mark_as_advanced( + BUILD_GMOCK BUILD_GTEST BUILD_SHARED_LIBS + gmock_build_tests gtest_build_samples gtest_build_tests + gtest_disable_pthreads gtest_force_shared_crt gtest_hide_internal_symbols +) + +# Hide targets from "all" and put them in the UnitTests folder in MSVS +foreach( target_var gmock gtest gmock_main gtest_main ) + set_target_properties( ${target_var} + PROPERTIES EXCLUDE_FROM_ALL TRUE + FOLDER "UnitTests/gmock" ) +endforeach() diff --git a/buildconfig/CMake/GoogleTest.in b/buildconfig/CMake/GoogleTest.in deleted file mode 100644 index ed97a2b77cce8540ff8d81f2734b03c2615039e1..0000000000000000000000000000000000000000 --- a/buildconfig/CMake/GoogleTest.in +++ /dev/null @@ -1,26 +0,0 @@ -cmake_minimum_required(VERSION 3.5) - -project(googletest-download NONE) - -find_package(Git) - -include(ExternalProject) - -set ( _tag release-@gtest_version@ ) -set ( _apply_flags --ignore-space-change --whitespace=fix ) - -ExternalProject_Add(googletest - GIT_REPOSITORY https://github.com/google/googletest.git - GIT_TAG "${_tag}" - SOURCE_DIR "@CMAKE_BINARY_DIR@/googletest-src" - BINARY_DIR "@CMAKE_BINARY_DIR@/googletest-build" - PATCH_COMMAND "@GIT_EXECUTABLE@" reset --hard ${_tag} - COMMAND "@GIT_EXECUTABLE@" apply ${_apply_flags} "@CMAKE_SOURCE_DIR@/buildconfig/CMake/googletest_override.patch" - COMMAND "@GIT_EXECUTABLE@" apply ${_apply_flags} "@CMAKE_SOURCE_DIR@/buildconfig/CMake/googletest_static.patch" - COMMAND "@GIT_EXECUTABLE@" apply ${_apply_flags} "@CMAKE_SOURCE_DIR@/buildconfig/CMake/googletest_msvc_cpp11.patch" - COMMAND "@GIT_EXECUTABLE@" apply ${_apply_flags} "@CMAKE_SOURCE_DIR@/buildconfig/CMake/googletest_wconversion.patch" - CONFIGURE_COMMAND "" - BUILD_COMMAND "" - INSTALL_COMMAND "" - TEST_COMMAND "" -) diff --git a/buildconfig/CMake/MSVCSetup.cmake b/buildconfig/CMake/MSVCSetup.cmake index 3286a3d322361578820e1cc997ceede4d4ebe1bd..e5bb8cedc406c32b1ee3108aa4b66b40c1f2c558 100644 --- a/buildconfig/CMake/MSVCSetup.cmake +++ b/buildconfig/CMake/MSVCSetup.cmake @@ -128,18 +128,23 @@ else () set (PARAVIEW_PYTHON_PATHS "" ) endif () +set(MSVC_BIN_DIR ${PROJECT_BINARY_DIR}/bin/$<CONFIG>) + configure_file ( ${PACKAGING_DIR}/mantidpython.bat.in ${PROJECT_BINARY_DIR}/mantidpython.bat.in @ONLY ) # place it in the appropriate directory file(GENERATE OUTPUT - ${PROJECT_BINARY_DIR}/bin/$<$<CONFIG:Release>:Release>$<$<CONFIG:Debug>:Debug>/mantidpython.bat + ${MSVC_BIN_DIR}/mantidpython.bat INPUT ${PROJECT_BINARY_DIR}/mantidpython.bat.in ) # install version set ( MANTIDPYTHON_PREAMBLE "set PYTHONHOME=%_BIN_DIR%\nset PATH=%_BIN_DIR%;%_BIN_DIR%\\..\\plugins;%_BIN_DIR%\\..\\PVPlugins;%PATH%" ) +# Semi-colon gen exp prevents future generators converting to CMake lists +set ( MSVC_IDE_ENV "PYTHONPATH=${MSVC_BIN_DIR}$<SEMICOLON>PYTHONHOME=${MSVC_PYTHON_EXECUTABLE_DIR}" ) + if (MAKE_VATES) set ( PV_LIBS "%_BIN_DIR%\\..\\lib\\paraview-${PARAVIEW_VERSION_MAJOR}.${PARAVIEW_VERSION_MINOR}") set ( PARAVIEW_PYTHON_PATHS ";${PV_LIBS}\\site-packages;${PV_LIBS}\\site-packages\\vtk" ) @@ -150,6 +155,17 @@ endif () configure_file ( ${PACKAGING_DIR}/mantidpython.bat.in ${PROJECT_BINARY_DIR}/mantidpython.bat.install @ONLY ) +########################################################################## +# Custom targets to fix-up and run Python entry point code +########################################################################## + +add_custom_target(SystemTests) +add_dependencies(SystemTests Framework StandardTestData SystemTestData) +set_target_properties(SystemTests PROPERTIES + VS_DEBUGGER_COMMAND "${PYTHON_EXECUTABLE}" + VS_DEBUGGER_COMMAND_ARGUMENTS "${CMAKE_SOURCE_DIR}/Testing/SystemTests/scripts/runSystemTests.py --executable \"${MSVC_BIN_DIR}/mantidpython.bat\" --exec-args \" --classic\"" + VS_DEBUGGER_ENVIRONMENT "${MSVC_IDE_ENV}" + ) ########################################################################### # (Fake) installation variables to keep windows sweet ########################################################################### diff --git a/buildconfig/CMake/QtTargetFunctions.cmake b/buildconfig/CMake/QtTargetFunctions.cmake index 4d1c9d66c45a286c674ab5b17a657aac029ef29d..228630d7d8374a40bc8219a9cdfd68c91a7ad474 100644 --- a/buildconfig/CMake/QtTargetFunctions.cmake +++ b/buildconfig/CMake/QtTargetFunctions.cmake @@ -331,8 +331,7 @@ function (mtd_add_qt_test_executable) # client and system headers target_include_directories ( ${_target_name} PRIVATE ${PARSED_INCLUDE_DIRS} ) - target_include_directories ( ${_target_name} SYSTEM PRIVATE ${CXXTEST_INCLUDE_DIR} - ${GMOCK_INCLUDE_DIR} ${GTEST_INCLUDE_DIR} ) + target_include_directories ( ${_target_name} SYSTEM PRIVATE ${CXXTEST_INCLUDE_DIR} ) target_link_libraries (${_target_name} LINK_PRIVATE ${LINK_LIBS} ${_link_libs} ${_mtd_qt_libs} ) diff --git a/buildconfig/CMake/Sanitizers.cmake b/buildconfig/CMake/Sanitizers.cmake new file mode 100644 index 0000000000000000000000000000000000000000..4e8c29a8e274edb188102534cc753a2b8ced9ba1 --- /dev/null +++ b/buildconfig/CMake/Sanitizers.cmake @@ -0,0 +1,62 @@ +################################################# +# Controls various project wide sanitizer options +################################################# + +set(USE_SANITIZER "Off" CACHE STRING "Sanitizer mode to enable") +set_property(CACHE USE_SANITIZER PROPERTY STRINGS + Off Address Thread Undefined) + +string(TOLOWER "${USE_SANITIZER}" USE_SANITIZERS_LOWER) + +if(NOT ${USE_SANITIZERS_LOWER} MATCHES "off") + # Check we have a supported compiler + if(WIN32) + message(FATAL_ERROR "Windows does not support sanitizers") + endif() + + if(CMAKE_COMPILER_IS_GNUCXX AND (NOT CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 8)) + message(FATAL_ERROR "GCC 7 and below do not support sanitizers") + endif() + + # Check and warn if we are not in a mode without debug symbols + string(TOLOWER "${CMAKE_BUILD_TYPE}" build_type_lower) + if("${build_type_lower}" MATCHES "release" OR "${build_type_lower}" MATCHES "minsizerel" ) + message(WARNING "You are running address sanitizers without debug information, try RelWithDebInfo") + + elseif(${build_type_lower} MATCHES "relwithdebinfo") + # RelWithDebug runs with -o2 which performs inlining reducing the usefulness + message("Replacing -O2 flag with -O1 to preserve stack trace on sanitizers") + string(REPLACE "-O2" "-O1" CMAKE_CXX_FLAGS_RELWITHDEBINFO ${CMAKE_CXX_FLAGS_RELWITHDEBINFO}) + string(REPLACE "-O2" "-O1" CMAKE_C_FLAGS_RELWITHDEBINFO ${CMAKE_C_FLAGS_RELWITHDEBINFO}) + + set(CMAKE_CXX_FLAGS_RELWITHDEBINFO ${CMAKE_CXX_FLAGS_RELWITHDEBINFO} CACHE STRING "" FORCE) + set(CMAKE_C_FLAGS_RELWITHDEBINFO ${CMAKE_C_FLAGS_RELWITHDEBINFO} CACHE STRING "" FORCE) + + add_compile_options(-fno-omit-frame-pointer -fno-optimize-sibling-calls) + endif() +endif() + +# Allow all instrumented code to continue beyond the first error +add_compile_options($<$<NOT:$<STREQUAL:$<LOWER_CASE:"${USE_SANITIZER}">,"off">>:-fsanitize-recover=all>) + +# Address +add_compile_options( + $<$<STREQUAL:$<LOWER_CASE:"${USE_SANITIZER}">,"address">:-fsanitize=address>) +add_link_options( + $<$<STREQUAL:$<LOWER_CASE:"${USE_SANITIZER}">,"address">:-fsanitize=address>) + +# Thread +add_compile_options( + $<$<STREQUAL:$<LOWER_CASE:"${USE_SANITIZER}">,"thread">:-fsanitize=thread>) +add_link_options( + $<$<STREQUAL:$<LOWER_CASE:"${USE_SANITIZER}">,"thread">:-fsanitize=thread>) + +# Undefined +# RTTI information is not exported for some classes causing the +# linker to fail whilst adding vptr instrumentation +add_compile_options( + $<$<STREQUAL:$<LOWER_CASE:"${USE_SANITIZER}">,"undefined">:-fsanitize=undefined> + $<$<STREQUAL:$<LOWER_CASE:"${USE_SANITIZER}">,"undefined">:-fno-sanitize=vptr>) + +add_link_options( + $<$<STREQUAL:$<LOWER_CASE:"${USE_SANITIZER}">,"undefined">:-fsanitize=undefined>) diff --git a/buildconfig/CMake/Span.cmake b/buildconfig/CMake/Span.cmake index 120f837fcf1bf8eeca6611b21d1b8b739052b4c4..426d1880d95ec859b5d6bf0838d574cf9b236721 100644 --- a/buildconfig/CMake/Span.cmake +++ b/buildconfig/CMake/Span.cmake @@ -1,12 +1,20 @@ -include(ExternalProject) +include(FetchContent) +message(STATUS "Using external tcbrindle/span") -message(STATUS "Using tcbrindle/span in ExternalProject") +find_package(Git) -# Download and unpack Eigen at configure time -configure_file(${CMAKE_SOURCE_DIR}/buildconfig/CMake/Span.in ${CMAKE_BINARY_DIR}/extern-span/CMakeLists.txt) +set ( _apply_flags --ignore-space-change --whitespace=fix ) -execute_process(COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" -DCMAKE_SYSTEM_VERSION=${CMAKE_SYSTEM_VERSION} . WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/extern-span ) -execute_process(COMMAND ${CMAKE_COMMAND} --build . WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/extern-span ) - -set(SPAN_INCLUDE_DIR "${CMAKE_BINARY_DIR}/extern-span/span-prefix/src/span/include" CACHE PATH "") +FetchContent_Declare( + span + GIT_REPOSITORY https://github.com/tcbrindle/span.git + GIT_TAG 08cb4bf0e06c0e36f7e2b64e488ede711a8bb5ad + PATCH_COMMAND "${GIT_EXECUTABLE}" reset --hard ${_tag} + COMMAND "${GIT_EXECUTABLE}" apply ${_apply_flags} "${CMAKE_SOURCE_DIR}/buildconfig/CMake/span_disable_testing.patch" +) +FetchContent_GetProperties(span) +if(NOT span_POPULATED) + FetchContent_Populate(span) + add_subdirectory(${span_SOURCE_DIR} ${span_BINARY_DIR} EXCLUDE_FROM_ALL) +endif() diff --git a/buildconfig/CMake/Span.in b/buildconfig/CMake/Span.in deleted file mode 100644 index 60f79cc7919325210497817e8ed77b198bea2e79..0000000000000000000000000000000000000000 --- a/buildconfig/CMake/Span.in +++ /dev/null @@ -1,14 +0,0 @@ -cmake_minimum_required ( VERSION 3.5 ) - -project(span-download NONE) - -include( ExternalProject ) - -ExternalProject_Add(span - GIT_REPOSITORY "https://github.com/tcbrindle/span.git" - GIT_TAG "e9cf0809c9b8b9ecd06db782dc631f138fab4ee8" - CONFIGURE_COMMAND "" - BUILD_COMMAND "" - INSTALL_COMMAND "" - TEST_COMMAND "" -) diff --git a/buildconfig/CMake/googletest_msvc_cpp11.patch b/buildconfig/CMake/googletest_msvc_cpp11.patch deleted file mode 100644 index 339251b3bcb19f54b863abb811b0eaa12c7d3cf9..0000000000000000000000000000000000000000 --- a/buildconfig/CMake/googletest_msvc_cpp11.patch +++ /dev/null @@ -1,41 +0,0 @@ -diff --git a/googletest/include/gtest/internal/gtest-port.h b/googletest/include/gtest/internal/gtest-port.h -index 5529ba544..331483e73 100644 ---- a/googletest/include/gtest/internal/gtest-port.h -+++ b/googletest/include/gtest/internal/gtest-port.h -@@ -325,7 +325,7 @@ - // -std={c,gnu}++{0x,11} is passed. The C++11 standard specifies a - // value for __cplusplus, and recent versions of clang, gcc, and - // probably other compilers set that too in C++11 mode. --# if __GXX_EXPERIMENTAL_CXX0X__ || __cplusplus >= 201103L -+# if __GXX_EXPERIMENTAL_CXX0X__ || __cplusplus >= 201103L || _MSC_VER >= 1900 - // Compiling in at least C++11 mode. - # define GTEST_LANG_CXX11 1 - # else -@@ -357,12 +357,16 @@ - #if GTEST_STDLIB_CXX11 - # define GTEST_HAS_STD_BEGIN_AND_END_ 1 - # define GTEST_HAS_STD_FORWARD_LIST_ 1 --# define GTEST_HAS_STD_FUNCTION_ 1 -+# if !defined(_MSC_VER) || (_MSC_FULL_VER >= 190023824) // works only with VS2015U2 and better -+# define GTEST_HAS_STD_FUNCTION_ 1 -+# endif - # define GTEST_HAS_STD_INITIALIZER_LIST_ 1 - # define GTEST_HAS_STD_MOVE_ 1 - # define GTEST_HAS_STD_SHARED_PTR_ 1 - # define GTEST_HAS_STD_TYPE_TRAITS_ 1 - # define GTEST_HAS_STD_UNIQUE_PTR_ 1 -+# define GTEST_HAS_UNORDERED_MAP_ 1 -+# define GTEST_HAS_UNORDERED_SET_ 1 - #endif - - // C++11 specifies that <tuple> provides std::tuple. -@@ -660,7 +664,8 @@ typedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SECTION; - // support TR1 tuple. libc++ only provides std::tuple, in C++11 mode, - // and it can be used with some compilers that define __GNUC__. - # if (defined(__GNUC__) && !defined(__CUDACC__) && (GTEST_GCC_VER_ >= 40000) \ -- && !GTEST_OS_QNX && !defined(_LIBCPP_VERSION)) || _MSC_VER >= 1600 -+ && !GTEST_OS_QNX && !defined(_LIBCPP_VERSION)) \ -+ || (_MSC_VER >= 1600 && _MSC_VER < 1900) - # define GTEST_ENV_HAS_TR1_TUPLE_ 1 - # endif - diff --git a/buildconfig/CMake/googletest_override.patch b/buildconfig/CMake/googletest_override.patch deleted file mode 100644 index 0d162f1e4ea2e38dd0fe36461c55d70fa7e614e7..0000000000000000000000000000000000000000 --- a/buildconfig/CMake/googletest_override.patch +++ /dev/null @@ -1,475 +0,0 @@ -:100644 100644 33b37a7... 0000000... M googlemock/include/gmock/gmock-matchers.h -:100644 100644 fed7de6... 0000000... M googlemock/include/gmock/gmock-spec-builders.h -:100644 100644 50ec728... 0000000... M googlemock/src/gmock-cardinalities.cc -:100644 100644 fb53080... 0000000... M googlemock/src/gmock-internal-utils.cc -:100644 100644 f63fa9a... 0000000... M googletest/include/gtest/gtest-spi.h -:100644 100644 77eb844... 0000000... M googletest/include/gtest/gtest-test-part.h -:100644 100644 f846c5b... 0000000... M googletest/include/gtest/gtest.h -:100644 100644 2b3a78f... 0000000... M googletest/include/gtest/internal/gtest-death-test-internal.h -:100644 100644 82cab9b... 0000000... M googletest/include/gtest/internal/gtest-param-util.h -:100644 100644 0094ed5... 0000000... M googletest/include/gtest/internal/gtest-port.h -:100644 100644 a01a369... 0000000... M googletest/src/gtest-death-test.cc -:100644 100644 ed8a682... 0000000... M googletest/src/gtest-internal-inl.h -:100644 100644 d882ab2... 0000000... M googletest/src/gtest.cc - -diff --git a/googlemock/include/gmock/gmock-matchers.h b/googlemock/include/gmock/gmock-matchers.h -index 33b37a7..ccb66ca 100644 ---- a/googlemock/include/gmock/gmock-matchers.h -+++ b/googlemock/include/gmock/gmock-matchers.h -@@ -904,14 +904,14 @@ class ComparisonBase { - public: - explicit Impl(const Rhs& rhs) : rhs_(rhs) {} - virtual bool MatchAndExplain( -- Lhs lhs, MatchResultListener* /* listener */) const { -+ Lhs lhs, MatchResultListener* /* listener */) const override { - return Op()(lhs, rhs_); - } -- virtual void DescribeTo(::std::ostream* os) const { -+ virtual void DescribeTo(::std::ostream* os) const override { - *os << D::Desc() << " "; - UniversalPrint(rhs_, os); - } -- virtual void DescribeNegationTo(::std::ostream* os) const { -+ virtual void DescribeNegationTo(::std::ostream* os) const override { - *os << D::NegatedDesc() << " "; - UniversalPrint(rhs_, os); - } -diff --git a/googlemock/include/gmock/gmock-spec-builders.h b/googlemock/include/gmock/gmock-spec-builders.h -index fed7de6..0ce84c4 100644 ---- a/googlemock/include/gmock/gmock-spec-builders.h -+++ b/googlemock/include/gmock/gmock-spec-builders.h -@@ -1421,7 +1421,7 @@ class ActionResultHolder<void> : public UntypedActionResultHolderBase { - public: - void Unwrap() { } - -- virtual void PrintAsActionResult(::std::ostream* /* os */) const {} -+ virtual void PrintAsActionResult(::std::ostream* /* os */) const override {} - - // Performs the given mock function's default action and returns ownership - // of an empty ActionResultHolder*. -diff --git a/googlemock/src/gmock-cardinalities.cc b/googlemock/src/gmock-cardinalities.cc -index 50ec728..529502f 100644 ---- a/googlemock/src/gmock-cardinalities.cc -+++ b/googlemock/src/gmock-cardinalities.cc -@@ -71,18 +71,18 @@ class BetweenCardinalityImpl : public CardinalityInterface { - - // Conservative estimate on the lower/upper bound of the number of - // calls allowed. -- virtual int ConservativeLowerBound() const { return min_; } -- virtual int ConservativeUpperBound() const { return max_; } -+ virtual int ConservativeLowerBound() const override { return min_; } -+ virtual int ConservativeUpperBound() const override { return max_; } - -- virtual bool IsSatisfiedByCallCount(int call_count) const { -+ virtual bool IsSatisfiedByCallCount(int call_count) const override { - return min_ <= call_count && call_count <= max_; - } - -- virtual bool IsSaturatedByCallCount(int call_count) const { -+ virtual bool IsSaturatedByCallCount(int call_count) const override { - return call_count >= max_; - } - -- virtual void DescribeTo(::std::ostream* os) const; -+ virtual void DescribeTo(::std::ostream* os) const override; - - private: - const int min_; -diff --git a/googlemock/src/gmock-internal-utils.cc b/googlemock/src/gmock-internal-utils.cc -index fb53080..e6e26ee 100644 ---- a/googlemock/src/gmock-internal-utils.cc -+++ b/googlemock/src/gmock-internal-utils.cc -@@ -76,7 +76,7 @@ GTEST_API_ string ConvertIdentifierNameToWords(const char* id_name) { - class GoogleTestFailureReporter : public FailureReporterInterface { - public: - virtual void ReportFailure(FailureType type, const char* file, int line, -- const string& message) { -+ const string& message) override { - AssertHelper(type == kFatal ? - TestPartResult::kFatalFailure : - TestPartResult::kNonFatalFailure, -diff --git a/googletest/include/gtest/gtest-spi.h b/googletest/include/gtest/gtest-spi.h -index f63fa9a..f59ec6d 100644 ---- a/googletest/include/gtest/gtest-spi.h -+++ b/googletest/include/gtest/gtest-spi.h -@@ -75,7 +75,7 @@ class GTEST_API_ ScopedFakeTestPartResultReporter - // - // This method is from the TestPartResultReporterInterface - // interface. -- virtual void ReportTestPartResult(const TestPartResult& result); -+ virtual void ReportTestPartResult(const TestPartResult& result) override; - private: - void Init(); - -diff --git a/googletest/include/gtest/gtest-test-part.h b/googletest/include/gtest/gtest-test-part.h -index 77eb844..b93b114 100644 ---- a/googletest/include/gtest/gtest-test-part.h -+++ b/googletest/include/gtest/gtest-test-part.h -@@ -162,8 +162,8 @@ class GTEST_API_ HasNewFatalFailureHelper - : public TestPartResultReporterInterface { - public: - HasNewFatalFailureHelper(); -- virtual ~HasNewFatalFailureHelper(); -- virtual void ReportTestPartResult(const TestPartResult& result); -+ virtual ~HasNewFatalFailureHelper() override; -+ virtual void ReportTestPartResult(const TestPartResult& result) override; - bool has_new_fatal_failure() const { return has_new_fatal_failure_; } - private: - bool has_new_fatal_failure_; -diff --git a/googletest/include/gtest/gtest.h b/googletest/include/gtest/gtest.h -index f846c5b..5df3dab 100644 ---- a/googletest/include/gtest/gtest.h -+++ b/googletest/include/gtest/gtest.h -@@ -1043,21 +1043,21 @@ class TestEventListener { - // above. - class EmptyTestEventListener : public TestEventListener { - public: -- virtual void OnTestProgramStart(const UnitTest& /*unit_test*/) {} -+ virtual void OnTestProgramStart(const UnitTest& /*unit_test*/) override {} - virtual void OnTestIterationStart(const UnitTest& /*unit_test*/, -- int /*iteration*/) {} -- virtual void OnEnvironmentsSetUpStart(const UnitTest& /*unit_test*/) {} -- virtual void OnEnvironmentsSetUpEnd(const UnitTest& /*unit_test*/) {} -- virtual void OnTestCaseStart(const TestCase& /*test_case*/) {} -- virtual void OnTestStart(const TestInfo& /*test_info*/) {} -- virtual void OnTestPartResult(const TestPartResult& /*test_part_result*/) {} -- virtual void OnTestEnd(const TestInfo& /*test_info*/) {} -- virtual void OnTestCaseEnd(const TestCase& /*test_case*/) {} -- virtual void OnEnvironmentsTearDownStart(const UnitTest& /*unit_test*/) {} -- virtual void OnEnvironmentsTearDownEnd(const UnitTest& /*unit_test*/) {} -+ int /*iteration*/) override {} -+ virtual void OnEnvironmentsSetUpStart(const UnitTest& /*unit_test*/) override {} -+ virtual void OnEnvironmentsSetUpEnd(const UnitTest& /*unit_test*/) override {} -+ virtual void OnTestCaseStart(const TestCase& /*test_case*/) override {} -+ virtual void OnTestStart(const TestInfo& /*test_info*/) override {} -+ virtual void OnTestPartResult(const TestPartResult& /*test_part_result*/) override {} -+ virtual void OnTestEnd(const TestInfo& /*test_info*/) override {} -+ virtual void OnTestCaseEnd(const TestCase& /*test_case*/) override {} -+ virtual void OnEnvironmentsTearDownStart(const UnitTest& /*unit_test*/) override {} -+ virtual void OnEnvironmentsTearDownEnd(const UnitTest& /*unit_test*/) override {} - virtual void OnTestIterationEnd(const UnitTest& /*unit_test*/, -- int /*iteration*/) {} -- virtual void OnTestProgramEnd(const UnitTest& /*unit_test*/) {} -+ int /*iteration*/) override {} -+ virtual void OnTestProgramEnd(const UnitTest& /*unit_test*/) override {} - }; - - // TestEventListeners lets users add listeners to track events in Google Test. -diff --git a/googletest/include/gtest/internal/gtest-death-test-internal.h b/googletest/include/gtest/internal/gtest-death-test-internal.h -index 2b3a78f..a82aec1 100644 ---- a/googletest/include/gtest/internal/gtest-death-test-internal.h -+++ b/googletest/include/gtest/internal/gtest-death-test-internal.h -@@ -148,7 +148,7 @@ class DeathTestFactory { - class DefaultDeathTestFactory : public DeathTestFactory { - public: - virtual bool Create(const char* statement, const RE* regex, -- const char* file, int line, DeathTest** test); -+ const char* file, int line, DeathTest** test) override; - }; - - // Returns true if exit_status describes a process that was terminated -diff --git a/googletest/include/gtest/internal/gtest-param-util.h b/googletest/include/gtest/internal/gtest-param-util.h -index 82cab9b..a64b698 100644 ---- a/googletest/include/gtest/internal/gtest-param-util.h -+++ b/googletest/include/gtest/internal/gtest-param-util.h -@@ -296,10 +296,10 @@ class ValuesInIteratorRangeGenerator : public ParamGeneratorInterface<T> { - : container_(begin, end) {} - virtual ~ValuesInIteratorRangeGenerator() {} - -- virtual ParamIteratorInterface<T>* Begin() const { -+ virtual ParamIteratorInterface<T>* Begin() const override { - return new Iterator(this, container_.begin()); - } -- virtual ParamIteratorInterface<T>* End() const { -+ virtual ParamIteratorInterface<T>* End() const override { - return new Iterator(this, container_.end()); - } - -@@ -313,14 +313,14 @@ class ValuesInIteratorRangeGenerator : public ParamGeneratorInterface<T> { - : base_(base), iterator_(iterator) {} - virtual ~Iterator() {} - -- virtual const ParamGeneratorInterface<T>* BaseGenerator() const { -+ virtual const ParamGeneratorInterface<T>* BaseGenerator() const override { - return base_; - } -- virtual void Advance() { -+ virtual void Advance() override { - ++iterator_; - value_.reset(); - } -- virtual ParamIteratorInterface<T>* Clone() const { -+ virtual ParamIteratorInterface<T>* Clone() const override { - return new Iterator(*this); - } - // We need to use cached value referenced by iterator_ because *iterator_ -@@ -330,12 +330,12 @@ class ValuesInIteratorRangeGenerator : public ParamGeneratorInterface<T> { - // can advance iterator_ beyond the end of the range, and we cannot - // detect that fact. The client code, on the other hand, is - // responsible for not calling Current() on an out-of-range iterator. -- virtual const T* Current() const { -+ virtual const T* Current() const override { - if (value_.get() == NULL) - value_.reset(new T(*iterator_)); - return value_.get(); - } -- virtual bool Equals(const ParamIteratorInterface<T>& other) const { -+ virtual bool Equals(const ParamIteratorInterface<T>& other) const override { - // Having the same base generator guarantees that the other - // iterator is of the same type and we can downcast. - GTEST_CHECK_(BaseGenerator() == other.BaseGenerator()) -diff --git a/googletest/include/gtest/internal/gtest-port.h b/googletest/include/gtest/internal/gtest-port.h -index 0094ed5..e924906 100644 ---- a/googletest/include/gtest/internal/gtest-port.h -+++ b/googletest/include/gtest/internal/gtest-port.h -@@ -2098,7 +2098,7 @@ class ThreadLocal { - class DefaultValueHolderFactory : public ValueHolderFactory { - public: - DefaultValueHolderFactory() {} -- virtual ValueHolder* MakeNewHolder() const { return new ValueHolder(); } -+ virtual ValueHolder* MakeNewHolder() const override { return new ValueHolder(); } - - private: - GTEST_DISALLOW_COPY_AND_ASSIGN_(DefaultValueHolderFactory); -@@ -2107,7 +2107,7 @@ class ThreadLocal { - class InstanceValueHolderFactory : public ValueHolderFactory { - public: - explicit InstanceValueHolderFactory(const T& value) : value_(value) {} -- virtual ValueHolder* MakeNewHolder() const { -+ virtual ValueHolder* MakeNewHolder() const override { - return new ValueHolder(value_); - } - -diff --git a/googletest/src/gtest-death-test.cc b/googletest/src/gtest-death-test.cc -index a01a369..f7241cd 100644 ---- a/googletest/src/gtest-death-test.cc -+++ b/googletest/src/gtest-death-test.cc -@@ -384,8 +384,8 @@ class DeathTestImpl : public DeathTest { - // read_fd_ is expected to be closed and cleared by a derived class. - ~DeathTestImpl() { GTEST_DEATH_TEST_CHECK_(read_fd_ == -1); } - -- void Abort(AbortReason reason); -- virtual bool Passed(bool status_ok); -+ void Abort(AbortReason reason) override; -+ virtual bool Passed(bool status_ok) override; - - const char* statement() const { return statement_; } - const RE* regex() const { return regex_; } -@@ -789,7 +789,7 @@ class ForkingDeathTest : public DeathTestImpl { - ForkingDeathTest(const char* statement, const RE* regex); - - // All of these virtual functions are inherited from DeathTest. -- virtual int Wait(); -+ virtual int Wait() override; - - protected: - void set_child_pid(pid_t child_pid) { child_pid_ = child_pid; } -@@ -825,7 +825,7 @@ class NoExecDeathTest : public ForkingDeathTest { - public: - NoExecDeathTest(const char* a_statement, const RE* a_regex) : - ForkingDeathTest(a_statement, a_regex) { } -- virtual TestRole AssumeRole(); -+ virtual TestRole AssumeRole() override; - }; - - // The AssumeRole process for a fork-and-run death test. It implements a -@@ -881,7 +881,7 @@ class ExecDeathTest : public ForkingDeathTest { - ExecDeathTest(const char* a_statement, const RE* a_regex, - const char* file, int line) : - ForkingDeathTest(a_statement, a_regex), file_(file), line_(line) { } -- virtual TestRole AssumeRole(); -+ virtual TestRole AssumeRole() override; - private: - static ::std::vector<testing::internal::string> - GetArgvsForDeathTestChildProcess() { -diff --git a/googletest/src/gtest-internal-inl.h b/googletest/src/gtest-internal-inl.h -index ed8a682..c89fe14 100644 ---- a/googletest/src/gtest-internal-inl.h -+++ b/googletest/src/gtest-internal-inl.h -@@ -446,8 +446,8 @@ class OsStackTraceGetter : public OsStackTraceGetterInterface { - public: - OsStackTraceGetter() {} - -- virtual string CurrentStackTrace(int max_depth, int skip_count); -- virtual void UponLeavingGTest(); -+ virtual string CurrentStackTrace(int max_depth, int skip_count) override; -+ virtual void UponLeavingGTest() override; - - private: - GTEST_DISALLOW_COPY_AND_ASSIGN_(OsStackTraceGetter); -@@ -468,7 +468,7 @@ class DefaultGlobalTestPartResultReporter - explicit DefaultGlobalTestPartResultReporter(UnitTestImpl* unit_test); - // Implements the TestPartResultReporterInterface. Reports the test part - // result in the current test. -- virtual void ReportTestPartResult(const TestPartResult& result); -+ virtual void ReportTestPartResult(const TestPartResult& result) override; - - private: - UnitTestImpl* const unit_test_; -@@ -484,7 +484,7 @@ class DefaultPerThreadTestPartResultReporter - explicit DefaultPerThreadTestPartResultReporter(UnitTestImpl* unit_test); - // Implements the TestPartResultReporterInterface. The implementation just - // delegates to the current global test part result reporter of *unit_test_. -- virtual void ReportTestPartResult(const TestPartResult& result); -+ virtual void ReportTestPartResult(const TestPartResult& result) override; - - private: - UnitTestImpl* const unit_test_; -@@ -1065,7 +1065,7 @@ class GTEST_API_ StreamingListener : public EmptyTestEventListener { - } - - // Sends a string to the socket. -- virtual void Send(const string& message) { -+ virtual void Send(const string& message) override { - GTEST_CHECK_(sockfd_ != -1) - << "Send() can be called only when there is a connection."; - -@@ -1082,7 +1082,7 @@ class GTEST_API_ StreamingListener : public EmptyTestEventListener { - void MakeConnection(); - - // Closes the socket. -- void CloseConnection() { -+ void CloseConnection() override { - GTEST_CHECK_(sockfd_ != -1) - << "CloseConnection() can be called only when there is a connection."; - -@@ -1106,11 +1106,11 @@ class GTEST_API_ StreamingListener : public EmptyTestEventListener { - explicit StreamingListener(AbstractSocketWriter* socket_writer) - : socket_writer_(socket_writer) { Start(); } - -- void OnTestProgramStart(const UnitTest& /* unit_test */) { -+ void OnTestProgramStart(const UnitTest& /* unit_test */) override { - SendLn("event=TestProgramStart"); - } - -- void OnTestProgramEnd(const UnitTest& unit_test) { -+ void OnTestProgramEnd(const UnitTest& unit_test) override { - // Note that Google Test current only report elapsed time for each - // test iteration, not for the entire test program. - SendLn("event=TestProgramEnd&passed=" + FormatBool(unit_test.Passed())); -@@ -1119,39 +1119,39 @@ class GTEST_API_ StreamingListener : public EmptyTestEventListener { - socket_writer_->CloseConnection(); - } - -- void OnTestIterationStart(const UnitTest& /* unit_test */, int iteration) { -+ void OnTestIterationStart(const UnitTest& /* unit_test */, int iteration) override { - SendLn("event=TestIterationStart&iteration=" + - StreamableToString(iteration)); - } - -- void OnTestIterationEnd(const UnitTest& unit_test, int /* iteration */) { -+ void OnTestIterationEnd(const UnitTest& unit_test, int /* iteration */) override { - SendLn("event=TestIterationEnd&passed=" + - FormatBool(unit_test.Passed()) + "&elapsed_time=" + - StreamableToString(unit_test.elapsed_time()) + "ms"); - } - -- void OnTestCaseStart(const TestCase& test_case) { -+ void OnTestCaseStart(const TestCase& test_case) override { - SendLn(std::string("event=TestCaseStart&name=") + test_case.name()); - } - -- void OnTestCaseEnd(const TestCase& test_case) { -+ void OnTestCaseEnd(const TestCase& test_case) override { - SendLn("event=TestCaseEnd&passed=" + FormatBool(test_case.Passed()) - + "&elapsed_time=" + StreamableToString(test_case.elapsed_time()) - + "ms"); - } - -- void OnTestStart(const TestInfo& test_info) { -+ void OnTestStart(const TestInfo& test_info) override { - SendLn(std::string("event=TestStart&name=") + test_info.name()); - } - -- void OnTestEnd(const TestInfo& test_info) { -+ void OnTestEnd(const TestInfo& test_info) override { - SendLn("event=TestEnd&passed=" + - FormatBool((test_info.result())->Passed()) + - "&elapsed_time=" + - StreamableToString((test_info.result())->elapsed_time()) + "ms"); - } - -- void OnTestPartResult(const TestPartResult& test_part_result) { -+ void OnTestPartResult(const TestPartResult& test_part_result) override { - const char* file_name = test_part_result.file_name(); - if (file_name == NULL) - file_name = ""; -diff --git a/googletest/src/gtest.cc b/googletest/src/gtest.cc -index d882ab2..041047d 100644 ---- a/googletest/src/gtest.cc -+++ b/googletest/src/gtest.cc -@@ -3034,19 +3034,19 @@ class PrettyUnitTestResultPrinter : public TestEventListener { - } - - // The following methods override what's in the TestEventListener class. -- virtual void OnTestProgramStart(const UnitTest& /*unit_test*/) {} -- virtual void OnTestIterationStart(const UnitTest& unit_test, int iteration); -- virtual void OnEnvironmentsSetUpStart(const UnitTest& unit_test); -- virtual void OnEnvironmentsSetUpEnd(const UnitTest& /*unit_test*/) {} -- virtual void OnTestCaseStart(const TestCase& test_case); -- virtual void OnTestStart(const TestInfo& test_info); -- virtual void OnTestPartResult(const TestPartResult& result); -- virtual void OnTestEnd(const TestInfo& test_info); -- virtual void OnTestCaseEnd(const TestCase& test_case); -- virtual void OnEnvironmentsTearDownStart(const UnitTest& unit_test); -- virtual void OnEnvironmentsTearDownEnd(const UnitTest& /*unit_test*/) {} -- virtual void OnTestIterationEnd(const UnitTest& unit_test, int iteration); -- virtual void OnTestProgramEnd(const UnitTest& /*unit_test*/) {} -+ virtual void OnTestProgramStart(const UnitTest& /*unit_test*/) override {} -+ virtual void OnTestIterationStart(const UnitTest& unit_test, int iteration) override; -+ virtual void OnEnvironmentsSetUpStart(const UnitTest& unit_test) override; -+ virtual void OnEnvironmentsSetUpEnd(const UnitTest& /*unit_test*/) override {} -+ virtual void OnTestCaseStart(const TestCase& test_case) override; -+ virtual void OnTestStart(const TestInfo& test_info) override; -+ virtual void OnTestPartResult(const TestPartResult& result) override; -+ virtual void OnTestEnd(const TestInfo& test_info) override; -+ virtual void OnTestCaseEnd(const TestCase& test_case) override; -+ virtual void OnEnvironmentsTearDownStart(const UnitTest& unit_test) override; -+ virtual void OnEnvironmentsTearDownEnd(const UnitTest& /*unit_test*/) override {} -+ virtual void OnTestIterationEnd(const UnitTest& unit_test, int iteration) override; -+ virtual void OnTestProgramEnd(const UnitTest& /*unit_test*/) override {} - - private: - static void PrintFailedTests(const UnitTest& unit_test); -@@ -3245,19 +3245,19 @@ class TestEventRepeater : public TestEventListener { - bool forwarding_enabled() const { return forwarding_enabled_; } - void set_forwarding_enabled(bool enable) { forwarding_enabled_ = enable; } - -- virtual void OnTestProgramStart(const UnitTest& unit_test); -- virtual void OnTestIterationStart(const UnitTest& unit_test, int iteration); -- virtual void OnEnvironmentsSetUpStart(const UnitTest& unit_test); -- virtual void OnEnvironmentsSetUpEnd(const UnitTest& unit_test); -- virtual void OnTestCaseStart(const TestCase& test_case); -- virtual void OnTestStart(const TestInfo& test_info); -- virtual void OnTestPartResult(const TestPartResult& result); -- virtual void OnTestEnd(const TestInfo& test_info); -- virtual void OnTestCaseEnd(const TestCase& test_case); -- virtual void OnEnvironmentsTearDownStart(const UnitTest& unit_test); -- virtual void OnEnvironmentsTearDownEnd(const UnitTest& unit_test); -- virtual void OnTestIterationEnd(const UnitTest& unit_test, int iteration); -- virtual void OnTestProgramEnd(const UnitTest& unit_test); -+ virtual void OnTestProgramStart(const UnitTest& unit_test) override; -+ virtual void OnTestIterationStart(const UnitTest& unit_test, int iteration) override; -+ virtual void OnEnvironmentsSetUpStart(const UnitTest& unit_test) override; -+ virtual void OnEnvironmentsSetUpEnd(const UnitTest& unit_test) override; -+ virtual void OnTestCaseStart(const TestCase& test_case) override; -+ virtual void OnTestStart(const TestInfo& test_info) override; -+ virtual void OnTestPartResult(const TestPartResult& result) override; -+ virtual void OnTestEnd(const TestInfo& test_info) override; -+ virtual void OnTestCaseEnd(const TestCase& test_case) override; -+ virtual void OnEnvironmentsTearDownStart(const UnitTest& unit_test) override; -+ virtual void OnEnvironmentsTearDownEnd(const UnitTest& unit_test) override; -+ virtual void OnTestIterationEnd(const UnitTest& unit_test, int iteration) override; -+ virtual void OnTestProgramEnd(const UnitTest& unit_test) override; - - private: - // Controls whether events will be forwarded to listeners_. Set to false -@@ -3350,7 +3350,7 @@ class XmlUnitTestResultPrinter : public EmptyTestEventListener { - public: - explicit XmlUnitTestResultPrinter(const char* output_file); - -- virtual void OnTestIterationEnd(const UnitTest& unit_test, int iteration); -+ virtual void OnTestIterationEnd(const UnitTest& unit_test, int iteration) override; - - private: - // Is c a whitespace character that is normalized to a space character diff --git a/buildconfig/CMake/googletest_static.patch b/buildconfig/CMake/googletest_static.patch deleted file mode 100644 index bda83e589d5b173e79c5f1f28e6e2abefc8e6451..0000000000000000000000000000000000000000 --- a/buildconfig/CMake/googletest_static.patch +++ /dev/null @@ -1,86 +0,0 @@ -:100644 100644 8d2b552... 0000000... M CMakeLists.txt -:100644 100644 beb259a... 0000000... M googlemock/CMakeLists.txt -:100644 100644 621d0f0... 0000000... M googletest/CMakeLists.txt - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 8d2b552..5c0d122 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -1,5 +1,3 @@ --cmake_minimum_required(VERSION 2.6.2) -- - project( googletest-distribution ) - - enable_testing() -diff --git a/googlemock/CMakeLists.txt b/googlemock/CMakeLists.txt -index beb259a..6f0cb3b 100644 ---- a/googlemock/CMakeLists.txt -+++ b/googlemock/CMakeLists.txt -@@ -7,7 +7,7 @@ - - # BUILD_SHARED_LIBS is a standard CMake variable, but we declare it here to - # make it prominent in the GUI. --option(BUILD_SHARED_LIBS "Build shared libraries (DLLs)." OFF) -+set(BUILD_SHARED_LIBS OFF) - - option(gmock_build_tests "Build all of Google Mock's own tests." OFF) - -@@ -38,7 +38,6 @@ endif() - # ${gmock_BINARY_DIR}. - # Language "C" is required for find_package(Threads). - project(gmock CXX C) --cmake_minimum_required(VERSION 2.6.2) - - if (COMMAND set_up_hermetic_build) - set_up_hermetic_build() -@@ -103,10 +102,10 @@ endif() - ######################################################################## - # - # Install rules --install(TARGETS gmock gmock_main -- DESTINATION lib) --install(DIRECTORY ${gmock_SOURCE_DIR}/include/gmock -- DESTINATION include) -+#install(TARGETS gmock gmock_main -+# DESTINATION lib) -+#install(DIRECTORY ${gmock_SOURCE_DIR}/include/gmock -+# DESTINATION include) - - ######################################################################## - # -diff --git a/googletest/CMakeLists.txt b/googletest/CMakeLists.txt -index 621d0f0..c77f9ef 100644 ---- a/googletest/CMakeLists.txt -+++ b/googletest/CMakeLists.txt -@@ -7,7 +7,7 @@ - - # BUILD_SHARED_LIBS is a standard CMake variable, but we declare it here to - # make it prominent in the GUI. --option(BUILD_SHARED_LIBS "Build shared libraries (DLLs)." OFF) -+set(BUILD_SHARED_LIBS OFF) - - # When other libraries are using a shared version of runtime libraries, - # Google Test also has to use one. -@@ -45,7 +45,6 @@ endif() - # ${gtest_BINARY_DIR}. - # Language "C" is required for find_package(Threads). - project(gtest CXX C) --cmake_minimum_required(VERSION 2.6.2) - - if (COMMAND set_up_hermetic_build) - set_up_hermetic_build() -@@ -102,10 +101,10 @@ endif() - ######################################################################## - # - # Install rules --install(TARGETS gtest gtest_main -- DESTINATION lib) --install(DIRECTORY ${gtest_SOURCE_DIR}/include/gtest -- DESTINATION include) -+#install(TARGETS gtest gtest_main -+# DESTINATION lib) -+#install(DIRECTORY ${gtest_SOURCE_DIR}/include/gtest -+# DESTINATION include) - - ######################################################################## - # diff --git a/buildconfig/CMake/googletest_wconversion.patch b/buildconfig/CMake/googletest_wconversion.patch deleted file mode 100644 index 3ba9d824fb3ef7ec4430da491c5d2eb057d66d3b..0000000000000000000000000000000000000000 --- a/buildconfig/CMake/googletest_wconversion.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff --git a/googlemock/include/gmock/gmock-matchers.h b/googlemock/include/gmock/gmock-matchers.h -index 33b37a7..fbb5734 100644 ---- a/googlemock/include/gmock/gmock-matchers.h -+++ b/googlemock/include/gmock/gmock-matchers.h -@@ -1620,8 +1620,13 @@ class VariadicMatcher { - } - - private: -+#if defined(__GNUC__) && !defined(__clang__) -+#pragma GCC diagnostic ignored "-Wconversion" -+#endif - typedef MatcherList<sizeof...(Args), Args...> MatcherListType; -- -+#if defined(__GNUC__) && !defined(__clang__) -+#pragma GCC diagnostic warning "-Wconversion" -+#endif - const typename MatcherListType::ListType matchers_; - - GTEST_DISALLOW_ASSIGN_(VariadicMatcher); diff --git a/buildconfig/CMake/span_disable_testing.patch b/buildconfig/CMake/span_disable_testing.patch new file mode 100644 index 0000000000000000000000000000000000000000..6d2b0b1a01e9618b12c357a088acd68afe0dc3f5 --- /dev/null +++ b/buildconfig/CMake/span_disable_testing.patch @@ -0,0 +1,19 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 7ad07e2..0470696 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -2,7 +2,7 @@ + cmake_minimum_required(VERSION 3.8) + project(span LANGUAGES CXX) + +-enable_testing() ++# enable_testing() + + add_library(span INTERFACE) + target_sources(span INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/include/tcb/span.hpp) +@@ -11,4 +11,4 @@ target_compile_features(span INTERFACE cxx_std_11) + + set(TCB_SPAN_TEST_CXX_STD 11 CACHE STRING "C++ standard version for testing") + +-add_subdirectory(test) ++# add_subdirectory(test) diff --git a/buildconfig/Jenkins/buildscript b/buildconfig/Jenkins/buildscript index 796f2625dbfcf069da8a71aebfc54bb3e867f3fd..09c68128ccb0427feba51de0de1acc7146f79fe1 100755 --- a/buildconfig/Jenkins/buildscript +++ b/buildconfig/Jenkins/buildscript @@ -9,6 +9,9 @@ # corresponds to any labels set on a slave. BUILD_THREADS & # PARAVIEW_DIR should be set in the configuration of each slave. ############################################################################### +# Set all string comparisons to case insensitive (i.e. Release == release) +shopt -s nocasematch + SCRIPT_DIR=$(dirname "$0") XVFB_SERVER_NUM=101 ULIMIT_CORE_ORIG=$(ulimit -c) @@ -61,6 +64,14 @@ if [[ ${NODE_LABELS} == *rhel7* ]] || [[ ${NODE_LABELS} == *centos7* ]] || [[ ${ USE_CORE_DUMPS=false fi +# Setup software collections on rhel7 to allow using gcc7 +if [[ $ON_RHEL7 ]]; then + SCL_ENABLE="scl enable devtoolset-7" +else + SCL_ENABLE="eval" +fi + + ############################################################################### # Script cleanup ############################################################################### @@ -100,10 +111,7 @@ $CMAKE_EXE --version ############################################################################### # Check job requirements from the name and changes ############################################################################### -if [[ ${JOB_NAME} == *clean* ]]; then - CLEANBUILD=true -fi -if [[ ${JOB_NAME} == *clang_tidy* ]]; then +if [[ ${JOB_NAME} == *clean* || ${JOB_NAME} == *clang_tidy* ]]; then CLEANBUILD=true fi @@ -146,6 +154,7 @@ DO_DOCTESTS_USER=true DO_BUILD_DEVDOCS=true DO_BUILD_PKG=true DO_SYSTEMTESTS=false + if [[ ${PRBUILD} == true ]]; then if ${SCRIPT_DIR}/check_for_changes dev-docs-only || ${SCRIPT_DIR}/check_for_changes user-docs-only; then DO_BUILD_CODE=false @@ -157,7 +166,7 @@ if [[ ${PRBUILD} == true ]]; then DO_SYSTEMTESTS=false if [[ ${ON_RHEL7} == true ]]; then - # rhel does system testing + # rhel does system testing if there are any non-doc or gui changes if ! ${SCRIPT_DIR}/check_for_changes docs-gui-only; then if [[ ${PY3_BUILD} == true ]]; then DO_BUILD_PKG=true @@ -196,15 +205,16 @@ fi if [[ "$CLEANBUILD" == true ]]; then rm -rf $BUILD_DIR fi -if [ -d $BUILD_DIR ]; then - rm -rf ${BUILD_DIR:?}/bin ${BUILD_DIR:?}/ExternalData ${BUILD_DIR:?}/Testing - find ${BUILD_DIR:?} -name 'TEST-*.xml' -delete - if [[ -n ${CLEAN_EXTERNAL_PROJECTS} && "${CLEAN_EXTERNAL_PROJECTS}" == true ]]; then - rm -rf $BUILD_DIR/eigen-* - rm -rf $BUILD_DIR/googletest-* - fi -else - mkdir $BUILD_DIR + +mkdir -p $BUILD_DIR + +# Tidy build dir +rm -rf ${BUILD_DIR:?}/bin ${BUILD_DIR:?}/ExternalData ${BUILD_DIR:?}/Testing +find ${BUILD_DIR:?} -name 'TEST-*.xml' -delete + +if [[ -n ${CLEAN_EXTERNAL_PROJECTS} && "${CLEAN_EXTERNAL_PROJECTS}" == true ]]; then + rm -rf $BUILD_DIR/eigen-* + rm -rf $BUILD_DIR/googletest-* fi ############################################################################### @@ -298,6 +308,27 @@ if [[ ${DO_BUILD_PKG} == true ]]; then fi fi +############################################################################### +# Figure out if were doing a sanitizer build and setup any steps we need +############################################################################### + +if [[ ${JOB_NAME} == *address* ]]; then + SANITIZER_FLAGS="-DUSE_SANITIZER=Address" + +elif [[ ${JOB_NAME} == *memory* ]]; then + SANITIZER_FLAGS="-DUSE_SANITIZER=memory" + +elif [[ ${JOB_NAME} == *thread* ]]; then + SANITIZER_FLAGS="-DUSE_SANITIZER=thread" + +elif [[ ${JOB_NAME} == *undefined* ]]; then + SANITIZER_FLAGS="-DUSE_SANITIZER=undefined" +fi + +if [[ -n "${SANITIZER_FLAGS}" ]]; then + # Force build to RelWithDebInfo + BUILD_CONFIG="RelWithDebInfo" +fi ############################################################################### # Generator @@ -307,6 +338,7 @@ if [ "$(command -v ninja)" ]; then elif [ "$(command -v ninja-build)" ]; then CMAKE_GENERATOR="-G Ninja" fi + if [ -e $BUILD_DIR/CMakeCache.txt ]; then CMAKE_GENERATOR="" fi @@ -325,7 +357,7 @@ rm -f -- *.dmg *.rpm *.deb *.tar.gz *.tar.xz ############################################################################### # CMake configuration ############################################################################### -$SCL_ENABLE "${CMAKE_EXE} ${CMAKE_GENERATOR} -DCMAKE_BUILD_TYPE=${BUILD_CONFIG} -DENABLE_CPACK=ON -DMAKE_VATES=ON -DParaView_DIR=${PARAVIEW_DIR} -DMANTID_DATA_STORE=${MANTID_DATA_STORE} -DDOCS_HTML=ON -DENABLE_CONDA=ON -DCOLORED_COMPILER_OUTPUT=OFF ${DIST_FLAGS} ${PACKAGINGVARS} ${CLANGTIDYVAR} .." +$SCL_ENABLE "${CMAKE_EXE} ${CMAKE_GENERATOR} -DCMAKE_BUILD_TYPE=${BUILD_CONFIG} -DENABLE_CPACK=ON -DMAKE_VATES=ON -DParaView_DIR=${PARAVIEW_DIR} -DMANTID_DATA_STORE=${MANTID_DATA_STORE} -DDOCS_HTML=ON -DENABLE_CONDA=ON -DCOLORED_COMPILER_OUTPUT=OFF ${DIST_FLAGS} ${PACKAGINGVARS} ${CLANGTIDYVAR} ${SANITIZER_FLAGS} .." ############################################################################### # Coverity build should exit early @@ -360,7 +392,6 @@ if [[ $USE_CLANG ]] && [[ ${JOB_NAME} == *clang_tidy* ]]; then exit 0 fi - ############################################################################### # Run the unit tests ############################################################################### diff --git a/buildconfig/Jenkins/clangformat b/buildconfig/Jenkins/clangformat index b9c124c77acc8808e9583ab44025faae60429adb..105395017f5f694ddd86c3a41edcb33a046cc686 100755 --- a/buildconfig/Jenkins/clangformat +++ b/buildconfig/Jenkins/clangformat @@ -22,12 +22,19 @@ if [ "$(git config user.email)" == "" ]; then git config user.email "mantid-buildserver@mantidproject.org" fi -# sources to format -sources=`find Framework MantidPlot qt \( -name '*.cpp' -o -name '*.h' -o -name '*.tcc' \)` sha=`git rev-parse --short HEAD` +if [ -x "$(command -v parallel)" ]; then + echo "Using GNU parallel" + runner="parallel ${CLANG_FORMAT} -i {}" +else + echo "Using xargs" + runner="xargs ${CLANG_FORMAT} -i" +fi + # format -${CLANG_FORMAT} -i $sources +find Framework MantidPlot qt \( -name '*.cpp' -o -name '*.h' -o -name '*.tcc' \) | ${runner} + git add -A echo if git diff --cached --quiet diff --git a/buildconfig/class_maker.py b/buildconfig/class_maker.py index 43386e38b7a50df2ff08586f57ef4d2022d6e206..d50942b00c2cb4199b71c261f5cfa8ba9dac2fd7 100755 --- a/buildconfig/class_maker.py +++ b/buildconfig/class_maker.py @@ -2,8 +2,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + """ Utility for generating a class file, header, and test file """ from __future__ import (absolute_import, division, print_function, unicode_literals) @@ -30,7 +30,6 @@ def write_header(subproject, classname, filename, args): f = open(filename, 'w') subproject_upper = subproject.upper() - guard = "MANTID_{}_{}_H_".format(subproject_upper, classname.upper()) # Create an Algorithm header; will not use it if not an algo algorithm_header = """ @@ -56,8 +55,8 @@ private: s = r"""// Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © {year} ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -74,7 +73,7 @@ public:{algorithm_header}}}; }} // namespace {subproject} }} // namespace Mantid -""".format(guard=guard, subproject=subproject, alg_include=alg_include, classname=classname, year=get_year(), +""".format(subproject=subproject, alg_include=alg_include, classname=classname, year=get_year(), subproject_upper=subproject_upper, alg_class_declare=alg_class_declare, algorithm_header=algorithm_header) f.write(s) @@ -142,8 +141,8 @@ void {algname}::exec() {{ s = """// Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © {year} ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "Mantid{subproject}/{subfolder}{classname}.h" @@ -167,7 +166,6 @@ def write_test(subproject, classname, filename, args): print("Writing test file to", filename) f = open(filename, 'w') - guard = "MANTID_{}_{}TEST_H_".format(subproject.upper(), classname.upper()) algorithm_test = """ void test_Init() {{ @@ -206,8 +204,8 @@ def write_test(subproject, classname, filename, args): s = """// Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © {year} ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -232,7 +230,7 @@ public: }}; -""".format(year=get_year(), guard=guard, subproject=subproject, subfolder=args.subfolder, classname=classname, +""".format(year=get_year(), subproject=subproject, subfolder=args.subfolder, classname=classname, algorithm_test=algorithm_test) f.write(s) f.close() diff --git a/dev-docs/source/BatchWidget/API/CodeExamples/change_color.py b/dev-docs/source/BatchWidget/API/CodeExamples/change_color.py index 74e6ce8001700cafc8ff984a6dd7e443877abbe2..4c7a912782f114a51c552f0a8d96b64d343af234 100644 --- a/dev-docs/source/BatchWidget/API/CodeExamples/change_color.py +++ b/dev-docs/source/BatchWidget/API/CodeExamples/change_color.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from mantidqtpython import MantidQt diff --git a/dev-docs/source/BatchWidget/API/CodeExamples/depth_limit_example.py b/dev-docs/source/BatchWidget/API/CodeExamples/depth_limit_example.py index 0f80b5ae12e2d856ddc0ff20dc2e3305f6a7ff19..57f3f9264289c37af1be86bd19d85bec25d9aac7 100644 --- a/dev-docs/source/BatchWidget/API/CodeExamples/depth_limit_example.py +++ b/dev-docs/source/BatchWidget/API/CodeExamples/depth_limit_example.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from mantidqtpython import MantidQt diff --git a/dev-docs/source/BatchWidget/API/CodeExamples/filtering.py b/dev-docs/source/BatchWidget/API/CodeExamples/filtering.py index 0ffeec5693fedbfa77e21a5dc3d98a871b41e623..3f64c12c5e987ab1f211395bb73e10715db72c0e 100644 --- a/dev-docs/source/BatchWidget/API/CodeExamples/filtering.py +++ b/dev-docs/source/BatchWidget/API/CodeExamples/filtering.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from mantidqtpython import MantidQt import re diff --git a/dev-docs/source/BatchWidget/API/CodeExamples/init.cpp b/dev-docs/source/BatchWidget/API/CodeExamples/init.cpp index c3c47fc84815d168dd4af144176d3616ea05d95d..0f6baf04bf18cb88323e3ada55c75880fc9da96e 100644 --- a/dev-docs/source/BatchWidget/API/CodeExamples/init.cpp +++ b/dev-docs/source/BatchWidget/API/CodeExamples/init.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/Batch/JobTreeView.h" diff --git a/dev-docs/source/BatchWidget/API/CodeExamples/init.py b/dev-docs/source/BatchWidget/API/CodeExamples/init.py index d4cb85eead239fce3f6d50d027cb33010d060d03..d67dca0dbc98618eff6ff48a61c8fc4c954e6663 100644 --- a/dev-docs/source/BatchWidget/API/CodeExamples/init.py +++ b/dev-docs/source/BatchWidget/API/CodeExamples/init.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from mantidqtpython import MantidQt diff --git a/dev-docs/source/BatchWidget/API/CodeExamples/init_with_custom_subscriber.cpp b/dev-docs/source/BatchWidget/API/CodeExamples/init_with_custom_subscriber.cpp index d76c0768bbb0524cba4ea2088b8fc688798b5db1..7b3de0db511f70596a1cdec263023a7f2bee5663 100644 --- a/dev-docs/source/BatchWidget/API/CodeExamples/init_with_custom_subscriber.cpp +++ b/dev-docs/source/BatchWidget/API/CodeExamples/init_with_custom_subscriber.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/Batch/JobTreeView.h" diff --git a/dev-docs/source/MVPTutorial/CalculatorExample/Calculator.py b/dev-docs/source/MVPTutorial/CalculatorExample/Calculator.py index 1107e2b87f562be4d5840620ca47cb9f70f80738..2e8f63b5f2cddc50568c1b90ab8f64f002887a27 100644 --- a/dev-docs/source/MVPTutorial/CalculatorExample/Calculator.py +++ b/dev-docs/source/MVPTutorial/CalculatorExample/Calculator.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from Presenter import Presenter from Model import Model diff --git a/dev-docs/source/MVPTutorial/CalculatorExample/Model.py b/dev-docs/source/MVPTutorial/CalculatorExample/Model.py index 6aa91b0e7d5bb0407aecea6dde6116f041b631c4..07d23988df23f27d83e59eb9eab81628a99beba5 100644 --- a/dev-docs/source/MVPTutorial/CalculatorExample/Model.py +++ b/dev-docs/source/MVPTutorial/CalculatorExample/Model.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + diff --git a/dev-docs/source/MVPTutorial/CalculatorExample/Presenter.py b/dev-docs/source/MVPTutorial/CalculatorExample/Presenter.py index 53b42905f607b2c2b64288277a5e446dd175b2ab..394e05cab403706def0bd2d6cab1381f4c33e05d 100644 --- a/dev-docs/source/MVPTutorial/CalculatorExample/Presenter.py +++ b/dev-docs/source/MVPTutorial/CalculatorExample/Presenter.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + diff --git a/dev-docs/source/MVPTutorial/CalculatorExample/View.py b/dev-docs/source/MVPTutorial/CalculatorExample/View.py index 0fa88a8692a83c778992ddb28a346772e5d5efc4..68e65dc90c1210a0d38861f9601f4c7035e4fc9a 100644 --- a/dev-docs/source/MVPTutorial/CalculatorExample/View.py +++ b/dev-docs/source/MVPTutorial/CalculatorExample/View.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + import PyQt4.QtGui as QtGui import PyQt4.QtCore as QtCore diff --git a/dev-docs/source/MVPTutorial/CompleteGUIcode/main.py b/dev-docs/source/MVPTutorial/CompleteGUIcode/main.py index 13dab8b1885d25ac5c93cd20afa4d51c12111ad1..05f56278ef97d76b1badf6b72642823b853edee9 100644 --- a/dev-docs/source/MVPTutorial/CompleteGUIcode/main.py +++ b/dev-docs/source/MVPTutorial/CompleteGUIcode/main.py @@ -1,3 +1,9 @@ +# Mantid Repository : https://github.com/mantidproject/mantid +# +# Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS +# SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) from qtpy import QtWidgets diff --git a/dev-docs/source/MVPTutorial/CompleteGUIcode/master_presenter.py b/dev-docs/source/MVPTutorial/CompleteGUIcode/master_presenter.py index f2cd64c1282eb00ef0e68d171c6e0d19ecdf30f5..ebd68d667287e75d976bc2ee7e83b07925c6f436 100644 --- a/dev-docs/source/MVPTutorial/CompleteGUIcode/master_presenter.py +++ b/dev-docs/source/MVPTutorial/CompleteGUIcode/master_presenter.py @@ -1,3 +1,9 @@ +# Mantid Repository : https://github.com/mantidproject/mantid +# +# Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS +# SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/dev-docs/source/MVPTutorial/CompleteGUIcode/master_view.py b/dev-docs/source/MVPTutorial/CompleteGUIcode/master_view.py index b8b1013a4a73b6d2fd7260750e7c00988172fac5..06531ea48559b9763a88f00929d0566ab0500adf 100644 --- a/dev-docs/source/MVPTutorial/CompleteGUIcode/master_view.py +++ b/dev-docs/source/MVPTutorial/CompleteGUIcode/master_view.py @@ -1,3 +1,9 @@ +# Mantid Repository : https://github.com/mantidproject/mantid +# +# Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS +# SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) from qtpy import QtWidgets diff --git a/dev-docs/source/MVPTutorial/CompleteGUIcode/model_colour.py b/dev-docs/source/MVPTutorial/CompleteGUIcode/model_colour.py index 7d6aab425ca7784741bfcfd0b3685078aa2e6c08..4632a5563d71417d6b9fd46b4c23e2157f554e2c 100644 --- a/dev-docs/source/MVPTutorial/CompleteGUIcode/model_colour.py +++ b/dev-docs/source/MVPTutorial/CompleteGUIcode/model_colour.py @@ -1,3 +1,9 @@ +# Mantid Repository : https://github.com/mantidproject/mantid +# +# Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS +# SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/dev-docs/source/MVPTutorial/CompleteGUIcode/model_data.py b/dev-docs/source/MVPTutorial/CompleteGUIcode/model_data.py index 9a8141b9edf3aec42522b87179e9584c2026b095..995e99af40e8b6f777bc3e555b739f9120b22743 100644 --- a/dev-docs/source/MVPTutorial/CompleteGUIcode/model_data.py +++ b/dev-docs/source/MVPTutorial/CompleteGUIcode/model_data.py @@ -1,3 +1,9 @@ +# Mantid Repository : https://github.com/mantidproject/mantid +# +# Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS +# SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) import numpy as np diff --git a/dev-docs/source/MVPTutorial/CompleteGUIcode/plot_presenter.py b/dev-docs/source/MVPTutorial/CompleteGUIcode/plot_presenter.py index c66ffb2d83911c2e9e264a83deb64731f52f8f8a..15b621fc6b81fd1179be4f6ca035dc125b25fbe3 100644 --- a/dev-docs/source/MVPTutorial/CompleteGUIcode/plot_presenter.py +++ b/dev-docs/source/MVPTutorial/CompleteGUIcode/plot_presenter.py @@ -1,3 +1,9 @@ +# Mantid Repository : https://github.com/mantidproject/mantid +# +# Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS +# SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/dev-docs/source/MVPTutorial/CompleteGUIcode/plot_view.py b/dev-docs/source/MVPTutorial/CompleteGUIcode/plot_view.py index 29ec8b9805f6e7cf8e5d33ac360617c182a68478..c4d1c9aa0315715a805d271e46ea7cea939d7085 100644 --- a/dev-docs/source/MVPTutorial/CompleteGUIcode/plot_view.py +++ b/dev-docs/source/MVPTutorial/CompleteGUIcode/plot_view.py @@ -1,3 +1,9 @@ +# Mantid Repository : https://github.com/mantidproject/mantid +# +# Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS +# SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) from qtpy import QtWidgets import matplotlib.pyplot as plt diff --git a/dev-docs/source/MVPTutorial/CompleteGUIcode/presenter.py b/dev-docs/source/MVPTutorial/CompleteGUIcode/presenter.py index cd85408d6571499fd42b2efdfe87aab8bcfdd694..02360230e3a416b6a704a20601d786c2b726b390 100644 --- a/dev-docs/source/MVPTutorial/CompleteGUIcode/presenter.py +++ b/dev-docs/source/MVPTutorial/CompleteGUIcode/presenter.py @@ -1,3 +1,9 @@ +# Mantid Repository : https://github.com/mantidproject/mantid +# +# Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS +# SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/dev-docs/source/MVPTutorial/CompleteGUIcode/view.py b/dev-docs/source/MVPTutorial/CompleteGUIcode/view.py index c4098860923b4034c0bff484f45072911c15d4c6..3f650cde0f2a071eed76cc13a38edba4686b178c 100644 --- a/dev-docs/source/MVPTutorial/CompleteGUIcode/view.py +++ b/dev-docs/source/MVPTutorial/CompleteGUIcode/view.py @@ -1,3 +1,9 @@ +# Mantid Repository : https://github.com/mantidproject/mantid +# +# Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS +# SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) from qtpy import QtWidgets, QtCore diff --git a/dev-docs/source/RunningSanitizers.rst b/dev-docs/source/RunningSanitizers.rst new file mode 100644 index 0000000000000000000000000000000000000000..b3d916c0f6d1d898d8cb3c8c6b2430c08ef5d472 --- /dev/null +++ b/dev-docs/source/RunningSanitizers.rst @@ -0,0 +1,155 @@ +.. _RunningSanitizers: + +################## +Running Sanitizers +################## + +.. contents:: + :local: + +Overview +========= + +Sanitizers allow developers to find any issues with their code at runtime +related to memory, threading or undefined behaviour. + +Pre-requisites +============== + +The following tooling is required: + +- GCC-8 onwards +- Clang 3.2 onwards + + +Switching to Sanitizer Build +============================ + +The following sanitizers modes are available: + +- Address +- Thread +- Undefined + +It's recommended to build in *RelWithDebInfo* mode, CMake will automatically +switch to -O1 and append extra flags for stack traces to work correctly whilst +preserving high performance + +If required, a build can be completed in debug mode too, however the +performance penalty will be pretty severe. + +Command Line +------------ + +First, delete *CMakeCache.txt* if your system compiler is GCC 7 or below +(you can check with *gcc -v*). + +To change to a sanitized build navigate to your build folder and execute the +following: + + .. code-block:: sh + + cmake *path_to_src* -DUSE_SANITIZER=*Mode* -DCMAKE_BUILD_TYPE=RelWithDebInfo + +If you need to specify a different compiler too (for example if your system +default is GCC-7) + + .. code-block:: sh + + CC=gcc-8 CXX=g++-8 cmake *path_to_src* -DUSE_SANITIZER=*Mode* -DCMAKE_BUILD_TYPE=RelWithDebInfo + + +For example, to switch to an address sanitizer build the following can be used: + + .. code-block:: sh + + cmake *path_to_src* -DUSE_SANITIZER=Address -DCMAKE_BUILD_TYPE=RelWithDebInfo + +CMake GUI +--------- + +- Delete the cache if your system compiler is GCC 7 or below (you can check + with *gcc -v*). Hit configure and click specify native compilers to *gcc-8* + and *g++-8* +- Change *CMAKE_BUILD_TYPE* to *RelWithDebInfo* (or *Debug*) +- Change *USE_SANITIZERS* to any of the options in the drop down +- Hit generate and rebuild the project + +Running Tests +============= + +Several upstream linked libraries currently contain leaks which we cannot +resolve (or have been resolved but not appeared downstream). + +We can suppress warnings in the address sanitizer by setting environment +variables in the console before running in each mode. + +Advanced Details +================ + +Most developers do not need to read this, but it's good for those who +want to know what's happening + +CMake substitutes in various flags for the address sanitizer builds to +setup suppressions etc... this is the equivalent of doing the following +in a local shell: + + .. code-block:: sh + + export ASAN_OPTIONS="verify_asan_link_order=0:detect_stack_use_after_return=true:halt_on_error=false:suppressions=*path_to_mantid*/tools/Sanitizer/Address.supp" + export LSAN_OPTIONS="suppressions=*path_to_mantid*/tools/Sanitizer/Leak.supp" + +All code executed which is executed in that shell will now be sanitized +correctly. To save developers effort the CXX_ADD_TEST macro (in +FindCxxTest.cmake) will append these environment variables on a developers +behalf. + +Instrumenting Python (Advanced) +------------------------------- + +Currently any code started in Python (i.e. Python Unit Tests) will not pre-load +ASAN instrumentation. This can be split into two categories: + +- Code which uses Python only components: Not worth instrumenting as any + issues will be upstream. This also will emit an error if + *verify_asan_link_order* is set to true, as we technically haven't + instrumented anything (unless you have a sanitized Python build) +- Code which uses Mantid C++ components: This can be instrumented, but + (currently) isn't by default, as the user has to determine the *LD_PRELOAD* + path. + +If you need / want to profile C++ components which are triggered from Python +the following steps should setup your environment: + + .. code-block:: sh + + # Get the path to your linked ASAN + ldd bin/KernelTest | grep "libasan" + export LD_PRELOAD=/usr/lib/path_to/libasan.so.x + + # You may want to re-run the ASAN_OPTIONS export dropping + # the verify to make sure that the C++ component is being instrumented: + + export ASAN_OPTIONS="detect_stack_use_after_return=true:halt_on_error=false:suppressions=*path_to_mantid*/buildconfig/Sanitizer/Address.supp" + + +Common Problems +=============== + +Library Leaks Appearing +----------------------- + +Check that you have correctly spelt *suppressions* as there will be no warnings +for typos. A good check is to put some random characters in the .supp files, +which will cause all tests to fail if it's begin read. + +Any new third party memory leaks need to go into *Leaks.supp* not +*Address.supp* (which should ideally be completely empty) to be suppressed. + +ASAN was not the first library loaded +-------------------------------------- + +This can appear when running Python tests, as the executable is not build +with instrumentation. To avoid this warning ensure that +*verify_asan_link_order=0* is set in your environment and that you are +using GCC 8 onwards. diff --git a/dev-docs/source/SystemTests.rst b/dev-docs/source/SystemTests.rst index 2c24218b31951668f26149122176146ca8a1c333..7b032e94e87df980874c28adcef2062ab295c20e 100644 --- a/dev-docs/source/SystemTests.rst +++ b/dev-docs/source/SystemTests.rst @@ -201,6 +201,22 @@ fixed when running CMake, e.g. cd build systemtest + +Selecting Tests to Run From IDE +------------------------------- + +System tests can be ran from the MSVC IDE using the ``SystemTests`` target, +which behaves in a similar way to unit test targets. One key advantage is +that it allows you to start Mantid in a debug environment rather than attach +to one midway through. + +To select an individual test, or range of tests, go to the ``SystemTests`` +properties, go to ```Command Arguments``` and append flags as appropriate. + +For example, adding ``-R ISIS`` will run any tests which match the regular +expression ``ISIS``. + + Selecting Tests To Run ---------------------- @@ -217,6 +233,7 @@ e.g. would run all of the tests whose name contains SNS. + Running the tests on multiple cores ----------------------------------- diff --git a/dev-docs/source/index.rst b/dev-docs/source/index.rst index 1bd00d7980ca5ab63883dee9915a444f07e9565c..dde789db23843c5db47545dd4c2e6ec30ef5b283 100644 --- a/dev-docs/source/index.rst +++ b/dev-docs/source/index.rst @@ -155,6 +155,7 @@ Testing SystemTests DataFilesForTesting TestingUtilities + RunningSanitizers :doc:`RunningTheUnitTests` Details on how to run the suite of unit tests. @@ -180,6 +181,9 @@ Testing :doc:`TestingUtilities` Helper utlities used for testing. +:doc:`RunningSanitizers` + How to run the various sanitizers locally. + =============== GUI Development =============== diff --git a/docs/source/concepts/PropertiesFile.rst b/docs/source/concepts/PropertiesFile.rst index d6cf42272ef18eb1e93298931615262e1128613f..41994c91022d556c1d320c357dcd88db00c22817 100644 --- a/docs/source/concepts/PropertiesFile.rst +++ b/docs/source/concepts/PropertiesFile.rst @@ -36,9 +36,6 @@ General properties | ``algorithms.categories.hidden`` | A comma separated list of any categories of | ``Muons,Testing`` | | | algorithms that should be hidden in Mantid. | | +----------------------------------+--------------------------------------------------+------------------------+ -| ``algorithms.retained`` | The Number of algorithms properties to retain in | ``50`` | -| | memory for reference in scripts. | | -+----------------------------------+--------------------------------------------------+------------------------+ | ``curvefitting.guiExclude`` | A semicolon separated list of function names | ``ExpDecay;Gaussian;`` | | | that should be hidden in Mantid. | | +----------------------------------+--------------------------------------------------+------------------------+ diff --git a/docs/source/conf-html.py b/docs/source/conf-html.py index dcd5bc9b9f33a13f751ffa773f1c819795b44f21..c7a56ef764dea5a275c56c0785d2fcdc2740ec5d 100644 --- a/docs/source/conf-html.py +++ b/docs/source/conf-html.py @@ -1,10 +1,10 @@ -# -*- coding: utf-8 -*- -# Mantid Repository : https://github.com/mantidproject/mantid +# -*- coding: utf-8 -*-# Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + + # All configuration values have a default; values that are commented out # serve to show the default. # diff --git a/docs/source/conf-qthelp.py b/docs/source/conf-qthelp.py index 06f3211baf7796b464a8af337ec256298438faa9..8219b4eda4456f5e246c5e33266d156270c03be6 100644 --- a/docs/source/conf-qthelp.py +++ b/docs/source/conf-qthelp.py @@ -1,10 +1,10 @@ -# -*- coding: utf-8 -*- -# Mantid Repository : https://github.com/mantidproject/mantid +# -*- coding: utf-8 -*-# Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + + # All configuration values have a default; values that are commented out # serve to show the default. # diff --git a/docs/source/interfaces/Engineering Diffraction.rst b/docs/source/interfaces/Engineering Diffraction.rst index 89477dfa73a00c494143c17a0cd66574c8f5cce2..f25105692a3eb72adc7cf9b9449c3b47fb8a8c0f 100644 --- a/docs/source/interfaces/Engineering Diffraction.rst +++ b/docs/source/interfaces/Engineering Diffraction.rst @@ -121,7 +121,8 @@ a plot for each bank and cropped focusing generates a plot for the single bank o Clicking the focus button will begin the focusing algorithm for the selected run files. The button and plotting checkbox will be disabled until the fitting algorithm is complete. -The focused output files are saved in NeXus, GSS, and raw XYE format to: +The focused output files are saved in NeXus, GSS, and TOPAS format. The process will also output a CSV file containing +all numerical sample logs. All of these files are saved to: `<CHOSEN_OUTPUT_DIRECTORY>/Focus/` diff --git a/docs/source/release/v5.1.0/diffraction.rst b/docs/source/release/v5.1.0/diffraction.rst index d4c0041287b2310f43156cddeda2fe8b045647e2..954c18bc6991e108c15ba1f58a9aba19c3e71379 100644 --- a/docs/source/release/v5.1.0/diffraction.rst +++ b/docs/source/release/v5.1.0/diffraction.rst @@ -12,8 +12,14 @@ Diffraction Changes Powder Diffraction ------------------ +- Polaris.create_total_scattering_pdf output workspaces now have the run number in the names. + Engineering Diffraction ----------------------- +Improvements +^^^^^^^^^^^^ +- TOPAS files (`.abc`) have replaced the `.dat` files generated when focusing using the GUI. +- Focusing with the GUI will now generate a CSV containing the averaged values of all numerical sample logs. Single Crystal Diffraction -------------------------- diff --git a/docs/source/release/v5.1.0/framework.rst b/docs/source/release/v5.1.0/framework.rst index cac8484734e0ddaee3f4f601ec9c035d6d6600b4..769cda42cb59e2d06b749aaad5edaf333b6a5b3f 100644 --- a/docs/source/release/v5.1.0/framework.rst +++ b/docs/source/release/v5.1.0/framework.rst @@ -15,6 +15,10 @@ Concepts Algorithms ---------- +- Add specialization to :ref:`SetUncertainties <algm-SetUncertainties>` for the + case where InputWorkspace == OutputWorkspace. Where possible, avoid the + cost of cloning the inputWorkspace. + Data Handling ------------- diff --git a/docs/source/release/v5.1.0/mantidworkbench.rst b/docs/source/release/v5.1.0/mantidworkbench.rst index 040b994c8ec9e752a18ee7c0176f5008b34ed7c7..68b5a8cfedda5ed970aef8ec7ea6ee418acaa7b7 100644 --- a/docs/source/release/v5.1.0/mantidworkbench.rst +++ b/docs/source/release/v5.1.0/mantidworkbench.rst @@ -9,11 +9,13 @@ Improvements ############ - Tile plots are now reloaded correctly by project recovery. +- Fixed an issue where some scripts were running slower if a plot was open at the same time. Bugfixes ######## - Fixed a bug where setting columns to Y error in table workspaces wasn't working. The links between the Y error and Y columns weren't being set up properly +- The scale of the color bars on colorfill plots of ragged workspaces now uses the maximum and minimum values of the data. :ref:`Release 5.1.0 <v5.1.0>` diff --git a/docs/sphinxext/mantiddoc/__init__.py b/docs/sphinxext/mantiddoc/__init__.py index 3f54af13d42db08969884b92fa38536559ac0541..63161c8bd50905402a6882cafbe0402aa8864d29 100644 --- a/docs/sphinxext/mantiddoc/__init__.py +++ b/docs/sphinxext/mantiddoc/__init__.py @@ -1,11 +1,9 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + - - def get_logger(name, app): """ Compatability layer between Sphinx v1.2 & latest diff --git a/docs/sphinxext/mantiddoc/autodoc.py b/docs/sphinxext/mantiddoc/autodoc.py index cbbc3e4e549cc3e811d84b0223caa2970ea0c87a..66063760c78e4855822d48b0a00b4306eb696d85 100644 --- a/docs/sphinxext/mantiddoc/autodoc.py +++ b/docs/sphinxext/mantiddoc/autodoc.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + """ Mantid customizations for the behaviour of the Sphinx autodoc diff --git a/docs/sphinxext/mantiddoc/directives/__init__.py b/docs/sphinxext/mantiddoc/directives/__init__.py index 15d5162b79bb37f1a686aba86528031574ec4eb5..bc579da023aa080db767ff7d307f4af18ca00362 100644 --- a/docs/sphinxext/mantiddoc/directives/__init__.py +++ b/docs/sphinxext/mantiddoc/directives/__init__.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + """ Defines custom directives for Mantid documentation diff --git a/docs/sphinxext/mantiddoc/directives/algorithm.py b/docs/sphinxext/mantiddoc/directives/algorithm.py index 5832013df9e788b0073ac68f938c7835f3c61722..f118d5c11173e2c3d2f78147c8d5164dc5f3318c 100644 --- a/docs/sphinxext/mantiddoc/directives/algorithm.py +++ b/docs/sphinxext/mantiddoc/directives/algorithm.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) from mantiddoc.directives.base import AlgorithmBaseDirective #pylint: disable=unused-import diff --git a/docs/sphinxext/mantiddoc/directives/attributes.py b/docs/sphinxext/mantiddoc/directives/attributes.py index bea023858d2368a0ae2f32ee0604b5f7258dcaf3..cebe196d84dd044e8bb8d256b83376db36ca2058 100644 --- a/docs/sphinxext/mantiddoc/directives/attributes.py +++ b/docs/sphinxext/mantiddoc/directives/attributes.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from mantiddoc.directives.properties import PropertiesDirective #pylint: disable=unused-import diff --git a/docs/sphinxext/mantiddoc/directives/base.py b/docs/sphinxext/mantiddoc/directives/base.py index 21b421a8bd688623a7ae4d8081d8872967432626..9cf4fc49621cd2a81c0ff24f49ed98cbd5bc21b9 100644 --- a/docs/sphinxext/mantiddoc/directives/base.py +++ b/docs/sphinxext/mantiddoc/directives/base.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from docutils import statemachine from docutils.parsers.rst import Directive # pylint: disable=unused-import diff --git a/docs/sphinxext/mantiddoc/directives/categories.py b/docs/sphinxext/mantiddoc/directives/categories.py index 6140af070e8e83643cbb3cb343500147bb073091..9842d126cee0419fa96f9018ca192214c36ed339 100644 --- a/docs/sphinxext/mantiddoc/directives/categories.py +++ b/docs/sphinxext/mantiddoc/directives/categories.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + """ Provides directives for dealing with category pages. diff --git a/docs/sphinxext/mantiddoc/directives/diagram.py b/docs/sphinxext/mantiddoc/directives/diagram.py index f27c5c4fbbfa96dd9d804e297964cd60b1814992..cd410e7da104b94e0d7a43161cf7c9d9046134d7 100644 --- a/docs/sphinxext/mantiddoc/directives/diagram.py +++ b/docs/sphinxext/mantiddoc/directives/diagram.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) from mantiddoc.directives.base import BaseDirective #pylint: disable=unused-import diff --git a/docs/sphinxext/mantiddoc/directives/interface.py b/docs/sphinxext/mantiddoc/directives/interface.py index a3aa23ac28452030a05c906b22fbdddf59828454..f836e46b6541cc2c6260837aae0766cb6d33eb07 100644 --- a/docs/sphinxext/mantiddoc/directives/interface.py +++ b/docs/sphinxext/mantiddoc/directives/interface.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from mantiddoc.directives.base import BaseDirective #pylint: disable=unused-import import os diff --git a/docs/sphinxext/mantiddoc/directives/properties.py b/docs/sphinxext/mantiddoc/directives/properties.py index d9298361c59ea1e45b8d808b9788a45b4d18a378..cc027352d115bc76c72dd334f64cf870f857210c 100644 --- a/docs/sphinxext/mantiddoc/directives/properties.py +++ b/docs/sphinxext/mantiddoc/directives/properties.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=invalid-name,deprecated-module from __future__ import (absolute_import, division, print_function) diff --git a/docs/sphinxext/mantiddoc/directives/relatedalgorithms.py b/docs/sphinxext/mantiddoc/directives/relatedalgorithms.py index 2aca1d22778ae79e11c6499600db3b4a941c76c0..783ec7c41ca519265de7a23dcc23bc45ac97d429 100644 --- a/docs/sphinxext/mantiddoc/directives/relatedalgorithms.py +++ b/docs/sphinxext/mantiddoc/directives/relatedalgorithms.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from mantiddoc.directives.base import AlgorithmBaseDirective #pylint: disable=unused-import diff --git a/docs/sphinxext/mantiddoc/directives/sourcelink.py b/docs/sphinxext/mantiddoc/directives/sourcelink.py index 7fc4717769ca9f80892af74f8ef6b91f05b7a61d..1baf5c6d6955c2405aa1eabb2cdc8559a7e90d7d 100644 --- a/docs/sphinxext/mantiddoc/directives/sourcelink.py +++ b/docs/sphinxext/mantiddoc/directives/sourcelink.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) diff --git a/docs/sphinxext/mantiddoc/directives/summary.py b/docs/sphinxext/mantiddoc/directives/summary.py index fc40c006a702b2b9f34be1fbb3bc4938913cfc33..56c924a1ea1a63203de15f78d840ec14ffef87e5 100644 --- a/docs/sphinxext/mantiddoc/directives/summary.py +++ b/docs/sphinxext/mantiddoc/directives/summary.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from mantiddoc.directives.base import AlgorithmBaseDirective #pylint: disable=unused-import diff --git a/docs/sphinxext/mantiddoc/doctest.py b/docs/sphinxext/mantiddoc/doctest.py index dbf177cf06dccd1e80fa7e55f2b4ec0a95738829..a257bcf9d7f7b483144a146bdb52240bb7418c1b 100644 --- a/docs/sphinxext/mantiddoc/doctest.py +++ b/docs/sphinxext/mantiddoc/doctest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + """ Defines a handler for the Sphinx 'build-finished' event. diff --git a/docs/sphinxext/mantiddoc/tests/test_doctest.py b/docs/sphinxext/mantiddoc/tests/test_doctest.py index ab7c93cad515795e4b5f2f3d8936eaae53404e08..5229d1efd13b1048df1278c2422e4151b5168f2f 100644 --- a/docs/sphinxext/mantiddoc/tests/test_doctest.py +++ b/docs/sphinxext/mantiddoc/tests/test_doctest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + """ Tests for the doctest addons diff --git a/docs/sphinxext/mantiddoc/tools/__init__.py b/docs/sphinxext/mantiddoc/tools/__init__.py index 291cfbbf761253f4f7eb4791687291d7f164745a..731fcf78ddc2d69daa63eaaec256e4227640fc69 100644 --- a/docs/sphinxext/mantiddoc/tools/__init__.py +++ b/docs/sphinxext/mantiddoc/tools/__init__.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + """ Subpackage containing tools to help in constructing the documentation diff --git a/docs/sphinxext/mantiddoc/tools/git_last_modified.py b/docs/sphinxext/mantiddoc/tools/git_last_modified.py index abaad03beebfc0207475032f55b5fb9a3b539f6d..5b7ed67e02024940ad78010120aea52c31834868 100644 --- a/docs/sphinxext/mantiddoc/tools/git_last_modified.py +++ b/docs/sphinxext/mantiddoc/tools/git_last_modified.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + import os import re diff --git a/installers/LinuxInstaller/launcher-template.desktop.in b/installers/LinuxInstaller/launcher-template.desktop.in index 9549f5809be8337e31a966a0bbb6fa22e1048af9..cb9f81784ddc890978d3607c508d291d88ec43c8 100644 --- a/installers/LinuxInstaller/launcher-template.desktop.in +++ b/installers/LinuxInstaller/launcher-template.desktop.in @@ -1,3 +1,9 @@ +// Mantid Repository : https://github.com/mantidproject/mantid +// +// Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS +// SPDX - License - Identifier: GPL - 3.0 + [Desktop Entry] Name=@DESKTOP_NAME@ Comment=Neutron Data Reduction Framework diff --git a/installers/MacInstaller/Info.plist.in b/installers/MacInstaller/Info.plist.in index f1aed619356e85c89a46ca976d9b0f3c49242377..c2ce8215836cf4e9d14227adff536e7abc7718d9 100644 --- a/installers/MacInstaller/Info.plist.in +++ b/installers/MacInstaller/Info.plist.in @@ -31,6 +31,6 @@ <key>LSRequiresCarbon</key> <true/> <key>NSHumanReadableCopyright</key> - <string>Copyright (c) 2007 ISIS Rutherford Appleton Laboratory UKRI, NScD Oak Ridge National Laboratory, European Spallation Source, and Institut Laue - Langevin</string> + <string>Copyright (c) 2007 ISIS Rutherford Appleton Laboratory UKRI, NScD Oak Ridge National Laboratory, European Spallation Source, Institut Laue - Langevin and CSNS, Institute of High Energy Physics, CAS</string> </dict> </plist> diff --git a/instrument/sans_generator.py b/instrument/sans_generator.py index 3b3f21c2ab89c4d639ebc1b77ad88f471d46c8f4..be668c37d03e65f0508973a8f4d84729f8016ffe 100644 --- a/instrument/sans_generator.py +++ b/instrument/sans_generator.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + """ """ diff --git a/qt/applications/workbench/CMakeLists.txt b/qt/applications/workbench/CMakeLists.txt index 9049e1223f937f874559ca2837732a945adb4c30..c9d43bee6de7ca62597cd9d9add1c7d18370c908 100644 --- a/qt/applications/workbench/CMakeLists.txt +++ b/qt/applications/workbench/CMakeLists.txt @@ -12,6 +12,12 @@ add_python_package(workbench INSTALL_BIN_DIR "${WORKBENCH_BIN_DIR}" ) +set_target_properties(workbench PROPERTIES + VS_DEBUGGER_COMMAND $<$<BOOL:${WIN32}>:${PYTHON_EXECUTABLE}> + VS_DEBUGGER_COMMAND_ARGUMENTS $<$<BOOL:${WIN32}>:${MSVC_BIN_DIR}/workbench-script.pyw> + VS_DEBUGGER_ENVIRONMENT $<$<BOOL:${WIN32}>:${MSVC_IDE_ENV}> + ) + set(_images_qrc_file ${CMAKE_CURRENT_LIST_DIR}/resources.qrc) if (WIN32) diff --git a/qt/applications/workbench/workbench/__init__.py b/qt/applications/workbench/workbench/__init__.py index 128aa7fda132d0cca33acd63bb856b74a3ab688e..9229c5570bae39c73cbe45a4192728b41f2349f2 100644 --- a/qt/applications/workbench/workbench/__init__.py +++ b/qt/applications/workbench/workbench/__init__.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/applications/workbench/workbench/app/__init__.py b/qt/applications/workbench/workbench/app/__init__.py index 93bf248985784d0503814944b9a6edfa6113bb0d..bb60042795fae624e7cc1c09cf37bff49e6b57ba 100644 --- a/qt/applications/workbench/workbench/app/__init__.py +++ b/qt/applications/workbench/workbench/app/__init__.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/applications/workbench/workbench/app/mainwindow.py b/qt/applications/workbench/workbench/app/mainwindow.py index 726b4017f3e91749233dba9d7bc73c425f939aa0..a9488f0aa0dd10c1e4d17b0bcb73cf1e0a63596d 100644 --- a/qt/applications/workbench/workbench/app/mainwindow.py +++ b/qt/applications/workbench/workbench/app/mainwindow.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/applications/workbench/workbench/config/__init__.py b/qt/applications/workbench/workbench/config/__init__.py index 847e87734008919c4c91620008e278e68294a787..b5128ff08f2bb398b3b66816bfe987f2165da868 100644 --- a/qt/applications/workbench/workbench/config/__init__.py +++ b/qt/applications/workbench/workbench/config/__init__.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/applications/workbench/workbench/config/fonts.py b/qt/applications/workbench/workbench/config/fonts.py index f8d8a8ecd9eb8b0f87528d138e0c5f617359fdff..785a1eb6f0de982d4df811e056f9f684ce53cd85 100644 --- a/qt/applications/workbench/workbench/config/fonts.py +++ b/qt/applications/workbench/workbench/config/fonts.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/applications/workbench/workbench/config/test/test_user.py b/qt/applications/workbench/workbench/config/test/test_user.py index 0751454187be09e2bc4528c910c4da460ef45ab8..2dea80396b964ec3c5489937f6f26600276b2066 100644 --- a/qt/applications/workbench/workbench/config/test/test_user.py +++ b/qt/applications/workbench/workbench/config/test/test_user.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/applications/workbench/workbench/config/user.py b/qt/applications/workbench/workbench/config/user.py index e56bcfab32ccf888b61a9e4313345dbb9899cc09..f38d73d8d9e6fa6144d11d622f397f06f9078b97 100644 --- a/qt/applications/workbench/workbench/config/user.py +++ b/qt/applications/workbench/workbench/config/user.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/applications/workbench/workbench/plotting/__init__.py b/qt/applications/workbench/workbench/plotting/__init__.py index 3f4e9ae9e52646a4067aacd8cf46517d290cb361..9cebe0c5a739bdc2da54d1fced9bcad2f13f9bfd 100644 --- a/qt/applications/workbench/workbench/plotting/__init__.py +++ b/qt/applications/workbench/workbench/plotting/__init__.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/applications/workbench/workbench/plotting/backend_workbench.py b/qt/applications/workbench/workbench/plotting/backend_workbench.py index 96a4f720c503f0c8fcb2f5c4c510c03406d7487e..7193035b7a41ec229d6c38e024f198df74932a91 100644 --- a/qt/applications/workbench/workbench/plotting/backend_workbench.py +++ b/qt/applications/workbench/workbench/plotting/backend_workbench.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/applications/workbench/workbench/plotting/config.py b/qt/applications/workbench/workbench/plotting/config.py index f6374fa0312122f75f5ced6595b063b406ed9cab..5b9733fceab215b67d45b01ce89648a78d88ead4 100644 --- a/qt/applications/workbench/workbench/plotting/config.py +++ b/qt/applications/workbench/workbench/plotting/config.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/applications/workbench/workbench/plotting/figureerrorsmanager.py b/qt/applications/workbench/workbench/plotting/figureerrorsmanager.py index 1460d38b405afe0a0f4ea47f58e2c4bd00fd91d4..79664ac203279823879c2a40e7252457f78dd9b0 100644 --- a/qt/applications/workbench/workbench/plotting/figureerrorsmanager.py +++ b/qt/applications/workbench/workbench/plotting/figureerrorsmanager.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. """ diff --git a/qt/applications/workbench/workbench/plotting/figureinteraction.py b/qt/applications/workbench/workbench/plotting/figureinteraction.py index b8e937504ff36d5588c306d6b7241d1f2dcd02e8..e04c78b580afae3c4270048140681e317eb95615 100644 --- a/qt/applications/workbench/workbench/plotting/figureinteraction.py +++ b/qt/applications/workbench/workbench/plotting/figureinteraction.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # @@ -12,6 +12,7 @@ Defines interaction behaviour for plotting. from __future__ import (absolute_import, unicode_literals) # std imports +import numpy as np from collections import OrderedDict from copy import copy from functools import partial @@ -704,6 +705,12 @@ class FigureInteraction(object): if ax.lines: # Relim causes issues with colour plots, which have no lines. ax.relim() + if ax.images: # Colour bar limits are wrong if workspace is ragged. Set them manually. + colorbar_min = np.nanmin(ax.images[-1].get_array()) + colorbar_max = np.nanmax(ax.images[-1].get_array()) + for image in ax.images: + image.set_clim(colorbar_min, colorbar_max) + ax.autoscale() datafunctions.set_initial_dimensions(ax) diff --git a/qt/applications/workbench/workbench/plotting/figuremanager.py b/qt/applications/workbench/workbench/plotting/figuremanager.py index dbd2800ea4cafbfe37b04c5bd4dc1c39d378e040..adb612dd5fb18875ce33769f191b19de8fc903ee 100644 --- a/qt/applications/workbench/workbench/plotting/figuremanager.py +++ b/qt/applications/workbench/workbench/plotting/figuremanager.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # @@ -92,9 +92,12 @@ class FigureManagerADSObserver(AnalysisDataServiceObserver): # managed via a workspace. # See https://github.com/mantidproject/mantid/issues/25135. empty_axes = [] + redraw = False for ax in all_axes: if isinstance(ax, MantidAxes): - ax.remove_workspace_artists(workspace) + to_redraw = ax.remove_workspace_artists(workspace) + else: + to_redraw = False # We check for axes type below as a pseudo check for an axes being # a colorbar. Creating a colorfill plot creates 2 axes: one linked # to a workspace, the other a colorbar. Deleting the workspace @@ -104,10 +107,11 @@ class FigureManagerADSObserver(AnalysisDataServiceObserver): # Axes object being closed. if type(ax) is not Axes: empty_axes.append(MantidAxes.is_empty(ax)) + redraw = redraw | to_redraw if all(empty_axes): self.window.emit_close() - else: + elif redraw: self.canvas.draw() @_catch_exceptions diff --git a/qt/applications/workbench/workbench/plotting/figurewindow.py b/qt/applications/workbench/workbench/plotting/figurewindow.py index 307b7b32fd52ee964aebc98615767ed54dfac697..2062f268634d3ba1055f8c92a6a932a0d85c117e 100644 --- a/qt/applications/workbench/workbench/plotting/figurewindow.py +++ b/qt/applications/workbench/workbench/plotting/figurewindow.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/applications/workbench/workbench/plotting/globalfiguremanager.py b/qt/applications/workbench/workbench/plotting/globalfiguremanager.py index 8170cad21f3b96586e54f5efb4c477b5a86342d2..7f0c8cf2f2973e1f77545dab19317a271856d08d 100644 --- a/qt/applications/workbench/workbench/plotting/globalfiguremanager.py +++ b/qt/applications/workbench/workbench/plotting/globalfiguremanager.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/applications/workbench/workbench/plotting/observabledictionary.py b/qt/applications/workbench/workbench/plotting/observabledictionary.py index 5e0fdc9689a24f1a0493faf7de43324ca172043a..8aff6ae87c401e278ac3c9b2cbb5d7ed04845177 100644 --- a/qt/applications/workbench/workbench/plotting/observabledictionary.py +++ b/qt/applications/workbench/workbench/plotting/observabledictionary.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/applications/workbench/workbench/plotting/plotscriptgenerator/__init__.py b/qt/applications/workbench/workbench/plotting/plotscriptgenerator/__init__.py index ba482bbe17bcba157e015fa9dd7a76bcc86a9d60..7e74ab9d98555b862261ff62c6767055d28b840b 100644 --- a/qt/applications/workbench/workbench/plotting/plotscriptgenerator/__init__.py +++ b/qt/applications/workbench/workbench/plotting/plotscriptgenerator/__init__.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. diff --git a/qt/applications/workbench/workbench/plotting/plotscriptgenerator/axes.py b/qt/applications/workbench/workbench/plotting/plotscriptgenerator/axes.py index 04b749bbeffd96b6f6c56e1c2b72b0a993e9d55d..3032199f3e1c34401c2aacbbf53b1adcb69b54eb 100644 --- a/qt/applications/workbench/workbench/plotting/plotscriptgenerator/axes.py +++ b/qt/applications/workbench/workbench/plotting/plotscriptgenerator/axes.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. diff --git a/qt/applications/workbench/workbench/plotting/plotscriptgenerator/figure.py b/qt/applications/workbench/workbench/plotting/plotscriptgenerator/figure.py index f648ce75d2bdef2eb8615a1d502f3d869460a47e..ed257509c1bd26744351666ca22186d14ab1cf6d 100644 --- a/qt/applications/workbench/workbench/plotting/plotscriptgenerator/figure.py +++ b/qt/applications/workbench/workbench/plotting/plotscriptgenerator/figure.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. diff --git a/qt/applications/workbench/workbench/plotting/plotscriptgenerator/lines.py b/qt/applications/workbench/workbench/plotting/plotscriptgenerator/lines.py index 8659ca1262c026bdb519556cc9ce807f06814a35..e218c4e03500140e27d258a9e18a20983478045e 100644 --- a/qt/applications/workbench/workbench/plotting/plotscriptgenerator/lines.py +++ b/qt/applications/workbench/workbench/plotting/plotscriptgenerator/lines.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. diff --git a/qt/applications/workbench/workbench/plotting/plotscriptgenerator/test/__init__.py b/qt/applications/workbench/workbench/plotting/plotscriptgenerator/test/__init__.py index db65bfdd56145fdd2d6d2eccf8d7684e66930c50..d4649f5e6d8bb07eea47f10137cb8dbc8c8b3cb0 100644 --- a/qt/applications/workbench/workbench/plotting/plotscriptgenerator/test/__init__.py +++ b/qt/applications/workbench/workbench/plotting/plotscriptgenerator/test/__init__.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. diff --git a/qt/applications/workbench/workbench/plotting/plotscriptgenerator/test/test_plotscriptgenerator.py b/qt/applications/workbench/workbench/plotting/plotscriptgenerator/test/test_plotscriptgenerator.py index 5c1c803b7b56bc98e9ccb572c6820c38687013bb..8978bd8958801e8eb435ca4764a0627aa8bc8d19 100644 --- a/qt/applications/workbench/workbench/plotting/plotscriptgenerator/test/test_plotscriptgenerator.py +++ b/qt/applications/workbench/workbench/plotting/plotscriptgenerator/test/test_plotscriptgenerator.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. diff --git a/qt/applications/workbench/workbench/plotting/plotscriptgenerator/test/test_plotscriptgeneratoraxes.py b/qt/applications/workbench/workbench/plotting/plotscriptgenerator/test/test_plotscriptgeneratoraxes.py index 4b67614695abf16889c0a6a9fd5910cfed649437..4f84bbd28266ed52138fd8aae8b3e57958317b01 100644 --- a/qt/applications/workbench/workbench/plotting/plotscriptgenerator/test/test_plotscriptgeneratoraxes.py +++ b/qt/applications/workbench/workbench/plotting/plotscriptgenerator/test/test_plotscriptgeneratoraxes.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. diff --git a/qt/applications/workbench/workbench/plotting/plotscriptgenerator/test/test_plotscriptgeneratorfigure.py b/qt/applications/workbench/workbench/plotting/plotscriptgenerator/test/test_plotscriptgeneratorfigure.py index 9f87f8564de6a1b64885a005c468ab1af85188d0..e147979c0707fb91962cef68747f85371dcf20ea 100644 --- a/qt/applications/workbench/workbench/plotting/plotscriptgenerator/test/test_plotscriptgeneratorfigure.py +++ b/qt/applications/workbench/workbench/plotting/plotscriptgenerator/test/test_plotscriptgeneratorfigure.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. diff --git a/qt/applications/workbench/workbench/plotting/plotscriptgenerator/test/test_plotscriptgeneratorlines.py b/qt/applications/workbench/workbench/plotting/plotscriptgenerator/test/test_plotscriptgeneratorlines.py index 60c788da1802de46af213628b5fadb8ec10048af..3dfbe5bf4f38823dea672cdbebbd6705d347d7b2 100644 --- a/qt/applications/workbench/workbench/plotting/plotscriptgenerator/test/test_plotscriptgeneratorlines.py +++ b/qt/applications/workbench/workbench/plotting/plotscriptgenerator/test/test_plotscriptgeneratorlines.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. diff --git a/qt/applications/workbench/workbench/plotting/plotscriptgenerator/test/test_plotscriptgeneratorutils.py b/qt/applications/workbench/workbench/plotting/plotscriptgenerator/test/test_plotscriptgeneratorutils.py index d6e0790b09e168ca69f9a20bcad0483f9e363c8c..6416f144dca0b07cf73f11b950ccbccdfe0ae5c8 100644 --- a/qt/applications/workbench/workbench/plotting/plotscriptgenerator/test/test_plotscriptgeneratorutils.py +++ b/qt/applications/workbench/workbench/plotting/plotscriptgenerator/test/test_plotscriptgeneratorutils.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. diff --git a/qt/applications/workbench/workbench/plotting/plotscriptgenerator/utils.py b/qt/applications/workbench/workbench/plotting/plotscriptgenerator/utils.py index 62f45874b0a3591121056c49990a183713680198..2a6cef17e959a3a9b5b87db65b3a8b139752125d 100644 --- a/qt/applications/workbench/workbench/plotting/plotscriptgenerator/utils.py +++ b/qt/applications/workbench/workbench/plotting/plotscriptgenerator/utils.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. diff --git a/qt/applications/workbench/workbench/plotting/propertiesdialog.py b/qt/applications/workbench/workbench/plotting/propertiesdialog.py index 428b1de13d07ad5911ee9026ef7bfaed0b3ed4fd..f814e7f8796821dc8d7928e3cf2a7941782d7da4 100644 --- a/qt/applications/workbench/workbench/plotting/propertiesdialog.py +++ b/qt/applications/workbench/workbench/plotting/propertiesdialog.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/applications/workbench/workbench/plotting/style.py b/qt/applications/workbench/workbench/plotting/style.py index e4a873f4dbed207d08b3e6775850b6ff9c1c5a5a..f99309822613ba42df1ff611680c7f0f919d0e52 100644 --- a/qt/applications/workbench/workbench/plotting/style.py +++ b/qt/applications/workbench/workbench/plotting/style.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/applications/workbench/workbench/plotting/test/__init__.py b/qt/applications/workbench/workbench/plotting/test/__init__.py index 57d5ae5a28a63ed0dd44886f201c25df7cac61ca..7349c447e5c1f2998d92b8d32be9c8822fd4d9c0 100644 --- a/qt/applications/workbench/workbench/plotting/test/__init__.py +++ b/qt/applications/workbench/workbench/plotting/test/__init__.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/applications/workbench/workbench/plotting/test/test_figureerrorsmanager.py b/qt/applications/workbench/workbench/plotting/test/test_figureerrorsmanager.py index 8b47677f1ba364aacad2d5d733faa89b8f7b8f9b..b6b9e9cd0b1f836608b9fc7784ecf98347530240 100644 --- a/qt/applications/workbench/workbench/plotting/test/test_figureerrorsmanager.py +++ b/qt/applications/workbench/workbench/plotting/test/test_figureerrorsmanager.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/applications/workbench/workbench/plotting/test/test_figureinteraction.py b/qt/applications/workbench/workbench/plotting/test/test_figureinteraction.py index 2a81dd400d1acd9251e0c9429db775744daa0911..a39ea453c058371eaf7d87ceb0c4b596ac693786 100644 --- a/qt/applications/workbench/workbench/plotting/test/test_figureinteraction.py +++ b/qt/applications/workbench/workbench/plotting/test/test_figureinteraction.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # @@ -27,7 +27,7 @@ from mantid.plots import MantidAxes from mantid.py3compat.mock import MagicMock, PropertyMock, call, patch from mantid.simpleapi import CreateWorkspace from mantidqt.plotting.figuretype import FigureType -from mantidqt.plotting.functions import plot +from mantidqt.plotting.functions import plot, pcolormesh_from_names from mantidqt.utils.qt.testing import start_qapplication from workbench.plotting.figureinteraction import FigureInteraction @@ -378,6 +378,19 @@ class FigureInteractionTest(unittest.TestCase): current_scale_types2 = (ax.get_xscale(), ax.get_yscale()) self.assertNotEqual(current_scale_types2, current_scale_types1) + def test_scale_on_ragged_workspaces_maintained_when_toggling_normalisation(self): + ws = CreateWorkspace(DataX=[1, 2, 3, 4, 2, 4, 6, 8], DataY=[2] * 8, NSpec=2, OutputWorkspace="ragged_ws") + fig = pcolormesh_from_names([ws]) + mock_canvas = MagicMock(figure=fig) + fig_manager_mock = MagicMock(canvas=mock_canvas) + fig_interactor = FigureInteraction(fig_manager_mock) + fig_interactor._toggle_normalization(fig.axes[0]) + + clim = fig.axes[0].images[0].get_clim() + fig_interactor._toggle_normalization(fig.axes[0]) + self.assertEqual(clim, fig.axes[0].images[0].get_clim()) + self.assertNotEqual((-0.1, 0.1), fig.axes[0].images[0].get_clim()) + # Private methods def _create_mock_fig_manager_to_accept_right_click(self): fig_manager = MagicMock() diff --git a/qt/applications/workbench/workbench/plotting/test/test_figuremanager.py b/qt/applications/workbench/workbench/plotting/test/test_figuremanager.py index af4e3f4f68e7ed13e9f7963f791df6e0d2f51d2f..2866b3ddd01086ca6872119d2e0ad838bc7263f6 100644 --- a/qt/applications/workbench/workbench/plotting/test/test_figuremanager.py +++ b/qt/applications/workbench/workbench/plotting/test/test_figuremanager.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. import unittest diff --git a/qt/applications/workbench/workbench/plotting/test/test_figurewindow.py b/qt/applications/workbench/workbench/plotting/test/test_figurewindow.py index 469f72bbbddfc72f20015dfe03b74ef06c156bb7..99a46a4a016314ae8204981e7febdb1e3a0d2e74 100644 --- a/qt/applications/workbench/workbench/plotting/test/test_figurewindow.py +++ b/qt/applications/workbench/workbench/plotting/test/test_figurewindow.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. diff --git a/qt/applications/workbench/workbench/plotting/test/test_globalfiguremanager.py b/qt/applications/workbench/workbench/plotting/test/test_globalfiguremanager.py index 3aa9b0dc451250d4053cd70519b840110eb3193e..25782ac4ff5863475f51aa08b7864d1b8c73a0f1 100644 --- a/qt/applications/workbench/workbench/plotting/test/test_globalfiguremanager.py +++ b/qt/applications/workbench/workbench/plotting/test/test_globalfiguremanager.py @@ -1,3 +1,9 @@ +# Mantid Repository : https://github.com/mantidproject/mantid +# +# Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS +# SPDX - License - Identifier: GPL - 3.0 + import unittest from mantid.py3compat.mock import Mock, call, patch diff --git a/qt/applications/workbench/workbench/plotting/test/test_propertiesdialog.py b/qt/applications/workbench/workbench/plotting/test/test_propertiesdialog.py index 18edb26b3ae57c980648064e24d10efa372e0481..a7b9545e066c43747f883f7e345cd6a467771e13 100644 --- a/qt/applications/workbench/workbench/plotting/test/test_propertiesdialog.py +++ b/qt/applications/workbench/workbench/plotting/test/test_propertiesdialog.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/applications/workbench/workbench/plotting/test/test_utility.py b/qt/applications/workbench/workbench/plotting/test/test_utility.py index 4191d819d0b567081cac91c4fb23fc42b6499fc1..9927c34aa0d07e0379dd413b67dc75c260adb05f 100644 --- a/qt/applications/workbench/workbench/plotting/test/test_utility.py +++ b/qt/applications/workbench/workbench/plotting/test/test_utility.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid package from __future__ import absolute_import diff --git a/qt/applications/workbench/workbench/plotting/toolbar.py b/qt/applications/workbench/workbench/plotting/toolbar.py index 96dfdf7abeede9d63faff728f4663f0fc76d1795..34e050eba708c07d9a8f947ed0860534abbd62a1 100644 --- a/qt/applications/workbench/workbench/plotting/toolbar.py +++ b/qt/applications/workbench/workbench/plotting/toolbar.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/applications/workbench/workbench/plugins/__init__.py b/qt/applications/workbench/workbench/plugins/__init__.py index d2cfb75232dfb59fac674e2b49dba356e18ebbc1..ffedf5d542e31f4d22d7833e9c94f5003f02b3cb 100644 --- a/qt/applications/workbench/workbench/plugins/__init__.py +++ b/qt/applications/workbench/workbench/plugins/__init__.py @@ -1,6 +1,6 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + diff --git a/qt/applications/workbench/workbench/plugins/algorithmselectorwidget.py b/qt/applications/workbench/workbench/plugins/algorithmselectorwidget.py index 0f9c6e4b51f3d05480f3f5e9f5f84c6bcba7ac6a..58972040250f607d7b368c3060eab1d236ab5ddd 100644 --- a/qt/applications/workbench/workbench/plugins/algorithmselectorwidget.py +++ b/qt/applications/workbench/workbench/plugins/algorithmselectorwidget.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/applications/workbench/workbench/plugins/base.py b/qt/applications/workbench/workbench/plugins/base.py index 7dc9e1fc3eafc97dbf7173cebb9811a02f8b9244..3701a411db137cf8d602479c21f20b72d1bc16c4 100644 --- a/qt/applications/workbench/workbench/plugins/base.py +++ b/qt/applications/workbench/workbench/plugins/base.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/applications/workbench/workbench/plugins/editor.py b/qt/applications/workbench/workbench/plugins/editor.py index 649061017fb7227de87e3ddadcdd3a23d14e7214..f34125a26c9fdb905e7d15c17224c703da277027 100644 --- a/qt/applications/workbench/workbench/plugins/editor.py +++ b/qt/applications/workbench/workbench/plugins/editor.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/applications/workbench/workbench/plugins/exception_handler/__init__.py b/qt/applications/workbench/workbench/plugins/exception_handler/__init__.py index 58d5558185ceb2eda1398b3942bf3dc9bcbdd09d..a2cbe241dd56caebdcd443639d8be278c5036742 100644 --- a/qt/applications/workbench/workbench/plugins/exception_handler/__init__.py +++ b/qt/applications/workbench/workbench/plugins/exception_handler/__init__.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. from __future__ import absolute_import diff --git a/qt/applications/workbench/workbench/plugins/exception_handler/error_messagebox.py b/qt/applications/workbench/workbench/plugins/exception_handler/error_messagebox.py index 791a4f9844054532230834b1c2eeb8f3b7f6bf24..d7eac019918910e223f79d89c59cbfd273dfac48 100644 --- a/qt/applications/workbench/workbench/plugins/exception_handler/error_messagebox.py +++ b/qt/applications/workbench/workbench/plugins/exception_handler/error_messagebox.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. from __future__ import absolute_import diff --git a/qt/applications/workbench/workbench/plugins/jupyterconsole.py b/qt/applications/workbench/workbench/plugins/jupyterconsole.py index 0919bfc9b03b60ae19f32c3d0f19ffda758004a6..10737d2c9f010addcc5d64ca4b555eda6c1143e0 100644 --- a/qt/applications/workbench/workbench/plugins/jupyterconsole.py +++ b/qt/applications/workbench/workbench/plugins/jupyterconsole.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/applications/workbench/workbench/plugins/logmessagedisplay.py b/qt/applications/workbench/workbench/plugins/logmessagedisplay.py index c3b0123a27ba37f288595a1076b07a86b9ea702e..c9e431a22e5e292cd6989165d4784b13f0baeeea 100644 --- a/qt/applications/workbench/workbench/plugins/logmessagedisplay.py +++ b/qt/applications/workbench/workbench/plugins/logmessagedisplay.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/applications/workbench/workbench/plugins/plotselectorwidget.py b/qt/applications/workbench/workbench/plugins/plotselectorwidget.py index 161b3eb6a6670f65349b1aa050445000d2b7ea6d..81618bca7337e7ac327a0cf29407a0abf0416c4a 100644 --- a/qt/applications/workbench/workbench/plugins/plotselectorwidget.py +++ b/qt/applications/workbench/workbench/plugins/plotselectorwidget.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/applications/workbench/workbench/plugins/test/__init__.py b/qt/applications/workbench/workbench/plugins/test/__init__.py index d2cfb75232dfb59fac674e2b49dba356e18ebbc1..ffedf5d542e31f4d22d7833e9c94f5003f02b3cb 100644 --- a/qt/applications/workbench/workbench/plugins/test/__init__.py +++ b/qt/applications/workbench/workbench/plugins/test/__init__.py @@ -1,6 +1,6 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + diff --git a/qt/applications/workbench/workbench/plugins/test/test_editor.py b/qt/applications/workbench/workbench/plugins/test/test_editor.py index 4521825b7bf1db721199c152d19fad1c33222406..39136a392cb8d90ab68dd4da6890751cfc86eb45 100644 --- a/qt/applications/workbench/workbench/plugins/test/test_editor.py +++ b/qt/applications/workbench/workbench/plugins/test/test_editor.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/applications/workbench/workbench/plugins/test/test_exception_handler.py b/qt/applications/workbench/workbench/plugins/test/test_exception_handler.py index 1f23ed55c2073b8f11f11e4028a62393107ce299..378cd501cefcbd3c15b1e98a4562efd02142e242 100644 --- a/qt/applications/workbench/workbench/plugins/test/test_exception_handler.py +++ b/qt/applications/workbench/workbench/plugins/test/test_exception_handler.py @@ -1,9 +1,8 @@ -# # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import absolute_import, unicode_literals diff --git a/qt/applications/workbench/workbench/plugins/test/test_jupyterconsole.py b/qt/applications/workbench/workbench/plugins/test/test_jupyterconsole.py index 2508cf3bc7db5f9322ad8f18cba60d7b78d6279f..3b267279d7711caa8095c2e7a430c23ec8d3c008 100644 --- a/qt/applications/workbench/workbench/plugins/test/test_jupyterconsole.py +++ b/qt/applications/workbench/workbench/plugins/test/test_jupyterconsole.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/applications/workbench/workbench/plugins/test/test_workspacewidget.py b/qt/applications/workbench/workbench/plugins/test/test_workspacewidget.py index 70dc7aa0fe989ae940cd6c5a6a7268d75bc84927..12ac4b7b71c0975945cbdbd91060d07da731e7ae 100644 --- a/qt/applications/workbench/workbench/plugins/test/test_workspacewidget.py +++ b/qt/applications/workbench/workbench/plugins/test/test_workspacewidget.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/applications/workbench/workbench/plugins/workspacewidget.py b/qt/applications/workbench/workbench/plugins/workspacewidget.py index c9a1f9110c3e861c1c3fd511f33043a8c91c5de1..b3af9a0989b521671a13ca9fe2062eb6eeceb956 100644 --- a/qt/applications/workbench/workbench/plugins/workspacewidget.py +++ b/qt/applications/workbench/workbench/plugins/workspacewidget.py @@ -1,9 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin -# This file is part of the mantid workbench. +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # # diff --git a/qt/applications/workbench/workbench/projectrecovery/__init__.py b/qt/applications/workbench/workbench/projectrecovery/__init__.py index fa481f76cef7127fd81c5757e6dec34d652833dc..2e70f99c5c101829a88a6a08d6f27eba88eb90bf 100644 --- a/qt/applications/workbench/workbench/projectrecovery/__init__.py +++ b/qt/applications/workbench/workbench/projectrecovery/__init__.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package # diff --git a/qt/applications/workbench/workbench/projectrecovery/projectrecovery.py b/qt/applications/workbench/workbench/projectrecovery/projectrecovery.py index 6df5b67971257fe797cb905974213a9c9b337559..3bd71ff6e5bcb90910ccb7fb7fec0d7f43749624 100644 --- a/qt/applications/workbench/workbench/projectrecovery/projectrecovery.py +++ b/qt/applications/workbench/workbench/projectrecovery/projectrecovery.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package # diff --git a/qt/applications/workbench/workbench/projectrecovery/projectrecoveryloader.py b/qt/applications/workbench/workbench/projectrecovery/projectrecoveryloader.py index 15073818631b70bf6df673ff3736ca38024f67df..6ffa0a9ca44c86dcfa54658463ad379961308939 100644 --- a/qt/applications/workbench/workbench/projectrecovery/projectrecoveryloader.py +++ b/qt/applications/workbench/workbench/projectrecovery/projectrecoveryloader.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package # diff --git a/qt/applications/workbench/workbench/projectrecovery/projectrecoverysaver.py b/qt/applications/workbench/workbench/projectrecovery/projectrecoverysaver.py index 90c2f3524ef5895914af8b03070a3f8b3a83c38a..40bfa90c672abc10b95c9bfaf5d0e9060ec26abe 100644 --- a/qt/applications/workbench/workbench/projectrecovery/projectrecoverysaver.py +++ b/qt/applications/workbench/workbench/projectrecovery/projectrecoverysaver.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package # diff --git a/qt/applications/workbench/workbench/projectrecovery/recoverygui/__init__.py b/qt/applications/workbench/workbench/projectrecovery/recoverygui/__init__.py index fa481f76cef7127fd81c5757e6dec34d652833dc..2e70f99c5c101829a88a6a08d6f27eba88eb90bf 100644 --- a/qt/applications/workbench/workbench/projectrecovery/recoverygui/__init__.py +++ b/qt/applications/workbench/workbench/projectrecovery/recoverygui/__init__.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package # diff --git a/qt/applications/workbench/workbench/projectrecovery/recoverygui/projectrecoverymodel.py b/qt/applications/workbench/workbench/projectrecovery/recoverygui/projectrecoverymodel.py index 775d177c3889a38fb5e6f58e1c4eeb147cd2ea64..0d4b442363cbc00130beeb6426cb808990d4ff5b 100644 --- a/qt/applications/workbench/workbench/projectrecovery/recoverygui/projectrecoverymodel.py +++ b/qt/applications/workbench/workbench/projectrecovery/recoverygui/projectrecoverymodel.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package # diff --git a/qt/applications/workbench/workbench/projectrecovery/recoverygui/projectrecoverypresenter.py b/qt/applications/workbench/workbench/projectrecovery/recoverygui/projectrecoverypresenter.py index b9a3b19b8b64723bb03d4f2348ea23cd4af4a476..87190845e09b2cd23505a23bae8fac148ba2824e 100644 --- a/qt/applications/workbench/workbench/projectrecovery/recoverygui/projectrecoverypresenter.py +++ b/qt/applications/workbench/workbench/projectrecovery/recoverygui/projectrecoverypresenter.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package # diff --git a/qt/applications/workbench/workbench/projectrecovery/recoverygui/projectrecoverywidgetview.py b/qt/applications/workbench/workbench/projectrecovery/recoverygui/projectrecoverywidgetview.py index b262f0abe81271f7d295baf76413bd2eaa370478..1d80cbdd9a22c8f9fabb9b2f865d38cfd4f41036 100644 --- a/qt/applications/workbench/workbench/projectrecovery/recoverygui/projectrecoverywidgetview.py +++ b/qt/applications/workbench/workbench/projectrecovery/recoverygui/projectrecoverywidgetview.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package # diff --git a/qt/applications/workbench/workbench/projectrecovery/recoverygui/recoveryfailureview.py b/qt/applications/workbench/workbench/projectrecovery/recoverygui/recoveryfailureview.py index 321ac8e999e6c81ea1dd4fca4b64891d674df170..ea28b892ffe8a8fadeb1595c5b0d5f19d7ba8a2e 100644 --- a/qt/applications/workbench/workbench/projectrecovery/recoverygui/recoveryfailureview.py +++ b/qt/applications/workbench/workbench/projectrecovery/recoverygui/recoveryfailureview.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package # diff --git a/qt/applications/workbench/workbench/projectrecovery/recoverygui/test/__init__.py b/qt/applications/workbench/workbench/projectrecovery/recoverygui/test/__init__.py index fa481f76cef7127fd81c5757e6dec34d652833dc..2e70f99c5c101829a88a6a08d6f27eba88eb90bf 100644 --- a/qt/applications/workbench/workbench/projectrecovery/recoverygui/test/__init__.py +++ b/qt/applications/workbench/workbench/projectrecovery/recoverygui/test/__init__.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package # diff --git a/qt/applications/workbench/workbench/projectrecovery/recoverygui/test/test_projectrecoverymodel.py b/qt/applications/workbench/workbench/projectrecovery/recoverygui/test/test_projectrecoverymodel.py index 08903139496d16566ebd273c2d54fc7b7d8d56c5..1fa778efbdcf061c6aa2a681a0acebef251d8be1 100644 --- a/qt/applications/workbench/workbench/projectrecovery/recoverygui/test/test_projectrecoverymodel.py +++ b/qt/applications/workbench/workbench/projectrecovery/recoverygui/test/test_projectrecoverymodel.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package # diff --git a/qt/applications/workbench/workbench/projectrecovery/recoverygui/test/test_projectrecoverypresenter.py b/qt/applications/workbench/workbench/projectrecovery/recoverygui/test/test_projectrecoverypresenter.py index f7a3f471ccef5fe680c8b488a404fa7df07d97af..9ac771a46cc9ff06f23bb5f1cf6a0e207f325210 100644 --- a/qt/applications/workbench/workbench/projectrecovery/recoverygui/test/test_projectrecoverypresenter.py +++ b/qt/applications/workbench/workbench/projectrecovery/recoverygui/test/test_projectrecoverypresenter.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package # diff --git a/qt/applications/workbench/workbench/projectrecovery/recoverygui/test/test_projectrecoverywidgetview.py b/qt/applications/workbench/workbench/projectrecovery/recoverygui/test/test_projectrecoverywidgetview.py index 44135dc3715a2d8c8560266553b49db0152e7ca3..fa6aee88220436f7117d3568e3666d71d2549b5b 100644 --- a/qt/applications/workbench/workbench/projectrecovery/recoverygui/test/test_projectrecoverywidgetview.py +++ b/qt/applications/workbench/workbench/projectrecovery/recoverygui/test/test_projectrecoverywidgetview.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package # diff --git a/qt/applications/workbench/workbench/projectrecovery/recoverygui/test/test_recoveryfailureview.py b/qt/applications/workbench/workbench/projectrecovery/recoverygui/test/test_recoveryfailureview.py index 1f41775b0c636f1403b74ad87880726ff7c4b393..c9601cbe8f2380d415f4e0ecea5405c162e1b603 100644 --- a/qt/applications/workbench/workbench/projectrecovery/recoverygui/test/test_recoveryfailureview.py +++ b/qt/applications/workbench/workbench/projectrecovery/recoverygui/test/test_recoveryfailureview.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package # diff --git a/qt/applications/workbench/workbench/projectrecovery/test/__init__.py b/qt/applications/workbench/workbench/projectrecovery/test/__init__.py index fa481f76cef7127fd81c5757e6dec34d652833dc..2e70f99c5c101829a88a6a08d6f27eba88eb90bf 100644 --- a/qt/applications/workbench/workbench/projectrecovery/test/__init__.py +++ b/qt/applications/workbench/workbench/projectrecovery/test/__init__.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package # diff --git a/qt/applications/workbench/workbench/projectrecovery/test/test_projectrecovery.py b/qt/applications/workbench/workbench/projectrecovery/test/test_projectrecovery.py index d6292367fe3da27a0154119e505d46c83cb45ee7..88d5e895516a66a8c20dd730586ce4cb8c3bb519 100644 --- a/qt/applications/workbench/workbench/projectrecovery/test/test_projectrecovery.py +++ b/qt/applications/workbench/workbench/projectrecovery/test/test_projectrecovery.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package # diff --git a/qt/applications/workbench/workbench/projectrecovery/test/test_projectrecoveryloader.py b/qt/applications/workbench/workbench/projectrecovery/test/test_projectrecoveryloader.py index e2e57821faa2494b7a12b2134723bd57a7963fa8..6ad9ca74a3c56b37c4f30741105a3a88b7b4eaf4 100644 --- a/qt/applications/workbench/workbench/projectrecovery/test/test_projectrecoveryloader.py +++ b/qt/applications/workbench/workbench/projectrecovery/test/test_projectrecoveryloader.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package # diff --git a/qt/applications/workbench/workbench/projectrecovery/test/test_projectrecoverysaver.py b/qt/applications/workbench/workbench/projectrecovery/test/test_projectrecoverysaver.py index e9a9dc9b4781666d599e6647daf98dfde38e9a14..50dd04418d73a5e2d6c43b31e62bb2d842e7777a 100644 --- a/qt/applications/workbench/workbench/projectrecovery/test/test_projectrecoverysaver.py +++ b/qt/applications/workbench/workbench/projectrecovery/test/test_projectrecoverysaver.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package # diff --git a/qt/applications/workbench/workbench/requirements.py b/qt/applications/workbench/workbench/requirements.py index f3e745009d36391cd52132fbe4ad55621946840b..a695991d216800cd39c72562896a54ff778e79fe 100644 --- a/qt/applications/workbench/workbench/requirements.py +++ b/qt/applications/workbench/workbench/requirements.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + """Defines methods to check requirements for the application """ diff --git a/qt/applications/workbench/workbench/test/__init__.py b/qt/applications/workbench/workbench/test/__init__.py index d2cfb75232dfb59fac674e2b49dba356e18ebbc1..ffedf5d542e31f4d22d7833e9c94f5003f02b3cb 100644 --- a/qt/applications/workbench/workbench/test/__init__.py +++ b/qt/applications/workbench/workbench/test/__init__.py @@ -1,6 +1,6 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + diff --git a/qt/applications/workbench/workbench/test/mainwindowtest.py b/qt/applications/workbench/workbench/test/mainwindowtest.py index ee884481488d31f106fca15cabb43da83712d57d..3c2cd0b2a36672f02627077b43bc2c9e71ff7215 100644 --- a/qt/applications/workbench/workbench/test/mainwindowtest.py +++ b/qt/applications/workbench/workbench/test/mainwindowtest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/applications/workbench/workbench/test/test_import.py b/qt/applications/workbench/workbench/test/test_import.py index 743b8a0b413dd1410ed8b4262cf4d82ac2c459c4..ee6db74c54a86081f520e9ec4e7822724e6731c6 100644 --- a/qt/applications/workbench/workbench/test/test_import.py +++ b/qt/applications/workbench/workbench/test/test_import.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/applications/workbench/workbench/utils/__init__.py b/qt/applications/workbench/workbench/utils/__init__.py index e7f27db638a12cdb86b7326e5d3e476c425ea4a4..f322333cdabbdbddb73348401c0da98e107b4436 100644 --- a/qt/applications/workbench/workbench/utils/__init__.py +++ b/qt/applications/workbench/workbench/utils/__init__.py @@ -1,7 +1,7 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidworkbench package diff --git a/qt/applications/workbench/workbench/utils/test/__init__.py b/qt/applications/workbench/workbench/utils/test/__init__.py index e7f27db638a12cdb86b7326e5d3e476c425ea4a4..f322333cdabbdbddb73348401c0da98e107b4436 100644 --- a/qt/applications/workbench/workbench/utils/test/__init__.py +++ b/qt/applications/workbench/workbench/utils/test/__init__.py @@ -1,7 +1,7 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidworkbench package diff --git a/qt/applications/workbench/workbench/utils/test/test_workspacehistorygeneration.py b/qt/applications/workbench/workbench/utils/test/test_workspacehistorygeneration.py index 6cf796c7fa5a881efe92889dfa87e60943878b91..1336877721a194c71c9b67be90b9cfe393e09ae5 100644 --- a/qt/applications/workbench/workbench/utils/test/test_workspacehistorygeneration.py +++ b/qt/applications/workbench/workbench/utils/test/test_workspacehistorygeneration.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidworkbench package diff --git a/qt/applications/workbench/workbench/utils/test/windowfindertest.py b/qt/applications/workbench/workbench/utils/test/windowfindertest.py index 1d7e094931d6a8a46ea53910aad7f75a4f229aad..f9ac6f7b92656171eca11c87366b48b228170820 100644 --- a/qt/applications/workbench/workbench/utils/test/windowfindertest.py +++ b/qt/applications/workbench/workbench/utils/test/windowfindertest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/applications/workbench/workbench/utils/windowfinder.py b/qt/applications/workbench/workbench/utils/windowfinder.py index 35e3e1b55b76093b1abe3919f0fbaccaf42b2273..cd60ad7a56bba68890976531c857bf7855516ce1 100644 --- a/qt/applications/workbench/workbench/utils/windowfinder.py +++ b/qt/applications/workbench/workbench/utils/windowfinder.py @@ -1,10 +1,9 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + - from __future__ import (absolute_import, division, print_function, unicode_literals) from qtpy.QtWidgets import QApplication diff --git a/qt/applications/workbench/workbench/utils/workspacehistorygeneration.py b/qt/applications/workbench/workbench/utils/workspacehistorygeneration.py index b53090b04ed1b2bec40e6e91d493bccba0efab3c..71270b07c6a01ad913389b5e94dda12e44bfec4f 100644 --- a/qt/applications/workbench/workbench/utils/workspacehistorygeneration.py +++ b/qt/applications/workbench/workbench/utils/workspacehistorygeneration.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidworkbench package diff --git a/qt/applications/workbench/workbench/widgets/__init__.py b/qt/applications/workbench/workbench/widgets/__init__.py index d0dc5fa5625ec49aa57ef9e9935e47d0a4794d50..25cfdea2471796909e6c46f8d049247ef8e1093b 100644 --- a/qt/applications/workbench/workbench/widgets/__init__.py +++ b/qt/applications/workbench/workbench/widgets/__init__.py @@ -1,7 +1,7 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. diff --git a/qt/applications/workbench/workbench/widgets/plotselector/__init__.py b/qt/applications/workbench/workbench/widgets/plotselector/__init__.py index d2cfb75232dfb59fac674e2b49dba356e18ebbc1..ffedf5d542e31f4d22d7833e9c94f5003f02b3cb 100644 --- a/qt/applications/workbench/workbench/widgets/plotselector/__init__.py +++ b/qt/applications/workbench/workbench/widgets/plotselector/__init__.py @@ -1,6 +1,6 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + diff --git a/qt/applications/workbench/workbench/widgets/plotselector/model.py b/qt/applications/workbench/workbench/widgets/plotselector/model.py index 80906fa8fe62be3e41c926ac25bede1287846afe..8a9824d7669cb70c08a700fe8199b48a7271209a 100644 --- a/qt/applications/workbench/workbench/widgets/plotselector/model.py +++ b/qt/applications/workbench/workbench/widgets/plotselector/model.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/applications/workbench/workbench/widgets/plotselector/presenter.py b/qt/applications/workbench/workbench/widgets/plotselector/presenter.py index 17165ba6e69a90781009e1e373ab8d4ab079260e..ae58ca8efbee6ad881bea863e7e7c784daacc4ce 100644 --- a/qt/applications/workbench/workbench/widgets/plotselector/presenter.py +++ b/qt/applications/workbench/workbench/widgets/plotselector/presenter.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/applications/workbench/workbench/widgets/plotselector/test/__init__.py b/qt/applications/workbench/workbench/widgets/plotselector/test/__init__.py index d2cfb75232dfb59fac674e2b49dba356e18ebbc1..ffedf5d542e31f4d22d7833e9c94f5003f02b3cb 100644 --- a/qt/applications/workbench/workbench/widgets/plotselector/test/__init__.py +++ b/qt/applications/workbench/workbench/widgets/plotselector/test/__init__.py @@ -1,6 +1,6 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + diff --git a/qt/applications/workbench/workbench/widgets/plotselector/test/test_plotselector_model.py b/qt/applications/workbench/workbench/widgets/plotselector/test/test_plotselector_model.py index 1ead7243d3496bfa6192c377e2057c88678e28c3..00c53750415967b83630ce8c91249cf5d0e0ad45 100644 --- a/qt/applications/workbench/workbench/widgets/plotselector/test/test_plotselector_model.py +++ b/qt/applications/workbench/workbench/widgets/plotselector/test/test_plotselector_model.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/applications/workbench/workbench/widgets/plotselector/test/test_plotselector_presenter.py b/qt/applications/workbench/workbench/widgets/plotselector/test/test_plotselector_presenter.py index 758127ae4367a1353980a64ba2a292e6ccc98723..c1cc8e2e4ab5455a19f2fe1e5567a70c877284ab 100644 --- a/qt/applications/workbench/workbench/widgets/plotselector/test/test_plotselector_presenter.py +++ b/qt/applications/workbench/workbench/widgets/plotselector/test/test_plotselector_presenter.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/applications/workbench/workbench/widgets/plotselector/test/test_plotselector_view.py b/qt/applications/workbench/workbench/widgets/plotselector/test/test_plotselector_view.py index 81719bdade7d7d1752d82e17f5a93fa5061b0b1d..d413a60e1a5a134a9564816835be6079f78f70f1 100644 --- a/qt/applications/workbench/workbench/widgets/plotselector/test/test_plotselector_view.py +++ b/qt/applications/workbench/workbench/widgets/plotselector/test/test_plotselector_view.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/applications/workbench/workbench/widgets/plotselector/view.py b/qt/applications/workbench/workbench/widgets/plotselector/view.py index 078e946b5b9573c9b6336a237958979591bf7f10..9f7c32e2e1abf5f769b659747a3e0b65e8921204 100644 --- a/qt/applications/workbench/workbench/widgets/plotselector/view.py +++ b/qt/applications/workbench/workbench/widgets/plotselector/view.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/applications/workbench/workbench/widgets/settings/__init__.py b/qt/applications/workbench/workbench/widgets/settings/__init__.py index 5939908cbf4758a7388fecb56240e885e7bba3a0..8f662f5629a236f01dd4ba22527861cbb66a53ae 100644 --- a/qt/applications/workbench/workbench/widgets/settings/__init__.py +++ b/qt/applications/workbench/workbench/widgets/settings/__init__.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench """ diff --git a/qt/applications/workbench/workbench/widgets/settings/categories/__init__.py b/qt/applications/workbench/workbench/widgets/settings/categories/__init__.py index 9e66ae4623340e8ba3b356ef0bd1af84f18d1a72..cb8314fcb22504de010a491d4325b34b7ba4fc34 100644 --- a/qt/applications/workbench/workbench/widgets/settings/categories/__init__.py +++ b/qt/applications/workbench/workbench/widgets/settings/categories/__init__.py @@ -1,10 +1,10 @@ -# coding=utf-8 # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + +# coding=utf-8 # This file is part of the mantid workbench. """ The categories settings section package. It should contain settings relevant diff --git a/qt/applications/workbench/workbench/widgets/settings/categories/presenter.py b/qt/applications/workbench/workbench/widgets/settings/categories/presenter.py index dde0f2774863289a4866d994377972f6f1a62a17..8071f360fcc4c109a9fb73f00743aed9c7dab78e 100644 --- a/qt/applications/workbench/workbench/widgets/settings/categories/presenter.py +++ b/qt/applications/workbench/workbench/widgets/settings/categories/presenter.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench # diff --git a/qt/applications/workbench/workbench/widgets/settings/categories/test/__init__.py b/qt/applications/workbench/workbench/widgets/settings/categories/test/__init__.py index 00f2db511202e7dffabc3fc4639b374f311ebabc..55fbff0bafc3c9030522a109e8bfdf3f7ec9604e 100644 --- a/qt/applications/workbench/workbench/widgets/settings/categories/test/__init__.py +++ b/qt/applications/workbench/workbench/widgets/settings/categories/test/__init__.py @@ -1,8 +1,8 @@ -# coding=utf-8 # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + +# coding=utf-8 # This file is part of the mantid workbench. diff --git a/qt/applications/workbench/workbench/widgets/settings/categories/test/test_categories_settings.py b/qt/applications/workbench/workbench/widgets/settings/categories/test/test_categories_settings.py index c824abaf26b934dbc3604890ec20954a2e429f49..0b06caf05642f06475fe59cbc85a0981c66f2024 100644 --- a/qt/applications/workbench/workbench/widgets/settings/categories/test/test_categories_settings.py +++ b/qt/applications/workbench/workbench/widgets/settings/categories/test/test_categories_settings.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench from __future__ import absolute_import, unicode_literals diff --git a/qt/applications/workbench/workbench/widgets/settings/categories/view.py b/qt/applications/workbench/workbench/widgets/settings/categories/view.py index 39fdb93ff5f130ef93a3c483a8f9a4bda7be5d67..3b38e107e8c2189d3dc07e81ad85583462ee1e63 100644 --- a/qt/applications/workbench/workbench/widgets/settings/categories/view.py +++ b/qt/applications/workbench/workbench/widgets/settings/categories/view.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench from __future__ import absolute_import, unicode_literals diff --git a/qt/applications/workbench/workbench/widgets/settings/fitting/__init__.py b/qt/applications/workbench/workbench/widgets/settings/fitting/__init__.py index 00f2db511202e7dffabc3fc4639b374f311ebabc..55fbff0bafc3c9030522a109e8bfdf3f7ec9604e 100644 --- a/qt/applications/workbench/workbench/widgets/settings/fitting/__init__.py +++ b/qt/applications/workbench/workbench/widgets/settings/fitting/__init__.py @@ -1,8 +1,8 @@ -# coding=utf-8 # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + +# coding=utf-8 # This file is part of the mantid workbench. diff --git a/qt/applications/workbench/workbench/widgets/settings/fitting/presenter.py b/qt/applications/workbench/workbench/widgets/settings/fitting/presenter.py index d0c3b121a90c77e69cba54af985aed15289affd8..a674816ec97b256dde4b108756134f199eed4ca3 100644 --- a/qt/applications/workbench/workbench/widgets/settings/fitting/presenter.py +++ b/qt/applications/workbench/workbench/widgets/settings/fitting/presenter.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench # diff --git a/qt/applications/workbench/workbench/widgets/settings/fitting/test/__init__.py b/qt/applications/workbench/workbench/widgets/settings/fitting/test/__init__.py index 00f2db511202e7dffabc3fc4639b374f311ebabc..55fbff0bafc3c9030522a109e8bfdf3f7ec9604e 100644 --- a/qt/applications/workbench/workbench/widgets/settings/fitting/test/__init__.py +++ b/qt/applications/workbench/workbench/widgets/settings/fitting/test/__init__.py @@ -1,8 +1,8 @@ -# coding=utf-8 # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + +# coding=utf-8 # This file is part of the mantid workbench. diff --git a/qt/applications/workbench/workbench/widgets/settings/fitting/test/test_fitting_settings.py b/qt/applications/workbench/workbench/widgets/settings/fitting/test/test_fitting_settings.py index 9cd24b1c374d9b1260d34fcca26fbb43acf2ea37..d0c762435d808ebccfcf243b098ddb71f08c72e8 100644 --- a/qt/applications/workbench/workbench/widgets/settings/fitting/test/test_fitting_settings.py +++ b/qt/applications/workbench/workbench/widgets/settings/fitting/test/test_fitting_settings.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench from __future__ import absolute_import, unicode_literals diff --git a/qt/applications/workbench/workbench/widgets/settings/fitting/view.py b/qt/applications/workbench/workbench/widgets/settings/fitting/view.py index 4c7ab1ecd50450cffca50a84342a204dd9bc452a..b1b34c71bf00fce150405ded5f2115e4a1cc24ec 100644 --- a/qt/applications/workbench/workbench/widgets/settings/fitting/view.py +++ b/qt/applications/workbench/workbench/widgets/settings/fitting/view.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench from __future__ import absolute_import, unicode_literals diff --git a/qt/applications/workbench/workbench/widgets/settings/general/__init__.py b/qt/applications/workbench/workbench/widgets/settings/general/__init__.py index 54438a5a5727b6667672b979fc73a8c58af93390..a34480eb22978abb7a208b113815d62dc66b83a2 100644 --- a/qt/applications/workbench/workbench/widgets/settings/general/__init__.py +++ b/qt/applications/workbench/workbench/widgets/settings/general/__init__.py @@ -1,10 +1,10 @@ -# coding=utf-8 # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + +# coding=utf-8 # This file is part of the mantid workbench. """ The General settings section package. It should contain settings relevant diff --git a/qt/applications/workbench/workbench/widgets/settings/general/presenter.py b/qt/applications/workbench/workbench/widgets/settings/general/presenter.py index 4e02c20620c8e3617e74d40cd9feebf09260e1cb..d978f76115c497137e56c38ca720bae35e2d5bea 100644 --- a/qt/applications/workbench/workbench/widgets/settings/general/presenter.py +++ b/qt/applications/workbench/workbench/widgets/settings/general/presenter.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench # diff --git a/qt/applications/workbench/workbench/widgets/settings/general/test/__init__.py b/qt/applications/workbench/workbench/widgets/settings/general/test/__init__.py index ca6af13e1d1dfd2afdf8ac11cbeea759f0248e25..51f52f0642d98fee3297513c0038541f41aae113 100644 --- a/qt/applications/workbench/workbench/widgets/settings/general/test/__init__.py +++ b/qt/applications/workbench/workbench/widgets/settings/general/test/__init__.py @@ -1,8 +1,8 @@ -# coding=utf-8 # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + +# coding=utf-8 # This file is part of the mantid workbench. diff --git a/qt/applications/workbench/workbench/widgets/settings/general/test/test_general_settings.py b/qt/applications/workbench/workbench/widgets/settings/general/test/test_general_settings.py index fc09e7061430b2c4bad626dd9f26205d5138191d..ffc88ebd93ff5e9a39c689aab1dfe775f17fd3c5 100644 --- a/qt/applications/workbench/workbench/widgets/settings/general/test/test_general_settings.py +++ b/qt/applications/workbench/workbench/widgets/settings/general/test/test_general_settings.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench from __future__ import absolute_import, unicode_literals diff --git a/qt/applications/workbench/workbench/widgets/settings/general/view.py b/qt/applications/workbench/workbench/widgets/settings/general/view.py index 1aed859ff748e966ee42e8110ad8f763c17eae35..37dee2ea68d2af805ed17a746a1016f25b0035f8 100644 --- a/qt/applications/workbench/workbench/widgets/settings/general/view.py +++ b/qt/applications/workbench/workbench/widgets/settings/general/view.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench from __future__ import absolute_import, unicode_literals diff --git a/qt/applications/workbench/workbench/widgets/settings/plots/__init__.py b/qt/applications/workbench/workbench/widgets/settings/plots/__init__.py index 00f2db511202e7dffabc3fc4639b374f311ebabc..55fbff0bafc3c9030522a109e8bfdf3f7ec9604e 100644 --- a/qt/applications/workbench/workbench/widgets/settings/plots/__init__.py +++ b/qt/applications/workbench/workbench/widgets/settings/plots/__init__.py @@ -1,8 +1,8 @@ -# coding=utf-8 # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + +# coding=utf-8 # This file is part of the mantid workbench. diff --git a/qt/applications/workbench/workbench/widgets/settings/plots/presenter.py b/qt/applications/workbench/workbench/widgets/settings/plots/presenter.py index 18aabe7b1392c3950d44a0f5778bd9f01ada26d8..d14e3dc071540e9c02f26df4fbce426005326fd2 100644 --- a/qt/applications/workbench/workbench/widgets/settings/plots/presenter.py +++ b/qt/applications/workbench/workbench/widgets/settings/plots/presenter.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench # diff --git a/qt/applications/workbench/workbench/widgets/settings/plots/test/__init__.py b/qt/applications/workbench/workbench/widgets/settings/plots/test/__init__.py index 00f2db511202e7dffabc3fc4639b374f311ebabc..55fbff0bafc3c9030522a109e8bfdf3f7ec9604e 100644 --- a/qt/applications/workbench/workbench/widgets/settings/plots/test/__init__.py +++ b/qt/applications/workbench/workbench/widgets/settings/plots/test/__init__.py @@ -1,8 +1,8 @@ -# coding=utf-8 # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + +# coding=utf-8 # This file is part of the mantid workbench. diff --git a/qt/applications/workbench/workbench/widgets/settings/plots/test/test_plot_settings.py b/qt/applications/workbench/workbench/widgets/settings/plots/test/test_plot_settings.py index ab2e8ce495b83764134f03f81c4fcaea058c0cc3..4e620ea673e41ad289eceab1498b17d69fc0a8ea 100644 --- a/qt/applications/workbench/workbench/widgets/settings/plots/test/test_plot_settings.py +++ b/qt/applications/workbench/workbench/widgets/settings/plots/test/test_plot_settings.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench from __future__ import absolute_import, unicode_literals diff --git a/qt/applications/workbench/workbench/widgets/settings/plots/view.py b/qt/applications/workbench/workbench/widgets/settings/plots/view.py index fd639cb7658d664d7f4d523a4de339f735e4d69a..3825049b5ab5780e09046b519f31c16798a97034 100644 --- a/qt/applications/workbench/workbench/widgets/settings/plots/view.py +++ b/qt/applications/workbench/workbench/widgets/settings/plots/view.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench from __future__ import absolute_import, unicode_literals diff --git a/qt/applications/workbench/workbench/widgets/settings/presenter.py b/qt/applications/workbench/workbench/widgets/settings/presenter.py index 98eef08aa4909f231e5d416feb9a884869b08bc5..9d0ca53319953b247e5270b1c7121865e0f362e4 100644 --- a/qt/applications/workbench/workbench/widgets/settings/presenter.py +++ b/qt/applications/workbench/workbench/widgets/settings/presenter.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench from __future__ import (absolute_import, unicode_literals) diff --git a/qt/applications/workbench/workbench/widgets/settings/test/__init__.py b/qt/applications/workbench/workbench/widgets/settings/test/__init__.py index ca6af13e1d1dfd2afdf8ac11cbeea759f0248e25..51f52f0642d98fee3297513c0038541f41aae113 100644 --- a/qt/applications/workbench/workbench/widgets/settings/test/__init__.py +++ b/qt/applications/workbench/workbench/widgets/settings/test/__init__.py @@ -1,8 +1,8 @@ -# coding=utf-8 # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + +# coding=utf-8 # This file is part of the mantid workbench. diff --git a/qt/applications/workbench/workbench/widgets/settings/test/test_settings_presenter.py b/qt/applications/workbench/workbench/widgets/settings/test/test_settings_presenter.py index d0b30c58cb4e270b87b4fb7e5592695f995fadc3..1e84dec45b2647aa40978f2e0c59f4cb1d01ff57 100644 --- a/qt/applications/workbench/workbench/widgets/settings/test/test_settings_presenter.py +++ b/qt/applications/workbench/workbench/widgets/settings/test/test_settings_presenter.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench from __future__ import absolute_import, unicode_literals diff --git a/qt/applications/workbench/workbench/widgets/settings/test/test_settings_view.py b/qt/applications/workbench/workbench/widgets/settings/test/test_settings_view.py index 0c6bc9e4cfcfaa4a81e533a01a8d001af93c328a..181b5935650dd9e9f8210b4ae8b043fba397ab23 100644 --- a/qt/applications/workbench/workbench/widgets/settings/test/test_settings_view.py +++ b/qt/applications/workbench/workbench/widgets/settings/test/test_settings_view.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench from __future__ import absolute_import, unicode_literals diff --git a/qt/applications/workbench/workbench/widgets/settings/view.py b/qt/applications/workbench/workbench/widgets/settings/view.py index b97c21559a4db39c1ef7977b5d01f926dfd91068..68a36a91350b1265065114bbcab6cc3b5eacf3ed 100644 --- a/qt/applications/workbench/workbench/widgets/settings/view.py +++ b/qt/applications/workbench/workbench/widgets/settings/view.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench from __future__ import absolute_import, unicode_literals diff --git a/qt/icons/CMakeLists.txt b/qt/icons/CMakeLists.txt index 926859b20f25eb85dad36969815bccc3ccbd0fcd..2a390c22e883e06d1af19531179cc1038707f5c9 100644 --- a/qt/icons/CMakeLists.txt +++ b/qt/icons/CMakeLists.txt @@ -78,8 +78,7 @@ mtd_add_qt_tests( LINK_LIBS ${TARGET_LIBRARIES} ${Boost_LIBRARIES} - ${GMOCK_LIBRARIES} - ${GTEST_LIBRARIES} + gmock MTD_QT_LINK_LIBS MantidQtIcons PARENT_DEPENDENCIES GUITests ) diff --git a/qt/icons/inc/MantidQtIcons/CharIconEngine.h b/qt/icons/inc/MantidQtIcons/CharIconEngine.h index fc51788355309990d7f4d784a41ce1f3194ee964..9002cae11d94b2657863db43d35e8e084eb42bca 100644 --- a/qt/icons/inc/MantidQtIcons/CharIconEngine.h +++ b/qt/icons/inc/MantidQtIcons/CharIconEngine.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -35,7 +35,7 @@ class CharIconPainter; class EXPORT_OPT_MANTIDQT_ICONS CharIconEngine : public QIconEngine { public: CharIconEngine(IconicFont *iconic, CharIconPainter *painter, - QList<QHash<QString, QVariant>> options); + const QList<QHash<QString, QVariant>> &options); void paint(QPainter *painter, const QRect &rect, QIcon::Mode mode, QIcon::State state) override; QPixmap pixmap(const QSize &size, QIcon::Mode mode, diff --git a/qt/icons/inc/MantidQtIcons/CharIconPainter.h b/qt/icons/inc/MantidQtIcons/CharIconPainter.h index 5e43b0682dede4b158988389c87aefb89a9624b8..f5cbb8df1737c6128dbe0cf2106ba3206c2f2b45 100644 --- a/qt/icons/inc/MantidQtIcons/CharIconPainter.h +++ b/qt/icons/inc/MantidQtIcons/CharIconPainter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/icons/inc/MantidQtIcons/DllOption.h b/qt/icons/inc/MantidQtIcons/DllOption.h index 7a41cf3b9f0d9ef8af7c27ff3297aee6d78a27e9..58f49968937f4a627f10e490439da1aed40e5809 100644 --- a/qt/icons/inc/MantidQtIcons/DllOption.h +++ b/qt/icons/inc/MantidQtIcons/DllOption.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/icons/inc/MantidQtIcons/Icon.h b/qt/icons/inc/MantidQtIcons/Icon.h index ecc5ac7a8c7e8200a5845f2ee0c89f57a5899899..f1b5d459aa6bf83bc18ad31897957df6a00a1683 100644 --- a/qt/icons/inc/MantidQtIcons/Icon.h +++ b/qt/icons/inc/MantidQtIcons/Icon.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/icons/resources/updatematerialdesignjson.py b/qt/icons/resources/updatematerialdesignjson.py index 8043e635c22f3b245c817624b62139e720fe87d6..1bba70f54743b6256baa8b1da2326450cf9f2ae9 100644 --- a/qt/icons/resources/updatematerialdesignjson.py +++ b/qt/icons/resources/updatematerialdesignjson.py @@ -1,3 +1,9 @@ +# Mantid Repository : https://github.com/mantidproject/mantid +# +# Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS +# SPDX - License - Identifier: GPL - 3.0 + # Script from https://github.com/spyder-ide/qtawesome/commit/4985bd6e9bb75824de2d2f789fe5fbbf4016b823 # script used to create charmap import re diff --git a/qt/icons/src/CharIconEngine.cpp b/qt/icons/src/CharIconEngine.cpp index 84f47d41f5ed3d736220e818d638e4c0a3a183e6..40fa6670bfd65967150016fd6a4ce60f2e7ebf6d 100644 --- a/qt/icons/src/CharIconEngine.cpp +++ b/qt/icons/src/CharIconEngine.cpp @@ -1,9 +1,11 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + +#include <utility> + #include "MantidQtIcons/CharIconEngine.h" #include "MantidQtIcons/CharIconPainter.h" @@ -11,8 +13,8 @@ namespace MantidQt { namespace Icons { CharIconEngine::CharIconEngine(IconicFont *iconic, CharIconPainter *painter, - QList<QHash<QString, QVariant>> options) - : m_iconic(iconic), m_painter(painter), m_options(options) {} + const QList<QHash<QString, QVariant>> &options) + : m_iconic(iconic), m_painter(painter), m_options(std::move(options)) {} void CharIconEngine::paint(QPainter *painter, const QRect &rect, QIcon::Mode mode, QIcon::State state) { diff --git a/qt/icons/src/CharIconPainter.cpp b/qt/icons/src/CharIconPainter.cpp index 577192651494697bd95cab644b4e3c52581ffbab..e2cf74d8f03a02da1932edccf4096939278eee06 100644 --- a/qt/icons/src/CharIconPainter.cpp +++ b/qt/icons/src/CharIconPainter.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtIcons/CharIconPainter.h" #include "MantidQtIcons/Icon.h" diff --git a/qt/icons/src/Icon.cpp b/qt/icons/src/Icon.cpp index a699002f0270fecfc97e4a6fc9abebf42112787f..0bc0293ad1274649f01df25aa05b2bc192f96db2 100644 --- a/qt/icons/src/Icon.cpp +++ b/qt/icons/src/Icon.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtIcons/Icon.h" @@ -31,7 +31,7 @@ MantidQt::Icons::IconicFont &iconFontInstance() { // https://stackoverflow.com/questions/4169988/easiest-way-to-parse-json-in-qt-4-7 // specifically in the answer by user2243820 on April 4th 2013 at 8:10 -QHash<QString, QVariant> decodeInner(QScriptValue object) { +QHash<QString, QVariant> decodeInner(const QScriptValue &object) { QHash<QString, QVariant> map; QScriptValueIterator it(object); while (it.hasNext()) { diff --git a/qt/icons/test/IconTest.h b/qt/icons/test/IconTest.h index e59d0ffa9d7d419a0767dfac5f5f37cd3aba2ad8..dc1900aa843737c26e0548d3d66552953940a510 100644 --- a/qt/icons/test/IconTest.h +++ b/qt/icons/test/IconTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/icons/test/IconsTestInitialization.h b/qt/icons/test/IconsTestInitialization.h index 7ac269012abeffcdb0eb0d657b0e563ccb95a103..bcf9c759dbd0b7c5d5ff1f0253eb71201ca39571 100644 --- a/qt/icons/test/IconsTestInitialization.h +++ b/qt/icons/test/IconsTestInitialization.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/PVPlugins/Filters/PeaksFilter/vtkPeaksFilter.h b/qt/paraview_ext/PVPlugins/Filters/PeaksFilter/vtkPeaksFilter.h index aa0dae5256e035e9797faaddb2626d26269fb796..1c46b2da243dd85ff8a9bf6b7caf922b4526750f 100644 --- a/qt/paraview_ext/PVPlugins/Filters/PeaksFilter/vtkPeaksFilter.h +++ b/qt/paraview_ext/PVPlugins/Filters/PeaksFilter/vtkPeaksFilter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidAPI/IPeaksWorkspace_fwd.h" diff --git a/qt/paraview_ext/PVPlugins/Filters/ScaleWorkspace/vtkScaleWorkspace.h b/qt/paraview_ext/PVPlugins/Filters/ScaleWorkspace/vtkScaleWorkspace.h index 0e64692de36aae44e76fbb36f01311d2b5a6d132..5a093a9a96e346b914e54364a6697886da4ee264 100644 --- a/qt/paraview_ext/PVPlugins/Filters/ScaleWorkspace/vtkScaleWorkspace.h +++ b/qt/paraview_ext/PVPlugins/Filters/ScaleWorkspace/vtkScaleWorkspace.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidVatesAPI/MetadataJsonManager.h" diff --git a/qt/paraview_ext/PVPlugins/Filters/SplatterPlot/vtkSplatterPlot.h b/qt/paraview_ext/PVPlugins/Filters/SplatterPlot/vtkSplatterPlot.h index 44bc59abb582f9559b7b74fd390dd53c63daa00d..c106d08c8073863eda914a40b8db3e6414f95472 100644 --- a/qt/paraview_ext/PVPlugins/Filters/SplatterPlot/vtkSplatterPlot.h +++ b/qt/paraview_ext/PVPlugins/Filters/SplatterPlot/vtkSplatterPlot.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/PVPlugins/Macros/RefreshTime.py b/qt/paraview_ext/PVPlugins/Macros/RefreshTime.py index c3e9bb1032987d14be56e695999eb9e8f5e7ecf4..72c25efd5db38dc3ac4ae049ded21c268fa63061 100644 --- a/qt/paraview_ext/PVPlugins/Macros/RefreshTime.py +++ b/qt/paraview_ext/PVPlugins/Macros/RefreshTime.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + ##------------------------------------------------------------------------- ## Author: Owen Arnold @ ISIS/Tessella diff --git a/qt/paraview_ext/PVPlugins/Macros/ShowSignal.py b/qt/paraview_ext/PVPlugins/Macros/ShowSignal.py index 938e0acaf491b1abb705d3a5d1f6bf213a2ef976..7c2f7541f652e59aea561c19a08550f3dd227aaa 100644 --- a/qt/paraview_ext/PVPlugins/Macros/ShowSignal.py +++ b/qt/paraview_ext/PVPlugins/Macros/ShowSignal.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + ##------------------------------------------------------------------------- ## Author: Owen Arnold @ ISIS/Tessella diff --git a/qt/paraview_ext/PVPlugins/Macros/ThreeSliceView.py b/qt/paraview_ext/PVPlugins/Macros/ThreeSliceView.py index e4f620e93b2d6c12f957c2d433d5f9c9a1d4bda6..f4ffa9ead6813a3e89d9204dcd7d6526448ab39d 100644 --- a/qt/paraview_ext/PVPlugins/Macros/ThreeSliceView.py +++ b/qt/paraview_ext/PVPlugins/Macros/ThreeSliceView.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + try: paraview.simple except: from paraview.simple import * diff --git a/qt/paraview_ext/PVPlugins/Readers/MDEWNexusReader/vtkMDEWNexusReader.h b/qt/paraview_ext/PVPlugins/Readers/MDEWNexusReader/vtkMDEWNexusReader.h index 27e25b0106320e7e5f0f3c5899de79b8f4acf584..58245d431d8753576d6ff9eb54d15cea05f826a9 100644 --- a/qt/paraview_ext/PVPlugins/Readers/MDEWNexusReader/vtkMDEWNexusReader.h +++ b/qt/paraview_ext/PVPlugins/Readers/MDEWNexusReader/vtkMDEWNexusReader.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/PVPlugins/Readers/MDEWNexusReader/vtkMDEWReader.h b/qt/paraview_ext/PVPlugins/Readers/MDEWNexusReader/vtkMDEWReader.h index 3a7db4370cca14453faae0b9fa8fbc69dbd46286..5876fcdc242b641b9975135c15f643fc48192029 100644 --- a/qt/paraview_ext/PVPlugins/Readers/MDEWNexusReader/vtkMDEWReader.h +++ b/qt/paraview_ext/PVPlugins/Readers/MDEWNexusReader/vtkMDEWReader.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidGeometry/MDGeometry/IMDDimension.h" diff --git a/qt/paraview_ext/PVPlugins/Readers/MDHWNexusReader/vtkMDHWNexusReader.h b/qt/paraview_ext/PVPlugins/Readers/MDHWNexusReader/vtkMDHWNexusReader.h index 3a8b9c5c5fe33ae39550a7876bd4aca6e0dc2525..57e6b5ab00b899ec58a30f7f02e09c1ba75f8201 100644 --- a/qt/paraview_ext/PVPlugins/Readers/MDHWNexusReader/vtkMDHWNexusReader.h +++ b/qt/paraview_ext/PVPlugins/Readers/MDHWNexusReader/vtkMDHWNexusReader.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/PVPlugins/Readers/NexusPeaksReader/vtkNexusPeaksReader.h b/qt/paraview_ext/PVPlugins/Readers/NexusPeaksReader/vtkNexusPeaksReader.h index 17776d1dfd4ccbf61e100d931715439d9d8c448e..0ff5c0b3f26e5ed370f113e05677d8c5885ca42c 100644 --- a/qt/paraview_ext/PVPlugins/Readers/NexusPeaksReader/vtkNexusPeaksReader.h +++ b/qt/paraview_ext/PVPlugins/Readers/NexusPeaksReader/vtkNexusPeaksReader.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidAPI/IPeaksWorkspace_fwd.h" diff --git a/qt/paraview_ext/PVPlugins/Readers/PeaksReader/vtkPeaksReader.h b/qt/paraview_ext/PVPlugins/Readers/PeaksReader/vtkPeaksReader.h index c9c3899bad85be4170a0dcdaa34365c7407508b9..b6e5af868b102f8f7aeb547f8bdf85ac284a4635 100644 --- a/qt/paraview_ext/PVPlugins/Readers/PeaksReader/vtkPeaksReader.h +++ b/qt/paraview_ext/PVPlugins/Readers/PeaksReader/vtkPeaksReader.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidAPI/IPeaksWorkspace_fwd.h" diff --git a/qt/paraview_ext/PVPlugins/Representations/AlignedCutter.h b/qt/paraview_ext/PVPlugins/Representations/AlignedCutter.h index a62ab37aabe378e6dc53fd634eb4a60932571a47..3134f927fe90fff19dac783fc0cb28ebe0f9facd 100644 --- a/qt/paraview_ext/PVPlugins/Representations/AlignedCutter.h +++ b/qt/paraview_ext/PVPlugins/Representations/AlignedCutter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /*========================================================================= diff --git a/qt/paraview_ext/PVPlugins/Representations/AlignedThreeSliceFilter.h b/qt/paraview_ext/PVPlugins/Representations/AlignedThreeSliceFilter.h index 30b91b9d687455a9b6304109c42d3a8401fc1210..57c011b68358beb8bebd16ca3328764d6d65e591 100644 --- a/qt/paraview_ext/PVPlugins/Representations/AlignedThreeSliceFilter.h +++ b/qt/paraview_ext/PVPlugins/Representations/AlignedThreeSliceFilter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /*========================================================================= diff --git a/qt/paraview_ext/PVPlugins/Representations/vtkAlignedGeometrySliceRepresentation.h b/qt/paraview_ext/PVPlugins/Representations/vtkAlignedGeometrySliceRepresentation.h index 812d4646714fe2ad453626cc5ed0df2ef6165e30..42490225719c8c0e1a6d1987948a1e0f41e1ae60 100644 --- a/qt/paraview_ext/PVPlugins/Representations/vtkAlignedGeometrySliceRepresentation.h +++ b/qt/paraview_ext/PVPlugins/Representations/vtkAlignedGeometrySliceRepresentation.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /*========================================================================= diff --git a/qt/paraview_ext/PVPlugins/Sources/MDEWSource/vtkMDEWSource.h b/qt/paraview_ext/PVPlugins/Sources/MDEWSource/vtkMDEWSource.h index f344f5eb3b2dfdc634bd11c320dfb562ac5af269..a5181c3f5a16951c24db31744751b2d379f54b95 100644 --- a/qt/paraview_ext/PVPlugins/Sources/MDEWSource/vtkMDEWSource.h +++ b/qt/paraview_ext/PVPlugins/Sources/MDEWSource/vtkMDEWSource.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/PVPlugins/Sources/MDHWSource/vtkMDHWSource.h b/qt/paraview_ext/PVPlugins/Sources/MDHWSource/vtkMDHWSource.h index 6f62ca1869d163874eeee49eba89786df6ebad3f..7e846cfd8f232c9ee5d90bb133f20f2a37f630d1 100644 --- a/qt/paraview_ext/PVPlugins/Sources/MDHWSource/vtkMDHWSource.h +++ b/qt/paraview_ext/PVPlugins/Sources/MDHWSource/vtkMDHWSource.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/PVPlugins/Sources/PeaksSource/vtkPeaksSource.h b/qt/paraview_ext/PVPlugins/Sources/PeaksSource/vtkPeaksSource.h index 60e9f775fceb93a03d1509ec95b920a70406881b..44547b6322232c207ea2f5f562af20301e844890 100644 --- a/qt/paraview_ext/PVPlugins/Sources/PeaksSource/vtkPeaksSource.h +++ b/qt/paraview_ext/PVPlugins/Sources/PeaksSource/vtkPeaksSource.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/PVPlugins/Sources/SinglePeakMarkerSource/vtkSinglePeakMarkerSource.h b/qt/paraview_ext/PVPlugins/Sources/SinglePeakMarkerSource/vtkSinglePeakMarkerSource.h index 4c46f000110286545c55a119a9d826b1e48dbf23..a1d806be3c4842e7f1176d7fbf784c6d80c518b1 100644 --- a/qt/paraview_ext/PVPlugins/Sources/SinglePeakMarkerSource/vtkSinglePeakMarkerSource.h +++ b/qt/paraview_ext/PVPlugins/Sources/SinglePeakMarkerSource/vtkSinglePeakMarkerSource.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "vtkPolyDataAlgorithm.h" diff --git a/qt/paraview_ext/VatesAPI/CMakeLists.txt b/qt/paraview_ext/VatesAPI/CMakeLists.txt index d1422b220ecf7fd771f65c9350af1a2da6ac4216..e3e947f2a0737881d849462235f5ad2bb0c6b779 100644 --- a/qt/paraview_ext/VatesAPI/CMakeLists.txt +++ b/qt/paraview_ext/VatesAPI/CMakeLists.txt @@ -230,8 +230,7 @@ endif() # Create test file projects include_directories(SYSTEM ${CXXTEST_INCLUDE_DIR} - ${GMOCK_INCLUDE_DIR} - ${GTEST_INCLUDE_DIR}) +) include_directories(inc ../../../Framework/TestHelpers/inc @@ -263,8 +262,8 @@ target_link_libraries(VatesAPITest ${vtkjsoncpp_LIBRARIES} ${POCO_LIBRARIES} ${Boost_LIBRARIES} - ${GMOCK_LIBRARIES} - ${GTEST_LIBRARIES}) + gmock +) add_dependencies(AllTests VatesAPITest) # Add to the 'UnitTests' group in VS set_property(TARGET VatesAPITest PROPERTY FOLDER "UnitTests") diff --git a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/ADSWorkspaceProvider.h b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/ADSWorkspaceProvider.h index d1fc627fa66eedc909cfc2c2ca0e2901ff379727..6da3daa1d23ace5c3f64d086061a64d49d0e8871 100644 --- a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/ADSWorkspaceProvider.h +++ b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/ADSWorkspaceProvider.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/BoxInfo.h b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/BoxInfo.h index 17467440212e4c179cf548cdb1ab68a3efd97201..34f0159db03c9fe438c5733786d0de8d3f4cd51f 100644 --- a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/BoxInfo.h +++ b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/BoxInfo.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/ColorScaleGuard.h b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/ColorScaleGuard.h index 07bda7ee4ab03c1c5ae9b527aec6df0c2c083719..ddc0902df7e3f1b8750af7411b7d9861ad951b7a 100644 --- a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/ColorScaleGuard.h +++ b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/ColorScaleGuard.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidKernel/Logger.h" diff --git a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/Common.h b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/Common.h index 45ce561a87b1db3a145cfadc5c9cf379fda40773..49e723fe95e33b8e1fab76f4ce0eabeb30fcaaf4 100644 --- a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/Common.h +++ b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/Common.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include <boost/shared_ptr.hpp> diff --git a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/CompositePeaksPresenterVsi.h b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/CompositePeaksPresenterVsi.h index 992ab72be71f254535ca4a5999624f374cbba254..756c21f34fc2a3ff0a43d80abf1163702d9d2017 100644 --- a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/CompositePeaksPresenterVsi.h +++ b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/CompositePeaksPresenterVsi.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/ConcretePeaksPresenterVsi.h b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/ConcretePeaksPresenterVsi.h index a16bdf90b490227a1298944341ca46b27e7f7b62..cc8e13a0ba64a1b1c941d4e58259a57e4ce9d3c8 100644 --- a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/ConcretePeaksPresenterVsi.h +++ b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/ConcretePeaksPresenterVsi.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/DimensionViewFactory.h b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/DimensionViewFactory.h index 6e14dc6a29392991994e1a84a6ae8b959ee4de00..bbc15d98337f5729f9a62a3cbbae2e950a982ccc 100644 --- a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/DimensionViewFactory.h +++ b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/DimensionViewFactory.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/EventNexusLoadingPresenter.h b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/EventNexusLoadingPresenter.h index 66c0c50c7974a80fc0171008c481068eca747512..9108c04fd11ab5654fac8b1a4b8b10270a1b6f79 100644 --- a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/EventNexusLoadingPresenter.h +++ b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/EventNexusLoadingPresenter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/FactoryChains.h b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/FactoryChains.h index 506a15116ea66c2b45115061b41df446d6ad860f..c3affe398f2b9b42dd80694c01074a246a3e5946 100644 --- a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/FactoryChains.h +++ b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/FactoryChains.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/FieldDataToMetadata.h b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/FieldDataToMetadata.h index 0113945191c64f57f5d1013952a309ba4ab700de..1ff8437758e79b5082b3b4b779ae8cae630eae22 100644 --- a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/FieldDataToMetadata.h +++ b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/FieldDataToMetadata.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/FilteringUpdateProgressAction.h b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/FilteringUpdateProgressAction.h index 88288e4ef9925b334a76d12427f5f8659471c781..8ca91ff084b21b8865469731298978061ca2a95a 100644 --- a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/FilteringUpdateProgressAction.h +++ b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/FilteringUpdateProgressAction.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/GeometryView.h b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/GeometryView.h index 6645acc7eb72ba6bdb03ee88a308c53ea9915c52..a49d2f4cefd78eb3415de52b48312a17c653e5ba 100644 --- a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/GeometryView.h +++ b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/GeometryView.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidKernel/System.h" diff --git a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/IMDDimensionComparitor.h b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/IMDDimensionComparitor.h index 402cac7a112daa44ac63b96be43e754987fa4fcb..88b8c2c49d4e1e4921b81e6196751ff2f8656829 100644 --- a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/IMDDimensionComparitor.h +++ b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/IMDDimensionComparitor.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/MDEWEventNexusLoadingPresenter.h b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/MDEWEventNexusLoadingPresenter.h index 63a4f5c06ea9e21cdd72427e3c9433af3371737b..13409a878991fdcfa460055dd8f13fc1b38fceb6 100644 --- a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/MDEWEventNexusLoadingPresenter.h +++ b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/MDEWEventNexusLoadingPresenter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/MDEWInMemoryLoadingPresenter.h b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/MDEWInMemoryLoadingPresenter.h index 595d21df2868003d0beb87776e3a7da74921e978..31e990b80bcecd77eaf0371b312c767893cf01a4 100644 --- a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/MDEWInMemoryLoadingPresenter.h +++ b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/MDEWInMemoryLoadingPresenter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/MDEWLoadingPresenter.h b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/MDEWLoadingPresenter.h index 58470ac99e398a33263e87e50f50a7c2bfa1ea33..fd1aa51a62cf4ae8cdc2eb9be236be51f38351c8 100644 --- a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/MDEWLoadingPresenter.h +++ b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/MDEWLoadingPresenter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/MDHWInMemoryLoadingPresenter.h b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/MDHWInMemoryLoadingPresenter.h index 114d55d4971420da97c8b7aa23962905b96860a2..7e41d70a0b8cf2b87f0547ca7eeedf1311c9a2a1 100644 --- a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/MDHWInMemoryLoadingPresenter.h +++ b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/MDHWInMemoryLoadingPresenter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/MDHWLoadingPresenter.h b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/MDHWLoadingPresenter.h index 8fd5ecf851fc34353fb5ed238619817e15642e22..ca38101edc03fbe544ed2007066ee07a990f185a 100644 --- a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/MDHWLoadingPresenter.h +++ b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/MDHWLoadingPresenter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/MDHWNexusLoadingPresenter.h b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/MDHWNexusLoadingPresenter.h index edfc866abdd96e36bf24a600867fa1f9a91e3986..7d71c1809850409d68cf1ba5c83ed47f16fc53fd 100644 --- a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/MDHWNexusLoadingPresenter.h +++ b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/MDHWNexusLoadingPresenter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/MDLoadingPresenter.h b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/MDLoadingPresenter.h index eaee7352aa76eb2638f4b19330f3fa7e1eb7dc06..f5b9e27f2732cbc06fdd6481ff483ea7172f0679 100644 --- a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/MDLoadingPresenter.h +++ b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/MDLoadingPresenter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/MDLoadingView.h b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/MDLoadingView.h index 5323691e115b86e69d43af8ffe8cae0d86210173..ceef98859db75735a6fa2861d26c4e8202f88a53 100644 --- a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/MDLoadingView.h +++ b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/MDLoadingView.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/MDLoadingViewAdapter.h b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/MDLoadingViewAdapter.h index b7a70334037013cf11d2f047d6071a17a3c89f18..da96a4705de16a34712d64c9cee3e8753f70b008 100644 --- a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/MDLoadingViewAdapter.h +++ b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/MDLoadingViewAdapter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/MDLoadingViewSimple.h b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/MDLoadingViewSimple.h index 3266a5e3c03542d28546c25e00e41133a7426abc..67919e9f427bff7a1dac9deb805b9d2b5bc60f5b 100644 --- a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/MDLoadingViewSimple.h +++ b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/MDLoadingViewSimple.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/MetaDataExtractorUtils.h b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/MetaDataExtractorUtils.h index d4c543f16860f7cb296c6cc0935f12f7362e7a6f..ee784db84be757ea9ee624a5a9466bdca90f6f6b 100644 --- a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/MetaDataExtractorUtils.h +++ b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/MetaDataExtractorUtils.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/MetadataJsonManager.h b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/MetadataJsonManager.h index 7a8532467ed138177c09a4e2fd72dd5cd0b6c47b..6413def7db5cbeab41c5facc08bf9cce645ad210 100644 --- a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/MetadataJsonManager.h +++ b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/MetadataJsonManager.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/MetadataToFieldData.h b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/MetadataToFieldData.h index 56a44ad320c6ddb06c34f9809866d65f6edc75cf..56b4f9179ffb2803ca812308850d5079ff9c4211 100644 --- a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/MetadataToFieldData.h +++ b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/MetadataToFieldData.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/Normalization.h b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/Normalization.h index 99ea9e30497d420a16325e4a7db399b25041bb4e..cf8304687089eeeb43376648aa8eebfde20aa8c0 100644 --- a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/Normalization.h +++ b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/Normalization.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/NullPeaksPresenterVsi.h b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/NullPeaksPresenterVsi.h index 52825434e98bdc68f3e054413c68efbec8aba4be..15ba385ce9d5780eea4c708dffbf42e97c76d88f 100644 --- a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/NullPeaksPresenterVsi.h +++ b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/NullPeaksPresenterVsi.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/PeaksPresenterVsi.h b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/PeaksPresenterVsi.h index 64fa9bc3263f122398bbadb4d418a9deb6fb0dee..c7a6ed8b1ef11fc52d7e44dddcb85abc52e0e4ab 100644 --- a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/PeaksPresenterVsi.h +++ b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/PeaksPresenterVsi.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/PrecompiledHeader.h b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/PrecompiledHeader.h index 28e3fb17f0ae7bef9d98a273be111a71c04585dd..30861de0e9865138fbbdaa194bd88abfec603760 100644 --- a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/PrecompiledHeader.h +++ b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/PrecompiledHeader.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/PresenterFactories.h b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/PresenterFactories.h index dddb28b4d037df542077d4903ae67e85cfa5cce6..7853cd67f606b48570e0e66d4b9970e3098e489a 100644 --- a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/PresenterFactories.h +++ b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/PresenterFactories.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/ProgressAction.h b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/ProgressAction.h index 42f6736eabf5c37939942fc6a91609cffc999f94..9dc7eeab85cd315bbb6cc35c8e143328d02e6c64 100644 --- a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/ProgressAction.h +++ b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/ProgressAction.h @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #pragma once #include "MantidAPI/Algorithm.h" diff --git a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/SQWLoadingPresenter.h b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/SQWLoadingPresenter.h index 06df57b9b948081b0ed87dd67c20ffd27007240f..11d75289e6d02ff69ea83b99bb3bfa9313fd86f0 100644 --- a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/SQWLoadingPresenter.h +++ b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/SQWLoadingPresenter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/SingleWorkspaceProvider.h b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/SingleWorkspaceProvider.h index 57b02ab0fef1d5032af925bd7abc708340b30e94..03ed87f0dbb7a17a30eea6545f3caa07031cb01e 100644 --- a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/SingleWorkspaceProvider.h +++ b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/SingleWorkspaceProvider.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/TimeStepToTimeStep.h b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/TimeStepToTimeStep.h index 953bb90feb6277df959e7b5392d9cadb4cce2be7..e3d99b5f881f2d1d8d274f4e0427d3523439a989 100644 --- a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/TimeStepToTimeStep.h +++ b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/TimeStepToTimeStep.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/TimeToTimeStep.h b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/TimeToTimeStep.h index 8afb60db352f2948e3f204fa1ab3b15fa7b5fd8e..449b84ea1ee233677d08eaaa828f6bd5b0398d69 100644 --- a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/TimeToTimeStep.h +++ b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/TimeToTimeStep.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/VatesConfigurations.h b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/VatesConfigurations.h index de1e4e4fad1cde47c90a65c68c868993978c8617..a6a6019d4e15e8f2b79ffa34fab284204057849a 100644 --- a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/VatesConfigurations.h +++ b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/VatesConfigurations.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/VatesKnowledgeSerializer.h b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/VatesKnowledgeSerializer.h index ca1e3a034b2cb6340582a3686f0382b8ef68de99..c93feb9d92f064945dd14f8cd1b42e4fe3562051 100644 --- a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/VatesKnowledgeSerializer.h +++ b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/VatesKnowledgeSerializer.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/VatesXMLDefinitions.h b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/VatesXMLDefinitions.h index d82f59078a109c9dae3dec81eea31d88f3a97904..45ea1ce86c91b38f1db5c95191bb7e5418545fa9 100644 --- a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/VatesXMLDefinitions.h +++ b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/VatesXMLDefinitions.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/ViewFrustum.h b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/ViewFrustum.h index 7823261ef21dd3adcb917c7dd49baee08d19b0fc..ec3648d79898b42778cefd87e320243c62ae1a74 100644 --- a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/ViewFrustum.h +++ b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/ViewFrustum.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/WorkspaceProvider.h b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/WorkspaceProvider.h index fdf1cad884ed13ae1470c5878ac0edd7430c4826..3e7e891f2f253f42cf20a75310489d8c83c74e6b 100644 --- a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/WorkspaceProvider.h +++ b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/WorkspaceProvider.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkDataSetFactory.h b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkDataSetFactory.h index d25e4412baff9c5d07330255a16592832aa5d05a..7121c23c42a9443b35d74174830e6f8f594f9eb5 100644 --- a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkDataSetFactory.h +++ b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkDataSetFactory.h @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #pragma once #include "MantidAPI/IMDWorkspace.h" diff --git a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkDataSetToGeometry.h b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkDataSetToGeometry.h index ced5e4f6cc00f1dfd24e7d945599b0f3c9220526..9efc7bdbb28a9063a0227d44d16516bfe69f13d7 100644 --- a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkDataSetToGeometry.h +++ b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkDataSetToGeometry.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkDataSetToImplicitFunction.h b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkDataSetToImplicitFunction.h index a885523d6b87d941fe00f2e9119519f85e6f968a..71a442189f67b88eb7bb5799c5b4958d70f5b64b 100644 --- a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkDataSetToImplicitFunction.h +++ b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkDataSetToImplicitFunction.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkDataSetToNonOrthogonalDataSet.h b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkDataSetToNonOrthogonalDataSet.h index e01eb633a964d84073f295f6265cffc17a54f0c1..284dde8e1031905d0a517f612258ee3a828433ca 100644 --- a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkDataSetToNonOrthogonalDataSet.h +++ b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkDataSetToNonOrthogonalDataSet.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkDataSetToPeaksFilteredDataSet.h b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkDataSetToPeaksFilteredDataSet.h index 767b7e38dfa34265f62521cf050e19ccc7e5e79a..f46c268a6e7ffadc6238dafbf3c8f0cc16c470f2 100644 --- a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkDataSetToPeaksFilteredDataSet.h +++ b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkDataSetToPeaksFilteredDataSet.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkDataSetToScaledDataSet.h b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkDataSetToScaledDataSet.h index 5549db91be8989f10a71ba4c59bb1bcf39c14303..cf705dd145fc76fbca488957b172ecf385c3d820 100644 --- a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkDataSetToScaledDataSet.h +++ b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkDataSetToScaledDataSet.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkDataSetToWsLocation.h b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkDataSetToWsLocation.h index e77ef83d869dcff40819f9b613c0d7611ee9dccc..cce81bf2c8a4f7bb0b044aaf0fffed4605ee6146 100644 --- a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkDataSetToWsLocation.h +++ b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkDataSetToWsLocation.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkDataSetToWsName.h b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkDataSetToWsName.h index a8045e7eea394fba5882fe5341d5aea8660a1ad9..28a4f3a8b83c163c705f6cdc0d760a3915ad7e37 100644 --- a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkDataSetToWsName.h +++ b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkDataSetToWsName.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkGlyph3D_Silent.h b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkGlyph3D_Silent.h index 6c7ebce614b160dbd494a5acf55b90c762bf780b..e29e34be87864f97b4709190d5d11ed6550671af 100644 --- a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkGlyph3D_Silent.h +++ b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkGlyph3D_Silent.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkImageData_Silent.h b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkImageData_Silent.h index 59884d69078df98f4192ca6092015ddf0418ef45..1ca499831160ba1caa0119a1019f45aab1147193 100644 --- a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkImageData_Silent.h +++ b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkImageData_Silent.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkMD0DFactory.h b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkMD0DFactory.h index 3cf888aafdfde6390a1fd9f78e2c092560da3efe..8a1b4c41e525dfa33d2d2cb98bd515a4c2e3e5d1 100644 --- a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkMD0DFactory.h +++ b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkMD0DFactory.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkMDHexFactory.h b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkMDHexFactory.h index ba80525e39565c0efb732392b54c866e3ef095ae..32b83abd70f44921b87ada70dfafd4a8ea0cd56f 100644 --- a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkMDHexFactory.h +++ b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkMDHexFactory.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkMDHistoHex4DFactory.h b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkMDHistoHex4DFactory.h index 90453070527affdab105661059a7dd2e70471de7..b9f700730cd80044aa14c28b78f5a2bd08dbf7d4 100644 --- a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkMDHistoHex4DFactory.h +++ b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkMDHistoHex4DFactory.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkMDHistoHexFactory.h b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkMDHistoHexFactory.h index 5e22ad522cf8aba60fa473a2e19619f13c72fd41..118021d96f3789362b6302af7616428a3517ff7a 100644 --- a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkMDHistoHexFactory.h +++ b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkMDHistoHexFactory.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkMDHistoLineFactory.h b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkMDHistoLineFactory.h index 0385a492cc77a3456b0275cb9473ff24cd850cc9..3c83963df071ab59577cf612f7523f46dd586ec8 100644 --- a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkMDHistoLineFactory.h +++ b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkMDHistoLineFactory.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkMDHistoQuadFactory.h b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkMDHistoQuadFactory.h index b4dd31c1526e7843b9fd4685943dd9a7e9425f51..353229c02a1f67c3aa22a28c06fc82d84737e795 100644 --- a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkMDHistoQuadFactory.h +++ b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkMDHistoQuadFactory.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkMDLineFactory.h b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkMDLineFactory.h index aaf51a95e438d09c6146b944aa829da1c77b11d0..87b811c421053721636d00b269c745f3261b68cf 100644 --- a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkMDLineFactory.h +++ b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkMDLineFactory.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkMDQuadFactory.h b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkMDQuadFactory.h index 50feb3f440575fce70edfa190fdd590f787886e0..5af4caa48231abc99bc4b319e43e9ecf9dbe16d1 100644 --- a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkMDQuadFactory.h +++ b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkMDQuadFactory.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkNullStructuredGrid.h b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkNullStructuredGrid.h index d79c2e6a46c513050bf471281e545fa5148c01a8..daac950bc720fa8571540e3842c62090762e8f87 100644 --- a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkNullStructuredGrid.h +++ b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkNullStructuredGrid.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkNullUnstructuredGrid.h b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkNullUnstructuredGrid.h index 1e35070492efb3c2147517330c08ddd42f1e7e80..fad34437ce9b3922b72b10651f452d56ff8629dd 100644 --- a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkNullUnstructuredGrid.h +++ b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkNullUnstructuredGrid.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkPeakMarkerFactory.h b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkPeakMarkerFactory.h index 20925e84582692417628364e0db3507424598c8c..9213409802b00d20c8b8f629aca92cb0dd0a5bea 100644 --- a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkPeakMarkerFactory.h +++ b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkPeakMarkerFactory.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkPolyDataAlgorithm_Silent.h b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkPolyDataAlgorithm_Silent.h index b38ba37421ed4fd393240ed9facc63715deb58d1..48f13cf200af113ce2a8ba76ad8169b73bd3f115 100644 --- a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkPolyDataAlgorithm_Silent.h +++ b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkPolyDataAlgorithm_Silent.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkRectilinearGrid_Silent.h b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkRectilinearGrid_Silent.h index d7dcc2d08cce86f696363c8c8ca4b76a452f47eb..abb47a5b2ad082ebf5837e0455618376188c1178 100644 --- a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkRectilinearGrid_Silent.h +++ b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkRectilinearGrid_Silent.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkSinglePeakMarker.h b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkSinglePeakMarker.h index f2d7c5313789c8c80f756ab747ade5565e3dcd7a..93c47d47a30da3006ff6bd742d44ea345b2c1ba0 100644 --- a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkSinglePeakMarker.h +++ b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkSinglePeakMarker.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkSplatterPlotFactory.h b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkSplatterPlotFactory.h index 67577419cbf7636e8a969b566e8012a3ca46f9a5..78896f59d33ceb2341256e99051a527c1f8c3c0e 100644 --- a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkSplatterPlotFactory.h +++ b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkSplatterPlotFactory.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkStructuredGrid_Silent.h b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkStructuredGrid_Silent.h index 07cc1c6ea582ebaf71ffa2305d09db0a4898bcf6..3265943095ce1057baa88ca303a0f16fb60cc0f8 100644 --- a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkStructuredGrid_Silent.h +++ b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkStructuredGrid_Silent.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkStructuredPoints_Silent.h b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkStructuredPoints_Silent.h index 07fe99684d34dae8d43a3c377e3b690820fd14e5..f2779db907222a1517ba727c5e179d12b177e035 100644 --- a/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkStructuredPoints_Silent.h +++ b/qt/paraview_ext/VatesAPI/inc/MantidVatesAPI/vtkStructuredPoints_Silent.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/src/ADSWorkspaceProvider.cpp b/qt/paraview_ext/VatesAPI/src/ADSWorkspaceProvider.cpp index 1745cf5c447dca02753c92a56d83ac63460752cc..c60e8e40e20d25a269e2f4b6e5c9b276627d29fa 100644 --- a/qt/paraview_ext/VatesAPI/src/ADSWorkspaceProvider.cpp +++ b/qt/paraview_ext/VatesAPI/src/ADSWorkspaceProvider.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidVatesAPI/ADSWorkspaceProvider.h" #include "MantidAPI/AnalysisDataService.h" diff --git a/qt/paraview_ext/VatesAPI/src/BoxInfo.cpp b/qt/paraview_ext/VatesAPI/src/BoxInfo.cpp index 5e01c0ca4a1609f49a007b4980aa85de1270a788..fc5914d52e96ee35761f1314b672599defe9f07b 100644 --- a/qt/paraview_ext/VatesAPI/src/BoxInfo.cpp +++ b/qt/paraview_ext/VatesAPI/src/BoxInfo.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidVatesAPI/BoxInfo.h" #include "MantidAPI/IMDEventWorkspace.h" diff --git a/qt/paraview_ext/VatesAPI/src/Common.cpp b/qt/paraview_ext/VatesAPI/src/Common.cpp index 49ae511273339a6fbd50c850995186911c9344d0..3ed502e8df2d7b4feae6411e67c6b9d8b8b140bf 100644 --- a/qt/paraview_ext/VatesAPI/src/Common.cpp +++ b/qt/paraview_ext/VatesAPI/src/Common.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidVatesAPI/Common.h" #include "MantidGeometry/MDGeometry/IMDDimension.h" diff --git a/qt/paraview_ext/VatesAPI/src/CompositePeaksPresenterVsi.cpp b/qt/paraview_ext/VatesAPI/src/CompositePeaksPresenterVsi.cpp index 68a700d8efc677b5ca30eb7784b5535284698d57..388796795cbe7175decb751573ceacbf7e4898e8 100644 --- a/qt/paraview_ext/VatesAPI/src/CompositePeaksPresenterVsi.cpp +++ b/qt/paraview_ext/VatesAPI/src/CompositePeaksPresenterVsi.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidVatesAPI/CompositePeaksPresenterVsi.h" #include "MantidAPI/IPeaksWorkspace.h" diff --git a/qt/paraview_ext/VatesAPI/src/ConcretePeaksPresenterVsi.cpp b/qt/paraview_ext/VatesAPI/src/ConcretePeaksPresenterVsi.cpp index d865a31f87bd652abd8658431d27299082eced7e..461914cdfa6944cdd3290d32e3e5fa9dc0f88f86 100644 --- a/qt/paraview_ext/VatesAPI/src/ConcretePeaksPresenterVsi.cpp +++ b/qt/paraview_ext/VatesAPI/src/ConcretePeaksPresenterVsi.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidVatesAPI/ConcretePeaksPresenterVsi.h" #include "MantidAPI/AlgorithmManager.h" diff --git a/qt/paraview_ext/VatesAPI/src/EventNexusLoadingPresenter.cpp b/qt/paraview_ext/VatesAPI/src/EventNexusLoadingPresenter.cpp index 9427fd84f2120c7084ee1ff1ca963c0c8c01fb19..7ec278da0907fd5d502bf26a466664ba6874a0d8 100644 --- a/qt/paraview_ext/VatesAPI/src/EventNexusLoadingPresenter.cpp +++ b/qt/paraview_ext/VatesAPI/src/EventNexusLoadingPresenter.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidVatesAPI/EventNexusLoadingPresenter.h" #include "MantidAPI/AnalysisDataService.h" diff --git a/qt/paraview_ext/VatesAPI/src/FieldDataToMetadata.cpp b/qt/paraview_ext/VatesAPI/src/FieldDataToMetadata.cpp index 403ff19bc7e15d01eb75d54b645e7ff0d6ef427b..dbefa0143db3cae83944bd1de4b17440223dbe26 100644 --- a/qt/paraview_ext/VatesAPI/src/FieldDataToMetadata.cpp +++ b/qt/paraview_ext/VatesAPI/src/FieldDataToMetadata.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidVatesAPI/FieldDataToMetadata.h" #include "vtkCharArray.h" diff --git a/qt/paraview_ext/VatesAPI/src/IMDDimensionComparitor.cpp b/qt/paraview_ext/VatesAPI/src/IMDDimensionComparitor.cpp index 23982eb0ac46785bc5502f1d7a87e404be6e5850..d6f55996e696edb39ae352f1073e3941eeef6cd6 100644 --- a/qt/paraview_ext/VatesAPI/src/IMDDimensionComparitor.cpp +++ b/qt/paraview_ext/VatesAPI/src/IMDDimensionComparitor.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidVatesAPI/IMDDimensionComparitor.h" diff --git a/qt/paraview_ext/VatesAPI/src/MDEWEventNexusLoadingPresenter.cpp b/qt/paraview_ext/VatesAPI/src/MDEWEventNexusLoadingPresenter.cpp index 7915359238ed834702a2165da863619e8edea250..dd32779338ec41f4ef72528930c27444f472d2b3 100644 --- a/qt/paraview_ext/VatesAPI/src/MDEWEventNexusLoadingPresenter.cpp +++ b/qt/paraview_ext/VatesAPI/src/MDEWEventNexusLoadingPresenter.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidVatesAPI/MDEWEventNexusLoadingPresenter.h" #include "MantidAPI/AnalysisDataService.h" diff --git a/qt/paraview_ext/VatesAPI/src/MDEWInMemoryLoadingPresenter.cpp b/qt/paraview_ext/VatesAPI/src/MDEWInMemoryLoadingPresenter.cpp index a87671106acdb42297785b2fec6393e1f6c57ae0..66487f9b341738407bc41c52ed7e23cdb4e0d6f7 100644 --- a/qt/paraview_ext/VatesAPI/src/MDEWInMemoryLoadingPresenter.cpp +++ b/qt/paraview_ext/VatesAPI/src/MDEWInMemoryLoadingPresenter.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidVatesAPI/MDEWInMemoryLoadingPresenter.h" #include "MantidAPI/IMDEventWorkspace.h" diff --git a/qt/paraview_ext/VatesAPI/src/MDEWLoadingPresenter.cpp b/qt/paraview_ext/VatesAPI/src/MDEWLoadingPresenter.cpp index 12ad6d8ac7dc0ed99d9795e27f1a191a1b66a8c0..f12f9ca2bbfe6d0b347f6a82565137a1155a9020 100644 --- a/qt/paraview_ext/VatesAPI/src/MDEWLoadingPresenter.cpp +++ b/qt/paraview_ext/VatesAPI/src/MDEWLoadingPresenter.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidVatesAPI/MDEWLoadingPresenter.h" #include "MantidAPI/FrameworkManager.h" diff --git a/qt/paraview_ext/VatesAPI/src/MDHWInMemoryLoadingPresenter.cpp b/qt/paraview_ext/VatesAPI/src/MDHWInMemoryLoadingPresenter.cpp index eb53b3a8cb87038a604f4979d4ba62f9641cba3f..d0601fbfaa3a901623aaa9e6241ea1858ba66c31 100644 --- a/qt/paraview_ext/VatesAPI/src/MDHWInMemoryLoadingPresenter.cpp +++ b/qt/paraview_ext/VatesAPI/src/MDHWInMemoryLoadingPresenter.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidVatesAPI/MDHWInMemoryLoadingPresenter.h" #include "MantidAPI/AlgorithmManager.h" diff --git a/qt/paraview_ext/VatesAPI/src/MDHWLoadingPresenter.cpp b/qt/paraview_ext/VatesAPI/src/MDHWLoadingPresenter.cpp index 0ed5371535f330b68e2812738689137e6d429819..a6ecf7d4b8b823416f0f3afd9972897f1fc1a64a 100644 --- a/qt/paraview_ext/VatesAPI/src/MDHWLoadingPresenter.cpp +++ b/qt/paraview_ext/VatesAPI/src/MDHWLoadingPresenter.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidVatesAPI/MDHWLoadingPresenter.h" #include "MantidAPI/AlgorithmManager.h" diff --git a/qt/paraview_ext/VatesAPI/src/MDHWNexusLoadingPresenter.cpp b/qt/paraview_ext/VatesAPI/src/MDHWNexusLoadingPresenter.cpp index ca9d699067a8e45fc31079ecb03e04977f8d9c79..93f47fc939872472e841242a231f772ce06eef5a 100644 --- a/qt/paraview_ext/VatesAPI/src/MDHWNexusLoadingPresenter.cpp +++ b/qt/paraview_ext/VatesAPI/src/MDHWNexusLoadingPresenter.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidVatesAPI/MDHWNexusLoadingPresenter.h" #include "MantidAPI/AnalysisDataService.h" diff --git a/qt/paraview_ext/VatesAPI/src/MDLoadingPresenter.cpp b/qt/paraview_ext/VatesAPI/src/MDLoadingPresenter.cpp index 1e102d7b09ca86c00a33af48ebce50c6f86663a6..2f4f9029bc6abf63ab1f2ad9c824496744c6b172 100644 --- a/qt/paraview_ext/VatesAPI/src/MDLoadingPresenter.cpp +++ b/qt/paraview_ext/VatesAPI/src/MDLoadingPresenter.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidVatesAPI/MDLoadingPresenter.h" diff --git a/qt/paraview_ext/VatesAPI/src/MDLoadingViewSimple.cpp b/qt/paraview_ext/VatesAPI/src/MDLoadingViewSimple.cpp index d3c6f1e1e89d84e353ddfb1ecc4b0115c303d2ab..cb447bb669900b8863db13cbb062fcd4d193bc78 100644 --- a/qt/paraview_ext/VatesAPI/src/MDLoadingViewSimple.cpp +++ b/qt/paraview_ext/VatesAPI/src/MDLoadingViewSimple.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidVatesAPI/MDLoadingViewSimple.h" diff --git a/qt/paraview_ext/VatesAPI/src/MetaDataExtractorUtils.cpp b/qt/paraview_ext/VatesAPI/src/MetaDataExtractorUtils.cpp index 8dc6192068f36c6b7641dbd7d26d533d94474661..d4f1a4f4d0209f4e3cc432009e648ae13bc8aaf6 100644 --- a/qt/paraview_ext/VatesAPI/src/MetaDataExtractorUtils.cpp +++ b/qt/paraview_ext/VatesAPI/src/MetaDataExtractorUtils.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidVatesAPI/MetaDataExtractorUtils.h" #include "MantidAPI/IMDEventWorkspace.h" diff --git a/qt/paraview_ext/VatesAPI/src/MetadataJsonManager.cpp b/qt/paraview_ext/VatesAPI/src/MetadataJsonManager.cpp index 7668d36149e6af4eac636e637a7edb28250fee21..419785074f8c258cfc8cb579e5368e4eb8cc6d34 100644 --- a/qt/paraview_ext/VatesAPI/src/MetadataJsonManager.cpp +++ b/qt/paraview_ext/VatesAPI/src/MetadataJsonManager.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidVatesAPI/MetadataJsonManager.h" #include <json/json.h> diff --git a/qt/paraview_ext/VatesAPI/src/MetadataToFieldData.cpp b/qt/paraview_ext/VatesAPI/src/MetadataToFieldData.cpp index e9bb17841046957997a04cbcd3aa9a8664c580ee..4432582f9464812dd387c9ffc02497391572133a 100644 --- a/qt/paraview_ext/VatesAPI/src/MetadataToFieldData.cpp +++ b/qt/paraview_ext/VatesAPI/src/MetadataToFieldData.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidVatesAPI/MetadataToFieldData.h" #include "vtkCharArray.h" diff --git a/qt/paraview_ext/VatesAPI/src/Normalization.cpp b/qt/paraview_ext/VatesAPI/src/Normalization.cpp index 9132482be84dbc4505ba170afce144ee5d211741..803dcd25384ae12a3154727e7743c8a51908e950 100644 --- a/qt/paraview_ext/VatesAPI/src/Normalization.cpp +++ b/qt/paraview_ext/VatesAPI/src/Normalization.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidVatesAPI/Normalization.h" #include "MantidAPI/IMDEventWorkspace.h" diff --git a/qt/paraview_ext/VatesAPI/src/PresenterFactories.cpp b/qt/paraview_ext/VatesAPI/src/PresenterFactories.cpp index 82adaa7f8f79e89a627cf411aa1d35a57686ccff..ae0d02ad21c089e361e5aa5e6be8f81115e60c73 100644 --- a/qt/paraview_ext/VatesAPI/src/PresenterFactories.cpp +++ b/qt/paraview_ext/VatesAPI/src/PresenterFactories.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidVatesAPI/PresenterFactories.h" diff --git a/qt/paraview_ext/VatesAPI/src/PresenterUtilities.cpp b/qt/paraview_ext/VatesAPI/src/PresenterUtilities.cpp index 7015873aa37e2314e1c8860370f2d9a4000e2c7b..a2ea6c467d193d9672b500d82cb06682c3f5ed62 100644 --- a/qt/paraview_ext/VatesAPI/src/PresenterUtilities.cpp +++ b/qt/paraview_ext/VatesAPI/src/PresenterUtilities.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidVatesAPI/FactoryChains.h" #include "MantidVatesAPI/PresenterFactories.h" diff --git a/qt/paraview_ext/VatesAPI/src/ProgressAction.cpp b/qt/paraview_ext/VatesAPI/src/ProgressAction.cpp index 349c226bd51e23f695af6ab646c6c5c5f4a0ecee..a63b37d5d58016f37561684a91549310becf53d0 100644 --- a/qt/paraview_ext/VatesAPI/src/ProgressAction.cpp +++ b/qt/paraview_ext/VatesAPI/src/ProgressAction.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidVatesAPI/ProgressAction.h" diff --git a/qt/paraview_ext/VatesAPI/src/SQWLoadingPresenter.cpp b/qt/paraview_ext/VatesAPI/src/SQWLoadingPresenter.cpp index e9fcf1f9b061222e698cf652b940a2d0573c60b5..956b1581f418059f96554770e149ced954362b70 100644 --- a/qt/paraview_ext/VatesAPI/src/SQWLoadingPresenter.cpp +++ b/qt/paraview_ext/VatesAPI/src/SQWLoadingPresenter.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidVatesAPI/SQWLoadingPresenter.h" #include "MantidAPI/AnalysisDataService.h" diff --git a/qt/paraview_ext/VatesAPI/src/SingleWorkspaceProvider.cpp b/qt/paraview_ext/VatesAPI/src/SingleWorkspaceProvider.cpp index bff27591eae403f5fc02336014863413c77514bf..3bc7b15df2410cc0bc57a8904526ee64da697cb5 100644 --- a/qt/paraview_ext/VatesAPI/src/SingleWorkspaceProvider.cpp +++ b/qt/paraview_ext/VatesAPI/src/SingleWorkspaceProvider.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidVatesAPI/SingleWorkspaceProvider.h" #include "MantidAPI/Workspace.h" diff --git a/qt/paraview_ext/VatesAPI/src/TimeStepToTimeStep.cpp b/qt/paraview_ext/VatesAPI/src/TimeStepToTimeStep.cpp index ac97aef9eda025dc6ab2f22aefc30f1cd1919913..feb5c020670a0832509454a9b2764377e752a4f0 100644 --- a/qt/paraview_ext/VatesAPI/src/TimeStepToTimeStep.cpp +++ b/qt/paraview_ext/VatesAPI/src/TimeStepToTimeStep.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidVatesAPI/TimeStepToTimeStep.h" diff --git a/qt/paraview_ext/VatesAPI/src/TimeToTimeStep.cpp b/qt/paraview_ext/VatesAPI/src/TimeToTimeStep.cpp index a4cb28b56442c14550562c58d89c614a74d40b36..478d23a2aa30035fab152f99b601be2f11125a35 100644 --- a/qt/paraview_ext/VatesAPI/src/TimeToTimeStep.cpp +++ b/qt/paraview_ext/VatesAPI/src/TimeToTimeStep.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidVatesAPI/TimeToTimeStep.h" #include <stdexcept> diff --git a/qt/paraview_ext/VatesAPI/src/VatesConfigurations.cpp b/qt/paraview_ext/VatesAPI/src/VatesConfigurations.cpp index 33dc9d353b9906993b26473aafa0c0672d0b4772..91b0efaf1dc64d748f7eecefb8b6d5b97bb3ca89 100644 --- a/qt/paraview_ext/VatesAPI/src/VatesConfigurations.cpp +++ b/qt/paraview_ext/VatesAPI/src/VatesConfigurations.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidVatesAPI/VatesConfigurations.h" diff --git a/qt/paraview_ext/VatesAPI/src/VatesKnowledgeSerializer.cpp b/qt/paraview_ext/VatesAPI/src/VatesKnowledgeSerializer.cpp index 9f43a04520c31997bf54f8da74062e3468a3a421..7cc4b1e5052d50b89be73a4568df1bedf057542e 100644 --- a/qt/paraview_ext/VatesAPI/src/VatesKnowledgeSerializer.cpp +++ b/qt/paraview_ext/VatesAPI/src/VatesKnowledgeSerializer.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidVatesAPI/VatesKnowledgeSerializer.h" #include "MantidAPI/IMDWorkspace.h" diff --git a/qt/paraview_ext/VatesAPI/src/VatesXMLDefinitions.cpp b/qt/paraview_ext/VatesAPI/src/VatesXMLDefinitions.cpp index 8345d0eb9967d05cc97c4ab8e021ecea5be03ff7..f6a5787c75046e53187008b3e827efd21f0bcc15 100644 --- a/qt/paraview_ext/VatesAPI/src/VatesXMLDefinitions.cpp +++ b/qt/paraview_ext/VatesAPI/src/VatesXMLDefinitions.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidVatesAPI/VatesXMLDefinitions.h" diff --git a/qt/paraview_ext/VatesAPI/src/ViewFrustum.cpp b/qt/paraview_ext/VatesAPI/src/ViewFrustum.cpp index b65ac975c2aa938b74e1e45d154ebc517e130838..528edd456a8809386b5f99536b09f2dda79e78fd 100644 --- a/qt/paraview_ext/VatesAPI/src/ViewFrustum.cpp +++ b/qt/paraview_ext/VatesAPI/src/ViewFrustum.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidVatesAPI/ViewFrustum.h" #include "MantidKernel/Matrix.h" diff --git a/qt/paraview_ext/VatesAPI/src/vtkDataSetFactory.cpp b/qt/paraview_ext/VatesAPI/src/vtkDataSetFactory.cpp index 93389207a798d06c27e8fdbd940b21df776067df..953cfc72292924dd98be865ef39dde2342833295 100644 --- a/qt/paraview_ext/VatesAPI/src/vtkDataSetFactory.cpp +++ b/qt/paraview_ext/VatesAPI/src/vtkDataSetFactory.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidVatesAPI/vtkDataSetFactory.h" #include "MantidVatesAPI/ProgressAction.h" diff --git a/qt/paraview_ext/VatesAPI/src/vtkDataSetToGeometry.cpp b/qt/paraview_ext/VatesAPI/src/vtkDataSetToGeometry.cpp index 1b57ee93b4179dbfd33ae21586240ecbebbf85a6..daadc9f9e675663183a8931c527bc87d009f1ddb 100644 --- a/qt/paraview_ext/VatesAPI/src/vtkDataSetToGeometry.cpp +++ b/qt/paraview_ext/VatesAPI/src/vtkDataSetToGeometry.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidVatesAPI/vtkDataSetToGeometry.h" #include "MantidGeometry/MDGeometry/MDGeometryXMLDefinitions.h" diff --git a/qt/paraview_ext/VatesAPI/src/vtkDataSetToImplicitFunction.cpp b/qt/paraview_ext/VatesAPI/src/vtkDataSetToImplicitFunction.cpp index fd1900941e51c631d0c2769548c8b476fc6e3733..e231a17e1e822b32263d1ef582ec1293939f7e0a 100644 --- a/qt/paraview_ext/VatesAPI/src/vtkDataSetToImplicitFunction.cpp +++ b/qt/paraview_ext/VatesAPI/src/vtkDataSetToImplicitFunction.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidVatesAPI/vtkDataSetToImplicitFunction.h" #include "MantidAPI/ImplicitFunctionFactory.h" diff --git a/qt/paraview_ext/VatesAPI/src/vtkDataSetToNonOrthogonalDataSet.cpp b/qt/paraview_ext/VatesAPI/src/vtkDataSetToNonOrthogonalDataSet.cpp index 5e8dac467a0627331159bb5c4e8f1fd76d625496..d5757c074cc3ac5c193f46a1dc1cc7db7fe61643 100644 --- a/qt/paraview_ext/VatesAPI/src/vtkDataSetToNonOrthogonalDataSet.cpp +++ b/qt/paraview_ext/VatesAPI/src/vtkDataSetToNonOrthogonalDataSet.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidVatesAPI/vtkDataSetToNonOrthogonalDataSet.h" #include "MantidAPI/CoordTransform.h" diff --git a/qt/paraview_ext/VatesAPI/src/vtkDataSetToPeaksFilteredDataSet.cpp b/qt/paraview_ext/VatesAPI/src/vtkDataSetToPeaksFilteredDataSet.cpp index 3930ada478a0c7d2ba003e779f0c5c87a660b2ae..9a6e017b1a06c64cc73fb82fd95cf1c01168a5cf 100644 --- a/qt/paraview_ext/VatesAPI/src/vtkDataSetToPeaksFilteredDataSet.cpp +++ b/qt/paraview_ext/VatesAPI/src/vtkDataSetToPeaksFilteredDataSet.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidVatesAPI/vtkDataSetToPeaksFilteredDataSet.h" #include "MantidAPI/IPeaksWorkspace.h" diff --git a/qt/paraview_ext/VatesAPI/src/vtkDataSetToScaledDataSet.cpp b/qt/paraview_ext/VatesAPI/src/vtkDataSetToScaledDataSet.cpp index cb8c4be4d56c9c0204ef8caca5b9a62127781e8b..4ae3c47e0e3f68f64054dfaa144273b8beb82a91 100644 --- a/qt/paraview_ext/VatesAPI/src/vtkDataSetToScaledDataSet.cpp +++ b/qt/paraview_ext/VatesAPI/src/vtkDataSetToScaledDataSet.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidVatesAPI/vtkDataSetToScaledDataSet.h" #include "MantidKernel/Logger.h" diff --git a/qt/paraview_ext/VatesAPI/src/vtkDataSetToWsLocation.cpp b/qt/paraview_ext/VatesAPI/src/vtkDataSetToWsLocation.cpp index d7347d6007c709a5b45e9a23a2ae142cdb293b5e..d1231c45473c453da782c9cadb69754e161a5e78 100644 --- a/qt/paraview_ext/VatesAPI/src/vtkDataSetToWsLocation.cpp +++ b/qt/paraview_ext/VatesAPI/src/vtkDataSetToWsLocation.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidVatesAPI/vtkDataSetToWsLocation.h" #include "MantidGeometry/MDGeometry/MDGeometryXMLDefinitions.h" diff --git a/qt/paraview_ext/VatesAPI/src/vtkDataSetToWsName.cpp b/qt/paraview_ext/VatesAPI/src/vtkDataSetToWsName.cpp index 26d9be6a41c555732437f76f585f94bc43f9607a..f47fcb75788758e8207a5943e8f271f1d21b394f 100644 --- a/qt/paraview_ext/VatesAPI/src/vtkDataSetToWsName.cpp +++ b/qt/paraview_ext/VatesAPI/src/vtkDataSetToWsName.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidVatesAPI/vtkDataSetToWsName.h" #include "MantidGeometry/MDGeometry/MDGeometryXMLDefinitions.h" diff --git a/qt/paraview_ext/VatesAPI/src/vtkMD0DFactory.cpp b/qt/paraview_ext/VatesAPI/src/vtkMD0DFactory.cpp index 5b056ae08786eddde59d713be08ee30f02782753..67f8dd6a7bedd09ed5a7889030e9d5f4dce1ca10 100644 --- a/qt/paraview_ext/VatesAPI/src/vtkMD0DFactory.cpp +++ b/qt/paraview_ext/VatesAPI/src/vtkMD0DFactory.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidVatesAPI/vtkMD0DFactory.h" #include "MantidAPI/IMDWorkspace.h" diff --git a/qt/paraview_ext/VatesAPI/src/vtkMDHexFactory.cpp b/qt/paraview_ext/VatesAPI/src/vtkMDHexFactory.cpp index 171124201509172b9b4785240b75fbb9ffd3710d..4039cb3c2320cbe9360f0ff17e2cb532481e38be 100644 --- a/qt/paraview_ext/VatesAPI/src/vtkMDHexFactory.cpp +++ b/qt/paraview_ext/VatesAPI/src/vtkMDHexFactory.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidVatesAPI/vtkMDHexFactory.h" diff --git a/qt/paraview_ext/VatesAPI/src/vtkMDHistoHex4DFactory.cpp b/qt/paraview_ext/VatesAPI/src/vtkMDHistoHex4DFactory.cpp index 10687fe9f2254fe88198602d5b2f729e13639b2b..8b40ee723fcbfc0b65344677a482f56d0d569026 100644 --- a/qt/paraview_ext/VatesAPI/src/vtkMDHistoHex4DFactory.cpp +++ b/qt/paraview_ext/VatesAPI/src/vtkMDHistoHex4DFactory.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidVatesAPI/vtkMDHistoHex4DFactory.h" #include "MantidAPI/IMDWorkspace.h" diff --git a/qt/paraview_ext/VatesAPI/src/vtkMDHistoHexFactory.cpp b/qt/paraview_ext/VatesAPI/src/vtkMDHistoHexFactory.cpp index 887e994bf342ab1c7bfdc2740b390036ad6272c3..97319d229b475c1d29df32c37ea53ee1e13583fe 100644 --- a/qt/paraview_ext/VatesAPI/src/vtkMDHistoHexFactory.cpp +++ b/qt/paraview_ext/VatesAPI/src/vtkMDHistoHexFactory.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidVatesAPI/vtkMDHistoHexFactory.h" #include "MantidAPI/IMDWorkspace.h" diff --git a/qt/paraview_ext/VatesAPI/src/vtkMDHistoLineFactory.cpp b/qt/paraview_ext/VatesAPI/src/vtkMDHistoLineFactory.cpp index 2f613b2d38ec1b91676f9c6874abd8d23bd67442..126704f4b07e8088499d91fe90eed195f8d891fd 100644 --- a/qt/paraview_ext/VatesAPI/src/vtkMDHistoLineFactory.cpp +++ b/qt/paraview_ext/VatesAPI/src/vtkMDHistoLineFactory.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidVatesAPI/vtkMDHistoLineFactory.h" #include "MantidAPI/IMDWorkspace.h" diff --git a/qt/paraview_ext/VatesAPI/src/vtkMDHistoQuadFactory.cpp b/qt/paraview_ext/VatesAPI/src/vtkMDHistoQuadFactory.cpp index 6ac5e6bdbbe70ff6ce372de3f31a412d49e3d724..6d326a1b8a89e8dbb653d673d69d4c71f334b69f 100644 --- a/qt/paraview_ext/VatesAPI/src/vtkMDHistoQuadFactory.cpp +++ b/qt/paraview_ext/VatesAPI/src/vtkMDHistoQuadFactory.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidVatesAPI/vtkMDHistoQuadFactory.h" #include "MantidAPI/IMDWorkspace.h" diff --git a/qt/paraview_ext/VatesAPI/src/vtkMDLineFactory.cpp b/qt/paraview_ext/VatesAPI/src/vtkMDLineFactory.cpp index 7a7b0bc7c910cfe5cb8da852c6453a9257f84a95..76514dabbea7339d8c5584a1c066b5187d06dc06 100644 --- a/qt/paraview_ext/VatesAPI/src/vtkMDLineFactory.cpp +++ b/qt/paraview_ext/VatesAPI/src/vtkMDLineFactory.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidVatesAPI/vtkMDLineFactory.h" #include "MantidAPI/CoordTransform.h" diff --git a/qt/paraview_ext/VatesAPI/src/vtkMDQuadFactory.cpp b/qt/paraview_ext/VatesAPI/src/vtkMDQuadFactory.cpp index 12caab8e6a0a1ffec5232264d384965ec7a2ce5e..a00424cc403895a2c1866bb02b39bca7c71e11fd 100644 --- a/qt/paraview_ext/VatesAPI/src/vtkMDQuadFactory.cpp +++ b/qt/paraview_ext/VatesAPI/src/vtkMDQuadFactory.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidVatesAPI/vtkMDQuadFactory.h" #include "MantidAPI/CoordTransform.h" diff --git a/qt/paraview_ext/VatesAPI/src/vtkNullStructuredGrid.cpp b/qt/paraview_ext/VatesAPI/src/vtkNullStructuredGrid.cpp index 1f15648ce4d45c4cb559e2f9bbe2682e299d0c53..4ee576e27594c404b962e499d37fa5b6295cf1e2 100644 --- a/qt/paraview_ext/VatesAPI/src/vtkNullStructuredGrid.cpp +++ b/qt/paraview_ext/VatesAPI/src/vtkNullStructuredGrid.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidVatesAPI/vtkNullStructuredGrid.h" diff --git a/qt/paraview_ext/VatesAPI/src/vtkNullUnstructuredGrid.cpp b/qt/paraview_ext/VatesAPI/src/vtkNullUnstructuredGrid.cpp index bb18da1327214bdb602af29c2b32acfb00d2d180..c4d73fee6d8e960bcaa701c4009ff14c2d830cf3 100644 --- a/qt/paraview_ext/VatesAPI/src/vtkNullUnstructuredGrid.cpp +++ b/qt/paraview_ext/VatesAPI/src/vtkNullUnstructuredGrid.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidVatesAPI/vtkNullUnstructuredGrid.h" diff --git a/qt/paraview_ext/VatesAPI/src/vtkPeakMarkerFactory.cpp b/qt/paraview_ext/VatesAPI/src/vtkPeakMarkerFactory.cpp index c4dc9f4f737f6c3d7e10b0d2ce8215234eecc421..9c3831f17b48688fba34e84aac32708f1b0409a8 100644 --- a/qt/paraview_ext/VatesAPI/src/vtkPeakMarkerFactory.cpp +++ b/qt/paraview_ext/VatesAPI/src/vtkPeakMarkerFactory.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidVatesAPI/vtkPeakMarkerFactory.h" #include "MantidAPI/IPeaksWorkspace.h" diff --git a/qt/paraview_ext/VatesAPI/src/vtkSinglePeakMarker.cpp b/qt/paraview_ext/VatesAPI/src/vtkSinglePeakMarker.cpp index d8f4b45c9d560e3beef71f538debf11f42d1847a..bc2b49db928cf55eb282a2d0c39f5f2dda921e05 100644 --- a/qt/paraview_ext/VatesAPI/src/vtkSinglePeakMarker.cpp +++ b/qt/paraview_ext/VatesAPI/src/vtkSinglePeakMarker.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidVatesAPI/vtkSinglePeakMarker.h" #include "vtkCellData.h" diff --git a/qt/paraview_ext/VatesAPI/src/vtkSplatterPlotFactory.cpp b/qt/paraview_ext/VatesAPI/src/vtkSplatterPlotFactory.cpp index 44f1e88e22c4b6b3b1ac4c2ef198e112d4b1b296..409e4450dfdd47f20c1278a8d0ccb482502fb774 100644 --- a/qt/paraview_ext/VatesAPI/src/vtkSplatterPlotFactory.cpp +++ b/qt/paraview_ext/VatesAPI/src/vtkSplatterPlotFactory.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidVatesAPI/vtkSplatterPlotFactory.h" #include "MantidVatesAPI/MetaDataExtractorUtils.h" diff --git a/qt/paraview_ext/VatesAPI/test/ADSWorkspaceProviderTest.h b/qt/paraview_ext/VatesAPI/test/ADSWorkspaceProviderTest.h index d10af14dcee8a6d2c1768000a62b9b13bf5a0b76..926d0d7ece0e0389ff54df9ab979fe01b907401f 100644 --- a/qt/paraview_ext/VatesAPI/test/ADSWorkspaceProviderTest.h +++ b/qt/paraview_ext/VatesAPI/test/ADSWorkspaceProviderTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/test/BoxInfoTest.h b/qt/paraview_ext/VatesAPI/test/BoxInfoTest.h index 5b404349bce961c56da553702f78e246d7b8f130..277a6309bd0dfaca09f135426dd12f8bc0d13190 100644 --- a/qt/paraview_ext/VatesAPI/test/BoxInfoTest.h +++ b/qt/paraview_ext/VatesAPI/test/BoxInfoTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/test/CompositePeaksPresenterVsiTest.h b/qt/paraview_ext/VatesAPI/test/CompositePeaksPresenterVsiTest.h index fd9a7325b1f84e7f1d23d35577b0d917bb99764f..fb509511bf76dc2de90b619cc055b25c093dbb75 100644 --- a/qt/paraview_ext/VatesAPI/test/CompositePeaksPresenterVsiTest.h +++ b/qt/paraview_ext/VatesAPI/test/CompositePeaksPresenterVsiTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/test/ConcretePeaksPresenterVsiTest.h b/qt/paraview_ext/VatesAPI/test/ConcretePeaksPresenterVsiTest.h index 7480f0a63f633d8213f6a6d42b6ebfb334a032e8..9a142b69ff7d67a051c9be2c6fd6f42575a59ca0 100644 --- a/qt/paraview_ext/VatesAPI/test/ConcretePeaksPresenterVsiTest.h +++ b/qt/paraview_ext/VatesAPI/test/ConcretePeaksPresenterVsiTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/test/EventNexusLoadingPresenterTest.h b/qt/paraview_ext/VatesAPI/test/EventNexusLoadingPresenterTest.h index 3e56dcca425f75593f8a0c96b906a8a0e662325c..825f187241701fe45d2272aa320d51e9c02e5392 100644 --- a/qt/paraview_ext/VatesAPI/test/EventNexusLoadingPresenterTest.h +++ b/qt/paraview_ext/VatesAPI/test/EventNexusLoadingPresenterTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/test/FieldDataToMetadataTest.h b/qt/paraview_ext/VatesAPI/test/FieldDataToMetadataTest.h index 5b13d9850b6816ef89415aa1ccdb913bc3d30a87..abd4bbc795efb1a95d6be8091bb5fac88eb259a6 100644 --- a/qt/paraview_ext/VatesAPI/test/FieldDataToMetadataTest.h +++ b/qt/paraview_ext/VatesAPI/test/FieldDataToMetadataTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/test/FilteringUpdateProgressActionTest.h b/qt/paraview_ext/VatesAPI/test/FilteringUpdateProgressActionTest.h index c9b8f898bc4a7a9124943e628449683e4d87e16f..e5b70a0ea5ef52f7fea3a3f688acf2d08a439cc9 100644 --- a/qt/paraview_ext/VatesAPI/test/FilteringUpdateProgressActionTest.h +++ b/qt/paraview_ext/VatesAPI/test/FilteringUpdateProgressActionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/test/MDEWEventNexusLoadingPresenterTest.h b/qt/paraview_ext/VatesAPI/test/MDEWEventNexusLoadingPresenterTest.h index c7bcbcceeae4cdf7dfb09816abb2cf687fa9c66b..2af12ab10c9862b1823d15754f3b9f9d467259ba 100644 --- a/qt/paraview_ext/VatesAPI/test/MDEWEventNexusLoadingPresenterTest.h +++ b/qt/paraview_ext/VatesAPI/test/MDEWEventNexusLoadingPresenterTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/test/MDEWInMemoryLoadingPresenterTest.h b/qt/paraview_ext/VatesAPI/test/MDEWInMemoryLoadingPresenterTest.h index 001f6724317503f00b66bc9de754fa6e8f760718..812622d7d0f850bb9ec8a960988c373b55350052 100644 --- a/qt/paraview_ext/VatesAPI/test/MDEWInMemoryLoadingPresenterTest.h +++ b/qt/paraview_ext/VatesAPI/test/MDEWInMemoryLoadingPresenterTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/test/MDEWLoadingPresenterTest.h b/qt/paraview_ext/VatesAPI/test/MDEWLoadingPresenterTest.h index ea9f4a6ef9bf36b4bcb086b0c73a1a2874cb37e3..309ee8726a14fe6903fa30309ef43101a64a3532 100644 --- a/qt/paraview_ext/VatesAPI/test/MDEWLoadingPresenterTest.h +++ b/qt/paraview_ext/VatesAPI/test/MDEWLoadingPresenterTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/test/MDHWInMemoryLoadingPresenterTest.h b/qt/paraview_ext/VatesAPI/test/MDHWInMemoryLoadingPresenterTest.h index 3fa5caf6bae6d0cf92e6e5cc7869a8f16a528c79..446d5aa65348bacfa63c637ac4b813b36decf6e3 100644 --- a/qt/paraview_ext/VatesAPI/test/MDHWInMemoryLoadingPresenterTest.h +++ b/qt/paraview_ext/VatesAPI/test/MDHWInMemoryLoadingPresenterTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/test/MDHWLoadingPresenterTest.h b/qt/paraview_ext/VatesAPI/test/MDHWLoadingPresenterTest.h index 65aaffdf66ed7c93d402e7cf20b5b21fa49b5a57..8ea0b36657c1c43430f883c1a834e451c835fd64 100644 --- a/qt/paraview_ext/VatesAPI/test/MDHWLoadingPresenterTest.h +++ b/qt/paraview_ext/VatesAPI/test/MDHWLoadingPresenterTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/test/MDHWNexusLoadingPresenterTest.h b/qt/paraview_ext/VatesAPI/test/MDHWNexusLoadingPresenterTest.h index 068fb038a06031ff2f0aabb5d5b2bcbfe561a7bd..b89c76fdb830ccb3b1ca2e3f95a684ab2a063501 100644 --- a/qt/paraview_ext/VatesAPI/test/MDHWNexusLoadingPresenterTest.h +++ b/qt/paraview_ext/VatesAPI/test/MDHWNexusLoadingPresenterTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/test/MDLoadingPresenterTest.h b/qt/paraview_ext/VatesAPI/test/MDLoadingPresenterTest.h index a30ab7180ce8c01f5f557d86a45230bad02b8acc..5f81cb8712e117e14081929d9ba58a768bca6f57 100644 --- a/qt/paraview_ext/VatesAPI/test/MDLoadingPresenterTest.h +++ b/qt/paraview_ext/VatesAPI/test/MDLoadingPresenterTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/test/MDLoadingViewAdapterTest.h b/qt/paraview_ext/VatesAPI/test/MDLoadingViewAdapterTest.h index 63649231d31fe5cb4db0e5152f966060483f386c..bf25004167b0ca3b49b8073ba66cbff956a5735c 100644 --- a/qt/paraview_ext/VatesAPI/test/MDLoadingViewAdapterTest.h +++ b/qt/paraview_ext/VatesAPI/test/MDLoadingViewAdapterTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/test/MDLoadingViewSimpleTest.h b/qt/paraview_ext/VatesAPI/test/MDLoadingViewSimpleTest.h index 55e46b45f26877e9f435a8f9ea5ec164f8d4e6dc..e03678b285b0439c39554447969d7d7512eb6ac6 100644 --- a/qt/paraview_ext/VatesAPI/test/MDLoadingViewSimpleTest.h +++ b/qt/paraview_ext/VatesAPI/test/MDLoadingViewSimpleTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/test/MetaDataExtractorUtilsTest.h b/qt/paraview_ext/VatesAPI/test/MetaDataExtractorUtilsTest.h index ff4d492ef8559436ce9533e3891797b72a440762..8969c58b2ad63cb9299a33333856e13afc2a3c78 100644 --- a/qt/paraview_ext/VatesAPI/test/MetaDataExtractorUtilsTest.h +++ b/qt/paraview_ext/VatesAPI/test/MetaDataExtractorUtilsTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/test/MetadataJsonManagerTest.h b/qt/paraview_ext/VatesAPI/test/MetadataJsonManagerTest.h index a22d14a2c2bcc4e4e6545c9a8ee403b9f1d3c6fd..68c97d14ed8ae91376a5235b5f3300c40ada846d 100644 --- a/qt/paraview_ext/VatesAPI/test/MetadataJsonManagerTest.h +++ b/qt/paraview_ext/VatesAPI/test/MetadataJsonManagerTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/test/MetadataToFieldDataTest.h b/qt/paraview_ext/VatesAPI/test/MetadataToFieldDataTest.h index c3278f1ec2524ced7ec8f0294cd5e5b82297db34..76673cb963177bba0b5e4b3f4ebbed06a90cdcf8 100644 --- a/qt/paraview_ext/VatesAPI/test/MetadataToFieldDataTest.h +++ b/qt/paraview_ext/VatesAPI/test/MetadataToFieldDataTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/test/MockObjects.h b/qt/paraview_ext/VatesAPI/test/MockObjects.h index 215b2f9459752d2731c6df1a255990a8f537bbd0..32637dcab1beb33a94d9a87625427a06384a5f25 100644 --- a/qt/paraview_ext/VatesAPI/test/MockObjects.h +++ b/qt/paraview_ext/VatesAPI/test/MockObjects.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/test/NormalizationTest.h b/qt/paraview_ext/VatesAPI/test/NormalizationTest.h index cbc68ef7d4a4305055cbebc29abd9c04c2257281..12eae8f80121f1de6f206c6ea616f1f8bae25432 100644 --- a/qt/paraview_ext/VatesAPI/test/NormalizationTest.h +++ b/qt/paraview_ext/VatesAPI/test/NormalizationTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/test/NullPeaksPresenterVsiTest.h b/qt/paraview_ext/VatesAPI/test/NullPeaksPresenterVsiTest.h index a247068a8d0e565e99cb7d23d7a366057356b151..82d4d47cc048d7700fe72606d034395933049759 100644 --- a/qt/paraview_ext/VatesAPI/test/NullPeaksPresenterVsiTest.h +++ b/qt/paraview_ext/VatesAPI/test/NullPeaksPresenterVsiTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/test/PrecompiledHeader.h b/qt/paraview_ext/VatesAPI/test/PrecompiledHeader.h index 2938ffd0a3e091e68eeb75289179e3af4211b5a3..e6fdf6551cbda585cc789772079a0760cddd669b 100644 --- a/qt/paraview_ext/VatesAPI/test/PrecompiledHeader.h +++ b/qt/paraview_ext/VatesAPI/test/PrecompiledHeader.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/test/PresenterUtilitiesTest.h b/qt/paraview_ext/VatesAPI/test/PresenterUtilitiesTest.h index 0542167cd2560101314408a49ad540b672396f28..7ff44fcab1bdf00baf2420be17cc28e05390dc39 100644 --- a/qt/paraview_ext/VatesAPI/test/PresenterUtilitiesTest.h +++ b/qt/paraview_ext/VatesAPI/test/PresenterUtilitiesTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/test/SQWLoadingPresenterTest.h b/qt/paraview_ext/VatesAPI/test/SQWLoadingPresenterTest.h index 9cc5415bfc5ec1a0453f50411c04bea17ff935a9..53e060e3f861bb2a3e1a18f0189fb5f598f3eb9d 100644 --- a/qt/paraview_ext/VatesAPI/test/SQWLoadingPresenterTest.h +++ b/qt/paraview_ext/VatesAPI/test/SQWLoadingPresenterTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/test/SingleWorkspaceProviderTest.h b/qt/paraview_ext/VatesAPI/test/SingleWorkspaceProviderTest.h index 2cc970dc3662081c83b65faa80dff0799b7cbe17..586ed73a81703a216c238a14bcb594537faa5cb1 100644 --- a/qt/paraview_ext/VatesAPI/test/SingleWorkspaceProviderTest.h +++ b/qt/paraview_ext/VatesAPI/test/SingleWorkspaceProviderTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/test/TimeStepToTimeStepTest.h b/qt/paraview_ext/VatesAPI/test/TimeStepToTimeStepTest.h index e7107b7a022c6e515a44d51647d9b0745d0492b2..c157e944f66f80294f2cd8c03ca2b394a2fe9705 100644 --- a/qt/paraview_ext/VatesAPI/test/TimeStepToTimeStepTest.h +++ b/qt/paraview_ext/VatesAPI/test/TimeStepToTimeStepTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/test/TimeToTimeStepTest.h b/qt/paraview_ext/VatesAPI/test/TimeToTimeStepTest.h index 14dc8b3c65dce254d106cf09c770d6d880332d83..45e8d4cc200e770d799f4ec95d82d561abb8cfd5 100644 --- a/qt/paraview_ext/VatesAPI/test/TimeToTimeStepTest.h +++ b/qt/paraview_ext/VatesAPI/test/TimeToTimeStepTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/test/VatesKnowledgeSerializerTest.h b/qt/paraview_ext/VatesAPI/test/VatesKnowledgeSerializerTest.h index d1fc628d3c31c16636d2c6ca3cdab683c1a952c9..d4586d670db3b0c141be8b7c1df8042909f5402d 100644 --- a/qt/paraview_ext/VatesAPI/test/VatesKnowledgeSerializerTest.h +++ b/qt/paraview_ext/VatesAPI/test/VatesKnowledgeSerializerTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/test/ViewFrustumTest.h b/qt/paraview_ext/VatesAPI/test/ViewFrustumTest.h index c5f0d04fd2d66d7cc120e5a26e493c49c88f9934..e504f1a414227cf95caf3eed3ec04c002c7c07cb 100644 --- a/qt/paraview_ext/VatesAPI/test/ViewFrustumTest.h +++ b/qt/paraview_ext/VatesAPI/test/ViewFrustumTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/test/vtkDataSetFactoryTest.h b/qt/paraview_ext/VatesAPI/test/vtkDataSetFactoryTest.h index 3a34ccdb12fa2bfbc7a6e49778c21b30eb98598a..353fb04606032cbb37d4553f6d27f0ee179e8ce4 100644 --- a/qt/paraview_ext/VatesAPI/test/vtkDataSetFactoryTest.h +++ b/qt/paraview_ext/VatesAPI/test/vtkDataSetFactoryTest.h @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #pragma once #include "MantidAPI/IMDHistoWorkspace.h" diff --git a/qt/paraview_ext/VatesAPI/test/vtkDataSetToGeometryTest.h b/qt/paraview_ext/VatesAPI/test/vtkDataSetToGeometryTest.h index 3ae107fd024161592cf3188e6f8dedd6eee03e81..a76eeaf8446e52e5a5318987c248024ccf8abb0f 100644 --- a/qt/paraview_ext/VatesAPI/test/vtkDataSetToGeometryTest.h +++ b/qt/paraview_ext/VatesAPI/test/vtkDataSetToGeometryTest.h @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #pragma once #include "MantidVatesAPI/vtkDataSetToGeometry.h" diff --git a/qt/paraview_ext/VatesAPI/test/vtkDataSetToImplicitFunctionTest.h b/qt/paraview_ext/VatesAPI/test/vtkDataSetToImplicitFunctionTest.h index a2f0cab68eca8b11a054c2c1c18abeb21f6e0489..f31f281563f5494312fd74dc818fcbe3ca8b8e9b 100644 --- a/qt/paraview_ext/VatesAPI/test/vtkDataSetToImplicitFunctionTest.h +++ b/qt/paraview_ext/VatesAPI/test/vtkDataSetToImplicitFunctionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/test/vtkDataSetToNonOrthogonalDataSetTest.h b/qt/paraview_ext/VatesAPI/test/vtkDataSetToNonOrthogonalDataSetTest.h index 159b2b77ea3927b451dc0c3f11f4700b978b4cdc..7f01a5a8d1651ef43d2bb2fe2874a55e5499b3e2 100644 --- a/qt/paraview_ext/VatesAPI/test/vtkDataSetToNonOrthogonalDataSetTest.h +++ b/qt/paraview_ext/VatesAPI/test/vtkDataSetToNonOrthogonalDataSetTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/test/vtkDataSetToPeaksFilteredDataSetTest.h b/qt/paraview_ext/VatesAPI/test/vtkDataSetToPeaksFilteredDataSetTest.h index 22977f8c61d100ebdc234349e4e13850fbe2fcd2..e8465a4685fc94c99987c217b4974ceccffa9e60 100644 --- a/qt/paraview_ext/VatesAPI/test/vtkDataSetToPeaksFilteredDataSetTest.h +++ b/qt/paraview_ext/VatesAPI/test/vtkDataSetToPeaksFilteredDataSetTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/test/vtkDataSetToScaledDataSetTest.h b/qt/paraview_ext/VatesAPI/test/vtkDataSetToScaledDataSetTest.h index 644943463ac8a85a43ad2fd8854c4a70fe8b1500..1fec67e45d2289eb0b2eb686cedfe03a0e892e42 100644 --- a/qt/paraview_ext/VatesAPI/test/vtkDataSetToScaledDataSetTest.h +++ b/qt/paraview_ext/VatesAPI/test/vtkDataSetToScaledDataSetTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/test/vtkDataSetToWsLocationTest.h b/qt/paraview_ext/VatesAPI/test/vtkDataSetToWsLocationTest.h index 85e9e852c3d03ab39dbb3b78cc7791c29da9757a..470ccce0c12ebc11997dc8782973faaf44ec86b7 100644 --- a/qt/paraview_ext/VatesAPI/test/vtkDataSetToWsLocationTest.h +++ b/qt/paraview_ext/VatesAPI/test/vtkDataSetToWsLocationTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/test/vtkDataSetToWsNameTest.h b/qt/paraview_ext/VatesAPI/test/vtkDataSetToWsNameTest.h index 42fa0866db36bb3548799b0ae77619808ea960b6..6a3d31c282ccd7a5044f9d19977800e5d1af8b9c 100644 --- a/qt/paraview_ext/VatesAPI/test/vtkDataSetToWsNameTest.h +++ b/qt/paraview_ext/VatesAPI/test/vtkDataSetToWsNameTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/test/vtkMD0DFactoryTest.h b/qt/paraview_ext/VatesAPI/test/vtkMD0DFactoryTest.h index ddaa38d001c3a110b026be3fe82d45265afa34b2..d3a0c7bc908f254de26b6af2e1a13ac3a4cd6b3d 100644 --- a/qt/paraview_ext/VatesAPI/test/vtkMD0DFactoryTest.h +++ b/qt/paraview_ext/VatesAPI/test/vtkMD0DFactoryTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include <cxxtest/TestSuite.h> diff --git a/qt/paraview_ext/VatesAPI/test/vtkMDHWSignalArrayTest.h b/qt/paraview_ext/VatesAPI/test/vtkMDHWSignalArrayTest.h index 1f60be65a8445db4de0e0b9cb5066c8dade2cc5b..fb7dcec5484dcad0755f366accd43ee2828281fe 100644 --- a/qt/paraview_ext/VatesAPI/test/vtkMDHWSignalArrayTest.h +++ b/qt/paraview_ext/VatesAPI/test/vtkMDHWSignalArrayTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/test/vtkMDHexFactoryTest.h b/qt/paraview_ext/VatesAPI/test/vtkMDHexFactoryTest.h index 69e2098253ae70859e4b3883c3fc514a8e90611e..9de1e091608362d3c81a2d90ef52e0f1ba695e4c 100644 --- a/qt/paraview_ext/VatesAPI/test/vtkMDHexFactoryTest.h +++ b/qt/paraview_ext/VatesAPI/test/vtkMDHexFactoryTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/test/vtkMDHistoHex4DFactoryTest.h b/qt/paraview_ext/VatesAPI/test/vtkMDHistoHex4DFactoryTest.h index 2bbff309c86f5cfedf96cbcef21cfd72dd05d4e8..03b658ef306e2d0149a4faa88a9f6b5f8c4abf8a 100644 --- a/qt/paraview_ext/VatesAPI/test/vtkMDHistoHex4DFactoryTest.h +++ b/qt/paraview_ext/VatesAPI/test/vtkMDHistoHex4DFactoryTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/test/vtkMDHistoHexFactoryTest.h b/qt/paraview_ext/VatesAPI/test/vtkMDHistoHexFactoryTest.h index 295c18501e120ee7c503033f1faeb3f01c557b7e..f2d5b0f0ce012bea9f3c4638373fd45e1e7cada8 100644 --- a/qt/paraview_ext/VatesAPI/test/vtkMDHistoHexFactoryTest.h +++ b/qt/paraview_ext/VatesAPI/test/vtkMDHistoHexFactoryTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/test/vtkMDHistoLineFactoryTest.h b/qt/paraview_ext/VatesAPI/test/vtkMDHistoLineFactoryTest.h index a81b289ce3765e5025f12194bb59b94e9e88e709..58a30323db168c8586cfa5204d532be13c375d2a 100644 --- a/qt/paraview_ext/VatesAPI/test/vtkMDHistoLineFactoryTest.h +++ b/qt/paraview_ext/VatesAPI/test/vtkMDHistoLineFactoryTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/test/vtkMDHistoQuadFactoryTest.h b/qt/paraview_ext/VatesAPI/test/vtkMDHistoQuadFactoryTest.h index d1c43942592c4ecc3d2e7ab07f8226edc7c2d453..1a41b1ddb218a409ba4fd1096dc75c7924443c58 100644 --- a/qt/paraview_ext/VatesAPI/test/vtkMDHistoQuadFactoryTest.h +++ b/qt/paraview_ext/VatesAPI/test/vtkMDHistoQuadFactoryTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/test/vtkMDLineFactoryTest.h b/qt/paraview_ext/VatesAPI/test/vtkMDLineFactoryTest.h index 612f4c16a97d966a719dad5c2a055165b81d2a5a..557796e9351f93470a519bbd2482cf3c8a806c01 100644 --- a/qt/paraview_ext/VatesAPI/test/vtkMDLineFactoryTest.h +++ b/qt/paraview_ext/VatesAPI/test/vtkMDLineFactoryTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/test/vtkMDQuadFactoryTest.h b/qt/paraview_ext/VatesAPI/test/vtkMDQuadFactoryTest.h index 638218ba1e113ecede9d36347a4b46f74a7bfc98..2b6487afb2b0ee485e95858d905b602d5bcadfd1 100644 --- a/qt/paraview_ext/VatesAPI/test/vtkMDQuadFactoryTest.h +++ b/qt/paraview_ext/VatesAPI/test/vtkMDQuadFactoryTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/test/vtkNullStructuredGridTest.h b/qt/paraview_ext/VatesAPI/test/vtkNullStructuredGridTest.h index 31c9b573fab0cd4bb2eb7b18d105e5abd45ef8dd..2aff4122f239ef38c08baf9dd917e0e2fdfb8a7a 100644 --- a/qt/paraview_ext/VatesAPI/test/vtkNullStructuredGridTest.h +++ b/qt/paraview_ext/VatesAPI/test/vtkNullStructuredGridTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/test/vtkNullUnstructuredGridTest.h b/qt/paraview_ext/VatesAPI/test/vtkNullUnstructuredGridTest.h index 900998e26a35876d892d0cc7f2bca38d07878dee..952fcb78574b1936564366ba24219e6427458764 100644 --- a/qt/paraview_ext/VatesAPI/test/vtkNullUnstructuredGridTest.h +++ b/qt/paraview_ext/VatesAPI/test/vtkNullUnstructuredGridTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/test/vtkPeakMarkerFactoryTest.h b/qt/paraview_ext/VatesAPI/test/vtkPeakMarkerFactoryTest.h index 339cacad6d75c4ac879efbd5f93b8056b7ad3046..f56ed810537ed39bb48413ca7869128ee83125bd 100644 --- a/qt/paraview_ext/VatesAPI/test/vtkPeakMarkerFactoryTest.h +++ b/qt/paraview_ext/VatesAPI/test/vtkPeakMarkerFactoryTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAPI/test/vtkSplatterPlotFactoryTest.h b/qt/paraview_ext/VatesAPI/test/vtkSplatterPlotFactoryTest.h index 1320989ed5d50a47a9e86250506c504e9c0f1175..7c70e42fabd356aa4b3ea4a7a25f4ccd1fb88308 100644 --- a/qt/paraview_ext/VatesAPI/test/vtkSplatterPlotFactoryTest.h +++ b/qt/paraview_ext/VatesAPI/test/vtkSplatterPlotFactoryTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAlgorithms/CMakeLists.txt b/qt/paraview_ext/VatesAlgorithms/CMakeLists.txt index 9e7d63ef19cc31fad45f4e6459748b91193064f0..a794008784f2d98413328991527f3b0f6ffbafb3 100644 --- a/qt/paraview_ext/VatesAlgorithms/CMakeLists.txt +++ b/qt/paraview_ext/VatesAlgorithms/CMakeLists.txt @@ -64,8 +64,7 @@ endif() # Create test file projects include_directories(SYSTEM ${CXXTEST_INCLUDE_DIR} - ${GMOCK_INCLUDE_DIR} - ${GTEST_INCLUDE_DIR}) +) include_directories(inc ../../../Framework/TestHelpers/inc @@ -87,8 +86,8 @@ target_link_libraries(VatesAlgorithmsTest VatesAPI VatesAlgorithms ${POCO_LIBRARIES} - ${GMOCK_LIBRARIES} - ${GTEST_LIBRARIES}) + gmock +) add_dependencies(AllTests VatesAlgorithmsTest) # Add to the 'UnitTests' group in VS set_property(TARGET VatesAlgorithmsTest PROPERTY FOLDER "UnitTests") diff --git a/qt/paraview_ext/VatesAlgorithms/inc/MantidVatesAlgorithms/LoadVTK.h b/qt/paraview_ext/VatesAlgorithms/inc/MantidVatesAlgorithms/LoadVTK.h index 87c284ed9f4abdd36ee596ccff8917f089b523d6..7101fd23ce5d6a04e278c34e91cb04e690c49ae6 100644 --- a/qt/paraview_ext/VatesAlgorithms/inc/MantidVatesAlgorithms/LoadVTK.h +++ b/qt/paraview_ext/VatesAlgorithms/inc/MantidVatesAlgorithms/LoadVTK.h @@ -1,14 +1,15 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidAPI/IFileLoader.h" #include "MantidDataObjects/MDEventWorkspace.h" #include "MantidGeometry/MDGeometry/MDHistoDimension.h" +#include "MantidKernel/FileDescriptor.h" #include "MantidKernel/System.h" class vtkUnsignedShortArray; diff --git a/qt/paraview_ext/VatesAlgorithms/inc/MantidVatesAlgorithms/SaveMDWorkspaceToVTK.h b/qt/paraview_ext/VatesAlgorithms/inc/MantidVatesAlgorithms/SaveMDWorkspaceToVTK.h index 4e4c61523baeb42a66ba1ecde62be223c5f773fd..12106f35c184b948a36e6e8cc233b0ac92001b55 100644 --- a/qt/paraview_ext/VatesAlgorithms/inc/MantidVatesAlgorithms/SaveMDWorkspaceToVTK.h +++ b/qt/paraview_ext/VatesAlgorithms/inc/MantidVatesAlgorithms/SaveMDWorkspaceToVTK.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidAPI/Algorithm.h" diff --git a/qt/paraview_ext/VatesAlgorithms/inc/MantidVatesAlgorithms/SaveMDWorkspaceToVTKImpl.h b/qt/paraview_ext/VatesAlgorithms/inc/MantidVatesAlgorithms/SaveMDWorkspaceToVTKImpl.h index 016163e7da8d8ebece354e51e8f805c7f6bdb31e..bcb4d513c9ad4401b878077721235df2d546f78b 100644 --- a/qt/paraview_ext/VatesAlgorithms/inc/MantidVatesAlgorithms/SaveMDWorkspaceToVTKImpl.h +++ b/qt/paraview_ext/VatesAlgorithms/inc/MantidVatesAlgorithms/SaveMDWorkspaceToVTKImpl.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAlgorithms/src/LoadVTK.cpp b/qt/paraview_ext/VatesAlgorithms/src/LoadVTK.cpp index 77be0abdda58c53661d9b517ea81a237396de76a..995dd42edc6827ccaf6f00a86c554fe2ec44dc1a 100644 --- a/qt/paraview_ext/VatesAlgorithms/src/LoadVTK.cpp +++ b/qt/paraview_ext/VatesAlgorithms/src/LoadVTK.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /*WIKI* diff --git a/qt/paraview_ext/VatesAlgorithms/src/SaveMDWorkspaceToVTK.cpp b/qt/paraview_ext/VatesAlgorithms/src/SaveMDWorkspaceToVTK.cpp index a0e6613be0886586583a0186db972bd4642f68e6..4a4ad96952a4b387e057fd914330d0723ad31a37 100644 --- a/qt/paraview_ext/VatesAlgorithms/src/SaveMDWorkspaceToVTK.cpp +++ b/qt/paraview_ext/VatesAlgorithms/src/SaveMDWorkspaceToVTK.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidVatesAlgorithms/SaveMDWorkspaceToVTK.h" #include "MantidAPI/FileProperty.h" diff --git a/qt/paraview_ext/VatesAlgorithms/src/SaveMDWorkspaceToVTKImpl.cpp b/qt/paraview_ext/VatesAlgorithms/src/SaveMDWorkspaceToVTKImpl.cpp index 3883c889b0524242b2652bfcc6e8f49ced8ad00c..e50db870dfb1ecbfb2c4cc5bab5feda52eb9ac30 100644 --- a/qt/paraview_ext/VatesAlgorithms/src/SaveMDWorkspaceToVTKImpl.cpp +++ b/qt/paraview_ext/VatesAlgorithms/src/SaveMDWorkspaceToVTKImpl.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidVatesAlgorithms/SaveMDWorkspaceToVTKImpl.h" #include "MantidVatesAPI/Normalization.h" diff --git a/qt/paraview_ext/VatesAlgorithms/test/LoadVTKTest.h b/qt/paraview_ext/VatesAlgorithms/test/LoadVTKTest.h index 59f30443b7c3a2a80241e74feea26522ba93e02e..15f11794821659fdf40ce9fa554f087fe287d44a 100644 --- a/qt/paraview_ext/VatesAlgorithms/test/LoadVTKTest.h +++ b/qt/paraview_ext/VatesAlgorithms/test/LoadVTKTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAlgorithms/test/SaveMDWorkspaceToVTKImplTest.h b/qt/paraview_ext/VatesAlgorithms/test/SaveMDWorkspaceToVTKImplTest.h index c40b7fd79e131377532a485289188b43acd8c020..0c0577eee4c83ecf1e80e45b1ee9e197f0d89fb0 100644 --- a/qt/paraview_ext/VatesAlgorithms/test/SaveMDWorkspaceToVTKImplTest.h +++ b/qt/paraview_ext/VatesAlgorithms/test/SaveMDWorkspaceToVTKImplTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesAlgorithms/test/SaveMDWorkspaceToVTKTest.h b/qt/paraview_ext/VatesAlgorithms/test/SaveMDWorkspaceToVTKTest.h index aa9e5b5a1c883a99bdaab92fe1f86c4863900842..a35b3926180a1174274b86f86053a34cd8bb7f26 100644 --- a/qt/paraview_ext/VatesAlgorithms/test/SaveMDWorkspaceToVTKTest.h +++ b/qt/paraview_ext/VatesAlgorithms/test/SaveMDWorkspaceToVTKTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesSimpleGui/QtWidgets/inc/MantidVatesSimpleGuiQtWidgets/AxisInformation.h b/qt/paraview_ext/VatesSimpleGui/QtWidgets/inc/MantidVatesSimpleGuiQtWidgets/AxisInformation.h index a1d4c9cfae1aa66cf2dd080ceec69a2483d9c598..c5ecb8ee0255a33802d3706cc883d27e6c82509c 100644 --- a/qt/paraview_ext/VatesSimpleGui/QtWidgets/inc/MantidVatesSimpleGuiQtWidgets/AxisInformation.h +++ b/qt/paraview_ext/VatesSimpleGui/QtWidgets/inc/MantidVatesSimpleGuiQtWidgets/AxisInformation.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesSimpleGui/QtWidgets/inc/MantidVatesSimpleGuiQtWidgets/GeometryParser.h b/qt/paraview_ext/VatesSimpleGui/QtWidgets/inc/MantidVatesSimpleGuiQtWidgets/GeometryParser.h index a56f688b1485948982f9c2621f7aca528cc26dca..61f4ef1ccd8803b3bd9aa601d56a72d94bb781a4 100644 --- a/qt/paraview_ext/VatesSimpleGui/QtWidgets/inc/MantidVatesSimpleGuiQtWidgets/GeometryParser.h +++ b/qt/paraview_ext/VatesSimpleGui/QtWidgets/inc/MantidVatesSimpleGuiQtWidgets/GeometryParser.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesSimpleGui/QtWidgets/inc/MantidVatesSimpleGuiQtWidgets/ModeControlWidget.h b/qt/paraview_ext/VatesSimpleGui/QtWidgets/inc/MantidVatesSimpleGuiQtWidgets/ModeControlWidget.h index 151484a9ae81c2af6f319b8ababc70cda4874b6f..c72b42c547102682d6c1f005adea5d84ef06fa37 100644 --- a/qt/paraview_ext/VatesSimpleGui/QtWidgets/inc/MantidVatesSimpleGuiQtWidgets/ModeControlWidget.h +++ b/qt/paraview_ext/VatesSimpleGui/QtWidgets/inc/MantidVatesSimpleGuiQtWidgets/ModeControlWidget.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesSimpleGui/QtWidgets/inc/MantidVatesSimpleGuiQtWidgets/RotationPointDialog.h b/qt/paraview_ext/VatesSimpleGui/QtWidgets/inc/MantidVatesSimpleGuiQtWidgets/RotationPointDialog.h index 8588fce31326affc5055f5aa1d5ff1857782f790..0b1d4f37275e3334c9d8152f4bd411e994ada032 100644 --- a/qt/paraview_ext/VatesSimpleGui/QtWidgets/inc/MantidVatesSimpleGuiQtWidgets/RotationPointDialog.h +++ b/qt/paraview_ext/VatesSimpleGui/QtWidgets/inc/MantidVatesSimpleGuiQtWidgets/RotationPointDialog.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesSimpleGui/QtWidgets/inc/MantidVatesSimpleGuiQtWidgets/WidgetDllOption.h b/qt/paraview_ext/VatesSimpleGui/QtWidgets/inc/MantidVatesSimpleGuiQtWidgets/WidgetDllOption.h index 5cc64fdd613c1f948292a2903abca4c42f1a5997..e44d59616c7148b2b62fa3b8fab85235f1632b27 100644 --- a/qt/paraview_ext/VatesSimpleGui/QtWidgets/inc/MantidVatesSimpleGuiQtWidgets/WidgetDllOption.h +++ b/qt/paraview_ext/VatesSimpleGui/QtWidgets/inc/MantidVatesSimpleGuiQtWidgets/WidgetDllOption.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesSimpleGui/QtWidgets/src/AxisInformation.cpp b/qt/paraview_ext/VatesSimpleGui/QtWidgets/src/AxisInformation.cpp index b7617284667a9585178f5bc61b5bc440512c0ce5..aa2bb9d47353459b63cae55a7336dd264f52de5c 100644 --- a/qt/paraview_ext/VatesSimpleGui/QtWidgets/src/AxisInformation.cpp +++ b/qt/paraview_ext/VatesSimpleGui/QtWidgets/src/AxisInformation.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidVatesSimpleGuiQtWidgets/AxisInformation.h" diff --git a/qt/paraview_ext/VatesSimpleGui/QtWidgets/src/GeometryParser.cpp b/qt/paraview_ext/VatesSimpleGui/QtWidgets/src/GeometryParser.cpp index aa4d88896b68b6a68996800fc0377675c0dab159..4959b4f008c26fe80730debbc4abb4fc951d2369 100644 --- a/qt/paraview_ext/VatesSimpleGui/QtWidgets/src/GeometryParser.cpp +++ b/qt/paraview_ext/VatesSimpleGui/QtWidgets/src/GeometryParser.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include <sstream> diff --git a/qt/paraview_ext/VatesSimpleGui/QtWidgets/src/ModeControlWidget.cpp b/qt/paraview_ext/VatesSimpleGui/QtWidgets/src/ModeControlWidget.cpp index 7478fa5425ac7db251737751c15cbfd55c143f39..6c84558f14293f7da55d162f1867f6b666a4745c 100644 --- a/qt/paraview_ext/VatesSimpleGui/QtWidgets/src/ModeControlWidget.cpp +++ b/qt/paraview_ext/VatesSimpleGui/QtWidgets/src/ModeControlWidget.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidVatesSimpleGuiQtWidgets/ModeControlWidget.h" #include "MantidKernel/Logger.h" diff --git a/qt/paraview_ext/VatesSimpleGui/QtWidgets/src/RotationPointDialog.cpp b/qt/paraview_ext/VatesSimpleGui/QtWidgets/src/RotationPointDialog.cpp index 83715fade894b2b7e2311b77105c4be821d62c1d..d0553e1d6a6161df2ec5debc90cc9a2a80dfba9f 100644 --- a/qt/paraview_ext/VatesSimpleGui/QtWidgets/src/RotationPointDialog.cpp +++ b/qt/paraview_ext/VatesSimpleGui/QtWidgets/src/RotationPointDialog.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidVatesSimpleGuiQtWidgets/RotationPointDialog.h" diff --git a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/AutoScaleRangeGenerator.h b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/AutoScaleRangeGenerator.h index 03e52976fa7491660effc58164cc0ce98282b1c8..3176a3d29397acbeae5b9c38208e5fd95aa5d2d6 100644 --- a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/AutoScaleRangeGenerator.h +++ b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/AutoScaleRangeGenerator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/BackgroundRgbProvider.h b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/BackgroundRgbProvider.h index b1cec0c891cb651c76143582d0f524286e639ed5..bc97ac22a8e86f9f327c51f46a86df7b249c5645 100644 --- a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/BackgroundRgbProvider.h +++ b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/BackgroundRgbProvider.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/CameraManager.h b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/CameraManager.h index d88e87fa87c73189eaa9bb3d6cbb4a3e51b7981c..dd397a6520b841f00ddb9e97d39915240d5603b8 100644 --- a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/CameraManager.h +++ b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/CameraManager.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/ColorMapEditorPanel.h b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/ColorMapEditorPanel.h index db309a275d7837ac518da5757eccd89cc00865c9..df8632276740b89564a7d932fe9e3eea7b80cf43 100644 --- a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/ColorMapEditorPanel.h +++ b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/ColorMapEditorPanel.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/ColorSelectionWidget.h b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/ColorSelectionWidget.h index a823b8a6cf547ba1a6e5367687c88daee1a99282..e2bd58690d93a745e8b25b0e8af984ffa4c797f9 100644 --- a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/ColorSelectionWidget.h +++ b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/ColorSelectionWidget.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/ColorUpdater.h b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/ColorUpdater.h index 5a53979b13cd4f9f9f5f6a07f5e73b948de94f41..bb23fc74e79178c253ff4036e4cdbf39b6e768f1 100644 --- a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/ColorUpdater.h +++ b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/ColorUpdater.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/MdViewerWidget.h b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/MdViewerWidget.h index dbe4f678a65564dd22c422205b45d7dc53423d1f..65db6da5e3670aff873171751f72bfe4ddad21fb 100644 --- a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/MdViewerWidget.h +++ b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/MdViewerWidget.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/MultisliceView.h b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/MultisliceView.h index 432847ebf690c0c3f2b08855432f65d8bec7ef6c..ab703648c1cc08bf1cd7dece958d797a26097616 100644 --- a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/MultisliceView.h +++ b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/MultisliceView.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/PeaksTabWidget.h b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/PeaksTabWidget.h index 4aff5cb20906455e03e2675aa8dd94460640e039..e40c3ca694b866d18fea9ab946fb309c9301dbac 100644 --- a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/PeaksTabWidget.h +++ b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/PeaksTabWidget.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/PeaksTableControllerVsi.h b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/PeaksTableControllerVsi.h index 9dd51be446d2b38d354dd80ee155889dcfa13326..48dec07a65b221bda48513fe2f47ed27fd7e824b 100644 --- a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/PeaksTableControllerVsi.h +++ b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/PeaksTableControllerVsi.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/PeaksWidget.h b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/PeaksWidget.h index 6217d6f4cf151b651d846dd918432a6058300eaa..0b9f781fd3dfcff5ed054b60504a06b70e478847 100644 --- a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/PeaksWidget.h +++ b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/PeaksWidget.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/RebinAlgorithmDialogProvider.h b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/RebinAlgorithmDialogProvider.h index e21df5a7e5e9fae275c18015faa424a24877d58b..638658a7ea7f6613f98b984f5ac2dc70110ddf24 100644 --- a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/RebinAlgorithmDialogProvider.h +++ b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/RebinAlgorithmDialogProvider.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/RebinnedSourcesManager.h b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/RebinnedSourcesManager.h index 24b9d8f51a3de8eca7d04585bd0db983bb8f91ba..c3a4ebc3817aac4771fb320bcced4222f9441bfc 100644 --- a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/RebinnedSourcesManager.h +++ b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/RebinnedSourcesManager.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/SplatterPlotView.h b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/SplatterPlotView.h index 9c47bfdf0338647f5659a620acff4bf9a22da221..07b7ea3365e6432869ea301aae67dcf0c8ed33c5 100644 --- a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/SplatterPlotView.h +++ b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/SplatterPlotView.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/StandardView.h b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/StandardView.h index cea0447c9acf55584fb9a7b67e1e77d718cea5eb..d3cca27a0f20536b063c62902f4567de5aab5a25 100644 --- a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/StandardView.h +++ b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/StandardView.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/ThreesliceView.h b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/ThreesliceView.h index 0bdf873f5c267fe4a81c18e559ba14fc4fdf1aee..03957a50405e07f8802c57e082187ce89327f4c7 100644 --- a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/ThreesliceView.h +++ b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/ThreesliceView.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/TimeControlWidget.h b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/TimeControlWidget.h index 2b8102ff6f3c501329211a44db79fb58e6bc9137..47bffbd71e543eebfb2313274c82c97b1ffea72e 100644 --- a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/TimeControlWidget.h +++ b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/TimeControlWidget.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/VatesParaViewApplication.h b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/VatesParaViewApplication.h index 179663424557b77006beb680dbb8ef196c88fd99..c8012efb8e7671c68568c691d8b58a3748d67dfd 100644 --- a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/VatesParaViewApplication.h +++ b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/VatesParaViewApplication.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/ViewBase.h b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/ViewBase.h index 1cb7a84986f1c859e343a756381d12fd1ffcd67b..0df3f3485faecee5aa4de7ed6246b4745ba79bd7 100644 --- a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/ViewBase.h +++ b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/ViewBase.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/VisibleAxesColor.h b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/VisibleAxesColor.h index 1bc89d2e3ffa4de13f0cf787fc60e8e0b7034293..c302b8d1ab223b6ef024908589de7ce5083564eb 100644 --- a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/VisibleAxesColor.h +++ b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/VisibleAxesColor.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidVatesSimpleGuiViewWidgets/WidgetDllOption.h" diff --git a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/VsiApplyBehaviour.h b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/VsiApplyBehaviour.h index add90b8b1ad95f6ff1304116768fbf62a096b4f3..369cd020e686633cb6c98e9f2e4954bca3990098 100644 --- a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/VsiApplyBehaviour.h +++ b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/VsiApplyBehaviour.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/WidgetDllOption.h b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/WidgetDllOption.h index 3d48027702e2945fa161eba105ae63d6fa830425..8875c2d090e8feda3e1eb754c277ee73ded89e97 100644 --- a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/WidgetDllOption.h +++ b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/WidgetDllOption.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/pqCameraReactionNonOrthogonalAxes.h b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/pqCameraReactionNonOrthogonalAxes.h index 6608ca8ac7945566ba09c4acbf215ed39199342c..716de402799dcaa72786e11098a1cf9ccaaa9be8 100644 --- a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/pqCameraReactionNonOrthogonalAxes.h +++ b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/pqCameraReactionNonOrthogonalAxes.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /*========================================================================= diff --git a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/pqCameraToolbarNonOrthogonalAxes.h b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/pqCameraToolbarNonOrthogonalAxes.h index 094100bde64241ba5ccbb44cb18f41d57761728d..00e390cad14b28dac1564f6432ec483373403ac1 100644 --- a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/pqCameraToolbarNonOrthogonalAxes.h +++ b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/pqCameraToolbarNonOrthogonalAxes.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /*========================================================================= diff --git a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/AutoScaleRangeGenerator.cpp b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/AutoScaleRangeGenerator.cpp index 7bf561ba11fd13181e1ff3776e68e94c3cc25770..fc17f474f38c95eaf949ff74ea68fa5df3c0c910 100644 --- a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/AutoScaleRangeGenerator.cpp +++ b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/AutoScaleRangeGenerator.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidVatesSimpleGuiViewWidgets/AutoScaleRangeGenerator.h" #include "MantidQtWidgets/Common/MdConstants.h" diff --git a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/BackgroundRgbProvider.cpp b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/BackgroundRgbProvider.cpp index 4b393f6b029f6413561d7fcd04ca5a4d5c0beb41..61eb0f1fc04de70127d623e3474c8c3dcfa132cb 100644 --- a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/BackgroundRgbProvider.cpp +++ b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/BackgroundRgbProvider.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidVatesSimpleGuiViewWidgets/BackgroundRgbProvider.h" #include "MantidKernel/Logger.h" diff --git a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/CameraManager.cpp b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/CameraManager.cpp index ae2d4d2c9cd9d587487817121263e61723781981..aa1d6433843fddb544b2fa364d6be53c08d6e3e5 100644 --- a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/CameraManager.cpp +++ b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/CameraManager.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidVatesSimpleGuiViewWidgets/CameraManager.h" #include "MantidVatesAPI/ViewFrustum.h" diff --git a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/ColorMapEditorPanel.cpp b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/ColorMapEditorPanel.cpp index e898d732e723b8d9a5e8f947ebec6488515a2f81..2783073b560e0d9cc41d43b5d267b406497be962 100644 --- a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/ColorMapEditorPanel.cpp +++ b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/ColorMapEditorPanel.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidVatesSimpleGuiViewWidgets/ColorMapEditorPanel.h" #include <QDialog> diff --git a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/ColorSelectionWidget.cpp b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/ColorSelectionWidget.cpp index 9bac78977f4f9f8022303ad04544d43392a9d203..53ce9b711663bf6e41a84c85b22877f44c568177 100644 --- a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/ColorSelectionWidget.cpp +++ b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/ColorSelectionWidget.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include <cfloat> diff --git a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/ColorUpdater.cpp b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/ColorUpdater.cpp index d4edebea7359bf0aaf542dfc86e475b990956d03..c67a5bc9618d4344e611cd79eaa9fe4d046b8abc 100644 --- a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/ColorUpdater.cpp +++ b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/ColorUpdater.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include <cmath> #include <limits> diff --git a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/MdViewerWidget.cpp b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/MdViewerWidget.cpp index 7bf1d23949921bbc4226c9bdff6b87b9ec1d8103..67f4ff43e3d4d355c175a5ee5c6c83ee687571e6 100644 --- a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/MdViewerWidget.cpp +++ b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/MdViewerWidget.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include <Poco/File.h> #include <boost/regex.hpp> diff --git a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/MultisliceView.cpp b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/MultisliceView.cpp index 2f7e0da399eeb717aa1730d3ba827a095c82f555..c52159b8b56eac4a98d68e15299a23e37a71b8c3 100644 --- a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/MultisliceView.cpp +++ b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/MultisliceView.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidVatesSimpleGuiViewWidgets/MultisliceView.h" #include "MantidGeometry/MDGeometry/MDPlaneImplicitFunction.h" diff --git a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/PeaksTabWidget.cpp b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/PeaksTabWidget.cpp index 0562861abcac7b989ea5472d4f19469ee2c6e6fd..9dce68cb4f6c8ca973f0cb21be0ad901218961f0 100644 --- a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/PeaksTabWidget.cpp +++ b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/PeaksTabWidget.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidVatesSimpleGuiViewWidgets/PeaksTabWidget.h" diff --git a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/PeaksTableControllerVsi.cpp b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/PeaksTableControllerVsi.cpp index 4aad5ec0148784be3c2632d967658f9f8870fe52..09168dfd4cc6e14ba0e982eb7f92db3fb141bbb1 100644 --- a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/PeaksTableControllerVsi.cpp +++ b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/PeaksTableControllerVsi.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidVatesSimpleGuiViewWidgets/PeaksTableControllerVsi.h" diff --git a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/PeaksWidget.cpp b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/PeaksWidget.cpp index 361e325e13c03b61b1372531a340a146c60e31cd..6c411e9476c5fe4065dc546fa7907cf19dd389ed 100644 --- a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/PeaksWidget.cpp +++ b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/PeaksWidget.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidVatesSimpleGuiViewWidgets/PeaksWidget.h" #include "MantidAPI/IPeaksWorkspace.h" diff --git a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/RebinAlgorithmDialogProvider.cpp b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/RebinAlgorithmDialogProvider.cpp index edcbdc5f3dc38f8105f1e7457e6f2a72635ec860..725e898caa744d8dddd99510b4a052ed6ffbbf94 100644 --- a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/RebinAlgorithmDialogProvider.cpp +++ b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/RebinAlgorithmDialogProvider.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidVatesSimpleGuiViewWidgets/RebinAlgorithmDialogProvider.h" #include "MantidAPI/Algorithm.h" diff --git a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/RebinnedSourcesManager.cpp b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/RebinnedSourcesManager.cpp index 9393f7c993a8d20f40ba5003f9acc4b6a9951c43..0201a656eb09a14b112fd9491407dcc7c7c7b02b 100644 --- a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/RebinnedSourcesManager.cpp +++ b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/RebinnedSourcesManager.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidVatesSimpleGuiViewWidgets/RebinnedSourcesManager.h" #include "MantidAPI/AnalysisDataService.h" diff --git a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/SplatterPlotView.cpp b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/SplatterPlotView.cpp index 93d78a95d7db305c47fd6b0e4dbfd23f2caebf50..e4ef3acc535565cafb6b0d499f7926d3ba0d1e5b 100644 --- a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/SplatterPlotView.cpp +++ b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/SplatterPlotView.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidVatesSimpleGuiViewWidgets/SplatterPlotView.h" #include "MantidAPI/IMDEventWorkspace.h" diff --git a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/StandardView.cpp b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/StandardView.cpp index c85408b1fed2bed8cbb78b18cfc591c59d7bd31a..19e6dd6f0d5b994e2ed21320afd0ac6b9c40cfad 100644 --- a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/StandardView.cpp +++ b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/StandardView.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidVatesSimpleGuiViewWidgets/StandardView.h" #include "MantidVatesSimpleGuiViewWidgets/RebinnedSourcesManager.h" diff --git a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/ThreesliceView.cpp b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/ThreesliceView.cpp index c2f0afebf7414b8ba203fb100dc30d96ec18a1c2..25d657b5328480ec13e2ad10405f9638fa006fd1 100644 --- a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/ThreesliceView.cpp +++ b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/ThreesliceView.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidVatesSimpleGuiViewWidgets/ThreesliceView.h" #include "MantidKernel/ConfigService.h" diff --git a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/TimeControlWidget.cpp b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/TimeControlWidget.cpp index b33e9f92f9a9741324247b9479fc75b12e7dc4f4..8101e23afc2ed230ec3ee97c0fcf10ba5beb6375 100644 --- a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/TimeControlWidget.cpp +++ b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/TimeControlWidget.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidVatesSimpleGuiViewWidgets/TimeControlWidget.h" diff --git a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/VatesParaViewApplication.cpp b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/VatesParaViewApplication.cpp index b93197d791691fc9bdd10e6fd152caaf6a542178..f5d3d87ba89ea303d6a9f789f831959fe775ea85 100644 --- a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/VatesParaViewApplication.cpp +++ b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/VatesParaViewApplication.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidVatesSimpleGuiViewWidgets/VatesParaViewApplication.h" #include "MantidKernel/ConfigService.h" diff --git a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/ViewBase.cpp b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/ViewBase.cpp index 9b4ee8aa0bd20c2bacc4e27509905f423c3a687a..64aef8b62af7f52b046455b9523b53a3b2ad993c 100644 --- a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/ViewBase.cpp +++ b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/ViewBase.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include <stdexcept> diff --git a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/VisibleAxesColor.cpp b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/VisibleAxesColor.cpp index 0aab3a0d38a8db73f8ea6a2e72e848f3ac426078..2a88b23211eb4296863deb9020b80d3ba5c7f956 100644 --- a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/VisibleAxesColor.cpp +++ b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/VisibleAxesColor.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidVatesSimpleGuiViewWidgets/VisibleAxesColor.h" diff --git a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/VsiApplyBehaviour.cpp b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/VsiApplyBehaviour.cpp index dbd4e44c45da8d2aeb8b2e00bc024313b3e41666..ea239ecacac48afd6404c1b905792224885770b1 100644 --- a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/VsiApplyBehaviour.cpp +++ b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/VsiApplyBehaviour.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidVatesSimpleGuiViewWidgets/VsiApplyBehaviour.h" diff --git a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/test/common/scripts/common_checks.py b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/test/common/scripts/common_checks.py index dcc0f5c0abb5d6baf1afc4734b87f0a7a8203d5b..01b57b9385997b4a90f21e0d0b9b64b7f619de0b 100644 --- a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/test/common/scripts/common_checks.py +++ b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/test/common/scripts/common_checks.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + source(findFile("scripts", "global_checks.py")) diff --git a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/test/common/scripts/test_helpers.py b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/test/common/scripts/test_helpers.py index c6986670cb0ace8f1d7776aa19037d0211329bec..19dde39eb150b1849ae0a900d218faea8732d063 100644 --- a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/test/common/scripts/test_helpers.py +++ b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/test/common/scripts/test_helpers.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + source(findFile("scripts", "global_helpers.py")) diff --git a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/test/mp_scripts/mdew_3D.py b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/test/mp_scripts/mdew_3D.py index d4934d3adf9577c75ad21e91ba63b3a8cd48dfd3..cb4d5ae33a9424c3f75c78038f83ae63b578a231 100644 --- a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/test/mp_scripts/mdew_3D.py +++ b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/test/mp_scripts/mdew_3D.py @@ -1,7 +1,7 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + LoadMD(Filename='TOPAZ_3680_5_sec_MDEW.nxs', OutputWorkspace='TOPAZ_3680') diff --git a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/test/mp_scripts/mdew_4D.py b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/test/mp_scripts/mdew_4D.py index 34153d07024631f4434bb0ca8d7bd884506be6e4..68b60b8f0ab01e624b09e90bf3898f384787ec0f 100644 --- a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/test/mp_scripts/mdew_4D.py +++ b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/test/mp_scripts/mdew_4D.py @@ -1,7 +1,7 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + LoadMD(Filename='SEQ_MDEW.nxs', OutputWorkspace='SEQ') diff --git a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/test/mp_scripts/mdhistos_from_3D.py b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/test/mp_scripts/mdhistos_from_3D.py index fcd34382816db1c37ea8c0c729dd25e569a6025c..50aba42703614788d23ce5968ed44c14dccd3cd5 100644 --- a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/test/mp_scripts/mdhistos_from_3D.py +++ b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/test/mp_scripts/mdhistos_from_3D.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + LoadMD(Filename='TOPAZ_3680_5_sec_MDEW.nxs', OutputWorkspace='TOPAZ_3680') BinMD(InputWorkspace='TOPAZ_3680', AlignedDim0='Q_lab_x,-5,5,20', AlignedDim1='Q_lab_y,-5,5,20', AlignedDim2='Q_lab_z,-5,5,20', OutputWorkspace='TOPAZ_3680_3D') diff --git a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/test/mp_scripts/mdhistos_from_4D.py b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/test/mp_scripts/mdhistos_from_4D.py index 623929ecdbb03cb803430b033fb082d0a0e0dbb6..4f50f4c87eb62b66661bc9bcdb4280344b393c6c 100644 --- a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/test/mp_scripts/mdhistos_from_4D.py +++ b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/test/mp_scripts/mdhistos_from_4D.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + LoadMD(Filename='SEQ_MDEW.nxs', OutputWorkspace='SEQ') # Rebinned 4D MDHistoWorkspace diff --git a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/test/mp_scripts/viewable_mdhistos.py b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/test/mp_scripts/viewable_mdhistos.py index 03e46707473fe3d8d1ce57182f7360bd3b181476..a9136f91ff1645dbc3098bc7e86dac3809d9502e 100644 --- a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/test/mp_scripts/viewable_mdhistos.py +++ b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/test/mp_scripts/viewable_mdhistos.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + LoadMD(Filename='SEQ_MDEW.nxs', OutputWorkspace='SEQ') # Rebinned 4D MDHistoWorkspace diff --git a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/test/suite_MDEventWorkspace/tst_MDEW_Cant_Cut_Without_Apply_After_Rebin/test.py b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/test/suite_MDEventWorkspace/tst_MDEW_Cant_Cut_Without_Apply_After_Rebin/test.py index a5d71cd765180958260c721f1cc0995d0b9e44e6..44835927195aa150af221235ec053d13cea764af 100644 --- a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/test/suite_MDEventWorkspace/tst_MDEW_Cant_Cut_Without_Apply_After_Rebin/test.py +++ b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/test/suite_MDEventWorkspace/tst_MDEW_Cant_Cut_Without_Apply_After_Rebin/test.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + def main(): source(findFile("scripts", "test_helpers.py")) diff --git a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/test/suite_MDEventWorkspace/tst_MDEW_Launch_SliceView/test.py b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/test/suite_MDEventWorkspace/tst_MDEW_Launch_SliceView/test.py index b8b028d4dfa54f49037807fcc881ae98e724a37e..15fe527a4ee299ef35b670bcfdc051976b2687f1 100644 --- a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/test/suite_MDEventWorkspace/tst_MDEW_Launch_SliceView/test.py +++ b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/test/suite_MDEventWorkspace/tst_MDEW_Launch_SliceView/test.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + def main(): source(findFile("scripts", "test_helpers.py")) diff --git a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/test/suite_MDEventWorkspace/tst_MDEW_No_Overplot_In_SplatterPlot/test.py b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/test/suite_MDEventWorkspace/tst_MDEW_No_Overplot_In_SplatterPlot/test.py index c57395e9cab2446345696e4a5bb301b804695ac5..87cadacb709edcb73676c894f1b59bd60ff944ca 100644 --- a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/test/suite_MDEventWorkspace/tst_MDEW_No_Overplot_In_SplatterPlot/test.py +++ b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/test/suite_MDEventWorkspace/tst_MDEW_No_Overplot_In_SplatterPlot/test.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + def main(): source(findFile("scripts", "test_helpers.py")) diff --git a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/test/suite_MDHistoWorkspace/tst_MDHW_Cant_Rebin/test.py b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/test/suite_MDHistoWorkspace/tst_MDHW_Cant_Rebin/test.py index f3419987ff6e6b38b00b21719ac10a2b71a4425a..386ba66b8d51c0d75a2de1d71b30b3db84d0a8a4 100644 --- a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/test/suite_MDHistoWorkspace/tst_MDHW_Cant_Rebin/test.py +++ b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/test/suite_MDHistoWorkspace/tst_MDHW_Cant_Rebin/test.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + def main(): source(findFile("scripts", "test_helpers.py")) diff --git a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/test/suite_MDHistoWorkspace/tst_MDHW_Cant_Switch_to_SplatterPlot/test.py b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/test/suite_MDHistoWorkspace/tst_MDHW_Cant_Switch_to_SplatterPlot/test.py index 0fd792deed486131f798163bee2cd6188e0a1494..939d28fc13e3be54d8e06401b447e138a55edfac 100644 --- a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/test/suite_MDHistoWorkspace/tst_MDHW_Cant_Switch_to_SplatterPlot/test.py +++ b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/test/suite_MDHistoWorkspace/tst_MDHW_Cant_Switch_to_SplatterPlot/test.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + def main(): source(findFile("scripts", "test_helpers.py")) diff --git a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/test/suite_MDHistoWorkspace/tst_MDHW_Launch_SliceView/test.py b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/test/suite_MDHistoWorkspace/tst_MDHW_Launch_SliceView/test.py index 417b0481535cbe3f055ff7c93bc7a8ad51c91941..7905409e81db28a1d9c983290fd638a66d6a84db 100644 --- a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/test/suite_MDHistoWorkspace/tst_MDHW_Launch_SliceView/test.py +++ b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/test/suite_MDHistoWorkspace/tst_MDHW_Launch_SliceView/test.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + def main(): source(findFile("scripts", "test_helpers.py")) diff --git a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/test/suite_MDHistoWorkspace/tst_MDHW_from_4D/test.py b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/test/suite_MDHistoWorkspace/tst_MDHW_from_4D/test.py index 15faba3f3eb80733ba5b46727ec1cbab297632bb..d7f265594b58e0534d6131953f44dbb8bcfc630a 100644 --- a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/test/suite_MDHistoWorkspace/tst_MDHW_from_4D/test.py +++ b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/test/suite_MDHistoWorkspace/tst_MDHW_from_4D/test.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + def main(): source(findFile("scripts", "test_helpers.py")) diff --git a/qt/paraview_ext/VatesSimpleGui/test/global/scripts/global_checks.py b/qt/paraview_ext/VatesSimpleGui/test/global/scripts/global_checks.py index 69ea9dad318678bc44a61d16a98fccc8ce901169..e8bcd5163762ba8a339360fa910f0cc5adf1fd5a 100644 --- a/qt/paraview_ext/VatesSimpleGui/test/global/scripts/global_checks.py +++ b/qt/paraview_ext/VatesSimpleGui/test/global/scripts/global_checks.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + def fix_bool(value): if value: diff --git a/qt/paraview_ext/VatesSimpleGui/test/global/scripts/global_helpers.py b/qt/paraview_ext/VatesSimpleGui/test/global/scripts/global_helpers.py index fcee51be28fa097420e0449f0fb58cc5873549f0..572a913fdf1def41f4d0055dfe870c92b9be5d0f 100644 --- a/qt/paraview_ext/VatesSimpleGui/test/global/scripts/global_helpers.py +++ b/qt/paraview_ext/VatesSimpleGui/test/global/scripts/global_helpers.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This function is here to "fix" names for TreeViews and ContextMenus. Squish really # HATES underscores in these things. diff --git a/qt/python/common_sip/SIPVector.h b/qt/python/common_sip/SIPVector.h index 5169da7947d26f8135b26637420555f10c5a02ed..c1d369f5b4e28739f1eed82e5a68ecafe7900296 100644 --- a/qt/python/common_sip/SIPVector.h +++ b/qt/python/common_sip/SIPVector.h @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #include "MantidPythonInterface/core/VersionCompat.h" #include <boost/optional.hpp> #include <memory> diff --git a/qt/python/mantidqt/MPLwidgets.py b/qt/python/mantidqt/MPLwidgets.py index 9c00c92a8326ae844dd4bd89d1167eca74532c8f..f28eb9bdabed10d6790dbc3b425cf0216048af4d 100644 --- a/qt/python/mantidqt/MPLwidgets.py +++ b/qt/python/mantidqt/MPLwidgets.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) from .gui_helper import set_matplotlib_backend diff --git a/qt/python/mantidqt/__init__.py b/qt/python/mantidqt/__init__.py index 0df5c96a57e1732136ccc3050c995218dd726e21..dcc8cc06f828dafb6fa713857d8e1874d409d012 100644 --- a/qt/python/mantidqt/__init__.py +++ b/qt/python/mantidqt/__init__.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package # diff --git a/qt/python/mantidqt/algorithminputhistory.py b/qt/python/mantidqt/algorithminputhistory.py index 5ca6c0ede225a3d30d7a0f48ba156df834479cab..c95a5f67a4177d34a738652010115a075ed705a2 100644 --- a/qt/python/mantidqt/algorithminputhistory.py +++ b/qt/python/mantidqt/algorithminputhistory.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package # diff --git a/qt/python/mantidqt/dialogs/__init__.py b/qt/python/mantidqt/dialogs/__init__.py index d2cfb75232dfb59fac674e2b49dba356e18ebbc1..ffedf5d542e31f4d22d7833e9c94f5003f02b3cb 100644 --- a/qt/python/mantidqt/dialogs/__init__.py +++ b/qt/python/mantidqt/dialogs/__init__.py @@ -1,6 +1,6 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + diff --git a/qt/python/mantidqt/dialogs/algorithmdialog.py b/qt/python/mantidqt/dialogs/algorithmdialog.py index 1afb56925f846fb90dd8caf208c25bf3d0e28394..42f9d3a2812db697a327eb7651143ee415564d74 100644 --- a/qt/python/mantidqt/dialogs/algorithmdialog.py +++ b/qt/python/mantidqt/dialogs/algorithmdialog.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package # diff --git a/qt/python/mantidqt/dialogs/genericdialog.py b/qt/python/mantidqt/dialogs/genericdialog.py index 797a27943e18a36ad5757489930cc9cf46ffb6bc..94d24f2e31c0ce62a3fca4dfad4690ee39dcb02d 100644 --- a/qt/python/mantidqt/dialogs/genericdialog.py +++ b/qt/python/mantidqt/dialogs/genericdialog.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package # diff --git a/qt/python/mantidqt/dialogs/spectraselectordialog.py b/qt/python/mantidqt/dialogs/spectraselectordialog.py index 8be9167a18c6a0a31e336337e299caa299fc47f9..0612be9821165bd24a1aa503112156cf7d106c87 100644 --- a/qt/python/mantidqt/dialogs/spectraselectordialog.py +++ b/qt/python/mantidqt/dialogs/spectraselectordialog.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package # diff --git a/qt/python/mantidqt/dialogs/spectraselectorutils.py b/qt/python/mantidqt/dialogs/spectraselectorutils.py index 929932cc8ac251ea5d8680e2de26ba658c239258..4a1bd93f829ecedf687776ad1f6190d1bba7482c 100644 --- a/qt/python/mantidqt/dialogs/spectraselectorutils.py +++ b/qt/python/mantidqt/dialogs/spectraselectorutils.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package from mantidqt.dialogs.spectraselectordialog import SpectraSelectionDialog, SpectraSelection diff --git a/qt/python/mantidqt/dialogs/test/__init__.py b/qt/python/mantidqt/dialogs/test/__init__.py index db65bfdd56145fdd2d6d2eccf8d7684e66930c50..d4649f5e6d8bb07eea47f10137cb8dbc8c8b3cb0 100644 --- a/qt/python/mantidqt/dialogs/test/__init__.py +++ b/qt/python/mantidqt/dialogs/test/__init__.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. diff --git a/qt/python/mantidqt/dialogs/test/test_algorithm_dialog.py b/qt/python/mantidqt/dialogs/test/test_algorithm_dialog.py index 4af5ed5decc9b00452cd464e37349173bb0a7219..140274c8747863a8c4130c3e74354be2b33b28cf 100644 --- a/qt/python/mantidqt/dialogs/test/test_algorithm_dialog.py +++ b/qt/python/mantidqt/dialogs/test/test_algorithm_dialog.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/python/mantidqt/dialogs/test/test_spectraselectiondialog.py b/qt/python/mantidqt/dialogs/test/test_spectraselectiondialog.py index 41e5670cb68fc9c3861cdb96b2ffa79dd6761e53..e4a125f39fd6f7be656f047699ba9459c96d325c 100644 --- a/qt/python/mantidqt/dialogs/test/test_spectraselectiondialog.py +++ b/qt/python/mantidqt/dialogs/test/test_spectraselectiondialog.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package import unittest diff --git a/qt/python/mantidqt/dialogs/test/test_spectraselectorutils.py b/qt/python/mantidqt/dialogs/test/test_spectraselectorutils.py index b0b34cc1b4cf0591958a31ce64819df6d0f33a58..7511ec7faffeee90da3eef12d01be562569c3e61 100644 --- a/qt/python/mantidqt/dialogs/test/test_spectraselectorutils.py +++ b/qt/python/mantidqt/dialogs/test/test_spectraselectorutils.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package from __future__ import absolute_import diff --git a/qt/python/mantidqt/gui_helper.py b/qt/python/mantidqt/gui_helper.py index b5b08a9ba1d30b5adedb9b84bf3c94ff326568ed..8c5c79c88265855eead6fe5fc194271d79436dd5 100644 --- a/qt/python/mantidqt/gui_helper.py +++ b/qt/python/mantidqt/gui_helper.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) from qtpy.QtWidgets import (QApplication) # noqa diff --git a/qt/python/mantidqt/hint.py b/qt/python/mantidqt/hint.py index 89f9c74a30aca5021129f054897d76d541bcf554..c9a518338a64248f874d3298162f50174f951322 100644 --- a/qt/python/mantidqt/hint.py +++ b/qt/python/mantidqt/hint.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package # diff --git a/qt/python/mantidqt/icons/__init__.py b/qt/python/mantidqt/icons/__init__.py index ea2a72cb3d0ccd21867084df0cf1652c4293164a..2c651b80a4fa0852ea1744323a7e340d54ad9506 100644 --- a/qt/python/mantidqt/icons/__init__.py +++ b/qt/python/mantidqt/icons/__init__.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/python/mantidqt/icons/test/__init__.py b/qt/python/mantidqt/icons/test/__init__.py index 93e33410c9335c54c1f8dfc4da08e53eff4fd6e0..44b106bb91113a46bb285a7c13e11457c25e72e6 100644 --- a/qt/python/mantidqt/icons/test/__init__.py +++ b/qt/python/mantidqt/icons/test/__init__.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/python/mantidqt/icons/test/test_icons.py b/qt/python/mantidqt/icons/test/test_icons.py index e0ff362d3fb2b76c323500f76af0c11c792646b1..aea93d1a5b9ad6999d814649ae73b5842525110f 100644 --- a/qt/python/mantidqt/icons/test/test_icons.py +++ b/qt/python/mantidqt/icons/test/test_icons.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/python/mantidqt/interfacemanager.py b/qt/python/mantidqt/interfacemanager.py index 1eabbbf6c5add05f9ce9346a45cc8deb2f9c48bc..199cb4f8c90e72da1eb6d98b662cd48ab0765d92 100644 --- a/qt/python/mantidqt/interfacemanager.py +++ b/qt/python/mantidqt/interfacemanager.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package # diff --git a/qt/python/mantidqt/io.py b/qt/python/mantidqt/io.py index 26ca99d3d6ef867ae77d13e97b45a2f4b7a98f2b..1aa6608072ac44aa88f0a5fccc18d3c9c621c25f 100644 --- a/qt/python/mantidqt/io.py +++ b/qt/python/mantidqt/io.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package # diff --git a/qt/python/mantidqt/plotting/__init__.py b/qt/python/mantidqt/plotting/__init__.py index fa481f76cef7127fd81c5757e6dec34d652833dc..2e70f99c5c101829a88a6a08d6f27eba88eb90bf 100644 --- a/qt/python/mantidqt/plotting/__init__.py +++ b/qt/python/mantidqt/plotting/__init__.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package # diff --git a/qt/python/mantidqt/plotting/figuretype.py b/qt/python/mantidqt/plotting/figuretype.py index bd9456e9aadce5b136c6a302eb4551f9381a339a..d2576f307f2f316db1cba1e87b3146a98a604722 100644 --- a/qt/python/mantidqt/plotting/figuretype.py +++ b/qt/python/mantidqt/plotting/figuretype.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/python/mantidqt/plotting/functions.py b/qt/python/mantidqt/plotting/functions.py index 0c9f5dd4feeb5fe54191d381ae9254fcf2d3e451..6be1029037a8bf881f643bf294399a838abbf916 100644 --- a/qt/python/mantidqt/plotting/functions.py +++ b/qt/python/mantidqt/plotting/functions.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # @@ -162,6 +162,10 @@ def pcolormesh(workspaces, fig=None): if subplot_idx < workspaces_len: ws = workspaces[subplot_idx] pcm = pcolormesh_on_axis(ax, ws) + if pcm: # Colour bar limits are wrong if workspace is ragged. Set them manually. + colorbar_min = np.nanmin(pcm.get_array()) + colorbar_max = np.nanmax(pcm.get_array()) + pcm.set_clim(colorbar_min, colorbar_max) if col_idx < ncols - 1: col_idx += 1 else: diff --git a/qt/python/mantidqt/plotting/markers.py b/qt/python/mantidqt/plotting/markers.py index 8d3b3d4a87bb6718fb12fdcbbdabac8c3d481dde..776bd6719c120d6e896cf07066eb5f43e73bb0b9 100644 --- a/qt/python/mantidqt/plotting/markers.py +++ b/qt/python/mantidqt/plotting/markers.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from qtpy.QtCore import Qt, QObject, Signal from qtpy.QtGui import QCursor diff --git a/qt/python/mantidqt/plotting/test/__init__.py b/qt/python/mantidqt/plotting/test/__init__.py index fa481f76cef7127fd81c5757e6dec34d652833dc..2e70f99c5c101829a88a6a08d6f27eba88eb90bf 100644 --- a/qt/python/mantidqt/plotting/test/__init__.py +++ b/qt/python/mantidqt/plotting/test/__init__.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package # diff --git a/qt/python/mantidqt/plotting/test/test_figuretype.py b/qt/python/mantidqt/plotting/test/test_figuretype.py index 07735e3f835bad20154a76152df55ac9e9a528c5..93241038dbe1299b77e5c221e37a5d3e146fb48b 100644 --- a/qt/python/mantidqt/plotting/test/test_figuretype.py +++ b/qt/python/mantidqt/plotting/test/test_figuretype.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/python/mantidqt/plotting/test/test_functions.py b/qt/python/mantidqt/plotting/test/test_functions.py index b522eaee5b75cf0511e51fa931932410582e022b..1d88e593e042e8da65c1e8e70974dececc9cba3f 100644 --- a/qt/python/mantidqt/plotting/test/test_functions.py +++ b/qt/python/mantidqt/plotting/test/test_functions.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # @@ -23,6 +23,7 @@ import numpy as np # register mantid projection import mantid.plots # noqa from mantid.api import AnalysisDataService, WorkspaceFactory +from mantid.simpleapi import CreateWorkspace from mantid.kernel import config from mantid.plots import MantidAxes from mantid.py3compat import mock @@ -151,6 +152,11 @@ class FunctionsTest(TestCase): pcolormesh_from_names([ws_name]) self.assertEqual(1, pcolormesh_mock.call_count) + def test_scale_is_correct_on_pcolourmesh_of_ragged_workspace(self): + ws = CreateWorkspace(DataX=[1, 2, 3, 4, 2, 4, 6, 8], DataY=[2] * 8, NSpec=2) + fig = pcolormesh_from_names([ws]) + self.assertEqual((1.8, 2.2), fig.axes[0].images[0].get_clim()) + def test_pcolormesh_from_names(self): ws_name = 'test_pcolormesh_from_names-1' AnalysisDataService.Instance().addOrReplace(ws_name, self._test_ws) diff --git a/qt/python/mantidqt/plotting/test/test_tiledplots.py b/qt/python/mantidqt/plotting/test/test_tiledplots.py index 03572a7426f1caff2924fbaedece65a5fd7e6c9c..cd2c6e2856ac42311175642ec02a35f0ac52d725 100644 --- a/qt/python/mantidqt/plotting/test/test_tiledplots.py +++ b/qt/python/mantidqt/plotting/test/test_tiledplots.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/python/mantidqt/project/__init__.py b/qt/python/mantidqt/project/__init__.py index 044ed3c205730d7114d5b66b2a4a733d211106c0..3759d58101e6ac25fddaf6b87636d9d571eced9c 100644 --- a/qt/python/mantidqt/project/__init__.py +++ b/qt/python/mantidqt/project/__init__.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package # diff --git a/qt/python/mantidqt/project/basedecoder.py b/qt/python/mantidqt/project/basedecoder.py index 6c117c73e3fa77fb3efa3ddc2081758ff96bf0e3..e5da77ba147f28305cfeb78db9bc4e88b44f1324 100644 --- a/qt/python/mantidqt/project/basedecoder.py +++ b/qt/python/mantidqt/project/basedecoder.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package # diff --git a/qt/python/mantidqt/project/baseencoder.py b/qt/python/mantidqt/project/baseencoder.py index f74e5f9a0299252cf85e5144209c04ee6773051e..ba1426a0d598137ad67e006d68a73df6602bf4c3 100644 --- a/qt/python/mantidqt/project/baseencoder.py +++ b/qt/python/mantidqt/project/baseencoder.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package # diff --git a/qt/python/mantidqt/project/decoderfactory.py b/qt/python/mantidqt/project/decoderfactory.py index e3f22ca06bb0ea763c6b2392462ce2bd0f0d6ac9..d1d80f5df93c9a545f44c0631d77a679c0e446d1 100644 --- a/qt/python/mantidqt/project/decoderfactory.py +++ b/qt/python/mantidqt/project/decoderfactory.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package # diff --git a/qt/python/mantidqt/project/encoderfactory.py b/qt/python/mantidqt/project/encoderfactory.py index a0c3fe8ba16da5ed4073ad97407be11d1c88aa9d..1cb5b0426a88af36956397670a77684f1e0483ee 100644 --- a/qt/python/mantidqt/project/encoderfactory.py +++ b/qt/python/mantidqt/project/encoderfactory.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package # diff --git a/qt/python/mantidqt/project/plotsloader.py b/qt/python/mantidqt/project/plotsloader.py index 8ce495d0e2c740b956ad3c7d54204185e028a22f..4b94e6fb50e0f0e9cedaf0c84081ee18d8d44f1c 100644 --- a/qt/python/mantidqt/project/plotsloader.py +++ b/qt/python/mantidqt/project/plotsloader.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package # diff --git a/qt/python/mantidqt/project/plotssaver.py b/qt/python/mantidqt/project/plotssaver.py index 2622abeac9ea197d8b944400e44533dcd4b73cd4..35c8f515006805ffbb855b5e4d16c69c2db5673e 100644 --- a/qt/python/mantidqt/project/plotssaver.py +++ b/qt/python/mantidqt/project/plotssaver.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package # diff --git a/qt/python/mantidqt/project/project.py b/qt/python/mantidqt/project/project.py index ab2b2e0056c42be32b5fe06b0c26fe0cdac12561..ad6479ca6781a072e13bcfeded9cc08537e8ef5c 100644 --- a/qt/python/mantidqt/project/project.py +++ b/qt/python/mantidqt/project/project.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package # diff --git a/qt/python/mantidqt/project/projectloader.py b/qt/python/mantidqt/project/projectloader.py index 1e552906a5596527731f132b87d9c828a6813eb3..ddbeb37fdf1a788427764a9a8d2c4b513811d8a1 100644 --- a/qt/python/mantidqt/project/projectloader.py +++ b/qt/python/mantidqt/project/projectloader.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package # diff --git a/qt/python/mantidqt/project/projectsaver.py b/qt/python/mantidqt/project/projectsaver.py index fbb7d5182ab5226d2445a29b691af8a77ed5ddb2..1e776b4d9e3d28315cdf8dfcefc6c78a139e9eea 100644 --- a/qt/python/mantidqt/project/projectsaver.py +++ b/qt/python/mantidqt/project/projectsaver.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package # diff --git a/qt/python/mantidqt/project/test/__init__.py b/qt/python/mantidqt/project/test/__init__.py index 044ed3c205730d7114d5b66b2a4a733d211106c0..3759d58101e6ac25fddaf6b87636d9d571eced9c 100644 --- a/qt/python/mantidqt/project/test/__init__.py +++ b/qt/python/mantidqt/project/test/__init__.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package # diff --git a/qt/python/mantidqt/project/test/test_decoderfactory.py b/qt/python/mantidqt/project/test/test_decoderfactory.py index a34b12576ae0b8486fe0fdf27bbddb4126e84e99..6310b24af6cfd1106dc1eb11cb80017afca3909c 100644 --- a/qt/python/mantidqt/project/test/test_decoderfactory.py +++ b/qt/python/mantidqt/project/test/test_decoderfactory.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package # diff --git a/qt/python/mantidqt/project/test/test_encoderfactory.py b/qt/python/mantidqt/project/test/test_encoderfactory.py index 88b5f375aad864592209a5a3e90a977bc307d04c..86b4503dc51bf676284d876025820bb0f9885836 100644 --- a/qt/python/mantidqt/project/test/test_encoderfactory.py +++ b/qt/python/mantidqt/project/test/test_encoderfactory.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package # diff --git a/qt/python/mantidqt/project/test/test_plotsloader.py b/qt/python/mantidqt/project/test/test_plotsloader.py index d6dfba8c7bcf1ec434795d05aba0f4d61c5ce730..68ed084547a8ec332deb12bfbe48a70fe386cf8d 100644 --- a/qt/python/mantidqt/project/test/test_plotsloader.py +++ b/qt/python/mantidqt/project/test/test_plotsloader.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package # diff --git a/qt/python/mantidqt/project/test/test_plotssaver.py b/qt/python/mantidqt/project/test/test_plotssaver.py index 5c6672e6ee0894ead41ab068e5b187425c25ac4b..36c1bbe11a39ebb19b8fe755c213e8c02032bbe2 100644 --- a/qt/python/mantidqt/project/test/test_plotssaver.py +++ b/qt/python/mantidqt/project/test/test_plotssaver.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package # diff --git a/qt/python/mantidqt/project/test/test_project.py b/qt/python/mantidqt/project/test/test_project.py index 61a6cc60e7b8ec412b4678b49870b85f126f57d8..fc1f3a383b6d65f18283aec522253be542127345 100644 --- a/qt/python/mantidqt/project/test/test_project.py +++ b/qt/python/mantidqt/project/test/test_project.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package # diff --git a/qt/python/mantidqt/project/test/test_projectloader.py b/qt/python/mantidqt/project/test/test_projectloader.py index 7cd075c92636ac3a1d115befce8a1aefe0bf8acc..1870ad4ede0da0f788a6442a48dd0196c52bd8ac 100644 --- a/qt/python/mantidqt/project/test/test_projectloader.py +++ b/qt/python/mantidqt/project/test/test_projectloader.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package # diff --git a/qt/python/mantidqt/project/test/test_projectsaver.py b/qt/python/mantidqt/project/test/test_projectsaver.py index 1566c8bf13f3193c8da228e08188cf64cf6e73f5..40e7725c5bb4d4d72323dd9a72c8fe373b7561cf 100644 --- a/qt/python/mantidqt/project/test/test_projectsaver.py +++ b/qt/python/mantidqt/project/test/test_projectsaver.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package # diff --git a/qt/python/mantidqt/project/test/test_workspaceloader.py b/qt/python/mantidqt/project/test/test_workspaceloader.py index 63ac0eee371c2baeac08654a321b33a59d0ca599..6906360eb5dfcc808a95c3441edb5bab2d6ebc3f 100644 --- a/qt/python/mantidqt/project/test/test_workspaceloader.py +++ b/qt/python/mantidqt/project/test/test_workspaceloader.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package # diff --git a/qt/python/mantidqt/project/test/test_workspacesaver.py b/qt/python/mantidqt/project/test/test_workspacesaver.py index 472c6e4014b9302b422732a4a0d74091606e8107..bc4fde63330aa2d21cdcd32864df35f5058a66dc 100644 --- a/qt/python/mantidqt/project/test/test_workspacesaver.py +++ b/qt/python/mantidqt/project/test/test_workspacesaver.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package # diff --git a/qt/python/mantidqt/project/workspaceloader.py b/qt/python/mantidqt/project/workspaceloader.py index b3aeef043f15e122b5b0033a69c81347a6f95abf..4a4fe5ef9aa50ae9bd9e7fee33990dec1300a160 100644 --- a/qt/python/mantidqt/project/workspaceloader.py +++ b/qt/python/mantidqt/project/workspaceloader.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package # diff --git a/qt/python/mantidqt/project/workspacesaver.py b/qt/python/mantidqt/project/workspacesaver.py index 863bce86a143d04a86f3be1a1ec6db79a9d9d752..c8acb87604ce1ba5eeec05ee0bcccc253302e04c 100644 --- a/qt/python/mantidqt/project/workspacesaver.py +++ b/qt/python/mantidqt/project/workspacesaver.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package # diff --git a/qt/python/mantidqt/test/__init__.py b/qt/python/mantidqt/test/__init__.py index d2cfb75232dfb59fac674e2b49dba356e18ebbc1..ffedf5d542e31f4d22d7833e9c94f5003f02b3cb 100644 --- a/qt/python/mantidqt/test/__init__.py +++ b/qt/python/mantidqt/test/__init__.py @@ -1,6 +1,6 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + diff --git a/qt/python/mantidqt/test/test_algorithm_observer.py b/qt/python/mantidqt/test/test_algorithm_observer.py index c26b0ee83ad82c46a997bb7f9b820d76d145aef1..6d3af4559e8ce450ac5589c7858f6ee21f4127e8 100644 --- a/qt/python/mantidqt/test/test_algorithm_observer.py +++ b/qt/python/mantidqt/test/test_algorithm_observer.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import absolute_import, print_function import unittest diff --git a/qt/python/mantidqt/test/test_import.py b/qt/python/mantidqt/test/test_import.py index 6154c50eea3d24749833dfafa908a6578265d488..ff8010718597309270a4cf8f04af4a3d766191e8 100644 --- a/qt/python/mantidqt/test/test_import.py +++ b/qt/python/mantidqt/test/test_import.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function, unicode_literals) diff --git a/qt/python/mantidqt/usersubwindow.py b/qt/python/mantidqt/usersubwindow.py index c9536d03d0d3921af5e136b0ec821be4d09e0be7..5b9ebbc53306bccde428f6a36d28d882e2fa72ef 100644 --- a/qt/python/mantidqt/usersubwindow.py +++ b/qt/python/mantidqt/usersubwindow.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package # diff --git a/qt/python/mantidqt/usersubwindowfactory.py b/qt/python/mantidqt/usersubwindowfactory.py index ae6ac54b8fa271573295379933bfc1dc5d843f3c..a945d40c4c60ff7656c068330ec7e3fc4ba3f100 100644 --- a/qt/python/mantidqt/usersubwindowfactory.py +++ b/qt/python/mantidqt/usersubwindowfactory.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package # diff --git a/qt/python/mantidqt/utils/__init__.py b/qt/python/mantidqt/utils/__init__.py index f7766d43d379baf90e9f09dc5670e660123dbe89..c7aa4cd3d0d241de00a23f36a517d3375e6a242b 100644 --- a/qt/python/mantidqt/utils/__init__.py +++ b/qt/python/mantidqt/utils/__init__.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package diff --git a/qt/python/mantidqt/utils/asynchronous.py b/qt/python/mantidqt/utils/asynchronous.py index 44b87f2f5d097fa8fd46b51a72c341c1be51a165..de0c478de3d41a9383e742f020f3491151c48c8a 100644 --- a/qt/python/mantidqt/utils/asynchronous.py +++ b/qt/python/mantidqt/utils/asynchronous.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/python/mantidqt/utils/observer_pattern.py b/qt/python/mantidqt/utils/observer_pattern.py index fcefb18d9e64ef3dba919c2940d2a231a6ba7b88..cf931b255e950eaae9db01964d989caa3f5cae52 100644 --- a/qt/python/mantidqt/utils/observer_pattern.py +++ b/qt/python/mantidqt/utils/observer_pattern.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) from mantidqt.utils.qt.qappthreadcall import QAppThreadCall diff --git a/qt/python/mantidqt/utils/qt/__init__.py b/qt/python/mantidqt/utils/qt/__init__.py index 8a03ab22689c4ec8b2dc704975b72ccb12306afa..1d6d36c2707b5c7a1d30b4ce244babca2aa7bef2 100644 --- a/qt/python/mantidqt/utils/qt/__init__.py +++ b/qt/python/mantidqt/utils/qt/__init__.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/python/mantidqt/utils/qt/qappthreadcall.py b/qt/python/mantidqt/utils/qt/qappthreadcall.py index c70d9de82564f1652fd73d35cb15d1287ffc0538..ffa370049b20a8edc60ea5a3a2e860ba456f8798 100644 --- a/qt/python/mantidqt/utils/qt/qappthreadcall.py +++ b/qt/python/mantidqt/utils/qt/qappthreadcall.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/python/mantidqt/utils/qt/testing/__init__.py b/qt/python/mantidqt/utils/qt/testing/__init__.py index 0db313fb219c6bfa91f510c968140462ef1e8526..7ff5da2bc57b4da3a9b97e0c05a4d57485484d17 100644 --- a/qt/python/mantidqt/utils/qt/testing/__init__.py +++ b/qt/python/mantidqt/utils/qt/testing/__init__.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/python/mantidqt/utils/qt/testing/application.py b/qt/python/mantidqt/utils/qt/testing/application.py index 527e471406907122309b733fb5deb2295ed40609..4efe6d044af339198632eccd96b34ca662bd0bac 100644 --- a/qt/python/mantidqt/utils/qt/testing/application.py +++ b/qt/python/mantidqt/utils/qt/testing/application.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. from __future__ import absolute_import diff --git a/qt/python/mantidqt/utils/qt/testing/gui_test_runner.py b/qt/python/mantidqt/utils/qt/testing/gui_test_runner.py index 9dc83ca2804fc6cfa6d7c03e0fdd25b7e310401a..c6cf9329528a29a530605d9232f79a18fd2ea3b1 100644 --- a/qt/python/mantidqt/utils/qt/testing/gui_test_runner.py +++ b/qt/python/mantidqt/utils/qt/testing/gui_test_runner.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/python/mantidqt/utils/qt/testing/gui_window_test.py b/qt/python/mantidqt/utils/qt/testing/gui_window_test.py index 8ba2d36bdd292ff54d933dfad57cbfd56be2deb4..c8afa8a21be31d4b5ee1e70d137b5d80aab8923a 100644 --- a/qt/python/mantidqt/utils/qt/testing/gui_window_test.py +++ b/qt/python/mantidqt/utils/qt/testing/gui_window_test.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/python/mantidqt/utils/qt/testing/modal_tester.py b/qt/python/mantidqt/utils/qt/testing/modal_tester.py index ba6412453b9cb947fa244814789bb6f72bbc7963..95e92319daac3b7756fb6de6bc9ec6d597bd1ebf 100644 --- a/qt/python/mantidqt/utils/qt/testing/modal_tester.py +++ b/qt/python/mantidqt/utils/qt/testing/modal_tester.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/python/mantidqt/utils/qt/testing/qt_assertions_helper.py b/qt/python/mantidqt/utils/qt/testing/qt_assertions_helper.py index 6ce299a48a1b2e6542cba76a080530d6853c1137..bc5a648f3c2883ff7f75285b743a9f6b4e309920 100644 --- a/qt/python/mantidqt/utils/qt/testing/qt_assertions_helper.py +++ b/qt/python/mantidqt/utils/qt/testing/qt_assertions_helper.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package from __future__ import absolute_import diff --git a/qt/python/mantidqt/utils/qt/testing/qt_widget_finder.py b/qt/python/mantidqt/utils/qt/testing/qt_widget_finder.py index dac5f8763ad55ee0537c2ff4ec591aea8ff289c9..fb35c8c73a3a39e76c204ad00b1d12e075edb0d4 100644 --- a/qt/python/mantidqt/utils/qt/testing/qt_widget_finder.py +++ b/qt/python/mantidqt/utils/qt/testing/qt_widget_finder.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. from qtpy.QtWidgets import QApplication diff --git a/qt/python/mantidqt/utils/qt/testing/run_test_app.py b/qt/python/mantidqt/utils/qt/testing/run_test_app.py index b42f3f2e5d1af509c16c660cc0705ee807011fb2..73f72cdb253ae5f56f534b678bed55a05ea15630 100644 --- a/qt/python/mantidqt/utils/qt/testing/run_test_app.py +++ b/qt/python/mantidqt/utils/qt/testing/run_test_app.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/python/mantidqt/utils/show_in_explorer.py b/qt/python/mantidqt/utils/show_in_explorer.py index 792f1fb278e55975a0560b8dc07f55b3c193c558..0892016c1f9eaf2ad305658de15f6fad521dd0c8 100644 --- a/qt/python/mantidqt/utils/show_in_explorer.py +++ b/qt/python/mantidqt/utils/show_in_explorer.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package from __future__ import absolute_import diff --git a/qt/python/mantidqt/utils/test/__init__.py b/qt/python/mantidqt/utils/test/__init__.py index d2cfb75232dfb59fac674e2b49dba356e18ebbc1..ffedf5d542e31f4d22d7833e9c94f5003f02b3cb 100644 --- a/qt/python/mantidqt/utils/test/__init__.py +++ b/qt/python/mantidqt/utils/test/__init__.py @@ -1,6 +1,6 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + diff --git a/qt/python/mantidqt/utils/test/test_async.py b/qt/python/mantidqt/utils/test/test_async.py index 92510292cee24d7426af1057d5759be3e7e8e923..4bfdc7eeefbd768b7d136241270cca837fbc98b7 100644 --- a/qt/python/mantidqt/utils/test/test_async.py +++ b/qt/python/mantidqt/utils/test/test_async.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/python/mantidqt/utils/test/test_modal_tester.py b/qt/python/mantidqt/utils/test/test_modal_tester.py index 8136096c03e26685b25a4e352fad4fae9e830941..254ad2149ba4f3acf67caa869d1d26e77a0b255f 100644 --- a/qt/python/mantidqt/utils/test/test_modal_tester.py +++ b/qt/python/mantidqt/utils/test/test_modal_tester.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/python/mantidqt/utils/test/test_qt_utils.py b/qt/python/mantidqt/utils/test/test_qt_utils.py index 1a139db1257fc466f0f1fd05baf296d206fe3f8c..298acefbcd982991fe67aff8f449539e47dc158b 100644 --- a/qt/python/mantidqt/utils/test/test_qt_utils.py +++ b/qt/python/mantidqt/utils/test/test_qt_utils.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/python/mantidqt/utils/test/test_writetosignal.py b/qt/python/mantidqt/utils/test/test_writetosignal.py index 0e66c58e47c6f521e4e93aadc4f5f1e6058c1dd9..5dc8c4c5e45fd208a59c2e878dd350bef03e78c7 100644 --- a/qt/python/mantidqt/utils/test/test_writetosignal.py +++ b/qt/python/mantidqt/utils/test/test_writetosignal.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/python/mantidqt/utils/testing/__init__.py b/qt/python/mantidqt/utils/testing/__init__.py index 5e2179b9ff4427ff4dc65bff4aeb92c54ef227d8..0fb72b0143feabc37340826351939db3450f273e 100644 --- a/qt/python/mantidqt/utils/testing/__init__.py +++ b/qt/python/mantidqt/utils/testing/__init__.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package from __future__ import absolute_import diff --git a/qt/python/mantidqt/utils/testing/mocks/__init__.py b/qt/python/mantidqt/utils/testing/mocks/__init__.py index 2542dc4ea67a9fb17d7f18f017e39f900655e23d..b4bf0064ff36baea47116c7d1090b9da96e3ebdd 100644 --- a/qt/python/mantidqt/utils/testing/mocks/__init__.py +++ b/qt/python/mantidqt/utils/testing/mocks/__init__.py @@ -1,7 +1,7 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. diff --git a/qt/python/mantidqt/utils/testing/mocks/mock_codeeditor.py b/qt/python/mantidqt/utils/testing/mocks/mock_codeeditor.py index 582f097e6143f67443c99b80f6d778a6338024d3..a41c9ea53b9db4caa344fa3b78c60bd085a1e6c5 100644 --- a/qt/python/mantidqt/utils/testing/mocks/mock_codeeditor.py +++ b/qt/python/mantidqt/utils/testing/mocks/mock_codeeditor.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package from __future__ import absolute_import diff --git a/qt/python/mantidqt/utils/testing/mocks/mock_mantid.py b/qt/python/mantidqt/utils/testing/mocks/mock_mantid.py index fdcae4e1a236dd12ba0411e27ae3167072807ca7..82ee2727536d34e1b24a121c1fda975d6fd3173c 100644 --- a/qt/python/mantidqt/utils/testing/mocks/mock_mantid.py +++ b/qt/python/mantidqt/utils/testing/mocks/mock_mantid.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. from __future__ import (absolute_import, division, print_function) diff --git a/qt/python/mantidqt/utils/testing/mocks/mock_matrixworkspacedisplay.py b/qt/python/mantidqt/utils/testing/mocks/mock_matrixworkspacedisplay.py index 009e3c97fd5dc0435cdedf5158a3a75ec42018f2..4e3d4cbf9099b43e7c8026a07e33966884de487e 100644 --- a/qt/python/mantidqt/utils/testing/mocks/mock_matrixworkspacedisplay.py +++ b/qt/python/mantidqt/utils/testing/mocks/mock_matrixworkspacedisplay.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. from __future__ import (absolute_import, division, print_function) diff --git a/qt/python/mantidqt/utils/testing/mocks/mock_observing.py b/qt/python/mantidqt/utils/testing/mocks/mock_observing.py index b57347586ba2f3460c586d057615b624b1f9d1e7..a13b81f74e0b39e1a9b3f6b4804bc71874337522 100644 --- a/qt/python/mantidqt/utils/testing/mocks/mock_observing.py +++ b/qt/python/mantidqt/utils/testing/mocks/mock_observing.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. from __future__ import (absolute_import, division, print_function) diff --git a/qt/python/mantidqt/utils/testing/mocks/mock_plotlib.py b/qt/python/mantidqt/utils/testing/mocks/mock_plotlib.py index 1df753bd162446a38521829c85e2bd394640dd07..e690d97a03f9f25529bff250e606a5674d8a2896 100644 --- a/qt/python/mantidqt/utils/testing/mocks/mock_plotlib.py +++ b/qt/python/mantidqt/utils/testing/mocks/mock_plotlib.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. diff --git a/qt/python/mantidqt/utils/testing/mocks/mock_qt.py b/qt/python/mantidqt/utils/testing/mocks/mock_qt.py index a6ccb55cac0f04a95645ef63b1ca6d479e65f2d8..c6bb3b7192b5026994a5e75e8be09083595d57d8 100644 --- a/qt/python/mantidqt/utils/testing/mocks/mock_qt.py +++ b/qt/python/mantidqt/utils/testing/mocks/mock_qt.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. from __future__ import (absolute_import, division, print_function) diff --git a/qt/python/mantidqt/utils/testing/strict_mock.py b/qt/python/mantidqt/utils/testing/strict_mock.py index 67b94415b0cd940b3907717f399d4f9270b983c2..bcedfc3f1a5fee38297041947823285459a0f3b4 100644 --- a/qt/python/mantidqt/utils/testing/strict_mock.py +++ b/qt/python/mantidqt/utils/testing/strict_mock.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package from __future__ import absolute_import diff --git a/qt/python/mantidqt/utils/writetosignal.py b/qt/python/mantidqt/utils/writetosignal.py index 2a85db8201fb07bd2bd4e6c77d870ea4144eb510..0e20fd6204583c51d35f35d4f3a4931e48ba4172 100644 --- a/qt/python/mantidqt/utils/writetosignal.py +++ b/qt/python/mantidqt/utils/writetosignal.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/python/mantidqt/widgets/__init__.py b/qt/python/mantidqt/widgets/__init__.py index 0ed1114a078f17470b47f1996a8292f66e2a2401..d8dbec30ee3bdc6656073f3ae761ee9dbf57d412 100644 --- a/qt/python/mantidqt/widgets/__init__.py +++ b/qt/python/mantidqt/widgets/__init__.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package # diff --git a/qt/python/mantidqt/widgets/algorithmprogress/__init__.py b/qt/python/mantidqt/widgets/algorithmprogress/__init__.py index f1ed8061f57683f229bcc7b340b6799aaf60633c..c37d7f89f159f469eebddd8f62d9833dcd4bc7bc 100644 --- a/qt/python/mantidqt/widgets/algorithmprogress/__init__.py +++ b/qt/python/mantidqt/widgets/algorithmprogress/__init__.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package # diff --git a/qt/python/mantidqt/widgets/algorithmselector/__init__.py b/qt/python/mantidqt/widgets/algorithmselector/__init__.py index c7eb3f24360af8d337b33f844caaa5b2322152a0..d05c0fe3d2d11888f98233584e18ad6f6f1392ec 100644 --- a/qt/python/mantidqt/widgets/algorithmselector/__init__.py +++ b/qt/python/mantidqt/widgets/algorithmselector/__init__.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package # diff --git a/qt/python/mantidqt/widgets/algorithmselector/algorithm_factory_observer.py b/qt/python/mantidqt/widgets/algorithmselector/algorithm_factory_observer.py index c7c35fa94f4506a531a211c93b30ff132c7d267f..53dc193903da353c6f4fef36b3120c3ab86d77cd 100644 --- a/qt/python/mantidqt/widgets/algorithmselector/algorithm_factory_observer.py +++ b/qt/python/mantidqt/widgets/algorithmselector/algorithm_factory_observer.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. diff --git a/qt/python/mantidqt/widgets/algorithmselector/model.py b/qt/python/mantidqt/widgets/algorithmselector/model.py index 08e2cdd23b3b23206b1a438e53dd327af4d4ecd7..d1c1b61ed30484b0869fc778556d42ee4c2cad81 100644 --- a/qt/python/mantidqt/widgets/algorithmselector/model.py +++ b/qt/python/mantidqt/widgets/algorithmselector/model.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import absolute_import, print_function diff --git a/qt/python/mantidqt/widgets/algorithmselector/presenter.py b/qt/python/mantidqt/widgets/algorithmselector/presenter.py index 96ab53fb30233ad389c1ab985afeb3036e6a7f5c..a7625aea0781f2d2c2db75538a0a53d8558af21f 100644 --- a/qt/python/mantidqt/widgets/algorithmselector/presenter.py +++ b/qt/python/mantidqt/widgets/algorithmselector/presenter.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import absolute_import, print_function diff --git a/qt/python/mantidqt/widgets/algorithmselector/test/__init__.py b/qt/python/mantidqt/widgets/algorithmselector/test/__init__.py index d2cfb75232dfb59fac674e2b49dba356e18ebbc1..ffedf5d542e31f4d22d7833e9c94f5003f02b3cb 100644 --- a/qt/python/mantidqt/widgets/algorithmselector/test/__init__.py +++ b/qt/python/mantidqt/widgets/algorithmselector/test/__init__.py @@ -1,6 +1,6 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + diff --git a/qt/python/mantidqt/widgets/algorithmselector/test/observer_test.py b/qt/python/mantidqt/widgets/algorithmselector/test/observer_test.py index 11178ed8dc66c2705504d666838e0cbd49006433..20d7ed548cd10d394a05ccb7fb9decb519ad757e 100644 --- a/qt/python/mantidqt/widgets/algorithmselector/test/observer_test.py +++ b/qt/python/mantidqt/widgets/algorithmselector/test/observer_test.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/python/mantidqt/widgets/algorithmselector/test/test_algorithmselector.py b/qt/python/mantidqt/widgets/algorithmselector/test/test_algorithmselector.py index 25c34998320bf151e7d73b346005afbdf327e69d..a9f0d1dca63769c9470c0b557f5074ae8a61d752 100644 --- a/qt/python/mantidqt/widgets/algorithmselector/test/test_algorithmselector.py +++ b/qt/python/mantidqt/widgets/algorithmselector/test/test_algorithmselector.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/python/mantidqt/widgets/algorithmselector/widget.py b/qt/python/mantidqt/widgets/algorithmselector/widget.py index cbac577aabb96afd6827c4335aa29ab544e865d3..f09a4be91d438d71d60d50756ba79b46b9e1d293 100644 --- a/qt/python/mantidqt/widgets/algorithmselector/widget.py +++ b/qt/python/mantidqt/widgets/algorithmselector/widget.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import absolute_import, print_function diff --git a/qt/python/mantidqt/widgets/codeeditor/__init__.py b/qt/python/mantidqt/widgets/codeeditor/__init__.py index d2cfb75232dfb59fac674e2b49dba356e18ebbc1..ffedf5d542e31f4d22d7833e9c94f5003f02b3cb 100644 --- a/qt/python/mantidqt/widgets/codeeditor/__init__.py +++ b/qt/python/mantidqt/widgets/codeeditor/__init__.py @@ -1,6 +1,6 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + diff --git a/qt/python/mantidqt/widgets/codeeditor/codecommenter.py b/qt/python/mantidqt/widgets/codeeditor/codecommenter.py index ab78fbcbee8be7c0a5bdca4317412fadba4f0bfb..4478c1bd135420ec34487298f94679830b93eb8a 100644 --- a/qt/python/mantidqt/widgets/codeeditor/codecommenter.py +++ b/qt/python/mantidqt/widgets/codeeditor/codecommenter.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package diff --git a/qt/python/mantidqt/widgets/codeeditor/completion.py b/qt/python/mantidqt/widgets/codeeditor/completion.py index fc6ee2b1cd3a65576521a12d736ff0f9bc2fdd94..5635af79038604bb99d4af10b25b48d3fd579c20 100644 --- a/qt/python/mantidqt/widgets/codeeditor/completion.py +++ b/qt/python/mantidqt/widgets/codeeditor/completion.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. """ diff --git a/qt/python/mantidqt/widgets/codeeditor/editor.py b/qt/python/mantidqt/widgets/codeeditor/editor.py index 4e11c5da2b7b426b4d65667a9f7a859f3699b102..24e8139123b5ba5a14ecc291e80deedf0b15e3de 100644 --- a/qt/python/mantidqt/widgets/codeeditor/editor.py +++ b/qt/python/mantidqt/widgets/codeeditor/editor.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package # diff --git a/qt/python/mantidqt/widgets/codeeditor/errorformatter.py b/qt/python/mantidqt/widgets/codeeditor/errorformatter.py index 059cd7979bac8233998597cce0630f639d787e10..41e0dcf9a694679204272fabe57a7cdfc263fd5b 100644 --- a/qt/python/mantidqt/widgets/codeeditor/errorformatter.py +++ b/qt/python/mantidqt/widgets/codeeditor/errorformatter.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package # diff --git a/qt/python/mantidqt/widgets/codeeditor/execution.py b/qt/python/mantidqt/widgets/codeeditor/execution.py index f2b19450d7970a472f9c93988de83d2986f0f1a0..c78a7ce1fed8e53e85cd00da675be969544fda84 100644 --- a/qt/python/mantidqt/widgets/codeeditor/execution.py +++ b/qt/python/mantidqt/widgets/codeeditor/execution.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package # diff --git a/qt/python/mantidqt/widgets/codeeditor/interpreter.py b/qt/python/mantidqt/widgets/codeeditor/interpreter.py index c30e964b9cc58ccf5b7bf636c5aa485a0a7a091e..862db7ebf7ecfe30f27596948ab520252873a2f1 100644 --- a/qt/python/mantidqt/widgets/codeeditor/interpreter.py +++ b/qt/python/mantidqt/widgets/codeeditor/interpreter.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package from __future__ import (absolute_import, unicode_literals) diff --git a/qt/python/mantidqt/widgets/codeeditor/multifileinterpreter.py b/qt/python/mantidqt/widgets/codeeditor/multifileinterpreter.py index 3ff6301fbce29b147459bb2bc9ffeb6d1f618311..3def7f5f9db1b9594cad38d07b5942a111b6530e 100644 --- a/qt/python/mantidqt/widgets/codeeditor/multifileinterpreter.py +++ b/qt/python/mantidqt/widgets/codeeditor/multifileinterpreter.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package # diff --git a/qt/python/mantidqt/widgets/codeeditor/scriptcompatibility.py b/qt/python/mantidqt/widgets/codeeditor/scriptcompatibility.py index 9e1854d54c2178cb0b7b96422b93aa02da1579f9..7a6d2a99e2b342af2da90ac00cba3884a6941d0a 100644 --- a/qt/python/mantidqt/widgets/codeeditor/scriptcompatibility.py +++ b/qt/python/mantidqt/widgets/codeeditor/scriptcompatibility.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/python/mantidqt/widgets/codeeditor/tab_widget/__init__.py b/qt/python/mantidqt/widgets/codeeditor/tab_widget/__init__.py index 5e2179b9ff4427ff4dc65bff4aeb92c54ef227d8..0fb72b0143feabc37340826351939db3450f273e 100644 --- a/qt/python/mantidqt/widgets/codeeditor/tab_widget/__init__.py +++ b/qt/python/mantidqt/widgets/codeeditor/tab_widget/__init__.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package from __future__ import absolute_import diff --git a/qt/python/mantidqt/widgets/codeeditor/tab_widget/codeeditor_tab_presenter.py b/qt/python/mantidqt/widgets/codeeditor/tab_widget/codeeditor_tab_presenter.py index e10f928f084d4ff3f93749a153ce6d684212e611..1fe3d36987c3e0276570af1cbc2b46706a914b4a 100644 --- a/qt/python/mantidqt/widgets/codeeditor/tab_widget/codeeditor_tab_presenter.py +++ b/qt/python/mantidqt/widgets/codeeditor/tab_widget/codeeditor_tab_presenter.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package from __future__ import absolute_import diff --git a/qt/python/mantidqt/widgets/codeeditor/tab_widget/codeeditor_tab_view.py b/qt/python/mantidqt/widgets/codeeditor/tab_widget/codeeditor_tab_view.py index 4d384a220c04bc318b4b148ae042638e9aec91cc..d8fdca3e96a187e93554f299a9cea582a09df3fe 100644 --- a/qt/python/mantidqt/widgets/codeeditor/tab_widget/codeeditor_tab_view.py +++ b/qt/python/mantidqt/widgets/codeeditor/tab_widget/codeeditor_tab_view.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package from __future__ import absolute_import diff --git a/qt/python/mantidqt/widgets/codeeditor/tab_widget/test/__init__.py b/qt/python/mantidqt/widgets/codeeditor/tab_widget/test/__init__.py index 5e2179b9ff4427ff4dc65bff4aeb92c54ef227d8..0fb72b0143feabc37340826351939db3450f273e 100644 --- a/qt/python/mantidqt/widgets/codeeditor/tab_widget/test/__init__.py +++ b/qt/python/mantidqt/widgets/codeeditor/tab_widget/test/__init__.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package from __future__ import absolute_import diff --git a/qt/python/mantidqt/widgets/codeeditor/tab_widget/test/test_codeeditor_tab_presenter.py b/qt/python/mantidqt/widgets/codeeditor/tab_widget/test/test_codeeditor_tab_presenter.py index 826f6b4947a2c5fdd32ac07c124e550d21d15d18..58c499172691776038f305b9410de1a09b1e609c 100644 --- a/qt/python/mantidqt/widgets/codeeditor/tab_widget/test/test_codeeditor_tab_presenter.py +++ b/qt/python/mantidqt/widgets/codeeditor/tab_widget/test/test_codeeditor_tab_presenter.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package from __future__ import absolute_import diff --git a/qt/python/mantidqt/widgets/codeeditor/tab_widget/test/test_codeeditor_tab_view.py b/qt/python/mantidqt/widgets/codeeditor/tab_widget/test/test_codeeditor_tab_view.py index 03bc844a3cd00e3b999fb6e3222180faf759cb2d..09a382cd30deac37d6d437b1fb13b94876fb7d0b 100644 --- a/qt/python/mantidqt/widgets/codeeditor/tab_widget/test/test_codeeditor_tab_view.py +++ b/qt/python/mantidqt/widgets/codeeditor/tab_widget/test/test_codeeditor_tab_view.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package from __future__ import absolute_import diff --git a/qt/python/mantidqt/widgets/codeeditor/test/__init__.py b/qt/python/mantidqt/widgets/codeeditor/test/__init__.py index 0ed1114a078f17470b47f1996a8292f66e2a2401..d8dbec30ee3bdc6656073f3ae761ee9dbf57d412 100644 --- a/qt/python/mantidqt/widgets/codeeditor/test/__init__.py +++ b/qt/python/mantidqt/widgets/codeeditor/test/__init__.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package # diff --git a/qt/python/mantidqt/widgets/codeeditor/test/test_codecommenter.py b/qt/python/mantidqt/widgets/codeeditor/test/test_codecommenter.py index e6c73939afad813d07329f256ca47b89b0faefc9..560d03991945a9f36ae4d4c542d40a48393f1779 100644 --- a/qt/python/mantidqt/widgets/codeeditor/test/test_codecommenter.py +++ b/qt/python/mantidqt/widgets/codeeditor/test/test_codecommenter.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package diff --git a/qt/python/mantidqt/widgets/codeeditor/test/test_codeeditor.py b/qt/python/mantidqt/widgets/codeeditor/test/test_codeeditor.py index 33b410c0c96fe874a8a57ea3c869fba15f002ed6..d0a78c40f4ac9149487afbe6f6b643d794bb7946 100644 --- a/qt/python/mantidqt/widgets/codeeditor/test/test_codeeditor.py +++ b/qt/python/mantidqt/widgets/codeeditor/test/test_codeeditor.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/python/mantidqt/widgets/codeeditor/test/test_completion.py b/qt/python/mantidqt/widgets/codeeditor/test/test_completion.py index 12be12c24c5ea6281e0a9c53a5f8dfc93c1746ba..ef1effd4bc699d6b7bc0eb330c1e19a48514323f 100644 --- a/qt/python/mantidqt/widgets/codeeditor/test/test_completion.py +++ b/qt/python/mantidqt/widgets/codeeditor/test/test_completion.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. from __future__ import (absolute_import, unicode_literals) diff --git a/qt/python/mantidqt/widgets/codeeditor/test/test_errorformatter.py b/qt/python/mantidqt/widgets/codeeditor/test/test_errorformatter.py index d9a0b1dc0dbb691c54bc8675b4c1142fbcbd63a2..b4a5b3198b4970440f8428ed66667ea74c94cedd 100644 --- a/qt/python/mantidqt/widgets/codeeditor/test/test_errorformatter.py +++ b/qt/python/mantidqt/widgets/codeeditor/test/test_errorformatter.py @@ -1,10 +1,10 @@ -# -*- coding: utf-8 -*- -# Mantid Repository : https://github.com/mantidproject/mantid +# -*- coding: utf-8 -*-# Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + + # # This file is part of the mantidqt package from __future__ import (absolute_import, unicode_literals) diff --git a/qt/python/mantidqt/widgets/codeeditor/test/test_execution.py b/qt/python/mantidqt/widgets/codeeditor/test/test_execution.py index a4c1e6f3fbac9145c1c82765e78a9b343d8ab992..ac36b915c7368553af72efba26a90393113c1d22 100644 --- a/qt/python/mantidqt/widgets/codeeditor/test/test_execution.py +++ b/qt/python/mantidqt/widgets/codeeditor/test/test_execution.py @@ -1,10 +1,10 @@ -# encoding: utf-8 # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + +# encoding: utf-8 # This file is part of the mantidqt package # # diff --git a/qt/python/mantidqt/widgets/codeeditor/test/test_interpreter.py b/qt/python/mantidqt/widgets/codeeditor/test/test_interpreter.py index d5f630082b934c79c748571c535c684e22f480d2..4596e2cf32352a350824c3b2074eff689c51d147 100644 --- a/qt/python/mantidqt/widgets/codeeditor/test/test_interpreter.py +++ b/qt/python/mantidqt/widgets/codeeditor/test/test_interpreter.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/python/mantidqt/widgets/codeeditor/test/test_interpreter_view.py b/qt/python/mantidqt/widgets/codeeditor/test/test_interpreter_view.py index 44805be11f3a7b1d521d431bcf35813a2b779809..b4583e98c190933b4e3fbbae96033416eafb0de8 100644 --- a/qt/python/mantidqt/widgets/codeeditor/test/test_interpreter_view.py +++ b/qt/python/mantidqt/widgets/codeeditor/test/test_interpreter_view.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/python/mantidqt/widgets/codeeditor/test/test_multifileinterpreter.py b/qt/python/mantidqt/widgets/codeeditor/test/test_multifileinterpreter.py index 430dddd2ea0b2339c471a3afb087ead2f850f24e..0df872acaf64b3f0afe092d6a45e0f3d9a37d732 100644 --- a/qt/python/mantidqt/widgets/codeeditor/test/test_multifileinterpreter.py +++ b/qt/python/mantidqt/widgets/codeeditor/test/test_multifileinterpreter.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/python/mantidqt/widgets/codeeditor/test/test_multifileinterpreter_view.py b/qt/python/mantidqt/widgets/codeeditor/test/test_multifileinterpreter_view.py index 568fe8dae1330b321cf527ce4e751afa5c81f35f..4d33075dffb508e06d3f99ca88efcd27037c37a3 100644 --- a/qt/python/mantidqt/widgets/codeeditor/test/test_multifileinterpreter_view.py +++ b/qt/python/mantidqt/widgets/codeeditor/test/test_multifileinterpreter_view.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/python/mantidqt/widgets/codeeditor/test/test_scriptcompatibility.py b/qt/python/mantidqt/widgets/codeeditor/test/test_scriptcompatibility.py index b8a0aab8ea3d76ea44dadcb2517f7597d9ebe92f..3fa0ce52b3e741aeb4f0ab052e7b1a4b528032e1 100644 --- a/qt/python/mantidqt/widgets/codeeditor/test/test_scriptcompatibility.py +++ b/qt/python/mantidqt/widgets/codeeditor/test/test_scriptcompatibility.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/python/mantidqt/widgets/colorbar/__init__.py b/qt/python/mantidqt/widgets/colorbar/__init__.py index 1d6beeb60af03d5f011fc43d4e12d4bdfddaea04..7f6d07709932d32f63f1da6ba287248c526e0581 100644 --- a/qt/python/mantidqt/widgets/colorbar/__init__.py +++ b/qt/python/mantidqt/widgets/colorbar/__init__.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/python/mantidqt/widgets/colorbar/colorbar.py b/qt/python/mantidqt/widgets/colorbar/colorbar.py index 559e8994f6618588b962d710aeb2845126881c91..6c0e0c106116c623d955f0d34ce4f91b0371fb41 100644 --- a/qt/python/mantidqt/widgets/colorbar/colorbar.py +++ b/qt/python/mantidqt/widgets/colorbar/colorbar.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/python/mantidqt/widgets/embedded_find_replace_dialog/__init__.py b/qt/python/mantidqt/widgets/embedded_find_replace_dialog/__init__.py index 59f30ace67e16dace5bd8c9dd32fe72f4ec89af3..5d9ba75dbc79786691ecb615c855a0483050425b 100644 --- a/qt/python/mantidqt/widgets/embedded_find_replace_dialog/__init__.py +++ b/qt/python/mantidqt/widgets/embedded_find_replace_dialog/__init__.py @@ -1,7 +1,7 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package diff --git a/qt/python/mantidqt/widgets/embedded_find_replace_dialog/presenter.py b/qt/python/mantidqt/widgets/embedded_find_replace_dialog/presenter.py index 1c62cdafd877eec38221fba9e671a9c0fec376cd..eafb8e8d28e51ba79000e101bd1f947776bdaf27 100644 --- a/qt/python/mantidqt/widgets/embedded_find_replace_dialog/presenter.py +++ b/qt/python/mantidqt/widgets/embedded_find_replace_dialog/presenter.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package from __future__ import (absolute_import, division, print_function) diff --git a/qt/python/mantidqt/widgets/embedded_find_replace_dialog/test/__init__.py b/qt/python/mantidqt/widgets/embedded_find_replace_dialog/test/__init__.py index 59f30ace67e16dace5bd8c9dd32fe72f4ec89af3..5d9ba75dbc79786691ecb615c855a0483050425b 100644 --- a/qt/python/mantidqt/widgets/embedded_find_replace_dialog/test/__init__.py +++ b/qt/python/mantidqt/widgets/embedded_find_replace_dialog/test/__init__.py @@ -1,7 +1,7 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package diff --git a/qt/python/mantidqt/widgets/embedded_find_replace_dialog/test/test_embedded_find_replace_dialog_presenter.py b/qt/python/mantidqt/widgets/embedded_find_replace_dialog/test/test_embedded_find_replace_dialog_presenter.py index b8a52a70298da503266bde018465e544151d62a9..68cba2835421ea6962625495081787f4a0782a33 100644 --- a/qt/python/mantidqt/widgets/embedded_find_replace_dialog/test/test_embedded_find_replace_dialog_presenter.py +++ b/qt/python/mantidqt/widgets/embedded_find_replace_dialog/test/test_embedded_find_replace_dialog_presenter.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package from __future__ import (absolute_import, division, print_function) diff --git a/qt/python/mantidqt/widgets/embedded_find_replace_dialog/view.py b/qt/python/mantidqt/widgets/embedded_find_replace_dialog/view.py index 558f551d25edc78b6b355e82ea0a6ba531af045d..38768ed52387b9d3e6d7f160f04de29b72c935bc 100644 --- a/qt/python/mantidqt/widgets/embedded_find_replace_dialog/view.py +++ b/qt/python/mantidqt/widgets/embedded_find_replace_dialog/view.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package from qtpy.QtCore import Qt diff --git a/qt/python/mantidqt/widgets/filefinder/__init__.py b/qt/python/mantidqt/widgets/filefinder/__init__.py index bc3f44f5a19caf2bb8b65e734f4b425c88c26256..7384daca550ed27125b15d156c381e3903386c24 100644 --- a/qt/python/mantidqt/widgets/filefinder/__init__.py +++ b/qt/python/mantidqt/widgets/filefinder/__init__.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package # diff --git a/qt/python/mantidqt/widgets/fitpropertybrowser/__init__.py b/qt/python/mantidqt/widgets/fitpropertybrowser/__init__.py index 32713422455342154304ca21acdec7501b3249b1..40c96281a38f251119ec66f42a050f54f5978a27 100644 --- a/qt/python/mantidqt/widgets/fitpropertybrowser/__init__.py +++ b/qt/python/mantidqt/widgets/fitpropertybrowser/__init__.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package # diff --git a/qt/python/mantidqt/widgets/fitpropertybrowser/addfunctiondialog/__init__.py b/qt/python/mantidqt/widgets/fitpropertybrowser/addfunctiondialog/__init__.py index cdadea372702cb5d5c37052c46409724f35825c9..242632313cb5baa886fe0207b8d7c4bf45413a28 100644 --- a/qt/python/mantidqt/widgets/fitpropertybrowser/addfunctiondialog/__init__.py +++ b/qt/python/mantidqt/widgets/fitpropertybrowser/addfunctiondialog/__init__.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package # diff --git a/qt/python/mantidqt/widgets/fitpropertybrowser/addfunctiondialog/presenter.py b/qt/python/mantidqt/widgets/fitpropertybrowser/addfunctiondialog/presenter.py index 2feadcfd7d84e3722d7525492a18954d61d3b65f..6c47b0a931e42fef994cf20099bcd86945e69670 100644 --- a/qt/python/mantidqt/widgets/fitpropertybrowser/addfunctiondialog/presenter.py +++ b/qt/python/mantidqt/widgets/fitpropertybrowser/addfunctiondialog/presenter.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, unicode_literals) diff --git a/qt/python/mantidqt/widgets/fitpropertybrowser/addfunctiondialog/test/__init__.py b/qt/python/mantidqt/widgets/fitpropertybrowser/addfunctiondialog/test/__init__.py index cdadea372702cb5d5c37052c46409724f35825c9..242632313cb5baa886fe0207b8d7c4bf45413a28 100644 --- a/qt/python/mantidqt/widgets/fitpropertybrowser/addfunctiondialog/test/__init__.py +++ b/qt/python/mantidqt/widgets/fitpropertybrowser/addfunctiondialog/test/__init__.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package # diff --git a/qt/python/mantidqt/widgets/fitpropertybrowser/addfunctiondialog/test/test_addfunctiondialogpresenter.py b/qt/python/mantidqt/widgets/fitpropertybrowser/addfunctiondialog/test/test_addfunctiondialogpresenter.py index b954e15eb25373eb6c74b91fdc88920e59a1a0ef..7d85ad05b81a1f42dd2f2987673c2f9728f2941e 100644 --- a/qt/python/mantidqt/widgets/fitpropertybrowser/addfunctiondialog/test/test_addfunctiondialogpresenter.py +++ b/qt/python/mantidqt/widgets/fitpropertybrowser/addfunctiondialog/test/test_addfunctiondialogpresenter.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. diff --git a/qt/python/mantidqt/widgets/fitpropertybrowser/addfunctiondialog/view.py b/qt/python/mantidqt/widgets/fitpropertybrowser/addfunctiondialog/view.py index c9b3f8fcd6186be27e245ae070b8a9f06ad1a4c9..b8d172d448fe27e019f1dca9aaa4335ae87bffbe 100644 --- a/qt/python/mantidqt/widgets/fitpropertybrowser/addfunctiondialog/view.py +++ b/qt/python/mantidqt/widgets/fitpropertybrowser/addfunctiondialog/view.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, unicode_literals) diff --git a/qt/python/mantidqt/widgets/fitpropertybrowser/fitpropertybrowser.py b/qt/python/mantidqt/widgets/fitpropertybrowser/fitpropertybrowser.py index 3c7c8534ad366f8fd7acd8e7bf25bbbaf164003d..2d9c6a67f1346cf7a3e2325c94ebd9bc180685c4 100644 --- a/qt/python/mantidqt/widgets/fitpropertybrowser/fitpropertybrowser.py +++ b/qt/python/mantidqt/widgets/fitpropertybrowser/fitpropertybrowser.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package # diff --git a/qt/python/mantidqt/widgets/fitpropertybrowser/interactive_tool.py b/qt/python/mantidqt/widgets/fitpropertybrowser/interactive_tool.py index 721a492aa77270ce45c930a5f1e66c3cc1b8fc7e..9133e99474b47d2be2355dff25bda0ca881047c2 100644 --- a/qt/python/mantidqt/widgets/fitpropertybrowser/interactive_tool.py +++ b/qt/python/mantidqt/widgets/fitpropertybrowser/interactive_tool.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, unicode_literals) diff --git a/qt/python/mantidqt/widgets/fitpropertybrowser/mouse_state_machine.py b/qt/python/mantidqt/widgets/fitpropertybrowser/mouse_state_machine.py index 53fd74ca30ff5d6b8eafe66335d05211d4a48c5a..d27cf7feb41767922e714f227ba93fcd384fa343 100644 --- a/qt/python/mantidqt/widgets/fitpropertybrowser/mouse_state_machine.py +++ b/qt/python/mantidqt/widgets/fitpropertybrowser/mouse_state_machine.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from qtpy.QtCore import Qt from qtpy.QtGui import QCursor diff --git a/qt/python/mantidqt/widgets/functionbrowser/__init__.py b/qt/python/mantidqt/widgets/functionbrowser/__init__.py index 88b1e24fb1e73ac9233fc89b1fb330dd97841daf..f17331afe4c678a539e1f2613224380a101c2f16 100644 --- a/qt/python/mantidqt/widgets/functionbrowser/__init__.py +++ b/qt/python/mantidqt/widgets/functionbrowser/__init__.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package # diff --git a/qt/python/mantidqt/widgets/instrumentview/__init__.py b/qt/python/mantidqt/widgets/instrumentview/__init__.py index ee55b8e4b54901176ffa58f63a3b5314e8df38be..fea27059e188b62cc03c2664754f8b417ebdcc37 100644 --- a/qt/python/mantidqt/widgets/instrumentview/__init__.py +++ b/qt/python/mantidqt/widgets/instrumentview/__init__.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package # diff --git a/qt/python/mantidqt/widgets/instrumentview/io.py b/qt/python/mantidqt/widgets/instrumentview/io.py index 94939ebde22ec69fa48e190f847be3f586b3b60c..880fc2e465a8e4a2376ddb639b85504cb3b9b51e 100644 --- a/qt/python/mantidqt/widgets/instrumentview/io.py +++ b/qt/python/mantidqt/widgets/instrumentview/io.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package # diff --git a/qt/python/mantidqt/widgets/instrumentview/presenter.py b/qt/python/mantidqt/widgets/instrumentview/presenter.py index 61800c2f6b02017e85cf8e93c975ce6b11e4de35..0f0a2fa6e5bbc4c80de9123531423bd1987984b5 100644 --- a/qt/python/mantidqt/widgets/instrumentview/presenter.py +++ b/qt/python/mantidqt/widgets/instrumentview/presenter.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package # diff --git a/qt/python/mantidqt/widgets/instrumentview/test/__init__.py b/qt/python/mantidqt/widgets/instrumentview/test/__init__.py index 2542dc4ea67a9fb17d7f18f017e39f900655e23d..b4bf0064ff36baea47116c7d1090b9da96e3ebdd 100644 --- a/qt/python/mantidqt/widgets/instrumentview/test/__init__.py +++ b/qt/python/mantidqt/widgets/instrumentview/test/__init__.py @@ -1,7 +1,7 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. diff --git a/qt/python/mantidqt/widgets/instrumentview/test/test_instrumentview_io.py b/qt/python/mantidqt/widgets/instrumentview/test/test_instrumentview_io.py index caef451b89c286f7f0965e99f6b597c51242108c..c59d7b2fb25214c3102a6c83a24f08378df82140 100644 --- a/qt/python/mantidqt/widgets/instrumentview/test/test_instrumentview_io.py +++ b/qt/python/mantidqt/widgets/instrumentview/test/test_instrumentview_io.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package # diff --git a/qt/python/mantidqt/widgets/instrumentview/test/test_instrumentview_view.py b/qt/python/mantidqt/widgets/instrumentview/test/test_instrumentview_view.py index 0e30c4ce113665059e1fa63c58bc06487cf2d247..74bb51eab5d09daba98cb4e67aa929f343acf207 100644 --- a/qt/python/mantidqt/widgets/instrumentview/test/test_instrumentview_view.py +++ b/qt/python/mantidqt/widgets/instrumentview/test/test_instrumentview_view.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. from __future__ import absolute_import, unicode_literals diff --git a/qt/python/mantidqt/widgets/instrumentview/view.py b/qt/python/mantidqt/widgets/instrumentview/view.py index bb178fe7694396109d78b12b33d24f1b945ec681..36ca948edd99e30d66be9291471d0bf0ed464746 100644 --- a/qt/python/mantidqt/widgets/instrumentview/view.py +++ b/qt/python/mantidqt/widgets/instrumentview/view.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package # diff --git a/qt/python/mantidqt/widgets/jobtreeview/__init__.py b/qt/python/mantidqt/widgets/jobtreeview/__init__.py index 63870f48cbb828e2c0f9c0794c322a3994f019e2..52124cdf06bfd82a39c052057380e47ccbf14a2f 100644 --- a/qt/python/mantidqt/widgets/jobtreeview/__init__.py +++ b/qt/python/mantidqt/widgets/jobtreeview/__init__.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package # diff --git a/qt/python/mantidqt/widgets/jupyterconsole.py b/qt/python/mantidqt/widgets/jupyterconsole.py index f8a43b7b118c283f89ed89ad209dfa820482b11c..c5aa0d961c943e8ee454b05b778919ba2c7581b6 100644 --- a/qt/python/mantidqt/widgets/jupyterconsole.py +++ b/qt/python/mantidqt/widgets/jupyterconsole.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package # diff --git a/qt/python/mantidqt/widgets/manageuserdirectories.py b/qt/python/mantidqt/widgets/manageuserdirectories.py index 6105754ecb2d1ec9352474ba5dc916e3642050e4..449e0d5cc269f8baf1012fa10e522c0f32eca6a8 100644 --- a/qt/python/mantidqt/widgets/manageuserdirectories.py +++ b/qt/python/mantidqt/widgets/manageuserdirectories.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package # diff --git a/qt/python/mantidqt/widgets/messagedisplay.py b/qt/python/mantidqt/widgets/messagedisplay.py index 1c9d6b112f4eab70c65eebe8cf1445e45161385b..7c413883acfcd6faf714ba5a76dc4fe917174891 100644 --- a/qt/python/mantidqt/widgets/messagedisplay.py +++ b/qt/python/mantidqt/widgets/messagedisplay.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package # diff --git a/qt/python/mantidqt/widgets/observers/__init__.py b/qt/python/mantidqt/widgets/observers/__init__.py index c26eb693ed8c30ed5279eafeead757c71c3d10f3..eba89723d653729011f2ccb383d30db6d22090e8 100644 --- a/qt/python/mantidqt/widgets/observers/__init__.py +++ b/qt/python/mantidqt/widgets/observers/__init__.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. diff --git a/qt/python/mantidqt/widgets/observers/ads_observer.py b/qt/python/mantidqt/widgets/observers/ads_observer.py index 8f67bd335af911890a127d13e731aed52b9e0de0..a1e3372b99fa7cd2c2907adcd58875b9e6b42eba 100644 --- a/qt/python/mantidqt/widgets/observers/ads_observer.py +++ b/qt/python/mantidqt/widgets/observers/ads_observer.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. diff --git a/qt/python/mantidqt/widgets/observers/observing_presenter.py b/qt/python/mantidqt/widgets/observers/observing_presenter.py index 76e67174675e720b7bd58f37012e127ed079745f..37f1dd12913484712cacade1101abad8e4ab3d89 100644 --- a/qt/python/mantidqt/widgets/observers/observing_presenter.py +++ b/qt/python/mantidqt/widgets/observers/observing_presenter.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. diff --git a/qt/python/mantidqt/widgets/observers/observing_view.py b/qt/python/mantidqt/widgets/observers/observing_view.py index 1e67cf7262be3420cf835302eb76071978b5fc5b..ed507045d371a63c94f3c4a4f438f35bbb6caced 100644 --- a/qt/python/mantidqt/widgets/observers/observing_view.py +++ b/qt/python/mantidqt/widgets/observers/observing_view.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. diff --git a/qt/python/mantidqt/widgets/observers/test/__init__.py b/qt/python/mantidqt/widgets/observers/test/__init__.py index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..4c61b2b97ac90c3b7a2173f1a3ea44378718d5de 100644 --- a/qt/python/mantidqt/widgets/observers/test/__init__.py +++ b/qt/python/mantidqt/widgets/observers/test/__init__.py @@ -0,0 +1,6 @@ +# Mantid Repository : https://github.com/mantidproject/mantid +# +# Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS +# SPDX - License - Identifier: GPL - 3.0 + diff --git a/qt/python/mantidqt/widgets/observers/test/test_ads_observer.py b/qt/python/mantidqt/widgets/observers/test/test_ads_observer.py index fff5f234a4842967a0230e62516da8484221e042..6c3bf71b62883ad427581270f23680f749836235 100644 --- a/qt/python/mantidqt/widgets/observers/test/test_ads_observer.py +++ b/qt/python/mantidqt/widgets/observers/test/test_ads_observer.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. from __future__ import (absolute_import, division, print_function) diff --git a/qt/python/mantidqt/widgets/observers/test/test_observing_presenter.py b/qt/python/mantidqt/widgets/observers/test/test_observing_presenter.py index b981210a14ac110545707934be9b0cdd7c69772e..1fb7db9de19f7dc7761a0cdcd41a1bb561abe545 100644 --- a/qt/python/mantidqt/widgets/observers/test/test_observing_presenter.py +++ b/qt/python/mantidqt/widgets/observers/test/test_observing_presenter.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. from __future__ import (absolute_import, division, print_function) diff --git a/qt/python/mantidqt/widgets/observers/test/test_observing_view.py b/qt/python/mantidqt/widgets/observers/test/test_observing_view.py index 33f8c5c027098f86317b05dba9ee8fefedc11c7c..aba39e6fdec8274f2ff4a57928cb42fddf1da591 100644 --- a/qt/python/mantidqt/widgets/observers/test/test_observing_view.py +++ b/qt/python/mantidqt/widgets/observers/test/test_observing_view.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. from __future__ import (absolute_import, division, print_function) diff --git a/qt/python/mantidqt/widgets/plotconfigdialog/__init__.py b/qt/python/mantidqt/widgets/plotconfigdialog/__init__.py index 7be3f56b99e42b01f2d0e02fc887b11dcba2609d..87763f237517340b803315a527b1b1467882c731 100644 --- a/qt/python/mantidqt/widgets/plotconfigdialog/__init__.py +++ b/qt/python/mantidqt/widgets/plotconfigdialog/__init__.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. diff --git a/qt/python/mantidqt/widgets/plotconfigdialog/axestabwidget/__init__.py b/qt/python/mantidqt/widgets/plotconfigdialog/axestabwidget/__init__.py index a799e50671499d7a45132d6f494fdefa536abcd7..40d396400dae13c796656567142050a462867304 100644 --- a/qt/python/mantidqt/widgets/plotconfigdialog/axestabwidget/__init__.py +++ b/qt/python/mantidqt/widgets/plotconfigdialog/axestabwidget/__init__.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. diff --git a/qt/python/mantidqt/widgets/plotconfigdialog/axestabwidget/presenter.py b/qt/python/mantidqt/widgets/plotconfigdialog/axestabwidget/presenter.py index 1075637856cd474c2e6fd38f6846d55b2a6cac1b..343ea46b10956118aefe0bd30290e556a989640a 100644 --- a/qt/python/mantidqt/widgets/plotconfigdialog/axestabwidget/presenter.py +++ b/qt/python/mantidqt/widgets/plotconfigdialog/axestabwidget/presenter.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. diff --git a/qt/python/mantidqt/widgets/plotconfigdialog/axestabwidget/test/__init__.py b/qt/python/mantidqt/widgets/plotconfigdialog/axestabwidget/test/__init__.py index db65bfdd56145fdd2d6d2eccf8d7684e66930c50..d4649f5e6d8bb07eea47f10137cb8dbc8c8b3cb0 100644 --- a/qt/python/mantidqt/widgets/plotconfigdialog/axestabwidget/test/__init__.py +++ b/qt/python/mantidqt/widgets/plotconfigdialog/axestabwidget/test/__init__.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. diff --git a/qt/python/mantidqt/widgets/plotconfigdialog/axestabwidget/test/test_axestabwidgetpresenter.py b/qt/python/mantidqt/widgets/plotconfigdialog/axestabwidget/test/test_axestabwidgetpresenter.py index 87991f76670153b79345eb2dcc6526e564209d84..9f4698acb99d3e2ac3d2b6bc7e9971e06a66b7e4 100644 --- a/qt/python/mantidqt/widgets/plotconfigdialog/axestabwidget/test/test_axestabwidgetpresenter.py +++ b/qt/python/mantidqt/widgets/plotconfigdialog/axestabwidget/test/test_axestabwidgetpresenter.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. diff --git a/qt/python/mantidqt/widgets/plotconfigdialog/axestabwidget/view.py b/qt/python/mantidqt/widgets/plotconfigdialog/axestabwidget/view.py index 93c750728a9508684b02a4d140e751ec56295d74..7e923bcbee7d42f0a58199a51f5cd674134b7db2 100644 --- a/qt/python/mantidqt/widgets/plotconfigdialog/axestabwidget/view.py +++ b/qt/python/mantidqt/widgets/plotconfigdialog/axestabwidget/view.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. diff --git a/qt/python/mantidqt/widgets/plotconfigdialog/colorselector.py b/qt/python/mantidqt/widgets/plotconfigdialog/colorselector.py index 5e72ce5576633d10b0cca9f18b1f70f45cdf2b8a..dc7db8c600dfa748b3ffb3c7a630940ed2acfb77 100644 --- a/qt/python/mantidqt/widgets/plotconfigdialog/colorselector.py +++ b/qt/python/mantidqt/widgets/plotconfigdialog/colorselector.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. diff --git a/qt/python/mantidqt/widgets/plotconfigdialog/curvestabwidget/__init__.py b/qt/python/mantidqt/widgets/plotconfigdialog/curvestabwidget/__init__.py index 25a1f3c159fc454662964c55c2efa3f7d523ed4b..343a8a03bd77e0de0a0cbd834d15dc3fc8996730 100644 --- a/qt/python/mantidqt/widgets/plotconfigdialog/curvestabwidget/__init__.py +++ b/qt/python/mantidqt/widgets/plotconfigdialog/curvestabwidget/__init__.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. diff --git a/qt/python/mantidqt/widgets/plotconfigdialog/curvestabwidget/errorbarstabwidget/__init__.py b/qt/python/mantidqt/widgets/plotconfigdialog/curvestabwidget/errorbarstabwidget/__init__.py index db65bfdd56145fdd2d6d2eccf8d7684e66930c50..d4649f5e6d8bb07eea47f10137cb8dbc8c8b3cb0 100644 --- a/qt/python/mantidqt/widgets/plotconfigdialog/curvestabwidget/errorbarstabwidget/__init__.py +++ b/qt/python/mantidqt/widgets/plotconfigdialog/curvestabwidget/errorbarstabwidget/__init__.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. diff --git a/qt/python/mantidqt/widgets/plotconfigdialog/curvestabwidget/errorbarstabwidget/view.py b/qt/python/mantidqt/widgets/plotconfigdialog/curvestabwidget/errorbarstabwidget/view.py index ec9cc3a55b761c5e3392cdc30c35818b65e2b06d..b63e862e61e24c79f91883373d36597862d9d85c 100644 --- a/qt/python/mantidqt/widgets/plotconfigdialog/curvestabwidget/errorbarstabwidget/view.py +++ b/qt/python/mantidqt/widgets/plotconfigdialog/curvestabwidget/errorbarstabwidget/view.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. diff --git a/qt/python/mantidqt/widgets/plotconfigdialog/curvestabwidget/linetabwidget/__init__.py b/qt/python/mantidqt/widgets/plotconfigdialog/curvestabwidget/linetabwidget/__init__.py index db65bfdd56145fdd2d6d2eccf8d7684e66930c50..d4649f5e6d8bb07eea47f10137cb8dbc8c8b3cb0 100644 --- a/qt/python/mantidqt/widgets/plotconfigdialog/curvestabwidget/linetabwidget/__init__.py +++ b/qt/python/mantidqt/widgets/plotconfigdialog/curvestabwidget/linetabwidget/__init__.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. diff --git a/qt/python/mantidqt/widgets/plotconfigdialog/curvestabwidget/linetabwidget/view.py b/qt/python/mantidqt/widgets/plotconfigdialog/curvestabwidget/linetabwidget/view.py index 276121f00d331ff16aa02142a76d1c61d55747ec..8e0e7362e71e19ab11e23aafc9398c8ceb00cd0a 100644 --- a/qt/python/mantidqt/widgets/plotconfigdialog/curvestabwidget/linetabwidget/view.py +++ b/qt/python/mantidqt/widgets/plotconfigdialog/curvestabwidget/linetabwidget/view.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. diff --git a/qt/python/mantidqt/widgets/plotconfigdialog/curvestabwidget/markertabwidget/__init__.py b/qt/python/mantidqt/widgets/plotconfigdialog/curvestabwidget/markertabwidget/__init__.py index db65bfdd56145fdd2d6d2eccf8d7684e66930c50..d4649f5e6d8bb07eea47f10137cb8dbc8c8b3cb0 100644 --- a/qt/python/mantidqt/widgets/plotconfigdialog/curvestabwidget/markertabwidget/__init__.py +++ b/qt/python/mantidqt/widgets/plotconfigdialog/curvestabwidget/markertabwidget/__init__.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. diff --git a/qt/python/mantidqt/widgets/plotconfigdialog/curvestabwidget/markertabwidget/view.py b/qt/python/mantidqt/widgets/plotconfigdialog/curvestabwidget/markertabwidget/view.py index e00eab458289528de6ab657122276eb6df5d0ca0..20351fcff3e87aba79c4e2f1549df7f7cfbf8678 100644 --- a/qt/python/mantidqt/widgets/plotconfigdialog/curvestabwidget/markertabwidget/view.py +++ b/qt/python/mantidqt/widgets/plotconfigdialog/curvestabwidget/markertabwidget/view.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. diff --git a/qt/python/mantidqt/widgets/plotconfigdialog/curvestabwidget/presenter.py b/qt/python/mantidqt/widgets/plotconfigdialog/curvestabwidget/presenter.py index 9aa448419547de90e310446c2e32f895bdb78da7..98b15e08b255e2954ad962ae3cd36b56f139ee35 100644 --- a/qt/python/mantidqt/widgets/plotconfigdialog/curvestabwidget/presenter.py +++ b/qt/python/mantidqt/widgets/plotconfigdialog/curvestabwidget/presenter.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. diff --git a/qt/python/mantidqt/widgets/plotconfigdialog/curvestabwidget/test/__init__.py b/qt/python/mantidqt/widgets/plotconfigdialog/curvestabwidget/test/__init__.py index db65bfdd56145fdd2d6d2eccf8d7684e66930c50..d4649f5e6d8bb07eea47f10137cb8dbc8c8b3cb0 100644 --- a/qt/python/mantidqt/widgets/plotconfigdialog/curvestabwidget/test/__init__.py +++ b/qt/python/mantidqt/widgets/plotconfigdialog/curvestabwidget/test/__init__.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. diff --git a/qt/python/mantidqt/widgets/plotconfigdialog/curvestabwidget/test/test_curveproperties.py b/qt/python/mantidqt/widgets/plotconfigdialog/curvestabwidget/test/test_curveproperties.py index 79da72b9638d5de7a9a375d4ebb0644d973c0ab6..757762013dcb650491a45f0d7fecfa0bddab0655 100644 --- a/qt/python/mantidqt/widgets/plotconfigdialog/curvestabwidget/test/test_curveproperties.py +++ b/qt/python/mantidqt/widgets/plotconfigdialog/curvestabwidget/test/test_curveproperties.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. diff --git a/qt/python/mantidqt/widgets/plotconfigdialog/curvestabwidget/test/test_curvestabwidgetpresenter.py b/qt/python/mantidqt/widgets/plotconfigdialog/curvestabwidget/test/test_curvestabwidgetpresenter.py index 98301983437b672c42320441db355ae91d42180b..d06247161250e557fcac4b443fb1075cd3458dd4 100644 --- a/qt/python/mantidqt/widgets/plotconfigdialog/curvestabwidget/test/test_curvestabwidgetpresenter.py +++ b/qt/python/mantidqt/widgets/plotconfigdialog/curvestabwidget/test/test_curvestabwidgetpresenter.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. diff --git a/qt/python/mantidqt/widgets/plotconfigdialog/curvestabwidget/view.py b/qt/python/mantidqt/widgets/plotconfigdialog/curvestabwidget/view.py index 031a65e227312057bf68e0eee6443bccad19250f..6b40e0d88cea00a04c2ee99e0c1e7d8b61b1b4fc 100644 --- a/qt/python/mantidqt/widgets/plotconfigdialog/curvestabwidget/view.py +++ b/qt/python/mantidqt/widgets/plotconfigdialog/curvestabwidget/view.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. diff --git a/qt/python/mantidqt/widgets/plotconfigdialog/imagestabwidget/__init__.py b/qt/python/mantidqt/widgets/plotconfigdialog/imagestabwidget/__init__.py index 08cdcedc4722dd7526475e02f1f7392c7ef43e6c..7b7731026419baaaed080f80b4e0b7b89b9f5043 100644 --- a/qt/python/mantidqt/widgets/plotconfigdialog/imagestabwidget/__init__.py +++ b/qt/python/mantidqt/widgets/plotconfigdialog/imagestabwidget/__init__.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. diff --git a/qt/python/mantidqt/widgets/plotconfigdialog/imagestabwidget/presenter.py b/qt/python/mantidqt/widgets/plotconfigdialog/imagestabwidget/presenter.py index c7a9848ddbb9a656477cdc4eae70630c1df971bc..0ccbe31e90d0b258eb06938c419f1f63e174c185 100644 --- a/qt/python/mantidqt/widgets/plotconfigdialog/imagestabwidget/presenter.py +++ b/qt/python/mantidqt/widgets/plotconfigdialog/imagestabwidget/presenter.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. diff --git a/qt/python/mantidqt/widgets/plotconfigdialog/imagestabwidget/test/__init__.py b/qt/python/mantidqt/widgets/plotconfigdialog/imagestabwidget/test/__init__.py index db65bfdd56145fdd2d6d2eccf8d7684e66930c50..d4649f5e6d8bb07eea47f10137cb8dbc8c8b3cb0 100644 --- a/qt/python/mantidqt/widgets/plotconfigdialog/imagestabwidget/test/__init__.py +++ b/qt/python/mantidqt/widgets/plotconfigdialog/imagestabwidget/test/__init__.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. diff --git a/qt/python/mantidqt/widgets/plotconfigdialog/imagestabwidget/test/test_imagestabwidgetpresenter.py b/qt/python/mantidqt/widgets/plotconfigdialog/imagestabwidget/test/test_imagestabwidgetpresenter.py index ffd574f421c0960266f0d519135e166213834e42..4190ff43b052c015e0f0859d8717ac8675fa3101 100644 --- a/qt/python/mantidqt/widgets/plotconfigdialog/imagestabwidget/test/test_imagestabwidgetpresenter.py +++ b/qt/python/mantidqt/widgets/plotconfigdialog/imagestabwidget/test/test_imagestabwidgetpresenter.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. diff --git a/qt/python/mantidqt/widgets/plotconfigdialog/imagestabwidget/view.py b/qt/python/mantidqt/widgets/plotconfigdialog/imagestabwidget/view.py index 05c1ff22073ebf55b538f74d0e568adac01d9401..8dfa5554b0ba3d9234bee14b29cec6fc54ff4ac1 100644 --- a/qt/python/mantidqt/widgets/plotconfigdialog/imagestabwidget/view.py +++ b/qt/python/mantidqt/widgets/plotconfigdialog/imagestabwidget/view.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. diff --git a/qt/python/mantidqt/widgets/plotconfigdialog/legendtabwidget/__init__.py b/qt/python/mantidqt/widgets/plotconfigdialog/legendtabwidget/__init__.py index db65bfdd56145fdd2d6d2eccf8d7684e66930c50..d4649f5e6d8bb07eea47f10137cb8dbc8c8b3cb0 100644 --- a/qt/python/mantidqt/widgets/plotconfigdialog/legendtabwidget/__init__.py +++ b/qt/python/mantidqt/widgets/plotconfigdialog/legendtabwidget/__init__.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. diff --git a/qt/python/mantidqt/widgets/plotconfigdialog/legendtabwidget/advancedlegendoptionsdialog/__init__.py b/qt/python/mantidqt/widgets/plotconfigdialog/legendtabwidget/advancedlegendoptionsdialog/__init__.py index db65bfdd56145fdd2d6d2eccf8d7684e66930c50..d4649f5e6d8bb07eea47f10137cb8dbc8c8b3cb0 100644 --- a/qt/python/mantidqt/widgets/plotconfigdialog/legendtabwidget/advancedlegendoptionsdialog/__init__.py +++ b/qt/python/mantidqt/widgets/plotconfigdialog/legendtabwidget/advancedlegendoptionsdialog/__init__.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. diff --git a/qt/python/mantidqt/widgets/plotconfigdialog/legendtabwidget/advancedlegendoptionsdialog/view.py b/qt/python/mantidqt/widgets/plotconfigdialog/legendtabwidget/advancedlegendoptionsdialog/view.py index aeb8953684ace67c7cd50df244fcf0398b704450..3daba515629ce8c4da9a80632f565f0a4e613bca 100644 --- a/qt/python/mantidqt/widgets/plotconfigdialog/legendtabwidget/advancedlegendoptionsdialog/view.py +++ b/qt/python/mantidqt/widgets/plotconfigdialog/legendtabwidget/advancedlegendoptionsdialog/view.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. diff --git a/qt/python/mantidqt/widgets/plotconfigdialog/legendtabwidget/presenter.py b/qt/python/mantidqt/widgets/plotconfigdialog/legendtabwidget/presenter.py index 7e46f40b31d7dbaca54981b25802b0e151dfec3d..62717edb75196f8bdd5480af446574f26988605a 100644 --- a/qt/python/mantidqt/widgets/plotconfigdialog/legendtabwidget/presenter.py +++ b/qt/python/mantidqt/widgets/plotconfigdialog/legendtabwidget/presenter.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. diff --git a/qt/python/mantidqt/widgets/plotconfigdialog/legendtabwidget/view.py b/qt/python/mantidqt/widgets/plotconfigdialog/legendtabwidget/view.py index 03688639f8b6562fc1a4f83d731b438ac8a818da..320506a1cedd5196ae9e665819d8ffa32e5c6c3e 100644 --- a/qt/python/mantidqt/widgets/plotconfigdialog/legendtabwidget/view.py +++ b/qt/python/mantidqt/widgets/plotconfigdialog/legendtabwidget/view.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. diff --git a/qt/python/mantidqt/widgets/plotconfigdialog/presenter.py b/qt/python/mantidqt/widgets/plotconfigdialog/presenter.py index 2fc4c90e5d7a0b1fa0dfc2080e863d5a6bb81d92..547f4ef1ed51f59d74ab33a0bfcd72af491f2d24 100644 --- a/qt/python/mantidqt/widgets/plotconfigdialog/presenter.py +++ b/qt/python/mantidqt/widgets/plotconfigdialog/presenter.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. diff --git a/qt/python/mantidqt/widgets/plotconfigdialog/test/__init__.py b/qt/python/mantidqt/widgets/plotconfigdialog/test/__init__.py index db65bfdd56145fdd2d6d2eccf8d7684e66930c50..d4649f5e6d8bb07eea47f10137cb8dbc8c8b3cb0 100644 --- a/qt/python/mantidqt/widgets/plotconfigdialog/test/__init__.py +++ b/qt/python/mantidqt/widgets/plotconfigdialog/test/__init__.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. diff --git a/qt/python/mantidqt/widgets/plotconfigdialog/test/test_apply_all_properties.py b/qt/python/mantidqt/widgets/plotconfigdialog/test/test_apply_all_properties.py index 00c0d74049ceba6a0e3760b735ecf18a56cdb5ec..84eac3ac2e35bf48a42059fbd389b31779639b9e 100644 --- a/qt/python/mantidqt/widgets/plotconfigdialog/test/test_apply_all_properties.py +++ b/qt/python/mantidqt/widgets/plotconfigdialog/test/test_apply_all_properties.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. diff --git a/qt/python/mantidqt/widgets/plotconfigdialog/test/test_plotconfigdialogpresenter.py b/qt/python/mantidqt/widgets/plotconfigdialog/test/test_plotconfigdialogpresenter.py index a06bc1dfa427165170aeea485447445668e297a7..3e003acfd5857ddf37eabacd53b43a243bcc1c4c 100644 --- a/qt/python/mantidqt/widgets/plotconfigdialog/test/test_plotconfigdialogpresenter.py +++ b/qt/python/mantidqt/widgets/plotconfigdialog/test/test_plotconfigdialogpresenter.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. diff --git a/qt/python/mantidqt/widgets/plotconfigdialog/view.py b/qt/python/mantidqt/widgets/plotconfigdialog/view.py index abdaa3d2f5db104902db59909335bfd0aeab9ed1..c15bb639b02b74bec643d838cd11e0d46b19e5d3 100644 --- a/qt/python/mantidqt/widgets/plotconfigdialog/view.py +++ b/qt/python/mantidqt/widgets/plotconfigdialog/view.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. diff --git a/qt/python/mantidqt/widgets/samplelogs/__init__.py b/qt/python/mantidqt/widgets/samplelogs/__init__.py index 57d5ae5a28a63ed0dd44886f201c25df7cac61ca..7349c447e5c1f2998d92b8d32be9c8822fd4d9c0 100644 --- a/qt/python/mantidqt/widgets/samplelogs/__init__.py +++ b/qt/python/mantidqt/widgets/samplelogs/__init__.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/python/mantidqt/widgets/samplelogs/__main__.py b/qt/python/mantidqt/widgets/samplelogs/__main__.py index 60597b674ae6285bc6edbe8aa005dd065de23d72..02f32fc10a2f86ff052db9039e32b0d78f3800eb 100644 --- a/qt/python/mantidqt/widgets/samplelogs/__main__.py +++ b/qt/python/mantidqt/widgets/samplelogs/__main__.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/python/mantidqt/widgets/samplelogs/model.py b/qt/python/mantidqt/widgets/samplelogs/model.py index d69c98a12e92e661e9f1f9c0f67adcdf4e2fb7af..8b20520ada90b03c3fb165c1b2310e5f496136d9 100644 --- a/qt/python/mantidqt/widgets/samplelogs/model.py +++ b/qt/python/mantidqt/widgets/samplelogs/model.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/python/mantidqt/widgets/samplelogs/presenter.py b/qt/python/mantidqt/widgets/samplelogs/presenter.py index 4e32f67048037f7f25e2076ea2831f1af30f943e..5498c3fc910ab96acfabd4c5efa5f04a24fa6937 100644 --- a/qt/python/mantidqt/widgets/samplelogs/presenter.py +++ b/qt/python/mantidqt/widgets/samplelogs/presenter.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/python/mantidqt/widgets/samplelogs/test/test_samplelogs_model.py b/qt/python/mantidqt/widgets/samplelogs/test/test_samplelogs_model.py index 2bee15f8a67c6c6b979b05ad9d69199a4fecbfe6..19e6c582a4b0c3ee975c48f9a1a6522e0216fe81 100644 --- a/qt/python/mantidqt/widgets/samplelogs/test/test_samplelogs_model.py +++ b/qt/python/mantidqt/widgets/samplelogs/test/test_samplelogs_model.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/python/mantidqt/widgets/samplelogs/test/test_samplelogs_presenter.py b/qt/python/mantidqt/widgets/samplelogs/test/test_samplelogs_presenter.py index caa4101b42d857059f68d9d8eace783030ba07b2..e373f06c99ecae1a57a38b794f2a0eaf49e407ea 100644 --- a/qt/python/mantidqt/widgets/samplelogs/test/test_samplelogs_presenter.py +++ b/qt/python/mantidqt/widgets/samplelogs/test/test_samplelogs_presenter.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/python/mantidqt/widgets/samplelogs/test/test_samplelogs_view.py b/qt/python/mantidqt/widgets/samplelogs/test/test_samplelogs_view.py index 9b7a335e42c1af14340864dd8283941f0994d682..72b439918dceadfe4e1214aaf98ec9500ba0dd34 100644 --- a/qt/python/mantidqt/widgets/samplelogs/test/test_samplelogs_view.py +++ b/qt/python/mantidqt/widgets/samplelogs/test/test_samplelogs_view.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. from __future__ import absolute_import diff --git a/qt/python/mantidqt/widgets/samplelogs/view.py b/qt/python/mantidqt/widgets/samplelogs/view.py index b26672b8e1d267dcc72db2beb2242f5464811f6c..7c6299a265f280901c4c34ea4d6e1b220703f84f 100644 --- a/qt/python/mantidqt/widgets/samplelogs/view.py +++ b/qt/python/mantidqt/widgets/samplelogs/view.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/python/mantidqt/widgets/scriptrepository.py b/qt/python/mantidqt/widgets/scriptrepository.py index 689c76278ab93fc3a82dc62e6a588307a5ec56b3..b4b1182608ba9a769a4538237b675e979c14b542 100644 --- a/qt/python/mantidqt/widgets/scriptrepository.py +++ b/qt/python/mantidqt/widgets/scriptrepository.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package # diff --git a/qt/python/mantidqt/widgets/sliceviewer/__init__.py b/qt/python/mantidqt/widgets/sliceviewer/__init__.py index 57b1565b3979c58b8e99c11e430f73f54fc80884..be05bb7edd57b18e673711c78aa25b1b86911730 100644 --- a/qt/python/mantidqt/widgets/sliceviewer/__init__.py +++ b/qt/python/mantidqt/widgets/sliceviewer/__init__.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/python/mantidqt/widgets/sliceviewer/dimensionwidget.py b/qt/python/mantidqt/widgets/sliceviewer/dimensionwidget.py index dec15b20ce2828fc85f16fedcf1cc4e3f72e0bce..9afa7bd0523d1aa4ad684f46e741cd9919213d63 100644 --- a/qt/python/mantidqt/widgets/sliceviewer/dimensionwidget.py +++ b/qt/python/mantidqt/widgets/sliceviewer/dimensionwidget.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/python/mantidqt/widgets/sliceviewer/model.py b/qt/python/mantidqt/widgets/sliceviewer/model.py index 736fb459fd93aefc38226fb78a8966a0bc9edca2..43b76f1a092787f932e2b1d724ea8136c8277bf7 100644 --- a/qt/python/mantidqt/widgets/sliceviewer/model.py +++ b/qt/python/mantidqt/widgets/sliceviewer/model.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/python/mantidqt/widgets/sliceviewer/presenter.py b/qt/python/mantidqt/widgets/sliceviewer/presenter.py index 8ab3887b1457c58a29a76b26d449e36e2f690944..c82acf7910bb4988e0b8b61422ab60a9999de3d1 100644 --- a/qt/python/mantidqt/widgets/sliceviewer/presenter.py +++ b/qt/python/mantidqt/widgets/sliceviewer/presenter.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/python/mantidqt/widgets/sliceviewer/samplingimage.py b/qt/python/mantidqt/widgets/sliceviewer/samplingimage.py index f95e6c299d874b86877ebedcbb228e68bc9400fc..91d8fbc79aef1bcab1eb4469717dfaff1e8dcef1 100644 --- a/qt/python/mantidqt/widgets/sliceviewer/samplingimage.py +++ b/qt/python/mantidqt/widgets/sliceviewer/samplingimage.py @@ -1,3 +1,9 @@ +# Mantid Repository : https://github.com/mantidproject/mantid +# +# Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS +# SPDX - License - Identifier: GPL - 3.0 + import matplotlib.image as mimage import matplotlib.colors from mantid.plots.axesfunctions import _setLabels2D diff --git a/qt/python/mantidqt/widgets/sliceviewer/test/test_sliceviewer_model.py b/qt/python/mantidqt/widgets/sliceviewer/test/test_sliceviewer_model.py index c0b253084ee51f590c252be4db759d919dbb2145..4c0916b97e885c1fa9b0ac12e8b42678500335e6 100644 --- a/qt/python/mantidqt/widgets/sliceviewer/test/test_sliceviewer_model.py +++ b/qt/python/mantidqt/widgets/sliceviewer/test/test_sliceviewer_model.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/python/mantidqt/widgets/sliceviewer/test/test_sliceviewer_presenter.py b/qt/python/mantidqt/widgets/sliceviewer/test/test_sliceviewer_presenter.py index b13c98b0f6d533469e4b80bcba535b270591287d..1b807d4d453899cc4ad39ac7b2afdfef258b96a5 100644 --- a/qt/python/mantidqt/widgets/sliceviewer/test/test_sliceviewer_presenter.py +++ b/qt/python/mantidqt/widgets/sliceviewer/test/test_sliceviewer_presenter.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/python/mantidqt/widgets/sliceviewer/test/test_sliceviewer_view.py b/qt/python/mantidqt/widgets/sliceviewer/test/test_sliceviewer_view.py index e9e928277b3fd803b38263695f2140d50f10870b..0bf01b069e8a0421af1e98984128749c72d323ce 100644 --- a/qt/python/mantidqt/widgets/sliceviewer/test/test_sliceviewer_view.py +++ b/qt/python/mantidqt/widgets/sliceviewer/test/test_sliceviewer_view.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. from __future__ import absolute_import diff --git a/qt/python/mantidqt/widgets/sliceviewer/toolbar.py b/qt/python/mantidqt/widgets/sliceviewer/toolbar.py index f3e3c39a0de5eb4d01ab3d68aaea0db54422afd1..c3e1191cb170bd4d69708115e39b038a3c96e782 100644 --- a/qt/python/mantidqt/widgets/sliceviewer/toolbar.py +++ b/qt/python/mantidqt/widgets/sliceviewer/toolbar.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/python/mantidqt/widgets/sliceviewer/view.py b/qt/python/mantidqt/widgets/sliceviewer/view.py index e5fd1eb8b526abe8fd71858ba3b197ca86fabbb3..50d6307d4dcbf96ba282de444a2f4b2ef4150413 100644 --- a/qt/python/mantidqt/widgets/sliceviewer/view.py +++ b/qt/python/mantidqt/widgets/sliceviewer/view.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/python/mantidqt/widgets/test/__init__.py b/qt/python/mantidqt/widgets/test/__init__.py index d2cfb75232dfb59fac674e2b49dba356e18ebbc1..ffedf5d542e31f4d22d7833e9c94f5003f02b3cb 100644 --- a/qt/python/mantidqt/widgets/test/__init__.py +++ b/qt/python/mantidqt/widgets/test/__init__.py @@ -1,6 +1,6 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + diff --git a/qt/python/mantidqt/widgets/test/test_fitpropertybrowser.py b/qt/python/mantidqt/widgets/test/test_fitpropertybrowser.py index 8631edc418240ccbeddeb12ec08569a5a5bec4a8..a0cd07b36a6e1d789dfbc55d10cf2d04b0ce2c49 100644 --- a/qt/python/mantidqt/widgets/test/test_fitpropertybrowser.py +++ b/qt/python/mantidqt/widgets/test/test_fitpropertybrowser.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. diff --git a/qt/python/mantidqt/widgets/test/test_fitpropertybrowserbase.py b/qt/python/mantidqt/widgets/test/test_fitpropertybrowserbase.py index 15608c4aaa1744c65166356312f2f45e0cbbf7cb..0bbb1e0b91eba735da62c74c713a08110079fe51 100644 --- a/qt/python/mantidqt/widgets/test/test_fitpropertybrowserbase.py +++ b/qt/python/mantidqt/widgets/test/test_fitpropertybrowserbase.py @@ -1,3 +1,9 @@ +# Mantid Repository : https://github.com/mantidproject/mantid +# +# Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS +# SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) import platform import sys diff --git a/qt/python/mantidqt/widgets/test/test_functionbrowser.py b/qt/python/mantidqt/widgets/test/test_functionbrowser.py index 35586e6f2491cbcbff3436b7a2c8dec03cd8b87f..5cf6660a9f7a687280d80cc8dd7f685bdb3bfa7f 100644 --- a/qt/python/mantidqt/widgets/test/test_functionbrowser.py +++ b/qt/python/mantidqt/widgets/test/test_functionbrowser.py @@ -1,3 +1,9 @@ +# Mantid Repository : https://github.com/mantidproject/mantid +# +# Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS +# SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) import unittest diff --git a/qt/python/mantidqt/widgets/test/test_jupyterconsole.py b/qt/python/mantidqt/widgets/test/test_jupyterconsole.py index 9f850cf6ecac809cd793f7df4a2ce7fcaa483377..588df0fd83de3d23c608276aa47de4eba741df39 100644 --- a/qt/python/mantidqt/widgets/test/test_jupyterconsole.py +++ b/qt/python/mantidqt/widgets/test/test_jupyterconsole.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/python/mantidqt/widgets/test/test_messagedisplay.py b/qt/python/mantidqt/widgets/test/test_messagedisplay.py index 9eafab1a94f686f6a8f0dec9f6deed4f19fe71f7..7ea86346dccb980a9b017b3524ea70fbcb1bf8d1 100644 --- a/qt/python/mantidqt/widgets/test/test_messagedisplay.py +++ b/qt/python/mantidqt/widgets/test/test_messagedisplay.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/python/mantidqt/widgets/test/test_scriptrepository.py b/qt/python/mantidqt/widgets/test/test_scriptrepository.py index 8838b69ca000dacb99e395934597c93656d8d34a..4cc0bb8e86d8a07594399250e4a13c4e7397edc9 100644 --- a/qt/python/mantidqt/widgets/test/test_scriptrepository.py +++ b/qt/python/mantidqt/widgets/test/test_scriptrepository.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/python/mantidqt/widgets/waterfallplotfillareadialog/__init__.py b/qt/python/mantidqt/widgets/waterfallplotfillareadialog/__init__.py index db65bfdd56145fdd2d6d2eccf8d7684e66930c50..d4649f5e6d8bb07eea47f10137cb8dbc8c8b3cb0 100644 --- a/qt/python/mantidqt/widgets/waterfallplotfillareadialog/__init__.py +++ b/qt/python/mantidqt/widgets/waterfallplotfillareadialog/__init__.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. diff --git a/qt/python/mantidqt/widgets/waterfallplotfillareadialog/presenter.py b/qt/python/mantidqt/widgets/waterfallplotfillareadialog/presenter.py index cac8bf3e8d22a6e691128e972f3a27935dfb1935..14c9052fb712f1760ed06c81e7340ab62e360737 100644 --- a/qt/python/mantidqt/widgets/waterfallplotfillareadialog/presenter.py +++ b/qt/python/mantidqt/widgets/waterfallplotfillareadialog/presenter.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. diff --git a/qt/python/mantidqt/widgets/waterfallplotfillareadialog/test/__init__.py b/qt/python/mantidqt/widgets/waterfallplotfillareadialog/test/__init__.py index 206b28341132cbfc0e31e14d1c54b8595aea2dca..b105f6a10f2dd8d2e7665b7edabde3a24caa287b 100644 --- a/qt/python/mantidqt/widgets/waterfallplotfillareadialog/test/__init__.py +++ b/qt/python/mantidqt/widgets/waterfallplotfillareadialog/test/__init__.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. diff --git a/qt/python/mantidqt/widgets/waterfallplotfillareadialog/test/test_waterfallplotfillareadialogpresenter.py b/qt/python/mantidqt/widgets/waterfallplotfillareadialog/test/test_waterfallplotfillareadialogpresenter.py index 2c1c25b7bf07a86271d4eee6c55738d11dd2ec20..3d1b5c554cc1b679ac8f5d07023a6e06e72d4dcd 100644 --- a/qt/python/mantidqt/widgets/waterfallplotfillareadialog/test/test_waterfallplotfillareadialogpresenter.py +++ b/qt/python/mantidqt/widgets/waterfallplotfillareadialog/test/test_waterfallplotfillareadialogpresenter.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. diff --git a/qt/python/mantidqt/widgets/waterfallplotfillareadialog/view.py b/qt/python/mantidqt/widgets/waterfallplotfillareadialog/view.py index 5e072b1a29f38c010632df0e6c0df67f99b6aeec..84a54916f0b5a2b0725460fb91a56a537a099bac 100644 --- a/qt/python/mantidqt/widgets/waterfallplotfillareadialog/view.py +++ b/qt/python/mantidqt/widgets/waterfallplotfillareadialog/view.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. diff --git a/qt/python/mantidqt/widgets/waterfallplotoffsetdialog/__init__.py b/qt/python/mantidqt/widgets/waterfallplotoffsetdialog/__init__.py index db65bfdd56145fdd2d6d2eccf8d7684e66930c50..d4649f5e6d8bb07eea47f10137cb8dbc8c8b3cb0 100644 --- a/qt/python/mantidqt/widgets/waterfallplotoffsetdialog/__init__.py +++ b/qt/python/mantidqt/widgets/waterfallplotoffsetdialog/__init__.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. diff --git a/qt/python/mantidqt/widgets/waterfallplotoffsetdialog/presenter.py b/qt/python/mantidqt/widgets/waterfallplotoffsetdialog/presenter.py index b3870768c45888de41748cd3220da2adce962169..10401c4e3e3c5438524408cababa6e7f8def6f7c 100644 --- a/qt/python/mantidqt/widgets/waterfallplotoffsetdialog/presenter.py +++ b/qt/python/mantidqt/widgets/waterfallplotoffsetdialog/presenter.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. diff --git a/qt/python/mantidqt/widgets/waterfallplotoffsetdialog/test/__init__.py b/qt/python/mantidqt/widgets/waterfallplotoffsetdialog/test/__init__.py index 206b28341132cbfc0e31e14d1c54b8595aea2dca..b105f6a10f2dd8d2e7665b7edabde3a24caa287b 100644 --- a/qt/python/mantidqt/widgets/waterfallplotoffsetdialog/test/__init__.py +++ b/qt/python/mantidqt/widgets/waterfallplotoffsetdialog/test/__init__.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. diff --git a/qt/python/mantidqt/widgets/waterfallplotoffsetdialog/test/test_waterfallplotoffsetdialogpresenter.py b/qt/python/mantidqt/widgets/waterfallplotoffsetdialog/test/test_waterfallplotoffsetdialogpresenter.py index a2368c3afdc105f6644283bd7cfce49f63ec2c04..f2c2e1de134f1259d8872fe95095dba80c47fd80 100644 --- a/qt/python/mantidqt/widgets/waterfallplotoffsetdialog/test/test_waterfallplotoffsetdialogpresenter.py +++ b/qt/python/mantidqt/widgets/waterfallplotoffsetdialog/test/test_waterfallplotoffsetdialogpresenter.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. diff --git a/qt/python/mantidqt/widgets/waterfallplotoffsetdialog/view.py b/qt/python/mantidqt/widgets/waterfallplotoffsetdialog/view.py index 9980aa22bc0898efcc3988bac4ab9dfad9cf83b3..5f10de04bc9580e61f026fde3133ffa4fb4b98ee 100644 --- a/qt/python/mantidqt/widgets/waterfallplotoffsetdialog/view.py +++ b/qt/python/mantidqt/widgets/waterfallplotoffsetdialog/view.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. diff --git a/qt/python/mantidqt/widgets/workspacedisplay/__init__.py b/qt/python/mantidqt/widgets/workspacedisplay/__init__.py index 03fac6b0eedd8bbea80595c07ea81f4bcc920f17..2a0da4d3236beba7b1c2c7db9aaacf47084f4252 100644 --- a/qt/python/mantidqt/widgets/workspacedisplay/__init__.py +++ b/qt/python/mantidqt/widgets/workspacedisplay/__init__.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. from __future__ import (absolute_import, unicode_literals) diff --git a/qt/python/mantidqt/widgets/workspacedisplay/data_copier.py b/qt/python/mantidqt/widgets/workspacedisplay/data_copier.py index 618d5a9629758bcffc6d2db716f535d98d9ea953..a8e51b624028283099fc17f7cb2566f72b85ef78 100644 --- a/qt/python/mantidqt/widgets/workspacedisplay/data_copier.py +++ b/qt/python/mantidqt/widgets/workspacedisplay/data_copier.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. from __future__ import (absolute_import, division, print_function) diff --git a/qt/python/mantidqt/widgets/workspacedisplay/matrix/__init__.py b/qt/python/mantidqt/widgets/workspacedisplay/matrix/__init__.py index b26f5046cdbf94ae9dd9e5c7a33b96bf48e61bea..9d555e25c79219e3bfbe48e0c3c6033bad069087 100644 --- a/qt/python/mantidqt/widgets/workspacedisplay/matrix/__init__.py +++ b/qt/python/mantidqt/widgets/workspacedisplay/matrix/__init__.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. diff --git a/qt/python/mantidqt/widgets/workspacedisplay/matrix/__main__.py b/qt/python/mantidqt/widgets/workspacedisplay/matrix/__main__.py index dfbb4d1ec3d67afbad825b82c999faf1a8a452ae..1dcc658dd42e45f97d52b4c8ced7bad67625c404 100644 --- a/qt/python/mantidqt/widgets/workspacedisplay/matrix/__main__.py +++ b/qt/python/mantidqt/widgets/workspacedisplay/matrix/__main__.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/python/mantidqt/widgets/workspacedisplay/matrix/io.py b/qt/python/mantidqt/widgets/workspacedisplay/matrix/io.py index 90d53ca0fefb5f712ebbd48d7d58026a95956fcf..155b5577c72fb57e5ec0fa496df116a31e9177a4 100644 --- a/qt/python/mantidqt/widgets/workspacedisplay/matrix/io.py +++ b/qt/python/mantidqt/widgets/workspacedisplay/matrix/io.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/python/mantidqt/widgets/workspacedisplay/matrix/model.py b/qt/python/mantidqt/widgets/workspacedisplay/matrix/model.py index d2ad94cde62e74e07f10fe41dd360c5ee5687403..159247f38d5b378ca794682dce3682d6408519f5 100644 --- a/qt/python/mantidqt/widgets/workspacedisplay/matrix/model.py +++ b/qt/python/mantidqt/widgets/workspacedisplay/matrix/model.py @@ -1,10 +1,10 @@ -# coding=utf-8 # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + +# coding=utf-8 # This file is part of the mantid workbench. # # diff --git a/qt/python/mantidqt/widgets/workspacedisplay/matrix/presenter.py b/qt/python/mantidqt/widgets/workspacedisplay/matrix/presenter.py index 3aaca381e43f9643c97a1b5f06f57e4fa65a138a..b31e8ab22087ee4d989d2b999f2e993a81003359 100644 --- a/qt/python/mantidqt/widgets/workspacedisplay/matrix/presenter.py +++ b/qt/python/mantidqt/widgets/workspacedisplay/matrix/presenter.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/python/mantidqt/widgets/workspacedisplay/matrix/table_view_model.py b/qt/python/mantidqt/widgets/workspacedisplay/matrix/table_view_model.py index ba144112e5792eeca3570d4d873afa2513ce8b5e..acdc39da8466a9328a0f60d6b31382d20ffcf0a4 100644 --- a/qt/python/mantidqt/widgets/workspacedisplay/matrix/table_view_model.py +++ b/qt/python/mantidqt/widgets/workspacedisplay/matrix/table_view_model.py @@ -1,10 +1,10 @@ -# coding=utf-8 # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + +# coding=utf-8 # This file is part of the mantid workbench. # # diff --git a/qt/python/mantidqt/widgets/workspacedisplay/matrix/test/__init__.py b/qt/python/mantidqt/widgets/workspacedisplay/matrix/test/__init__.py index 2542dc4ea67a9fb17d7f18f017e39f900655e23d..b4bf0064ff36baea47116c7d1090b9da96e3ebdd 100644 --- a/qt/python/mantidqt/widgets/workspacedisplay/matrix/test/__init__.py +++ b/qt/python/mantidqt/widgets/workspacedisplay/matrix/test/__init__.py @@ -1,7 +1,7 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. diff --git a/qt/python/mantidqt/widgets/workspacedisplay/matrix/test/test_matrixworkspacedisplay_io.py b/qt/python/mantidqt/widgets/workspacedisplay/matrix/test/test_matrixworkspacedisplay_io.py index 7e85e66513d3f37c90658634fcb99a6ccf113712..3260175104876fe9ac61263302258006da032421 100644 --- a/qt/python/mantidqt/widgets/workspacedisplay/matrix/test/test_matrixworkspacedisplay_io.py +++ b/qt/python/mantidqt/widgets/workspacedisplay/matrix/test/test_matrixworkspacedisplay_io.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/python/mantidqt/widgets/workspacedisplay/matrix/test/test_matrixworkspacedisplay_model.py b/qt/python/mantidqt/widgets/workspacedisplay/matrix/test/test_matrixworkspacedisplay_model.py index 12121c79396fe1eb63ff92b82d9e5cfd0b6e5e2e..db27c672e9941fe2787fe49d0c88d0f4f78dffb5 100644 --- a/qt/python/mantidqt/widgets/workspacedisplay/matrix/test/test_matrixworkspacedisplay_model.py +++ b/qt/python/mantidqt/widgets/workspacedisplay/matrix/test/test_matrixworkspacedisplay_model.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/python/mantidqt/widgets/workspacedisplay/matrix/test/test_matrixworkspacedisplay_presenter.py b/qt/python/mantidqt/widgets/workspacedisplay/matrix/test/test_matrixworkspacedisplay_presenter.py index 0edfbcde18bde77f6ce33412e15e87413d91f65f..a77180a93d094ebc055d2f4fb8034a37d0093ad5 100644 --- a/qt/python/mantidqt/widgets/workspacedisplay/matrix/test/test_matrixworkspacedisplay_presenter.py +++ b/qt/python/mantidqt/widgets/workspacedisplay/matrix/test/test_matrixworkspacedisplay_presenter.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/python/mantidqt/widgets/workspacedisplay/matrix/test/test_matrixworkspacedisplay_table_view_model.py b/qt/python/mantidqt/widgets/workspacedisplay/matrix/test/test_matrixworkspacedisplay_table_view_model.py index 59efbbac08ca9dbd514e4ef6c5093924504a1268..735478410934f3c71ec27fba3f700fedd218afd6 100644 --- a/qt/python/mantidqt/widgets/workspacedisplay/matrix/test/test_matrixworkspacedisplay_table_view_model.py +++ b/qt/python/mantidqt/widgets/workspacedisplay/matrix/test/test_matrixworkspacedisplay_table_view_model.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/python/mantidqt/widgets/workspacedisplay/matrix/test/test_matrixworkspacedisplay_view.py b/qt/python/mantidqt/widgets/workspacedisplay/matrix/test/test_matrixworkspacedisplay_view.py index a78cc90f63d69fdf93d8a14d3055aea657ca3f2b..3e6e906b83da15fe3377856e2cf250438f8f1b65 100644 --- a/qt/python/mantidqt/widgets/workspacedisplay/matrix/test/test_matrixworkspacedisplay_view.py +++ b/qt/python/mantidqt/widgets/workspacedisplay/matrix/test/test_matrixworkspacedisplay_view.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. from __future__ import absolute_import diff --git a/qt/python/mantidqt/widgets/workspacedisplay/matrix/view.py b/qt/python/mantidqt/widgets/workspacedisplay/matrix/view.py index 50e4d04543d7166367c2742707b7e5f3c845f1f9..ddca1f42eb15301b57066abc8a26993ed0d59c35 100644 --- a/qt/python/mantidqt/widgets/workspacedisplay/matrix/view.py +++ b/qt/python/mantidqt/widgets/workspacedisplay/matrix/view.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/python/mantidqt/widgets/workspacedisplay/status_bar_view.py b/qt/python/mantidqt/widgets/workspacedisplay/status_bar_view.py index debc348a5494bba1d09ba09aa19b15b025584654..e9dce2c4ae81467036c9bf81bf72bdd73cdaf2b7 100644 --- a/qt/python/mantidqt/widgets/workspacedisplay/status_bar_view.py +++ b/qt/python/mantidqt/widgets/workspacedisplay/status_bar_view.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. from qtpy.QtCore import Qt, Signal, Slot diff --git a/qt/python/mantidqt/widgets/workspacedisplay/table/__init__.py b/qt/python/mantidqt/widgets/workspacedisplay/table/__init__.py index f208446445d959fb5d53399fafc5fd7045447235..3e0041231edb981a77d563eb31def66c57d735d9 100644 --- a/qt/python/mantidqt/widgets/workspacedisplay/table/__init__.py +++ b/qt/python/mantidqt/widgets/workspacedisplay/table/__init__.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package. from mantidqt.project.decoderfactory import DecoderFactory diff --git a/qt/python/mantidqt/widgets/workspacedisplay/table/__main__.py b/qt/python/mantidqt/widgets/workspacedisplay/table/__main__.py index f0cd9db01f6b6481f5b0f8ef22a4c31acf923146..3f3e143a6e549f233d3809eccf824d0db7a2a7d3 100644 --- a/qt/python/mantidqt/widgets/workspacedisplay/table/__main__.py +++ b/qt/python/mantidqt/widgets/workspacedisplay/table/__main__.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package. diff --git a/qt/python/mantidqt/widgets/workspacedisplay/table/error_column.py b/qt/python/mantidqt/widgets/workspacedisplay/table/error_column.py index a8f53e8d13e62d40d6eb49ed4715b7209740d187..410006c5cb5fd0d2927a5d8882317fb5bbe7cad6 100644 --- a/qt/python/mantidqt/widgets/workspacedisplay/table/error_column.py +++ b/qt/python/mantidqt/widgets/workspacedisplay/table/error_column.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package. from __future__ import absolute_import diff --git a/qt/python/mantidqt/widgets/workspacedisplay/table/io.py b/qt/python/mantidqt/widgets/workspacedisplay/table/io.py index 227d109eff0df54539337efce89329427ca2fd3d..9eba54daa851b453f3eec04bd0f2ae9145be02bd 100644 --- a/qt/python/mantidqt/widgets/workspacedisplay/table/io.py +++ b/qt/python/mantidqt/widgets/workspacedisplay/table/io.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package. from mantid.api import AnalysisDataService as ADS # noqa diff --git a/qt/python/mantidqt/widgets/workspacedisplay/table/marked_columns.py b/qt/python/mantidqt/widgets/workspacedisplay/table/marked_columns.py index 256d613c7b1c4eb28fa07718ecf90a4758ced3bc..3cdd9b938c1a1865fb495b7b6633a00650ca521f 100644 --- a/qt/python/mantidqt/widgets/workspacedisplay/table/marked_columns.py +++ b/qt/python/mantidqt/widgets/workspacedisplay/table/marked_columns.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package. from __future__ import absolute_import diff --git a/qt/python/mantidqt/widgets/workspacedisplay/table/model.py b/qt/python/mantidqt/widgets/workspacedisplay/table/model.py index f9096fabb3125a6618447ad947ddab5007007851..99738ce70c2f3954e29dedcaa1a1a4cf299bb215 100644 --- a/qt/python/mantidqt/widgets/workspacedisplay/table/model.py +++ b/qt/python/mantidqt/widgets/workspacedisplay/table/model.py @@ -1,10 +1,10 @@ -# coding=utf-8 # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + +# coding=utf-8 # This file is part of the mantidqt package. from __future__ import (absolute_import, division, print_function) diff --git a/qt/python/mantidqt/widgets/workspacedisplay/table/plot_type.py b/qt/python/mantidqt/widgets/workspacedisplay/table/plot_type.py index a74e08595fa9dad9dbc11ef2f4497f8955a24989..d1bb5494ef84cf90470342aef3c00d0e3a52d24c 100644 --- a/qt/python/mantidqt/widgets/workspacedisplay/table/plot_type.py +++ b/qt/python/mantidqt/widgets/workspacedisplay/table/plot_type.py @@ -1,3 +1,9 @@ +# Mantid Repository : https://github.com/mantidproject/mantid +# +# Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS +# SPDX - License - Identifier: GPL - 3.0 + from enum import Enum diff --git a/qt/python/mantidqt/widgets/workspacedisplay/table/presenter.py b/qt/python/mantidqt/widgets/workspacedisplay/table/presenter.py index 6a244640c729ab119a14e74c7b19b0f1858542f3..ebf0f80798eccadd22ab986c91e28b7ea76d2ce4 100644 --- a/qt/python/mantidqt/widgets/workspacedisplay/table/presenter.py +++ b/qt/python/mantidqt/widgets/workspacedisplay/table/presenter.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of mantidqt package. from __future__ import absolute_import, division, print_function diff --git a/qt/python/mantidqt/widgets/workspacedisplay/table/test/__init__.py b/qt/python/mantidqt/widgets/workspacedisplay/table/test/__init__.py index 2542dc4ea67a9fb17d7f18f017e39f900655e23d..b4bf0064ff36baea47116c7d1090b9da96e3ebdd 100644 --- a/qt/python/mantidqt/widgets/workspacedisplay/table/test/__init__.py +++ b/qt/python/mantidqt/widgets/workspacedisplay/table/test/__init__.py @@ -1,7 +1,7 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. diff --git a/qt/python/mantidqt/widgets/workspacedisplay/table/test/test_tableworkspacedisplay_error_column.py b/qt/python/mantidqt/widgets/workspacedisplay/table/test/test_tableworkspacedisplay_error_column.py index 0d9dacf30959c852795217f7e7053e284226ec30..a3f1c1b07920cfee2720b93aa1606e00091996fe 100644 --- a/qt/python/mantidqt/widgets/workspacedisplay/table/test/test_tableworkspacedisplay_error_column.py +++ b/qt/python/mantidqt/widgets/workspacedisplay/table/test/test_tableworkspacedisplay_error_column.py @@ -1,3 +1,9 @@ +# Mantid Repository : https://github.com/mantidproject/mantid +# +# Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS +# SPDX - License - Identifier: GPL - 3.0 + import unittest from mantidqt.widgets.workspacedisplay.table.error_column import ErrorColumn diff --git a/qt/python/mantidqt/widgets/workspacedisplay/table/test/test_tableworkspacedisplay_io.py b/qt/python/mantidqt/widgets/workspacedisplay/table/test/test_tableworkspacedisplay_io.py index b2e571a629dcd1cdb5220d310d8b3fa481dfa543..3f27e21eca97bc43ab3c46b803d89bf6fa947dbd 100644 --- a/qt/python/mantidqt/widgets/workspacedisplay/table/test/test_tableworkspacedisplay_io.py +++ b/qt/python/mantidqt/widgets/workspacedisplay/table/test/test_tableworkspacedisplay_io.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/python/mantidqt/widgets/workspacedisplay/table/test/test_tableworkspacedisplay_marked_columns.py b/qt/python/mantidqt/widgets/workspacedisplay/table/test/test_tableworkspacedisplay_marked_columns.py index e776d15320db2e03e3a98856f01c7172628cc387..324f2c0ff30a472ff0474a5299803ca784de23b8 100644 --- a/qt/python/mantidqt/widgets/workspacedisplay/table/test/test_tableworkspacedisplay_marked_columns.py +++ b/qt/python/mantidqt/widgets/workspacedisplay/table/test/test_tableworkspacedisplay_marked_columns.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/python/mantidqt/widgets/workspacedisplay/table/test/test_tableworkspacedisplay_model.py b/qt/python/mantidqt/widgets/workspacedisplay/table/test/test_tableworkspacedisplay_model.py index 0390c1c36c989dc25586939a8720aeb588642420..fcd8ad23220319424c63246f32038eeb883826ae 100644 --- a/qt/python/mantidqt/widgets/workspacedisplay/table/test/test_tableworkspacedisplay_model.py +++ b/qt/python/mantidqt/widgets/workspacedisplay/table/test/test_tableworkspacedisplay_model.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/python/mantidqt/widgets/workspacedisplay/table/test/test_tableworkspacedisplay_presenter.py b/qt/python/mantidqt/widgets/workspacedisplay/table/test/test_tableworkspacedisplay_presenter.py index c4c2e4dc94431e570099c6e0ada269e6c2cd06f3..682f09c1820a8a6f0251f6888b28463ac9b635b3 100644 --- a/qt/python/mantidqt/widgets/workspacedisplay/table/test/test_tableworkspacedisplay_presenter.py +++ b/qt/python/mantidqt/widgets/workspacedisplay/table/test/test_tableworkspacedisplay_presenter.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/python/mantidqt/widgets/workspacedisplay/table/test/test_tableworkspacedisplay_view.py b/qt/python/mantidqt/widgets/workspacedisplay/table/test/test_tableworkspacedisplay_view.py index c2fedec2e71b92b316eebd9e813b277f631a1c5b..c2744fbc89393f7cb701ef2105a401aa1fc7c95a 100644 --- a/qt/python/mantidqt/widgets/workspacedisplay/table/test/test_tableworkspacedisplay_view.py +++ b/qt/python/mantidqt/widgets/workspacedisplay/table/test/test_tableworkspacedisplay_view.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. from __future__ import (absolute_import, print_function) diff --git a/qt/python/mantidqt/widgets/workspacedisplay/table/test/test_tableworkspacedisplay_workbench_table_widget_item.py b/qt/python/mantidqt/widgets/workspacedisplay/table/test/test_tableworkspacedisplay_workbench_table_widget_item.py index df9769869d236326462346ae583797491e748392..b21691ebf17459cd03d95c2f8f0c0c65d64ea590 100644 --- a/qt/python/mantidqt/widgets/workspacedisplay/table/test/test_tableworkspacedisplay_workbench_table_widget_item.py +++ b/qt/python/mantidqt/widgets/workspacedisplay/table/test/test_tableworkspacedisplay_workbench_table_widget_item.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/python/mantidqt/widgets/workspacedisplay/table/view.py b/qt/python/mantidqt/widgets/workspacedisplay/table/view.py index 8ef7355e016b134d776cbe27fc89264fcf02e994..dc7d2874e9a0cc643f3892ab8e5c916dd9cf9a30 100644 --- a/qt/python/mantidqt/widgets/workspacedisplay/table/view.py +++ b/qt/python/mantidqt/widgets/workspacedisplay/table/view.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package. from __future__ import (absolute_import, division, print_function) diff --git a/qt/python/mantidqt/widgets/workspacedisplay/table/workbench_table_widget_item.py b/qt/python/mantidqt/widgets/workspacedisplay/table/workbench_table_widget_item.py index d6d79bc2bde57ed4612f6981f092715ace748d26..4c9d7b4d28c2d0a6343d024632817a0142d53edd 100644 --- a/qt/python/mantidqt/widgets/workspacedisplay/table/workbench_table_widget_item.py +++ b/qt/python/mantidqt/widgets/workspacedisplay/table/workbench_table_widget_item.py @@ -1,3 +1,9 @@ +# Mantid Repository : https://github.com/mantidproject/mantid +# +# Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS +# SPDX - License - Identifier: GPL - 3.0 + from qtpy.QtCore import Qt from qtpy.QtWidgets import QTableWidgetItem diff --git a/qt/python/mantidqt/widgets/workspacedisplay/test/__init__.py b/qt/python/mantidqt/widgets/workspacedisplay/test/__init__.py index 2542dc4ea67a9fb17d7f18f017e39f900655e23d..b4bf0064ff36baea47116c7d1090b9da96e3ebdd 100644 --- a/qt/python/mantidqt/widgets/workspacedisplay/test/__init__.py +++ b/qt/python/mantidqt/widgets/workspacedisplay/test/__init__.py @@ -1,7 +1,7 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. diff --git a/qt/python/mantidqt/widgets/workspacedisplay/test/test_data_copier.py b/qt/python/mantidqt/widgets/workspacedisplay/test/test_data_copier.py index a72e1c4730da95c01012059c1f1ce67c20186c7f..b95ab45e14f6f8ad5ff5b99238f9eb0daf8c0211 100644 --- a/qt/python/mantidqt/widgets/workspacedisplay/test/test_data_copier.py +++ b/qt/python/mantidqt/widgets/workspacedisplay/test/test_data_copier.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. from unittest import TestCase diff --git a/qt/python/mantidqt/widgets/workspacedisplay/test/test_user_notifier.py b/qt/python/mantidqt/widgets/workspacedisplay/test/test_user_notifier.py index 70ef92df2b4681d02c970e739ef301f9a1caa203..4a2a244d43df151d98c177de11b6c05d13ec81db 100644 --- a/qt/python/mantidqt/widgets/workspacedisplay/test/test_user_notifier.py +++ b/qt/python/mantidqt/widgets/workspacedisplay/test/test_user_notifier.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. import sys diff --git a/qt/python/mantidqt/widgets/workspacedisplay/test_helper/__init__.py b/qt/python/mantidqt/widgets/workspacedisplay/test_helper/__init__.py index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..4c61b2b97ac90c3b7a2173f1a3ea44378718d5de 100644 --- a/qt/python/mantidqt/widgets/workspacedisplay/test_helper/__init__.py +++ b/qt/python/mantidqt/widgets/workspacedisplay/test_helper/__init__.py @@ -0,0 +1,6 @@ +# Mantid Repository : https://github.com/mantidproject/mantid +# +# Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS +# SPDX - License - Identifier: GPL - 3.0 + diff --git a/qt/python/mantidqt/widgets/workspacedisplay/user_notifier.py b/qt/python/mantidqt/widgets/workspacedisplay/user_notifier.py index 391d2c459e459d95527ee1bac6c42ab837360953..58f10cf15a4793599fe497aa7a373f85e7c4da12 100644 --- a/qt/python/mantidqt/widgets/workspacedisplay/user_notifier.py +++ b/qt/python/mantidqt/widgets/workspacedisplay/user_notifier.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. import sys diff --git a/qt/python/mantidqt/widgets/workspacewidget/__init__.py b/qt/python/mantidqt/widgets/workspacewidget/__init__.py index 0ed1114a078f17470b47f1996a8292f66e2a2401..d8dbec30ee3bdc6656073f3ae761ee9dbf57d412 100644 --- a/qt/python/mantidqt/widgets/workspacewidget/__init__.py +++ b/qt/python/mantidqt/widgets/workspacewidget/__init__.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package # diff --git a/qt/python/mantidqt/widgets/workspacewidget/algorithmhistorywindow.py b/qt/python/mantidqt/widgets/workspacewidget/algorithmhistorywindow.py index 25e55c81a11fca1bf058492df70b9db148c4f6bd..e811f53c2ffb73ced762f5b015f5ab1e45e6b8ce 100644 --- a/qt/python/mantidqt/widgets/workspacewidget/algorithmhistorywindow.py +++ b/qt/python/mantidqt/widgets/workspacewidget/algorithmhistorywindow.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/python/mantidqt/widgets/workspacewidget/mantidtreemodel.py b/qt/python/mantidqt/widgets/workspacewidget/mantidtreemodel.py index 5f27b097d87ed37c87d2b4c16d1ee60b0e930ddd..6dc646142c82dfcf0d8ce20eb03f030d279b5a15 100644 --- a/qt/python/mantidqt/widgets/workspacewidget/mantidtreemodel.py +++ b/qt/python/mantidqt/widgets/workspacewidget/mantidtreemodel.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package # diff --git a/qt/python/mantidqt/widgets/workspacewidget/test/__init__.py b/qt/python/mantidqt/widgets/workspacewidget/test/__init__.py index d2cfb75232dfb59fac674e2b49dba356e18ebbc1..ffedf5d542e31f4d22d7833e9c94f5003f02b3cb 100644 --- a/qt/python/mantidqt/widgets/workspacewidget/test/__init__.py +++ b/qt/python/mantidqt/widgets/workspacewidget/test/__init__.py @@ -1,6 +1,6 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + diff --git a/qt/python/mantidqt/widgets/workspacewidget/test/test_workspacetreewidget.py b/qt/python/mantidqt/widgets/workspacewidget/test/test_workspacetreewidget.py index 18fdac3a3e73c2beb5c9bb779ffee1bdaf78ab0e..18c0a2ad53a1a2a084c1ce409760208a3618a709 100644 --- a/qt/python/mantidqt/widgets/workspacewidget/test/test_workspacetreewidget.py +++ b/qt/python/mantidqt/widgets/workspacewidget/test/test_workspacetreewidget.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbench. # diff --git a/qt/python/mantidqt/widgets/workspacewidget/workspacetreewidget.py b/qt/python/mantidqt/widgets/workspacewidget/workspacetreewidget.py index b80ae3fde509d238a106e3297ad86f5620cbfd3c..d099ad33ed47a547a15dad98afae709dbaa7835f 100644 --- a/qt/python/mantidqt/widgets/workspacewidget/workspacetreewidget.py +++ b/qt/python/mantidqt/widgets/workspacewidget/workspacetreewidget.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantidqt package # diff --git a/qt/scientific_interfaces/CMakeLists.txt b/qt/scientific_interfaces/CMakeLists.txt index c9c727bd11f0203fd371da2da35fd11bafc35136..389dbf7e7c4a5089cc7c973e4d7098a74ed764f7 100644 --- a/qt/scientific_interfaces/CMakeLists.txt +++ b/qt/scientific_interfaces/CMakeLists.txt @@ -93,8 +93,7 @@ mtd_add_qt_tests(TARGET_NAME MantidQtScientificInterfacesTest DataObjects PythonInterfaceCore ${PYTHON_LIBRARIES} - ${GMOCK_LIBRARIES} - ${GTEST_LIBRARIES} + gmock ${POCO_LIBRARIES} ${Boost_LIBRARIES} QT4_LINK_LIBS @@ -155,8 +154,7 @@ mtd_add_qt_tests(TARGET_NAME MantidQtScientificInterfacesTest ${CORE_MANTIDLIBS} DataObjects PythonInterfaceCore - ${GMOCK_LIBRARIES} - ${GTEST_LIBRARIES} + gmock ${POCO_LIBRARIES} ${Boost_LIBRARIES} ${PYTHON_LIBRARIES} diff --git a/qt/scientific_interfaces/CreateInterfaceTemplate.py b/qt/scientific_interfaces/CreateInterfaceTemplate.py index 87a4357c0a3f893881594bc3fb2835d73f65cbd6..f7304982746dbb61da7751af60f14bd1ab60447c 100644 --- a/qt/scientific_interfaces/CreateInterfaceTemplate.py +++ b/qt/scientific_interfaces/CreateInterfaceTemplate.py @@ -2,8 +2,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #---------------------------------------------------------------- # Creates a new sub-class to be used as diff --git a/qt/scientific_interfaces/Direct/ALFCustomInstrumentModel.cpp b/qt/scientific_interfaces/Direct/ALFCustomInstrumentModel.cpp index f2c58b4ef21f1451801fc795c131c21445b6db8b..1b7db4b2effe76da02ca0885d3fa297ced25b5ab 100644 --- a/qt/scientific_interfaces/Direct/ALFCustomInstrumentModel.cpp +++ b/qt/scientific_interfaces/Direct/ALFCustomInstrumentModel.cpp @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #include "ALFCustomInstrumentModel.h" #include "MantidAPI/Algorithm.h" #include "MantidAPI/AlgorithmManager.h" diff --git a/qt/scientific_interfaces/Direct/ALFCustomInstrumentModel.h b/qt/scientific_interfaces/Direct/ALFCustomInstrumentModel.h index b76b2897f66f697db1fe31001d88a658a91ff637..fc91c7cbc2b35b933f9d48322e93754106dc7fd1 100644 --- a/qt/scientific_interfaces/Direct/ALFCustomInstrumentModel.h +++ b/qt/scientific_interfaces/Direct/ALFCustomInstrumentModel.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Direct/ALFCustomInstrumentPresenter.cpp b/qt/scientific_interfaces/Direct/ALFCustomInstrumentPresenter.cpp index c9f23955d076313a00d7ddb66a27d2ba2446e292..aa60f7f1306b071df28c8e254031512251d9d957 100644 --- a/qt/scientific_interfaces/Direct/ALFCustomInstrumentPresenter.cpp +++ b/qt/scientific_interfaces/Direct/ALFCustomInstrumentPresenter.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "ALFCustomInstrumentPresenter.h" #include "ALFCustomInstrumentModel.h" diff --git a/qt/scientific_interfaces/Direct/ALFCustomInstrumentPresenter.h b/qt/scientific_interfaces/Direct/ALFCustomInstrumentPresenter.h index e5031cadcad70bee8ba201ed62e136dd98e312e5..46cabd0067abbd8ff5b608aa28597c020a14aa96 100644 --- a/qt/scientific_interfaces/Direct/ALFCustomInstrumentPresenter.h +++ b/qt/scientific_interfaces/Direct/ALFCustomInstrumentPresenter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Direct/ALFCustomInstrumentView.cpp b/qt/scientific_interfaces/Direct/ALFCustomInstrumentView.cpp index 5ef3f7d3a3cec1271da1678b396c76b57468190f..916da8260701fbd5b9086ad92dd11ade90128e2e 100644 --- a/qt/scientific_interfaces/Direct/ALFCustomInstrumentView.cpp +++ b/qt/scientific_interfaces/Direct/ALFCustomInstrumentView.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "ALFCustomInstrumentView.h" #include "MantidQtWidgets/InstrumentView/InstrumentWidgetPickTab.h" @@ -11,6 +11,7 @@ #include <QSizePolicy> #include <QSpacerItem> #include <QVBoxLayout> +#include <utility> namespace MantidQt { namespace CustomInterfaces { @@ -90,8 +91,8 @@ void ALFCustomInstrumentView::setupAnalysisPane( BaseCustomInstrumentView::setupInstrumentAnalysisSplitters(analysis); } -void ALFCustomInstrumentView::addSpectrum(std::string wsName) { - m_analysisPane->addSpectrum(wsName); +void ALFCustomInstrumentView::addSpectrum(const std::string &wsName) { + m_analysisPane->addSpectrum(std::move(wsName)); } } // namespace CustomInterfaces diff --git a/qt/scientific_interfaces/Direct/ALFCustomInstrumentView.h b/qt/scientific_interfaces/Direct/ALFCustomInstrumentView.h index a73720dd3a9b4a5473c74f4dd948b39db2144689..5eec9fbc802e664671758c069f15304491dbd7f6 100644 --- a/qt/scientific_interfaces/Direct/ALFCustomInstrumentView.h +++ b/qt/scientific_interfaces/Direct/ALFCustomInstrumentView.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -35,7 +35,7 @@ public: &binders) override; void addObserver(std::tuple<std::string, Observer *> &listener) override; - void addSpectrum(std::string wsName); + void addSpectrum(const std::string &wsName); void setupAnalysisPane(MantidWidgets::PlotFitAnalysisPaneView *analysis); public slots: diff --git a/qt/scientific_interfaces/Direct/ALFView.cpp b/qt/scientific_interfaces/Direct/ALFView.cpp index 80900df4c3f64855b64b32a8d9c10d04ffda6648..268dda6d87f29bb510d14e44098755f288d17902 100644 --- a/qt/scientific_interfaces/Direct/ALFView.cpp +++ b/qt/scientific_interfaces/Direct/ALFView.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "ALFView.h" #include "ALFCustomInstrumentModel.h" diff --git a/qt/scientific_interfaces/Direct/ALFView.h b/qt/scientific_interfaces/Direct/ALFView.h index 306b7783c6d830ee274f217455a15380b7aad6b9..b033dab2d94970ca40373739d8b2df52d201aba8 100644 --- a/qt/scientific_interfaces/Direct/ALFView.h +++ b/qt/scientific_interfaces/Direct/ALFView.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Direct/DllConfig.h b/qt/scientific_interfaces/Direct/DllConfig.h index ffa5f8e91a9175c58238c73e15f96cbe571068ff..1b5df66b1f4991a123d40dab55111b73163395ad 100644 --- a/qt/scientific_interfaces/Direct/DllConfig.h +++ b/qt/scientific_interfaces/Direct/DllConfig.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/DynamicPDF/DPDFBackgroundRemover.cpp b/qt/scientific_interfaces/DynamicPDF/DPDFBackgroundRemover.cpp index 9064d38947f967af87b1056aa9a944b988eea35f..fe6c77077c2f57ec9aea4c71f23cc7915ad9dafe 100644 --- a/qt/scientific_interfaces/DynamicPDF/DPDFBackgroundRemover.cpp +++ b/qt/scientific_interfaces/DynamicPDF/DPDFBackgroundRemover.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + // Mantid Coding standars <http://www.mantidproject.org/Coding_Standards> // Main Module Header diff --git a/qt/scientific_interfaces/DynamicPDF/DPDFBackgroundRemover.h b/qt/scientific_interfaces/DynamicPDF/DPDFBackgroundRemover.h index b6f35d1661a6e4a95f4bd2355d2926a8e05ecab2..f602fdc65bcec54b6e74704a13c9cfa0b77578b4 100644 --- a/qt/scientific_interfaces/DynamicPDF/DPDFBackgroundRemover.h +++ b/qt/scientific_interfaces/DynamicPDF/DPDFBackgroundRemover.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/DynamicPDF/DPDFDisplayControl.cpp b/qt/scientific_interfaces/DynamicPDF/DPDFDisplayControl.cpp index 2886ccb8e43714eb17003f5c5642d2824c03a3b8..ccea1efc50b9b6a494d73b6ebf785745de2f2f78 100644 --- a/qt/scientific_interfaces/DynamicPDF/DPDFDisplayControl.cpp +++ b/qt/scientific_interfaces/DynamicPDF/DPDFDisplayControl.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + // Mantid Coding standars <http://www.mantidproject.org/Coding_Standards> // Main Module Header diff --git a/qt/scientific_interfaces/DynamicPDF/DPDFDisplayControl.h b/qt/scientific_interfaces/DynamicPDF/DPDFDisplayControl.h index 31d29023816ff3f65172361df97bea399b965e9d..33166cde11da085b374aeb49afded78dd5441371 100644 --- a/qt/scientific_interfaces/DynamicPDF/DPDFDisplayControl.h +++ b/qt/scientific_interfaces/DynamicPDF/DPDFDisplayControl.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/DynamicPDF/DPDFFitControl.cpp b/qt/scientific_interfaces/DynamicPDF/DPDFFitControl.cpp index 2073d74a2f89dce43792303d7d72e05a2ddd9936..6a49d01388e049238a031193f19f921f99203099 100644 --- a/qt/scientific_interfaces/DynamicPDF/DPDFFitControl.cpp +++ b/qt/scientific_interfaces/DynamicPDF/DPDFFitControl.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + // Mantid Coding standars <http://www.mantidproject.org/Coding_Standards> // Mantid Headers from the same project @@ -23,6 +23,7 @@ #include <QPushButton> #include <QSettings> #include <QSignalMapper> +#include <utility> namespace { Mantid::Kernel::Logger g_log("DynamicPDF"); @@ -312,7 +313,7 @@ void FitControl::fitIndividual(const bool &isEvaluation) { * @param fun A function from which to retrieve the parameters */ void FitControl::updateFunctionBrowser(Mantid::API::IFunction_sptr fun) { - m_functionBrowser->setFunction(fun); + m_functionBrowser->setFunction(std::move(fun)); } /* diff --git a/qt/scientific_interfaces/DynamicPDF/DPDFFitControl.h b/qt/scientific_interfaces/DynamicPDF/DPDFFitControl.h index e560d5a1422628f8da39e9f09fba2b08fe5945f2..6f7abafab8dba12929c55bd2064cd995dff8fbc2 100644 --- a/qt/scientific_interfaces/DynamicPDF/DPDFFitControl.h +++ b/qt/scientific_interfaces/DynamicPDF/DPDFFitControl.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/DynamicPDF/DPDFFitOptionsBrowser.cpp b/qt/scientific_interfaces/DynamicPDF/DPDFFitOptionsBrowser.cpp index 8290a22c7fcb8e689af20d0a14a60e2b1e91ec4e..d9a43f390e359e24600985f15146770ec874d87d 100644 --- a/qt/scientific_interfaces/DynamicPDF/DPDFFitOptionsBrowser.cpp +++ b/qt/scientific_interfaces/DynamicPDF/DPDFFitOptionsBrowser.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + // Mantid Coding standars <http://www.mantidproject.org/Coding_Standards> // Mantid Headers from the same project diff --git a/qt/scientific_interfaces/DynamicPDF/DPDFFitOptionsBrowser.h b/qt/scientific_interfaces/DynamicPDF/DPDFFitOptionsBrowser.h index 4f004cf618e29840a458f708c939a12730a50b9f..983c2689b71998531a075550cf1e11f03dd010f8 100644 --- a/qt/scientific_interfaces/DynamicPDF/DPDFFitOptionsBrowser.h +++ b/qt/scientific_interfaces/DynamicPDF/DPDFFitOptionsBrowser.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/DynamicPDF/DPDFFourierTransform.cpp b/qt/scientific_interfaces/DynamicPDF/DPDFFourierTransform.cpp index 154d07a9b6f1b2f52d657263e084a8e69fc97bf8..2e08839e5d1d9113e21278510ca2e866d0e15622 100644 --- a/qt/scientific_interfaces/DynamicPDF/DPDFFourierTransform.cpp +++ b/qt/scientific_interfaces/DynamicPDF/DPDFFourierTransform.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + // Mantid Coding standars <http://www.mantidproject.org/Coding_Standards> // Mantid Headers from the same project diff --git a/qt/scientific_interfaces/DynamicPDF/DPDFFourierTransform.h b/qt/scientific_interfaces/DynamicPDF/DPDFFourierTransform.h index 1df0147359b6a36eefb8f49f0abc1d855be5db87..3c1b69fa091348388fbfbe3bebc45ad7ecc2faad 100644 --- a/qt/scientific_interfaces/DynamicPDF/DPDFFourierTransform.h +++ b/qt/scientific_interfaces/DynamicPDF/DPDFFourierTransform.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/DynamicPDF/DPDFInputDataControl.cpp b/qt/scientific_interfaces/DynamicPDF/DPDFInputDataControl.cpp index d75a7ed328e8aae05152b9064d7bc781a07fa468..ed5a0550469f1dc96c5de4d778f01efc376c7675 100644 --- a/qt/scientific_interfaces/DynamicPDF/DPDFInputDataControl.cpp +++ b/qt/scientific_interfaces/DynamicPDF/DPDFInputDataControl.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + // Mantid Coding standars <http://www.mantidproject.org/Coding_Standards> // Main Module Header diff --git a/qt/scientific_interfaces/DynamicPDF/DPDFInputDataControl.h b/qt/scientific_interfaces/DynamicPDF/DPDFInputDataControl.h index fd9bc6331532ea49b0377f3f10bb9c546cacd6d6..a13147e352e9502fbb080d3ff5b1906ceb4d75a5 100644 --- a/qt/scientific_interfaces/DynamicPDF/DPDFInputDataControl.h +++ b/qt/scientific_interfaces/DynamicPDF/DPDFInputDataControl.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/DynamicPDF/DllConfig.h b/qt/scientific_interfaces/DynamicPDF/DllConfig.h index 79394e6e91ee882c32a23f37d4abf884bc598812..efae3733e1380f7d46442377b7508275d712eb64 100644 --- a/qt/scientific_interfaces/DynamicPDF/DllConfig.h +++ b/qt/scientific_interfaces/DynamicPDF/DllConfig.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/DynamicPDF/PrecompiledHeader.h b/qt/scientific_interfaces/DynamicPDF/PrecompiledHeader.h index 615c906d96f4ca5650f269d34d7bc61092dd5111..449a595e135794242211bf62b59cca3c2e7c9fa6 100644 --- a/qt/scientific_interfaces/DynamicPDF/PrecompiledHeader.h +++ b/qt/scientific_interfaces/DynamicPDF/PrecompiledHeader.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/DynamicPDF/SliceSelector.cpp b/qt/scientific_interfaces/DynamicPDF/SliceSelector.cpp index e273ee5130a05d579cc89ae643c5f89141bde4d3..3e19cc4ea053f62072f291a57ada3b9bf1457944 100644 --- a/qt/scientific_interfaces/DynamicPDF/SliceSelector.cpp +++ b/qt/scientific_interfaces/DynamicPDF/SliceSelector.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include <iomanip> // includes for workspace handling diff --git a/qt/scientific_interfaces/DynamicPDF/SliceSelector.h b/qt/scientific_interfaces/DynamicPDF/SliceSelector.h index 957401cd5961a6daf834ab218025528761af674d..6ef6de4724283625d2f904a3bd283eb6a2739745 100644 --- a/qt/scientific_interfaces/DynamicPDF/SliceSelector.h +++ b/qt/scientific_interfaces/DynamicPDF/SliceSelector.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/EnggDiffraction/EnggDiffFittingModel.cpp b/qt/scientific_interfaces/EnggDiffraction/EnggDiffFittingModel.cpp new file mode 100644 index 0000000000000000000000000000000000000000..24e3c22e00b125f8f7f52e95655bfb4b0c4d851a --- /dev/null +++ b/qt/scientific_interfaces/EnggDiffraction/EnggDiffFittingModel.cpp @@ -0,0 +1,609 @@ +// Mantid Repository : https://github.com/mantidproject/mantid +// +// Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, +// NScD Oak Ridge National Laboratory, European Spallation Source +// & Institut Laue - Langevin +// SPDX - License - Identifier: GPL - 3.0 + +#include "EnggDiffFittingModel.h" + +#include "MantidAPI/AlgorithmManager.h" +#include "MantidAPI/AnalysisDataService.h" +#include "MantidAPI/ITableWorkspace_fwd.h" +#include "MantidAPI/MatrixWorkspace.h" +#include "MantidAPI/Run.h" +#include "MantidAPI/TableRow.h" +#include "MantidAPI/WorkspaceFactory.h" +#include "MantidAPI/WorkspaceGroup.h" +#include "MantidKernel/PropertyWithValue.h" + +#include <algorithm> +#include <numeric> + +using namespace Mantid; + +namespace { // helpers + +bool isDigit(const std::string &text) { + return std::all_of(text.cbegin(), text.cend(), ::isdigit); +} + +} // anonymous namespace + +namespace MantidQt { +namespace CustomInterfaces { + +void EnggDiffFittingModel::addFocusedWorkspace( + const RunLabel &runLabel, const API::MatrixWorkspace_sptr &ws, + const std::string &filename) { + m_focusedWorkspaceMap.add(runLabel, ws); + m_wsFilenameMap.add(runLabel, filename); +} + +void EnggDiffFittingModel::addFitResults( + const RunLabel &runLabel, const Mantid::API::ITableWorkspace_sptr &ws) { + m_fitParamsMap.add(runLabel, ws); +} + +const std::string & +EnggDiffFittingModel::getWorkspaceFilename(const RunLabel &runLabel) const { + return m_wsFilenameMap.get(runLabel); +} + +Mantid::API::ITableWorkspace_sptr +EnggDiffFittingModel::getFitResults(const RunLabel &runLabel) const { + return m_fitParamsMap.get(runLabel); +} + +namespace { + +template <size_t S, typename T> +void removeFromRunMapAndADS(const RunLabel &runLabel, RunMap<S, T> &map, + Mantid::API::AnalysisDataServiceImpl &ADS) { + if (map.contains(runLabel)) { + const auto &name = map.get(runLabel)->getName(); + if (ADS.doesExist(name)) { + ADS.remove(name); + } + map.remove(runLabel); + } +} + +} // anonymous namespace + +void EnggDiffFittingModel::removeRun(const RunLabel &runLabel) { + m_wsFilenameMap.remove(runLabel); + + auto &ADS = Mantid::API::AnalysisDataService::Instance(); + removeFromRunMapAndADS(runLabel, m_focusedWorkspaceMap, ADS); + removeFromRunMapAndADS(runLabel, m_fittedPeaksMap, ADS); + removeFromRunMapAndADS(runLabel, m_alignedWorkspaceMap, ADS); + removeFromRunMapAndADS(runLabel, m_fitParamsMap, ADS); +} + +void EnggDiffFittingModel::setDifcTzero( + const RunLabel &runLabel, + const std::vector<GSASCalibrationParms> &calibParams) { + auto ws = getFocusedWorkspace(runLabel); + auto &run = ws->mutableRun(); + const std::string units = "none"; + + if (calibParams.empty()) { + run.addProperty<double>("difc", DEFAULT_DIFC, units, true); + run.addProperty<double>("difa", DEFAULT_DIFA, units, true); + run.addProperty<double>("tzero", DEFAULT_TZERO, units, true); + } else { + GSASCalibrationParms params(0, 0.0, 0.0, 0.0); + const auto found = std::find_if(calibParams.cbegin(), calibParams.cend(), + [&runLabel](const auto ¶mSet) { + return paramSet.bankid == runLabel.bank; + }); + if (found != calibParams.cend()) { + params = *found; + } + if (params.difc == 0) { + params = calibParams.front(); + } + + run.addProperty<double>("difc", params.difc, units, true); + run.addProperty<double>("difa", params.difa, units, false); + run.addProperty<double>("tzero", params.tzero, units, false); + } +} + +void EnggDiffFittingModel::enggFitPeaks(const RunLabel &runLabel, + const std::string &expectedPeaks) { + const auto ws = getFocusedWorkspace(runLabel); + auto enggFitPeaksAlg = + Mantid::API::AlgorithmManager::Instance().create("EnggFitPeaks"); + + enggFitPeaksAlg->initialize(); + enggFitPeaksAlg->setProperty("InputWorkspace", ws); + if (!expectedPeaks.empty()) { + enggFitPeaksAlg->setProperty("ExpectedPeaks", expectedPeaks); + } + enggFitPeaksAlg->setProperty("FittedPeaks", FIT_RESULTS_TABLE_NAME); + enggFitPeaksAlg->execute(); + + API::AnalysisDataServiceImpl &ADS = API::AnalysisDataService::Instance(); + const auto fitResultsTable = + ADS.retrieveWS<API::ITableWorkspace>(FIT_RESULTS_TABLE_NAME); + addFitResults(runLabel, fitResultsTable); +} + +void EnggDiffFittingModel::saveFitResultsToHDF5( + const std::vector<RunLabel> &runLabels, const std::string &filename) const { + std::vector<std::string> inputWorkspaces; + inputWorkspaces.reserve(runLabels.size()); + std::vector<std::string> runNumbers; + runNumbers.reserve(runLabels.size()); + std::vector<long> bankIDs; + bankIDs.reserve(runLabels.size()); + + for (const auto &runLabel : runLabels) { + const auto ws = getFitResults(runLabel); + const auto clonedWSName = "enggggui_fit_params_" + runLabel.runNumber + + "_" + std::to_string(runLabel.bank); + cloneWorkspace(ws, clonedWSName); + inputWorkspaces.emplace_back(clonedWSName); + runNumbers.emplace_back(runLabel.runNumber); + bankIDs.emplace_back(static_cast<long>(runLabel.bank)); + } + + auto saveAlg = Mantid::API::AlgorithmManager::Instance().create( + "EnggSaveSinglePeakFitResultsToHDF5"); + saveAlg->initialize(); + saveAlg->setProperty("InputWorkspaces", inputWorkspaces); + saveAlg->setProperty("RunNumbers", runNumbers); + saveAlg->setProperty("BankIDs", bankIDs); + saveAlg->setProperty("Filename", filename); + saveAlg->execute(); + + auto &ADS = API::AnalysisDataService::Instance(); + for (const auto &wsName : inputWorkspaces) { + ADS.remove(wsName); + } +} + +void EnggDiffFittingModel::createFittedPeaksWS(const RunLabel &runLabel) { + const auto fitFunctionParams = getFitResults(runLabel); + const auto focusedWS = getFocusedWorkspace(runLabel); + + const size_t numberOfPeaks = fitFunctionParams->rowCount(); + + for (size_t i = 0; i < numberOfPeaks; ++i) { + const auto functionDescription = createFunctionString(fitFunctionParams, i); + double startX, endX; + std::tie(startX, endX) = getStartAndEndXFromFitParams(fitFunctionParams, i); + + const std::string singlePeakWSName = + "__engggui_fitting_single_peak_" + std::to_string(i); + + evaluateFunction(functionDescription, focusedWS, singlePeakWSName, startX, + endX); + + cropWorkspace(singlePeakWSName, singlePeakWSName, 1, 1); + + rebinToFocusedWorkspace(singlePeakWSName, runLabel, singlePeakWSName); + + if (i == 0) { + cloneWorkspace(focusedWS, FITTED_PEAKS_WS_NAME); + setDataToClonedWS(singlePeakWSName, FITTED_PEAKS_WS_NAME); + } else { + const std::string clonedWSName = + "__engggui_cloned_peaks_" + std::to_string(i); + cloneWorkspace(focusedWS, clonedWSName); + setDataToClonedWS(singlePeakWSName, clonedWSName); + + appendSpectra(FITTED_PEAKS_WS_NAME, clonedWSName); + } + } + + const std::string alignedWSName = FOCUSED_WS_NAME + "_d"; + cloneWorkspace(focusedWS, alignedWSName); + alignDetectors(alignedWSName, alignedWSName); + + alignDetectors(FITTED_PEAKS_WS_NAME, FITTED_PEAKS_WS_NAME); + + const auto &ADS = Mantid::API::AnalysisDataService::Instance(); + + const auto fittedPeaksWS = + ADS.retrieveWS<Mantid::API::MatrixWorkspace>(FITTED_PEAKS_WS_NAME); + m_fittedPeaksMap.add(runLabel, fittedPeaksWS); + + const auto alignedFocusedWS = + ADS.retrieveWS<Mantid::API::MatrixWorkspace>(alignedWSName); + m_alignedWorkspaceMap.add(runLabel, alignedFocusedWS); +} + +size_t EnggDiffFittingModel::getNumFocusedWorkspaces() const { + return m_focusedWorkspaceMap.size(); +} + +bool EnggDiffFittingModel::hasFittedPeaksForRun( + const RunLabel &runLabel) const { + return m_fittedPeaksMap.contains(runLabel); +} + +Mantid::API::MatrixWorkspace_sptr +EnggDiffFittingModel::getAlignedWorkspace(const RunLabel &runLabel) const { + return m_alignedWorkspaceMap.get(runLabel); +} + +Mantid::API::MatrixWorkspace_sptr +EnggDiffFittingModel::getFittedPeaksWS(const RunLabel &runLabel) const { + return m_fittedPeaksMap.get(runLabel); +} + +void EnggDiffFittingModel::evaluateFunction( + const std::string &function, + const Mantid::API::MatrixWorkspace_sptr &inputWS, + const std::string &outputWSName, const double startX, const double endX) { + + auto evalFunctionAlg = + Mantid::API::AlgorithmManager::Instance().create("EvaluateFunction"); + evalFunctionAlg->initialize(); + evalFunctionAlg->setProperty("Function", function); + evalFunctionAlg->setProperty("InputWorkspace", inputWS); + evalFunctionAlg->setProperty("OutputWorkspace", outputWSName); + evalFunctionAlg->setProperty("StartX", startX); + evalFunctionAlg->setProperty("EndX", endX); + evalFunctionAlg->execute(); +} + +void EnggDiffFittingModel::cropWorkspace(const std::string &inputWSName, + const std::string &outputWSName, + const int startWSIndex, + const int endWSIndex) { + auto cropWSAlg = + Mantid::API::AlgorithmManager::Instance().create("CropWorkspace"); + cropWSAlg->initialize(); + cropWSAlg->setProperty("InputWorkspace", inputWSName); + cropWSAlg->setProperty("OutputWorkspace", outputWSName); + cropWSAlg->setProperty("StartWorkspaceIndex", startWSIndex); + cropWSAlg->setProperty("EndWorkspaceIndex", endWSIndex); + cropWSAlg->execute(); +} + +void EnggDiffFittingModel::rebinToFocusedWorkspace( + const std::string &wsToRebinName, const RunLabel &runLabelToMatch, + const std::string &outputWSName) { + auto rebinToWSAlg = + Mantid::API::AlgorithmManager::Instance().create("RebinToWorkspace"); + + rebinToWSAlg->initialize(); + rebinToWSAlg->setProperty("WorkspaceToRebin", wsToRebinName); + + const auto wsToMatch = getFocusedWorkspace(runLabelToMatch); + rebinToWSAlg->setProperty("WorkspaceToMatch", wsToMatch); + rebinToWSAlg->setProperty("OutputWorkspace", outputWSName); + rebinToWSAlg->execute(); +} + +void EnggDiffFittingModel::cloneWorkspace( + const Mantid::API::MatrixWorkspace_sptr &inputWorkspace, + const std::string &outputWSName) const { + auto cloneWSAlg = + Mantid::API::AlgorithmManager::Instance().create("CloneWorkspace"); + cloneWSAlg->initialize(); + cloneWSAlg->setProperty("InputWorkspace", inputWorkspace); + cloneWSAlg->setProperty("OutputWorkspace", outputWSName); + cloneWSAlg->execute(); +} + +void EnggDiffFittingModel::cloneWorkspace( + const Mantid::API::ITableWorkspace_sptr &inputWorkspace, + const std::string &outputWSName) const { + auto cloneWSAlg = + Mantid::API::AlgorithmManager::Instance().create("CloneWorkspace"); + cloneWSAlg->initialize(); + cloneWSAlg->setProperty("InputWorkspace", inputWorkspace); + cloneWSAlg->setProperty("OutputWorkspace", outputWSName); + cloneWSAlg->execute(); +} + +void EnggDiffFittingModel::setDataToClonedWS(const std::string &wsToCopyName, + const std::string &targetWSName) { + auto &ADS = Mantid::API::AnalysisDataService::Instance(); + auto wsToCopy = ADS.retrieveWS<Mantid::API::MatrixWorkspace>(wsToCopyName); + auto currentClonedWS = + ADS.retrieveWS<Mantid::API::MatrixWorkspace>(targetWSName); + currentClonedWS->mutableY(0) = wsToCopy->y(0); + currentClonedWS->mutableE(0) = wsToCopy->e(0); +} + +void EnggDiffFittingModel::appendSpectra(const std::string &ws1Name, + const std::string &ws2Name) const { + auto appendSpectraAlg = + Mantid::API::AlgorithmManager::Instance().create("AppendSpectra"); + + appendSpectraAlg->initialize(); + appendSpectraAlg->setProperty("InputWorkspace1", ws1Name); + appendSpectraAlg->setProperty("InputWorkspace2", ws2Name); + appendSpectraAlg->setProperty("OutputWorkspace", ws1Name); + appendSpectraAlg->execute(); +} + +std::tuple<double, double, double> EnggDiffFittingModel::getDifcDifaTzero( + const Mantid::API::MatrixWorkspace_const_sptr &ws) { + const auto run = ws->run(); + + const auto difc = run.getPropertyValueAsType<double>("difc"); + const auto difa = run.getPropertyValueAsType<double>("difa"); + const auto tzero = run.getPropertyValueAsType<double>("tzero"); + + return std::tuple<double, double, double>(difc, difa, tzero); +} + +Mantid::API::ITableWorkspace_sptr +EnggDiffFittingModel::createCalibrationParamsTable( + const Mantid::API::MatrixWorkspace_const_sptr &inputWS) { + double difc, difa, tzero; + std::tie(difc, difa, tzero) = getDifcDifaTzero(inputWS); + + auto calibrationParamsTable = + Mantid::API::WorkspaceFactory::Instance().createTable(); + + calibrationParamsTable->addColumn("int", "detid"); + calibrationParamsTable->addColumn("double", "difc"); + calibrationParamsTable->addColumn("double", "difa"); + calibrationParamsTable->addColumn("double", "tzero"); + + Mantid::API::TableRow row = calibrationParamsTable->appendRow(); + const auto &spectrum = inputWS->getSpectrum(0); + + Mantid::detid_t detID = *(spectrum.getDetectorIDs().cbegin()); + row << detID << difc << difa << tzero; + return calibrationParamsTable; +} + +void EnggDiffFittingModel::convertFromDistribution( + const Mantid::API::MatrixWorkspace_sptr &inputWS) { + auto convertFromDistAlg = Mantid::API::AlgorithmManager::Instance().create( + "ConvertFromDistribution"); + convertFromDistAlg->initialize(); + convertFromDistAlg->setProperty("Workspace", inputWS); + convertFromDistAlg->execute(); +} + +void EnggDiffFittingModel::alignDetectors(const std::string &inputWSName, + const std::string &outputWSName) { + const auto &ADS = Mantid::API::AnalysisDataService::Instance(); + const auto inputWS = + ADS.retrieveWS<Mantid::API::MatrixWorkspace>(inputWSName); + alignDetectors(inputWS, outputWSName); +} + +void EnggDiffFittingModel::alignDetectors( + const Mantid::API::MatrixWorkspace_sptr &inputWS, + const std::string &outputWSName) { + const auto calibrationParamsTable = createCalibrationParamsTable(inputWS); + + if (inputWS->isDistribution()) { + convertFromDistribution(inputWS); + } + + auto alignDetAlg = + Mantid::API::AlgorithmManager::Instance().create("AlignDetectors"); + alignDetAlg->initialize(); + alignDetAlg->setProperty("InputWorkspace", inputWS); + alignDetAlg->setProperty("OutputWorkspace", outputWSName); + alignDetAlg->setProperty("CalibrationWorkspace", calibrationParamsTable); + alignDetAlg->execute(); +} + +void EnggDiffFittingModel::loadWorkspace(const std::string &filename, + const std::string &wsName) { + auto loadAlg = API::AlgorithmManager::Instance().create("Load"); + loadAlg->setProperty("Filename", filename); + loadAlg->setProperty("OutputWorkspace", wsName); + loadAlg->execute(); +} + +void EnggDiffFittingModel::renameWorkspace(const API::Workspace_sptr &inputWS, + const std::string &newName) const { + auto renameAlg = API::AlgorithmManager::Instance().create("RenameWorkspace"); + renameAlg->setProperty("InputWorkspace", inputWS); + renameAlg->setProperty("OutputWorkspace", newName); + renameAlg->execute(); +} + +void EnggDiffFittingModel::groupWorkspaces( + const std::vector<std::string> &workspaceNames, + const std::string &outputWSName) { + auto groupAlg = API::AlgorithmManager::Instance().create("GroupWorkspaces"); + groupAlg->setProperty("InputWorkspaces", workspaceNames); + groupAlg->setProperty("OutputWorkspace", outputWSName); + groupAlg->execute(); +} + +API::MatrixWorkspace_sptr +EnggDiffFittingModel::getFocusedWorkspace(const RunLabel &runLabel) const { + return m_focusedWorkspaceMap.get(runLabel); +} + +void EnggDiffFittingModel::mergeTables( + const API::ITableWorkspace_sptr &tableToCopy, + const API::ITableWorkspace_sptr &targetTable) const { + for (size_t i = 0; i < tableToCopy->rowCount(); ++i) { + API::TableRow rowToCopy = tableToCopy->getRow(i); + API::TableRow newRow = targetTable->appendRow(); + + for (size_t j = 0; j < tableToCopy->columnCount(); ++j) { + double valueToCopy; + rowToCopy >> valueToCopy; + newRow << valueToCopy; + } + } +} + +void EnggDiffFittingModel::addAllFitResultsToADS() const { + auto fitParamsTable = Mantid::API::WorkspaceFactory::Instance().createTable(); + renameWorkspace(fitParamsTable, FIT_RESULTS_TABLE_NAME); + + const auto runLabels = getRunLabels(); + + for (const auto &runLabel : runLabels) { + const auto singleWSFitResults = getFitResults(runLabel); + + if (runLabel == *runLabels.begin()) { + // First element - copy column headings over + const auto columnHeaders = singleWSFitResults->getColumnNames(); + for (const auto &header : columnHeaders) { + fitParamsTable->addColumn("double", header); + } + } + mergeTables(singleWSFitResults, fitParamsTable); + } +} + +void EnggDiffFittingModel::addAllFittedPeaksToADS() const { + const auto runLabels = getRunLabels(); + if (runLabels.size() < 1) { + return; + } + const auto firstWSLabel = runLabels[0]; + auto fittedPeaksWS = getFittedPeaksWS(firstWSLabel); + cloneWorkspace(fittedPeaksWS, FITTED_PEAKS_WS_NAME); + + for (size_t i = 1; i < runLabels.size(); ++i) { + auto wsToAppend = getFittedPeaksWS(runLabels[i]); + appendSpectra(FITTED_PEAKS_WS_NAME, wsToAppend->getName()); + } +} + +namespace { + +std::string stripWSNameFromFilename(const std::string &fullyQualifiedFilename) { + std::vector<std::string> directories; + boost::split(directories, fullyQualifiedFilename, boost::is_any_of("\\/")); + const std::string filename = directories.back(); + std::vector<std::string> filenameSegments; + boost::split(filenameSegments, filename, boost::is_any_of(".")); + return filenameSegments[0]; +} +} // namespace + +void EnggDiffFittingModel::loadWorkspaces(const std::string &filenamesString) { + std::vector<std::string> filenames; + boost::split(filenames, filenamesString, boost::is_any_of(",")); + + std::vector<RunLabel> collectedRunLabels; + + for (const auto &filename : filenames) { + // Set ws name to filename first, in case we need to guess bank ID from it + const std::string temporaryWSName = stripWSNameFromFilename(filename); + loadWorkspace(filename, temporaryWSName); + + API::AnalysisDataServiceImpl &ADS = API::AnalysisDataService::Instance(); + auto ws_test = ADS.retrieveWS<API::Workspace>(temporaryWSName); + const auto ws = boost::dynamic_pointer_cast<API::MatrixWorkspace>(ws_test); + if (!ws) { + throw std::invalid_argument("Workspace is not a matrix workspace."); + } + const auto bank = guessBankID(ws); + const auto runNumber = std::to_string(ws->getRunNumber()); + RunLabel runLabel(runNumber, bank); + + addFocusedWorkspace(runLabel, ws, filename); + collectedRunLabels.emplace_back(runLabel); + } + + if (collectedRunLabels.size() == 1) { + auto ws = getFocusedWorkspace(collectedRunLabels[0]); + renameWorkspace(ws, FOCUSED_WS_NAME); + } else { + std::vector<std::string> workspaceNames; + std::transform(collectedRunLabels.begin(), collectedRunLabels.end(), + std::back_inserter(workspaceNames), + [&](const RunLabel &runLabel) { + return getFocusedWorkspace(runLabel)->getName(); + }); + groupWorkspaces(workspaceNames, FOCUSED_WS_NAME); + } +} + +std::vector<RunLabel> EnggDiffFittingModel::getRunLabels() const { + return m_focusedWorkspaceMap.getRunLabels(); +} + +size_t EnggDiffFittingModel::guessBankID( + const API::MatrixWorkspace_const_sptr &ws) const { + const static std::string bankIDName = "bankid"; + if (ws->run().hasProperty(bankIDName)) { + const auto log = dynamic_cast<Kernel::PropertyWithValue<int> *>( + ws->run().getLogData(bankIDName)); + return boost::lexical_cast<size_t>(log->value()); + } + + // couldn't get it from sample logs - try using the old naming convention + const std::string name = ws->getName(); + std::vector<std::string> chunks; + boost::split(chunks, name, boost::is_any_of("_")); + if (!chunks.empty()) { + const bool isNum = isDigit(chunks.back()); + if (isNum) { + try { + return boost::lexical_cast<size_t>(chunks.back()); + } catch (boost::exception &) { + // If we get a bad cast or something goes wrong then + // the file is probably not what we were expecting + // so throw a runtime error + throw std::runtime_error( + "Failed to fit file: The data was not what is expected. " + "Does the file contain a focused workspace?"); + } + } + } + + throw std::runtime_error("Could not guess run number from input workspace. " + "Are you sure it has been focused correctly?"); +} + +std::string EnggDiffFittingModel::createFunctionString( + const Mantid::API::ITableWorkspace_sptr &fitFunctionParams, + const size_t row) { + const auto A0 = fitFunctionParams->cell<double>(row, size_t(1)); + const auto A1 = fitFunctionParams->cell<double>(row, size_t(3)); + const auto I = fitFunctionParams->cell<double>(row, size_t(13)); + const auto A = fitFunctionParams->cell<double>(row, size_t(7)); + const auto B = fitFunctionParams->cell<double>(row, size_t(9)); + const auto X0 = fitFunctionParams->cell<double>(row, size_t(5)); + const auto S = fitFunctionParams->cell<double>(row, size_t(11)); + + const std::string function = + "name=LinearBackground,A0=" + boost::lexical_cast<std::string>(A0) + + ",A1=" + boost::lexical_cast<std::string>(A1) + + ";name=BackToBackExponential,I=" + boost::lexical_cast<std::string>(I) + + ",A=" + boost::lexical_cast<std::string>(A) + + ",B=" + boost::lexical_cast<std::string>(B) + + ",X0=" + boost::lexical_cast<std::string>(X0) + + ",S=" + boost::lexical_cast<std::string>(S); + return function; +} + +std::pair<double, double> EnggDiffFittingModel::getStartAndEndXFromFitParams( + const Mantid::API::ITableWorkspace_sptr &fitFunctionParams, + const size_t row) { + const auto X0 = fitFunctionParams->cell<double>(row, size_t(5)); + const auto S = fitFunctionParams->cell<double>(row, size_t(11)); + const double windowLeft = 9; + const double windowRight = 12; + + const auto startX = X0 - (windowLeft * S); + const auto endX = X0 + (windowRight * S); + return std::pair<double, double>(startX, endX); +} + +const std::string EnggDiffFittingModel::FOCUSED_WS_NAME = + "engggui_fitting_focused_ws"; +const std::string EnggDiffFittingModel::FIT_RESULTS_TABLE_NAME = + "engggui_fitting_fitpeaks_params"; +const std::string EnggDiffFittingModel::FITTED_PEAKS_WS_NAME = + "engggui_fitting_single_peaks"; + +const double EnggDiffFittingModel::DEFAULT_DIFA = 0.0; +const double EnggDiffFittingModel::DEFAULT_DIFC = 18400.0; +const double EnggDiffFittingModel::DEFAULT_TZERO = 4.0; + +} // namespace CustomInterfaces +} // namespace MantidQt diff --git a/qt/scientific_interfaces/EnggDiffraction/EnggDiffFittingModel.h b/qt/scientific_interfaces/EnggDiffraction/EnggDiffFittingModel.h new file mode 100644 index 0000000000000000000000000000000000000000..73d8b5f3f80d9d65cf007234cc493891c71183fb --- /dev/null +++ b/qt/scientific_interfaces/EnggDiffraction/EnggDiffFittingModel.h @@ -0,0 +1,152 @@ +// Mantid Repository : https://github.com/mantidproject/mantid +// +// Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, +// NScD Oak Ridge National Laboratory, European Spallation Source +// & Institut Laue - Langevin +// SPDX - License - Identifier: GPL - 3.0 + +#pragma once + +#include "DllConfig.h" +#include "IEnggDiffFittingModel.h" +#include "IEnggDiffractionCalibration.h" +#include "RunMap.h" + +#include <array> +#include <unordered_map> + +namespace MantidQt { +namespace CustomInterfaces { + +class MANTIDQT_ENGGDIFFRACTION_DLL EnggDiffFittingModel + : public IEnggDiffFittingModel { + +public: + Mantid::API::MatrixWorkspace_sptr + getFocusedWorkspace(const RunLabel &runLabel) const override; + + Mantid::API::MatrixWorkspace_sptr + getAlignedWorkspace(const RunLabel &runLabel) const override; + + Mantid::API::MatrixWorkspace_sptr + getFittedPeaksWS(const RunLabel &runLabel) const override; + + Mantid::API::ITableWorkspace_sptr + getFitResults(const RunLabel &runLabel) const override; + + const std::string & + getWorkspaceFilename(const RunLabel &runLabel) const override; + + void removeRun(const RunLabel &runLabel) override; + + void loadWorkspaces(const std::string &filenames) override; + + std::vector<RunLabel> getRunLabels() const override; + + void + setDifcTzero(const RunLabel &runLabel, + const std::vector<GSASCalibrationParms> &calibParams) override; + + void enggFitPeaks(const RunLabel &runLabel, + const std::string &expectedPeaks) override; + + void saveFitResultsToHDF5(const std::vector<RunLabel> &runLabels, + const std::string &filename) const override; + + void createFittedPeaksWS(const RunLabel &runLabel) override; + + size_t getNumFocusedWorkspaces() const override; + + void addAllFitResultsToADS() const override; + + void addAllFittedPeaksToADS() const override; + + bool hasFittedPeaksForRun(const RunLabel &runLabel) const override; + +protected: + void addFocusedWorkspace(const RunLabel &runLabel, + const Mantid::API::MatrixWorkspace_sptr &ws, + const std::string &filename); + + void addFitResults(const RunLabel &runLabel, + const Mantid::API::ITableWorkspace_sptr &ws); + + void mergeTables(const Mantid::API::ITableWorkspace_sptr &tableToCopy, + const Mantid::API::ITableWorkspace_sptr &targetTable) const; + +private: + static const size_t MAX_BANKS = 3; + static const double DEFAULT_DIFC; + static const double DEFAULT_DIFA; + static const double DEFAULT_TZERO; + static const std::string FOCUSED_WS_NAME; + static const std::string FIT_RESULTS_TABLE_NAME; + static const std::string FITTED_PEAKS_WS_NAME; + + RunMap<MAX_BANKS, Mantid::API::MatrixWorkspace_sptr> m_focusedWorkspaceMap; + RunMap<MAX_BANKS, std::string> m_wsFilenameMap; + RunMap<MAX_BANKS, Mantid::API::ITableWorkspace_sptr> m_fitParamsMap; + RunMap<MAX_BANKS, Mantid::API::MatrixWorkspace_sptr> m_fittedPeaksMap; + RunMap<MAX_BANKS, Mantid::API::MatrixWorkspace_sptr> m_alignedWorkspaceMap; + + std::string createFunctionString( + const Mantid::API::ITableWorkspace_sptr &fitFunctionParams, + const size_t row); + + std::pair<double, double> getStartAndEndXFromFitParams( + const Mantid::API::ITableWorkspace_sptr &fitFunctionParams, + const size_t row); + + void evaluateFunction(const std::string &function, + const Mantid::API::MatrixWorkspace_sptr &inputWS, + const std::string &outputWSName, const double startX, + const double endX); + + void cropWorkspace(const std::string &inputWSName, + const std::string &outputWSName, const int startWSIndex, + const int endWSIndex); + + void rebinToFocusedWorkspace(const std::string &wsToRebinName, + const RunLabel &runLabelToMatch, + const std::string &outputWSName); + + void cloneWorkspace(const Mantid::API::MatrixWorkspace_sptr &inputWorkspace, + const std::string &outputWSName) const; + + void cloneWorkspace(const Mantid::API::ITableWorkspace_sptr &inputWorkspace, + const std::string &outputWSName) const; + + void setDataToClonedWS(const std::string &wsToCopyName, + const std::string &targetWSName); + + void appendSpectra(const std::string &ws1Name, + const std::string &ws2Name) const; + + std::tuple<double, double, double> + getDifcDifaTzero(const Mantid::API::MatrixWorkspace_const_sptr &ws); + + Mantid::API::ITableWorkspace_sptr createCalibrationParamsTable( + const Mantid::API::MatrixWorkspace_const_sptr &inputWS); + + void + convertFromDistribution(const Mantid::API::MatrixWorkspace_sptr &inputWS); + + void alignDetectors(const std::string &inputWSName, + const std::string &outputWSName); + + void alignDetectors(const Mantid::API::MatrixWorkspace_sptr &inputWS, + const std::string &outputWSName); + + void loadWorkspace(const std::string &filename, const std::string &wsName); + + void renameWorkspace(const Mantid::API::Workspace_sptr &inputWS, + const std::string &newName) const; + + void groupWorkspaces(const std::vector<std::string> &workspaceNames, + const std::string &outputWSName); + + size_t + guessBankID(const Mantid::API::MatrixWorkspace_const_sptr & /*ws*/) const; +}; + +} // namespace CustomInterfaces +} // namespace MantidQt diff --git a/qt/scientific_interfaces/EnggDiffraction/EnggDiffFittingPresenter.cpp b/qt/scientific_interfaces/EnggDiffraction/EnggDiffFittingPresenter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6d24969f6b5a156fce07f4723efaa2a0e042fd85 --- /dev/null +++ b/qt/scientific_interfaces/EnggDiffraction/EnggDiffFittingPresenter.cpp @@ -0,0 +1,745 @@ +// Mantid Repository : https://github.com/mantidproject/mantid +// +// Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, +// NScD Oak Ridge National Laboratory, European Spallation Source +// & Institut Laue - Langevin +// SPDX - License - Identifier: GPL - 3.0 + +#include "EnggDiffFittingPresenter.h" +#include "EnggDiffFittingPresWorker.h" +#include "IEnggDiffFittingModel.h" +#include "MantidAPI/Algorithm.h" +#include "MantidAPI/Axis.h" +#include "MantidAPI/MatrixWorkspace.h" +#include "MantidAPI/Run.h" +#include "MantidAPI/WorkspaceFactory.h" +#include "MantidQtWidgets/Plotting/Qwt/QwtHelper.h" + +#include <boost/algorithm/string.hpp> +#include <boost/lexical_cast.hpp> +#include <cctype> +#include <fstream> +#include <utility> + +#include <Poco/DirectoryIterator.h> +#include <Poco/File.h> + +using namespace Mantid::API; +using namespace MantidQt::CustomInterfaces; + +namespace MantidQt { +namespace QwtHelper = API::QwtHelper; +namespace CustomInterfaces { + +namespace { +Mantid::Kernel::Logger g_log("EngineeringDiffractionGUI"); + +RunLabel runLabelFromListWidgetLabel(const std::string &listLabel) { + const size_t underscorePosition = listLabel.find_first_of("_"); + const auto runNumber = listLabel.substr(0, underscorePosition); + const auto bank = listLabel.substr(underscorePosition + 1); + + return RunLabel(runNumber, std::atoi(bank.c_str())); +} + +std::string listWidgetLabelFromRunLabel(const RunLabel &runLabel) { + return runLabel.runNumber + "_" + std::to_string(runLabel.bank); +} + +// Remove commas at the start and end of the string, +// as well as any adjacent to another (eg ,, gets corrected to ,) +std::string stripExtraCommas(std::string &expectedPeaks) { + if (!expectedPeaks.empty()) { + + g_log.debug() << "Validating the expected peak list.\n"; + + const auto comma = ','; + + for (size_t i = 0; i < expectedPeaks.size() - 1; i++) { + size_t j = i + 1; + + if (expectedPeaks[i] == comma && expectedPeaks[i] == expectedPeaks[j]) { + expectedPeaks.erase(j, 1); + i--; + + } else { + ++j; + } + } + + size_t strLength = expectedPeaks.length() - 1; + if (expectedPeaks.at(0) == ',') { + expectedPeaks.erase(0, 1); + strLength -= 1; + } + + if (expectedPeaks.at(strLength) == ',') { + expectedPeaks.erase(strLength, 1); + } + } + return expectedPeaks; +} + +std::string generateXAxisLabel(const Mantid::Kernel::Unit_const_sptr &unit) { + std::string label = unit->unitID(); + if (label == "TOF") { + label += " (us)"; + } else if (label == "dSpacing") { + label += " (A)"; + } + return label; +} +} // namespace + +/** + * Constructs a presenter for a fitting tab/widget view, which has a + * handle on the current calibration (produced and updated elsewhere). + * + * @param view the view that is attached to this presenter + * @param model the model that is attached to this presenter + * @param mainCalib provides the current calibration parameters/status + * @param mainParam provides current params and functions + */ +EnggDiffFittingPresenter::EnggDiffFittingPresenter( + IEnggDiffFittingView *view, std::unique_ptr<IEnggDiffFittingModel> model, + boost::shared_ptr<IEnggDiffractionCalibration> mainCalib, + boost::shared_ptr<IEnggDiffractionParam> mainParam) + : m_fittingFinishedOK(false), m_workerThread(nullptr), + m_mainCalib(std::move(mainCalib)), m_mainParam(std::move(mainParam)), + m_view(view), m_model(std::move(model)), m_viewHasClosed(false) {} + +EnggDiffFittingPresenter::~EnggDiffFittingPresenter() { cleanup(); } + +/** + * Close open sessions, kill threads etc., for a graceful window + * close/destruction + */ +void EnggDiffFittingPresenter::cleanup() { + // m_model->cleanup(); + + // this may still be running + if (m_workerThread) { + if (m_workerThread->isRunning()) { + g_log.notice() << "A fitting process is currently running, shutting " + "it down immediately...\n"; + m_workerThread->wait(10); + } + delete m_workerThread; + m_workerThread = nullptr; + } +} + +void EnggDiffFittingPresenter::notify( + IEnggDiffFittingPresenter::Notification notif) { + + // Check the view is valid - QT can send multiple notification + // signals in any order at any time. This means that it is possible + // to receive a shutdown signal and subsequently an input example + // for example. As we can't guarantee the state of the viewer + // after calling shutdown instead we shouldn't do anything after + if (m_viewHasClosed) { + return; + } + + switch (notif) { + + case IEnggDiffFittingPresenter::Start: + processStart(); + break; + + case IEnggDiffFittingPresenter::Load: + processLoad(); + break; + + case IEnggDiffFittingPresenter::FitPeaks: + processFitPeaks(); + break; + + case IEnggDiffFittingPresenter::FitAllPeaks: + processFitAllPeaks(); + break; + + case IEnggDiffFittingPresenter::addPeaks: + addPeakToList(); + break; + + case IEnggDiffFittingPresenter::browsePeaks: + browsePeaksToFit(); + break; + + case IEnggDiffFittingPresenter::savePeaks: + savePeakList(); + break; + + case IEnggDiffFittingPresenter::ShutDown: + processShutDown(); + break; + + case IEnggDiffFittingPresenter::LogMsg: + processLogMsg(); + break; + + case IEnggDiffFittingPresenter::selectRun: + processSelectRun(); + break; + + case IEnggDiffFittingPresenter::updatePlotFittedPeaks: + processUpdatePlotFitPeaks(); + break; + + case IEnggDiffFittingPresenter::removeRun: + processRemoveRun(); + break; + } +} + +std::vector<GSASCalibrationParms> +EnggDiffFittingPresenter::currentCalibration() const { + return m_mainCalib->currentCalibration(); +} + +Poco::Path +EnggDiffFittingPresenter::outFilesUserDir(const std::string &addToDir) const { + return m_mainParam->outFilesUserDir(addToDir); +} + +std::string EnggDiffFittingPresenter::userHDFRunFilename( + const std::string &runNumber) const { + return m_mainParam->userHDFRunFilename(runNumber); +} + +std::string EnggDiffFittingPresenter::userHDFMultiRunFilename( + const std::vector<RunLabel> &runLabels) const { + return m_mainParam->userHDFMultiRunFilename(runLabels); +} + +void EnggDiffFittingPresenter::startAsyncFittingWorker( + const std::vector<RunLabel> &runLabels, const std::string &expectedPeaks) { + + delete m_workerThread; + m_workerThread = new QThread(this); + EnggDiffFittingWorker *worker = + new EnggDiffFittingWorker(this, runLabels, expectedPeaks); + worker->moveToThread(m_workerThread); + + connect(m_workerThread, SIGNAL(started()), worker, SLOT(fitting())); + connect(worker, SIGNAL(finished()), this, SLOT(fittingFinished())); + // early delete of thread and worker + connect(m_workerThread, SIGNAL(finished()), m_workerThread, + SLOT(deleteLater()), Qt::DirectConnection); + connect(worker, SIGNAL(finished()), worker, SLOT(deleteLater())); + m_workerThread->start(); +} + +/** + * Takes a full file path as a string and attempts to get the base name + * of the file at that location and return it + * + * @param filePath The full path to get the basename of + * + * @return The base name (without ext) of the file + */ +std::string EnggDiffFittingPresenter::getBaseNameFromStr( + const std::string &filePath) const { + Poco::Path pocoPath = filePath; + return pocoPath.getBaseName(); +} + +void EnggDiffFittingPresenter::fittingFinished() { + if (!m_view) + return; + + if (m_fittingFinishedOK) { + + g_log.notice() << "The single peak fitting finished - the output " + "workspace is ready.\n"; + + m_view->showStatus("Single peak fitting process finished. Ready"); + + if (!m_view->listWidgetHasSelectedRow()) { + m_view->setFittingListWidgetCurrentRow(0); + } + + m_model->addAllFitResultsToADS(); + m_model->addAllFittedPeaksToADS(); + + try { + // should now plot the focused workspace when single peak fitting + // process fails + plotAlignedWorkspace(m_view->plotFittedPeaksEnabled()); + + } catch (std::runtime_error &re) { + g_log.error() << "Unable to finish the plotting of the graph for " + "engggui_fitting_focused_fitpeaks workspace. Error " + "description: " + + static_cast<std::string>(re.what()) + + " Please check also the log message for detail."; + } + g_log.notice() << "EnggDiffraction GUI: plotting of peaks for single peak " + "fits has completed. \n"; + + if (m_workerThread) { + delete m_workerThread; + m_workerThread = nullptr; + } + + } else { + // Fitting failed log and tidy up + g_log.warning() << "The single peak fitting did not finish correctly. " + "Please check a focused file was selected."; + if (m_workerThread) { + delete m_workerThread; + m_workerThread = nullptr; + } + + m_view->showStatus( + "Single peak fitting process did not complete successfully"); + } + // enable the GUI + m_view->enableFitAllButton(m_model->getNumFocusedWorkspaces() > 1); + m_view->enableCalibrateFocusFitUserActions(true); +} + +void EnggDiffFittingPresenter::processSelectRun() { updatePlot(); } + +void EnggDiffFittingPresenter::processStart() {} + +void EnggDiffFittingPresenter::processLoad() { + const std::string filenames = m_view->getFocusedFileNames(); + if (filenames.empty()) { + m_view->userWarning("No file selected", "Please enter filename(s) to load"); + return; + } + + try { + m_model->loadWorkspaces(filenames); + } catch (Poco::PathSyntaxException &ex) { + warnFileNotFound(ex); + return; + } catch (std::invalid_argument &ex) { + warnFileNotFound(ex); + return; + } catch (std::runtime_error &ex) { + warnFileNotFound(ex); + return; + } + + const auto runLabels = m_model->getRunLabels(); + std::vector<std::string> listWidgetLabels; + std::transform(runLabels.begin(), runLabels.end(), + std::back_inserter(listWidgetLabels), + [](const RunLabel &runLabel) { + return listWidgetLabelFromRunLabel(runLabel); + }); + m_view->enableFittingListWidget(true); + m_view->updateFittingListWidget(listWidgetLabels); + + m_view->enableFitAllButton(m_model->getNumFocusedWorkspaces() > 1); +} + +void EnggDiffFittingPresenter::processShutDown() { + m_viewHasClosed = true; + m_view->saveSettings(); + cleanup(); +} + +void EnggDiffFittingPresenter::processLogMsg() { + std::vector<std::string> msgs = m_view->logMsgs(); + for (const auto &msg : msgs) { + g_log.information() << msg << '\n'; + } +} + +void EnggDiffFittingPresenter::processUpdatePlotFitPeaks() { updatePlot(); } + +void EnggDiffFittingPresenter::processRemoveRun() { + const auto workspaceLabel = m_view->getFittingListWidgetCurrentValue(); + + if (workspaceLabel) { + const auto runLabel = runLabelFromListWidgetLabel(*workspaceLabel); + m_model->removeRun(runLabel); + + const auto runLabels = m_model->getRunLabels(); + std::vector<std::string> listWidgetLabels; + std::transform(runLabels.begin(), runLabels.end(), + std::back_inserter(listWidgetLabels), + [](const RunLabel &runLabel) { + return listWidgetLabelFromRunLabel(runLabel); + }); + m_view->updateFittingListWidget(listWidgetLabels); + } else { + m_view->userWarning("No run selected", + "Tried to remove run but no run was selected.\n" + "Please select a run and try again"); + } +} + +void EnggDiffFittingPresenter::processFitAllPeaks() { + std::string fittingPeaks = m_view->getExpectedPeaksInput(); + + const std::string normalisedPeakCentres = stripExtraCommas(fittingPeaks); + m_view->setPeakList(normalisedPeakCentres); + + const auto runLabels = m_model->getRunLabels(); + + g_log.debug() << "Focused files found are: " << normalisedPeakCentres << '\n'; + for (const auto &runLabel : runLabels) { + g_log.debug() << listWidgetLabelFromRunLabel(runLabel) << '\n'; + } + + if (!runLabels.empty()) { + + for (const auto &runLabel : runLabels) { + try { + validateFittingInputs(m_model->getWorkspaceFilename(runLabel), + normalisedPeakCentres); + } catch (std::invalid_argument &ia) { + m_view->userWarning("Error in the inputs required for fitting", + ia.what()); + return; + } + } + + g_log.notice() << "EnggDiffraction GUI: starting new multi-run " + << "single peak fits. This may take some seconds...\n"; + m_view->showStatus("Fitting multi-run single peaks..."); + + // disable GUI to avoid any double threads + m_view->enableCalibrateFocusFitUserActions(false); + m_view->enableFitAllButton(false); + + startAsyncFittingWorker(runLabels, normalisedPeakCentres); + } else { + m_view->userWarning("Error in the inputs required for fitting", + "No runs were loaded for fitting"); + } +} + +void EnggDiffFittingPresenter::processFitPeaks() { + const auto listLabel = m_view->getFittingListWidgetCurrentValue(); + + if (!listLabel) { + m_view->userWarning("No run selected", + "Please select a run to fit from the list"); + return; + } + + const auto runLabel = runLabelFromListWidgetLabel(*listLabel); + std::string fittingPeaks = m_view->getExpectedPeaksInput(); + + const std::string normalisedPeakCentres = stripExtraCommas(fittingPeaks); + m_view->setPeakList(normalisedPeakCentres); + + g_log.debug() << "the expected peaks are: " << normalisedPeakCentres << '\n'; + + const auto filename = m_model->getWorkspaceFilename(runLabel); + try { + validateFittingInputs(filename, normalisedPeakCentres); + } catch (std::invalid_argument &ia) { + m_view->userWarning("Error in the inputs required for fitting", ia.what()); + return; + } + + // disable so that user is forced to select file again + // otherwise empty vector will be passed + m_view->enableFitAllButton(false); + + const std::string outWSName = "engggui_fitting_fit_peak_ws"; + g_log.notice() << "EnggDiffraction GUI: starting new " + << "single peak fits into workspace '" << outWSName + << "'. This may take some seconds... \n"; + + m_view->showStatus("Fitting single peaks..."); + // disable GUI to avoid any double threads + m_view->enableCalibrateFocusFitUserActions(false); + + startAsyncFittingWorker({runLabel}, normalisedPeakCentres); +} + +void EnggDiffFittingPresenter::validateFittingInputs( + const std::string &focusedRunFilename, const std::string &expectedPeaks) { + if (focusedRunFilename.empty()) { + throw std::invalid_argument( + "Focused run filename cannot be empty and must be a valid file"); + } + + Poco::File file(focusedRunFilename); + if (!file.exists()) { + throw std::invalid_argument("The focused workspace file for single peak " + "fitting could not be found: " + + focusedRunFilename); + } + + if (expectedPeaks.empty()) { + g_log.warning() << "Expected peaks were not passed, via fitting interface, " + "the default list of " + "expected peaks will be utilised instead.\n"; + } + bool contains_non_digits = + expectedPeaks.find_first_not_of("0123456789,. ") != std::string::npos; + if (contains_non_digits) { + throw std::invalid_argument("The expected peaks provided " + expectedPeaks + + " is invalid, " + "fitting process failed. Please try again!"); + } +} + +void EnggDiffFittingPresenter::doFitting(const std::vector<RunLabel> &runLabels, + const std::string &expectedPeaks) { + m_fittingFinishedOK = false; + + for (const auto &runLabel : runLabels) { + g_log.notice() << "EnggDiffraction GUI: starting new fitting with run " + << runLabel.runNumber << " and bank " << runLabel.bank + << ". This may take a few seconds... \n"; + + // apply calibration to the focused workspace + m_model->setDifcTzero(runLabel, currentCalibration()); + + // run the algorithm EnggFitPeaks with workspace loaded above + // requires unit in Time of Flight + try { + m_model->enggFitPeaks(runLabel, expectedPeaks); + } catch (const std::runtime_error &exc) { + g_log.error() << "Could not run the algorithm EnggFitPeaks successfully." + << exc.what(); + // A userError should be used for this message once the threading has been + // looked into + return; + } catch (const Mantid::API::Algorithm::CancelException &) { + g_log.error() << "Fit terminated by user.\n"; + return; + } + + const auto outFilename = userHDFRunFilename(runLabel.runNumber); + m_model->saveFitResultsToHDF5({runLabel}, outFilename); + + m_model->createFittedPeaksWS(runLabel); + } + + if (runLabels.size() > 1) { + m_model->saveFitResultsToHDF5(runLabels, + userHDFMultiRunFilename(runLabels)); + } + m_fittingFinishedOK = true; +} + +void EnggDiffFittingPresenter::browsePeaksToFit() { + try { + const auto &userDir = outFilesUserDir(""); + std::string path = m_view->getOpenFile(userDir.toString()); + if (path.empty()) { + return; + } + + m_view->setPreviousDir(path); + std::string peaksData = readPeaksFile(path); + m_view->setPeakList(peaksData); + + } catch (std::runtime_error &re) { + m_view->userWarning( + "Unable to import the peaks from a file: ", + "File corrupted or could not be opened. Please try again" + + static_cast<std::string>(re.what()) + '\n'); + return; + } +} + +void EnggDiffFittingPresenter::addPeakToList() { + + if (m_view->peakPickerEnabled()) { + auto peakCentre = m_view->getPeakCentre(); + + std::stringstream stream; + stream << std::fixed << std::setprecision(4) << peakCentre; + auto strPeakCentre = stream.str(); + + auto curExpPeaksList = m_view->getExpectedPeaksInput(); + + std::string comma = ","; + + if (!curExpPeaksList.empty()) { + // when further peak added to list + + std::string lastTwoChr = + curExpPeaksList.substr(curExpPeaksList.size() - 2); + auto lastChr = curExpPeaksList.back(); + if (lastChr == ',' || lastTwoChr == ", ") { + curExpPeaksList.append(strPeakCentre); + } else { + curExpPeaksList.append(comma + strPeakCentre); + } + m_view->setPeakList(curExpPeaksList); + } else { + // when new peak given when list is empty + curExpPeaksList.append(strPeakCentre); + curExpPeaksList.append(comma); + m_view->setPeakList(curExpPeaksList); + } + } +} + +void EnggDiffFittingPresenter::savePeakList() { + try { + const auto &userDir = outFilesUserDir(""); + const auto &path = m_view->getSaveFile(userDir.toString()); + + if (path.empty()) { + return; + } + + fittingWriteFile(path); + } catch (std::runtime_error &re) { + m_view->userWarning( + "Unable to save the peaks file: ", + "Invalid file path or could not be saved. Error description : " + + static_cast<std::string>(re.what()) + '\n'); + return; + } +} + +std::string +EnggDiffFittingPresenter::readPeaksFile(const std::string &fileDir) { + std::string fileData = ""; + std::string line; + std::string comma = ", "; + + std::ifstream peakFile(fileDir); + + if (peakFile.is_open()) { + while (std::getline(peakFile, line)) { + fileData += line; + if (!peakFile.eof()) + fileData += comma; + } + peakFile.close(); + } + + else + fileData = ""; + + return fileData; +} + +void EnggDiffFittingPresenter::fittingWriteFile(const std::string &fileDir) { + std::ofstream outfile(fileDir.c_str()); + if (!outfile) { + m_view->userWarning("File not found", + "File " + fileDir + + " , could not be found. Please try again!"); + } else { + auto expPeaks = m_view->getExpectedPeaksInput(); + outfile << expPeaks; + } +} + +void EnggDiffFittingPresenter::updatePlot() { + const auto listLabel = m_view->getFittingListWidgetCurrentValue(); + if (listLabel) { + const auto runLabel = runLabelFromListWidgetLabel(*listLabel); + + const bool fitResultsExist = m_model->hasFittedPeaksForRun(runLabel); + const bool plotFittedPeaksEnabled = m_view->plotFittedPeaksEnabled(); + + if (fitResultsExist) { + plotAlignedWorkspace(plotFittedPeaksEnabled); + } else { + if (plotFittedPeaksEnabled) { + m_view->userWarning("Cannot plot fitted peaks", + "Cannot plot fitted peaks, as none have been " + "generated by a fit. Plotting focused workspace " + "instead."); + } + const auto ws = m_model->getFocusedWorkspace(runLabel); + plotFocusedFile(false, ws); + } + } +} + +bool EnggDiffFittingPresenter::isDigit(const std::string &text) const { + return std::all_of(text.cbegin(), text.cend(), ::isdigit); +} + +void EnggDiffFittingPresenter::warnFileNotFound(const std::exception &ex) { + m_view->showStatus("Error while loading focused run"); + m_view->userWarning("Invalid file selected", + "Mantid could not load the selected file, " + "or was unable to get necessary information." + "See the logger for more information"); + g_log.error("Failed to load file. Error message: "); + g_log.error(ex.what()); +} + +void EnggDiffFittingPresenter::plotFocusedFile( + bool plotSinglePeaks, const MatrixWorkspace_sptr &focusedPeaksWS) { + + try { + auto focusedData = QwtHelper::curveDataFromWs(focusedPeaksWS); + + // Check that the number of curves to plot isn't excessive + // lets cap it at 20 to begin with - this number could need + // raising but each curve creates about ~5 calls on the stack + // so keep the limit low. This will stop users using unfocused + // files which have 200+ curves to plot and will "freeze" Mantid + constexpr int maxCurves = 20; + + if (focusedData.size() > maxCurves) { + throw std::invalid_argument("Too many curves to plot." + " Is this a focused file?"); + } + + m_view->setDataVector( + focusedData, true, plotSinglePeaks, + generateXAxisLabel(focusedPeaksWS->getAxis(0)->unit())); + + } catch (std::runtime_error &re) { + g_log.error() + << "Unable to plot focused workspace on the canvas. " + << "Error description: " << re.what() + << " Please check also the previous log messages for details."; + + m_view->showStatus("Error while plotting the peaks fitted"); + throw; + } +} + +void EnggDiffFittingPresenter::plotAlignedWorkspace( + const bool plotFittedPeaks) { + try { + + // detaches previous plots from canvas + m_view->resetCanvas(); + + const auto listLabel = m_view->getFittingListWidgetCurrentValue(); + if (!listLabel) { + m_view->userWarning("Invalid run number or bank", + "Tried to plot a focused file which does not exist"); + return; + } + + const auto runLabel = runLabelFromListWidgetLabel(*listLabel); + const auto ws = m_model->getAlignedWorkspace(runLabel); + + // plots focused workspace + plotFocusedFile(m_fittingFinishedOK, ws); + + if (plotFittedPeaks) { + g_log.debug() << "single peaks fitting being plotted now.\n"; + auto singlePeaksWS = m_model->getFittedPeaksWS(runLabel); + auto singlePeaksData = QwtHelper::curveDataFromWs(singlePeaksWS); + m_view->setDataVector(singlePeaksData, false, true, + generateXAxisLabel(ws->getAxis(0)->unit())); + m_view->showStatus("Peaks fitted successfully"); + } + } catch (const std::runtime_error &) { + g_log.error() + << "Unable to finish of the plotting of the graph for " + "engggui_fitting_focused_fitpeaks workspace. Error " + "description. Please check also the log message for detail."; + + m_view->showStatus("Error while plotting the peaks fitted"); + throw; + } +} + +} // namespace CustomInterfaces +} // namespace MantidQt diff --git a/qt/scientific_interfaces/EnggDiffraction/EnggDiffFittingPresenter.h b/qt/scientific_interfaces/EnggDiffraction/EnggDiffFittingPresenter.h new file mode 100644 index 0000000000000000000000000000000000000000..79acf0ae5fe95d60aae3fb631c06482d7571619f --- /dev/null +++ b/qt/scientific_interfaces/EnggDiffraction/EnggDiffFittingPresenter.h @@ -0,0 +1,142 @@ +// Mantid Repository : https://github.com/mantidproject/mantid +// +// Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, +// NScD Oak Ridge National Laboratory, European Spallation Source +// & Institut Laue - Langevin +// SPDX - License - Identifier: GPL - 3.0 + +#pragma once + +#include "DllConfig.h" +#include "IEnggDiffFittingModel.h" +#include "IEnggDiffFittingPresenter.h" +#include "IEnggDiffFittingView.h" +#include "IEnggDiffractionCalibration.h" +#include "IEnggDiffractionParam.h" + +#include <string> +#include <vector> + +#include <QObject> + +class QThread; + +namespace MantidQt { +namespace CustomInterfaces { + +/** +Presenter for the fitting tab/widget of the enggineering diffraction +GUI (presenter as in the MVP Model-View-Presenter pattern). +*/ +// needs to be dll-exported for the tests +class MANTIDQT_ENGGDIFFRACTION_DLL EnggDiffFittingPresenter + : public QObject, + public IEnggDiffFittingPresenter, + public IEnggDiffractionCalibration, + public IEnggDiffractionParam { + // Q_OBJECT for 'connect' with thread/worker + Q_OBJECT + +public: + EnggDiffFittingPresenter( + IEnggDiffFittingView *view, std::unique_ptr<IEnggDiffFittingModel> model, + boost::shared_ptr<IEnggDiffractionCalibration> mainCalib, + boost::shared_ptr<IEnggDiffractionParam> mainParam); + ~EnggDiffFittingPresenter() override; + + void notify(IEnggDiffFittingPresenter::Notification notif) override; + + /// From the IEnggDiffractionCalibration interface + //@{ + std::vector<GSASCalibrationParms> currentCalibration() const override; + //@} + + /// From the IEnggDiffractionCalibration interface + //@{ + Poco::Path outFilesUserDir(const std::string &addToDir) const override; + //@} + + std::string userHDFRunFilename(const std::string &runNumber) const override; + std::string userHDFMultiRunFilename( + const std::vector<RunLabel> &runLabels) const override; + + /// the fitting hard work that a worker / thread will run + void doFitting(const std::vector<RunLabel> &runLabels, + const std::string &expectedPeaks); + + void plotFocusedFile(bool plotSinglePeaks, + const Mantid::API::MatrixWorkspace_sptr &focusedPeaksWS); + + void plotAlignedWorkspace(const bool plotFittedPeaks); + +protected: + void processStart(); + void processLoad(); + void processFitPeaks(); + void processFitAllPeaks(); + void processShutDown(); + void processLogMsg(); + void processUpdatePlotFitPeaks(); + void processRemoveRun(); + + /// clean shut down of model, view, etc. + void cleanup(); + +protected slots: + + void fittingFinished(); + +private: + void updatePlot(); + + bool isDigit(const std::string &text) const; + + void warnFileNotFound(const std::exception &ex); + + // Methods related single peak fits + virtual void startAsyncFittingWorker(const std::vector<RunLabel> &runLabels, + const std::string &expectedPeaks); + + std::string getBaseNameFromStr(const std::string &filePath) const; + + void validateFittingInputs(const std::string &focusedRunNo, + const std::string &expectedPeaks); + + void browsePeaksToFit(); + + void addPeakToList(); + + void savePeakList(); + + std::string readPeaksFile(const std::string &fileDir); + + void fittingWriteFile(const std::string &fileDir); + + // Holds the previous user input so we can short circuit further checks + std::string m_previousInput; + + /// true if the last fitting completed successfully + bool m_fittingFinishedOK; + + QThread *m_workerThread; + + /// interface for the 'current' calibration + boost::shared_ptr<IEnggDiffractionCalibration> m_mainCalib; + + /// interface for the 'current' calibration + boost::shared_ptr<IEnggDiffractionParam> m_mainParam; + + /// Associated view for this presenter (MVP pattern) + IEnggDiffFittingView *const m_view; + + /// Associated model for this presenter + std::unique_ptr<IEnggDiffFittingModel> m_model; + + /// Holds if the view is in the process of being closed + bool m_viewHasClosed; + + /// Handle the user selecting a different run to plot + void processSelectRun(); +}; + +} // namespace CustomInterfaces +} // namespace MantidQt \ No newline at end of file diff --git a/qt/scientific_interfaces/EnggDiffraction/EnggDiffFittingViewQtWidget.cpp b/qt/scientific_interfaces/EnggDiffraction/EnggDiffFittingViewQtWidget.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f2a1dc1100ad037563e9bb742edfd359f1d9ef92 --- /dev/null +++ b/qt/scientific_interfaces/EnggDiffraction/EnggDiffFittingViewQtWidget.cpp @@ -0,0 +1,577 @@ +// Mantid Repository : https://github.com/mantidproject/mantid +// +// Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, +// NScD Oak Ridge National Laboratory, European Spallation Source +// & Institut Laue - Langevin +// SPDX - License - Identifier: GPL - 3.0 + +#include "EnggDiffFittingViewQtWidget.h" +#include "EnggDiffFittingModel.h" +#include "EnggDiffFittingPresenter.h" +#include "MantidAPI/FunctionFactory.h" +#include "MantidAPI/IPeakFunction.h" + +#include "MantidQtWidgets/Common/AlgorithmInputHistory.h" +#include "MantidQtWidgets/Plotting/Qwt/PeakPicker.h" + +#include <array> +#include <iomanip> +#include <random> +#include <sstream> + +#include <boost/algorithm/string.hpp> +#include <boost/make_shared.hpp> + +#include <Poco/Path.h> + +#include <QEvent> +#include <QFileDialog> +#include <QHelpEvent> +#include <QSettings> +#include <utility> + +#include <qwt_plot_curve.h> +#include <qwt_plot_zoomer.h> +#include <qwt_symbol.h> + +using namespace Mantid::API; +using namespace MantidQt::CustomInterfaces; + +namespace MantidQt { +namespace CustomInterfaces { + +const std::string EnggDiffFittingViewQtWidget::g_settingsGroup = + "CustomInterfaces/EnggDiffraction/FittingView"; + +const std::string EnggDiffFittingViewQtWidget::g_peaksListExt = + "Peaks list File: CSV " + "(*.csv *.txt);;" + "Other extensions/all files (*)"; + +std::vector<std::string> EnggDiffFittingViewQtWidget::m_fitting_runno_dir_vec; + +EnggDiffFittingViewQtWidget::EnggDiffFittingViewQtWidget( + QWidget * /*parent*/, boost::shared_ptr<IEnggDiffractionUserMsg> mainMsg, + boost::shared_ptr<IEnggDiffractionSettings> mainSettings, + boost::shared_ptr<IEnggDiffractionCalibration> mainCalib, + boost::shared_ptr<IEnggDiffractionParam> mainParam, + boost::shared_ptr<IEnggDiffractionPythonRunner> mainPythonRunner, + boost::shared_ptr<IEnggDiffractionParam> fileSettings) + : IEnggDiffFittingView(), m_fittedDataVector(), + m_fileSettings(std::move(fileSettings)), + m_mainMsgProvider(std::move(mainMsg)), + m_mainSettings(std::move(mainSettings)), + m_mainPythonRunner(std::move(mainPythonRunner)), + m_presenter(boost::make_shared<EnggDiffFittingPresenter>( + this, std::make_unique<EnggDiffFittingModel>(), mainCalib, + mainParam)) { + + initLayout(); + m_presenter->notify(IEnggDiffFittingPresenter::Start); +} + +EnggDiffFittingViewQtWidget::~EnggDiffFittingViewQtWidget() { + m_presenter->notify(IEnggDiffFittingPresenter::ShutDown); + + for (auto curves : m_focusedDataVector) { + curves->detach(); + delete curves; + } + + for (auto curves : m_fittedDataVector) { + curves->detach(); + delete curves; + } +} + +void EnggDiffFittingViewQtWidget::initLayout() { + m_ui.setupUi(this); + + readSettings(); + doSetup(); +} + +void EnggDiffFittingViewQtWidget::doSetup() { + connect(m_ui.pushButton_fitting_browse_run_num, SIGNAL(released()), this, + SLOT(browseFitFocusedRun())); + + connect(m_ui.lineEdit_pushButton_run_num, SIGNAL(returnPressed()), this, + SLOT(loadClicked())); + + connect(m_ui.pushButton_fitting_browse_peaks, SIGNAL(released()), this, + SLOT(browseClicked())); + + connect(m_ui.pushButton_load, SIGNAL(released()), this, SLOT(loadClicked())); + + connect(m_ui.pushButton_fit, SIGNAL(released()), this, SLOT(fitClicked())); + + connect(m_ui.pushButton_fit_all, SIGNAL(released()), this, + SLOT(fitAllClicked())); + + // add peak by clicking the button + connect(m_ui.pushButton_select_peak, SIGNAL(released()), SLOT(setPeakPick())); + + connect(m_ui.pushButton_add_peak, SIGNAL(released()), SLOT(addClicked())); + + connect(m_ui.pushButton_save_peak_list, SIGNAL(released()), + SLOT(saveClicked())); + + connect(m_ui.pushButton_clear_peak_list, SIGNAL(released()), + SLOT(clearPeakList())); + + connect(m_ui.pushButton_plot_separate_window, SIGNAL(released()), + SLOT(plotSeparateWindow())); + + connect(m_ui.listWidget_fitting_run_num, + SIGNAL(itemClicked(QListWidgetItem *)), this, + SLOT(listWidget_fitting_run_num_clicked(QListWidgetItem *))); + + connect(m_ui.checkBox_plotFittedPeaks, SIGNAL(stateChanged(int)), this, + SLOT(plotFittedPeaksStateChanged())); + + // Tool-tip button + connect(m_ui.pushButton_tooltip, SIGNAL(released()), SLOT(showToolTipHelp())); + + // Remove run button + connect(m_ui.pushButton_remove_run, SIGNAL(released()), this, + SLOT(removeRunClicked())); + + m_ui.dataPlot->setCanvasBackground(Qt::white); + m_ui.dataPlot->setAxisTitle(QwtPlot::xBottom, "d-Spacing (A)"); + m_ui.dataPlot->setAxisTitle(QwtPlot::yLeft, "Counts (us)^-1"); + QFont font("MS Shell Dlg 2", 8); + m_ui.dataPlot->setAxisFont(QwtPlot::xBottom, font); + m_ui.dataPlot->setAxisFont(QwtPlot::yLeft, font); + + // constructor of the peakPicker + // XXX: Being a QwtPlotItem, should get deleted when m_ui.plot gets deleted + // (auto-delete option) + m_peakPicker = new MantidWidgets::PeakPicker(m_ui.dataPlot, Qt::red); + setPeakPickerEnabled(false); + + m_zoomTool = + new QwtPlotZoomer(QwtPlot::xBottom, QwtPlot::yLeft, + QwtPicker::DragSelection | QwtPicker::CornerToCorner, + QwtPicker::AlwaysOff, m_ui.dataPlot->canvas()); + m_zoomTool->setRubberBandPen(QPen(Qt::black)); + setZoomTool(false); +} + +void EnggDiffFittingViewQtWidget::readSettings() { + QSettings qs; + qs.beginGroup(QString::fromStdString(g_settingsGroup)); + + // user params + m_ui.lineEdit_pushButton_run_num->setText( + qs.value("user-params-fitting-focused-file", "").toString()); + m_ui.lineEdit_fitting_peaks->setText( + qs.value("user-params-fitting-peaks-to-fit", "").toString()); + + qs.endGroup(); +} + +void EnggDiffFittingViewQtWidget::saveSettings() const { + QSettings qs; + qs.beginGroup(QString::fromStdString(g_settingsGroup)); + + qs.setValue("user-params-fitting-focused-file", + m_ui.lineEdit_pushButton_run_num->text()); + qs.setValue("user-params-fitting-peaks-to-fit", + m_ui.lineEdit_fitting_peaks->text()); + + qs.endGroup(); +} + +void EnggDiffFittingViewQtWidget::enable(bool enable) { + m_ui.pushButton_fitting_browse_run_num->setEnabled(enable); + m_ui.pushButton_load->setEnabled(enable); + m_ui.lineEdit_pushButton_run_num->setEnabled(enable); + m_ui.pushButton_fitting_browse_peaks->setEnabled(enable); + m_ui.lineEdit_fitting_peaks->setEnabled(enable); + m_ui.pushButton_fit->setEnabled(enable); + m_ui.pushButton_clear_peak_list->setEnabled(enable); + m_ui.pushButton_save_peak_list->setEnabled(enable); + m_ui.groupBox_fititng_preview->setEnabled(enable); +} + +void EnggDiffFittingViewQtWidget::showStatus(const std::string &sts) { + m_mainMsgProvider->showStatus(sts); +} + +void EnggDiffFittingViewQtWidget::userWarning(const std::string &err, + const std::string &description) { + m_mainMsgProvider->userWarning(err, description); +} + +void EnggDiffFittingViewQtWidget::userError(const std::string &err, + const std::string &description) { + m_mainMsgProvider->userError(err, description); +} + +void EnggDiffFittingViewQtWidget::enableCalibrateFocusFitUserActions( + bool enable) { + m_mainMsgProvider->enableCalibrateFocusFitUserActions(enable); +} + +EnggDiffCalibSettings +EnggDiffFittingViewQtWidget::currentCalibSettings() const { + return m_mainSettings->currentCalibSettings(); +} + +std::string +EnggDiffFittingViewQtWidget::enggRunPythonCode(const std::string &pyCode) { + return m_mainPythonRunner->enggRunPythonCode(pyCode); +} + +void EnggDiffFittingViewQtWidget::loadClicked() { + m_presenter->notify(IEnggDiffFittingPresenter::Load); +} + +void EnggDiffFittingViewQtWidget::fitClicked() { + m_presenter->notify(IEnggDiffFittingPresenter::FitPeaks); +} + +void EnggDiffFittingViewQtWidget::fitAllClicked() { + m_presenter->notify(IEnggDiffFittingPresenter::FitAllPeaks); +} + +void EnggDiffFittingViewQtWidget::addClicked() { + m_presenter->notify(IEnggDiffFittingPresenter::addPeaks); +} + +void EnggDiffFittingViewQtWidget::browseClicked() { + m_presenter->notify(IEnggDiffFittingPresenter::browsePeaks); +} + +void EnggDiffFittingViewQtWidget::saveClicked() { + m_presenter->notify(IEnggDiffFittingPresenter::savePeaks); +} + +void EnggDiffFittingViewQtWidget::plotFittedPeaksStateChanged() { + m_presenter->notify(IEnggDiffFittingPresenter::updatePlotFittedPeaks); +} + +void EnggDiffFittingViewQtWidget::listWidget_fitting_run_num_clicked( + QListWidgetItem *) { + m_presenter->notify(IEnggDiffFittingPresenter::selectRun); +} + +void EnggDiffFittingViewQtWidget::removeRunClicked() { + m_presenter->notify(IEnggDiffFittingPresenter::removeRun); +} + +void EnggDiffFittingViewQtWidget::resetCanvas() { + // clear vector and detach curves to avoid plot crash + // when only plotting focused workspace + for (auto curves : m_fittedDataVector) { + if (curves) { + curves->detach(); + delete curves; + } + } + + if (m_fittedDataVector.size() > 0) + m_fittedDataVector.clear(); + + // set it as false as there will be no valid workspace to plot + m_ui.pushButton_plot_separate_window->setEnabled(false); +} + +void EnggDiffFittingViewQtWidget::setDataVector( + std::vector<boost::shared_ptr<QwtData>> &data, bool focused, + bool plotSinglePeaks, const std::string &xAxisLabel) { + + if (!plotSinglePeaks) { + // clear vector and detach curves to avoid plot crash + resetCanvas(); + } + m_ui.dataPlot->setAxisTitle(QwtPlot::xBottom, xAxisLabel.c_str()); + + // when only plotting focused workspace + if (focused) { + dataCurvesFactory(data, m_focusedDataVector, focused); + } else { + dataCurvesFactory(data, m_fittedDataVector, focused); + } +} + +void EnggDiffFittingViewQtWidget::dataCurvesFactory( + std::vector<boost::shared_ptr<QwtData>> &data, + std::vector<QwtPlotCurve *> &dataVector, bool focused) { + + // clear vector + for (auto curves : dataVector) { + if (curves) { + curves->detach(); + delete curves; + } + } + + if (dataVector.size() > 0) + dataVector.clear(); + resetView(); + + // dark colours could be removed so that the coloured peaks stand out more + const std::array<QColor, 16> QPenList{ + {Qt::white, Qt::red, Qt::darkRed, Qt::green, Qt::darkGreen, Qt::blue, + Qt::darkBlue, Qt::cyan, Qt::darkCyan, Qt::magenta, Qt::darkMagenta, + Qt::yellow, Qt::darkYellow, Qt::gray, Qt::lightGray, Qt::black}}; + + std::mt19937 gen; + std::uniform_int_distribution<std::size_t> dis(0, QPenList.size() - 1); + + for (size_t i = 0; i < data.size(); i++) { + auto *peak = data[i].get(); + + QwtPlotCurve *dataCurve = new QwtPlotCurve(); + if (!focused) { + dataCurve->setStyle(QwtPlotCurve::Lines); + auto randIndex = dis(gen); + dataCurve->setPen(QPen(QPenList[randIndex], 2)); + + // only set enabled when single peak workspace plotted + m_ui.pushButton_plot_separate_window->setEnabled(true); + } else { + dataCurve->setStyle(QwtPlotCurve::NoCurve); + // focused workspace in bg set as darkGrey crosses insted of line + dataCurve->setSymbol(QwtSymbol(QwtSymbol::XCross, QBrush(), + QPen(Qt::darkGray, 1), QSize(3, 3))); + } + dataCurve->setRenderHint(QwtPlotItem::RenderAntialiased, true); + + dataVector.emplace_back(dataCurve); + + dataVector[i]->setData(*peak); + dataVector[i]->attach(m_ui.dataPlot); + } + + m_ui.dataPlot->replot(); + m_zoomTool->setZoomBase(); + // enable zoom & select peak btn after the plotting on graph + setZoomTool(true); + m_ui.pushButton_select_peak->setEnabled(true); + data.clear(); +} + +void EnggDiffFittingViewQtWidget::setPeakPickerEnabled(bool enabled) { + m_peakPicker->setEnabled(enabled); + m_peakPicker->setVisible(enabled); + m_ui.dataPlot->replot(); // PeakPicker might get hidden/shown + m_ui.pushButton_add_peak->setEnabled(enabled); + if (enabled) { + QString btnText = "Reset Peak Selector"; + m_ui.pushButton_select_peak->setText(btnText); + } +} + +void EnggDiffFittingViewQtWidget::setPeakPicker( + const IPeakFunction_const_sptr &peak) { + m_peakPicker->setPeak(peak); + m_ui.dataPlot->replot(); +} + +double EnggDiffFittingViewQtWidget::getPeakCentre() const { + auto peak = m_peakPicker->peak(); + auto centre = peak->centre(); + return centre; +} + +bool EnggDiffFittingViewQtWidget::peakPickerEnabled() const { + return m_peakPicker->isEnabled(); +} + +void EnggDiffFittingViewQtWidget::setZoomTool(bool enabled) { + m_zoomTool->setEnabled(enabled); +} + +void EnggDiffFittingViewQtWidget::resetView() { + // Resets the view to a sensible default + // Auto scale the axis + m_ui.dataPlot->setAxisAutoScale(QwtPlot::xBottom); + m_ui.dataPlot->setAxisAutoScale(QwtPlot::yLeft); + + // Set this as the default zoom level + m_zoomTool->setZoomBase(true); +} + +std::string EnggDiffFittingViewQtWidget::getPreviousDir() const { + + QString prevPath = + MantidQt::API::AlgorithmInputHistory::Instance().getPreviousDirectory(); + + return prevPath.toStdString(); +} + +void EnggDiffFittingViewQtWidget::setPreviousDir(const std::string &path) { + QString qPath = QString::fromStdString(path); + MantidQt::API::AlgorithmInputHistory::Instance().setPreviousDirectory(qPath); +} + +std::string +EnggDiffFittingViewQtWidget::getOpenFile(const std::string &prevPath) { + + QString path(QFileDialog::getOpenFileName( + this, tr("Open Peaks To Fit"), QString::fromStdString(prevPath), + QString::fromStdString(g_peaksListExt))); + + return path.toStdString(); +} + +std::string +EnggDiffFittingViewQtWidget::getSaveFile(const std::string &prevPath) { + + QString path(QFileDialog::getSaveFileName( + this, tr("Save Expected Peaks List"), QString::fromStdString(prevPath), + QString::fromStdString(g_peaksListExt))); + + return path.toStdString(); +} + +void EnggDiffFittingViewQtWidget::browseFitFocusedRun() { + const auto &focusDir = m_fileSettings->outFilesUserDir("Focus").toString(); + std::string nexusFormat = "Nexus file with calibration table: NXS, NEXUS" + "(*.nxs *.nexus);;"; + + QStringList paths(QFileDialog::getOpenFileNames( + this, tr("Open Focused File "), QString::fromStdString(focusDir), + QString::fromStdString(nexusFormat))); + + if (paths.isEmpty()) { + return; + } + + setFocusedFileNames(paths.join(",").toStdString()); +} + +void EnggDiffFittingViewQtWidget::setFocusedFileNames( + const std::string &paths) { + m_ui.lineEdit_pushButton_run_num->setText(QString::fromStdString(paths)); +} + +std::string EnggDiffFittingViewQtWidget::getFocusedFileNames() const { + return m_ui.lineEdit_pushButton_run_num->text().toStdString(); +} + +void EnggDiffFittingViewQtWidget::enableFitAllButton(bool enable) const { + m_ui.pushButton_fit_all->setEnabled(enable); +} + +void EnggDiffFittingViewQtWidget::clearFittingListWidget() const { + m_ui.listWidget_fitting_run_num->clear(); +} + +void EnggDiffFittingViewQtWidget::enableFittingListWidget(bool enable) const { + m_ui.listWidget_fitting_run_num->setEnabled(enable); +} + +int EnggDiffFittingViewQtWidget::getFittingListWidgetCurrentRow() const { + return m_ui.listWidget_fitting_run_num->currentRow(); +} + +boost::optional<std::string> +EnggDiffFittingViewQtWidget::getFittingListWidgetCurrentValue() const { + if (listWidgetHasSelectedRow()) { + return m_ui.listWidget_fitting_run_num->currentItem()->text().toStdString(); + } + return boost::none; +} + +bool EnggDiffFittingViewQtWidget::listWidgetHasSelectedRow() const { + return m_ui.listWidget_fitting_run_num->selectedItems().size() != 0; +} + +void EnggDiffFittingViewQtWidget::updateFittingListWidget( + const std::vector<std::string> &rows) { + clearFittingListWidget(); + + for (const auto &rowLabel : rows) { + this->addRunNoItem(rowLabel); + } +} + +void EnggDiffFittingViewQtWidget::setFittingListWidgetCurrentRow( + int idx) const { + m_ui.listWidget_fitting_run_num->setCurrentRow(idx); +} + +bool EnggDiffFittingViewQtWidget::plotFittedPeaksEnabled() const { + return m_ui.checkBox_plotFittedPeaks->isChecked(); +} + +void EnggDiffFittingViewQtWidget::plotSeparateWindow() { + std::string pyCode = + + "fitting_single_peaks_twin_ws = \"__engggui_fitting_single_peaks_twin\"\n" + "if (mtd.doesExist(fitting_single_peaks_twin_ws)):\n" + " DeleteWorkspace(fitting_single_peaks_twin_ws)\n" + + "single_peak_ws = CloneWorkspace(InputWorkspace = " + "\"engggui_fitting_single_peaks\", OutputWorkspace = " + "fitting_single_peaks_twin_ws)\n" + "tot_spec = single_peak_ws.getNumberHistograms()\n" + + "spec_list = []\n" + "for i in range(0, tot_spec):\n" + " spec_list.append(i)\n" + + "fitting_plot = plotSpectrum(single_peak_ws, spec_list).activeLayer()\n" + "fitting_plot.setTitle(\"Engg GUI Single Peaks Fitting Workspace\")\n"; + + std::string status = m_mainPythonRunner->enggRunPythonCode(pyCode); + m_logMsgs.emplace_back("Plotted output focused data, with status string " + + status); + m_presenter->notify(IEnggDiffFittingPresenter::LogMsg); +} + +void EnggDiffFittingViewQtWidget::showToolTipHelp() { + // We need a the mouse click position relative to the widget + // and relative to the screen. We will set the mouse click position + // relative to widget to 0 as the global position of the mouse + // is what is considered when the tool tip is displayed + const QPoint relWidgetPosition(0, 0); + const QPoint mousePos = QCursor::pos(); + // Now fire the generated event to show a tool tip at the cursor + QEvent *toolTipEvent = + new QHelpEvent(QEvent::ToolTip, relWidgetPosition, mousePos); + QCoreApplication::sendEvent(m_ui.pushButton_tooltip, toolTipEvent); +} + +std::string EnggDiffFittingViewQtWidget::getExpectedPeaksInput() const { + + return m_ui.lineEdit_fitting_peaks->text().toStdString(); +} + +void EnggDiffFittingViewQtWidget::setPeakList( + const std::string &peakList) const { + m_ui.lineEdit_fitting_peaks->setText(QString::fromStdString(peakList)); +} + +void EnggDiffFittingViewQtWidget::addRunNoItem(std::string runNo) { + m_ui.listWidget_fitting_run_num->addItem(QString::fromStdString(runNo)); +} + +std::vector<std::string> EnggDiffFittingViewQtWidget::getFittingRunNumVec() { + return m_fitting_runno_dir_vec; +} + +void EnggDiffFittingViewQtWidget::setFittingRunNumVec( + std::vector<std::string> assignVec) { + // holds all the directories required + m_fitting_runno_dir_vec.clear(); + m_fitting_runno_dir_vec = assignVec; +} + +void EnggDiffFittingViewQtWidget::setPeakPick() { + auto bk2bk = + FunctionFactory::Instance().createFunction("BackToBackExponential"); + auto bk2bkFunc = boost::dynamic_pointer_cast<IPeakFunction>(bk2bk); + // set the peak to BackToBackExponential function + setPeakPicker(bk2bkFunc); + setPeakPickerEnabled(true); +} + +void EnggDiffFittingViewQtWidget::clearPeakList() { + m_ui.lineEdit_fitting_peaks->clear(); +} + +} // namespace CustomInterfaces +} // namespace MantidQt diff --git a/qt/scientific_interfaces/EnggDiffraction/EnggDiffGSASFittingModel.cpp b/qt/scientific_interfaces/EnggDiffraction/EnggDiffGSASFittingModel.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8a3b71e7e044b3c92d18296039dd9aab276f48ce --- /dev/null +++ b/qt/scientific_interfaces/EnggDiffraction/EnggDiffGSASFittingModel.cpp @@ -0,0 +1,353 @@ +// Mantid Repository : https://github.com/mantidproject/mantid +// +// Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, +// NScD Oak Ridge National Laboratory, European Spallation Source +// & Institut Laue - Langevin +// SPDX - License - Identifier: GPL - 3.0 + +#include "EnggDiffGSASFittingModel.h" + +#include "MantidAPI/AlgorithmManager.h" +#include "MantidAPI/AnalysisDataService.h" +#include "MantidAPI/MatrixWorkspace.h" +#include "MantidQtWidgets/Common/MantidAlgorithmMetatype.h" + +#include <boost/algorithm/string/join.hpp> +#include <utility> + +using namespace Mantid; + +namespace { + +std::string stripWSNameFromFilename(const std::string &fullyQualifiedFilename) { + std::vector<std::string> directories; + boost::split(directories, fullyQualifiedFilename, boost::is_any_of("\\/")); + const std::string filename = directories.back(); + std::vector<std::string> filenameSegments; + boost::split(filenameSegments, filename, boost::is_any_of(".")); + return filenameSegments[0]; +} + +std::string refinementMethodToString( + const MantidQt::CustomInterfaces::GSASRefinementMethod &method) { + switch (method) { + case MantidQt::CustomInterfaces::GSASRefinementMethod::PAWLEY: + return "Pawley refinement"; + case MantidQt::CustomInterfaces::GSASRefinementMethod::RIETVELD: + return "Rietveld refinement"; + default: + throw std::invalid_argument( + "Invalid refinement method: please contact the development team"); + } +} + +} // anonymous namespace + +namespace MantidQt { +namespace CustomInterfaces { + +EnggDiffGSASFittingModel::EnggDiffGSASFittingModel() { + qRegisterMetaType< + MantidQt::CustomInterfaces::GSASIIRefineFitPeaksOutputProperties>( + "GSASIIRefineFitPeaksOutputProperties"); + qRegisterMetaType<Mantid::API::IAlgorithm_sptr>("IAlgorithm_sptr"); + qRegisterMetaType<std::vector<GSASIIRefineFitPeaksOutputProperties>>( + "std::vector<GSASIIRefineFitPeaksOutputProperties>"); +} + +EnggDiffGSASFittingModel::~EnggDiffGSASFittingModel() { + if (m_workerThread) { + if (m_workerThread->isRunning()) { + m_workerThread->wait(10); + } + } +} + +void EnggDiffGSASFittingModel::addFitResultsToMaps( + const RunLabel &runLabel, const double rwp, const double sigma, + const double gamma, const API::ITableWorkspace_sptr &latticeParams) { + addRwp(runLabel, rwp); + addSigma(runLabel, sigma); + addGamma(runLabel, gamma); + addLatticeParams(runLabel, latticeParams); +} + +void EnggDiffGSASFittingModel::addLatticeParams( + const RunLabel &runLabel, const API::ITableWorkspace_sptr &table) { + m_latticeParamsMap.add(runLabel, table); +} + +void EnggDiffGSASFittingModel::addGamma(const RunLabel &runLabel, + const double gamma) { + m_gammaMap.add(runLabel, gamma); +} + +void EnggDiffGSASFittingModel::addRwp(const RunLabel &runLabel, + const double rwp) { + m_rwpMap.add(runLabel, rwp); +} + +void EnggDiffGSASFittingModel::addSigma(const RunLabel &runLabel, + const double sigma) { + m_sigmaMap.add(runLabel, sigma); +} + +namespace { + +std::string generateFittedPeaksWSName(const RunLabel &runLabel) { + return runLabel.runNumber + "_" + std::to_string(runLabel.bank) + + "_gsasii_fitted_peaks"; +} + +std::string generateLatticeParamsName(const RunLabel &runLabel) { + return runLabel.runNumber + "_" + std::to_string(runLabel.bank) + + "_lattice_params"; +} +} // namespace + +std::pair<API::IAlgorithm_sptr, GSASIIRefineFitPeaksOutputProperties> +EnggDiffGSASFittingModel::doGSASRefinementAlgorithm( + const GSASIIRefineFitPeaksParameters ¶ms) { + auto gsasAlg = + API::AlgorithmManager::Instance().create("GSASIIRefineFitPeaks"); + + gsasAlg->setProperty("RefinementMethod", + refinementMethodToString(params.refinementMethod)); + gsasAlg->setProperty("InputWorkspace", params.inputWorkspace); + gsasAlg->setProperty("InstrumentFile", params.instParamsFile); + gsasAlg->setProperty("PhaseInfoFiles", + boost::algorithm::join(params.phaseFiles, ",")); + gsasAlg->setProperty("PathToGSASII", params.gsasHome); + + if (params.dMin) { + gsasAlg->setProperty("PawleyDMin", *(params.dMin)); + } + if (params.negativeWeight) { + gsasAlg->setProperty("PawleyNegativeWeight", *(params.negativeWeight)); + } + if (params.xMin) { + gsasAlg->setProperty("XMin", *(params.xMin)); + } + if (params.xMax) { + gsasAlg->setProperty("XMax", *(params.xMax)); + } + gsasAlg->setProperty("RefineSigma", params.refineSigma); + gsasAlg->setProperty("RefineGamma", params.refineGamma); + + const auto outputWSName = generateFittedPeaksWSName(params.runLabel); + const auto latticeParamsName = generateLatticeParamsName(params.runLabel); + gsasAlg->setProperty("OutputWorkspace", outputWSName); + gsasAlg->setProperty("LatticeParameters", latticeParamsName); + gsasAlg->setProperty("SaveGSASIIProjectFile", params.gsasProjectFile); + gsasAlg->execute(); + + const double rwp = gsasAlg->getProperty("Rwp"); + const double sigma = gsasAlg->getProperty("Sigma"); + const double gamma = gsasAlg->getProperty("Gamma"); + + API::AnalysisDataServiceImpl &ADS = API::AnalysisDataService::Instance(); + const auto fittedPeaks = ADS.retrieveWS<API::MatrixWorkspace>(outputWSName); + const auto latticeParams = + ADS.retrieveWS<API::ITableWorkspace>(latticeParamsName); + return std::make_pair(gsasAlg, GSASIIRefineFitPeaksOutputProperties( + rwp, sigma, gamma, fittedPeaks, + latticeParams, params.runLabel)); +} + +void EnggDiffGSASFittingModel::doRefinements( + const std::vector<GSASIIRefineFitPeaksParameters> ¶ms) { + m_workerThread = std::make_unique<QThread>(this); + EnggDiffGSASFittingWorker *worker = + new EnggDiffGSASFittingWorker(this, params); + worker->moveToThread(m_workerThread.get()); + + connect(m_workerThread.get(), SIGNAL(started()), worker, + SLOT(doRefinements())); + connect(worker, + SIGNAL(refinementSuccessful(Mantid::API::IAlgorithm_sptr, + GSASIIRefineFitPeaksOutputProperties)), + this, + SLOT(processRefinementSuccessful( + Mantid::API::IAlgorithm_sptr, + const GSASIIRefineFitPeaksOutputProperties &))); + connect(worker, + SIGNAL(refinementsComplete( + Mantid::API::IAlgorithm_sptr, + std::vector<GSASIIRefineFitPeaksOutputProperties>)), + this, + SLOT(processRefinementsComplete( + Mantid::API::IAlgorithm_sptr, + const std::vector<GSASIIRefineFitPeaksOutputProperties> &))); + connect(worker, SIGNAL(refinementFailed(const std::string &)), this, + SLOT(processRefinementFailed(const std::string &))); + connect(worker, SIGNAL(refinementCancelled()), this, + SLOT(processRefinementCancelled())); + connect(m_workerThread.get(), SIGNAL(finished()), m_workerThread.get(), + SLOT(deleteLater())); + connect(worker, + SIGNAL(refinementSuccessful(Mantid::API::IAlgorithm_sptr, + GSASIIRefineFitPeaksOutputProperties)), + worker, SLOT(deleteLater())); + connect(worker, SIGNAL(refinementFailed(const std::string &)), worker, + SLOT(deleteLater())); + m_workerThread->start(); +} + +boost::optional<API::ITableWorkspace_sptr> +EnggDiffGSASFittingModel::getLatticeParams(const RunLabel &runLabel) const { + return getFromRunMapOptional(m_latticeParamsMap, runLabel); +} + +boost::optional<double> +EnggDiffGSASFittingModel::getGamma(const RunLabel &runLabel) const { + return getFromRunMapOptional(m_gammaMap, runLabel); +} + +boost::optional<double> +EnggDiffGSASFittingModel::getRwp(const RunLabel &runLabel) const { + return getFromRunMapOptional(m_rwpMap, runLabel); +} + +boost::optional<double> +EnggDiffGSASFittingModel::getSigma(const RunLabel &runLabel) const { + return getFromRunMapOptional(m_sigmaMap, runLabel); +} + +bool EnggDiffGSASFittingModel::hasFitResultsForRun( + const RunLabel &runLabel) const { + return m_rwpMap.contains(runLabel) && m_sigmaMap.contains(runLabel) && + m_gammaMap.contains(runLabel); +} + +Mantid::API::MatrixWorkspace_sptr +EnggDiffGSASFittingModel::loadFocusedRun(const std::string &filename) const { + const auto wsName = stripWSNameFromFilename(filename); + + auto loadAlg = API::AlgorithmManager::Instance().create("Load"); + loadAlg->setProperty("Filename", filename); + loadAlg->setProperty("OutputWorkspace", wsName); + loadAlg->execute(); + + API::AnalysisDataServiceImpl &ADS = API::AnalysisDataService::Instance(); + auto wsTest = ADS.retrieveWS<API::Workspace>(wsName); + const auto ws = boost::dynamic_pointer_cast<API::MatrixWorkspace>(wsTest); + if (!ws) { + throw std::invalid_argument( + "Invalid Workspace loaded, are you sure it has been focused?"); + } + return ws; +} + +void EnggDiffGSASFittingModel::processRefinementsComplete( + Mantid::API::IAlgorithm_sptr alg, + const std::vector<GSASIIRefineFitPeaksOutputProperties> + &refinementResultSets) { + m_observer->notifyRefinementsComplete(std::move(alg), refinementResultSets); +} + +void EnggDiffGSASFittingModel::processRefinementFailed( + const std::string &failureMessage) { + if (m_observer) { + m_observer->notifyRefinementFailed(failureMessage); + } +} + +void EnggDiffGSASFittingModel::processRefinementSuccessful( + API::IAlgorithm_sptr successfulAlgorithm, + const GSASIIRefineFitPeaksOutputProperties &refinementResults) { + addFitResultsToMaps(refinementResults.runLabel, refinementResults.rwp, + refinementResults.sigma, refinementResults.gamma, + refinementResults.latticeParamsWS); + if (m_observer) { + m_observer->notifyRefinementSuccessful(std::move(successfulAlgorithm), + refinementResults); + } +} + +void EnggDiffGSASFittingModel::processRefinementCancelled() { + if (m_observer) { + m_observer->notifyRefinementCancelled(); + } +} + +void EnggDiffGSASFittingModel::saveRefinementResultsToHDF5( + const Mantid::API::IAlgorithm_sptr successfulAlg, + const std::vector<GSASIIRefineFitPeaksOutputProperties> + &refinementResultSets, + const std::string &filename) const { + auto saveAlg = API::AlgorithmManager::Instance().create( + "EnggSaveGSASIIFitResultsToHDF5"); + + const auto numRuns = refinementResultSets.size(); + std::vector<std::string> latticeParamWSNames; + latticeParamWSNames.reserve(numRuns); + std::vector<std::string> runNumbers; + runNumbers.reserve(numRuns); + std::vector<long> bankIDs; + bankIDs.reserve(numRuns); + std::vector<double> sigmas; + sigmas.reserve(numRuns); + std::vector<double> gammas; + gammas.reserve(numRuns); + std::vector<double> rwps; + rwps.reserve(numRuns); + + const bool refineSigma = successfulAlg->getProperty("RefineSigma"); + saveAlg->setProperty("RefineSigma", refineSigma); + const bool refineGamma = successfulAlg->getProperty("RefineGamma"); + saveAlg->setProperty("RefineGamma", refineGamma); + + for (const auto &refinementResults : refinementResultSets) { + const auto &runLabel = refinementResults.runLabel; + const auto latticeParams = *getLatticeParams(runLabel); + + latticeParamWSNames.emplace_back(latticeParams->getName()); + runNumbers.emplace_back(runLabel.runNumber); + bankIDs.emplace_back(static_cast<long>(runLabel.bank)); + rwps.emplace_back(refinementResults.rwp); + + if (refineSigma) { + sigmas.emplace_back(refinementResults.sigma); + } + if (refineGamma) { + gammas.emplace_back(refinementResults.gamma); + } + } + + saveAlg->setProperty("LatticeParamWorkspaces", latticeParamWSNames); + saveAlg->setProperty("BankIDs", bankIDs); + saveAlg->setProperty("RunNumbers", runNumbers); + + const std::string refinementMethod = + successfulAlg->getProperty("RefinementMethod"); + saveAlg->setProperty("RefinementMethod", refinementMethod); + saveAlg->setProperty("XMin", successfulAlg->getPropertyValue("XMin")); + saveAlg->setProperty("XMax", successfulAlg->getPropertyValue("XMax")); + + if (refinementMethod == "Pawley refinement") { + saveAlg->setProperty("PawleyDMin", + successfulAlg->getPropertyValue("PawleyDMin")); + saveAlg->setProperty( + "PawleyNegativeWeight", + successfulAlg->getPropertyValue("PawleyNegativeWeight")); + } + + if (refineSigma) { + saveAlg->setProperty("Sigma", sigmas); + } + + if (refineGamma) { + saveAlg->setProperty("Gamma", gammas); + } + + saveAlg->setProperty("Rwp", rwps); + saveAlg->setProperty("Filename", filename); + saveAlg->execute(); +} + +void EnggDiffGSASFittingModel::setObserver( + boost::shared_ptr<IEnggDiffGSASFittingObserver> observer) { + m_observer = observer; +} + +} // namespace CustomInterfaces +} // namespace MantidQt diff --git a/qt/scientific_interfaces/EnggDiffraction/EnggDiffGSASFittingModel.h b/qt/scientific_interfaces/EnggDiffraction/EnggDiffGSASFittingModel.h new file mode 100644 index 0000000000000000000000000000000000000000..b8efb449f66462484d2220e6e779c25f9e698aae --- /dev/null +++ b/qt/scientific_interfaces/EnggDiffraction/EnggDiffGSASFittingModel.h @@ -0,0 +1,132 @@ +// Mantid Repository : https://github.com/mantidproject/mantid +// +// Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, +// NScD Oak Ridge National Laboratory, European Spallation Source +// & Institut Laue - Langevin +// SPDX - License - Identifier: GPL - 3.0 + +#pragma once + +#include "DllConfig.h" +#include "EnggDiffGSASFittingWorker.h" +#include "GSASIIRefineFitPeaksOutputProperties.h" +#include "IEnggDiffGSASFittingModel.h" +#include "IEnggDiffGSASFittingObserver.h" +#include "RunMap.h" + +#include "MantidAPI/IAlgorithm_fwd.h" + +#include <QObject> +#include <QThread> + +namespace MantidQt { +namespace CustomInterfaces { + +class MANTIDQT_ENGGDIFFRACTION_DLL EnggDiffGSASFittingModel + : public QObject, // Must be a QObject to run GSASIIRefineFitPeaksWorker + // asynchronously + public IEnggDiffGSASFittingModel { + Q_OBJECT + + friend void EnggDiffGSASFittingWorker::doRefinements(); + +public: + EnggDiffGSASFittingModel(); + + ~EnggDiffGSASFittingModel(); + + void setObserver( + boost::shared_ptr<IEnggDiffGSASFittingObserver> observer) override; + + void doRefinements( + const std::vector<GSASIIRefineFitPeaksParameters> ¶ms) override; + + boost::optional<Mantid::API::ITableWorkspace_sptr> + getLatticeParams(const RunLabel &runLabel) const override; + + boost::optional<double> getGamma(const RunLabel &runLabel) const override; + + boost::optional<double> getRwp(const RunLabel &runLabel) const override; + + boost::optional<double> getSigma(const RunLabel &runLabel) const override; + + bool hasFitResultsForRun(const RunLabel &runLabel) const override; + + Mantid::API::MatrixWorkspace_sptr + loadFocusedRun(const std::string &filename) const override; + + void saveRefinementResultsToHDF5( + const Mantid::API::IAlgorithm_sptr successfulAlgorithm, + const std::vector<GSASIIRefineFitPeaksOutputProperties> + &refinementResultSets, + const std::string &filename) const override; + +protected: + /// The following methods are marked as protected so that they can be exposed + /// by a helper class in the tests + + /// Add a lattice parameter table to the map + void addLatticeParams(const RunLabel &runLabel, + const Mantid::API::ITableWorkspace_sptr &table); + + /// Add a gamma value to the gamma map + void addGamma(const RunLabel &runLabel, const double gamma); + + /// Add an rwp value to the rwp map + void addRwp(const RunLabel &runLabel, const double rwp); + + /// Add a sigma value to the sigma map + void addSigma(const RunLabel &runLabel, const double sigma); + +protected slots: + void processRefinementsComplete( + Mantid::API::IAlgorithm_sptr alg, + const std::vector<GSASIIRefineFitPeaksOutputProperties> + &refinementResultSets); + + void processRefinementFailed(const std::string &failureMessage); + + void processRefinementSuccessful( + Mantid::API::IAlgorithm_sptr successfulAlgorithm, + const GSASIIRefineFitPeaksOutputProperties &refinementResults); + + void processRefinementCancelled(); + +private: + static constexpr double DEFAULT_PAWLEY_DMIN = 1; + static constexpr double DEFAULT_PAWLEY_NEGATIVE_WEIGHT = 0; + static const size_t MAX_BANKS = 3; + + RunMap<MAX_BANKS, double> m_gammaMap; + RunMap<MAX_BANKS, Mantid::API::ITableWorkspace_sptr> m_latticeParamsMap; + RunMap<MAX_BANKS, double> m_rwpMap; + RunMap<MAX_BANKS, double> m_sigmaMap; + + boost::shared_ptr<IEnggDiffGSASFittingObserver> m_observer; + + std::unique_ptr<QThread> m_workerThread; + + /// Add Rwp, sigma, gamma and lattice params table to their + /// respective RunMaps + void + addFitResultsToMaps(const RunLabel &runLabel, const double rwp, + const double sigma, const double gamma, + const Mantid::API::ITableWorkspace_sptr &latticeParams); + + void deleteWorkerThread(); + + /// Run GSASIIRefineFitPeaks + std::pair<Mantid::API::IAlgorithm_sptr, GSASIIRefineFitPeaksOutputProperties> + doGSASRefinementAlgorithm(const GSASIIRefineFitPeaksParameters ¶ms); + + template <typename T> + boost::optional<T> getFromRunMapOptional(const RunMap<MAX_BANKS, T> &map, + const RunLabel &runLabel) const { + if (map.contains(runLabel)) { + return map.get(runLabel); + } + return boost::none; + } +}; + +} // namespace CustomInterfaces +} // namespace MantidQt diff --git a/qt/scientific_interfaces/EnggDiffraction/EnggDiffGSASFittingPresenter.cpp b/qt/scientific_interfaces/EnggDiffraction/EnggDiffGSASFittingPresenter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7c536da040a59dc10980d1c83331461c12113d34 --- /dev/null +++ b/qt/scientific_interfaces/EnggDiffraction/EnggDiffGSASFittingPresenter.cpp @@ -0,0 +1,301 @@ +// Mantid Repository : https://github.com/mantidproject/mantid +// +// Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, +// NScD Oak Ridge National Laboratory, European Spallation Source +// & Institut Laue - Langevin +// SPDX - License - Identifier: GPL - 3.0 + +#include "EnggDiffGSASFittingPresenter.h" + +#include <utility> + +#include "EnggDiffGSASRefinementMethod.h" +#include "MantidQtWidgets/Plotting/Qwt/QwtHelper.h" + +namespace { + +std::string addRunNumberToGSASIIProjectFile( + const std::string &filename, + const MantidQt::CustomInterfaces::RunLabel &runLabel) { + const auto dotPosition = filename.find_last_of("."); + return filename.substr(0, dotPosition) + "_" + runLabel.runNumber + "_" + + std::to_string(runLabel.bank) + + filename.substr(dotPosition, filename.length()); +} + +} // anonymous namespace + +namespace MantidQt { +namespace CustomInterfaces { + +EnggDiffGSASFittingPresenter::EnggDiffGSASFittingPresenter( + std::unique_ptr<IEnggDiffGSASFittingModel> model, + IEnggDiffGSASFittingView *view, + boost::shared_ptr<IEnggDiffMultiRunFittingWidgetPresenter> multiRunWidget, + boost::shared_ptr<IEnggDiffractionParam> mainSettings) + : m_model(std::move(model)), m_multiRunWidget(std::move(multiRunWidget)), + m_mainSettings(std::move(mainSettings)), m_view(view), + m_viewHasClosed(false) {} + +EnggDiffGSASFittingPresenter::~EnggDiffGSASFittingPresenter() {} + +void EnggDiffGSASFittingPresenter::notify( + IEnggDiffGSASFittingPresenter::Notification notif) { + + if (m_viewHasClosed) { + return; + } + + switch (notif) { + + case IEnggDiffGSASFittingPresenter::DoRefinement: + processDoRefinement(); + break; + + case IEnggDiffGSASFittingPresenter::LoadRun: + processLoadRun(); + break; + + case IEnggDiffGSASFittingPresenter::RefineAll: + processRefineAll(); + break; + + case IEnggDiffGSASFittingPresenter::SelectRun: + processSelectRun(); + break; + + case IEnggDiffGSASFittingPresenter::Start: + processStart(); + break; + + case IEnggDiffGSASFittingPresenter::ShutDown: + processShutDown(); + break; + } +} + +std::vector<GSASIIRefineFitPeaksParameters> +EnggDiffGSASFittingPresenter::collectAllInputParameters() const { + const auto runLabels = m_multiRunWidget->getAllRunLabels(); + std::vector<GSASIIRefineFitPeaksParameters> inputParams; + std::vector<std::string> GSASIIProjectFiles; + inputParams.reserve(runLabels.size()); + + const auto refinementMethod = m_view->getRefinementMethod(); + const auto instParamFile = m_view->getInstrumentFileName(); + const auto phaseFiles = m_view->getPhaseFileNames(); + const auto pathToGSASII = m_view->getPathToGSASII(); + const auto GSASIIProjectFile = m_view->getGSASIIProjectPath(); + if (runLabels.size() == 1) { + GSASIIProjectFiles = std::vector<std::string>({GSASIIProjectFile}); + } else { + GSASIIProjectFiles.reserve(runLabels.size()); + for (const auto &runLabel : runLabels) { + GSASIIProjectFiles.emplace_back( + addRunNumberToGSASIIProjectFile(GSASIIProjectFile, runLabel)); + } + } + + const auto dMin = m_view->getPawleyDMin(); + const auto negativeWeight = m_view->getPawleyNegativeWeight(); + const auto xMin = m_view->getXMin(); + const auto xMax = m_view->getXMax(); + const auto refineSigma = m_view->getRefineSigma(); + const auto refineGamma = m_view->getRefineGamma(); + + for (size_t i = 0; i < runLabels.size(); i++) { + const auto &runLabel = runLabels[i]; + const auto inputWS = *(m_multiRunWidget->getFocusedRun(runLabel)); + + inputParams.emplace_back(inputWS, runLabel, refinementMethod, instParamFile, + phaseFiles, pathToGSASII, GSASIIProjectFiles[i], + dMin, negativeWeight, xMin, xMax, refineSigma, + refineGamma); + } + return inputParams; +} + +GSASIIRefineFitPeaksParameters +EnggDiffGSASFittingPresenter::collectInputParameters( + const RunLabel &runLabel, + const Mantid::API::MatrixWorkspace_sptr &inputWS) const { + const auto refinementMethod = m_view->getRefinementMethod(); + const auto instParamFile = m_view->getInstrumentFileName(); + const auto phaseFiles = m_view->getPhaseFileNames(); + const auto pathToGSASII = m_view->getPathToGSASII(); + const auto GSASIIProjectFile = m_view->getGSASIIProjectPath(); + + const auto dMin = m_view->getPawleyDMin(); + const auto negativeWeight = m_view->getPawleyNegativeWeight(); + const auto xMin = m_view->getXMin(); + const auto xMax = m_view->getXMax(); + const auto refineSigma = m_view->getRefineSigma(); + const auto refineGamma = m_view->getRefineGamma(); + + return GSASIIRefineFitPeaksParameters(inputWS, runLabel, refinementMethod, + instParamFile, phaseFiles, pathToGSASII, + GSASIIProjectFile, dMin, negativeWeight, + xMin, xMax, refineSigma, refineGamma); +} + +void EnggDiffGSASFittingPresenter::displayFitResults(const RunLabel &runLabel) { + const auto latticeParams = m_model->getLatticeParams(runLabel); + const auto rwp = m_model->getRwp(runLabel); + const auto sigma = m_model->getSigma(runLabel); + const auto gamma = m_model->getGamma(runLabel); + + if (!latticeParams || !rwp || !sigma || !gamma) { + m_view->userError("Invalid run identifier", + "Unexpectedly tried to display fit results for invalid " + "run, run number = " + + runLabel.runNumber + + ", bank ID = " + std::to_string(runLabel.bank) + + ". Please contact the development team"); + return; + } + + m_view->displayLatticeParams(*latticeParams); + m_view->displayRwp(*rwp); + m_view->displaySigma(*sigma); + m_view->displayGamma(*gamma); +} + +void EnggDiffGSASFittingPresenter::doRefinements( + const std::vector<GSASIIRefineFitPeaksParameters> ¶ms) { + m_model->doRefinements(params); +} + +void EnggDiffGSASFittingPresenter::notifyRefinementsComplete( + Mantid::API::IAlgorithm_sptr alg, + const std::vector<GSASIIRefineFitPeaksOutputProperties> + &refinementResultSets) { + if (!m_viewHasClosed) { + const auto numRuns = refinementResultSets.size(); + + if (numRuns > 1) { + std::vector<RunLabel> runLabels; + runLabels.reserve(numRuns); + for (const auto &refinementResults : refinementResultSets) { + runLabels.emplace_back(refinementResults.runLabel); + } + m_model->saveRefinementResultsToHDF5( + alg, refinementResultSets, + m_mainSettings->userHDFMultiRunFilename(runLabels)); + } + + m_view->setEnabled(true); + m_view->showStatus("Ready"); + } +} + +void EnggDiffGSASFittingPresenter::notifyRefinementCancelled() { + if (!m_viewHasClosed) { + m_view->setEnabled(true); + m_view->showStatus("Ready"); + } +} + +void EnggDiffGSASFittingPresenter::notifyRefinementFailed( + const std::string &failureMessage) { + if (!m_viewHasClosed) { + m_view->setEnabled(true); + m_view->userWarning("Refinement failed", failureMessage); + m_view->showStatus("Refinement failed"); + } +} + +void EnggDiffGSASFittingPresenter::notifyRefinementSuccessful( + const Mantid::API::IAlgorithm_sptr successfulAlgorithm, + const GSASIIRefineFitPeaksOutputProperties &refinementResults) { + if (!m_viewHasClosed) { + m_view->showStatus("Saving refinement results"); + const auto filename = m_mainSettings->userHDFRunFilename( + refinementResults.runLabel.runNumber); + + try { + m_model->saveRefinementResultsToHDF5(successfulAlgorithm, + {refinementResults}, filename); + } catch (std::exception &e) { + m_view->userWarning( + "Could not save refinement results", + std::string("Refinement was successful but saving results to " + "HDF5 failed for the following reason:\n") + + e.what()); + } + m_view->setEnabled(true); + m_view->showStatus("Ready"); + + m_multiRunWidget->addFittedPeaks(refinementResults.runLabel, + refinementResults.fittedPeaksWS); + displayFitResults(refinementResults.runLabel); + } +} + +void EnggDiffGSASFittingPresenter::processDoRefinement() { + const auto runLabel = m_multiRunWidget->getSelectedRunLabel(); + if (!runLabel) { + m_view->userWarning("No run selected", + "Please select a run to do refinement on"); + return; + } + + const auto inputWSOptional = m_multiRunWidget->getFocusedRun(*runLabel); + if (!inputWSOptional) { + m_view->userError( + "Invalid run selected for refinement", + "Tried to run refinement on invalid focused run, run number " + + runLabel->runNumber + " and bank ID " + + std::to_string(runLabel->bank) + + ". Please contact the development team with this message"); + return; + } + + m_view->showStatus("Refining run"); + const auto refinementParams = + collectInputParameters(*runLabel, *inputWSOptional); + + m_view->setEnabled(false); + doRefinements({refinementParams}); +} + +void EnggDiffGSASFittingPresenter::processLoadRun() { + const auto focusedFileNames = m_view->getFocusedFileNames(); + + try { + for (const auto fileName : focusedFileNames) { + const auto focusedRun = m_model->loadFocusedRun(fileName); + m_multiRunWidget->addFocusedRun(focusedRun); + } + } catch (const std::exception &ex) { + m_view->userWarning("Could not load file", ex.what()); + } +} + +void EnggDiffGSASFittingPresenter::processRefineAll() { + const auto refinementParams = collectAllInputParameters(); + if (refinementParams.size() == 0) { + m_view->userWarning("No runs loaded", + "Please load at least one run before refining"); + return; + } + m_view->showStatus("Refining run"); + m_view->setEnabled(false); + doRefinements(refinementParams); +} + +void EnggDiffGSASFittingPresenter::processSelectRun() { + const auto runLabel = m_multiRunWidget->getSelectedRunLabel(); + if (runLabel && m_model->hasFitResultsForRun(*runLabel)) { + displayFitResults(*runLabel); + } +} + +void EnggDiffGSASFittingPresenter::processStart() { + auto addMultiRunWidget = m_multiRunWidget->getWidgetAdder(); + (*addMultiRunWidget)(*m_view); + m_view->showStatus("Ready"); +} + +void EnggDiffGSASFittingPresenter::processShutDown() { m_viewHasClosed = true; } + +} // namespace CustomInterfaces +} // namespace MantidQt diff --git a/qt/scientific_interfaces/EnggDiffraction/EnggDiffGSASFittingPresenter.h b/qt/scientific_interfaces/EnggDiffraction/EnggDiffGSASFittingPresenter.h new file mode 100644 index 0000000000000000000000000000000000000000..6b0c930826551fe71203399969777a0f724f5aaf --- /dev/null +++ b/qt/scientific_interfaces/EnggDiffraction/EnggDiffGSASFittingPresenter.h @@ -0,0 +1,100 @@ +// Mantid Repository : https://github.com/mantidproject/mantid +// +// Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, +// NScD Oak Ridge National Laboratory, European Spallation Source +// & Institut Laue - Langevin +// SPDX - License - Identifier: GPL - 3.0 + +#pragma once + +#include "DllConfig.h" +#include "GSASIIRefineFitPeaksOutputProperties.h" +#include "IEnggDiffGSASFittingModel.h" +#include "IEnggDiffGSASFittingPresenter.h" +#include "IEnggDiffGSASFittingView.h" +#include "IEnggDiffMultiRunFittingWidgetPresenter.h" +#include "IEnggDiffractionParam.h" + +#include "MantidAPI/MatrixWorkspace_fwd.h" + +#include <boost/shared_ptr.hpp> +#include <memory> + +namespace MantidQt { +namespace CustomInterfaces { + +// needs to be dll-exported for the tests +class MANTIDQT_ENGGDIFFRACTION_DLL EnggDiffGSASFittingPresenter + : public IEnggDiffGSASFittingPresenter { + +public: + EnggDiffGSASFittingPresenter( + std::unique_ptr<IEnggDiffGSASFittingModel> model, + IEnggDiffGSASFittingView *view, + boost::shared_ptr<IEnggDiffMultiRunFittingWidgetPresenter> multiRunWidget, + boost::shared_ptr<IEnggDiffractionParam> mainSettings); + + EnggDiffGSASFittingPresenter(EnggDiffGSASFittingPresenter &&other) = default; + + EnggDiffGSASFittingPresenter & + operator=(EnggDiffGSASFittingPresenter &&other) = default; + + ~EnggDiffGSASFittingPresenter() override; + + void notify(IEnggDiffGSASFittingPresenter::Notification notif) override; + + void notifyRefinementsComplete( + Mantid::API::IAlgorithm_sptr alg, + const std::vector<GSASIIRefineFitPeaksOutputProperties> + &refinementResultSets) override; + + void notifyRefinementSuccessful( + const Mantid::API::IAlgorithm_sptr successfulAlgorithm, + const GSASIIRefineFitPeaksOutputProperties &refinementResults) override; + + void notifyRefinementFailed(const std::string &failureMessage) override; + + void notifyRefinementCancelled() override; + +private: + void processDoRefinement(); + void processLoadRun(); + void processRefineAll(); + void processSelectRun(); + void processShutDown(); + void processStart(); + + /// Collect GSASIIRefineFitPeaks parameters for all runs loaded in + std::vector<GSASIIRefineFitPeaksParameters> collectAllInputParameters() const; + + /// Collect GSASIIRefineFitPeaks input parameters for a given run from the + /// presenter's various children + GSASIIRefineFitPeaksParameters + collectInputParameters(const RunLabel &runLabel, + const Mantid::API::MatrixWorkspace_sptr &ws) const; + + /** + Perform refinements on a number of runs + @param params Input parameters for each run to pass to GSASIIRefineFitPeaks + */ + void doRefinements(const std::vector<GSASIIRefineFitPeaksParameters> ¶ms); + + /** + Overplot fitted peaks for a run, and display lattice parameters and Rwp in + the view + @param runLabel Run number and bank ID of the run to display + */ + void displayFitResults(const RunLabel &runLabel); + + std::unique_ptr<IEnggDiffGSASFittingModel> m_model; + + boost::shared_ptr<IEnggDiffMultiRunFittingWidgetPresenter> m_multiRunWidget; + + boost::shared_ptr<IEnggDiffractionParam> m_mainSettings; + + IEnggDiffGSASFittingView *m_view; + + bool m_viewHasClosed; +}; + +} // namespace CustomInterfaces +} // namespace MantidQt diff --git a/qt/scientific_interfaces/EnggDiffraction/EnggDiffGSASFittingViewQtWidget.cpp b/qt/scientific_interfaces/EnggDiffraction/EnggDiffGSASFittingViewQtWidget.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c3f88619fe05879a7f1e65c42b426b3b7a7e90f0 --- /dev/null +++ b/qt/scientific_interfaces/EnggDiffraction/EnggDiffGSASFittingViewQtWidget.cpp @@ -0,0 +1,389 @@ +// Mantid Repository : https://github.com/mantidproject/mantid +// +// Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, +// NScD Oak Ridge National Laboratory, European Spallation Source +// & Institut Laue - Langevin +// SPDX - License - Identifier: GPL - 3.0 + +#include "EnggDiffGSASFittingViewQtWidget.h" +#include "EnggDiffGSASFittingModel.h" +#include "EnggDiffGSASFittingPresenter.h" +#include "EnggDiffMultiRunFittingQtWidget.h" +#include "EnggDiffMultiRunFittingWidgetModel.h" +#include "EnggDiffMultiRunFittingWidgetPresenter.h" + +#include "MantidAPI/TableRow.h" + +#include <QFileDialog> +#include <QSettings> +#include <boost/make_shared.hpp> +#include <utility> + +namespace MantidQt { +namespace CustomInterfaces { + +EnggDiffGSASFittingViewQtWidget::EnggDiffGSASFittingViewQtWidget( + boost::shared_ptr<IEnggDiffractionUserMsg> userMessageProvider, + const boost::shared_ptr<IEnggDiffractionPythonRunner> &pythonRunner, + boost::shared_ptr<IEnggDiffractionParam> mainSettings) + : m_userMessageProvider(std::move(userMessageProvider)) { + + auto multiRunWidgetModel = + std::make_unique<EnggDiffMultiRunFittingWidgetModel>(); + m_multiRunWidgetView = + std::make_unique<EnggDiffMultiRunFittingQtWidget>(pythonRunner); + + auto multiRunWidgetPresenter = + boost::make_shared<EnggDiffMultiRunFittingWidgetPresenter>( + std::move(multiRunWidgetModel), m_multiRunWidgetView.get()); + + m_multiRunWidgetView->setPresenter(multiRunWidgetPresenter); + m_multiRunWidgetView->setMessageProvider(m_userMessageProvider); + + setupUI(); + + auto model = std::make_unique<EnggDiffGSASFittingModel>(); + auto *model_ptr = model.get(); + m_presenter = boost::make_shared<EnggDiffGSASFittingPresenter>( + std::move(model), this, multiRunWidgetPresenter, mainSettings); + model_ptr->setObserver(m_presenter); + m_presenter->notify(IEnggDiffGSASFittingPresenter::Start); +} + +EnggDiffGSASFittingViewQtWidget::~EnggDiffGSASFittingViewQtWidget() { + QSettings settings(tr(SETTINGS_NAME)); + const auto gsasHome = m_ui.lineEdit_gsasHome->text(); + settings.setValue(tr(GSAS_HOME_SETTING_NAME), gsasHome); + + m_presenter->notify(IEnggDiffGSASFittingPresenter::ShutDown); +} + +void EnggDiffGSASFittingViewQtWidget::addWidget( + IEnggDiffMultiRunFittingWidgetView *widget) { + auto *qWidget = dynamic_cast<QWidget *>(widget); + m_ui.gridLayout_multiRunWidget->addWidget(qWidget, 0, 0); +} + +void EnggDiffGSASFittingViewQtWidget::browseFocusedRun() { + const auto filenames( + QFileDialog::getOpenFileNames(this, tr("Find focused run files"))); + setFocusedRunFileNames(filenames); +} + +void EnggDiffGSASFittingViewQtWidget::browseGSASHome() { + auto directoryName(QFileDialog::getExistingDirectory( + this, tr("GSAS-II installation directory"))); + m_ui.lineEdit_gsasHome->setText(directoryName); +} + +void EnggDiffGSASFittingViewQtWidget::browseGSASProj() { + auto filename(QFileDialog::getSaveFileName( + this, tr("Output GSAS-II project file"), "", "GSAS-II Project (*.gpx)")); + if (!filename.endsWith(".gpx")) { + filename.append(".gpx"); + } + m_ui.lineEdit_gsasProjPath->setText(filename); +} + +void EnggDiffGSASFittingViewQtWidget::browseInstParams() { + const auto filename( + QFileDialog::getOpenFileName(this, tr("Instrument parameter file"), "", + "Instrument parameter file (*.par *.prm)")); + m_ui.lineEdit_instParamsFile->setText(filename); +} + +void EnggDiffGSASFittingViewQtWidget::browsePhaseFiles() { + const auto filenames(QFileDialog::getOpenFileNames( + this, tr("Phase files"), "", "Phase files (*.cif)")); + m_ui.lineEdit_phaseFiles->setText(filenames.join(tr(","))); +} + +void EnggDiffGSASFittingViewQtWidget::disableLoadIfInputEmpty() { + setLoadEnabled(!runFileLineEditEmpty()); +} + +void EnggDiffGSASFittingViewQtWidget::displayLatticeParams( + const Mantid::API::ITableWorkspace_sptr latticeParams) const { + double length_a, length_b, length_c, angle_alpha, angle_beta, angle_gamma; + Mantid::API::TableRow row = latticeParams->getFirstRow(); + row >> length_a >> length_b >> length_c >> angle_alpha >> angle_beta >> + angle_gamma; + m_ui.lineEdit_latticeParamA->setText(QString::number(length_a)); + m_ui.lineEdit_latticeParamB->setText(QString::number(length_b)); + m_ui.lineEdit_latticeParamC->setText(QString::number(length_c)); + m_ui.lineEdit_latticeParamAlpha->setText(QString::number(angle_alpha)); + m_ui.lineEdit_latticeParamBeta->setText(QString::number(angle_beta)); + m_ui.lineEdit_latticeParamGamma->setText(QString::number(angle_gamma)); +} + +void EnggDiffGSASFittingViewQtWidget::displayGamma(const double gamma) const { + m_ui.lineEdit_gamma->setText(QString::number(gamma)); +} + +void EnggDiffGSASFittingViewQtWidget::displayRwp(const double rwp) const { + m_ui.lineEdit_rwp->setText(QString::number(rwp)); +} + +void EnggDiffGSASFittingViewQtWidget::displaySigma(const double sigma) const { + m_ui.lineEdit_sigma->setText(QString::number(sigma)); +} + +void EnggDiffGSASFittingViewQtWidget::doRefinement() { + m_presenter->notify(IEnggDiffGSASFittingPresenter::DoRefinement); +} + +std::vector<std::string> +EnggDiffGSASFittingViewQtWidget::getFocusedFileNames() const { + const auto filenamesQStringList = m_ui.lineEdit_runFile->text().split(","); + std::vector<std::string> filenames; + filenames.reserve(filenamesQStringList.size()); + for (const auto &filenameQString : filenamesQStringList) { + filenames.emplace_back(filenameQString.toStdString()); + } + return filenames; +} + +std::string EnggDiffGSASFittingViewQtWidget::getGSASIIProjectPath() const { + return m_ui.lineEdit_gsasProjPath->text().toStdString(); +} + +std::string EnggDiffGSASFittingViewQtWidget::getInstrumentFileName() const { + return m_ui.lineEdit_instParamsFile->text().toStdString(); +} + +std::string EnggDiffGSASFittingViewQtWidget::getPathToGSASII() const { + return m_ui.lineEdit_gsasHome->text().toStdString(); +} + +boost::optional<double> EnggDiffGSASFittingViewQtWidget::getPawleyDMin() const { + const auto pawleyDMinString = m_ui.lineEdit_pawleyDMin->text(); + if (pawleyDMinString.isEmpty()) { + return boost::none; + } + + bool conversionSuccessful(false); + const auto pawleyDMin = pawleyDMinString.toDouble(&conversionSuccessful); + if (!conversionSuccessful) { + userWarning("Invalid Pawley DMin", "Invalid entry for Pawley DMin \"" + + pawleyDMinString.toStdString() + + "\". Using default"); + return boost::none; + } + + return pawleyDMin; +} + +boost::optional<double> +EnggDiffGSASFittingViewQtWidget::getPawleyNegativeWeight() const { + const auto pawleyNegWeightString = m_ui.lineEdit_pawleyNegativeWeight->text(); + if (pawleyNegWeightString.isEmpty()) { + return boost::none; + } + + bool conversionSuccessful(false); + const auto pawleyNegWeight = + pawleyNegWeightString.toDouble(&conversionSuccessful); + if (!conversionSuccessful) { + userWarning("Invalid Pawley negative weight", + "Invalid entry for negative weight \"" + + pawleyNegWeightString.toStdString() + "\". Using default"); + return boost::none; + } + + return pawleyNegWeight; +} + +std::vector<std::string> +EnggDiffGSASFittingViewQtWidget::getPhaseFileNames() const { + std::vector<std::string> fileNameStrings; + const auto fileNameQStrings = m_ui.lineEdit_phaseFiles->text().split(","); + fileNameStrings.reserve(fileNameQStrings.size()); + for (const auto &fileNameQString : fileNameQStrings) { + fileNameStrings.emplace_back(fileNameQString.toStdString()); + } + return fileNameStrings; +} + +bool EnggDiffGSASFittingViewQtWidget::getRefineGamma() const { + return m_ui.checkBox_refineGamma->isChecked(); +} + +bool EnggDiffGSASFittingViewQtWidget::getRefineSigma() const { + return m_ui.checkBox_refineSigma->isChecked(); +} + +GSASRefinementMethod +EnggDiffGSASFittingViewQtWidget::getRefinementMethod() const { + const auto refinementMethod = + m_ui.comboBox_refinementMethod->currentText().toStdString(); + if (refinementMethod == "Pawley") { + return GSASRefinementMethod::PAWLEY; + } else if (refinementMethod == "Rietveld") { + return GSASRefinementMethod::RIETVELD; + } else { + userError("Unexpected refinement method", + "Unexpected refinement method \"" + refinementMethod + + "\" selected. Please contact development team with this " + "message. If you choose to continue, Pawley will be used"); + return GSASRefinementMethod::PAWLEY; + } +} + +boost::optional<double> EnggDiffGSASFittingViewQtWidget::getXMax() const { + const auto xMaxString = m_ui.lineEdit_xMax->text(); + if (xMaxString.isEmpty()) { + return boost::none; + } + + bool conversionSuccessful(false); + const auto xMax = xMaxString.toDouble(&conversionSuccessful); + if (!conversionSuccessful) { + userWarning("Invalid XMax", "Invalid entry for XMax \"" + + xMaxString.toStdString() + + "\". Using default"); + return boost::none; + } + + return xMax; +} + +boost::optional<double> EnggDiffGSASFittingViewQtWidget::getXMin() const { + const auto xMinString = m_ui.lineEdit_xMin->text(); + if (xMinString.isEmpty()) { + return boost::none; + } + + bool conversionSuccessful(false); + const auto xMin = xMinString.toDouble(&conversionSuccessful); + if (!conversionSuccessful) { + userWarning("Invalid XMin", "Invalid entry for XMin \"" + + xMinString.toStdString() + + "\". Using default"); + return boost::none; + } + + return xMin; +} + +void EnggDiffGSASFittingViewQtWidget::loadFocusedRun() { + m_presenter->notify(IEnggDiffGSASFittingPresenter::LoadRun); +} + +void EnggDiffGSASFittingViewQtWidget::refineAll() { + m_presenter->notify(IEnggDiffGSASFittingPresenter::RefineAll); +} + +bool EnggDiffGSASFittingViewQtWidget::runFileLineEditEmpty() const { + return m_ui.lineEdit_runFile->text().isEmpty(); +} + +void EnggDiffGSASFittingViewQtWidget::selectRun() { + m_presenter->notify(IEnggDiffGSASFittingPresenter::SelectRun); +} + +void EnggDiffGSASFittingViewQtWidget::setEnabled(const bool enabled) { + m_ui.lineEdit_runFile->setEnabled(enabled); + m_ui.pushButton_browseRunFile->setEnabled(enabled); + setLoadEnabled(enabled && !runFileLineEditEmpty()); + + m_ui.lineEdit_instParamsFile->setEnabled(enabled); + m_ui.pushButton_browseInstParams->setEnabled(enabled); + + m_ui.lineEdit_phaseFiles->setEnabled(enabled); + m_ui.pushButton_browsePhaseFiles->setEnabled(enabled); + + m_ui.lineEdit_gsasProjPath->setEnabled(enabled); + m_ui.pushButton_gsasProjPath->setEnabled(enabled); + + m_ui.lineEdit_gsasHome->setEnabled(enabled); + m_ui.pushButton_browseGSASHome->setEnabled(enabled); + + m_ui.comboBox_refinementMethod->setEnabled(enabled); + + m_ui.lineEdit_pawleyDMin->setEnabled(enabled); + m_ui.lineEdit_pawleyNegativeWeight->setEnabled(enabled); + + m_ui.lineEdit_xMin->setEnabled(enabled); + m_ui.lineEdit_xMax->setEnabled(enabled); + + m_ui.checkBox_refineSigma->setEnabled(enabled); + m_ui.checkBox_refineGamma->setEnabled(enabled); + + m_ui.pushButton_doRefinement->setEnabled(enabled); + m_ui.pushButton_refineAll->setEnabled(enabled); + + m_multiRunWidgetView->setEnabled(enabled); +} + +void EnggDiffGSASFittingViewQtWidget::setFocusedRunFileNames( + const QStringList &filenames) { + m_ui.lineEdit_runFile->setText(filenames.join(tr(","))); +} + +void EnggDiffGSASFittingViewQtWidget::setLoadEnabled(const bool enabled) { + if (enabled) { + m_ui.pushButton_loadRun->setEnabled(true); + m_ui.pushButton_loadRun->setToolTip(tr("Load focused run file")); + } else { + m_ui.pushButton_loadRun->setEnabled(false); + m_ui.pushButton_loadRun->setToolTip( + tr("Please specify a file to load via the browse menu or by typing the " + "full path to the file in the text field")); + } +} + +void EnggDiffGSASFittingViewQtWidget::setupUI() { + m_ui.setupUi(this); + connect(m_ui.pushButton_browseRunFile, SIGNAL(clicked()), this, + SLOT(browseFocusedRun())); + connect(m_ui.pushButton_loadRun, SIGNAL(clicked()), this, + SLOT(loadFocusedRun())); + connect(m_ui.lineEdit_runFile, SIGNAL(textChanged(const QString &)), this, + SLOT(disableLoadIfInputEmpty())); + + connect(m_ui.pushButton_browseInstParams, SIGNAL(clicked()), this, + SLOT(browseInstParams())); + connect(m_ui.pushButton_browsePhaseFiles, SIGNAL(clicked()), this, + SLOT(browsePhaseFiles())); + connect(m_ui.pushButton_gsasProjPath, SIGNAL(clicked()), this, + SLOT(browseGSASProj())); + connect(m_ui.pushButton_browseGSASHome, SIGNAL(clicked()), this, + SLOT(browseGSASHome())); + + connect(m_ui.pushButton_doRefinement, SIGNAL(clicked()), this, + SLOT(doRefinement())); + connect(m_ui.pushButton_refineAll, SIGNAL(clicked()), this, + SLOT(refineAll())); + + connect(m_multiRunWidgetView.get(), SIGNAL(runSelected()), this, + SLOT(selectRun())); + + QSettings settings(tr(SETTINGS_NAME)); + if (settings.contains(tr(GSAS_HOME_SETTING_NAME))) { + m_ui.lineEdit_gsasHome->setText( + settings.value(tr(GSAS_HOME_SETTING_NAME)).toString()); + } +} + +void EnggDiffGSASFittingViewQtWidget::showStatus( + const std::string &status) const { + m_userMessageProvider->showStatus(status); +} + +void EnggDiffGSASFittingViewQtWidget::userError( + const std::string &errorTitle, const std::string &errorDescription) const { + m_userMessageProvider->userError(errorTitle, errorDescription); +} + +void EnggDiffGSASFittingViewQtWidget::userWarning( + const std::string &warningTitle, + const std::string &warningDescription) const { + m_userMessageProvider->userWarning(warningTitle, warningDescription); +} + +const char EnggDiffGSASFittingViewQtWidget::GSAS_HOME_SETTING_NAME[] = + "GSAS_HOME"; +const char EnggDiffGSASFittingViewQtWidget::SETTINGS_NAME[] = + "EnggGUIGSASTabSettings"; + +} // namespace CustomInterfaces +} // namespace MantidQt diff --git a/qt/scientific_interfaces/EnggDiffraction/EnggDiffGSASFittingViewQtWidget.h b/qt/scientific_interfaces/EnggDiffraction/EnggDiffGSASFittingViewQtWidget.h new file mode 100644 index 0000000000000000000000000000000000000000..e8807d6329182731cb05768574b3e0f66e4ccfd9 --- /dev/null +++ b/qt/scientific_interfaces/EnggDiffraction/EnggDiffGSASFittingViewQtWidget.h @@ -0,0 +1,118 @@ +// Mantid Repository : https://github.com/mantidproject/mantid +// +// Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, +// NScD Oak Ridge National Laboratory, European Spallation Source +// & Institut Laue - Langevin +// SPDX - License - Identifier: GPL - 3.0 + +#pragma once + +#include "DllConfig.h" +#include "EnggDiffMultiRunFittingQtWidget.h" +#include "IEnggDiffGSASFittingPresenter.h" +#include "IEnggDiffGSASFittingView.h" +#include "IEnggDiffractionParam.h" +#include "IEnggDiffractionPythonRunner.h" +#include "IEnggDiffractionUserMsg.h" + +#include <boost/shared_ptr.hpp> +#include <qwt_plot_curve.h> +#include <qwt_plot_zoomer.h> + +#include "ui_EnggDiffractionQtTabGSAS.h" + +namespace MantidQt { +namespace CustomInterfaces { + +class MANTIDQT_ENGGDIFFRACTION_DLL EnggDiffGSASFittingViewQtWidget + : public QWidget, + public IEnggDiffGSASFittingView { + Q_OBJECT + +public: + EnggDiffGSASFittingViewQtWidget( + boost::shared_ptr<IEnggDiffractionUserMsg> userMessageProvider, + const boost::shared_ptr<IEnggDiffractionPythonRunner> &pythonRunner, + boost::shared_ptr<IEnggDiffractionParam> mainSettings); + + ~EnggDiffGSASFittingViewQtWidget() override; + + void addWidget(IEnggDiffMultiRunFittingWidgetView *widget) override; + + void displayLatticeParams( + const Mantid::API::ITableWorkspace_sptr latticeParams) const override; + + void displayGamma(const double gamma) const override; + + void displayRwp(const double rwp) const override; + + void displaySigma(const double sigma) const override; + + std::vector<std::string> getFocusedFileNames() const override; + + std::string getGSASIIProjectPath() const override; + + std::string getInstrumentFileName() const override; + + std::string getPathToGSASII() const override; + + boost::optional<double> getPawleyDMin() const override; + + boost::optional<double> getPawleyNegativeWeight() const override; + + std::vector<std::string> getPhaseFileNames() const override; + + GSASRefinementMethod getRefinementMethod() const override; + + bool getRefineGamma() const override; + + bool getRefineSigma() const override; + + boost::optional<double> getXMax() const override; + + boost::optional<double> getXMin() const override; + + void setEnabled(const bool enabled) override; + + void showStatus(const std::string &status) const override; + + void userError(const std::string &errorTitle, + const std::string &errorDescription) const override; + + void userWarning(const std::string &warningTitle, + const std::string &warningDescription) const override; + +private slots: + void browseFocusedRun(); + void browseGSASHome(); + void browseGSASProj(); + void browseInstParams(); + void browsePhaseFiles(); + void disableLoadIfInputEmpty(); + void doRefinement(); + void loadFocusedRun(); + void refineAll(); + void selectRun(); + +private: + bool runFileLineEditEmpty() const; + + void setLoadEnabled(const bool enabled); + + static const char GSAS_HOME_SETTING_NAME[]; + static const char SETTINGS_NAME[]; + + boost::shared_ptr<EnggDiffMultiRunFittingQtWidget> m_multiRunWidgetView; + + boost::shared_ptr<IEnggDiffGSASFittingPresenter> m_presenter; + + Ui::EnggDiffractionQtTabGSAS m_ui; + + boost::shared_ptr<IEnggDiffractionUserMsg> m_userMessageProvider; + + void setFocusedRunFileNames(const QStringList &filenames); + + void setupUI(); +}; + +} // namespace CustomInterfaces +} // namespace MantidQt diff --git a/qt/scientific_interfaces/EnggDiffraction/EnggDiffMultiRunFittingQtWidget.cpp b/qt/scientific_interfaces/EnggDiffraction/EnggDiffMultiRunFittingQtWidget.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fc14fa9b51eb061e566ee885bf799cbd6cda1a97 --- /dev/null +++ b/qt/scientific_interfaces/EnggDiffraction/EnggDiffMultiRunFittingQtWidget.cpp @@ -0,0 +1,255 @@ +// Mantid Repository : https://github.com/mantidproject/mantid +// +// Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, +// NScD Oak Ridge National Laboratory, European Spallation Source +// & Institut Laue - Langevin +// SPDX - License - Identifier: GPL - 3.0 + +#include "EnggDiffMultiRunFittingQtWidget.h" + +#include <utility> + +namespace { + +MantidQt::CustomInterfaces::RunLabel +parseListWidgetItem(const QString &listWidgetItem) { + const auto pieces = listWidgetItem.split("_"); + if (pieces.size() != 2) { + throw std::runtime_error( + "Unexpected run label: \"" + listWidgetItem.toStdString() + + "\". Please contact the development team with this message"); + } + return MantidQt::CustomInterfaces::RunLabel(pieces[0].toStdString(), + pieces[1].toUInt()); +} + +} // anonymous namespace + +namespace MantidQt { +namespace CustomInterfaces { + +EnggDiffMultiRunFittingQtWidget::EnggDiffMultiRunFittingQtWidget( + boost::shared_ptr<IEnggDiffractionPythonRunner> pythonRunner) + : m_pythonRunner(std::move(pythonRunner)) { + setupUI(); + + m_zoomTool = std::make_unique<QwtPlotZoomer>( + QwtPlot::xBottom, QwtPlot::yLeft, + QwtPicker::DragSelection | QwtPicker::CornerToCorner, + QwtPicker::AlwaysOff, m_ui.plotArea->canvas()); + m_zoomTool->setRubberBandPen(QPen(Qt::black)); + m_zoomTool->setEnabled(false); +} + +EnggDiffMultiRunFittingQtWidget::~EnggDiffMultiRunFittingQtWidget() { + cleanUpPlot(); +} + +void EnggDiffMultiRunFittingQtWidget::cleanUpPlot() { + for (auto &curve : m_focusedRunCurves) { + curve->detach(); + } + m_focusedRunCurves.clear(); + for (auto &curve : m_fittedPeaksCurves) { + curve->detach(); + } + m_fittedPeaksCurves.clear(); +} + +std::vector<RunLabel> EnggDiffMultiRunFittingQtWidget::getAllRunLabels() const { + std::vector<RunLabel> runLabels; + runLabels.reserve(m_ui.listWidget_runLabels->count()); + + for (int i = 0; i < m_ui.listWidget_runLabels->count(); i++) { + const auto currentLabel = m_ui.listWidget_runLabels->item(i)->text(); + runLabels.emplace_back(parseListWidgetItem(currentLabel)); + } + return runLabels; +} + +boost::optional<RunLabel> +EnggDiffMultiRunFittingQtWidget::getSelectedRunLabel() const { + if (hasSelectedRunLabel()) { + const auto currentLabel = m_ui.listWidget_runLabels->currentItem()->text(); + return parseListWidgetItem(currentLabel); + } else { + return boost::none; + } +} + +void EnggDiffMultiRunFittingQtWidget::reportNoRunSelectedForPlot() { + userError("No run selected", + "Please select a run from the list before plotting"); +} + +void EnggDiffMultiRunFittingQtWidget::reportPlotInvalidFittedPeaks( + const RunLabel &runLabel) { + userError("Invalid fitted peaks identifier", + "Tried to plot invalid fitted peaks, run number " + + runLabel.runNumber + " and bank ID " + + std::to_string(runLabel.bank) + + ". Please contact the development team with this message"); +} + +void EnggDiffMultiRunFittingQtWidget::reportPlotInvalidFocusedRun( + const RunLabel &runLabel) { + userError("Invalid focused run identifier", + "Tried to plot invalid focused run, run number " + + runLabel.runNumber + " and bank ID " + + std::to_string(runLabel.bank) + + ". Please contact the development team with this message"); +} + +bool EnggDiffMultiRunFittingQtWidget::hasSelectedRunLabel() const { + return m_ui.listWidget_runLabels->selectedItems().size() != 0; +} + +void EnggDiffMultiRunFittingQtWidget::plotFittedPeaksStateChanged() { + m_presenter->notify(IEnggDiffMultiRunFittingWidgetPresenter::Notification:: + PlotPeaksStateChanged); +} + +void EnggDiffMultiRunFittingQtWidget::plotFittedPeaks( + const std::vector<boost::shared_ptr<QwtData>> &curves) { + for (const auto &curve : curves) { + auto plotCurve = std::make_unique<QwtPlotCurve>(); + + plotCurve->setPen(QColor(Qt::red)); + plotCurve->setData(*curve); + plotCurve->attach(m_ui.plotArea); + m_fittedPeaksCurves.emplace_back(std::move(plotCurve)); + } + m_ui.plotArea->replot(); + m_zoomTool->setZoomBase(); + m_zoomTool->setEnabled(true); +} + +void EnggDiffMultiRunFittingQtWidget::processPlotToSeparateWindow() { + m_presenter->notify(IEnggDiffMultiRunFittingWidgetPresenter::Notification:: + PlotToSeparateWindow); +} + +void EnggDiffMultiRunFittingQtWidget::plotFocusedRun( + const std::vector<boost::shared_ptr<QwtData>> &curves) { + for (const auto &curve : curves) { + auto plotCurve = std::make_unique<QwtPlotCurve>(); + + plotCurve->setData(*curve); + plotCurve->attach(m_ui.plotArea); + m_focusedRunCurves.emplace_back(std::move(plotCurve)); + } + m_ui.plotArea->replot(); + m_zoomTool->setZoomBase(); + m_zoomTool->setEnabled(true); +} + +void EnggDiffMultiRunFittingQtWidget::plotToSeparateWindow( + const std::string &focusedRunName, + const boost::optional<std::string> fittedPeaksName) { + + std::string plotCode = "ws1 = \"" + focusedRunName + "\"\n"; + + plotCode += "workspaceToPlot = \"engg_gui_separate_plot_ws\"\n" + + "if (mtd.doesExist(workspaceToPlot)):\n" + " DeleteWorkspace(workspaceToPlot)\n" + + "ExtractSingleSpectrum(InputWorkspace=ws1, WorkspaceIndex=0, " + "OutputWorkspace=workspaceToPlot)\n" + + "spectra_to_plot = [0]\n"; + + if (fittedPeaksName) { + plotCode += "ws2 = \"" + *fittedPeaksName + "\"\n"; + plotCode += + "ws2_spectrum = ExtractSingleSpectrum(InputWorkspace=ws2, " + "WorkspaceIndex=0, StoreInADS=False)\n" + + "AppendSpectra(InputWorkspace1=workspaceToPlot, " + "InputWorkspace2=ws2_spectrum, OutputWorkspace=workspaceToPlot)\n" + + "DeleteWorkspace(ws2_spectrum)\n" + "spectra_to_plot = [0, 1]\n"; + } + + plotCode += + "plot = plotSpectrum(workspaceToPlot, spectra_to_plot).activeLayer()\n" + "plot.setTitle(\"Engg GUI Fitting Workspaces\")\n"; + m_pythonRunner->enggRunPythonCode(plotCode); +} + +void EnggDiffMultiRunFittingQtWidget::processRemoveRun() { + emit removeRunClicked(); + m_presenter->notify( + IEnggDiffMultiRunFittingWidgetPresenter::Notification::RemoveRun); +} + +void EnggDiffMultiRunFittingQtWidget::processSelectRun() { + emit runSelected(); + m_presenter->notify( + IEnggDiffMultiRunFittingWidgetPresenter::Notification::SelectRun); +} + +void EnggDiffMultiRunFittingQtWidget::resetCanvas() { + cleanUpPlot(); + m_ui.plotArea->replot(); + resetPlotZoomLevel(); +} + +void EnggDiffMultiRunFittingQtWidget::resetPlotZoomLevel() { + m_ui.plotArea->setAxisAutoScale(QwtPlot::xBottom); + m_ui.plotArea->setAxisAutoScale(QwtPlot::yLeft); + m_zoomTool->setZoomBase(true); +} + +void EnggDiffMultiRunFittingQtWidget::setEnabled(const bool enabled) { + m_ui.listWidget_runLabels->setEnabled(enabled); + m_ui.pushButton_removeRun->setEnabled(enabled); + m_ui.pushButton_plotToSeparateWindow->setEnabled(enabled); + m_ui.checkBox_plotFittedPeaks->setEnabled(enabled); + m_zoomTool->setEnabled(enabled); +} + +void EnggDiffMultiRunFittingQtWidget::setMessageProvider( + boost::shared_ptr<IEnggDiffractionUserMsg> messageProvider) { + m_userMessageProvider = messageProvider; +} + +void EnggDiffMultiRunFittingQtWidget::setPresenter( + boost::shared_ptr<IEnggDiffMultiRunFittingWidgetPresenter> presenter) { + m_presenter = presenter; +} + +void EnggDiffMultiRunFittingQtWidget::setupUI() { + m_ui.setupUi(this); + + connect(m_ui.listWidget_runLabels, SIGNAL(itemSelectionChanged()), this, + SLOT(processSelectRun())); + connect(m_ui.checkBox_plotFittedPeaks, SIGNAL(stateChanged(int)), this, + SLOT(plotFittedPeaksStateChanged())); + connect(m_ui.pushButton_removeRun, SIGNAL(clicked()), this, + SLOT(processRemoveRun())); + connect(m_ui.pushButton_plotToSeparateWindow, SIGNAL(clicked()), this, + SLOT(processPlotToSeparateWindow())); +} + +bool EnggDiffMultiRunFittingQtWidget::showFitResultsSelected() const { + return m_ui.checkBox_plotFittedPeaks->isChecked(); +} + +void EnggDiffMultiRunFittingQtWidget::updateRunList( + const std::vector<RunLabel> &runLabels) { + m_ui.listWidget_runLabels->clear(); + for (const auto &runLabel : runLabels) { + const auto labelStr = QString(runLabel.runNumber.c_str()) + tr("_") + + QString::number(runLabel.bank); + m_ui.listWidget_runLabels->addItem(labelStr); + } +} + +void EnggDiffMultiRunFittingQtWidget::userError( + const std::string &errorTitle, const std::string &errorDescription) { + m_userMessageProvider->userError(errorTitle, errorDescription); +} + +} // namespace CustomInterfaces +} // namespace MantidQt diff --git a/qt/scientific_interfaces/EnggDiffraction/EnggDiffMultiRunFittingWidgetPresenter.cpp b/qt/scientific_interfaces/EnggDiffraction/EnggDiffMultiRunFittingWidgetPresenter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..721de6b05ca9cea191e3caea198213d957ed3c01 --- /dev/null +++ b/qt/scientific_interfaces/EnggDiffraction/EnggDiffMultiRunFittingWidgetPresenter.cpp @@ -0,0 +1,227 @@ +// Mantid Repository : https://github.com/mantidproject/mantid +// +// Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, +// NScD Oak Ridge National Laboratory, European Spallation Source +// & Institut Laue - Langevin +// SPDX - License - Identifier: GPL - 3.0 + +#include "EnggDiffMultiRunFittingWidgetPresenter.h" +#include "EnggDiffMultiRunFittingWidgetAdder.h" + +#include "MantidAPI/AnalysisDataService.h" +#include "MantidAPI/Run.h" + +#include "MantidQtWidgets/Plotting/Qwt/QwtHelper.h" + +#include <boost/algorithm/string.hpp> +#include <cctype> + +namespace { + +bool isDigit(const std::string &text) { + return std::all_of(text.cbegin(), text.cend(), isdigit); +} + +std::string +generateFittedPeaksName(const MantidQt::CustomInterfaces::RunLabel &runLabel) { + return runLabel.runNumber + "_" + std::to_string(runLabel.bank) + + "_fitted_peaks_external_plot"; +} + +std::string +generateFocusedRunName(const MantidQt::CustomInterfaces::RunLabel &runLabel) { + return runLabel.runNumber + "_" + std::to_string(runLabel.bank) + + "_external_plot"; +} + +size_t guessBankID(const Mantid::API::MatrixWorkspace_const_sptr &ws) { + const static std::string bankIDName = "bankid"; + if (ws->run().hasProperty(bankIDName)) { + const auto log = dynamic_cast<Mantid::Kernel::PropertyWithValue<int> *>( + ws->run().getLogData(bankIDName)); + return boost::lexical_cast<size_t>(log->value()); + } + + // couldn't get it from sample logs - try using the old naming convention + const std::string name = ws->getName(); + std::vector<std::string> chunks; + boost::split(chunks, name, boost::is_any_of("_")); + if (!chunks.empty()) { + const bool isNum = isDigit(chunks.back()); + if (isNum) { + try { + return boost::lexical_cast<size_t>(chunks.back()); + } catch (boost::exception &) { + // If we get a bad cast or something goes wrong then + // the file is probably not what we were expecting + // so throw a runtime error + throw std::runtime_error( + "Failed to fit file: The data was not what is expected. " + "Does the file contain a focused workspace?"); + } + } + } + + throw std::runtime_error("Could not guess run number from input workspace. " + "Are you sure it has been focused correctly?"); +} +} // anonymous namespace + +namespace MantidQt { +namespace CustomInterfaces { + +EnggDiffMultiRunFittingWidgetPresenter::EnggDiffMultiRunFittingWidgetPresenter( + std::unique_ptr<IEnggDiffMultiRunFittingWidgetModel> model, + IEnggDiffMultiRunFittingWidgetView *view) + : m_model(std::move(model)), m_view(view) {} + +void EnggDiffMultiRunFittingWidgetPresenter::addFittedPeaks( + const RunLabel &runLabel, const Mantid::API::MatrixWorkspace_sptr ws) { + m_model->addFittedPeaks(runLabel, ws); + updatePlot(runLabel); +} + +void EnggDiffMultiRunFittingWidgetPresenter::addFocusedRun( + const Mantid::API::MatrixWorkspace_sptr ws) { + const auto runNumber = std::to_string(ws->getRunNumber()); + const auto bankID = guessBankID(ws); + + m_model->addFocusedRun(RunLabel(runNumber, bankID), ws); + m_view->updateRunList(m_model->getAllWorkspaceLabels()); +} + +void EnggDiffMultiRunFittingWidgetPresenter::displayFitResults( + const RunLabel &runLabel) { + const auto fittedPeaks = m_model->getFittedPeaks(runLabel); + if (!fittedPeaks) { + m_view->reportPlotInvalidFittedPeaks(runLabel); + } else { + const auto plottablePeaks = API::QwtHelper::curveDataFromWs(*fittedPeaks); + m_view->plotFittedPeaks(plottablePeaks); + } +} + +std::vector<RunLabel> +EnggDiffMultiRunFittingWidgetPresenter::getAllRunLabels() const { + return m_view->getAllRunLabels(); +} + +std::unique_ptr<IEnggDiffMultiRunFittingWidgetAdder> +EnggDiffMultiRunFittingWidgetPresenter::getWidgetAdder() const { + return std::make_unique<EnggDiffMultiRunFittingWidgetAdder>(m_view); +} + +boost::optional<Mantid::API::MatrixWorkspace_sptr> +EnggDiffMultiRunFittingWidgetPresenter::getFittedPeaks( + const RunLabel &runLabel) const { + return m_model->getFittedPeaks(runLabel); +} + +boost::optional<Mantid::API::MatrixWorkspace_sptr> +EnggDiffMultiRunFittingWidgetPresenter::getFocusedRun( + const RunLabel &runLabel) const { + return m_model->getFocusedRun(runLabel); +} + +boost::optional<RunLabel> +EnggDiffMultiRunFittingWidgetPresenter::getSelectedRunLabel() const { + return m_view->getSelectedRunLabel(); +} + +void EnggDiffMultiRunFittingWidgetPresenter::notify( + IEnggDiffMultiRunFittingWidgetPresenter::Notification notif) { + switch (notif) { + case Notification::PlotPeaksStateChanged: + processPlotPeaksStateChanged(); + break; + + case Notification::PlotToSeparateWindow: + processPlotToSeparateWindow(); + break; + + case Notification::RemoveRun: + processRemoveRun(); + break; + + case Notification::SelectRun: + processSelectRun(); + break; + } +} + +void EnggDiffMultiRunFittingWidgetPresenter::processPlotPeaksStateChanged() { + const auto runLabel = getSelectedRunLabel(); + if (runLabel) { + updatePlot(*runLabel); + } +} + +void EnggDiffMultiRunFittingWidgetPresenter::processPlotToSeparateWindow() { + const auto runLabel = m_view->getSelectedRunLabel(); + if (!runLabel) { + m_view->reportNoRunSelectedForPlot(); + return; + } + + const auto focusedRun = m_model->getFocusedRun(*runLabel); + if (!focusedRun) { + m_view->reportPlotInvalidFocusedRun(*runLabel); + return; + } + + auto &ADS = Mantid::API::AnalysisDataService::Instance(); + const auto focusedRunName = generateFocusedRunName(*runLabel); + ADS.add(focusedRunName, *focusedRun); + + boost::optional<std::string> fittedPeaksName = boost::none; + if (m_view->showFitResultsSelected() && + m_model->hasFittedPeaksForRun(*runLabel)) { + fittedPeaksName = generateFittedPeaksName(*runLabel); + const auto fittedPeaks = m_model->getFittedPeaks(*runLabel); + ADS.add(*fittedPeaksName, *fittedPeaks); + } + + m_view->plotToSeparateWindow(focusedRunName, fittedPeaksName); + + ADS.remove(focusedRunName); + if (fittedPeaksName) { + ADS.remove(*fittedPeaksName); + } +} + +void EnggDiffMultiRunFittingWidgetPresenter::processRemoveRun() { + const auto runLabel = getSelectedRunLabel(); + if (runLabel) { + m_model->removeRun(*runLabel); + m_view->updateRunList(m_model->getAllWorkspaceLabels()); + m_view->resetCanvas(); + } +} + +void EnggDiffMultiRunFittingWidgetPresenter::processSelectRun() { + const auto runLabel = getSelectedRunLabel(); + if (runLabel) { + updatePlot(*runLabel); + } +} + +void EnggDiffMultiRunFittingWidgetPresenter::updatePlot( + const RunLabel &runLabel) { + const auto focusedRun = m_model->getFocusedRun(runLabel); + + if (!focusedRun) { + m_view->reportPlotInvalidFocusedRun(runLabel); + } else { + const auto plottableCurve = API::QwtHelper::curveDataFromWs(*focusedRun); + + m_view->resetCanvas(); + m_view->plotFocusedRun(plottableCurve); + + if (m_model->hasFittedPeaksForRun(runLabel) && + m_view->showFitResultsSelected()) { + displayFitResults(runLabel); + } + } +} + +} // namespace CustomInterfaces +} // namespace MantidQt diff --git a/qt/scientific_interfaces/EnggDiffraction/EnggDiffractionPresenter.cpp b/qt/scientific_interfaces/EnggDiffraction/EnggDiffractionPresenter.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1ff4eceb0d89776edc5153d9040fc455b15e5de8 --- /dev/null +++ b/qt/scientific_interfaces/EnggDiffraction/EnggDiffractionPresenter.cpp @@ -0,0 +1,2899 @@ +// Mantid Repository : https://github.com/mantidproject/mantid +// +// Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, +// NScD Oak Ridge National Laboratory, European Spallation Source +// & Institut Laue - Langevin +// SPDX - License - Identifier: GPL - 3.0 + +#include "EnggDiffractionPresenter.h" +#include "EnggDiffractionPresWorker.h" +#include "EnggVanadiumCorrectionsModel.h" +#include "IEnggDiffractionView.h" +#include "MantidAPI/AlgorithmManager.h" +#include "MantidAPI/AnalysisDataService.h" +#include "MantidAPI/ITableWorkspace.h" +#include "MantidAPI/MatrixWorkspace.h" +#include "MantidAPI/TableRow.h" +#include "MantidKernel/Property.h" +#include "MantidKernel/StringTokenizer.h" +#include "MantidQtWidgets/Common/PythonRunner.h" + +#include <algorithm> +#include <cctype> +#include <fstream> + +#include <boost/lexical_cast.hpp> + +#include <Poco/File.h> +#include <Poco/Path.h> + +#include <QThread> + +using namespace Mantid::API; +using namespace MantidQt::CustomInterfaces; + +namespace MantidQt { +namespace CustomInterfaces { + +namespace { +Mantid::Kernel::Logger g_log("EngineeringDiffractionGUI"); +} + +const std::string EnggDiffractionPresenter::g_runNumberErrorStr = + " cannot be empty, must be an integer number, valid ENGINX run number/s " + "or " + "valid directory/directories."; + +// discouraged at the moment +const bool EnggDiffractionPresenter::g_askUserCalibFilename = false; + +const std::string EnggDiffractionPresenter::g_calibBanksParms = + "engggui_calibration_banks_parameters"; + +int EnggDiffractionPresenter::g_croppedCounter = 0; +int EnggDiffractionPresenter::g_plottingCounter = 0; +bool EnggDiffractionPresenter::g_abortThread = false; +std::string EnggDiffractionPresenter::g_lastValidRun = ""; +std::string EnggDiffractionPresenter::g_calibCropIdentifier = "SpectrumNumbers"; +std::string EnggDiffractionPresenter::g_sumOfFilesFocus = ""; + +EnggDiffractionPresenter::EnggDiffractionPresenter(IEnggDiffractionView *view) + : m_workerThread(nullptr), m_calibFinishedOK(false), + m_focusFinishedOK(false), m_rebinningFinishedOK(false), m_view(view), + m_viewHasClosed(false), + m_vanadiumCorrectionsModel( + boost::make_shared<EnggVanadiumCorrectionsModel>( + m_view->currentCalibSettings(), m_view->currentInstrument())) { + if (!m_view) { + throw std::runtime_error( + "Severe inconsistency found. Presenter created " + "with an empty/null view (Engineering diffraction interface). " + "Cannot continue."); + } + + m_currentInst = m_view->currentInstrument(); +} + +EnggDiffractionPresenter::~EnggDiffractionPresenter() { cleanup(); } + +/** + * Close open sessions, kill threads etc., save settings, etc. for a + * graceful window close/destruction + */ +void EnggDiffractionPresenter::cleanup() { + // m_model->cleanup(); + + // this may still be running + if (m_workerThread) { + if (m_workerThread->isRunning()) { + g_log.notice() << "A calibration process is currently running, shutting " + "it down immediately...\n"; + m_workerThread->wait(10); + } + delete m_workerThread; + m_workerThread = nullptr; + } + + // Remove the workspace which is loaded when the interface starts + auto &ADS = Mantid::API::AnalysisDataService::Instance(); + if (ADS.doesExist(g_calibBanksParms)) { + ADS.remove(g_calibBanksParms); + } +} + +void EnggDiffractionPresenter::notify( + IEnggDiffractionPresenter::Notification notif) { + + // Check the view is valid - QT can send multiple notification + // signals in any order at any time. This means that it is possible + // to receive a shutdown signal and subsequently an input example + // for example. As we can't guarantee the state of the viewer + // after calling shutdown instead we shouldn't do anything after + if (m_viewHasClosed) { + return; + } + + switch (notif) { + + case IEnggDiffractionPresenter::Start: + processStart(); + break; + + case IEnggDiffractionPresenter::LoadExistingCalib: + processLoadExistingCalib(); + break; + + case IEnggDiffractionPresenter::CalcCalib: + processCalcCalib(); + break; + + case IEnggDiffractionPresenter::CropCalib: + ProcessCropCalib(); + break; + + case IEnggDiffractionPresenter::FocusRun: + processFocusBasic(); + break; + + case IEnggDiffractionPresenter::FocusCropped: + processFocusCropped(); + break; + + case IEnggDiffractionPresenter::FocusTexture: + processFocusTexture(); + break; + + case IEnggDiffractionPresenter::ResetFocus: + processResetFocus(); + break; + + case IEnggDiffractionPresenter::RebinTime: + processRebinTime(); + break; + + case IEnggDiffractionPresenter::RebinMultiperiod: + processRebinMultiperiod(); + break; + + case IEnggDiffractionPresenter::LogMsg: + processLogMsg(); + break; + + case IEnggDiffractionPresenter::InstrumentChange: + processInstChange(); + break; + + case IEnggDiffractionPresenter::RBNumberChange: + processRBNumberChange(); + break; + + case IEnggDiffractionPresenter::ShutDown: + processShutDown(); + break; + + case IEnggDiffractionPresenter::StopFocus: + processStopFocus(); + break; + } +} + +void EnggDiffractionPresenter::processStart() { m_view->showStatus("Ready"); } + +void EnggDiffractionPresenter::processLoadExistingCalib() { + const std::string fname = m_view->askExistingCalibFilename(); + if (fname.empty()) { + return; + } + + updateNewCalib(fname); +} + +/** + * Grab a calibration from a (GSAS calibration) file + * (.prm/.par/.iparm) and set/use it as current calibration. + * + * @param fname name/path of the calibration file + */ + +void EnggDiffractionPresenter::updateNewCalib(const std::string &fname) { + + Poco::Path pocoPath; + const bool pathValid = pocoPath.tryParse(fname); + + if (!pathValid || fname.empty() || pocoPath.isDirectory()) { + // Log that we couldn't open the file - its probably and invalid + // path which will be regenerated + g_log.warning("Could not open GSAS calibration file: " + fname); + return; + } + + std::string instName, vanNo, ceriaNo; + try { + parseCalibrateFilename(fname, instName, vanNo, ceriaNo); + } catch (std::invalid_argument &ia) { + m_view->userWarning("Invalid calibration filename : " + fname, ia.what()); + return; + } + + try { + grabCalibParms(fname, vanNo, ceriaNo); + updateCalibParmsTable(); + m_view->newCalibLoaded(vanNo, ceriaNo, fname); + } catch (std::runtime_error &rexc) { + m_view->userWarning("Problem while updating calibration.", rexc.what()); + } +} + +/** + * Get from a calibration file (GSAS instrument parameters file) the + * DIFC, DIFA, TZERO calibration parameters used for units + * conversions. Normally this is used on the ...all_banks.prm file + * which has the parameters for every bank included in the calibration + * process. + * + * @param fname name of the calibration/GSAS iparm file + * @param vanNo output param to hold the vanadium run + * @param ceriaNo output param to hold the ceria run + */ +void EnggDiffractionPresenter::grabCalibParms(const std::string &fname, + std::string &vanNo, + std::string &ceriaNo) { + std::vector<GSASCalibrationParms> parms; + + // To grab the bank indices, lines like "INS BANK 2" + // To grab the difc,difa,tzero parameters, lines like: + // "INS 2 ICONS 18388.00 0.00 -6.76" + try { + std::ifstream prmFile(fname); + std::string line; + int opts = Mantid::Kernel::StringTokenizer::TOK_TRIM + + Mantid::Kernel::StringTokenizer::TOK_IGNORE_EMPTY; + while (std::getline(prmFile, line)) { + if (line.find("ICONS") != std::string::npos) { + Mantid::Kernel::StringTokenizer tokenizer(line, " ", opts); + const size_t numElems = 6; + if (tokenizer.count() == numElems) { + try { + size_t bid = boost::lexical_cast<size_t>(tokenizer[1]); + double difc = boost::lexical_cast<double>(tokenizer[3]); + double difa = boost::lexical_cast<double>(tokenizer[4]); + double tzero = boost::lexical_cast<double>(tokenizer[5]); + parms.emplace_back(GSASCalibrationParms(bid, difc, difa, tzero)); + } catch (std::runtime_error &rexc) { + g_log.warning() + << "Error when trying to extract parameters from this line: " + << line + << ". This calibration file may not load correctly. " + "Error details: " + << rexc.what() << '\n'; + } + } else { + g_log.warning() << "Could not parse correctly a parameters " + "definition line in this calibration file (" + << fname << "). Did not find " << numElems + << " elements as expected. The calibration may not " + "load correctly\n"; + } + } else if (line.find("CALIB") != std::string::npos) { + Mantid::Kernel::StringTokenizer tokenizer(line, " ", opts); + ceriaNo = tokenizer[2]; + vanNo = tokenizer[3]; + } + } + + } catch (std::runtime_error &rexc) { + g_log.error() + << "Error while loading calibration / GSAS IPARM file (" << fname + << "). Could not parse the file. Please check its contents. Details: " + << rexc.what() << '\n'; + } + + m_currentCalibParms = parms; +} + +/** + * Puts in a table workspace, visible in the ADS, the per-bank + * calibration parameters for the current calibration. + */ +void EnggDiffractionPresenter::updateCalibParmsTable() { + if (m_currentCalibParms.empty()) { + return; + } + + ITableWorkspace_sptr parmsTbl; + AnalysisDataServiceImpl &ADS = Mantid::API::AnalysisDataService::Instance(); + if (ADS.doesExist(g_calibBanksParms)) { + parmsTbl = ADS.retrieveWS<ITableWorkspace>(g_calibBanksParms); + parmsTbl->setRowCount(0); + } else { + auto alg = Mantid::API::AlgorithmManager::Instance().createUnmanaged( + "CreateEmptyTableWorkspace"); + alg->initialize(); + alg->setPropertyValue("OutputWorkspace", g_calibBanksParms); + alg->execute(); + + parmsTbl = ADS.retrieveWS<ITableWorkspace>(g_calibBanksParms); + parmsTbl->addColumn("int", "bankid"); + parmsTbl->addColumn("double", "difc"); + parmsTbl->addColumn("double", "difa"); + parmsTbl->addColumn("double", "tzero"); + } + + for (const auto &parms : m_currentCalibParms) { + // ADS.remove(FocusedFitPeaksTableName); + TableRow row = parmsTbl->appendRow(); + row << static_cast<int>(parms.bankid) << parms.difc << parms.difa + << parms.tzero; + } +} + +void EnggDiffractionPresenter::processCalcCalib() { + const std::string vanNo = isValidRunNumber(m_view->newVanadiumNo()); + const std::string ceriaNo = isValidRunNumber(m_view->newCeriaNo()); + try { + inputChecksBeforeCalibrate(vanNo, ceriaNo); + } catch (std::invalid_argument &ia) { + m_view->userWarning("Error in the inputs required for calibrate", + ia.what()); + return; + } + g_log.notice() << "EnggDiffraction GUI: starting new calibration. This may " + "take a few seconds... \n"; + + const std::string outFilename = outputCalibFilename(vanNo, ceriaNo); + + m_view->showStatus("Calculating calibration..."); + m_view->enableCalibrateFocusFitUserActions(false); + // alternatively, this would be GUI-blocking: + // doNewCalibration(outFilename, vanNo, ceriaNo, ""); + // calibrationFinished(); + startAsyncCalibWorker(outFilename, vanNo, ceriaNo, ""); +} + +void EnggDiffractionPresenter::ProcessCropCalib() { + const std::string vanNo = isValidRunNumber(m_view->newVanadiumNo()); + const std::string ceriaNo = isValidRunNumber(m_view->newCeriaNo()); + int specNoNum = m_view->currentCropCalibBankName(); + enum BankMode { SPECNOS = 0, NORTH = 1, SOUTH = 2 }; + + try { + inputChecksBeforeCalibrate(vanNo, ceriaNo); + if (m_view->currentCalibSpecNos().empty() && + specNoNum == BankMode::SPECNOS) { + throw std::invalid_argument( + "The Spectrum Numbers field cannot be empty, must be a " + "valid range or a Bank Name can be selected instead."); + } + } catch (std::invalid_argument &ia) { + m_view->userWarning("Error in the inputs required for cropped calibration", + ia.what()); + return; + } + + g_log.notice() + << "EnggDiffraction GUI: starting cropped calibration. This may " + "take a few seconds... \n"; + + const std::string outFilename = outputCalibFilename(vanNo, ceriaNo); + + std::string specNo = ""; + if (specNoNum == BankMode::NORTH) { + specNo = "North"; + g_calibCropIdentifier = "Bank"; + + } else if (specNoNum == BankMode::SOUTH) { + specNo = "South"; + g_calibCropIdentifier = "Bank"; + + } else if (specNoNum == BankMode::SPECNOS) { + g_calibCropIdentifier = "SpectrumNumbers"; + specNo = m_view->currentCalibSpecNos(); + } + + m_view->showStatus("Calculating cropped calibration..."); + m_view->enableCalibrateFocusFitUserActions(false); + startAsyncCalibWorker(outFilename, vanNo, ceriaNo, specNo); +} + +void EnggDiffractionPresenter::processFocusBasic() { + std::vector<std::string> multi_RunNo = + isValidMultiRunNumber(m_view->focusingRunNo()); + const std::vector<bool> banks = m_view->focusingBanks(); + + // reset global values + g_abortThread = false; + g_sumOfFilesFocus = ""; + g_plottingCounter = 0; + + // check if valid run number provided before focusin + try { + inputChecksBeforeFocusBasic(multi_RunNo, banks); + } catch (std::invalid_argument &ia) { + m_view->userWarning("Error in the inputs required to focus a run", + ia.what()); + return; + } + + int focusMode = m_view->currentMultiRunMode(); + if (focusMode == 0) { + g_log.debug() << " focus mode selected Individual Run Files Separately \n"; + + // start focusing + startFocusing(multi_RunNo, banks, "", ""); + + } else if (focusMode == 1) { + g_log.debug() << " focus mode selected Focus Sum Of Files \n"; + g_sumOfFilesFocus = "basic"; + std::vector<std::string> firstRun; + firstRun.emplace_back(multi_RunNo[0]); + + // to avoid multiple loops, use firstRun instead as the + // multi-run number is not required for sumOfFiles + startFocusing(firstRun, banks, "", ""); + } +} + +void EnggDiffractionPresenter::processFocusCropped() { + const std::vector<std::string> multi_RunNo = + isValidMultiRunNumber(m_view->focusingCroppedRunNo()); + const std::vector<bool> banks = m_view->focusingBanks(); + const std::string specNos = m_view->focusingCroppedSpectrumNos(); + + // reset global values + g_abortThread = false; + g_sumOfFilesFocus = ""; + g_plottingCounter = 0; + + // check if valid run number provided before focusin + try { + inputChecksBeforeFocusCropped(multi_RunNo, banks, specNos); + } catch (std::invalid_argument &ia) { + m_view->userWarning( + "Error in the inputs required to focus a run (in cropped mode)", + ia.what()); + return; + } + + int focusMode = m_view->currentMultiRunMode(); + if (focusMode == 0) { + g_log.debug() << " focus mode selected Individual Run Files Separately \n"; + + startFocusing(multi_RunNo, banks, specNos, ""); + + } else if (focusMode == 1) { + g_log.debug() << " focus mode selected Focus Sum Of Files \n"; + g_sumOfFilesFocus = "cropped"; + std::vector<std::string> firstRun{multi_RunNo[0]}; + + // to avoid multiple loops, use firstRun instead as the + // multi-run number is not required for sumOfFiles + startFocusing(firstRun, banks, specNos, ""); + } +} + +void EnggDiffractionPresenter::processFocusTexture() { + const std::vector<std::string> multi_RunNo = + isValidMultiRunNumber(m_view->focusingTextureRunNo()); + const std::string dgFile = m_view->focusingTextureGroupingFile(); + + // reset global values + g_abortThread = false; + g_sumOfFilesFocus = ""; + g_plottingCounter = 0; + + // check if valid run number provided before focusing + try { + inputChecksBeforeFocusTexture(multi_RunNo, dgFile); + } catch (std::invalid_argument &ia) { + m_view->userWarning( + "Error in the inputs required to focus a run (in texture mode)", + ia.what()); + return; + } + + int focusMode = m_view->currentMultiRunMode(); + if (focusMode == 0) { + g_log.debug() << " focus mode selected Individual Run Files Separately \n"; + startFocusing(multi_RunNo, std::vector<bool>(), "", dgFile); + + } else if (focusMode == 1) { + g_log.debug() << " focus mode selected Focus Sum Of Files \n"; + g_sumOfFilesFocus = "texture"; + std::vector<std::string> firstRun{multi_RunNo[0]}; + + // to avoid multiple loops, use firstRun instead as the + // multi-run number is not required for sumOfFiles + startFocusing(firstRun, std::vector<bool>(), "", dgFile); + } +} + +/** + * Starts a focusing worker, for different modes depending on the + * inputs provided. Assumes that the inputs have been checked by the + * respective specific processFocus methods (for normal, cropped, + * texture, etc. focusing). + * + * @param multi_RunNo vector of run/file number to focus + * @param banks banks to include in the focusing, processed one at a time + * + * @param specNos list of spectra to use when focusing. If not empty + * this implies focusing in cropped mode. + * + * @param dgFile detector grouping file to define banks (texture). If + * not empty, this implies focusing in texture mode. + */ +void EnggDiffractionPresenter::startFocusing( + const std::vector<std::string> &multi_RunNo, const std::vector<bool> &banks, + const std::string &specNos, const std::string &dgFile) { + + std::string optMsg = ""; + if (!specNos.empty()) { + optMsg = " (cropped)"; + } else if (!dgFile.empty()) { + optMsg = " (texture)"; + } + g_log.notice() << "EnggDiffraction GUI: starting new focusing" << optMsg + << ". This may take some seconds... \n"; + + m_view->showStatus("Focusing..."); + m_view->enableCalibrateFocusFitUserActions(false); + startAsyncFocusWorker(multi_RunNo, banks, specNos, dgFile); +} + +void EnggDiffractionPresenter::processResetFocus() { m_view->resetFocus(); } + +void EnggDiffractionPresenter::processRebinTime() { + + const std::string runNo = isValidRunNumber(m_view->currentPreprocRunNo()); + double bin = m_view->rebinningTimeBin(); + + try { + inputChecksBeforeRebinTime(runNo, bin); + } catch (std::invalid_argument &ia) { + m_view->userWarning( + "Error in the inputs required to pre-process (rebin) a run", ia.what()); + return; + } + + const std::string outWSName = "engggui_preproc_time_ws"; + g_log.notice() << "EnggDiffraction GUI: starting new pre-processing " + "(re-binning) with a TOF bin into workspace '" + + outWSName + + "'. This " + "may take some seconds... \n"; + + m_view->showStatus("Rebinning by time..."); + m_view->enableCalibrateFocusFitUserActions(false); + startAsyncRebinningTimeWorker(runNo, bin, outWSName); +} + +void EnggDiffractionPresenter::processRebinMultiperiod() { + const std::string runNo = isValidRunNumber(m_view->currentPreprocRunNo()); + size_t nperiods = m_view->rebinningPulsesNumberPeriods(); + double timeStep = m_view->rebinningPulsesTime(); + + try { + inputChecksBeforeRebinPulses(runNo, nperiods, timeStep); + } catch (std::invalid_argument &ia) { + m_view->userWarning("Error in the inputs required to pre-process (rebin) a " + "run by pulse times", + ia.what()); + return; + } + const std::string outWSName = "engggui_preproc_by_pulse_time_ws"; + g_log.notice() << "EnggDiffraction GUI: starting new pre-processing " + "(re-binning) by pulse times into workspace '" + + outWSName + + "'. This " + "may take some seconds... \n"; + + m_view->showStatus("Rebinning by pulses..."); + m_view->enableCalibrateFocusFitUserActions(false); + startAsyncRebinningPulsesWorker(runNo, nperiods, timeStep, outWSName); +} + +void EnggDiffractionPresenter::processLogMsg() { + std::vector<std::string> msgs = m_view->logMsgs(); + for (const auto &msg : msgs) { + g_log.information() << msg << '\n'; + } +} + +void EnggDiffractionPresenter::processInstChange() { + m_currentInst = m_view->currentInstrument(); + m_view->updateTabsInstrument(m_currentInst); +} + +void EnggDiffractionPresenter::processRBNumberChange() { + const std::string rbn = m_view->getRBNumber(); + auto valid = validateRBNumber(rbn); + m_view->enableTabs(valid); + m_view->showInvalidRBNumber(valid); + if (!valid) { + m_view->showStatus("Valid RB number required"); + } else { + m_view->showStatus("Ready"); + } +} + +void EnggDiffractionPresenter::processShutDown() { + // Set that the view has closed in case QT attempts to fire another + // signal whilst we are shutting down. This stops notify before + // it hits the switch statement as the view could be in any state. + m_viewHasClosed = true; + m_view->showStatus("Closing..."); + m_view->saveSettings(); + cleanup(); +} + +void EnggDiffractionPresenter::processStopFocus() { + if (m_workerThread) { + if (m_workerThread->isRunning()) { + g_log.notice() << "A focus process is currently running, shutting " + "it down as soon as possible...\n"; + + g_abortThread = true; + g_log.warning() << "Focus Stop has been clicked, please wait until " + "current focus run process has been completed. \n"; + } + } +} + +/** + * Check if an RB number is valid to work with it (retrieve data, + * calibrate, focus, etc.). For now this will accept any non-empty + * string. Later on we might be more strict about valid RB numbers / + * experiment IDs. + * + * @param rbn RB number as given by the user + */ +bool EnggDiffractionPresenter::validateRBNumber(const std::string &rbn) const { + return !rbn.empty(); +} + +/** + * Checks if the provided run number is valid and if a directory is + * provided it will convert it to a run number. It also records the + * paths the user has browsed to. + * + * @param userPaths the input/directory given by the user via the "browse" + * button + * + * @return run_number 6 character string of a run number + */ +std::string EnggDiffractionPresenter::isValidRunNumber( + const std::vector<std::string> &userPaths) { + + std::string run_number; + if (userPaths.empty() || userPaths.front().empty()) { + return run_number; + } + return userPaths[0]; +} + +/** + * Checks if the provided run number is valid and if a directory is provided + * + * @param paths takes the input/paths of the user + * + * @return vector of string multi_run_number, 6 character string of a run number + */ +std::vector<std::string> EnggDiffractionPresenter::isValidMultiRunNumber( + const std::vector<std::string> &paths) { + + std::vector<std::string> multi_run_number; + if (paths.empty() || paths.front().empty()) + return multi_run_number; + return paths; +} + +/** + * Does several checks on the current inputs and settings. This should + * be done before starting any calibration work. The message return + * should in principle be shown to the user as a visible message + * (pop-up, error log, etc.) + * + * @param newVanNo number of the Vanadium run for the new calibration + * @param newCeriaNo number of the Ceria run for the new calibration + * + * @throws std::invalid_argument with an informative message. + */ +void EnggDiffractionPresenter::inputChecksBeforeCalibrate( + const std::string &newVanNo, const std::string &newCeriaNo) { + if (newVanNo.empty()) { + throw std::invalid_argument("The Vanadium number" + g_runNumberErrorStr); + } + if (newCeriaNo.empty()) { + throw std::invalid_argument("The Ceria number" + g_runNumberErrorStr); + } + + const auto &cs = m_view->currentCalibSettings(); + const auto &pixelCalib = cs.m_pixelCalibFilename; + if (pixelCalib.empty()) { + throw std::invalid_argument( + "You need to set a pixel (full) calibration in settings."); + } + const auto &templGSAS = cs.m_templateGSAS_PRM; + if (templGSAS.empty()) { + throw std::invalid_argument( + "You need to set a template calibration file for GSAS in settings."); + } +} + +/** + * What should be the name of the output GSAS calibration file, given + * the Vanadium and Ceria runs + * + * @param vanNo number of the Vanadium run, which is normally part of the name + * @param ceriaNo number of the Ceria run, which is normally part of the name + * @param bankName bank name when generating a file for an individual + * bank. Leave empty to use a generic name for all banks + * + * @return filename (without the full path) + */ +std::string +EnggDiffractionPresenter::outputCalibFilename(const std::string &vanNo, + const std::string &ceriaNo, + const std::string &bankName) { + std::string outFilename = ""; + const std::string sugg = + buildCalibrateSuggestedFilename(vanNo, ceriaNo, bankName); + if (!g_askUserCalibFilename) { + outFilename = sugg; + } else { + outFilename = m_view->askNewCalibrationFilename(sugg); + if (!outFilename.empty()) { + // make sure it follows the rules + try { + std::string inst, van, ceria; + parseCalibrateFilename(outFilename, inst, van, ceria); + } catch (std::invalid_argument &ia) { + m_view->userWarning( + "Invalid output calibration filename: " + outFilename, ia.what()); + outFilename = ""; + } + } + } + + return outFilename; +} + +/** + * Parses the name of a calibration file and guesses the instrument, + * vanadium and ceria run numbers, assuming that the name has been + * build with buildCalibrateSuggestedFilename(). + * + * @todo this is currently based on the filename. This method should + * do a basic sanity check that the file is actually a calibration + * file (IPARM file for GSAS), and get the numbers from the file not + * from the name of the file. Leaving this as a TODO for now, as the + * file template and contents are still subject to change. + * + * @param path full path to a calibration file + * @param instName instrument used in the file + * @param vanNo number of the Vanadium run used for this calibration file + * @param ceriaNo number of the Ceria run + * + * @throws invalid_argument with an informative message if tha name does + * not look correct (does not follow the conventions). + */ +void EnggDiffractionPresenter::parseCalibrateFilename(const std::string &path, + std::string &instName, + std::string &vanNo, + std::string &ceriaNo) { + instName = ""; + vanNo = ""; + ceriaNo = ""; + + Poco::Path fullPath(path); + const std::string &filename = fullPath.getFileName(); + if (filename.empty()) { + return; + } + + const std::string explMsg = + "Expected a file name like 'INSTR_vanNo_ceriaNo_....par', " + "where INSTR is the instrument name and vanNo and ceriaNo are the " + "numbers of the Vanadium and calibration sample (Ceria, CeO2) runs."; + std::vector<std::string> parts; + boost::split(parts, filename, boost::is_any_of("_")); + if (parts.size() < 4) { + throw std::invalid_argument( + "Failed to find at least the 4 required parts of the file name.\n\n" + + explMsg); + } + + // check the rules on the file name + if (m_currentInst != parts[0]) { + throw std::invalid_argument("The first component of the file name is not " + "the expected instrument name: " + + m_currentInst + ".\n\n" + explMsg); + } + + instName = parts[0]; +} + +/** + * Start the calibration work without blocking the GUI. This uses + * connect for Qt signals/slots so that it runs well with the Qt event + * loop. Because of that this class needs to be a Q_OBJECT. + * + * @param outFilename name for the output GSAS calibration file + * @param vanNo vanadium run number + * @param ceriaNo ceria run number + * @param specNos SpecNos or bank name to be passed + */ +void EnggDiffractionPresenter::startAsyncCalibWorker( + const std::string &outFilename, const std::string &vanNo, + const std::string &ceriaNo, const std::string &specNos) { + delete m_workerThread; + m_workerThread = new QThread(this); + auto *worker = new EnggDiffWorker(this, outFilename, vanNo, ceriaNo, specNos); + worker->moveToThread(m_workerThread); + + connect(m_workerThread, SIGNAL(started()), worker, SLOT(calibrate())); + connect(worker, SIGNAL(finished()), this, SLOT(calibrationFinished())); + // early delete of thread and worker + connect(m_workerThread, SIGNAL(finished()), m_workerThread, + SLOT(deleteLater()), Qt::DirectConnection); + connect(worker, SIGNAL(finished()), worker, SLOT(deleteLater())); + m_workerThread->start(); +} + +/** + * Calculate a new calibration. This is what threads/workers should + * use to run the calculations in response to the user clicking + * 'calibrate' or similar. + * + * @param outFilename name for the output GSAS calibration file + * @param vanNo vanadium run number + * @param ceriaNo ceria run number + * @param specNos SpecNos or bank name to be passed + */ +void EnggDiffractionPresenter::doNewCalibration(const std::string &outFilename, + const std::string &vanNo, + const std::string &ceriaNo, + const std::string &specNos) { + g_log.notice() << "Generating new calibration file: " << outFilename << '\n'; + + EnggDiffCalibSettings cs = m_view->currentCalibSettings(); + Mantid::Kernel::ConfigServiceImpl &conf = + Mantid::Kernel::ConfigService::Instance(); + const std::vector<std::string> tmpDirs = conf.getDataSearchDirs(); + // in principle, the run files will be found from 'DirRaw', and the + // pre-calculated Vanadium corrections from 'DirCalib' + if (!cs.m_inputDirCalib.empty() && Poco::File(cs.m_inputDirCalib).exists()) { + conf.appendDataSearchDir(cs.m_inputDirCalib); + } + if (!cs.m_inputDirRaw.empty() && Poco::File(cs.m_inputDirRaw).exists()) + conf.appendDataSearchDir(cs.m_inputDirRaw); + for (const auto &browsed : m_browsedToPaths) { + conf.appendDataSearchDir(browsed); + } + + try { + m_calibFinishedOK = true; + doCalib(cs, vanNo, ceriaNo, outFilename, specNos); + } catch (std::runtime_error &rexc) { + m_calibFinishedOK = false; + m_calibError = "The calibration calculations failed. One of the " + "algorithms did not execute correctly. See log messages for " + "further details."; + g_log.error() + << "The calibration calculations failed. One of the " + "algorithms did not execute correctly. See log messages for " + "further details. Error: " + + std::string(rexc.what()) + << '\n'; + } catch (std::invalid_argument &iaexc) { + m_calibFinishedOK = false; + m_calibError = "The calibration calculations failed. Some input properties " + "were not valid. See log messages for details. \n Error: " + + std::string(iaexc.what()); + g_log.error() + << "The calibration calculations failed. Some input properties " + "were not valid. See log messages for details. \n"; + } catch (Mantid::API::Algorithm::CancelException &) { + m_calibFinishedOK = false; + m_cancelled = true; + g_log.warning() << "Execution cancelled by user. \n"; + } + // restore normal data search paths + conf.setDataSearchDirs(tmpDirs); +} + +/** + * Method to call when the calibration work has finished, either from + * a separate thread or not (as in this presenter's' test). + */ +void EnggDiffractionPresenter::calibrationFinished() { + if (!m_view) + return; + + m_view->enableCalibrateFocusFitUserActions(true); + if (!m_calibFinishedOK) { + if (!m_cancelled) { + m_view->userWarning("Calibration Error", m_calibError); + } + m_cancelled = false; + + m_view->showStatus("Calibration didn't finish succesfully. Ready"); + } else { + const std::string vanNo = isValidRunNumber(m_view->newVanadiumNo()); + + const std::string ceriaNo = isValidRunNumber(m_view->newCeriaNo()); + updateCalibParmsTable(); + m_view->newCalibLoaded(vanNo, ceriaNo, m_calibFullPath); + g_log.notice() + << "Calibration finished and ready as 'current calibration'.\n"; + m_view->showStatus("Calibration finished succesfully. Ready"); + } + if (m_workerThread) { + delete m_workerThread; + m_workerThread = nullptr; + } +} + +/** + * Build a suggested name for a new calibration, by appending instrument name, + * relevant run numbers, etc., like: ENGINX_241391_236516_all_banks.par + * + * @param vanNo number of the Vanadium run + * @param ceriaNo number of the Ceria run + * @param bankName bank name when generating a file for an individual + * bank. Leave empty to use a generic name for all banks + * + * @return Suggested name for a new calibration file, following + * ENGIN-X practices + */ +std::string EnggDiffractionPresenter::buildCalibrateSuggestedFilename( + const std::string &vanNo, const std::string &ceriaNo, + const std::string &bankName) const { + // default and only one supported instrument for now + std::string instStr = m_currentInst; + std::string nameAppendix = "_all_banks"; + if (!bankName.empty()) { + nameAppendix = "_" + bankName; + } + + // default extension for calibration files + const std::string calibExt = ".prm"; + std::string vanFilename = Poco::Path(vanNo).getBaseName(); + std::string ceriaFilename = Poco::Path(ceriaNo).getBaseName(); + std::string vanRun = + vanFilename.substr(vanFilename.find(instStr) + instStr.size()); + std::string ceriaRun = + ceriaFilename.substr(ceriaFilename.find(instStr) + instStr.size()); + vanRun.erase(0, std::min(vanRun.find_first_not_of('0'), vanRun.size() - 1)); + ceriaRun.erase( + 0, std::min(ceriaRun.find_first_not_of('0'), ceriaRun.size() - 1)); + std::string sugg = + instStr + "_" + vanRun + "_" + ceriaRun + nameAppendix + calibExt; + + return sugg; +} + +std::vector<GSASCalibrationParms> +EnggDiffractionPresenter::currentCalibration() const { + return m_currentCalibParms; +} + +/** + * Calculate a calibration, responding the the "new calibration" + * action/button. + * + * @param cs user settings + * @param vanNo Vanadium run number + * @param ceriaNo Ceria run number + * @param outFilename output filename chosen by the user + * @param specNos SpecNos or bank name to be passed + */ +void EnggDiffractionPresenter::doCalib(const EnggDiffCalibSettings &cs, + const std::string &vanNo, + const std::string &ceriaNo, + const std::string &outFilename, + const std::string &specNos) { + if (cs.m_inputDirCalib.empty()) { + m_calibError = + "No calibration directory selected. Please select a calibration " + "directory in Settings. This will be used to " + "cache Vanadium calibration data"; + g_log.warning("No calibration directory selected. Please select a " + "calibration directory in Settings. This will be used to " + "cache Vanadium calibration data"); + // This should be a userWarning once the threading problem has been dealt + // with + m_calibFinishedOK = false; + return; + } + + // TODO: the settings tab should emit a signal when these are changed, on + // which the vanadium corrections model should be updated automatically + m_vanadiumCorrectionsModel->setCalibSettings(cs); + m_vanadiumCorrectionsModel->setCurrentInstrument(m_view->currentInstrument()); + const auto vanadiumCorrectionWorkspaces = + m_vanadiumCorrectionsModel->fetchCorrectionWorkspaces(vanNo); + const auto &vanIntegWS = vanadiumCorrectionWorkspaces.first; + const auto &vanCurvesWS = vanadiumCorrectionWorkspaces.second; + + MatrixWorkspace_sptr ceriaWS; + try { + auto load = Mantid::API::AlgorithmManager::Instance().create("Load"); + load->initialize(); + load->setPropertyValue("Filename", ceriaNo); + const std::string ceriaWSName = "engggui_calibration_sample_ws"; + load->setPropertyValue("OutputWorkspace", ceriaWSName); + load->execute(); + + AnalysisDataServiceImpl &ADS = Mantid::API::AnalysisDataService::Instance(); + ceriaWS = ADS.retrieveWS<MatrixWorkspace>(ceriaWSName); + } catch (std::runtime_error &re) { + g_log.error() + << "Error while loading calibration sample data. " + "Could not run the algorithm Load succesfully for the " + "calibration " + "sample (run number: " + + ceriaNo + "). Error description: " + re.what() + + " Please check also the previous log messages for details."; + throw; + } + + // Bank 1 and 2 - ENGIN-X + // bank 1 - loops once & used for cropped calibration + // bank 2 - loops twice, one with each bank & used for new calibration + std::vector<double> difa, difc, tzero; + // for the names of the output files + std::vector<std::string> bankNames; + + bool specNumUsed = specNos != ""; + // TODO: this needs sanitizing, it should be simpler + if (specNumUsed) { + constexpr size_t bankNo1 = 1; + + difa.resize(bankNo1); + difc.resize(bankNo1); + tzero.resize(bankNo1); + int selection = m_view->currentCropCalibBankName(); + if (0 == selection) { + // user selected "custom" name + const std::string customName = m_view->currentCalibCustomisedBankName(); + if (customName.empty()) { + bankNames.emplace_back("cropped"); + } else { + bankNames.emplace_back(customName); + } + } else if (1 == selection) { + bankNames.emplace_back("North"); + } else { + bankNames.emplace_back("South"); + } + } else { + constexpr size_t bankNo2 = 2; + + difa.resize(bankNo2); + difc.resize(bankNo2); + tzero.resize(bankNo2); + bankNames = {"North", "South"}; + } + + for (size_t i = 0; i < difc.size(); i++) { + auto alg = + Mantid::API::AlgorithmManager::Instance().create("EnggCalibrate"); + + alg->initialize(); + alg->setProperty("InputWorkspace", ceriaWS); + alg->setProperty("VanIntegrationWorkspace", vanIntegWS); + alg->setProperty("VanCurvesWorkspace", vanCurvesWS); + if (specNumUsed) { + alg->setPropertyValue(g_calibCropIdentifier, + boost::lexical_cast<std::string>(specNos)); + } else { + alg->setPropertyValue("Bank", boost::lexical_cast<std::string>(i + 1)); + } + const std::string outFitParamsTblName = + outFitParamsTblNameGenerator(specNos, i); + alg->setPropertyValue("FittedPeaks", outFitParamsTblName); + alg->setPropertyValue("OutputParametersTableName", outFitParamsTblName); + alg->execute(); + if (!alg->isExecuted()) { + g_log.error() << "Error in calibration. ", + "Could not run the algorithm EnggCalibrate successfully for bank " + + boost::lexical_cast<std::string>(i); + throw std::runtime_error("EnggCalibrate failed"); + } + + difa[i] = alg->getProperty("DIFA"); + difc[i] = alg->getProperty("DIFC"); + tzero[i] = alg->getProperty("TZERO"); + + g_log.information() << " * Bank " << i + 1 << " calibrated, " + << "difa: " << difa[i] << ", difc: " << difc[i] + << ", zero: " << tzero[i] << '\n'; + } + + // Creates appropriate output directory + const std::string calibrationComp = "Calibration"; + const Poco::Path userCalSaveDir = outFilesUserDir(calibrationComp); + const Poco::Path generalCalSaveDir = outFilesGeneralDir(calibrationComp); + + // Use poco to append filename so it is OS independent + std::string userCalFullPath = + appendToPath(userCalSaveDir.toString(), outFilename); + std::string generalCalFullPath = + appendToPath(generalCalSaveDir.toString(), outFilename); + + // Double horror: 1st use a python script + // 2nd: because runPythonCode does this by emitting a signal that goes to + // MantidPlot, it has to be done in the view (which is a UserSubWindow). + // First write the all banks parameters file + m_calibFullPath = generalCalSaveDir.toString(); + writeOutCalibFile(userCalFullPath, difa, difc, tzero, bankNames, ceriaNo, + vanNo); + writeOutCalibFile(generalCalFullPath, difa, difc, tzero, bankNames, ceriaNo, + vanNo); + + m_currentCalibParms.clear(); + + // Then write one individual file per bank, using different templates and the + // specific bank name as suffix + for (size_t bankIdx = 0; bankIdx < difc.size(); ++bankIdx) { + // Need to use van number not file name here else it will be + // "ENGINX_ENGINX12345_ENGINX12345...." as out name + const std::string bankFilename = buildCalibrateSuggestedFilename( + vanNo, ceriaNo, "bank_" + bankNames[bankIdx]); + + // Regenerate both full paths for each bank now + userCalFullPath = appendToPath(userCalSaveDir.toString(), bankFilename); + generalCalFullPath = + appendToPath(generalCalSaveDir.toString(), bankFilename); + + std::string templateFile = "template_ENGINX_241391_236516_North_bank.prm"; + if (1 == bankIdx) { + templateFile = "template_ENGINX_241391_236516_South_bank.prm"; + } + + writeOutCalibFile(userCalFullPath, {difa[bankIdx]}, {difc[bankIdx]}, + {tzero[bankIdx]}, {bankNames[bankIdx]}, ceriaNo, vanNo, + templateFile); + writeOutCalibFile(generalCalFullPath, {difa[bankIdx]}, {difc[bankIdx]}, + {tzero[bankIdx]}, {bankNames[bankIdx]}, ceriaNo, vanNo, + templateFile); + + m_currentCalibParms.emplace_back(GSASCalibrationParms( + bankIdx, difc[bankIdx], difa[bankIdx], tzero[bankIdx])); + if (1 == difc.size()) { + // it is a single bank or cropped calibration, so take its specific name + m_calibFullPath = generalCalFullPath; + } + } + g_log.notice() << "Calibration file written as " << generalCalFullPath << '\n' + << "And: " << userCalFullPath; + + // plots the calibrated workspaces. + g_plottingCounter++; + plotCalibWorkspace(difa, difc, tzero, specNos); +} + +/** + * Appends the current instrument as a filename prefix for numeric + * only inputs of the Vanadium run so Load can find the file + * + * @param vanNo The user input for the vanadium run + * @param outVanName The fixed filename for the vanadium run + */ +void EnggDiffractionPresenter::appendCalibInstPrefix( + const std::string &vanNo, std::string &outVanName) const { + // Use a single non numeric digit so we are guaranteed to skip + // generating cerium file names + const std::string cer = "-"; + std::string outCerName; + appendCalibInstPrefix(vanNo, cer, outVanName, outCerName); +} + +/** + * Appends the current instrument as a filename prefix for numeric + * only inputs of both the Vanadium and Cerium Oxide runs so Load + * can find the files. + * + * @param vanNo The user input for the vanadium run + * @param cerNo The user input for the cerium run + * @param outVanName The fixed filename for the vanadium run + * @param outCerName The fixed filename for the cerium run + */ +void EnggDiffractionPresenter::appendCalibInstPrefix( + const std::string &vanNo, const std::string &cerNo, std::string &outVanName, + std::string &outCerName) const { + + // Load uses the default instrument if we don't give it the name of the + // instrument as a prefix (m_currentInst), when one isn't set or is set + // incorrectly, we prepend the name of the instrument to the vanadium number + // so that load can find the file and not cause a crash in Mantid + // Vanadium file + if (std::all_of(vanNo.begin(), vanNo.end(), ::isdigit)) { + // This only has digits - append prefix + outVanName = m_currentInst + vanNo; + } + + // Cerium file + if (std::all_of(cerNo.begin(), cerNo.end(), ::isdigit)) { + // All digits - append inst prefix + outCerName = m_currentInst + cerNo; + } +} + +/** + * Perform checks specific to normal/basic run focusing in addition to + * the general checks for any focusing (as done by + * inputChecksBeforeFocus() which is called from this method). Use + * always before running 'Focus' + * + * @param multi_RunNo vector of run number to focus + * @param banks which banks to consider in the focusing + * + * @throws std::invalid_argument with an informative message. + */ +void EnggDiffractionPresenter::inputChecksBeforeFocusBasic( + const std::vector<std::string> &multi_RunNo, + const std::vector<bool> &banks) { + if (multi_RunNo.size() == 0) { + const std::string msg = "The sample run number" + g_runNumberErrorStr; + throw std::invalid_argument(msg); + } + + inputChecksBanks(banks); + + inputChecksBeforeFocus(); +} + +/** + * Perform checks specific to focusing in "cropped" mode, in addition + * to the general checks for any focusing (as done by + * inputChecksBeforeFocus() which is called from this method). Use + * always before running 'FocusCropped' + * + * @param multi_RunNo vector of run number to focus + * @param banks which banks to consider in the focusing + * @param specNos list of spectra (as usual csv list of spectra in Mantid) + * + * @throws std::invalid_argument with an informative message. + */ +void EnggDiffractionPresenter::inputChecksBeforeFocusCropped( + const std::vector<std::string> &multi_RunNo, const std::vector<bool> &banks, + const std::string &specNos) { + if (multi_RunNo.size() == 0) { + throw std::invalid_argument("To focus cropped the sample run number" + + g_runNumberErrorStr); + } + + if (specNos.empty()) { + throw std::invalid_argument( + "The Spectrum Numbers field cannot be empty when " + "focusing in 'cropped' mode."); + } + + inputChecksBanks(banks); + + inputChecksBeforeFocus(); +} + +/** + * Perform checks specific to focusing in "texture" mode, in addition + * to the general checks for any focusing (as done by + * inputChecksBeforeFocus() which is called from this method). Use + * always before running 'FocusCropped' + * + * @param multi_RunNo vector of run number to focus + * @param dgFile file with detector grouping info + * + * @throws std::invalid_argument with an informative message. + */ +void EnggDiffractionPresenter::inputChecksBeforeFocusTexture( + const std::vector<std::string> &multi_RunNo, const std::string &dgFile) { + if (multi_RunNo.size() == 0) { + throw std::invalid_argument("To focus texture banks the sample run number" + + g_runNumberErrorStr); + } + + if (dgFile.empty()) { + throw std::invalid_argument("A detector grouping file needs to be " + "specified when focusing texture banks."); + } + Poco::File dgf(dgFile); + if (!dgf.exists()) { + throw std::invalid_argument( + "The detector grouping file coult not be found: " + dgFile); + } + + inputChecksBeforeFocus(); +} + +void EnggDiffractionPresenter::inputChecksBanks( + const std::vector<bool> &banks) { + if (0 == banks.size()) { + const std::string msg = + "Error in specification of banks found when starting the " + "focusing process. Cannot continue."; + g_log.error() << msg << '\n'; + throw std::invalid_argument(msg); + } + if (banks.end() == std::find(banks.begin(), banks.end(), true)) { + const std::string msg = + "EnggDiffraction GUI: not focusing, as none of the banks " + "have been selected. You probably forgot to select at least one."; + g_log.warning() << msg << '\n'; + throw std::invalid_argument(msg); + } +} + +/** + * Performs several checks on the current focusing inputs and + * settings. This should be done before starting any focus work. The + * message return should be shown to the user as a visible message + * (pop-up, error log, etc.) + * + * @throws std::invalid_argument with an informative message. + */ +void EnggDiffractionPresenter::inputChecksBeforeFocus() { + EnggDiffCalibSettings cs = m_view->currentCalibSettings(); + const std::string pixelCalib = cs.m_pixelCalibFilename; + if (pixelCalib.empty()) { + throw std::invalid_argument( + "You need to set a pixel (full) calibration in settings."); + } +} + +/** + * Builds the names of the output focused files (one per bank), given + * the sample run number and which banks should be focused. + * + * @param runNo number of the run for which we want a focused output + * file name + * + * @param banks for every bank, (true/false) to consider it or not for + * the focusing + * + * @return filenames (without the full path) + */ +std::vector<std::string> +EnggDiffractionPresenter::outputFocusFilenames(const std::string &runNo, + const std::vector<bool> &banks) { + const std::string instStr = m_view->currentInstrument(); + const std::string runNumber = Poco::Path(runNo).getBaseName(); + std::vector<std::string> res; + res.reserve(banks.size()); + const auto instrumentPresent = runNumber.find(instStr); + std::string runName = + (instrumentPresent != std::string::npos) + ? runNumber.substr(instrumentPresent + instStr.size()) + : runNumber; + + std::string prefix = instStr + "_" + + runName.erase(0, std::min(runName.find_first_not_of('0'), + runName.size() - 1)) + + "_focused_bank_"; + + for (size_t b = 1; b <= banks.size(); b++) { + res.emplace_back(prefix + boost::lexical_cast<std::string>(b) + ".nxs"); + } + return res; +} + +std::string +EnggDiffractionPresenter::outputFocusCroppedFilename(const std::string &runNo) { + const std::string instStr = m_view->currentInstrument(); + const std::string runNumber = Poco::Path(runNo).getBaseName(); + const auto instrumentPresent = runNumber.find(instStr); + std::string runName = + (instrumentPresent != std::string::npos) + ? runNumber.substr(instrumentPresent + instStr.size()) + : runNumber; + return instStr + "_" + + runName.erase( + 0, std::min(runName.find_first_not_of('0'), runName.size() - 1)) + + "_focused_cropped.nxs"; +} + +std::vector<std::string> EnggDiffractionPresenter::sumOfFilesLoadVec() { + std::vector<std::string> multi_RunNo; + + if (g_sumOfFilesFocus == "basic") + multi_RunNo = isValidMultiRunNumber(m_view->focusingRunNo()); + else if (g_sumOfFilesFocus == "cropped") + multi_RunNo = isValidMultiRunNumber(m_view->focusingCroppedRunNo()); + else if (g_sumOfFilesFocus == "texture") + multi_RunNo = isValidMultiRunNumber(m_view->focusingTextureRunNo()); + + return multi_RunNo; +} + +std::vector<std::string> EnggDiffractionPresenter::outputFocusTextureFilenames( + const std::string &runNo, const std::vector<size_t> &bankIDs) { + const std::string instStr = m_view->currentInstrument(); + const std::string runNumber = Poco::Path(runNo).getBaseName(); + const std::string runName = + runNumber.substr(runNumber.find(instStr) + instStr.size()); + std::vector<std::string> res; + res.reserve(bankIDs.size()); + std::string prefix = instStr + "_" + runName + "_focused_texture_bank_"; + for (auto bankID : bankIDs) { + res.emplace_back(prefix + boost::lexical_cast<std::string>(bankID) + + ".nxs"); + } + + return res; +} + +/** + * Start the focusing algorithm(s) without blocking the GUI. This is + * based on Qt connect / signals-slots so that it goes in sync with + * the Qt event loop. For that reason this class needs to be a + * Q_OBJECT. + * + * @param multi_RunNo input vector of run number + * @param banks instrument bank to focus + * @param specNos list of spectra (as usual csv list of spectra in Mantid) + * @param dgFile detector grouping file name + */ +void EnggDiffractionPresenter::startAsyncFocusWorker( + const std::vector<std::string> &multi_RunNo, const std::vector<bool> &banks, + const std::string &dgFile, const std::string &specNos) { + + delete m_workerThread; + m_workerThread = new QThread(this); + EnggDiffWorker *worker = + new EnggDiffWorker(this, multi_RunNo, banks, dgFile, specNos); + worker->moveToThread(m_workerThread); + connect(m_workerThread, SIGNAL(started()), worker, SLOT(focus())); + connect(worker, SIGNAL(finished()), this, SLOT(focusingFinished())); + // early delete of thread and worker + connect(m_workerThread, SIGNAL(finished()), m_workerThread, + SLOT(deleteLater()), Qt::DirectConnection); + connect(worker, SIGNAL(finished()), worker, SLOT(deleteLater())); + m_workerThread->start(); +} + +/** + * Produce a new focused output file. This is what threads/workers + * should use to run the calculations required to process a 'focus' + * push or similar from the user. + * + * @param runNo input run number + * + * @param specNos list of spectra to use when focusing. Not empty + * implies focusing in cropped mode. + * + * @param dgFile detector grouping file to define banks (texture). Not + * empty implies focusing in texture mode. + * + * @param banks for every bank, (true/false) to consider it or not for + * the focusing + */ +void EnggDiffractionPresenter::doFocusRun(const std::string &runNo, + const std::vector<bool> &banks, + const std::string &specNos, + const std::string &dgFile) { + + if (g_abortThread) { + return; + } + + // to track last valid run + g_lastValidRun = runNo; + + g_log.notice() << "Generating new focusing workspace(s) and file(s)"; + + // TODO: this is almost 100% common with doNewCalibrate() - refactor + EnggDiffCalibSettings cs = m_view->currentCalibSettings(); + Mantid::Kernel::ConfigServiceImpl &conf = + Mantid::Kernel::ConfigService::Instance(); + const std::vector<std::string> tmpDirs = conf.getDataSearchDirs(); + // in principle, the run files will be found from 'DirRaw', and the + // pre-calculated Vanadium corrections from 'DirCalib' + if (!cs.m_inputDirCalib.empty() && Poco::File(cs.m_inputDirCalib).exists()) { + conf.appendDataSearchDir(cs.m_inputDirCalib); + } + if (!cs.m_inputDirRaw.empty() && Poco::File(cs.m_inputDirRaw).exists()) { + conf.appendDataSearchDir(cs.m_inputDirRaw); + } + for (const auto &browsed : m_browsedToPaths) { + conf.appendDataSearchDir(browsed); + } + + // Prepare special inputs for "texture" focusing + std::vector<size_t> bankIDs; + std::vector<std::string> effectiveFilenames; + std::vector<std::string> specs; + if (!specNos.empty()) { + // Cropped focusing + // just to iterate once, but there's no real bank here + bankIDs.emplace_back(0); + specs.emplace_back(specNos); // one spectrum Nos list given by the user + effectiveFilenames.emplace_back(outputFocusCroppedFilename(runNo)); + } else { + if (dgFile.empty()) { + // Basic/normal focusing + for (size_t bidx = 0; bidx < banks.size(); bidx++) { + if (banks[bidx]) { + bankIDs.emplace_back(bidx + 1); + specs.emplace_back(""); + effectiveFilenames = outputFocusFilenames(runNo, banks); + } + } + } else { + // texture focusing + try { + loadDetectorGroupingCSV(dgFile, bankIDs, specs); + } catch (std::runtime_error &re) { + g_log.error() << "Error loading detector grouping file: " + dgFile + + ". Detailed error: " + re.what() + << '\n'; + bankIDs.clear(); + specs.clear(); + } + effectiveFilenames = outputFocusTextureFilenames(runNo, bankIDs); + } + } + + // focus all requested banks + for (size_t idx = 0; idx < bankIDs.size(); idx++) { + g_log.notice() << "Generating new focused file (bank " + + boost::lexical_cast<std::string>(bankIDs[idx]) + + ") for run " + runNo + " into: " + << effectiveFilenames[idx] << '\n'; + try { + + doFocusing(cs, runNo, bankIDs[idx], specs[idx], dgFile); + m_focusFinishedOK = true; + } catch (std::runtime_error &rexc) { + m_focusFinishedOK = false; + g_log.error() << "The focusing calculations failed. One of the algorithms" + "did not execute correctly. See log messages for " + "further details. Error: " + + std::string(rexc.what()) + << '\n'; + } catch (std::invalid_argument &ia) { + m_focusFinishedOK = false; + g_log.error() << "The focusing failed. Some input properties " + "were not valid. " + "See log messages for details. Error: " + << ia.what() << '\n'; + } catch (const Mantid::API::Algorithm::CancelException &) { + m_focusFinishedOK = false; + g_log.error() << "Focus terminated by user.\n"; + } + } + + // restore initial data search paths + conf.setDataSearchDirs(tmpDirs); +} + +void EnggDiffractionPresenter::loadDetectorGroupingCSV( + const std::string &dgFile, std::vector<size_t> &bankIDs, + std::vector<std::string> &specs) { + const char commentChar = '#'; + const std::string delim = ","; + + std::ifstream file(dgFile.c_str()); + if (!file.is_open()) { + throw std::runtime_error("Failed to open file."); + } + + bankIDs.clear(); + specs.clear(); + std::string line; + for (size_t li = 1; getline(file, line); li++) { + if (line.empty() || commentChar == line[0]) + continue; + + auto delimPos = line.find_first_of(delim); + if (std::string::npos == delimPos) { + throw std::runtime_error( + "In file '" + dgFile + + "', wrong format in line: " + boost::lexical_cast<std::string>(li) + + " which does not contain any delimiters (comma, etc.)"); + } + + try { + const std::string bstr = line.substr(0, delimPos); + const std::string spec = line.substr(delimPos + 1, std::string::npos); + + if (bstr.empty()) { + throw std::runtime_error( + "In file '" + dgFile + "', wrong format in line: " + + boost::lexical_cast<std::string>(li) + ", the bank ID is empty!"); + } + if (spec.empty()) { + throw std::runtime_error( + "In file '" + dgFile + + "', wrong format in line: " + boost::lexical_cast<std::string>(li) + + ", the list of spectrum Nos is empty!"); + } + + size_t bankID = boost::lexical_cast<size_t>(bstr); + bankIDs.emplace_back(bankID); + specs.emplace_back(spec); + } catch (std::runtime_error &re) { + throw std::runtime_error( + "In file '" + dgFile + + "', issue found when trying to interpret line: " + + boost::lexical_cast<std::string>(li) + + ". Error description: " + re.what()); + } + } +} + +/** + * Method (Qt slot) to call when the focusing work has finished, + * possibly from a separate thread but sometimes not (as in this + * presenter class' test). + */ +void EnggDiffractionPresenter::focusingFinished() { + if (!m_view) + return; + + if (!m_focusFinishedOK) { + g_log.warning() << "The focusing did not finish correctly. Check previous " + "log messages for details\n"; + m_view->showStatus("Focusing didn't finish succesfully. Ready"); + } else { + g_log.notice() << "Focusing finished - focused run(s) are ready.\n"; + m_view->showStatus("Focusing finished succesfully. Ready"); + } + if (m_workerThread) { + delete m_workerThread; + m_workerThread = nullptr; + } + + m_view->enableCalibrateFocusFitUserActions(true); + + // display warning and information to the users regarding Stop Focus + if (g_abortThread) { + // will get the last number in the list + const std::string last_RunNo = isValidRunNumber(m_view->focusingRunNo()); + if (last_RunNo != g_lastValidRun) { + g_log.warning() << "Focussing process has been stopped, last successful " + "run: " + << g_lastValidRun << '\n'; + m_view->showStatus("Focusing stopped. Ready"); + } + } +} + +/** + * Focuses a run, produces a focused workspace, and saves it into a + * file. + * + * @param cs user settings for calibration (this does not calibrate but + * uses calibration input files such as vanadium runs + * + * @param runLabel run number of the run to focus + * + * @param bank the Bank ID to focus + * + * @param specNos string specifying a list of spectra (for "cropped" + * focusing or "texture" focusing), only considered if not empty + * + * @param dgFile detector grouping file name. If not empty implies + * texture focusing + */ +void EnggDiffractionPresenter::doFocusing(const EnggDiffCalibSettings &cs, + const std::string &runLabel, + const size_t bank, + const std::string &specNos, + const std::string &dgFile) { + MatrixWorkspace_sptr inWS; + + m_vanadiumCorrectionsModel->setCalibSettings(cs); + m_vanadiumCorrectionsModel->setCurrentInstrument(m_view->currentInstrument()); + const auto vanadiumCorrectionWorkspaces = + m_vanadiumCorrectionsModel->fetchCorrectionWorkspaces( + m_view->currentVanadiumNo()); + const auto &vanIntegWS = vanadiumCorrectionWorkspaces.first; + const auto &vanCurvesWS = vanadiumCorrectionWorkspaces.second; + + const std::string inWSName = "engggui_focusing_input_ws"; + const std::string instStr = m_view->currentInstrument(); + std::vector<std::string> multi_RunNo = sumOfFilesLoadVec(); + std::string loadInput = ""; + + for (size_t i = 0; i < multi_RunNo.size(); i++) { + // if last run number in list + if (i + 1 == multi_RunNo.size()) + loadInput += multi_RunNo[i]; + else + loadInput += multi_RunNo[i] + '+'; + } + + // if its not empty the global variable is set for sumOfFiles + if (!g_sumOfFilesFocus.empty()) { + + try { + auto load = + Mantid::API::AlgorithmManager::Instance().createUnmanaged("Load"); + load->initialize(); + load->setPropertyValue("Filename", loadInput); + + load->setPropertyValue("OutputWorkspace", inWSName); + load->execute(); + + AnalysisDataServiceImpl &ADS = + Mantid::API::AnalysisDataService::Instance(); + inWS = ADS.retrieveWS<MatrixWorkspace>(inWSName); + } catch (std::runtime_error &re) { + g_log.error() + << "Error while loading files provided. " + "Could not run the algorithm Load succesfully for the focus " + "(run number provided. Error description:" + "Please check also the previous log messages for details." + + static_cast<std::string>(re.what()); + throw; + } + + if (multi_RunNo.size() == 1) { + g_log.notice() << "Only single file has been listed, the Sum Of Files" + "cannot not be processed\n"; + } else { + g_log.notice() + << "Load alogirthm has successfully merged the files provided\n"; + } + + } else { + try { + auto load = Mantid::API::AlgorithmManager::Instance().create("Load"); + load->initialize(); + load->setPropertyValue("Filename", runLabel); + load->setPropertyValue("OutputWorkspace", inWSName); + load->execute(); + + AnalysisDataServiceImpl &ADS = + Mantid::API::AnalysisDataService::Instance(); + inWS = ADS.retrieveWS<MatrixWorkspace>(inWSName); + } catch (std::runtime_error &re) { + g_log.error() << "Error while loading sample data for focusing. " + "Could not run the algorithm Load succesfully for " + "the focusing " + "sample (run number: " + + runLabel + "). Error description: " + re.what() + + " Please check also the previous log messages " + "for details."; + throw; + } + } + const auto bankString = std::to_string(bank); + std::string outWSName; + if (!dgFile.empty()) { + // doing focus "texture" + outWSName = "engggui_focusing_output_ws_texture_bank_" + bankString; + } else if (specNos.empty()) { + // doing focus "normal" / by banks + outWSName = "engggui_focusing_output_ws_bank_" + bankString; + } else { + // doing focus "cropped" + outWSName = "engggui_focusing_output_ws_cropped"; + } + try { + auto alg = Mantid::API::AlgorithmManager::Instance().create("EnggFocus"); + alg->initialize(); + alg->setProperty("InputWorkspace", inWSName); + alg->setProperty("OutputWorkspace", outWSName); + alg->setProperty("VanIntegrationWorkspace", vanIntegWS); + alg->setProperty("VanCurvesWorkspace", vanCurvesWS); + // cropped / normal focusing + if (specNos.empty()) { + alg->setPropertyValue("Bank", bankString); + } else { + alg->setPropertyValue("SpectrumNumbers", specNos); + } + // TODO: use detector positions (from calibrate full) when available + // alg->setProperty(DetectorPositions, TableWorkspace) + alg->execute(); + g_plottingCounter++; + plotFocusedWorkspace(outWSName); + + } catch (std::runtime_error &re) { + g_log.error() << "Error in calibration. ", + "Could not run the algorithm EnggCalibrate successfully for bank " + + bankString + ". Error description: " + re.what() + + " Please check also the log messages for details."; + throw; + } + g_log.notice() << "Produced focused workspace: " << outWSName << '\n'; + + const bool saveOutputFiles = m_view->saveFocusedOutputFiles(); + if (saveOutputFiles) { + try { + const auto runNo = + runLabel.substr(runLabel.rfind(instStr) + instStr.size()); + RunLabel label(runNo, bank); + saveFocusedXYE(label, outWSName); + saveGSS(label, outWSName); + saveOpenGenie(label, outWSName); + saveNexus(label, outWSName); + exportSampleLogsToHDF5(outWSName, userHDFRunFilename(runNo)); + } catch (std::runtime_error &re) { + g_log.error() << "Error saving focused data. ", + "There was an error while saving focused data. " + "Error Description: " + + std::string(re.what()) + + "Please check log messages for more details."; + throw; + } + } +} + +/** + * Loads a workspace to pre-process (rebin, etc.). The workspace + * loaded can be a MatrixWorkspace or a group of MatrixWorkspace (for + * multiperiod data). + * + * @param runNo run number to search for the file with 'Load'. + */ +Workspace_sptr +EnggDiffractionPresenter::loadToPreproc(const std::string &runNo) { + const std::string instStr = m_view->currentInstrument(); + Workspace_sptr inWS; + + // this is required when file is selected via browse button + const auto MultiRunNoDir = m_view->currentPreprocRunNo(); + const auto runNoDir = MultiRunNoDir[0]; + + try { + auto load = + Mantid::API::AlgorithmManager::Instance().createUnmanaged("Load"); + load->initialize(); + if (Poco::File(runNoDir).exists()) { + load->setPropertyValue("Filename", runNoDir); + } else { + load->setPropertyValue("Filename", instStr + runNo); + } + const std::string inWSName = "engggui_preproc_input_ws"; + load->setPropertyValue("OutputWorkspace", inWSName); + + load->execute(); + + auto &ADS = Mantid::API::AnalysisDataService::Instance(); + inWS = ADS.retrieveWS<Workspace>(inWSName); + } catch (std::runtime_error &re) { + g_log.error() + << "Error while loading run data to pre-process. " + "Could not run the algorithm Load succesfully for the run " + "number: " + + runNo + "). Error description: " + re.what() + + " Please check also the previous log messages for details."; + throw; + } + + return inWS; +} + +void EnggDiffractionPresenter::doRebinningTime(const std::string &runNo, + double bin, + const std::string &outWSName) { + + // Runs something like: + // Rebin(InputWorkspace='ws_runNo', outputWorkspace=outWSName,Params=bin) + + m_rebinningFinishedOK = false; + const Workspace_sptr inWS = loadToPreproc(runNo); + if (!inWS) + g_log.error() + << "Error: could not load the input workspace for rebinning.\n"; + + const std::string rebinName = "Rebin"; + try { + auto alg = + Mantid::API::AlgorithmManager::Instance().createUnmanaged(rebinName); + alg->initialize(); + alg->setPropertyValue("InputWorkspace", inWS->getName()); + alg->setPropertyValue("OutputWorkspace", outWSName); + alg->setProperty("Params", boost::lexical_cast<std::string>(bin)); + + alg->execute(); + } catch (std::invalid_argument &ia) { + g_log.error() << "Error when rebinning with a regular bin width in time. " + "There was an error in the inputs to the algorithm " + + rebinName + ". Error description: " + ia.what() + + ".\n"; + return; + } catch (std::runtime_error &re) { + g_log.error() << "Error when rebinning with a regular bin width in time. " + "Coult not run the algorithm " + + rebinName + + " successfully. Error description: " + re.what() + + ".\n"; + return; + } + + // succesful completion + m_rebinningFinishedOK = true; +} + +void EnggDiffractionPresenter::inputChecksBeforeRebin( + const std::string &runNo) { + if (runNo.empty()) { + throw std::invalid_argument("The run to pre-process" + g_runNumberErrorStr); + } +} + +void EnggDiffractionPresenter::inputChecksBeforeRebinTime( + const std::string &runNo, double bin) { + inputChecksBeforeRebin(runNo); + + if (bin <= 0) { + throw std::invalid_argument("The bin width must be strictly positive"); + } +} + +/** + * Starts the Rebin algorithm(s) without blocking the GUI. This is + * based on Qt connect / signals-slots so that it goes in sync with + * the Qt event loop. For that reason this class needs to be a + * Q_OBJECT. + * + * @param runNo run number(s) + * @param bin bin width parameter for Rebin + * @param outWSName name for the output workspace produced here + */ +void EnggDiffractionPresenter::startAsyncRebinningTimeWorker( + const std::string &runNo, double bin, const std::string &outWSName) { + + delete m_workerThread; + m_workerThread = new QThread(this); + auto *worker = new EnggDiffWorker(this, runNo, bin, outWSName); + worker->moveToThread(m_workerThread); + + connect(m_workerThread, SIGNAL(started()), worker, SLOT(rebinTime())); + connect(worker, SIGNAL(finished()), this, SLOT(rebinningFinished())); + // early delete of thread and worker + connect(m_workerThread, SIGNAL(finished()), m_workerThread, + SLOT(deleteLater()), Qt::DirectConnection); + connect(worker, SIGNAL(finished()), worker, SLOT(deleteLater())); + m_workerThread->start(); +} + +void EnggDiffractionPresenter::inputChecksBeforeRebinPulses( + const std::string &runNo, size_t nperiods, double timeStep) { + inputChecksBeforeRebin(runNo); + + if (0 == nperiods) { + throw std::invalid_argument("The number of periods has been set to 0 so " + "none of the periods will be processed"); + } + + if (timeStep <= 0) { + throw std::invalid_argument( + "The bin or step for the time axis must be strictly positive"); + } +} + +void EnggDiffractionPresenter::doRebinningPulses(const std::string &runNo, + size_t nperiods, + double timeStep, + const std::string &outWSName) { + // TOOD: not clear what will be the role of this parameter for now + UNUSED_ARG(nperiods); + + // Runs something like: + // RebinByPulseTimes(InputWorkspace='ws_runNo', outputWorkspace=outWSName, + // Params=timeStepstep) + + m_rebinningFinishedOK = false; + const Workspace_sptr inWS = loadToPreproc(runNo); + if (!inWS) + g_log.error() + << "Error: could not load the input workspace for rebinning.\n"; + + const std::string rebinName = "RebinByPulseTimes"; + try { + auto alg = + Mantid::API::AlgorithmManager::Instance().createUnmanaged(rebinName); + alg->initialize(); + alg->setPropertyValue("InputWorkspace", inWS->getName()); + alg->setPropertyValue("OutputWorkspace", outWSName); + alg->setProperty("Params", boost::lexical_cast<std::string>(timeStep)); + + alg->execute(); + } catch (std::invalid_argument &ia) { + g_log.error() << "Error when rebinning by pulse times. " + "There was an error in the inputs to the algorithm " + + rebinName + ". Error description: " + ia.what() + + ".\n"; + return; + } catch (std::runtime_error &re) { + g_log.error() << "Error when rebinning by pulse times. " + "Coult not run the algorithm " + + rebinName + + " successfully. Error description: " + re.what() + + ".\n"; + return; + } + + // successful execution + m_rebinningFinishedOK = true; +} + +/** + * Starts the Rebin (by pulses) algorithm(s) without blocking the + * GUI. This is based on Qt connect / signals-slots so that it goes in + * sync with the Qt event loop. For that reason this class needs to be + * a Q_OBJECT. + * + * @param runNo run number(s) + * @param nperiods max number of periods to process + * @param timeStep bin width parameter for the x (time) axis + * @param outWSName name for the output workspace produced here + */ +void EnggDiffractionPresenter::startAsyncRebinningPulsesWorker( + const std::string &runNo, size_t nperiods, double timeStep, + const std::string &outWSName) { + + delete m_workerThread; + m_workerThread = new QThread(this); + auto *worker = new EnggDiffWorker(this, runNo, nperiods, timeStep, outWSName); + worker->moveToThread(m_workerThread); + + connect(m_workerThread, SIGNAL(started()), worker, SLOT(rebinPulses())); + connect(worker, SIGNAL(finished()), this, SLOT(rebinningFinished())); + // early delete of thread and worker + connect(m_workerThread, SIGNAL(finished()), m_workerThread, + SLOT(deleteLater()), Qt::DirectConnection); + connect(worker, SIGNAL(finished()), worker, SLOT(deleteLater())); + m_workerThread->start(); +} + +/** + * Method (Qt slot) to call when the rebin work has finished, + * possibly from a separate thread but sometimes not (as in this + * presenter class' test). + */ +void EnggDiffractionPresenter::rebinningFinished() { + if (!m_view) + return; + + if (!m_rebinningFinishedOK) { + g_log.warning() << "The pre-processing (re-binning) did not finish " + "correctly. Check previous log messages for details\n"; + m_view->showStatus("Rebinning didn't finish succesfully. Ready"); + } else { + g_log.notice() << "Pre-processing (re-binning) finished - the output " + "workspace is ready.\n"; + m_view->showStatus("Rebinning finished succesfully. Ready"); + } + if (m_workerThread) { + delete m_workerThread; + m_workerThread = nullptr; + } + + m_view->enableCalibrateFocusFitUserActions(true); +} + +/** + * Checks the plot type selected and applies the appropriate + * python function to apply during first bank and second bank + * + * @param outWSName title of the focused workspace + */ +void EnggDiffractionPresenter::plotFocusedWorkspace( + const std::string &outWSName) { + const bool plotFocusedWS = m_view->focusedOutWorkspace(); + enum PlotMode { REPLACING = 0, WATERFALL = 1, MULTIPLE = 2 }; + + int plotType = m_view->currentPlotType(); + + if (plotFocusedWS) { + if (plotType == PlotMode::REPLACING) { + if (g_plottingCounter == 1) + m_view->plotFocusedSpectrum(outWSName); + else + m_view->plotReplacingWindow(outWSName, "0", "0"); + + } else if (plotType == PlotMode::WATERFALL) { + if (g_plottingCounter == 1) + m_view->plotFocusedSpectrum(outWSName); + else + m_view->plotWaterfallSpectrum(outWSName); + + } else if (plotType == PlotMode::MULTIPLE) { + m_view->plotFocusedSpectrum(outWSName); + } + } +} + +/** + * Check if the plot calibration check-box is ticked + * python script is passed on to mantid python window + * which plots the workspaces with customisation + * + * @param difa vector of double passed on to py script + * @param difc vector of double passed on to py script + * @param tzero vector of double to plot graph + * @param specNos string carrying cropped calib info + */ +void EnggDiffractionPresenter::plotCalibWorkspace( + const std::vector<double> &difa, const std::vector<double> &difc, + const std::vector<double> &tzero, const std::string &specNos) { + const bool plotCalibWS = m_view->plotCalibWorkspace(); + if (plotCalibWS) { + std::string pyCode = vanadiumCurvesPlotFactory(); + m_view->plotCalibOutput(pyCode); + + // Get the Customised Bank Name text-ield string from qt + std::string CustomisedBankName = m_view->currentCalibCustomisedBankName(); + if (CustomisedBankName.empty()) + CustomisedBankName = "cropped"; + const std::string pythonCode = + TOFFitWorkspaceFactory(difa, difc, tzero, specNos, CustomisedBankName) + + plotTOFWorkspace(CustomisedBankName); + m_view->plotCalibOutput(pythonCode); + } +} + +/** + * Convert the generated output files and saves them in + * FocusedXYE format + * + * @param runLabel run number and bank ID of the workspace to save + * @param inputWorkspace title of the focused workspace + */ +void EnggDiffractionPresenter::saveFocusedXYE( + const RunLabel &runLabel, const std::string &inputWorkspace) { + + // Generates the file name in the appropriate format + std::string fullFilename = + outFileNameFactory(inputWorkspace, runLabel, ".dat"); + + const std::string focusingComp = "Focus"; + // Creates appropriate directory + auto saveDir = outFilesUserDir(focusingComp); + + // append the full file name in the end + saveDir.append(fullFilename); + + try { + g_log.debug() << "Going to save focused output into OpenGenie file: " + << fullFilename << '\n'; + auto alg = Mantid::API::AlgorithmManager::Instance().createUnmanaged( + "SaveFocusedXYE"); + alg->initialize(); + alg->setProperty("InputWorkspace", inputWorkspace); + const std::string filename(saveDir.toString()); + alg->setPropertyValue("Filename", filename); + alg->setProperty("SplitFiles", false); + alg->setPropertyValue("StartAtBankNumber", std::to_string(runLabel.bank)); + alg->execute(); + } catch (std::runtime_error &re) { + g_log.error() << "Error in saving FocusedXYE format file. ", + "Could not run the algorithm SaveFocusXYE succesfully for " + "workspace " + + inputWorkspace + ". Error description: " + re.what() + + " Please check also the log messages for details."; + throw; + } + g_log.notice() << "Saved focused workspace as file: " << saveDir.toString() + << '\n'; + copyToGeneral(saveDir, focusingComp); +} + +/** + * Convert the generated output files and saves them in + * GSS format + * + * @param runLabel run number and bank ID the workspace to save + * @param inputWorkspace title of the focused workspace + */ +void EnggDiffractionPresenter::saveGSS(const RunLabel &runLabel, + const std::string &inputWorkspace) { + + // Generates the file name in the appropriate format + std::string fullFilename = + outFileNameFactory(inputWorkspace, runLabel, ".gss"); + + const std::string focusingComp = "Focus"; + // Creates appropriate directory + auto saveDir = outFilesUserDir(focusingComp); + + // append the full file name in the end + saveDir.append(fullFilename); + + try { + g_log.debug() << "Going to save focused output into OpenGenie file: " + << fullFilename << '\n'; + auto alg = + Mantid::API::AlgorithmManager::Instance().createUnmanaged("SaveGSS"); + alg->initialize(); + alg->setProperty("InputWorkspace", inputWorkspace); + std::string filename(saveDir.toString()); + alg->setPropertyValue("Filename", filename); + alg->setProperty("SplitFiles", false); + alg->setPropertyValue("Bank", std::to_string(runLabel.bank)); + alg->execute(); + } catch (std::runtime_error &re) { + g_log.error() << "Error in saving GSS format file. ", + "Could not run the algorithm saveGSS succesfully for " + "workspace " + + inputWorkspace + ". Error description: " + re.what() + + " Please check also the log messages for details."; + throw; + } + g_log.notice() << "Saved focused workspace as file: " << saveDir.toString() + << '\n'; + copyToGeneral(saveDir, focusingComp); +} + +void EnggDiffractionPresenter::saveNexus(const RunLabel &runLabel, + const std::string &inputWorkspace) { + const auto filename = outFileNameFactory(inputWorkspace, runLabel, ".nxs"); + auto saveDirectory = outFilesUserDir("Focus"); + saveDirectory.append(filename); + const auto fullOutFileName = saveDirectory.toString(); + + try { + g_log.debug() << "Going to save focused output into OpenGenie file: " + << fullOutFileName << "\n"; + auto alg = + Mantid::API::AlgorithmManager::Instance().createUnmanaged("SaveNexus"); + alg->initialize(); + alg->setProperty("InputWorkspace", inputWorkspace); + alg->setProperty("Filename", fullOutFileName); + alg->execute(); + } catch (std::runtime_error &re) { + g_log.error() << "Error in save NXS format file. Could not run the " + "algorithm SaveNexus successfully for workspace " + << inputWorkspace << ". Error description: " << re.what() + << ". Please also check the log message for details."; + throw; + } + g_log.notice() << "Saved focused workspace as file: " << fullOutFileName + << "\n"; + copyToGeneral(saveDirectory, "Focus"); +} + +/** + * Convert the generated output files and saves them in + * OpenGenie format + * + * @param runLabel run number and bank ID of the workspace to save + * @param inputWorkspace title of the focused workspace + */ +void EnggDiffractionPresenter::saveOpenGenie( + const RunLabel &runLabel, const std::string &inputWorkspace) { + + // Generates the file name in the appropriate format + std::string fullFilename = + outFileNameFactory(inputWorkspace, runLabel, ".his"); + + std::string comp; + Poco::Path saveDir; + if (inputWorkspace.std::string::find("curves") != std::string::npos || + inputWorkspace.std::string::find("intgration") != std::string::npos) { + // Creates appropriate directory + comp = "Calibration"; + saveDir = outFilesUserDir(comp); + } else { + // Creates appropriate directory + comp = "Focus"; + saveDir = outFilesUserDir(comp); + } + + // append the full file name in the end + saveDir.append(fullFilename); + + try { + g_log.debug() << "Going to save focused output into OpenGenie file: " + << fullFilename << '\n'; + auto alg = Mantid::API::AlgorithmManager::Instance().createUnmanaged( + "SaveOpenGenieAscii"); + alg->initialize(); + alg->setProperty("InputWorkspace", inputWorkspace); + std::string filename(saveDir.toString()); + alg->setPropertyValue("Filename", filename); + alg->setPropertyValue("OpenGenieFormat", "ENGIN-X Format"); + alg->execute(); + } catch (std::runtime_error &re) { + g_log.error() << "Error in saving OpenGenie format file. ", + "Could not run the algorithm SaveOpenGenieAscii succesfully for " + "workspace " + + inputWorkspace + ". Error description: " + re.what() + + " Please check also the log messages for details."; + throw; + } + g_log.notice() << "Saves OpenGenieAscii (.his) file written as: " + << saveDir.toString() << '\n'; + copyToGeneral(saveDir, comp); +} + +void EnggDiffractionPresenter::exportSampleLogsToHDF5( + const std::string &inputWorkspace, const std::string &filename) const { + auto saveAlg = Mantid::API::AlgorithmManager::Instance().create( + "ExportSampleLogsToHDF5"); + saveAlg->initialize(); + saveAlg->setProperty("InputWorkspace", inputWorkspace); + saveAlg->setProperty("Filename", filename); + saveAlg->setProperty("Blacklist", "bankid"); + saveAlg->execute(); +} + +/** + * Generates the required file name of the output files + * + * @param inputWorkspace title of the focused workspace + * @param runLabel run number and bank ID of the workspace to save + * @param format the format of the file to be saved as + */ +std::string +EnggDiffractionPresenter::outFileNameFactory(const std::string &inputWorkspace, + const RunLabel &runLabel, + const std::string &format) { + std::string fullFilename; + + const auto runNo = runLabel.runNumber; + const auto bank = std::to_string(runLabel.bank); + + // calibration output files + if (inputWorkspace.std::string::find("curves") != std::string::npos) { + fullFilename = + "ob+" + m_currentInst + "_" + runNo + "_" + bank + "_bank" + format; + + // focus output files + } else if (inputWorkspace.std::string::find("texture") != std::string::npos) { + fullFilename = m_currentInst + "_" + runNo + "_texture_" + bank + format; + } else if (inputWorkspace.std::string::find("cropped") != std::string::npos) { + fullFilename = m_currentInst + "_" + runNo + "_cropped_" + + boost::lexical_cast<std::string>(g_croppedCounter) + format; + g_croppedCounter++; + } else { + fullFilename = m_currentInst + "_" + runNo + "_bank_" + bank + format; + } + return fullFilename; +} + +std::string EnggDiffractionPresenter::vanadiumCurvesPlotFactory() { + std::string pyCode = + + "van_curve_twin_ws = \"__engggui_vanadium_curves_twin_ws\"\n" + + "if(mtd.doesExist(van_curve_twin_ws)):\n" + " DeleteWorkspace(van_curve_twin_ws)\n" + + "CloneWorkspace(InputWorkspace = \"engggui_vanadium_curves\", " + "OutputWorkspace = van_curve_twin_ws)\n" + + "van_curves_ws = workspace(van_curve_twin_ws)\n" + "for i in range(1, 3):\n" + " if (i == 1):\n" + " curve_plot_bank_1 = plotSpectrum(van_curves_ws, [0, 1, " + "2]).activeLayer()\n" + " curve_plot_bank_1.setTitle(\"Engg GUI Vanadium Curves Bank 1\")\n" + + " if (i == 2):\n" + " curve_plot_bank_2 = plotSpectrum(van_curves_ws, [3, 4, " + "5]).activeLayer()\n" + " curve_plot_bank_2.setTitle(\"Engg GUI Vanadium Curves Bank 2\")\n"; + + return pyCode; +} + +/** + * Generates the workspace with difc/zero according to the selected bank + * + * @param difa vector containing constants difa value of each bank + * @param difc vector containing constants difc value of each bank + * @param tzero vector containing constants tzero value of each bank + * @param specNo used to set range for Calibration Cropped + * @param customisedBankName used to set the file and workspace name + * + * @return string with a python script + */ +std::string EnggDiffractionPresenter::TOFFitWorkspaceFactory( + const std::vector<double> &difa, const std::vector<double> &difc, + const std::vector<double> &tzero, const std::string &specNo, + const std::string &customisedBankName) const { + + auto bank1 = size_t(0); + auto bank2 = size_t(1); + std::string pyRange; + std::string plotSpecNum = "False"; + + // sets the range to plot appropriate graph for the particular bank + if (specNo == "North") { + // only enable script to plot bank 1 + pyRange = "1, 2"; + } else if (specNo == "South") { + // only enables python script to plot bank 2 + // as bank 2 data will be located in difc[0] & tzero[0] - refactor + pyRange = "2, 3"; + bank2 = size_t(0); + } else if (specNo != "") { + pyRange = "1, 2"; + plotSpecNum = "True"; + } else { + // enables python script to plot bank 1 & 2 + pyRange = "1, 3"; + } + + std::string pyCode = + "plotSpecNum = " + plotSpecNum + + "\n" + "for i in range(" + + pyRange + + "):\n" + + " if (plotSpecNum == False):\n" + " bank_ws = workspace(\"engggui_calibration_bank_\" + str(i))\n" + " else:\n" + " bank_ws = workspace(\"engggui_calibration_bank_" + + customisedBankName + + "\")\n" + + " xVal = []\n" + " yVal = []\n" + " y2Val = []\n" + + " if (i == 1):\n" + " difa=" + + boost::lexical_cast<std::string>(difa[bank1]) + "\n" + + " difc=" + boost::lexical_cast<std::string>(difc[bank1]) + "\n" + + " tzero=" + boost::lexical_cast<std::string>(tzero[bank1]) + "\n" + + " else:\n" + + " difa=" + + boost::lexical_cast<std::string>(difa[bank2]) + "\n" + + " difc=" + boost::lexical_cast<std::string>(difc[bank2]) + "\n" + + " tzero=" + boost::lexical_cast<std::string>(tzero[bank2]) + "\n" + + + " for irow in range(0, bank_ws.rowCount()):\n" + " xVal.append(bank_ws.cell(irow, 0))\n" + " yVal.append(bank_ws.cell(irow, 5))\n" + + " y2Val.append(pow(xVal[irow], 2) * difa + xVal[irow] * difc + tzero)\n" + + " ws1 = CreateWorkspace(DataX=xVal, DataY=yVal, UnitX=\"Expected " + "Peaks " + " Centre(dSpacing, A)\", YUnitLabel = \"Fitted Peaks Centre(TOF, " + "us)\")\n" + " ws2 = CreateWorkspace(DataX=xVal, DataY=y2Val)\n"; + return pyCode; +} + +/** +* Plot the workspace with difc/zero acordding to selected bank +* +* @param customisedBankName used to set the file and workspace name +* +* @return string with a python script which will merge with +* + +*/ +std::string EnggDiffractionPresenter::plotTOFWorkspace( + const std::string &customisedBankName) const { + std::string pyCode = + // plotSpecNum is true when SpectrumNos being used + " if (plotSpecNum == False):\n" + " output_ws = \"engggui_difc_zero_peaks_bank_\" + str(i)\n" + " else:\n" + " output_ws = \"engggui_difc_zero_peaks_" + + customisedBankName + + "\"\n" + + // delete workspace if exists within ADS already + " if(mtd.doesExist(output_ws)):\n" + " DeleteWorkspace(output_ws)\n" + + // append workspace with peaks data for Peaks Fitted + // and Difc/TZero Straight line + " AppendSpectra(ws1, ws2, OutputWorkspace=output_ws)\n" + " DeleteWorkspace(ws1)\n" + " DeleteWorkspace(ws2)\n" + + " if (plotSpecNum == False):\n" + " DifcZero = \"engggui_difc_zero_peaks_bank_\" + str(i)\n" + " else:\n" + " DifcZero = \"engggui_difc_zero_peaks_" + + customisedBankName + + "\"\n" + + " DifcZeroWs = workspace(DifcZero)\n" + " DifcZeroPlot = plotSpectrum(DifcZeroWs, [0, 1]).activeLayer()\n" + + " if (plotSpecNum == False):\n" + " DifcZeroPlot.setTitle(\"Engg Gui Difc Zero Peaks Bank \" + " + "str(i))\n" + " else:\n" + " DifcZeroPlot.setTitle(\"Engg Gui Difc Zero Peaks " + + customisedBankName + + "\")\n" + + // set the legend title + " DifcZeroPlot.setCurveTitle(0, \"Peaks Fitted\")\n" + " DifcZeroPlot.setCurveTitle(1, \"DifC/TZero Fitted Straight Line\")\n" + " DifcZeroPlot.setAxisTitle(Layer.Bottom, \"Expected Peaks " + "Centre(dSpacing, " + " A)\")\n" + " DifcZeroPlot.setCurveLineStyle(0, QtCore.Qt.DotLine)\n"; + + return pyCode; +} + +/** + * Generates appropriate names for table workspaces + * + * @param specNos SpecNos or bank name to be passed + * @param bank_i current loop of the bank during calibration + */ +std::string EnggDiffractionPresenter::outFitParamsTblNameGenerator( + const std::string &specNos, const size_t bank_i) const { + std::string outFitParamsTblName; + bool specNumUsed = specNos != ""; + + if (specNumUsed) { + if (specNos == "North") + outFitParamsTblName = "engggui_calibration_bank_1"; + else if (specNos == "South") + outFitParamsTblName = "engggui_calibration_bank_2"; + else { + // Get the Customised Bank Name text-ield string from qt + std::string CustomisedBankName = m_view->currentCalibCustomisedBankName(); + + if (CustomisedBankName.empty()) + outFitParamsTblName = "engggui_calibration_bank_cropped"; + else + outFitParamsTblName = "engggui_calibration_bank_" + CustomisedBankName; + } + } else { + outFitParamsTblName = "engggui_calibration_bank_" + + boost::lexical_cast<std::string>(bank_i + 1); + } + return outFitParamsTblName; +} + +/** + * Produces a path to the output directory where files are going to be + * written for a specific user + RB number / experiment ID. It creates + * the output directory if not found, and checks if it is ok and readable. + * + * @param addToDir adds a component to a specific directory for + * focusing, calibration or other files, for example "Calibration" or + * "Focus" + */ +Poco::Path +EnggDiffractionPresenter::outFilesUserDir(const std::string &addToDir) const { + std::string rbn = m_view->getRBNumber(); + Poco::Path dir = outFilesRootDir(); + + try { + dir.append("User"); + dir.append(rbn); + dir.append(addToDir); + + Poco::File dirFile(dir); + if (!dirFile.exists()) { + dirFile.createDirectories(); + } + } catch (Poco::FileAccessDeniedException &e) { + g_log.error() << "Error caused by file access/permission, path to user " + "directory: " + << dir.toString() << ". Error details: " << e.what() << '\n'; + } catch (std::runtime_error &re) { + g_log.error() << "Error while finding/creating a user path: " + << dir.toString() << ". Error details: " << re.what() << '\n'; + } + return dir; +} + +std::string EnggDiffractionPresenter::userHDFRunFilename( + const std::string &runNumber) const { + auto userOutputDir = outFilesUserDir("Runs"); + userOutputDir.append(runNumber + ".hdf5"); + return userOutputDir.toString(); +} + +std::string EnggDiffractionPresenter::userHDFMultiRunFilename( + const std::vector<RunLabel> &runLabels) const { + const auto &begin = runLabels.cbegin(); + const auto &end = runLabels.cend(); + const auto minLabel = std::min_element(begin, end); + const auto maxLabel = std::max_element(begin, end); + auto userOutputDir = outFilesUserDir("Runs"); + userOutputDir.append((minLabel->runNumber) + "_" + (maxLabel->runNumber) + + ".hdf5"); + return userOutputDir.toString(); +} + +/** + * Produces a path to the output directory where files are going to be + * written for a specific user + RB number / experiment ID. It creates + * the output directory if not found. See outFilesUserDir() for the + * sibling method that produces user/rb number-specific directories. + * + * @param addComponent path component to add to the root of general + * files, for example "Calibration" or "Focus" + */ +Poco::Path +EnggDiffractionPresenter::outFilesGeneralDir(const std::string &addComponent) { + Poco::Path dir = outFilesRootDir(); + + try { + + dir.append(addComponent); + + Poco::File dirFile(dir); + if (!dirFile.exists()) { + dirFile.createDirectories(); + } + } catch (Poco::FileAccessDeniedException &e) { + g_log.error() << "Error caused by file access/permission, path to " + "general directory: " + << dir.toString() << ". Error details: " << e.what() << '\n'; + } catch (std::runtime_error &re) { + g_log.error() << "Error while finding/creating a general path: " + << dir.toString() << ". Error details: " << re.what() << '\n'; + } + return dir; +} + +/** + * Produces the root path where output files are going to be written. + */ +Poco::Path EnggDiffractionPresenter::outFilesRootDir() const { + // TODO decide whether to move into settings or use mantid's default directory + // after discussion with users + const std::string rootDir = "EnginX_Mantid"; + Poco::Path dir; + + try { +// takes to the root of directory according to the platform +#ifdef _WIN32 + const std::string ROOT_DRIVE = "C:/"; + dir.assign(ROOT_DRIVE); +#else + dir = Poco::Path().home(); +#endif + dir.append(rootDir); + + Poco::File dirFile(dir); + if (!dirFile.exists()) { + dirFile.createDirectories(); + g_log.notice() << "Creating output directory root for the first time: " + << dir.toString() << '\n'; + } + + } catch (Poco::FileAccessDeniedException &e) { + g_log.error() << "Error, access/permission denied for root directory: " + << dir.toString() + << ". This is a severe error. The interface will not behave " + "correctly when generating files. Error details: " + << e.what() << '\n'; + } catch (std::runtime_error &re) { + g_log.error() << "Error while finding/creating the root directory: " + << dir.toString() + << ". This is a severe error. Details: " << re.what() << '\n'; + } + + return dir; +} + +/* + * Provides a small wrapper function that appends the given string + * to the given path in an OS independent manner and returns the + * resulting path as a string. + * + * @param currentPath The path to be appended to + * @param toAppend The string to append to the path (note '/' or '\\' + * characters should not be included + * + * @return String with the two parts of the path appended + */ +std::string +EnggDiffractionPresenter::appendToPath(const std::string ¤tPath, + const std::string &toAppend) const { + // Uses poco to handle to operation to ensure OS independence + Poco::Path newPath(currentPath); + newPath.append(toAppend); + return newPath.toString(); +} + +/** + * Copy files to the general directories. Normally files are produced + * in the user/RB number specific directories and then can be copied + * to the general/all directories using this method. + * + * @param source path to the file to copy + * + * @param pathComp path component to use for the copy file in the + * general directories, for example "Calibration" or "Focus" + */ +void EnggDiffractionPresenter::copyToGeneral(const Poco::Path &source, + const std::string &pathComp) { + Poco::File file(source); + if (!file.exists() || !file.canRead()) { + g_log.warning() << "Cannot copy the file " << source.toString() + << " to the general/all users directories because it " + "cannot be read.\n"; + return; + } + + auto destDir = outFilesGeneralDir(pathComp); + try { + Poco::File destDirFile(destDir); + if (!destDirFile.exists()) { + destDirFile.createDirectories(); + } + } catch (std::runtime_error &rexc) { + g_log.error() << "Could not create output directory for the general/all " + "files. Cannot copy the user files there: " + << destDir.toString() << ". Error details: " << rexc.what() + << '\n'; + + return; + } + + try { + file.copyTo(destDir.toString()); + } catch (std::runtime_error &rexc) { + g_log.error() << " Could not copy the file '" << file.path() << "' to " + << destDir.toString() << ". Error details: " << rexc.what() + << '\n'; + } + + g_log.information() << "Copied file '" << source.toString() + << "'to general/all directory: " << destDir.toString() + << '\n'; +} + +/** + * Copy files to the user/RB number directories. + * + * @param source path to the file to copy + * + * @param pathComp path component to use for the copy file in the + * general directories, for example "Calibration" or "Focus" + */ +void EnggDiffractionPresenter::copyToUser(const Poco::Path &source, + const std::string &pathComp) { + Poco::File file(source); + if (!file.exists() || !file.canRead()) { + g_log.warning() << "Cannot copy the file " << source.toString() + << " to the user directories because it cannot be read.\n"; + return; + } + + auto destDir = outFilesUserDir(pathComp); + try { + Poco::File destDirFile(destDir); + if (!destDirFile.exists()) { + destDirFile.createDirectories(); + } + } catch (std::runtime_error &rexc) { + g_log.error() << "Could not create output directory for the user " + "files. Cannot copy the user files there: " + << destDir.toString() << ". Error details: " << rexc.what() + << '\n'; + + return; + } + + try { + file.copyTo(destDir.toString()); + } catch (std::runtime_error &rexc) { + g_log.error() << " Could not copy the file '" << file.path() << "' to " + << destDir.toString() << ". Error details: " << rexc.what() + << '\n'; + } + + g_log.information() << "Copied file '" << source.toString() + << "'to user directory: " << destDir.toString() << '\n'; +} + +/** + * Copies a file from a third location to the standard user/RB number + * and the general/all directories. This just uses copyToUser() and + * copyToGeneral(). + * + * @param fullFilename full path to the origin file + */ +void EnggDiffractionPresenter::copyFocusedToUserAndAll( + const std::string &fullFilename) { + // The files are saved by SaveNexus in the Settings/Focusing output folder. + // Then they need to go to the user and 'all' directories. + // The "Settings/Focusing output folder" may go away in the future + Poco::Path nxsPath(fullFilename); + const std::string focusingComp = "Focus"; + auto saveDir = outFilesUserDir(focusingComp); + Poco::Path outFullPath(saveDir); + outFullPath.append(nxsPath.getFileName()); + copyToUser(nxsPath, focusingComp); + copyToGeneral(nxsPath, focusingComp); +} + +/** + * To write the calibration/instrument parameter for GSAS. + * + * @param outFilename name of the output .par/.prm/.iparm file for GSAS + * @param difa list of GSAS DIFA values to include in the file + * @param difc list of GSAS DIFC values to include in the file + * @param tzero list of GSAS TZERO values to include in the file + * @param bankNames list of bank names corresponding the the difc/tzero + * + * @param ceriaNo ceria/calibration run number, to be replaced in the + * template file + * + * @param vanNo vanadium run number, to be replaced in the template file + * + * @param templateFile a template file where to replace the difc/zero + * values. An empty default implies using an "all-banks" template. + */ +void EnggDiffractionPresenter::writeOutCalibFile( + const std::string &outFilename, const std::vector<double> &difa, + const std::vector<double> &difc, const std::vector<double> &tzero, + const std::vector<std::string> &bankNames, const std::string &ceriaNo, + const std::string &vanNo, const std::string &templateFile) { + // TODO: this is horrible and should be changed to avoid running + // Python code. Update this as soon as we have a more stable way of + // generating IPARM/PRM files. + + // Writes a file doing this: + // write_ENGINX_GSAS_iparam_file(output_file, difa, difc, zero, + // ceria_run=241391, vanadium_run=236516, template_file=None): + + // this replace is to prevent issues with network drives on windows: + const std::string safeOutFname = + boost::replace_all_copy(outFilename, "\\", "/"); + std::string pyCode = "import EnggUtils\n"; + pyCode += "import os\n"; + // normalize apparently not needed after the replace, but to be double-safe: + pyCode += "GSAS_iparm_fname = os.path.normpath('" + safeOutFname + "')\n"; + pyCode += "bank_names = []\n"; + pyCode += "ceria_number = \"" + ceriaNo + "\"\n"; + pyCode += "van_number = \"" + vanNo + "\"\n"; + pyCode += "Difas = []\n"; + pyCode += "Difcs = []\n"; + pyCode += "Zeros = []\n"; + std::string templateFileVal = "None"; + if (!templateFile.empty()) { + templateFileVal = "'" + templateFile + "'"; + } + pyCode += "template_file = " + templateFileVal + "\n"; + for (size_t i = 0; i < difc.size(); ++i) { + pyCode += "bank_names.append('" + bankNames[i] + "')\n"; + pyCode += + "Difas.append(" + boost::lexical_cast<std::string>(difa[i]) + ")\n"; + pyCode += + "Difcs.append(" + boost::lexical_cast<std::string>(difc[i]) + ")\n"; + pyCode += + "Zeros.append(" + boost::lexical_cast<std::string>(tzero[i]) + ")\n"; + } + pyCode += + "EnggUtils.write_ENGINX_GSAS_iparam_file(output_file=GSAS_iparm_fname, " + "bank_names=bank_names, difa=Difas, difc=Difcs, tzero=Zeros, " + "ceria_run=ceria_number, " + "vanadium_run=van_number, template_file=template_file) \n"; + + const auto status = m_view->enggRunPythonCode(pyCode); + g_log.information() << "Saved output calibration file via Python. Status: " + << status << '\n'; +} + +/** + * Note down a directory that needs to be added to the data search + * path when looking for run files. This simply uses a vector and adds + * all the paths, as the ConfigService will take care of duplicates, + * invalid directories, etc. + * + * @param filename (full) path to a file + */ +void EnggDiffractionPresenter::recordPathBrowsedTo( + const std::string &filename) { + + Poco::File file(filename); + if (!file.exists() || !file.isFile()) + return; + + Poco::Path path(filename); + Poco::File directory(path.parent()); + if (!directory.exists() || !directory.isDirectory()) + return; + + m_browsedToPaths.emplace_back(directory.path()); +} + +} // namespace CustomInterfaces +} // namespace MantidQt diff --git a/qt/scientific_interfaces/EnggDiffraction/EnggDiffractionPresenter.h b/qt/scientific_interfaces/EnggDiffraction/EnggDiffractionPresenter.h new file mode 100644 index 0000000000000000000000000000000000000000..ab7f699f238059ff13d185a1f98a33a8f9a5c59f --- /dev/null +++ b/qt/scientific_interfaces/EnggDiffraction/EnggDiffractionPresenter.h @@ -0,0 +1,354 @@ +// Mantid Repository : https://github.com/mantidproject/mantid +// +// Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, +// NScD Oak Ridge National Laboratory, European Spallation Source +// & Institut Laue - Langevin +// SPDX - License - Identifier: GPL - 3.0 + +#pragma once + +#include "DllConfig.h" +#include "IEnggDiffractionCalibration.h" +#include "IEnggDiffractionParam.h" +#include "IEnggDiffractionPresenter.h" +#include "IEnggDiffractionView.h" +#include "IEnggVanadiumCorrectionsModel.h" +#include "MantidAPI/ITableWorkspace_fwd.h" +#include "MantidAPI/MatrixWorkspace_fwd.h" +#include "MantidAPI/Workspace_fwd.h" + +#include <boost/scoped_ptr.hpp> + +#include <QObject> + +namespace Poco { +class Path; +} + +class QThread; + +namespace MantidQt { +namespace CustomInterfaces { + +/** +Presenter for the Enggineering Diffraction GUI (presenter as in the +MVP Model-View-Presenter pattern). In principle, in a strict MVP +setup, signals from the model should always be handled through this +presenter and never go directly to the view, and viceversa. +*/ +// needs to be dll-exported for the tests +class MANTIDQT_ENGGDIFFRACTION_DLL EnggDiffractionPresenter + : public QObject, + public IEnggDiffractionPresenter, + public IEnggDiffractionCalibration, + public IEnggDiffractionParam { + // Q_OBJECT for 'connect' with thread/worker + Q_OBJECT + +public: + EnggDiffractionPresenter(IEnggDiffractionView *view); + ~EnggDiffractionPresenter() override; + + void notify(IEnggDiffractionPresenter::Notification notif) override; + + /// the calibration hard work that a worker / thread will run + void doNewCalibration(const std::string &outFilename, + const std::string &vanNo, const std::string &ceriaNo, + const std::string &specNos); + + /// the focusing hard work that a worker / thread will run + void doFocusRun(const std::string &runNo, const std::vector<bool> &banks, + const std::string &specNos, const std::string &dgFile); + + /// checks if its a valid run number returns string + std::string isValidRunNumber(const std::vector<std::string> &dir); + + /// checks if its a valid run number inside vector and returns a vector; + /// used for mutli-run focusing, and other multi-run file selections + std::vector<std::string> + isValidMultiRunNumber(const std::vector<std::string> &dir); + + /// pre-processing re-binning with Rebin, for a worker/thread + void doRebinningTime(const std::string &runNo, double bin, + const std::string &outWSName); + + /// pre-processing re-binning with RebinByPulseTimes, for a worker/thread + void doRebinningPulses(const std::string &runNo, size_t nperiods, double bin, + const std::string &outWSName); + +protected: + void initialize(); + + /// clean shut down of model, view, etc. + void cleanup(); + + void processStart(); + void processLoadExistingCalib(); + void processCalcCalib(); + void ProcessCropCalib(); + void processFocusBasic(); + void processFocusCropped(); + void processFocusTexture(); + void processResetFocus(); + void processRebinTime(); + void processRebinMultiperiod(); + void processLogMsg(); + void processInstChange(); + void processRBNumberChange(); + void processShutDown(); + void processStopFocus(); + + std::vector<std::string> outputFocusFilenames(const std::string &runNo, + const std::vector<bool> &banks); + + std::string outputFocusCroppedFilename(const std::string &runNo); + +protected slots: + void calibrationFinished(); + void focusingFinished(); + void rebinningFinished(); + +private: + bool validateRBNumber(const std::string &rbn) const; + + /// @name Calibration related private methods + //@{ + void inputChecksBeforeCalibrate(const std::string &newVanNo, + const std::string &newCeriaNo); + + std::string outputCalibFilename(const std::string &vanNo, + const std::string &ceriaNo, + const std::string &bankName = ""); + + void updateNewCalib(const std::string &fname); + + void parseCalibrateFilename(const std::string &path, std::string &instName, + std::string &vanNo, std::string &ceriaNo); + + void grabCalibParms(const std::string &fname, std::string &vanNo, + std::string &ceriaNo); + + void updateCalibParmsTable(); + + // this may need to be mocked up in tests + virtual void startAsyncCalibWorker(const std::string &outFilename, + const std::string &vanNo, + const std::string &ceriaNo, + const std::string &specNos); + + void doCalib(const EnggDiffCalibSettings &cs, const std::string &vanNo, + const std::string &ceriaNo, const std::string &outFilename, + const std::string &specNos); + + void appendCalibInstPrefix(const std::string &vanNo, + std::string &outVanName) const; + + void appendCalibInstPrefix(const std::string &vanNo, const std::string &cerNo, + std::string &outVanName, + std::string &outCerName) const; + + std::string + buildCalibrateSuggestedFilename(const std::string &vanNo, + const std::string &ceriaNo, + const std::string &bankName = "") const; + + std::vector<GSASCalibrationParms> currentCalibration() const override; + //@} + + /// @name Focusing related private methods + //@{ + /// this may also need to be mocked up in tests + void startFocusing(const std::vector<std::string> &multi_runNo, + const std::vector<bool> &banks, + const std::string &specNos = "", + const std::string &dgFile = ""); + + virtual void + startAsyncFocusWorker(const std::vector<std::string> &multi_RunNo, + const std::vector<bool> &banks, + const std::string &specNos, const std::string &dgFile); + + void inputChecksBeforeFocusBasic(const std::vector<std::string> &multi_RunNo, + const std::vector<bool> &banks); + void + inputChecksBeforeFocusCropped(const std::vector<std::string> &multi_RunNo, + const std::vector<bool> &banks, + const std::string &specNos); + void + inputChecksBeforeFocusTexture(const std::vector<std::string> &multi_RunNo, + const std::string &dgfile); + void inputChecksBeforeFocus(); + void inputChecksBanks(const std::vector<bool> &banks); + + std::vector<std::string> sumOfFilesLoadVec(); + + std::vector<std::string> + outputFocusTextureFilenames(const std::string &runNo, + const std::vector<size_t> &bankIDs); + + void loadDetectorGroupingCSV(const std::string &dgFile, + std::vector<size_t> &bankIDs, + std::vector<std::string> &specs); + + void doFocusing(const EnggDiffCalibSettings &cs, const std::string &runLabel, + const size_t bank, const std::string &specNos, + const std::string &dgFile); + + /// @name Methods related to pre-processing / re-binning + //@{ + void inputChecksBeforeRebin(const std::string &runNo); + + void inputChecksBeforeRebinTime(const std::string &runNo, double bin); + + void inputChecksBeforeRebinPulses(const std::string &runNo, size_t nperiods, + double timeStep); + + Mantid::API::Workspace_sptr loadToPreproc(const std::string &runNo); + + virtual void startAsyncRebinningTimeWorker(const std::string &runNo, + double bin, + const std::string &outWSName); + + virtual void startAsyncRebinningPulsesWorker(const std::string &runNo, + size_t nperiods, double timeStep, + const std::string &outWSName); + //@} + + // plots workspace according to the user selection + void plotFocusedWorkspace(const std::string &outWSName); + + void plotCalibWorkspace(const std::vector<double> &difa, + const std::vector<double> &difc, + const std::vector<double> &tzero, + const std::string &specNos); + + // algorithms to save the generated workspace + void saveGSS(const RunLabel &runLabel, const std::string &inputWorkspace); + void saveFocusedXYE(const RunLabel &runLabel, + const std::string &inputWorkspace); + void saveNexus(const RunLabel &runLabel, const std::string &inputWorkspace); + void saveOpenGenie(const RunLabel &runLabel, + const std::string &inputWorkspace); + void exportSampleLogsToHDF5(const std::string &inputWorkspace, + const std::string &filename) const; + + // generates the required file name of the output files + std::string outFileNameFactory(const std::string &inputWorkspace, + const RunLabel &runLabel, + const std::string &format); + + // returns a directory as a path, creating it if not found, and checking + // errors + Poco::Path outFilesUserDir(const std::string &addToDir) const override; + std::string userHDFRunFilename(const std::string &runNumber) const override; + std::string userHDFMultiRunFilename( + const std::vector<RunLabel> &runLabels) const override; + Poco::Path outFilesGeneralDir(const std::string &addComponent); + Poco::Path outFilesRootDir() const; + + std::string appendToPath(const std::string &path, + const std::string &toAppend) const; + + /// convenience methods to copy files to different destinations + void copyToGeneral(const Poco::Path &source, const std::string &pathComp); + void copyToUser(const Poco::Path &source, const std::string &pathComp); + void copyFocusedToUserAndAll(const std::string &fullFilename); + + // generates appropriate names for table workspaces + std::string outFitParamsTblNameGenerator(const std::string &specNos, + size_t bank_i) const; + + // generates the pycode string which can be passed to view + std::string vanadiumCurvesPlotFactory(); + + std::string TOFFitWorkspaceFactory( + const std::vector<double> &difa, const std::vector<double> &difc, + const std::vector<double> &tzero, const std::string &specNo, + const std::string &customisedBankName) const; + + std::string plotTOFWorkspace(const std::string &customisedBankName) const; + + void writeOutCalibFile(const std::string &outFilename, + const std::vector<double> &difa, + const std::vector<double> &difc, + const std::vector<double> &tzero, + const std::vector<std::string> &bankNames, + const std::string &ceriaNo, const std::string &vanNo, + const std::string &templateFile = ""); + + /// keep track of the paths the user "browses to", to add them in + /// the file search path + void recordPathBrowsedTo(const std::string &filename); + + /// paths the user has "browsed to", to add them to the search path + std::vector<std::string> m_browsedToPaths; + + /// string to use for invalid run number error message + const static std::string g_runNumberErrorStr; + + // for the GSAS parameters (difc, difa, tzero) of the banks + static const std::string g_calibBanksParms; + + /// whether to allow users to give the output calibration filename + const static bool g_askUserCalibFilename; + + /// whether to break the thread + static bool g_abortThread; + + /// whether to run Sum Of Files & which focus run number to use + static std::string g_sumOfFilesFocus; + + /// saves the last valid run number + static std::string g_lastValidRun; + + /// bank name used or SpecNos for cropped calibration + static std::string g_calibCropIdentifier; + + QThread *m_workerThread; + + /// true if the last thing ran was cancelled + bool m_cancelled; + + /// true if the last calibration completed successfully + bool m_calibFinishedOK; + + /// error that caused the calibration to fail + std::string m_calibError; + /// path where the calibration has been produced (par/prm file) + std::string m_calibFullPath; + + /// The current calibration parameters (used for units conversion). It should + /// be updated when a new calibration is done or re-loading an existing one + std::vector<GSASCalibrationParms> m_currentCalibParms; + + /// true if the last focusing completed successfully + bool m_focusFinishedOK; + /// error that caused the focus to fail + std::string m_focusError; + /// true if the last pre-processing/re-binning completed successfully + bool m_rebinningFinishedOK; + + /// Counter for the cropped output files + static int g_croppedCounter; + + /// counter for the plotting workspace + static int g_plottingCounter; + + /// Associated view for this presenter (MVP pattern) + IEnggDiffractionView *const m_view; + + /// Tracks if the view has started to shut down following a close signal + bool m_viewHasClosed; + + /// Associated model for this presenter (MVP pattern) + // const boost::scoped_ptr<EnggDiffractionModel> m_model; + + /// the current selected instrument + std::string m_currentInst = ""; + + /// Model for calculating the vanadium corrections workspaces for focus and + /// calib + boost::shared_ptr<IEnggVanadiumCorrectionsModel> m_vanadiumCorrectionsModel; +}; + +} // namespace CustomInterfaces +} // namespace MantidQt \ No newline at end of file diff --git a/qt/scientific_interfaces/EnggDiffraction/EnggDiffractionViewQtGUI.cpp b/qt/scientific_interfaces/EnggDiffraction/EnggDiffractionViewQtGUI.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d8abce02b5edaf2e809430707b77ae3878f5cf0f --- /dev/null +++ b/qt/scientific_interfaces/EnggDiffraction/EnggDiffractionViewQtGUI.cpp @@ -0,0 +1,1105 @@ +// Mantid Repository : https://github.com/mantidproject/mantid +// +// Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, +// NScD Oak Ridge National Laboratory, European Spallation Source +// & Institut Laue - Langevin +// SPDX - License - Identifier: GPL - 3.0 + +#include "EnggDiffractionViewQtGUI.h" +#include "EnggDiffractionPresenter.h" +#include "MantidKernel/ConfigService.h" +#include "MantidQtWidgets/Common/AlgorithmInputHistory.h" +#include "MantidQtWidgets/Common/AlgorithmRunner.h" +#include "MantidQtWidgets/Common/HelpWindow.h" +#include "MantidQtWidgets/Common/MWRunFiles.h" + +#include <Poco/DirectoryIterator.h> +#include <Poco/Path.h> + +#include <QCheckBox> +#include <QCloseEvent> +#include <QFileDialog> +#include <QMessageBox> +#include <QSettings> + +using namespace Mantid::API; +using namespace MantidQt::CustomInterfaces; + +namespace MantidQt { +namespace CustomInterfaces { + +// Add this class to the list of specialised dialogs in this namespace +// Hidden for release of 5.0 to be removed as a maintainance issue. +// DECLARE_SUBWINDOW(EnggDiffractionViewQtGUI) + +const double EnggDiffractionViewQtGUI::g_defaultRebinWidth = -0.0005; + +int EnggDiffractionViewQtGUI::g_currentType = 0; +int EnggDiffractionViewQtGUI::g_currentRunMode = 0; +int EnggDiffractionViewQtGUI::g_currentCropCalibBankName = 0; + +const std::string EnggDiffractionViewQtGUI::g_iparmExtStr = + "GSAS instrument parameters, IPARM file: PRM, PAR, IPAR, IPARAM " + "(*.prm *.par *.ipar *.iparam);;" + "Other extensions/all files (*)"; + +const std::string EnggDiffractionViewQtGUI::g_pixelCalibExt = + "Comma separated values text file with calibration table, CSV" + "(*.csv);;" + "Nexus file with calibration table: NXS, NEXUS" + "(*.nxs *.nexus);;" + "Supported formats: CSV, NXS " + "(*.csv *.nxs *.nexus);;" + "Other extensions/all files (*)"; + +const std::string EnggDiffractionViewQtGUI::g_DetGrpExtStr = + "Detector Grouping File: CSV " + "(*.csv *.txt);;" + "Other extensions/all files (*)"; + +const std::string EnggDiffractionViewQtGUI::g_settingsGroup = + "CustomInterfaces/EnggDiffractionView"; + +/** + * Default constructor. + * + * @param parent Parent window (most likely the Mantid main app window). + */ +EnggDiffractionViewQtGUI::EnggDiffractionViewQtGUI(QWidget *parent) + : UserSubWindow(parent), IEnggDiffractionView(), m_fittingWidget(nullptr), + m_currentInst("ENGINX"), m_splashMsg(nullptr), m_presenter(nullptr) {} + +void EnggDiffractionViewQtGUI::initLayout() { + // setup container ui + m_ui.setupUi(this); + + // presenter that knows how to handle a IEnggDiffractionView should + // take care of all the logic. Note that the view needs to know the + // concrete presenter + auto fullPres = boost::make_shared<EnggDiffractionPresenter>(this); + m_presenter = fullPres; + + // add tab contents and set up their ui's + QWidget *wCalib = new QWidget(m_ui.tabMain); + m_uiTabCalib.setupUi(wCalib); + m_ui.tabMain->addTab(wCalib, QString("Calibration")); + + QWidget *wFocus = new QWidget(m_ui.tabMain); + m_uiTabFocus.setupUi(wFocus); + m_ui.tabMain->addTab(wFocus, QString("Focus")); + + QWidget *wPreproc = new QWidget(m_ui.tabMain); + m_uiTabPreproc.setupUi(wPreproc); + m_ui.tabMain->addTab(wPreproc, QString("Pre-processing")); + + // This is created from a QWidget* -> use null-deleter to prevent double-free + // with Qt + boost::shared_ptr<EnggDiffractionViewQtGUI> sharedView( + this, [](EnggDiffractionViewQtGUI * /*unused*/) {}); + m_fittingWidget = + new EnggDiffFittingViewQtWidget(m_ui.tabMain, sharedView, sharedView, + fullPres, fullPres, sharedView, fullPres); + m_ui.tabMain->addTab(m_fittingWidget, QString("Fitting")); + + m_gsasWidget = + new EnggDiffGSASFittingViewQtWidget(sharedView, sharedView, fullPres); + m_ui.tabMain->addTab(m_gsasWidget, QString("GSAS-II Refinement")); + + QWidget *wSettings = new QWidget(m_ui.tabMain); + m_uiTabSettings.setupUi(wSettings); + m_ui.tabMain->addTab(wSettings, QString("Settings")); + + QComboBox *inst = m_ui.comboBox_instrument; + m_currentInst = inst->currentText().toStdString(); + + setPrefix(m_currentInst); + // An initial check on the RB number will enable the tabs after all + // the widgets and connections are set up + enableTabs(false); + + readSettings(); + + // basic UI setup, connect signals, etc. + doSetupGeneralWidgets(); + doSetupTabCalib(); + doSetupTabFocus(); + doSetupTabPreproc(); + doSetupTabSettings(); + + m_presenter->notify(IEnggDiffractionPresenter::Start); + // We need to delay the RB-number check for the pop-up (splash message) + // as it will be shown very early (before the interface + // window itself is shown) and that will cause a crash in Qt code on + // some platforms (windows 10, and 7 sometimes). + // so perform the check in the showEvent method to check on start up +} + +void EnggDiffractionViewQtGUI::doSetupTabCalib() { + // Some recent available runs as defaults. This (as well as the + // empty defaults just above) should probably be made persistent - + // and encapsulated into a CalibrationParameters or similar + // class/structure + const std::string vanadiumRun = "236516"; + const std::string ceriaRun = "241391"; + if (m_uiTabCalib.MWRunFiles_new_vanadium_num->getUserInput() + .toString() + .isEmpty()) { + m_uiTabCalib.MWRunFiles_new_vanadium_num->setFileTextWithoutSearch( + QString::fromStdString(vanadiumRun)); + } + if (m_uiTabCalib.MWRunFiles_new_ceria_num->getUserInput() + .toString() + .isEmpty()) { + m_uiTabCalib.MWRunFiles_new_ceria_num->setFileTextWithoutSearch( + QString::fromStdString(ceriaRun)); + } + + // push button signals/slots + connect(m_uiTabCalib.pushButton_load_calib, SIGNAL(released()), this, + SLOT(loadCalibrationClicked())); + + connect(m_uiTabCalib.pushButton_new_calib, SIGNAL(released()), this, + SLOT(calibrateClicked())); + + connect(m_uiTabCalib.pushButton_new_cropped_calib, SIGNAL(released()), this, + SLOT(CroppedCalibrateClicked())); + + connect(m_uiTabCalib.comboBox_calib_cropped_bank_name, + SIGNAL(currentIndexChanged(int)), this, + SLOT(calibspecNoChanged(int))); + + connect(m_uiTabCalib.comboBox_calib_cropped_bank_name, + SIGNAL(currentIndexChanged(int)), this, SLOT(enableSpecNos())); + + enableCalibrateFocusFitUserActions(true); +} + +void EnggDiffractionViewQtGUI::doSetupTabFocus() { + + connect(m_uiTabFocus.pushButton_focus, SIGNAL(released()), this, + SLOT(focusClicked())); + + connect(m_uiTabFocus.pushButton_focus_cropped, SIGNAL(released()), this, + SLOT(focusCroppedClicked())); + + connect(m_uiTabFocus.pushButton_texture_browse_grouping_file, + SIGNAL(released()), this, SLOT(browseTextureDetGroupingFile())); + + connect(m_uiTabFocus.pushButton_focus_texture, SIGNAL(released()), this, + SLOT(focusTextureClicked())); + + connect(m_uiTabFocus.pushButton_reset, SIGNAL(released()), this, + SLOT(focusResetClicked())); + + connect(m_uiTabFocus.pushButton_stop_focus, SIGNAL(released()), this, + SLOT(focusStopClicked())); + + connect(m_uiTabFocus.comboBox_PlotData, SIGNAL(currentIndexChanged(int)), + this, SLOT(plotRepChanged(int))); + + connect(m_uiTabFocus.comboBox_Multi_Runs, SIGNAL(currentIndexChanged(int)), + this, SLOT(multiRunModeChanged(int))); + + connect(m_uiTabFocus.checkBox_plot_focused_ws, SIGNAL(clicked()), this, + SLOT(plotFocusStatus())); +} + +void EnggDiffractionViewQtGUI::doSetupTabPreproc() { + connect(m_uiTabPreproc.pushButton_rebin_time, SIGNAL(released()), this, + SLOT(rebinTimeClicked())); + + connect(m_uiTabPreproc.pushButton_rebin_multiperiod, SIGNAL(released()), this, + SLOT(rebinMultiperiodClicked())); +} + +void EnggDiffractionViewQtGUI::doSetupTabSettings() { + // line edits that display paths and the like + m_uiTabSettings.lineEdit_input_dir_calib->setText( + QString::fromStdString(m_calibSettings.m_inputDirCalib)); + m_uiTabSettings.lineEdit_input_dir_raw->setText( + QString::fromStdString(m_calibSettings.m_inputDirRaw)); + m_uiTabSettings.lineEdit_pixel_calib_filename->setText( + QString::fromStdString(m_calibSettings.m_pixelCalibFilename)); + m_uiTabSettings.lineEdit_template_gsas_prm->setText( + QString::fromStdString(m_calibSettings.m_templateGSAS_PRM)); + m_calibSettings.m_forceRecalcOverwrite = false; + m_uiTabSettings.checkBox_force_recalculate_overwrite->setChecked( + m_calibSettings.m_forceRecalcOverwrite); + + // push button signals/slots + connect(m_uiTabSettings.pushButton_browse_input_dir_calib, SIGNAL(released()), + this, SLOT(browseInputDirCalib())); + + connect(m_uiTabSettings.pushButton_browse_input_dir_raw, SIGNAL(released()), + this, SLOT(browseInputDirRaw())); + + connect(m_uiTabSettings.pushButton_browse_pixel_calib_filename, + SIGNAL(released()), this, SLOT(browsePixelCalibFilename())); + + connect(m_uiTabSettings.pushButton_browse_template_gsas_prm, + SIGNAL(released()), this, SLOT(browseTemplateGSAS_PRM())); + + connect(m_uiTabSettings.checkBox_force_recalculate_overwrite, + SIGNAL(stateChanged(int)), this, + SLOT(forceRecalculateStateChanged())); +} + +void EnggDiffractionViewQtGUI::doSetupGeneralWidgets() { + doSetupSplashMsg(); + + // don't show the re-size corner + m_ui.statusbar->setSizeGripEnabled(false); + + // change instrument + connect(m_ui.comboBox_instrument, SIGNAL(currentIndexChanged(int)), this, + SLOT(instrumentChanged(int))); + connect(m_ui.pushButton_help, SIGNAL(released()), this, SLOT(openHelpWin())); + // note connection to the parent window, otherwise an empty frame window + // may remain open and visible after this close + if (this->parent()) { + connect(m_ui.pushButton_close, SIGNAL(released()), this->parent(), + SLOT(close())); + } + + connect(m_ui.lineEdit_RBNumber, SIGNAL(editingFinished()), this, + SLOT(RBNumberChanged())); +} + +void EnggDiffractionViewQtGUI::doSetupSplashMsg() { + if (m_splashMsg) + delete m_splashMsg; + + m_splashMsg = new QMessageBox(this); + m_splashMsg->setIcon(QMessageBox::Information); + m_splashMsg->setStandardButtons(QMessageBox::NoButton); + m_splashMsg->setWindowTitle("Setting up"); + m_splashMsg->setText("Setting up the interface!"); + m_splashMsg->setWindowFlags(Qt::SplashScreen | Qt::FramelessWindowHint | + Qt::X11BypassWindowManagerHint); + m_splashMsg->setWindowModality(Qt::NonModal); + // we don't want to show now: m_splashMsg->show(); +} + +void EnggDiffractionViewQtGUI::readSettings() { + QSettings qs; + qs.beginGroup(QString::fromStdString(g_settingsGroup)); + + m_ui.lineEdit_RBNumber->setText( + qs.value("user-params-RBNumber", "").toString()); + + m_uiTabCalib.lineEdit_current_vanadium_num->setText( + qs.value("user-params-current-vanadium-num", "").toString()); + m_uiTabCalib.lineEdit_current_ceria_num->setText( + qs.value("user-params-current-ceria-num", "").toString()); + QString calibFname = qs.value("current-calib-filename", "").toString(); + m_uiTabCalib.lineEdit_current_calib_filename->setText(calibFname); + + m_uiTabCalib.MWRunFiles_new_vanadium_num->setUserInput( + qs.value("user-params-new-vanadium-num", "").toString()); + m_uiTabCalib.MWRunFiles_new_ceria_num->setUserInput( + qs.value("user-params-new-ceria-num", "").toString()); + + m_uiTabCalib.groupBox_calib_cropped->setChecked( + qs.value("user-params-calib-cropped-group-checkbox", false).toBool()); + + m_uiTabCalib.comboBox_calib_cropped_bank_name->setCurrentIndex(0); + + m_uiTabCalib.lineEdit_cropped_spec_nos->setText( + qs.value("user-params-calib-cropped-spectrum-nos", "").toString()); + + m_uiTabCalib.lineEdit_cropped_customise_bank_name->setText( + qs.value("user-params-calib-cropped-customise-name", "cropped") + .toString()); + + m_uiTabCalib.checkBox_PlotData_Calib->setChecked( + qs.value("user-param-calib-plot-data", true).toBool()); + + // user params - focusing + m_uiTabFocus.MWRunFiles_run_num->setUserInput( + qs.value("user-params-focus-runno", "").toString()); + + qs.beginReadArray("user-params-focus-bank_i"); + qs.setArrayIndex(0); + m_uiTabFocus.checkBox_focus_bank1->setChecked( + qs.value("value", true).toBool()); + qs.setArrayIndex(1); + m_uiTabFocus.checkBox_focus_bank2->setChecked( + qs.value("value", true).toBool()); + qs.endArray(); + + m_uiTabFocus.MWRunFiles_cropped_run_num->setUserInput( + qs.value("user-params-focus-cropped-runno", "").toString()); + + m_uiTabFocus.lineEdit_cropped_spec_nos->setText( + qs.value("user-params-focus-cropped-spectrum-nos", "").toString()); + + m_uiTabFocus.MWRunFiles_texture_run_num->setUserInput( + qs.value("user-params-focus-texture-runno", "").toString()); + + m_uiTabFocus.lineEdit_texture_grouping_file->setText( + qs.value("user-params-focus-texture-detector-grouping-file", "") + .toString()); + + m_uiTabFocus.groupBox_cropped->setChecked( + qs.value("user-params-focus-cropped-group-checkbox", false).toBool()); + + m_uiTabFocus.groupBox_texture->setChecked( + qs.value("user-params-focus-texture-group-checkbox", false).toBool()); + + m_uiTabFocus.checkBox_plot_focused_ws->setChecked( + qs.value("user-params-focus-plot-focused-ws", true).toBool()); + + m_uiTabFocus.checkBox_save_output_files->setChecked( + qs.value("user-params-focus-save-output-files", true).toBool()); + + m_uiTabFocus.comboBox_PlotData->setCurrentIndex( + qs.value("user-params-focus-plot-type", 0).toInt()); + + m_uiTabFocus.comboBox_Multi_Runs->setCurrentIndex( + qs.value("user-params-multiple-runs-focus-mode", 0).toInt()); + + // pre-processing (re-binning) + m_uiTabPreproc.MWRunFiles_preproc_run_num->setUserInput( + qs.value("user-params-preproc-runno", "").toString()); + + m_uiTabPreproc.doubleSpinBox_time_bin->setValue( + qs.value("user-params-time-bin", 0.1).toDouble()); + + m_uiTabPreproc.spinBox_nperiods->setValue( + qs.value("user-params-nperiods", 2).toInt()); + + m_uiTabPreproc.doubleSpinBox_step_time->setValue( + qs.value("user-params-step-time", 1).toDouble()); + + // settings + QString lastPath = + MantidQt::API::AlgorithmInputHistory::Instance().getPreviousDirectory(); + // TODO: as this is growing, it should become << >> operators on + // EnggDiffCalibSettings + m_calibSettings.m_inputDirCalib = + qs.value("input-dir-calib-files", lastPath).toString().toStdString(); + + m_calibSettings.m_inputDirRaw = + qs.value("input-dir-raw-files", lastPath).toString().toStdString(); + + const std::string fullCalib = guessDefaultFullCalibrationPath(); + m_calibSettings.m_pixelCalibFilename = + qs.value("pixel-calib-filename", QString::fromStdString(fullCalib)) + .toString() + .toStdString(); + + // 'advanced' block + m_calibSettings.m_forceRecalcOverwrite = + qs.value("force-recalc-overwrite", false).toBool(); + + const std::string templ = guessGSASTemplatePath(); + m_calibSettings.m_templateGSAS_PRM = + qs.value("template-gsas-prm", QString::fromStdString(templ)) + .toString() + .toStdString(); + + m_calibSettings.m_rebinCalibrate = + qs.value("rebin-calib", g_defaultRebinWidth).toFloat(); + + m_ui.tabMain->setCurrentIndex(qs.value("selected-tab-index").toInt()); + + restoreGeometry(qs.value("interface-win-geometry").toByteArray()); + qs.endGroup(); +} + +void EnggDiffractionViewQtGUI::saveSettings() const { + QSettings qs; + qs.beginGroup(QString::fromStdString(g_settingsGroup)); + + qs.setValue("user-params-RBNumber", m_ui.lineEdit_RBNumber->text()); + + qs.setValue("user-params-current-vanadium-num", + m_uiTabCalib.lineEdit_current_vanadium_num->text()); + qs.setValue("user-params-current-ceria-num", + m_uiTabCalib.lineEdit_current_ceria_num->text()); + qs.setValue("current-calib-filename", + m_uiTabCalib.lineEdit_current_calib_filename->text()); + + qs.setValue("user-params-new-vanadium-num", ""); + qs.setValue("user-params-new-ceria-num", ""); + + qs.setValue("user-params-calib-cropped-group-checkbox", + m_uiTabCalib.groupBox_calib_cropped->isChecked()); + + qs.setValue("user-params-calib-cropped-spectrum-nos", + m_uiTabCalib.lineEdit_cropped_spec_nos->text()); + + qs.setValue("user-params-calib-cropped-customise-name", + m_uiTabCalib.lineEdit_cropped_customise_bank_name->text()); + + qs.setValue("user-param-calib-plot-data", + m_uiTabCalib.checkBox_PlotData_Calib->isChecked()); + + // user params - focusing + qs.setValue("user-params-focus-runno", + m_uiTabFocus.MWRunFiles_run_num->getText()); + + qs.beginWriteArray("user-params-focus-bank_i"); + qs.setArrayIndex(0); + qs.setValue("value", m_uiTabFocus.checkBox_focus_bank1->isChecked()); + qs.setArrayIndex(1); + qs.setValue("value", m_uiTabFocus.checkBox_focus_bank2->isChecked()); + qs.endArray(); + + qs.setValue("user-params-focus-cropped-runno", + m_uiTabFocus.MWRunFiles_cropped_run_num->getText()); + qs.setValue("user-params-focus-cropped-spectrum-nos", + m_uiTabFocus.lineEdit_cropped_spec_nos->text()); + + qs.setValue("user-params-focus-texture-runno", + m_uiTabFocus.MWRunFiles_texture_run_num->getText()); + qs.setValue("user-params-focus-texture-detector-grouping-file", + m_uiTabFocus.lineEdit_texture_grouping_file->text()); + + qs.setValue("user-params-focus-cropped-group-checkbox", + m_uiTabFocus.groupBox_cropped->isChecked()); + + qs.setValue("user-params-focus-texture-group-checkbox", + m_uiTabFocus.groupBox_texture->isChecked()); + + qs.setValue("user-params-focus-plot-focused-ws", + m_uiTabFocus.checkBox_plot_focused_ws->isChecked()); + + qs.setValue("user-params-focus-save-output-files", + m_uiTabFocus.checkBox_plot_focused_ws->isChecked()); + + qs.setValue("user-params-focus-plot-type", + m_uiTabFocus.comboBox_PlotData->currentIndex()); + + qs.setValue("user-params-multiple-runs-focus-mode", + m_uiTabFocus.comboBox_Multi_Runs->currentIndex()); + + // pre-processing (re-binning) + qs.setValue("user-params-preproc-runno", + m_uiTabPreproc.MWRunFiles_preproc_run_num->getText()); + + qs.setValue("user-params-time-bin", + m_uiTabPreproc.doubleSpinBox_time_bin->value()); + + qs.setValue("user-params-nperiods", m_uiTabPreproc.spinBox_nperiods->value()); + + qs.value("user-params-step-time", + m_uiTabPreproc.doubleSpinBox_step_time->value()); + + // TODO: this should become << >> operators on EnggDiffCalibSettings + qs.setValue("input-dir-calib-files", + QString::fromStdString(m_calibSettings.m_inputDirCalib)); + qs.setValue("input-dir-raw-files", + QString::fromStdString(m_calibSettings.m_inputDirRaw)); + qs.setValue("pixel-calib-filename", + QString::fromStdString(m_calibSettings.m_pixelCalibFilename)); + // 'advanced' block + qs.setValue("force-recalc-overwrite", m_calibSettings.m_forceRecalcOverwrite); + qs.setValue("template-gsas-prm", + QString::fromStdString(m_calibSettings.m_templateGSAS_PRM)); + qs.setValue("rebin-calib", m_calibSettings.m_rebinCalibrate); + + qs.setValue("selected-tab-index", m_ui.tabMain->currentIndex()); + + qs.setValue("interface-win-geometry", saveGeometry()); + qs.endGroup(); +} + +std::string EnggDiffractionViewQtGUI::guessGSASTemplatePath() const { + // Inside the mantid installation target directory: + // scripts/Engineering/template_ENGINX_241391_236516_North_and_South_banks.par + Poco::Path templ = + Mantid::Kernel::ConfigService::Instance().getInstrumentDirectory(); + templ = templ.makeParent(); + templ.append("scripts"); + templ.append("Engineering"); + templ.append("template_ENGINX_241391_236516_North_and_South_banks.par"); + return templ.toString(); +} + +std::string EnggDiffractionViewQtGUI::guessDefaultFullCalibrationPath() const { + // Inside the mantid installation target directory: + // scripts/Engineering/ENGINX_full_pixel_calibration_vana194547_ceria193749.csv + Poco::Path templ = + Mantid::Kernel::ConfigService::Instance().getInstrumentDirectory(); + templ = templ.makeParent(); + templ.append("scripts"); + templ.append("Engineering"); + templ.append("calib"); + templ.append("ENGINX_full_pixel_calibration_vana194547_ceria193749.csv"); + return templ.toString(); +} + +void EnggDiffractionViewQtGUI::splashMessage(bool visible, + const std::string &shortMsg, + const std::string &description) { + if (!m_splashMsg) + return; + + m_splashMsg->setWindowTitle(QString::fromStdString(shortMsg)); + m_splashMsg->setText(QString::fromStdString(description)); + // when showing the message, force it to show up centered + if (visible) { + const auto pos = this->mapToGlobal(rect().center()); + m_splashMsg->move(pos.x() - m_splashMsg->width() / 2, + pos.y() - m_splashMsg->height() / 2); + } + m_splashMsg->setVisible(visible); +} + +void EnggDiffractionViewQtGUI::showStatus(const std::string &sts) { + m_ui.statusbar->showMessage(QString::fromStdString(sts)); +} + +void EnggDiffractionViewQtGUI::userWarning(const std::string &err, + const std::string &description) { + QMessageBox::warning(this, QString::fromStdString(err), + QString::fromStdString(description), QMessageBox::Ok, + QMessageBox::Ok); +} + +void EnggDiffractionViewQtGUI::userError(const std::string &err, + const std::string &description) { + QMessageBox::critical(this, QString::fromStdString(err), + QString::fromStdString(description), QMessageBox::Ok, + QMessageBox::Ok); +} + +std::string EnggDiffractionViewQtGUI::askNewCalibrationFilename( + const std::string &suggestedFname) { + // append dir (basename) + filename + QString prevPath = QString::fromStdString(m_calibSettings.m_inputDirCalib); + if (prevPath.isEmpty()) { + prevPath = + MantidQt::API::AlgorithmInputHistory::Instance().getPreviousDirectory(); + } + QDir path(prevPath); + QString suggestion = path.filePath(QString::fromStdString(suggestedFname)); + QString choice = QFileDialog::getSaveFileName( + this, tr("Please select the name of the calibration file"), suggestion, + QString::fromStdString(g_iparmExtStr)); + + return choice.toStdString(); +} + +std::string EnggDiffractionViewQtGUI::getRBNumber() const { + return m_ui.lineEdit_RBNumber->text().toStdString(); +} + +std::string EnggDiffractionViewQtGUI::currentVanadiumNo() const { + return m_uiTabCalib.lineEdit_current_vanadium_num->text().toStdString(); +} + +std::string EnggDiffractionViewQtGUI::currentCeriaNo() const { + return m_uiTabCalib.lineEdit_current_ceria_num->text().toStdString(); +} + +std::vector<std::string> EnggDiffractionViewQtGUI::newVanadiumNo() const { + return qListToVector(m_uiTabCalib.MWRunFiles_new_vanadium_num->getFilenames(), + m_uiTabCalib.MWRunFiles_new_vanadium_num->isValid()); +} + +std::vector<std::string> EnggDiffractionViewQtGUI::newCeriaNo() const { + return qListToVector(m_uiTabCalib.MWRunFiles_new_ceria_num->getFilenames(), + m_uiTabCalib.MWRunFiles_new_ceria_num->isValid()); +} + +std::string EnggDiffractionViewQtGUI::currentCalibFile() const { + return m_uiTabCalib.lineEdit_current_calib_filename->text().toStdString(); +} + +void EnggDiffractionViewQtGUI::newCalibLoaded(const std::string &vanadiumNo, + const std::string &ceriaNo, + const std::string &fname) { + + m_uiTabCalib.lineEdit_current_vanadium_num->setText( + QString::fromStdString(vanadiumNo)); + m_uiTabCalib.lineEdit_current_ceria_num->setText( + QString::fromStdString(ceriaNo)); + m_uiTabCalib.lineEdit_current_calib_filename->setText( + QString::fromStdString(fname)); + + if (!fname.empty()) { + MantidQt::API::AlgorithmInputHistory::Instance().setPreviousDirectory( + QString::fromStdString(fname)); + } +} + +void EnggDiffractionViewQtGUI::enableCalibrateFocusFitUserActions(bool enable) { + // calibrate + m_uiTabCalib.groupBox_make_new_calib->setEnabled(enable); + m_uiTabCalib.groupBox_current_calib->setEnabled(enable); + m_uiTabCalib.groupBox_calib_cropped->setEnabled(enable); + m_uiTabCalib.pushButton_new_cropped_calib->setEnabled(enable); + m_ui.pushButton_close->setEnabled(enable); + m_uiTabCalib.checkBox_PlotData_Calib->setEnabled(enable); + + // focus + m_uiTabFocus.MWRunFiles_run_num->setEnabled(enable); + m_uiTabFocus.pushButton_focus->setEnabled(enable); + + m_uiTabFocus.groupBox_cropped->setEnabled(enable); + m_uiTabFocus.groupBox_texture->setEnabled(enable); + + // Disable all focus output options except graph plotting + m_uiTabFocus.checkBox_plot_focused_ws->setEnabled(enable); + m_uiTabFocus.checkBox_save_output_files->setEnabled(enable); + m_uiTabFocus.comboBox_Multi_Runs->setEnabled(enable); + + m_uiTabFocus.pushButton_stop_focus->setDisabled(enable); + m_uiTabFocus.pushButton_reset->setEnabled(enable); + + // pre-processing + m_uiTabPreproc.MWRunFiles_preproc_run_num->setEnabled(enable); + m_uiTabPreproc.pushButton_rebin_time->setEnabled(enable); + m_uiTabPreproc.pushButton_rebin_multiperiod->setEnabled(enable); + + // fitting + m_fittingWidget->enable(enable); + m_gsasWidget->setEnabled(enable); +} + +void EnggDiffractionViewQtGUI::enableTabs(bool enable) { + for (int ti = 0; ti < m_ui.tabMain->count(); ++ti) { + m_ui.tabMain->setTabEnabled(ti, enable); + } +} + +std::vector<std::string> EnggDiffractionViewQtGUI::currentPreprocRunNo() const { + return qListToVector( + m_uiTabPreproc.MWRunFiles_preproc_run_num->getFilenames(), + m_uiTabPreproc.MWRunFiles_preproc_run_num->isValid()); +} + +double EnggDiffractionViewQtGUI::rebinningTimeBin() const { + return m_uiTabPreproc.doubleSpinBox_time_bin->value(); +} + +size_t EnggDiffractionViewQtGUI::rebinningPulsesNumberPeriods() const { + return m_uiTabPreproc.spinBox_nperiods->value(); +} + +double EnggDiffractionViewQtGUI::rebinningPulsesTime() const { + return m_uiTabPreproc.doubleSpinBox_step_time->value(); +} + +void EnggDiffractionViewQtGUI::plotFocusedSpectrum(const std::string &wsName) { + std::string pyCode = + "win=plotSpectrum('" + wsName + "', 0, error_bars=False, type=0)"; + + std::string status = + runPythonCode(QString::fromStdString(pyCode), false).toStdString(); + m_logMsgs.emplace_back("Plotted output focused data, with status string " + + status); + m_presenter->notify(IEnggDiffractionPresenter::LogMsg); +} + +void EnggDiffractionViewQtGUI::plotWaterfallSpectrum( + const std::string &wsName) { + // parameter of list ? + std::string pyCode = + "plotSpectrum('" + wsName + + "', 0, error_bars=False, type=0, waterfall=True, window=win)"; + std::string status = + runPythonCode(QString::fromStdString(pyCode), false).toStdString(); + m_logMsgs.emplace_back("Plotted output focused data, with status string " + + status); + m_presenter->notify(IEnggDiffractionPresenter::LogMsg); +} + +void EnggDiffractionViewQtGUI::plotReplacingWindow(const std::string &wsName, + const std::string &spectrum, + const std::string &type) { + std::string pyCode = "win=plotSpectrum('" + wsName + "', " + spectrum + + ", error_bars=False, type=" + type + + ", window=win, clearWindow=True)"; + std::string status = + runPythonCode(QString::fromStdString(pyCode), false).toStdString(); + + m_logMsgs.emplace_back("Plotted output focused data, with status string " + + status); + m_presenter->notify(IEnggDiffractionPresenter::LogMsg); +} + +void EnggDiffractionViewQtGUI::plotCalibOutput(const std::string &pyCode) { + + std::string status = + runPythonCode(QString::fromStdString(pyCode), false).toStdString(); + + m_logMsgs.emplace_back( + "Plotted output calibration vanadium curves, with status string " + + status); + m_presenter->notify(IEnggDiffractionPresenter::LogMsg); +} + +void EnggDiffractionViewQtGUI::resetFocus() { + m_uiTabFocus.MWRunFiles_run_num->setUserInput(""); + m_uiTabFocus.checkBox_focus_bank1->setChecked(true); + m_uiTabFocus.checkBox_focus_bank2->setChecked(true); + + m_uiTabFocus.MWRunFiles_cropped_run_num->setUserInput(""); + m_uiTabFocus.lineEdit_cropped_spec_nos->setText(""); + + m_uiTabFocus.groupBox_cropped->setChecked(false); + m_uiTabFocus.groupBox_texture->setChecked(false); + + m_uiTabFocus.MWRunFiles_run_num->setUserInput(""); + m_uiTabFocus.lineEdit_texture_grouping_file->setText(""); +} + +std::string +EnggDiffractionViewQtGUI::enggRunPythonCode(const std::string &pyCode) { + std::string status = + runPythonCode(QString::fromStdString(pyCode), false).toStdString(); + + return status; +} + +std::string EnggDiffractionViewQtGUI::askExistingCalibFilename() { + QString prevPath = QString::fromStdString(m_calibSettings.m_inputDirCalib); + if (prevPath.isEmpty()) { + prevPath = + MantidQt::API::AlgorithmInputHistory::Instance().getPreviousDirectory(); + } + + QString filename = + QFileDialog::getOpenFileName(this, tr("Open calibration file"), prevPath, + QString::fromStdString(g_iparmExtStr)); + + if (!filename.isEmpty()) { + MantidQt::API::AlgorithmInputHistory::Instance().setPreviousDirectory( + filename); + } + + return filename.toStdString(); +} + +void EnggDiffractionViewQtGUI::loadCalibrationClicked() { + m_presenter->notify(IEnggDiffractionPresenter::LoadExistingCalib); +} + +void EnggDiffractionViewQtGUI::calibrateClicked() { + m_presenter->notify(IEnggDiffractionPresenter::CalcCalib); +} + +void EnggDiffractionViewQtGUI::CroppedCalibrateClicked() { + m_presenter->notify(IEnggDiffractionPresenter::CropCalib); +} + +void EnggDiffractionViewQtGUI::focusClicked() { + m_presenter->notify(IEnggDiffractionPresenter::FocusRun); +} + +void EnggDiffractionViewQtGUI::focusCroppedClicked() { + m_presenter->notify(IEnggDiffractionPresenter::FocusCropped); +} + +void EnggDiffractionViewQtGUI::focusTextureClicked() { + m_presenter->notify(IEnggDiffractionPresenter::FocusTexture); +} + +void EnggDiffractionViewQtGUI::focusResetClicked() { + m_presenter->notify(IEnggDiffractionPresenter::ResetFocus); +} + +void EnggDiffractionViewQtGUI::focusStopClicked() { + m_presenter->notify(IEnggDiffractionPresenter::StopFocus); +} + +void EnggDiffractionViewQtGUI::rebinTimeClicked() { + m_presenter->notify(IEnggDiffractionPresenter::RebinTime); +} + +void EnggDiffractionViewQtGUI::rebinMultiperiodClicked() { + m_presenter->notify(IEnggDiffractionPresenter::RebinMultiperiod); +} + +void EnggDiffractionViewQtGUI::browseInputDirCalib() { + QString prevPath = QString::fromStdString(m_calibSettings.m_inputDirCalib); + if (prevPath.isEmpty()) { + prevPath = + MantidQt::API::AlgorithmInputHistory::Instance().getPreviousDirectory(); + } + QString dir = QFileDialog::getExistingDirectory( + this, tr("Open Directory"), prevPath, + QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks); + + if (dir.isEmpty()) { + return; + } + + MantidQt::API::AlgorithmInputHistory::Instance().setPreviousDirectory(dir); + m_calibSettings.m_inputDirCalib = dir.toStdString(); + m_uiTabSettings.lineEdit_input_dir_calib->setText( + QString::fromStdString(m_calibSettings.m_inputDirCalib)); +} + +void EnggDiffractionViewQtGUI::browseInputDirRaw() { + QString prevPath = QString::fromStdString(m_calibSettings.m_inputDirRaw); + if (prevPath.isEmpty()) { + prevPath = + MantidQt::API::AlgorithmInputHistory::Instance().getPreviousDirectory(); + } + QString dir = QFileDialog::getExistingDirectory( + this, tr("Open Directory"), prevPath, + QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks); + + if (dir.isEmpty()) { + return; + } + + MantidQt::API::AlgorithmInputHistory::Instance().setPreviousDirectory(dir); + m_calibSettings.m_inputDirRaw = dir.toStdString(); + m_uiTabSettings.lineEdit_input_dir_raw->setText( + QString::fromStdString(m_calibSettings.m_inputDirRaw)); +} + +void EnggDiffractionViewQtGUI::browsePixelCalibFilename() { + QString prevPath = QString::fromStdString(m_calibSettings.m_inputDirCalib); + if (prevPath.isEmpty()) { + prevPath = + MantidQt::API::AlgorithmInputHistory::Instance().getPreviousDirectory(); + } + + QString filename = QFileDialog::getOpenFileName( + this, tr("Open pixel calibration (full calibration) file"), prevPath, + QString::fromStdString(g_pixelCalibExt)); + + if (filename.isEmpty()) { + return; + } + + m_calibSettings.m_pixelCalibFilename = filename.toStdString(); + m_uiTabSettings.lineEdit_pixel_calib_filename->setText( + QString::fromStdString(m_calibSettings.m_pixelCalibFilename)); +} + +void EnggDiffractionViewQtGUI::browseTemplateGSAS_PRM() { + + QString prevPath = QString::fromStdString(m_calibSettings.m_templateGSAS_PRM); + QString path(QFileDialog::getOpenFileName( + this, tr("Open GSAS IPAR template file"), prevPath, + QString::fromStdString(g_iparmExtStr))); + + if (path.isEmpty()) { + return; + } + + m_calibSettings.m_templateGSAS_PRM = path.toStdString(); + m_uiTabSettings.lineEdit_template_gsas_prm->setText( + QString::fromStdString(m_calibSettings.m_templateGSAS_PRM)); +} + +void EnggDiffractionViewQtGUI::forceRecalculateStateChanged() { + m_calibSettings.m_forceRecalcOverwrite = + m_uiTabSettings.checkBox_force_recalculate_overwrite->isChecked(); +} + +void EnggDiffractionViewQtGUI::browseTextureDetGroupingFile() { + QString prevPath = QString::fromStdString(m_calibSettings.m_inputDirRaw); + if (prevPath.isEmpty()) { + prevPath = + MantidQt::API::AlgorithmInputHistory::Instance().getPreviousDirectory(); + } + + QString path(QFileDialog::getOpenFileName( + this, tr("Open detector grouping file"), prevPath, + QString::fromStdString(g_DetGrpExtStr))); + + if (path.isEmpty()) { + return; + } + + MantidQt::API::AlgorithmInputHistory::Instance().setPreviousDirectory(path); + m_uiTabFocus.lineEdit_texture_grouping_file->setText(path); +} + +std::vector<std::string> EnggDiffractionViewQtGUI::focusingRunNo() const { + return qListToVector(m_uiTabFocus.MWRunFiles_run_num->getFilenames(), + m_uiTabFocus.MWRunFiles_run_num->isValid()); +} + +std::vector<std::string> +EnggDiffractionViewQtGUI::focusingCroppedRunNo() const { + return qListToVector(m_uiTabFocus.MWRunFiles_cropped_run_num->getFilenames(), + m_uiTabFocus.MWRunFiles_cropped_run_num->isValid()); +} + +std::vector<std::string> +EnggDiffractionViewQtGUI::focusingTextureRunNo() const { + return qListToVector(m_uiTabFocus.MWRunFiles_texture_run_num->getFilenames(), + m_uiTabFocus.MWRunFiles_texture_run_num->isValid()); +} + +std::vector<std::string> +EnggDiffractionViewQtGUI::qListToVector(const QStringList &list, + bool validator) const { + std::vector<std::string> vec; + if (validator) { + foreach (const QString &str, list) { vec.emplace_back(str.toStdString()); } + } + + return vec; +} + +std::vector<bool> EnggDiffractionViewQtGUI::focusingBanks() const { + std::vector<bool> res; + res.emplace_back(m_uiTabFocus.checkBox_focus_bank1->isChecked()); + res.emplace_back(m_uiTabFocus.checkBox_focus_bank2->isChecked()); + return res; +} + +std::string EnggDiffractionViewQtGUI::focusingCroppedSpectrumNos() const { + return m_uiTabFocus.lineEdit_cropped_spec_nos->text().toStdString(); +} + +std::string EnggDiffractionViewQtGUI::focusingTextureGroupingFile() const { + return m_uiTabFocus.lineEdit_texture_grouping_file->text().toStdString(); +} + +bool EnggDiffractionViewQtGUI::focusedOutWorkspace() const { + return m_uiTabFocus.checkBox_plot_focused_ws->checkState(); +} + +bool EnggDiffractionViewQtGUI::plotCalibWorkspace() const { + return m_uiTabCalib.checkBox_PlotData_Calib->checkState(); +} + +bool EnggDiffractionViewQtGUI::saveFocusedOutputFiles() const { + return m_uiTabFocus.checkBox_save_output_files->checkState(); +} + +void MantidQt::CustomInterfaces::EnggDiffractionViewQtGUI::showInvalidRBNumber( + const bool rbNumberIsValid) { + m_ui.label_invalidRBNumber->setVisible(!rbNumberIsValid); +} + +void EnggDiffractionViewQtGUI::plotFocusStatus() { + if (focusedOutWorkspace()) { + m_uiTabFocus.comboBox_PlotData->setEnabled(true); + } else { + m_uiTabFocus.comboBox_PlotData->setEnabled(false); + } +} + +void EnggDiffractionViewQtGUI::calibspecNoChanged(int /*idx*/) { + QComboBox *BankName = m_uiTabCalib.comboBox_calib_cropped_bank_name; + if (!BankName) + return; + g_currentCropCalibBankName = BankName->currentIndex(); +} + +void EnggDiffractionViewQtGUI::enableSpecNos() { + if (g_currentCropCalibBankName == 0) { + m_uiTabCalib.lineEdit_cropped_spec_nos->setEnabled(true); + m_uiTabCalib.lineEdit_cropped_customise_bank_name->setEnabled(true); + } else { + m_uiTabCalib.lineEdit_cropped_spec_nos->setDisabled(true); + m_uiTabCalib.lineEdit_cropped_customise_bank_name->setDisabled(true); + } +} + +std::string EnggDiffractionViewQtGUI::currentCalibSpecNos() const { + return m_uiTabCalib.lineEdit_cropped_spec_nos->text().toStdString(); +} + +std::string EnggDiffractionViewQtGUI::currentCalibCustomisedBankName() const { + return m_uiTabCalib.lineEdit_cropped_customise_bank_name->text() + .toStdString(); +} + +void EnggDiffractionViewQtGUI::multiRunModeChanged(int /*idx*/) { + QComboBox *plotType = m_uiTabFocus.comboBox_Multi_Runs; + if (!plotType) + return; + g_currentRunMode = plotType->currentIndex(); +} + +void EnggDiffractionViewQtGUI::plotRepChanged(int /*idx*/) { + QComboBox *plotType = m_uiTabFocus.comboBox_PlotData; + if (!plotType) + return; + g_currentType = plotType->currentIndex(); +} + +void EnggDiffractionViewQtGUI::instrumentChanged(int /*idx*/) { + QComboBox *inst = m_ui.comboBox_instrument; + if (!inst) + return; + m_currentInst = inst->currentText().toStdString(); + m_presenter->notify(IEnggDiffractionPresenter::InstrumentChange); +} + +void EnggDiffractionViewQtGUI::RBNumberChanged() { + m_presenter->notify(IEnggDiffractionPresenter::RBNumberChange); +} + +void EnggDiffractionViewQtGUI::userSelectInstrument(const QString &prefix) { + // Set file browsing to current instrument + setPrefix(prefix.toStdString()); +} + +void EnggDiffractionViewQtGUI::setPrefix(const std::string &prefix) { + QString prefixInput = QString::fromStdString(prefix); + // focus tab + m_uiTabFocus.MWRunFiles_run_num->setInstrumentOverride(prefixInput); + m_uiTabFocus.MWRunFiles_texture_run_num->setInstrumentOverride(prefixInput); + + // calibration tab + m_uiTabCalib.MWRunFiles_new_ceria_num->setInstrumentOverride(prefixInput); + m_uiTabCalib.MWRunFiles_new_vanadium_num->setInstrumentOverride(prefixInput); + + // rebin tab + m_uiTabPreproc.MWRunFiles_preproc_run_num->setInstrumentOverride(prefixInput); +} + +void EnggDiffractionViewQtGUI::showEvent(QShowEvent * /*unused*/) { + // make sure that the RB number is checked on interface startup/show + m_presenter->notify(IEnggDiffractionPresenter::RBNumberChange); +} + +void EnggDiffractionViewQtGUI::closeEvent(QCloseEvent *event) { + int answer = QMessageBox::AcceptRole; + + QMessageBox msgBox; + if (false /* TODO: get this from user settings if eventually used */) { + msgBox.setWindowTitle("Close the engineering diffraction interface"); + // with something like this, we'd have layout issues: + // msgBox.setStandardButtons(QMessageBox::No | QMessageBox::Yes); + // msgBox.setDefaultButton(QMessageBox::Yes); + msgBox.setIconPixmap(QPixmap(":/win/unknown.png")); + QCheckBox confirmCheckBox("Always ask for confirmation", &msgBox); + confirmCheckBox.setCheckState(Qt::Checked); + msgBox.layout()->addItem(new QSpacerItem(0, 0, QSizePolicy::Expanding)); + msgBox.layout()->addWidget(&confirmCheckBox); + QPushButton *bYes = msgBox.addButton("Yes", QMessageBox::YesRole); + bYes->setIcon(style()->standardIcon(QStyle::SP_DialogYesButton)); + QPushButton *bNo = msgBox.addButton("No", QMessageBox::NoRole); + bNo->setIcon(style()->standardIcon(QStyle::SP_DialogNoButton)); + msgBox.setDefaultButton(bNo); + msgBox.setText("You are about to close this interface"); + msgBox.setInformativeText("Are you sure?"); + answer = msgBox.exec(); + } + + if (answer == QMessageBox::AcceptRole && m_ui.pushButton_close->isEnabled()) { + m_presenter->notify(IEnggDiffractionPresenter::ShutDown); + delete m_splashMsg; + m_splashMsg = nullptr; + event->accept(); + } else { + event->ignore(); + } +} + +void EnggDiffractionViewQtGUI::openHelpWin() { + MantidQt::API::HelpWindow::showCustomInterface( + nullptr, QString("Engineering Diffraction")); +} + +void EnggDiffractionViewQtGUI::updateTabsInstrument( + const std::string &newInstrument) { + m_fittingWidget->setCurrentInstrument(newInstrument); +} + +} // namespace CustomInterfaces +} // namespace MantidQt diff --git a/qt/scientific_interfaces/EnggDiffraction/EnggDiffractionViewQtGUI.h b/qt/scientific_interfaces/EnggDiffraction/EnggDiffractionViewQtGUI.h new file mode 100644 index 0000000000000000000000000000000000000000..a189152fb8d09a1dfb960508d5a0449b8a69a7ce --- /dev/null +++ b/qt/scientific_interfaces/EnggDiffraction/EnggDiffractionViewQtGUI.h @@ -0,0 +1,301 @@ +// Mantid Repository : https://github.com/mantidproject/mantid +// +// Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, +// NScD Oak Ridge National Laboratory, European Spallation Source +// & Institut Laue - Langevin +// SPDX - License - Identifier: GPL - 3.0 + +#pragma once + +#include "DllConfig.h" +#include "EnggDiffFittingViewQtWidget.h" +#include "EnggDiffGSASFittingViewQtWidget.h" +#include "IEnggDiffractionPresenter.h" +#include "IEnggDiffractionView.h" +#include "MantidAPI/IPeakFunction.h" +#include "MantidQtWidgets/Common/UserSubWindow.h" +#include "MantidQtWidgets/Plotting/Qwt/PeakPicker.h" + +#include "ui_EnggDiffractionQtGUI.h" +#include "ui_EnggDiffractionQtTabCalib.h" +#include "ui_EnggDiffractionQtTabFocus.h" +#include "ui_EnggDiffractionQtTabPreproc.h" +#include "ui_EnggDiffractionQtTabSettings.h" + +// Qt classes forward declarations +class QMessageBox; +class QMutex; + +class QwtPlotCurve; +class QwtPlotZoomer; + +namespace MantidQt { +namespace CustomInterfaces { + +/** +Qt-based view of the Engineering Diffraction (EnggDiffraction) +GUI. Provides a concrete view for the graphical interface for Engg +functionality in Mantid. This view is Qt-based and it is probably the +only one that will be implemented in a foreseeable horizon. The +interface of this class is given by IEnggDiffractionView so that it +fits in the MVP (Model-View-Presenter) design of this GUI. +*/ +class MANTIDQT_ENGGDIFFRACTION_DLL EnggDiffractionViewQtGUI + : public MantidQt::API::UserSubWindow, + public IEnggDiffractionView { + Q_OBJECT + +public: + /// Default Constructor + EnggDiffractionViewQtGUI(QWidget *parent = nullptr); + /// Interface name + static std::string name() { return "Engineering Diffraction (Old)"; } + /// This interface's categories. + static QString categoryInfo() { return "Diffraction"; } + + void splashMessage(bool visible, const std::string &shortMsg, + const std::string &description) override; + + void showStatus(const std::string &sts) override; + + void userWarning(const std::string &warn, + const std::string &description) override; + + void userError(const std::string &err, + const std::string &description) override; + + std::string + askNewCalibrationFilename(const std::string &suggestedFname) override; + + std::string askExistingCalibFilename() override; + + std::vector<std::string> logMsgs() const override { return m_logMsgs; } + + std::string getRBNumber() const override; + + EnggDiffCalibSettings currentCalibSettings() const override { + return m_calibSettings; + } + + std::string currentInstrument() const override { return m_currentInst; } + + std::string currentVanadiumNo() const override; + + std::string currentCeriaNo() const override; + + std::string currentCalibFile() const override; + + std::vector<std::string> newVanadiumNo() const override; + + std::vector<std::string> newCeriaNo() const override; + + int currentCropCalibBankName() const override { + return g_currentCropCalibBankName; + } + + std::string currentCalibSpecNos() const override; + + std::string currentCalibCustomisedBankName() const override; + + void newCalibLoaded(const std::string &vanadiumNo, const std::string &ceriaNo, + const std::string &fname) override; + + std::string enggRunPythonCode(const std::string &pyCode) override; + + void enableTabs(bool enable) override; + + void enableCalibrateFocusFitUserActions(bool enable) override; + + std::vector<std::string> focusingRunNo() const override; + + std::vector<std::string> focusingCroppedRunNo() const override; + + std::vector<std::string> focusingTextureRunNo() const override; + + std::vector<bool> focusingBanks() const override; + + std::string focusingCroppedSpectrumNos() const override; + + std::string focusingTextureGroupingFile() const override; + + bool focusedOutWorkspace() const override; + + bool plotCalibWorkspace() const override; + + void resetFocus() override; + + std::vector<std::string> currentPreprocRunNo() const override; + + double rebinningTimeBin() const override; + + size_t rebinningPulsesNumberPeriods() const override; + + double rebinningPulsesTime() const override; + + void plotFocusedSpectrum(const std::string &wsName) override; + + void plotWaterfallSpectrum(const std::string &wsName) override; + + void plotReplacingWindow(const std::string &wsName, + const std::string &spectrum, + const std::string &type) override; + + void plotCalibOutput(const std::string &pyCode) override; + + bool saveFocusedOutputFiles() const override; + + void showInvalidRBNumber(const bool rbNumberIsValid) override; + + int currentPlotType() const override { return g_currentType; } + + int currentMultiRunMode() const override { return g_currentRunMode; } + + void updateTabsInstrument(const std::string &newInstrument) override; + +signals: + void getBanks(); + void setBank(); + +private slots: + /// for buttons, do calibrate, focus, event->histo rebin, and similar + void loadCalibrationClicked(); + void calibrateClicked(); + void CroppedCalibrateClicked(); + void focusClicked(); + void focusCroppedClicked(); + void focusTextureClicked(); + void focusStopClicked(); + void rebinTimeClicked(); + void rebinMultiperiodClicked(); + + // slots of the settings tab/section of the interface + void browseInputDirCalib(); + void browseInputDirRaw(); + void browsePixelCalibFilename(); + void browseTemplateGSAS_PRM(); + void forceRecalculateStateChanged(); + + // slots for the focusing options + void browseTextureDetGroupingFile(); + void focusResetClicked(); + + // slots of the calibration tab/section of the interface + + // slots of the general part of the interface + void instrumentChanged(int idx); + + void RBNumberChanged(); + + // slot of the cropped calibration part of the interface + void calibspecNoChanged(int idx); + + // slots of the focus part of the interface + void plotRepChanged(int idx); + + // slot of the multi-run mode for focus + void multiRunModeChanged(int idx); + + // slots of plot spectrum check box status + void plotFocusStatus(); + + // enables the text field when appropriate bank name is selected + void enableSpecNos(); + + // show the standard Mantid help window with this interface's help + void openHelpWin(); + +private: + /// Setup the interface (tab UI) + void initLayout() override; + void doSetupGeneralWidgets(); + void doSetupSplashMsg(); + void doSetupTabCalib(); + void doSetupTabFocus(); + void doSetupTabPreproc(); + void doSetupTabSettings(); + + std::string guessGSASTemplatePath() const; + std::string guessDefaultFullCalibrationPath() const; + + /// Load default interface settings for each tab, normally on startup + void readSettings(); + /// save settings (before closing) + void saveSettings() const override; + + // when the interface is shown + void showEvent(QShowEvent * /*unused*/) override; + + // window (custom interface) close + void closeEvent(QCloseEvent *ev) override; + + // path/name for the persistent settings group of this interface + const static std::string g_settingsGroup; + + // here the view puts messages before notifying the presenter to show them + std::vector<std::string> m_logMsgs; + + /// Interface definition with widgets for the main interface window + Ui::EnggDiffractionQtGUI m_ui; + // And its sections/tabs. Note that for compactness they're called simply + // 'tabs' + // but they could be separate dialogs, widgets, etc. + Ui::EnggDiffractionQtTabCalib m_uiTabCalib; + Ui::EnggDiffractionQtTabFocus m_uiTabFocus; + Ui::EnggDiffractionQtTabPreproc m_uiTabPreproc; + // Ui::EnggDiffractionQtTabFitting m_uiTabFitting; + EnggDiffFittingViewQtWidget *m_fittingWidget; + EnggDiffGSASFittingViewQtWidget *m_gsasWidget; + Ui::EnggDiffractionQtTabSettings m_uiTabSettings; + + /// converts QList to a vector + std::vector<std::string> qListToVector(const QStringList &list, + bool validator) const; + + /// instrument selected (ENGIN-X, etc.) + std::string m_currentInst; + + /// User select instrument + void userSelectInstrument(const QString &prefix); + + /// setting the instrument prefix ahead of the run number + void setPrefix(const std::string &prefix); + + // TODO: The values of these three next static members (bank name, + // type, run mode) can be obtained from widgets when requested/required. They + // shouldn't need to be cached in data members. Remove them. + + // current bank number used for cropped calibration + int static g_currentCropCalibBankName; + + // plot data representation type selected + int static g_currentType; + + // multi-run focus mode type selected + int static g_currentRunMode; + + /// calibration settings - from/to the 'settings' tab + EnggDiffCalibSettings m_calibSettings; + + /// To show important non-modal messages + QMessageBox *m_splashMsg; + + /// This is in principle the only settings for 'focus' + std::string m_focusDir; + + /// for the 'Rebin' parameter of some Engg* algorithms + static const double g_defaultRebinWidth; + + /// supported file extensions string for IPARM files (for the open + /// file dialogs) + static const std::string g_iparmExtStr; + /// supported file extensions string for the pixel (full) claibration + static const std::string g_pixelCalibExt; + /// supported/suggested file extensions for the detector groups file + /// (focusing) + static const std::string g_DetGrpExtStr; + + /// presenter as in the model-view-presenter + boost::shared_ptr<IEnggDiffractionPresenter> m_presenter; +}; + +} // namespace CustomInterfaces +} // namespace MantidQt diff --git a/qt/scientific_interfaces/EnggDiffraction/EnggVanadiumCorrectionsModel.cpp b/qt/scientific_interfaces/EnggDiffraction/EnggVanadiumCorrectionsModel.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4a853ba26050276c93b2361c80b5cfa3fd50c3fb --- /dev/null +++ b/qt/scientific_interfaces/EnggDiffraction/EnggVanadiumCorrectionsModel.cpp @@ -0,0 +1,196 @@ +// Mantid Repository : https://github.com/mantidproject/mantid +// +// Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, +// NScD Oak Ridge National Laboratory, European Spallation Source +// & Institut Laue - Langevin +// SPDX - License - Identifier: GPL - 3.0 + +#include "EnggVanadiumCorrectionsModel.h" + +#include "MantidAPI/AlgorithmManager.h" +#include "MantidAPI/AnalysisDataService.h" +#include "MantidAPI/MatrixWorkspace.h" + +#include <Poco/File.h> +#include <Poco/Path.h> + +namespace MantidQt { +namespace CustomInterfaces { + +EnggVanadiumCorrectionsModel::EnggVanadiumCorrectionsModel( + const EnggDiffCalibSettings &calibSettings, + const std::string ¤tInstrument) + : m_calibSettings(calibSettings), m_currentInstrument(currentInstrument) {} + +const std::string EnggVanadiumCorrectionsModel::CURVES_WORKSPACE_NAME = + "engggui_vanadium_curves"; + +const std::string EnggVanadiumCorrectionsModel::INTEGRATED_WORKSPACE_NAME = + "engggui_vanadium_integration"; + +const std::string EnggVanadiumCorrectionsModel::VANADIUM_INPUT_WORKSPACE_NAME = + "engggui_vanadium_ws"; + +std::pair<Mantid::API::ITableWorkspace_sptr, Mantid::API::MatrixWorkspace_sptr> +EnggVanadiumCorrectionsModel::calculateCorrectionWorkspaces( + const std::string &vanadiumRunNumber) const { + const auto vanadiumWS = + loadMatrixWorkspace(vanadiumRunNumber, VANADIUM_INPUT_WORKSPACE_NAME); + + auto enggVanadiumCorrections = + Mantid::API::AlgorithmManager::Instance().create( + "EnggVanadiumCorrections"); + enggVanadiumCorrections->initialize(); + enggVanadiumCorrections->setPropertyValue("VanadiumWorkspace", + VANADIUM_INPUT_WORKSPACE_NAME); + enggVanadiumCorrections->setPropertyValue("OutIntegrationWorkspace", + INTEGRATED_WORKSPACE_NAME); + enggVanadiumCorrections->setPropertyValue("OutCurvesWorkspace", + CURVES_WORKSPACE_NAME); + enggVanadiumCorrections->execute(); + + auto &ADS = Mantid::API::AnalysisDataService::Instance(); + + ADS.remove(VANADIUM_INPUT_WORKSPACE_NAME); + const auto integratedWorkspace = + ADS.retrieveWS<Mantid::API::ITableWorkspace>(INTEGRATED_WORKSPACE_NAME); + const auto curvesWorkspace = + ADS.retrieveWS<Mantid::API::MatrixWorkspace>(CURVES_WORKSPACE_NAME); + return std::make_pair(integratedWorkspace, curvesWorkspace); +} + +std::pair<Mantid::API::ITableWorkspace_sptr, Mantid::API::MatrixWorkspace_sptr> +EnggVanadiumCorrectionsModel::fetchCorrectionWorkspaces( + const std::string &vanadiumRunNumber) const { + const auto cachedCurvesWorkspace = + fetchCachedCurvesWorkspace(vanadiumRunNumber); + const auto cachedIntegratedWorkspace = + fetchCachedIntegratedWorkspace(vanadiumRunNumber); + + if (cachedCurvesWorkspace && cachedIntegratedWorkspace && + !m_calibSettings.m_forceRecalcOverwrite) { + return std::make_pair(cachedIntegratedWorkspace, cachedCurvesWorkspace); + } else { + const auto correctionWorkspaces = + calculateCorrectionWorkspaces(vanadiumRunNumber); + saveCorrectionsToCache(vanadiumRunNumber, correctionWorkspaces.second, + correctionWorkspaces.first); + return correctionWorkspaces; + } +} + +Mantid::API::MatrixWorkspace_sptr +EnggVanadiumCorrectionsModel::fetchCachedCurvesWorkspace( + const std::string &vanadiumRunNumber) const { + const auto filename = generateCurvesFilename(vanadiumRunNumber); + const Poco::File inputFile(filename); + if (inputFile.exists()) { + return loadMatrixWorkspace(filename, CURVES_WORKSPACE_NAME); + } + + return nullptr; +} + +Mantid::API::ITableWorkspace_sptr +EnggVanadiumCorrectionsModel::fetchCachedIntegratedWorkspace( + const std::string &vanadiumRunNumber) const { + const auto filename = generateIntegratedFilename(vanadiumRunNumber); + const Poco::File inputFile(filename); + if (inputFile.exists()) { + return loadTableWorkspace(filename, INTEGRATED_WORKSPACE_NAME); + } + + return nullptr; +} + +std::string EnggVanadiumCorrectionsModel::generateCurvesFilename( + const std::string &vanadiumRunNumber) const { + const static std::string filenameSuffix = + "_precalculated_vanadium_run_bank_curves.nxs"; + + const auto normalisedRunName = Poco::Path(vanadiumRunNumber).getBaseName(); + const auto curvesFilename = normalisedRunName + filenameSuffix; + + Poco::Path inputDir(m_calibSettings.m_inputDirCalib); + inputDir.append(curvesFilename); + return inputDir.toString(); +} + +std::string EnggVanadiumCorrectionsModel::generateIntegratedFilename( + const std::string &vanadiumRunNumber) const { + const static std::string filenameSuffix = + "_precalculated_vanadium_run_integration.nxs"; + + const auto normalisedRunName = Poco::Path(vanadiumRunNumber).getBaseName(); + const auto integratedFilename = normalisedRunName + filenameSuffix; + + Poco::Path inputDir(m_calibSettings.m_inputDirCalib); + inputDir.append(integratedFilename); + return inputDir.toString(); +} + +std::string EnggVanadiumCorrectionsModel::generateVanadiumRunName( + const std::string &vanadiumRunNumber) const { + constexpr static size_t normalisedRunNumberLength = 8; + return m_currentInstrument + + std::string(normalisedRunNumberLength - vanadiumRunNumber.length(), + '0') + + vanadiumRunNumber; +} + +Mantid::API::MatrixWorkspace_sptr +EnggVanadiumCorrectionsModel::loadMatrixWorkspace( + const std::string &filename, const std::string &workspaceName) const { + auto load = Mantid::API::AlgorithmManager::Instance().create("Load"); + load->initialize(); + load->setPropertyValue("Filename", filename); + load->setPropertyValue("OutputWorkspace", workspaceName); + load->execute(); + return Mantid::API::AnalysisDataService::Instance() + .retrieveWS<Mantid::API::MatrixWorkspace>(workspaceName); +} + +Mantid::API::ITableWorkspace_sptr +EnggVanadiumCorrectionsModel::loadTableWorkspace( + const std::string &filename, const std::string &workspaceName) const { + auto load = Mantid::API::AlgorithmManager::Instance().create("Load"); + load->initialize(); + load->setPropertyValue("Filename", filename); + load->setPropertyValue("OutputWorkspace", workspaceName); + load->execute(); + return Mantid::API::AnalysisDataService::Instance() + .retrieveWS<Mantid::API::ITableWorkspace>(workspaceName); +} + +void EnggVanadiumCorrectionsModel::saveCorrectionsToCache( + const std::string &runNumber, + const Mantid::API::MatrixWorkspace_sptr &curvesWorkspace, + const Mantid::API::ITableWorkspace_sptr &integratedWorkspace) const { + const auto curvesFilename = generateCurvesFilename(runNumber); + saveNexus(curvesFilename, curvesWorkspace); + + const auto integratedFilename = generateIntegratedFilename(runNumber); + saveNexus(integratedFilename, integratedWorkspace); +} + +void EnggVanadiumCorrectionsModel::saveNexus( + const std::string &filename, + const Mantid::API::Workspace_sptr &workspace) const { + auto save = Mantid::API::AlgorithmManager::Instance().create("SaveNexus"); + save->initialize(); + save->setProperty("InputWorkspace", workspace); + save->setProperty("Filename", filename); + save->execute(); +} + +void EnggVanadiumCorrectionsModel::setCalibSettings( + const EnggDiffCalibSettings &calibSettings) { + m_calibSettings = calibSettings; +} + +void EnggVanadiumCorrectionsModel::setCurrentInstrument( + const std::string ¤tInstrument) { + m_currentInstrument = currentInstrument; +} + +} // namespace CustomInterfaces +} // namespace MantidQt diff --git a/qt/scientific_interfaces/EnggDiffraction/EnggVanadiumCorrectionsModel.h b/qt/scientific_interfaces/EnggDiffraction/EnggVanadiumCorrectionsModel.h new file mode 100644 index 0000000000000000000000000000000000000000..e448801a74efcdc84dd7921e4c9b69c994163461 --- /dev/null +++ b/qt/scientific_interfaces/EnggDiffraction/EnggVanadiumCorrectionsModel.h @@ -0,0 +1,83 @@ +// Mantid Repository : https://github.com/mantidproject/mantid +// +// Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, +// NScD Oak Ridge National Laboratory, European Spallation Source +// & Institut Laue - Langevin +// SPDX - License - Identifier: GPL - 3.0 + +#pragma once + +#include "DllConfig.h" +#include "IEnggVanadiumCorrectionsModel.h" + +#include <Poco/Path.h> +#include <boost/optional.hpp> + +namespace MantidQt { +namespace CustomInterfaces { + +class MANTIDQT_ENGGDIFFRACTION_DLL EnggVanadiumCorrectionsModel + : public IEnggVanadiumCorrectionsModel { + +public: + EnggVanadiumCorrectionsModel(const EnggDiffCalibSettings &calibSettings, + const std::string ¤tInstrument); + + std::pair<Mantid::API::ITableWorkspace_sptr, + Mantid::API::MatrixWorkspace_sptr> + fetchCorrectionWorkspaces( + const std::string &vanadiumRunNumber) const override; + + void setCalibSettings(const EnggDiffCalibSettings &calibSettings) override; + + void setCurrentInstrument(const std::string ¤tInstrument) override; + +protected: + const static std::string CURVES_WORKSPACE_NAME; + + const static std::string INTEGRATED_WORKSPACE_NAME; + +private: + const static std::string VANADIUM_INPUT_WORKSPACE_NAME; + + virtual std::pair<Mantid::API::ITableWorkspace_sptr, + Mantid::API::MatrixWorkspace_sptr> + calculateCorrectionWorkspaces(const std::string &vanadiumRunNumber) const; + + Mantid::API::MatrixWorkspace_sptr + fetchCachedCurvesWorkspace(const std::string &vanadiumRunNumber) const; + + Mantid::API::ITableWorkspace_sptr + fetchCachedIntegratedWorkspace(const std::string &vanadiumRunNumber) const; + + std::string + generateCurvesFilename(const std::string &vanadiumRunNumber) const; + + std::string + generateIntegratedFilename(const std::string &vanadiumRunNumber) const; + + std::string + generateVanadiumRunName(const std::string &vanadiumRunNumber) const; + + Mantid::API::MatrixWorkspace_sptr + loadMatrixWorkspace(const std::string &filename, + const std::string &workspaceName) const; + + Mantid::API::ITableWorkspace_sptr + loadTableWorkspace(const std::string &filename, + const std::string &workspaceName) const; + + void saveCorrectionsToCache( + const std::string &runNumber, + const Mantid::API::MatrixWorkspace_sptr &curvesWorkspace, + const Mantid::API::ITableWorkspace_sptr &integratedWorkspace) const; + + void saveNexus(const std::string &filename, + const Mantid::API::Workspace_sptr &workspace) const; + + EnggDiffCalibSettings m_calibSettings; + + std::string m_currentInstrument; +}; + +} // namespace CustomInterfaces +} // namespace MantidQt diff --git a/qt/scientific_interfaces/EnggDiffraction/GSASIIRefineFitPeaksOutputProperties.cpp b/qt/scientific_interfaces/EnggDiffraction/GSASIIRefineFitPeaksOutputProperties.cpp new file mode 100644 index 0000000000000000000000000000000000000000..64bf41193da13485979afaee0cbf5bb156c4159c --- /dev/null +++ b/qt/scientific_interfaces/EnggDiffraction/GSASIIRefineFitPeaksOutputProperties.cpp @@ -0,0 +1,34 @@ +// Mantid Repository : https://github.com/mantidproject/mantid +// +// Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, +// NScD Oak Ridge National Laboratory, European Spallation Source +// & Institut Laue - Langevin +// SPDX - License - Identifier: GPL - 3.0 + +#include "GSASIIRefineFitPeaksOutputProperties.h" + +namespace MantidQt { +namespace CustomInterfaces { + +GSASIIRefineFitPeaksOutputProperties::GSASIIRefineFitPeaksOutputProperties( + const double _rwp, const double _sigma, const double _gamma, + const Mantid::API::MatrixWorkspace_sptr &_fittedPeaksWS, + const Mantid::API::ITableWorkspace_sptr &_latticeParamsWS, + const RunLabel &_runLabel) + : rwp(_rwp), sigma(_sigma), gamma(_gamma), fittedPeaksWS(_fittedPeaksWS), + latticeParamsWS(_latticeParamsWS), runLabel(_runLabel) {} + +bool operator==(const GSASIIRefineFitPeaksOutputProperties &lhs, + const GSASIIRefineFitPeaksOutputProperties &rhs) { + return lhs.rwp == rhs.rwp && lhs.sigma == rhs.sigma && + lhs.gamma == rhs.gamma && lhs.fittedPeaksWS == rhs.fittedPeaksWS && + lhs.latticeParamsWS == rhs.latticeParamsWS && + lhs.runLabel == rhs.runLabel; +} + +bool operator!=(const GSASIIRefineFitPeaksOutputProperties &lhs, + const GSASIIRefineFitPeaksOutputProperties &rhs) { + return !(lhs == rhs); +} + +} // namespace CustomInterfaces +} // namespace MantidQt diff --git a/qt/scientific_interfaces/EnggDiffraction/GSASIIRefineFitPeaksOutputProperties.h b/qt/scientific_interfaces/EnggDiffraction/GSASIIRefineFitPeaksOutputProperties.h new file mode 100644 index 0000000000000000000000000000000000000000..435cf4b170a69710eeccae647d4473ad910bf54b --- /dev/null +++ b/qt/scientific_interfaces/EnggDiffraction/GSASIIRefineFitPeaksOutputProperties.h @@ -0,0 +1,49 @@ +// Mantid Repository : https://github.com/mantidproject/mantid +// +// Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, +// NScD Oak Ridge National Laboratory, European Spallation Source +// & Institut Laue - Langevin +// SPDX - License - Identifier: GPL - 3.0 + +#pragma once + +#include "DllConfig.h" +#include "RunLabel.h" + +#include "MantidAPI/ITableWorkspace.h" +#include "MantidAPI/MatrixWorkspace_fwd.h" + +#include <QMetaType> + +namespace MantidQt { +namespace CustomInterfaces { + +struct MANTIDQT_ENGGDIFFRACTION_DLL GSASIIRefineFitPeaksOutputProperties { + GSASIIRefineFitPeaksOutputProperties( + const double _rwp, const double _sigma, const double _gamma, + const Mantid::API::MatrixWorkspace_sptr &_fittedPeaksWS, + const Mantid::API::ITableWorkspace_sptr &_latticeParamsWS, + const RunLabel &_runLabel); + + GSASIIRefineFitPeaksOutputProperties() = default; + + double rwp; + double sigma; + double gamma; + Mantid::API::MatrixWorkspace_sptr fittedPeaksWS; + Mantid::API::ITableWorkspace_sptr latticeParamsWS; + RunLabel runLabel; +}; + +MANTIDQT_ENGGDIFFRACTION_DLL bool +operator==(const GSASIIRefineFitPeaksOutputProperties &lhs, + const GSASIIRefineFitPeaksOutputProperties &rhs); + +MANTIDQT_ENGGDIFFRACTION_DLL bool +operator!=(const GSASIIRefineFitPeaksOutputProperties &lhs, + const GSASIIRefineFitPeaksOutputProperties &rhs); + +} // namespace CustomInterfaces +} // namespace MantidQt + +Q_DECLARE_METATYPE( + MantidQt::CustomInterfaces::GSASIIRefineFitPeaksOutputProperties) diff --git a/qt/scientific_interfaces/EnggDiffraction/GSASIIRefineFitPeaksParameters.cpp b/qt/scientific_interfaces/EnggDiffraction/GSASIIRefineFitPeaksParameters.cpp new file mode 100644 index 0000000000000000000000000000000000000000..370d025fc80a0e2688ce09dc9e96bfda2a84b49a --- /dev/null +++ b/qt/scientific_interfaces/EnggDiffraction/GSASIIRefineFitPeaksParameters.cpp @@ -0,0 +1,47 @@ +// Mantid Repository : https://github.com/mantidproject/mantid +// +// Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, +// NScD Oak Ridge National Laboratory, European Spallation Source +// & Institut Laue - Langevin +// SPDX - License - Identifier: GPL - 3.0 + +#include "GSASIIRefineFitPeaksParameters.h" + +namespace MantidQt { +namespace CustomInterfaces { + +GSASIIRefineFitPeaksParameters::GSASIIRefineFitPeaksParameters( + const Mantid::API::MatrixWorkspace_sptr &_inputWorkspace, + const RunLabel &_runLabel, const GSASRefinementMethod &_refinementMethod, + const std::string &_instParamsFile, + const std::vector<std::string> &_phaseFiles, const std::string &_gsasHome, + const std::string &_gsasProjectFile, const boost::optional<double> &_dMin, + const boost::optional<double> &_negativeWeight, + const boost::optional<double> &_xMin, const boost::optional<double> &_xMax, + const bool _refineSigma, const bool _refineGamma) + : inputWorkspace(_inputWorkspace), runLabel(_runLabel), + refinementMethod(_refinementMethod), instParamsFile(_instParamsFile), + phaseFiles(_phaseFiles), gsasHome(_gsasHome), + gsasProjectFile(_gsasProjectFile), dMin(_dMin), + negativeWeight(_negativeWeight), xMin(_xMin), xMax(_xMax), + refineSigma(_refineSigma), refineGamma(_refineGamma) {} + +bool operator==(const GSASIIRefineFitPeaksParameters &lhs, + const GSASIIRefineFitPeaksParameters &rhs) { + return lhs.inputWorkspace == rhs.inputWorkspace && + lhs.runLabel == rhs.runLabel && + lhs.refinementMethod == rhs.refinementMethod && + lhs.instParamsFile == rhs.instParamsFile && + lhs.phaseFiles == rhs.phaseFiles && lhs.gsasHome == rhs.gsasHome && + lhs.gsasProjectFile == rhs.gsasProjectFile && lhs.dMin == rhs.dMin && + lhs.negativeWeight == rhs.negativeWeight && lhs.xMin == rhs.xMin && + lhs.xMax == rhs.xMax && lhs.refineSigma == rhs.refineSigma && + lhs.refineGamma == rhs.refineGamma; +} + +bool operator!=(const GSASIIRefineFitPeaksParameters &lhs, + const GSASIIRefineFitPeaksParameters &rhs) { + return !(lhs == rhs); +} + +} // namespace CustomInterfaces +} // namespace MantidQt diff --git a/qt/scientific_interfaces/EnggDiffraction/GSASIIRefineFitPeaksParameters.h b/qt/scientific_interfaces/EnggDiffraction/GSASIIRefineFitPeaksParameters.h new file mode 100644 index 0000000000000000000000000000000000000000..d3ef97805f656d90e5484e6bc245761bfb196c5e --- /dev/null +++ b/qt/scientific_interfaces/EnggDiffraction/GSASIIRefineFitPeaksParameters.h @@ -0,0 +1,59 @@ +// Mantid Repository : https://github.com/mantidproject/mantid +// +// Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, +// NScD Oak Ridge National Laboratory, European Spallation Source +// & Institut Laue - Langevin +// SPDX - License - Identifier: GPL - 3.0 + +#pragma once + +#include "DllConfig.h" +#include "EnggDiffGSASRefinementMethod.h" +#include "RunLabel.h" + +#include "MantidAPI/MatrixWorkspace.h" + +#include <boost/optional.hpp> +#include <vector> + +namespace MantidQt { +namespace CustomInterfaces { + +struct MANTIDQT_ENGGDIFFRACTION_DLL GSASIIRefineFitPeaksParameters { + GSASIIRefineFitPeaksParameters( + const Mantid::API::MatrixWorkspace_sptr &_inputWorkspace, + const RunLabel &_runLabel, const GSASRefinementMethod &_refinementMethod, + const std::string &_instParamsFile, + const std::vector<std::string> &_phaseFiles, const std::string &_gsasHome, + const std::string &_gsasProjectFile, const boost::optional<double> &_dMin, + const boost::optional<double> &_negativeWeight, + const boost::optional<double> &_xMin, + const boost::optional<double> &_xMax, const bool _refineSigma, + const bool _refineGamma); + + const Mantid::API::MatrixWorkspace_sptr inputWorkspace; + const RunLabel runLabel; + const GSASRefinementMethod refinementMethod; + const std::string instParamsFile; + const std::vector<std::string> phaseFiles; + const std::string gsasHome; + const std::string gsasProjectFile; + + const boost::optional<double> dMin; + const boost::optional<double> negativeWeight; + const boost::optional<double> xMin; + const boost::optional<double> xMax; + + const bool refineSigma; + const bool refineGamma; +}; + +MANTIDQT_ENGGDIFFRACTION_DLL bool +operator==(const GSASIIRefineFitPeaksParameters &lhs, + const GSASIIRefineFitPeaksParameters &rhs); + +MANTIDQT_ENGGDIFFRACTION_DLL bool +operator!=(const GSASIIRefineFitPeaksParameters &lhs, + const GSASIIRefineFitPeaksParameters &rhs); + +} // namespace CustomInterfaces +} // namespace MantidQt diff --git a/qt/scientific_interfaces/General/DataComparison.cpp b/qt/scientific_interfaces/General/DataComparison.cpp index b60350e50a6b14775816e90c57b72bc9144465c1..8eaa1ccad120c82811c93b748f5f124fce7972b9 100644 --- a/qt/scientific_interfaces/General/DataComparison.cpp +++ b/qt/scientific_interfaces/General/DataComparison.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "DataComparison.h" @@ -139,7 +139,7 @@ void DataComparison::addData() { * * @param ws Pointer to workspace to add. */ -void DataComparison::addDataItem(Workspace_const_sptr ws) { +void DataComparison::addDataItem(const Workspace_const_sptr &ws) { // Check that the workspace is the correct type MatrixWorkspace_const_sptr matrixWs = boost::dynamic_pointer_cast<const MatrixWorkspace>(ws); @@ -212,7 +212,7 @@ void DataComparison::addDataItem(Workspace_const_sptr ws) { * * @param ws Pointer to the workspace */ -bool DataComparison::containsWorkspace(MatrixWorkspace_const_sptr ws) { +bool DataComparison::containsWorkspace(const MatrixWorkspace_const_sptr &ws) { QString testWsName = QString::fromStdString(ws->getName()); int numRows = m_uiForm.twCurrentData->rowCount(); diff --git a/qt/scientific_interfaces/General/DataComparison.h b/qt/scientific_interfaces/General/DataComparison.h index aaf537fa935260a5be9dcd44fb9f3082b4aae6a7..b7893dae28cfa8ee97cdc03edc9ed5d1365a60bd 100644 --- a/qt/scientific_interfaces/General/DataComparison.h +++ b/qt/scientific_interfaces/General/DataComparison.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -37,7 +37,7 @@ public: explicit DataComparison(QWidget *parent = nullptr); /// Tests if a workspace is shown in the UI - bool containsWorkspace(Mantid::API::MatrixWorkspace_const_sptr ws); + bool containsWorkspace(const Mantid::API::MatrixWorkspace_const_sptr &ws); private slots: /// Add selected data to plot @@ -72,7 +72,7 @@ private: /// Initialize the layout void initLayout() override; /// Adds a workspace to the data table - void addDataItem(Mantid::API::Workspace_const_sptr ws); + void addDataItem(const Mantid::API::Workspace_const_sptr &ws); /// Normalises spectra offsets in table void normaliseSpectraOffsets(); /// Gets an initial curve colour for a new workspace diff --git a/qt/scientific_interfaces/General/DllConfig.h b/qt/scientific_interfaces/General/DllConfig.h index 28bc728628dd177bd104d4258fdc4dbcc8f3ee98..bc31ef7509dadeb9ae1a362ea9f30b2ac20b7448 100644 --- a/qt/scientific_interfaces/General/DllConfig.h +++ b/qt/scientific_interfaces/General/DllConfig.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/General/LatticePresenter.cpp b/qt/scientific_interfaces/General/LatticePresenter.cpp index f987ce9d6c9202f76c591ce856384404bd59bdfe..3f4904851fa03d8a67039f45a60dd36ab05a6448 100644 --- a/qt/scientific_interfaces/General/LatticePresenter.cpp +++ b/qt/scientific_interfaces/General/LatticePresenter.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtCustomInterfaces/LatticePresenter.h" #include "MantidGeometry/Crystal/OrientedLattice.h" diff --git a/qt/scientific_interfaces/General/LatticePresenter.h b/qt/scientific_interfaces/General/LatticePresenter.h index b306034db9422eb411f346248cfc546872b2583e..31325712736b11cf168dc58c8f11847cdc91850f 100644 --- a/qt/scientific_interfaces/General/LatticePresenter.h +++ b/qt/scientific_interfaces/General/LatticePresenter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/General/LatticeView.h b/qt/scientific_interfaces/General/LatticeView.h index ab5464919dd4392e8e99f43056ab713c90c00203..0f8370ce00357807f550a085a7308d24638e4a83 100644 --- a/qt/scientific_interfaces/General/LatticeView.h +++ b/qt/scientific_interfaces/General/LatticeView.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/General/MantidEV.cpp b/qt/scientific_interfaces/General/MantidEV.cpp index b95bf944481c1c39c493a599055a31d40d4317e0..88506b13206bc0b60fa46baf06d965e867846dcf 100644 --- a/qt/scientific_interfaces/General/MantidEV.cpp +++ b/qt/scientific_interfaces/General/MantidEV.cpp @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #include <Poco/Path.h> #include <QDesktopWidget> #include <QFileDialog> @@ -1834,7 +1833,7 @@ void MantidEV::errorMessage(const std::string &message) { * * @return true if a double was extacted from the string. */ -bool MantidEV::getDouble(std::string str, double &value) { +bool MantidEV::getDouble(const std::string &str, double &value) { std::istringstream strs(str); if (strs >> value) { return true; @@ -2261,7 +2260,7 @@ void MantidEV::loadSettings(const std::string &filename) { * @param ledt pointer to the QLineEdit component whose state * is to be restored. */ -void MantidEV::restore(QSettings *state, QString name, QLineEdit *ledt) { +void MantidEV::restore(QSettings *state, const QString &name, QLineEdit *ledt) { // NOTE: If state was not saved yet, we don't want to change the // default value, so we only change the text if it's non-empty QString sText = state->value(name, "").toString(); @@ -2279,7 +2278,8 @@ void MantidEV::restore(QSettings *state, QString name, QLineEdit *ledt) { * @param btn pointer to the QCheckbox or QRadioButton component * whose state is to be restored. */ -void MantidEV::restore(QSettings *state, QString name, QAbstractButton *btn) { +void MantidEV::restore(QSettings *state, const QString &name, + QAbstractButton *btn) { btn->setChecked(state->value(name, false).toBool()); } @@ -2291,7 +2291,7 @@ void MantidEV::restore(QSettings *state, QString name, QAbstractButton *btn) { * @param cmbx pointer to the QComboBox component whose state is * to be restored. */ -void MantidEV::restore(QSettings *state, QString name, QComboBox *cmbx) { +void MantidEV::restore(QSettings *state, const QString &name, QComboBox *cmbx) { // NOTE: If state was not saved yet, we don't want to change the // default value, so we only change the selected item if the index // has been set to a valid value. diff --git a/qt/scientific_interfaces/General/MantidEV.h b/qt/scientific_interfaces/General/MantidEV.h index 3bcdb073dfce8490ee618450f30007ace240531a..ca678fdcb1141f4cc26ed4f7ce95e0cae2cd17cd 100644 --- a/qt/scientific_interfaces/General/MantidEV.h +++ b/qt/scientific_interfaces/General/MantidEV.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -363,7 +363,7 @@ private: void errorMessage(const std::string &message); /// Utility method to parse a double value in a string - bool getDouble(std::string str, double &value); + bool getDouble(const std::string &str, double &value); /// Utility method to get a double value from a QtLineEdit widget bool getDouble(QLineEdit *ledt, double &value); @@ -393,13 +393,13 @@ private: void loadSettings(const std::string &filename); /// Restore the value of the QLineEdit component from QSettings - void restore(QSettings *state, QString name, QLineEdit *ledt); + void restore(QSettings *state, const QString &name, QLineEdit *ledt); /// Restore the value of the QCheckbox or QRadioButton from QSettings - void restore(QSettings *state, QString name, QAbstractButton *btn); + void restore(QSettings *state, const QString &name, QAbstractButton *btn); /// Restore the value of a QComboBox from QSettings - void restore(QSettings *state, QString name, QComboBox *cmbx); + void restore(QSettings *state, const QString &name, QComboBox *cmbx); Ui::MantidEV m_uiForm; /// The form generated by Qt Designer diff --git a/qt/scientific_interfaces/General/MantidEVWorker.cpp b/qt/scientific_interfaces/General/MantidEVWorker.cpp index 413d7ebadef817271fe0933f870ebe1e4a3525a9..231a08eb387c829efb8119f15c01afaa3ed12de1 100644 --- a/qt/scientific_interfaces/General/MantidEVWorker.cpp +++ b/qt/scientific_interfaces/General/MantidEVWorker.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include <sstream> diff --git a/qt/scientific_interfaces/General/MantidEVWorker.h b/qt/scientific_interfaces/General/MantidEVWorker.h index 1c711a095d5b1e967ec161901a2f5370fd47fe65..7d3fae16b789d5306f77943af4fe5d5767e56df6 100644 --- a/qt/scientific_interfaces/General/MantidEVWorker.h +++ b/qt/scientific_interfaces/General/MantidEVWorker.h @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #include "MantidKernel/System.h" #include "MantidKernel/V3D.h" #include <vector> diff --git a/qt/scientific_interfaces/General/PrecompiledHeader.h b/qt/scientific_interfaces/General/PrecompiledHeader.h index 615c906d96f4ca5650f269d34d7bc61092dd5111..449a595e135794242211bf62b59cca3c2e7c9fa6 100644 --- a/qt/scientific_interfaces/General/PrecompiledHeader.h +++ b/qt/scientific_interfaces/General/PrecompiledHeader.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/General/SampleTransmission.cpp b/qt/scientific_interfaces/General/SampleTransmission.cpp index 7e4d231437ea36979a8828a350ac9160aafc30fb..88a224484ef36a8fb3abb07f27c283ec03ca0813 100644 --- a/qt/scientific_interfaces/General/SampleTransmission.cpp +++ b/qt/scientific_interfaces/General/SampleTransmission.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------- // Includes diff --git a/qt/scientific_interfaces/General/SampleTransmission.h b/qt/scientific_interfaces/General/SampleTransmission.h index 9b52be0647f73ee70c63e9cad04f90ea74934733..5f6c6756dfe1e6725dcc93896b08d241d8e30cad 100644 --- a/qt/scientific_interfaces/General/SampleTransmission.h +++ b/qt/scientific_interfaces/General/SampleTransmission.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/General/StepScan.cpp b/qt/scientific_interfaces/General/StepScan.cpp index 8bf4d58e63ef94cf6ac3d0d38799c533f83b229c..0731b28502048f2c0d067e38e9dcde51086ffedd 100644 --- a/qt/scientific_interfaces/General/StepScan.cpp +++ b/qt/scientific_interfaces/General/StepScan.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "StepScan.h" #include "MantidAPI/AlgorithmManager.h" @@ -248,7 +248,8 @@ void StepScan::loadFileComplete(bool error) { namespace { class ScopedStatusText { public: - ScopedStatusText(QLabel *label, QString labelText) : status_label(label) { + ScopedStatusText(QLabel *label, const QString &labelText) + : status_label(label) { status_label->setText("<i><font color='darkblue'>" + labelText + "</font></i>"); } @@ -549,7 +550,7 @@ void StepScan::runStepScanAlg() { generateCurve(m_uiForm.plotVariable->currentText()); } -bool StepScan::runStepScanAlgLive(std::string stepScanProperties) { +bool StepScan::runStepScanAlgLive(const std::string &stepScanProperties) { // First stop the currently running live algorithm IAlgorithm_const_sptr oldMonitorLiveData = m_uiForm.mWRunFiles->stopLiveAlgorithm(); diff --git a/qt/scientific_interfaces/General/StepScan.h b/qt/scientific_interfaces/General/StepScan.h index 4a92141b55d7039869a457c2a46bd7a6daeb11a2..b44c224b5af56630fed50c1d7d1d9f7a4ddff31d 100644 --- a/qt/scientific_interfaces/General/StepScan.h +++ b/qt/scientific_interfaces/General/StepScan.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -45,7 +45,7 @@ private slots: void expandPlotVarCombobox(const Mantid::API::MatrixWorkspace_const_sptr &ws); void fillNormalizationCombobox(); void runStepScanAlg(); - bool runStepScanAlgLive(std::string stepScanProperties); + bool runStepScanAlgLive(const std::string &stepScanProperties); void updateForNormalizationChange(); void generateCurve(const QString &var); diff --git a/qt/scientific_interfaces/General/Updateable.h b/qt/scientific_interfaces/General/Updateable.h index d88db1873becd1d18ef998e9de87e29c030f6a99..7c4fd9103b741bf35164655f0ad79c40b0095c15 100644 --- a/qt/scientific_interfaces/General/Updateable.h +++ b/qt/scientific_interfaces/General/Updateable.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/ISISReflectometry/Common/Clipboard.cpp b/qt/scientific_interfaces/ISISReflectometry/Common/Clipboard.cpp index 78d7d6943cc7ed1ea08102afe5cf2222678c9fba..e694312743aebabfc722117738ae0f9ee117c8a6 100644 --- a/qt/scientific_interfaces/ISISReflectometry/Common/Clipboard.cpp +++ b/qt/scientific_interfaces/ISISReflectometry/Common/Clipboard.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "Clipboard.h" #include "MantidQtWidgets/Common/Batch/Cell.h" diff --git a/qt/scientific_interfaces/ISISReflectometry/Common/Clipboard.h b/qt/scientific_interfaces/ISISReflectometry/Common/Clipboard.h index be1c1291ef73794dbcf4a8dab29ac7a7990f0e6c..c81c4dc1435244c2fa475ba4938691597a8eea97 100644 --- a/qt/scientific_interfaces/ISISReflectometry/Common/Clipboard.h +++ b/qt/scientific_interfaces/ISISReflectometry/Common/Clipboard.h @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #pragma once #include "DllConfig.h" diff --git a/qt/scientific_interfaces/ISISReflectometry/Common/DllConfig.h b/qt/scientific_interfaces/ISISReflectometry/Common/DllConfig.h index 2162e528d469e5f390599ec0c2ca1d6f71e17625..7a23d3350cbb1aff53a42bcd51eeae8a94b5ac8c 100644 --- a/qt/scientific_interfaces/ISISReflectometry/Common/DllConfig.h +++ b/qt/scientific_interfaces/ISISReflectometry/Common/DllConfig.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/ISISReflectometry/Common/First.h b/qt/scientific_interfaces/ISISReflectometry/Common/First.h index 2e3f1470c5f89ec95072434c56a43c54bce048da..63b88b16f440a092a5a75460eb285d7195009154 100644 --- a/qt/scientific_interfaces/ISISReflectometry/Common/First.h +++ b/qt/scientific_interfaces/ISISReflectometry/Common/First.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include <boost/optional.hpp> diff --git a/qt/scientific_interfaces/ISISReflectometry/Common/GetInstrumentParameter.cpp b/qt/scientific_interfaces/ISISReflectometry/Common/GetInstrumentParameter.cpp index ec5a1dc1c93ea21cb53884512cb8981f0c0ba889..ef4d6a8ac6c7850e9aa74167cfb1a1708ca55b53 100644 --- a/qt/scientific_interfaces/ISISReflectometry/Common/GetInstrumentParameter.cpp +++ b/qt/scientific_interfaces/ISISReflectometry/Common/GetInstrumentParameter.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "GetInstrumentParameter.h" namespace MantidQt { @@ -10,7 +10,7 @@ namespace CustomInterfaces { namespace ISISReflectometry { std::vector<std::string> InstrumentParameter<std::string>::get( - Mantid::Geometry::Instrument_const_sptr instrument, + const Mantid::Geometry::Instrument_const_sptr &instrument, std::string const ¶meterName) { try { return instrument->getStringParameter(parameterName); @@ -20,7 +20,7 @@ std::vector<std::string> InstrumentParameter<std::string>::get( } std::vector<int> InstrumentParameter<int>::get( - Mantid::Geometry::Instrument_const_sptr instrument, + const Mantid::Geometry::Instrument_const_sptr &instrument, std::string const ¶meterName) { try { return instrument->getIntParameter(parameterName); @@ -30,7 +30,7 @@ std::vector<int> InstrumentParameter<int>::get( } std::vector<bool> InstrumentParameter<bool>::get( - Mantid::Geometry::Instrument_const_sptr instrument, + const Mantid::Geometry::Instrument_const_sptr &instrument, std::string const ¶meterName) { try { return instrument->getBoolParameter(parameterName); @@ -40,7 +40,7 @@ std::vector<bool> InstrumentParameter<bool>::get( } std::vector<double> InstrumentParameter<double>::get( - Mantid::Geometry::Instrument_const_sptr instrument, + const Mantid::Geometry::Instrument_const_sptr &instrument, std::string const ¶meterName) { try { return instrument->getNumberParameter(parameterName); diff --git a/qt/scientific_interfaces/ISISReflectometry/Common/GetInstrumentParameter.h b/qt/scientific_interfaces/ISISReflectometry/Common/GetInstrumentParameter.h index f80e4e1ddaba0cd8121884686e3fed17cb706577..d10c16bc5b2d105de141f88dbfe62c7dc7f6c563 100644 --- a/qt/scientific_interfaces/ISISReflectometry/Common/GetInstrumentParameter.h +++ b/qt/scientific_interfaces/ISISReflectometry/Common/GetInstrumentParameter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidGeometry/Instrument.h" @@ -17,28 +17,28 @@ template <typename T> class InstrumentParameter; template <> class InstrumentParameter<std::string> { public: static std::vector<std::string> - get(Mantid::Geometry::Instrument_const_sptr instrument, + get(const Mantid::Geometry::Instrument_const_sptr &instrument, std::string const ¶meterName); }; template <> class InstrumentParameter<double> { public: static std::vector<double> - get(Mantid::Geometry::Instrument_const_sptr instrument, + get(const Mantid::Geometry::Instrument_const_sptr &instrument, std::string const ¶meterName); }; template <> class InstrumentParameter<int> { public: static std::vector<int> - get(Mantid::Geometry::Instrument_const_sptr instrument, + get(const Mantid::Geometry::Instrument_const_sptr &instrument, std::string const ¶meterName); }; template <> class InstrumentParameter<bool> { public: static std::vector<bool> - get(Mantid::Geometry::Instrument_const_sptr instrument, + get(const Mantid::Geometry::Instrument_const_sptr &instrument, std::string const ¶meterName); }; @@ -73,7 +73,7 @@ template <typename T1, typename T2> class InstrumentParameter<boost::variant<T1, T2>> { public: static boost::variant<std::vector<T1>, std::vector<T2>> - get(Mantid::Geometry::Instrument_const_sptr instrument, + get(const Mantid::Geometry::Instrument_const_sptr &instrument, std::string const ¶meterName) { try { return InstrumentParameter<T1>::get(instrument, parameterName); @@ -106,7 +106,7 @@ class InstrumentParameter<boost::variant<T1, T2, T3, Ts...>> { public: static boost::variant<std::vector<T1>, std::vector<T2>, std::vector<T3>, std::vector<Ts>...> - get(Mantid::Geometry::Instrument_const_sptr instrument, + get(const Mantid::Geometry::Instrument_const_sptr &instrument, std::string const ¶meterName) { try { return InstrumentParameter<T1>::get(instrument, parameterName); @@ -124,8 +124,9 @@ public: }; template <typename T> -auto getInstrumentParameter(Mantid::Geometry::Instrument_const_sptr instrument, - std::string const ¶meterName) +auto getInstrumentParameter( + const Mantid::Geometry::Instrument_const_sptr &instrument, + std::string const ¶meterName) -> decltype(InstrumentParameter<T>::get( std::declval<Mantid::Geometry::Instrument_const_sptr>(), std::declval<std::string const &>())) { diff --git a/qt/scientific_interfaces/ISISReflectometry/Common/IndexOf.h b/qt/scientific_interfaces/ISISReflectometry/Common/IndexOf.h index 96a0a8043b5f6ef05d97c89e912541381c5cbf60..c7c1c3ecb929152e78183c521893c319e8a0b270 100644 --- a/qt/scientific_interfaces/ISISReflectometry/Common/IndexOf.h +++ b/qt/scientific_interfaces/ISISReflectometry/Common/IndexOf.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include <algorithm> diff --git a/qt/scientific_interfaces/ISISReflectometry/Common/InstrumentParameters.cpp b/qt/scientific_interfaces/ISISReflectometry/Common/InstrumentParameters.cpp index 43f3e9ae6222bed6ebc3d3ccd3dac6a671d39e0f..cf06f779257467c3c303c7508407deac83e43bcc 100644 --- a/qt/scientific_interfaces/ISISReflectometry/Common/InstrumentParameters.cpp +++ b/qt/scientific_interfaces/ISISReflectometry/Common/InstrumentParameters.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "InstrumentParameters.h" namespace MantidQt { diff --git a/qt/scientific_interfaces/ISISReflectometry/Common/InstrumentParameters.h b/qt/scientific_interfaces/ISISReflectometry/Common/InstrumentParameters.h index 526ef2af9a26807e7a5f51849b224317ba566de6..ffe78a56d2556681c629c24b00fe2115263f9b21 100644 --- a/qt/scientific_interfaces/ISISReflectometry/Common/InstrumentParameters.h +++ b/qt/scientific_interfaces/ISISReflectometry/Common/InstrumentParameters.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "Common/First.h" diff --git a/qt/scientific_interfaces/ISISReflectometry/Common/Map.h b/qt/scientific_interfaces/ISISReflectometry/Common/Map.h index 68509ea5012fb96011bbc2a2c6fb3d58146b0ecc..d5188e8da6e9a7d2b50148615b560acee0f6a408 100644 --- a/qt/scientific_interfaces/ISISReflectometry/Common/Map.h +++ b/qt/scientific_interfaces/ISISReflectometry/Common/Map.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include <algorithm> diff --git a/qt/scientific_interfaces/ISISReflectometry/Common/OptionDefaults.cpp b/qt/scientific_interfaces/ISISReflectometry/Common/OptionDefaults.cpp index 684edeb5826f1da30cd62d7dd781aeac5d25c7c3..7e06d2d8a2347b1ad888b47845b54d9cf3f64a95 100644 --- a/qt/scientific_interfaces/ISISReflectometry/Common/OptionDefaults.cpp +++ b/qt/scientific_interfaces/ISISReflectometry/Common/OptionDefaults.cpp @@ -1,10 +1,13 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "OptionDefaults.h" + +#include <utility> + #include "MantidAPI/AlgorithmManager.h" namespace MantidQt { @@ -13,7 +16,7 @@ namespace ISISReflectometry { OptionDefaults::OptionDefaults( Mantid::Geometry::Instrument_const_sptr instrument) - : m_instrument(instrument) { + : m_instrument(std::move(instrument)) { // Get the algorithm for which we'll take defaults if available m_algorithm = Mantid::API::AlgorithmManager::Instance().createUnmanaged( "ReflectometryReductionOneAuto"); diff --git a/qt/scientific_interfaces/ISISReflectometry/Common/OptionDefaults.h b/qt/scientific_interfaces/ISISReflectometry/Common/OptionDefaults.h index 557a2914ddc57b0ed1dad1d791902c913e2bdab2..f11a9608a466fa0f93ec8101c8caeb1a1e953034 100644 --- a/qt/scientific_interfaces/ISISReflectometry/Common/OptionDefaults.h +++ b/qt/scientific_interfaces/ISISReflectometry/Common/OptionDefaults.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "Common/DllConfig.h" diff --git a/qt/scientific_interfaces/ISISReflectometry/Common/Parse.cpp b/qt/scientific_interfaces/ISISReflectometry/Common/Parse.cpp index bc848c05e930f31f15df261eb46a44bcfcfd8cd7..0779aa1cc71211cfb228050229bebc9d3cfaca8d 100644 --- a/qt/scientific_interfaces/ISISReflectometry/Common/Parse.cpp +++ b/qt/scientific_interfaces/ISISReflectometry/Common/Parse.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "Parse.h" #include <cctype> diff --git a/qt/scientific_interfaces/ISISReflectometry/Common/Parse.h b/qt/scientific_interfaces/ISISReflectometry/Common/Parse.h index 598bd83b5940aa9199ba9a00d2b23469648afd2d..821ab5fd2021430d10f72bd6f7ca9fa477ed9c2a 100644 --- a/qt/scientific_interfaces/ISISReflectometry/Common/Parse.h +++ b/qt/scientific_interfaces/ISISReflectometry/Common/Parse.h @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #pragma once #include "DllConfig.h" #include <boost/algorithm/string.hpp> diff --git a/qt/scientific_interfaces/ISISReflectometry/Common/QWidgetGroup.h b/qt/scientific_interfaces/ISISReflectometry/Common/QWidgetGroup.h index b1a4ad999dbe41e1dda617e079682452eb62214c..b4644cab84366b65ade40950a21ddd2431918701 100644 --- a/qt/scientific_interfaces/ISISReflectometry/Common/QWidgetGroup.h +++ b/qt/scientific_interfaces/ISISReflectometry/Common/QWidgetGroup.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include <QWidget> diff --git a/qt/scientific_interfaces/ISISReflectometry/Common/ValidationResult.h b/qt/scientific_interfaces/ISISReflectometry/Common/ValidationResult.h index fa52b67ff93fb6ce0f434d9db6599bb22937a5b6..98d5bdfe3c32f3ac37786be9670191571b151e85 100644 --- a/qt/scientific_interfaces/ISISReflectometry/Common/ValidationResult.h +++ b/qt/scientific_interfaces/ISISReflectometry/Common/ValidationResult.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include <boost/optional.hpp> diff --git a/qt/scientific_interfaces/ISISReflectometry/Common/ValueOr.h b/qt/scientific_interfaces/ISISReflectometry/Common/ValueOr.h index c54eba4ad82d8f0dbe794f144c66d9e7fdde9546..d769ca9e9c0858532741b44ac4bb029fe3fcf283 100644 --- a/qt/scientific_interfaces/ISISReflectometry/Common/ValueOr.h +++ b/qt/scientific_interfaces/ISISReflectometry/Common/ValueOr.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include <boost/optional.hpp> diff --git a/qt/scientific_interfaces/ISISReflectometry/Common/ZipRange.h b/qt/scientific_interfaces/ISISReflectometry/Common/ZipRange.h index bfc60994e0769f83e4fbf3504ff91851deb111da..d2f020334efdfabd8553652f8fb5c14c0a3446a3 100644 --- a/qt/scientific_interfaces/ISISReflectometry/Common/ZipRange.h +++ b/qt/scientific_interfaces/ISISReflectometry/Common/ZipRange.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include <boost/iterator/zip_iterator.hpp> diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/AlgorithmProperties.cpp b/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/AlgorithmProperties.cpp index 44971fc477773fd987aed741349c7f8053e78904..c4376c478c3d1ac55281e5c82acdd176be46dbe1 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/AlgorithmProperties.cpp +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/AlgorithmProperties.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "AlgorithmProperties.h" #include "MantidAPI/AnalysisDataService.h" @@ -65,7 +65,7 @@ void updateFromMap(AlgorithmRuntimeProps &properties, update(kvp.first, kvp.second, properties); } } -std::string getOutputWorkspace(IAlgorithm_sptr algorithm, +std::string getOutputWorkspace(const IAlgorithm_sptr &algorithm, std::string const &property) { auto const workspaceName = algorithm->getPropertyValue(property); return workspaceName; diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/AlgorithmProperties.h b/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/AlgorithmProperties.h index 07c42a48fba267c9c484d52b1ce5b73948624016..5ed98adf3a780fe13b049a5c74eb0cfd09ba3d62 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/AlgorithmProperties.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/AlgorithmProperties.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -47,7 +47,7 @@ void update(std::string const &property, boost::optional<double> const &value, void updateFromMap(AlgorithmRuntimeProps &properties, std::map<std::string, std::string> const ¶meterMap); -std::string getOutputWorkspace(Mantid::API::IAlgorithm_sptr algorithm, +std::string getOutputWorkspace(const Mantid::API::IAlgorithm_sptr &algorithm, std::string const &property); template <typename VALUE_TYPE> diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/BatchJobAlgorithm.cpp b/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/BatchJobAlgorithm.cpp index 8cc23e5c2f8d502ca231ac1830c0cf4c1d84f1fb..8e2a949474d2ab67ce49aacbb32770352ea74079 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/BatchJobAlgorithm.cpp +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/BatchJobAlgorithm.cpp @@ -1,10 +1,13 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "BatchJobAlgorithm.h" + +#include <utility> + #include "MantidAPI/IAlgorithm.h" namespace MantidQt { @@ -18,8 +21,8 @@ BatchJobAlgorithm::BatchJobAlgorithm( Mantid::API::IAlgorithm_sptr algorithm, MantidQt::API::ConfiguredAlgorithm::AlgorithmRuntimeProps properties, UpdateFunction updateFunction, Item *item) - : ConfiguredAlgorithm(algorithm, properties), m_item(item), - m_updateFunction(updateFunction) {} + : ConfiguredAlgorithm(std::move(algorithm), std::move(properties)), + m_item(item), m_updateFunction(updateFunction) {} Item *BatchJobAlgorithm::item() { return m_item; } diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/BatchJobAlgorithm.h b/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/BatchJobAlgorithm.h index e0bd4e580d8dbab603f7c0763a91b4ff743e282a..4799ae993fda8fcb122ed2a8d14ea244904572d4 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/BatchJobAlgorithm.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/BatchJobAlgorithm.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -23,7 +23,7 @@ class MANTIDQT_ISISREFLECTOMETRY_DLL BatchJobAlgorithm : public IBatchJobAlgorithm, public MantidQt::API::ConfiguredAlgorithm { public: - using UpdateFunction = void (*)(Mantid::API::IAlgorithm_sptr algorithm, + using UpdateFunction = void (*)(const Mantid::API::IAlgorithm_sptr &algorithm, Item &item); BatchJobAlgorithm( diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/BatchJobRunner.cpp b/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/BatchJobRunner.cpp index d25ad10bfa9940a3c0e9528d6b344f3ba03a0597..100e37dd3ce6f7164b5fad2d17b5a97e695c573e 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/BatchJobRunner.cpp +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/BatchJobRunner.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "BatchJobRunner.h" #include "BatchJobAlgorithm.h" diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/BatchJobRunner.h b/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/BatchJobRunner.h index 38248572bcce2b61cafac1b6daadc93935c857f5..d4357205bd803cef2e1ab442ae4adfcd028ae7de 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/BatchJobRunner.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/BatchJobRunner.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/BatchPresenter.cpp b/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/BatchPresenter.cpp index e06c0a8539ebd98471372b0bd456e0c909bec85b..95c9ef3f30aa82f661eca2e29b6a1882147e5104 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/BatchPresenter.cpp +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/BatchPresenter.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "BatchPresenter.h" #include "BatchJobRunner.h" diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/BatchPresenter.h b/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/BatchPresenter.h index 0b9fbdfcc567d5b5c7b7f6a04c21a9410c5d9a35..20d88d5aa1cbc1fdb31d1933016f83b01790a94f 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/BatchPresenter.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/BatchPresenter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/BatchPresenterFactory.h b/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/BatchPresenterFactory.h index 22c2b04caeb28afecf8fd1a603e9b38001e74ba8..9c5cd6038934c9dc9a1376d04586773508dc1190 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/BatchPresenterFactory.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/BatchPresenterFactory.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "BatchPresenter.h" diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/GroupProcessingAlgorithm.cpp b/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/GroupProcessingAlgorithm.cpp index cea17629bf3777ac35affa4635f967e4fdae9d45..168134898f8d225f5b04e1015f48e87499c7995e 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/GroupProcessingAlgorithm.cpp +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/GroupProcessingAlgorithm.cpp @@ -1,11 +1,13 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #include "GroupProcessingAlgorithm.h" + +#include <utility> + #include "../../Reduction/Batch.h" #include "../../Reduction/Group.h" #include "AlgorithmProperties.h" @@ -59,9 +61,10 @@ void updateWorkspaceProperties(AlgorithmRuntimeProps &properties, AlgorithmProperties::update("OutputWorkspace", outputName, properties); } -void updateGroupFromOutputProperties(IAlgorithm_sptr algorithm, Item &group) { - auto const stitched = - AlgorithmProperties::getOutputWorkspace(algorithm, "OutputWorkspace"); +void updateGroupFromOutputProperties(const IAlgorithm_sptr &algorithm, + Item &group) { + auto const stitched = AlgorithmProperties::getOutputWorkspace( + std::move(algorithm), "OutputWorkspace"); group.setOutputNames(std::vector<std::string>{stitched}); } diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/GroupProcessingAlgorithm.h b/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/GroupProcessingAlgorithm.h index 6ef4364b2a5a7f1428b40c4724e4e2e32eafd06c..2398adf682906f2017dfdc572b6a9537d54a9656 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/GroupProcessingAlgorithm.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/GroupProcessingAlgorithm.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/IBatchJobAlgorithm.h b/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/IBatchJobAlgorithm.h index b941f66622dd8e6f57143fa3a4cf99fa8a110830..8fc03585bc96c71a8e674e6cd48d7f4495a2bbf9 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/IBatchJobAlgorithm.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/IBatchJobAlgorithm.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/IBatchJobRunner.h b/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/IBatchJobRunner.h index 6e608c12c96e07526650fc102bb5f9bee6f19308..4abf535a036a7c82d53ad071bf280c6673eed43d 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/IBatchJobRunner.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/IBatchJobRunner.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/IBatchPresenter.h b/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/IBatchPresenter.h index 6b2ce8a69e1c1f85c95e663a9d8e63f32b043e5f..cde770ca6737fd322037ba0192787d6c78e83327 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/IBatchPresenter.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/IBatchPresenter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/IBatchPresenterFactory.h b/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/IBatchPresenterFactory.h index ecdb93bcf2730caa88f76bdca77cbabc0ad4e8b0..5dc16201b98e1974e4407026b344233e77b89223 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/IBatchPresenterFactory.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/IBatchPresenterFactory.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/IBatchView.h b/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/IBatchView.h index 7f2aee575f688eead54b49fcffcca428f318842d..97b4765724c586547d5c32be649987e8955813f2 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/IBatchView.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/IBatchView.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/QtBatchView.cpp b/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/QtBatchView.cpp index f32f2427fedcc6af8f6ccbb111bc1fa32eabe009..a9c9a13c6e4faa1f07cee87929c0bb43933c849e 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/QtBatchView.cpp +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/QtBatchView.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "QtBatchView.h" #include "GUI/Event/QtEventView.h" @@ -14,6 +14,7 @@ #include <QMessageBox> #include <QMetaType> +#include <utility> namespace MantidQt { namespace CustomInterfaces { @@ -105,17 +106,17 @@ void QtBatchView::onBatchComplete(bool error) { void QtBatchView::onBatchCancelled() { m_notifyee->notifyBatchCancelled(); } void QtBatchView::onAlgorithmStarted(API::IConfiguredAlgorithm_sptr algorithm) { - m_notifyee->notifyAlgorithmStarted(algorithm); + m_notifyee->notifyAlgorithmStarted(std::move(algorithm)); } void QtBatchView::onAlgorithmComplete( API::IConfiguredAlgorithm_sptr algorithm) { - m_notifyee->notifyAlgorithmComplete(algorithm); + m_notifyee->notifyAlgorithmComplete(std::move(algorithm)); } void QtBatchView::onAlgorithmError(API::IConfiguredAlgorithm_sptr algorithm, - std::string message) { - m_notifyee->notifyAlgorithmError(algorithm, message); + const std::string &message) { + m_notifyee->notifyAlgorithmError(std::move(algorithm), message); } std::unique_ptr<QtRunsView> QtBatchView::createRunsTab() { diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/QtBatchView.h b/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/QtBatchView.h index 6c819d1b4580a0243f0681732f8218956ddbcdeb..a97d90a15de5d8d86b08f53ef6b0a468c63aa8d8 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/QtBatchView.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/QtBatchView.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -47,7 +47,7 @@ private slots: void onAlgorithmStarted(MantidQt::API::IConfiguredAlgorithm_sptr algorithm); void onAlgorithmComplete(MantidQt::API::IConfiguredAlgorithm_sptr algorithm); void onAlgorithmError(MantidQt::API::IConfiguredAlgorithm_sptr algorithm, - std::string errorMessage); + const std::string &errorMessage); private: void initLayout(); diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/RowProcessingAlgorithm.cpp b/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/RowProcessingAlgorithm.cpp index 320fa6b7d86d0339dc7bd22f2bd626384c38e85c..ad82098a4f180b18a3004c51b91b6cd705182301 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/RowProcessingAlgorithm.cpp +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/RowProcessingAlgorithm.cpp @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #include "RowProcessingAlgorithm.h" #include "../../Reduction/Batch.h" #include "../../Reduction/Row.h" @@ -243,13 +242,14 @@ void updateEventProperties(AlgorithmRuntimeProps &properties, boost::apply_visitor(UpdateEventPropertiesVisitor(properties), slicing); } -boost::optional<double> getDouble(IAlgorithm_sptr algorithm, +boost::optional<double> getDouble(const IAlgorithm_sptr &algorithm, std::string const &property) { double result = algorithm->getProperty(property); return result; } -void updateRowFromOutputProperties(IAlgorithm_sptr algorithm, Item &item) { +void updateRowFromOutputProperties(const IAlgorithm_sptr &algorithm, + Item &item) { auto &row = dynamic_cast<Row &>(item); auto const iVsLam = AlgorithmProperties::getOutputWorkspace( diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/RowProcessingAlgorithm.h b/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/RowProcessingAlgorithm.h index e3605c0449c76b0efb57a1e7b9d6e95dd2eef579..160242ef93710505682131e1e8de7e0b55638a15 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/RowProcessingAlgorithm.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Batch/RowProcessingAlgorithm.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Common/Decoder.cpp b/qt/scientific_interfaces/ISISReflectometry/GUI/Common/Decoder.cpp index 95da527dc5fe1b726394bcc43635e7955139df3c..5c0aab34b27ff50fe80a72e3af7151edd20ca47a 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Common/Decoder.cpp +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Common/Decoder.cpp @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #include "Decoder.h" #include "../../Reduction/Group.h" #include "../../Reduction/ReductionJobs.h" diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Common/Decoder.h b/qt/scientific_interfaces/ISISReflectometry/GUI/Common/Decoder.h index 85e497da9efd96986b7297dcf9bb95aa86d31067..2b267f1ee1b7a1c635d629fe3ea636fccae6a11c 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Common/Decoder.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Common/Decoder.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Common/Encoder.cpp b/qt/scientific_interfaces/ISISReflectometry/GUI/Common/Encoder.cpp index a03f49e72b3ce1b7aa739629fd99905db7f316ea..6d4843df5a57c9a6d0a4d7759c7af8b7c7d07316 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Common/Encoder.cpp +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Common/Encoder.cpp @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #include "Encoder.h" #include "../../Reduction/Group.h" #include "../../Reduction/ReductionJobs.h" diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Common/Encoder.h b/qt/scientific_interfaces/ISISReflectometry/GUI/Common/Encoder.h index a3db199509626de74867190970dd138dcf776113..ff62ac0894288ea50521cbb8aa6fc285e8cd62ed 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Common/Encoder.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Common/Encoder.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Common/IDecoder.h b/qt/scientific_interfaces/ISISReflectometry/GUI/Common/IDecoder.h index 626badd895f7a940e3e8e4bd4fd50e7887bd629d..023a2e4fa330ecf0d1c1390a6e29c6c4ccd92b49 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Common/IDecoder.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Common/IDecoder.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Common/IEncoder.h b/qt/scientific_interfaces/ISISReflectometry/GUI/Common/IEncoder.h index 28ab0bc8aec9fc9e045a6262e63486cb1cbbff98..c83fd8511828632a3771522d4d080ba44cccde2a 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Common/IEncoder.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Common/IEncoder.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Common/IFileHandler.h b/qt/scientific_interfaces/ISISReflectometry/GUI/Common/IFileHandler.h index dbbcc5e192393955fc4e0def548c1721a4e616b6..4bd6f66152e8c4d7798755a0b26a6245e186aa42 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Common/IFileHandler.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Common/IFileHandler.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Common/IMessageHandler.h b/qt/scientific_interfaces/ISISReflectometry/GUI/Common/IMessageHandler.h index a39c2a8727e7daf31bdd436839b711e79e0af514..dd4f301e02b68a533c457a326f8aec0c5ffde876 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Common/IMessageHandler.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Common/IMessageHandler.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Common/IPlotter.h b/qt/scientific_interfaces/ISISReflectometry/GUI/Common/IPlotter.h index 3dbdb251e4bf1b96c80706eb9879c1924e9c90e3..77bf00badc2aa062cb9438c69ee9c8b801b6c365 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Common/IPlotter.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Common/IPlotter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Common/IPythonRunner.h b/qt/scientific_interfaces/ISISReflectometry/GUI/Common/IPythonRunner.h index 784dbf9365a14cba0220f3fd826e6c29e575754f..173c0606488894b2120d9b8632d49ed176f09785 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Common/IPythonRunner.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Common/IPythonRunner.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Common/Plotter.cpp b/qt/scientific_interfaces/ISISReflectometry/GUI/Common/Plotter.cpp index 3a81ae42892fca1bc7b37e129172344741a50208..0e5d48185d4dd294aa1239a45fe3dd4344a59c8d 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Common/Plotter.cpp +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Common/Plotter.cpp @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #include "Plotter.h" #if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Common/Plotter.h b/qt/scientific_interfaces/ISISReflectometry/GUI/Common/Plotter.h index 13448e31b172359c676467cd90e7b7b034705f50..f1d1e20967b1421bfaa8cae042f887c0f75506ae 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Common/Plotter.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Common/Plotter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Event/EventPresenter.cpp b/qt/scientific_interfaces/ISISReflectometry/GUI/Event/EventPresenter.cpp index 8080be558b9fcc88d5c6b1887a51c266d747b4c4..19aa4e7ef01d3c324c2f76032ac0e09bbf1dd446 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Event/EventPresenter.cpp +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Event/EventPresenter.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "EventPresenter.h" #include "Common/Parse.h" diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Event/EventPresenter.h b/qt/scientific_interfaces/ISISReflectometry/GUI/Event/EventPresenter.h index 51b339766348c580b71c44a31b87536996036dde..ba8a74209b0122d63d03ff6313007493eaf0d76f 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Event/EventPresenter.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Event/EventPresenter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Event/EventPresenterFactory.h b/qt/scientific_interfaces/ISISReflectometry/GUI/Event/EventPresenterFactory.h index 2bb442fc02c8fb11df8e5a7114d8ea9add2aab75..1b0c8c689363b0f51cda03220e2df3b6cff5774f 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Event/EventPresenterFactory.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Event/EventPresenterFactory.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "Common/DllConfig.h" diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Event/IEventPresenter.h b/qt/scientific_interfaces/ISISReflectometry/GUI/Event/IEventPresenter.h index 7ca1774729d097c9edcd2ad954b097da3f8a1613..9810ce6bfa10b1151867ca4c1a9702ce6570356a 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Event/IEventPresenter.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Event/IEventPresenter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Event/IEventView.h b/qt/scientific_interfaces/ISISReflectometry/GUI/Event/IEventView.h index 4982767310623328baeb68f91f92e4ba5b752757..5dda03028580754590937c8639dba3a5ef90598c 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Event/IEventView.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Event/IEventView.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Event/QtEventView.cpp b/qt/scientific_interfaces/ISISReflectometry/GUI/Event/QtEventView.cpp index 8fd1df390db72e16a7984189f4217f75a1531465..558aeaac703a0d34fe8724826e9f78acc3431f36 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Event/QtEventView.cpp +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Event/QtEventView.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "QtEventView.h" #include "EventPresenter.h" diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Event/QtEventView.h b/qt/scientific_interfaces/ISISReflectometry/GUI/Event/QtEventView.h index 053db587f9f0a46ac6c7a178f593424f5583ae06..6ecc9a86346c27a3880ca2b4c3d501f550724c63 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Event/QtEventView.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Event/QtEventView.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/ExperimentOptionDefaults.cpp b/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/ExperimentOptionDefaults.cpp index affbafed7fb63a15d99970aaf00c46540fa8e727..94441e5f3d46806702caf89b449397764ac32d48 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/ExperimentOptionDefaults.cpp +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/ExperimentOptionDefaults.cpp @@ -1,10 +1,13 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "ExperimentOptionDefaults.h" + +#include <utility> + #include "Common/OptionDefaults.h" #include "MantidAPI/AlgorithmManager.h" #include "PerThetaDefaultsTableValidator.h" @@ -24,7 +27,7 @@ std::string stringValueOrEmpty(boost::optional<double> value) { Experiment getExperimentDefaults(Mantid::Geometry::Instrument_const_sptr instrument) { - auto defaults = OptionDefaults(instrument); + auto defaults = OptionDefaults(std::move(instrument)); auto analysisMode = analysisModeFromString(defaults.getStringOrDefault( "AnalysisMode", "AnalysisMode", "PointDetectorAnalysis")); diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/ExperimentOptionDefaults.h b/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/ExperimentOptionDefaults.h index e8cb48c6ff8fa010400a22361ee526e9f8a89505..74f927fcb10f9106c1547f01d843ff0d0d86cdc7 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/ExperimentOptionDefaults.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/ExperimentOptionDefaults.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "Common/DllConfig.h" diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/ExperimentPresenter.cpp b/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/ExperimentPresenter.cpp index cab0bc9e1672766e4921d65234bb0e28f5c8407e..da2ad7b330a24bbdc46033c18828192ebfc172cc 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/ExperimentPresenter.cpp +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/ExperimentPresenter.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "ExperimentPresenter.h" #include "Common/Parse.h" diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/ExperimentPresenter.h b/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/ExperimentPresenter.h index 23c53111d87ca7463e3687c7de6cad9887215388..2f540e94acf4710ad87bd5cd2ae640fe48928b60 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/ExperimentPresenter.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/ExperimentPresenter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/ExperimentPresenterFactory.h b/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/ExperimentPresenterFactory.h index d04ba59a93de0f4bd0914c63745d0d101db05a54..72578a56cd11235ad3019832d725dbbad4aa9469 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/ExperimentPresenterFactory.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/ExperimentPresenterFactory.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "../../Reduction/Experiment.h" diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/ExperimentWidget.ui b/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/ExperimentWidget.ui index 87ce5f4fc24be8be5c7d8acd1319b56240a3c498..4c6d279f7fb766beae8662ffdee86be63185d6da 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/ExperimentWidget.ui +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/ExperimentWidget.ui @@ -75,7 +75,7 @@ </size> </property> <property name="text"> - <string>Output Stitch Params</string> + <string>Output Stitch Properties</string> </property> </widget> </item> diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/IExperimentPresenter.h b/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/IExperimentPresenter.h index 87b9cdf25e8262b1fbf0ee1747b77dfbad88cead..42e9385c07b2a37b11bd9a9ddbd353b8411b9fbe 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/IExperimentPresenter.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/IExperimentPresenter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/IExperimentView.h b/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/IExperimentView.h index 9261e93a8a8f6cb6ad8439ec8f87134823163a63..1ea331833c157e83bb08cf39c8cd90a69015745d 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/IExperimentView.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/IExperimentView.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/InvalidDefaultsError.cpp b/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/InvalidDefaultsError.cpp index 02a933b1edbb5438ecab769104cc6ee43ed73f84..fac3e163b4a28d4a7197ab31c4c427047beea9a6 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/InvalidDefaultsError.cpp +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/InvalidDefaultsError.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "InvalidDefaultsError.h" diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/InvalidDefaultsError.h b/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/InvalidDefaultsError.h index d5468f1b10aaf3ecd549bef773da0a59cdcc2d91..84663cfc80435bd00daeb3b4174aed71966e72c7 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/InvalidDefaultsError.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/InvalidDefaultsError.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "Common/DllConfig.h" diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/PerThetaDefaultsTableValidationError.cpp b/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/PerThetaDefaultsTableValidationError.cpp index 8fb79d11ae52a7d135f451c91c284e63f12ea70d..b47755f1c0c42e70affc2c26fa67c3a4a8184879 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/PerThetaDefaultsTableValidationError.cpp +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/PerThetaDefaultsTableValidationError.cpp @@ -1,10 +1,13 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "PerThetaDefaultsTableValidationError.h" + +#include <utility> + #include "ThetaValuesValidationError.h" namespace MantidQt { namespace CustomInterfaces { @@ -15,7 +18,7 @@ PerThetaDefaultsTableValidationError::PerThetaDefaultsTableValidationError( std::vector<InvalidDefaultsError> validationErrors, boost::optional<ThetaValuesValidationError> fullTableError) : m_validationErrors(std::move(validationErrors)), - m_fullTableError(fullTableError) {} + m_fullTableError(std::move(fullTableError)) {} std::vector<InvalidDefaultsError> const & PerThetaDefaultsTableValidationError::errors() const { diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/PerThetaDefaultsTableValidationError.h b/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/PerThetaDefaultsTableValidationError.h index 1c7279e64157eda3f57e5dc2f9cd30c387d1d3ae..8b6a4b917aa61178ef6aa92dcbf45986db7782e6 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/PerThetaDefaultsTableValidationError.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/PerThetaDefaultsTableValidationError.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "../../Reduction/PerThetaDefaults.h" diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/PerThetaDefaultsTableValidator.cpp b/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/PerThetaDefaultsTableValidator.cpp index c1cd843f0a5c842b250e2485561c28af2a5bc735..78d3e0ba479b5301df2f90f04a92b6ac0bb7a05f 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/PerThetaDefaultsTableValidator.cpp +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/PerThetaDefaultsTableValidator.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "PerThetaDefaultsTableValidator.h" #include "../../Reduction/ValidatePerThetaDefaults.h" diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/PerThetaDefaultsTableValidator.h b/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/PerThetaDefaultsTableValidator.h index 5c409e0e6fa065413d8a97ef81ca3b42837cb545..25ae283720802cda48380d2e208c43121818ad1f 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/PerThetaDefaultsTableValidator.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/PerThetaDefaultsTableValidator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "Common/ValidationResult.h" diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/QtExperimentView.cpp b/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/QtExperimentView.cpp index 2fbc605cf7a96afa4c54bfae2eb1cb68b3c2c7a0..60a9a6fb9c2ae1a31eb2901bd323880d0660b228 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/QtExperimentView.cpp +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/QtExperimentView.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "QtExperimentView.h" #include "MantidKernel/UsageService.h" @@ -11,6 +11,7 @@ #include <QMessageBox> #include <QScrollBar> #include <boost/algorithm/string/join.hpp> +#include <utility> namespace MantidQt { namespace CustomInterfaces { @@ -46,7 +47,7 @@ void showAsValid(QLineEdit &lineEdit) { * @param parent :: [input] The parent of this widget */ QtExperimentView::QtExperimentView( - Mantid::API::IAlgorithm_sptr algorithmForTooltips, QWidget *parent) + const Mantid::API::IAlgorithm_sptr &algorithmForTooltips, QWidget *parent) : QWidget(parent), m_stitchEdit(nullptr), m_deleteShortcut(), m_notifyee(nullptr), m_columnToolTips() { initLayout(algorithmForTooltips); @@ -98,7 +99,7 @@ void QtExperimentView::initLayout( m_ui.optionsTable); connect(m_deleteShortcut.get(), SIGNAL(activated()), this, SLOT(onRemovePerThetaDefaultsRequested())); - initOptionsTable(algorithmForTooltips); + initOptionsTable(std::move(algorithmForTooltips)); initFloodControls(); auto blacklist = @@ -116,7 +117,8 @@ void QtExperimentView::initLayout( } void QtExperimentView::initializeTableColumns( - QTableWidget &table, Mantid::API::IAlgorithm_sptr algorithmForTooltips) { + QTableWidget &table, + const Mantid::API::IAlgorithm_sptr &algorithmForTooltips) { for (auto column = 0; column < table.columnCount(); ++column) { // Get the tooltip for this column based on the algorithm property auto const propertyName = PerThetaDefaults::ColumnPropertyName[column]; @@ -159,14 +161,14 @@ void QtExperimentView::initializeTableRow( } void QtExperimentView::initOptionsTable( - Mantid::API::IAlgorithm_sptr algorithmForTooltips) { + const Mantid::API::IAlgorithm_sptr &algorithmForTooltips) { auto table = m_ui.optionsTable; // Set angle and scale columns to a small width so everything fits table->resizeColumnsToContents(); table->setColumnCount(PerThetaDefaults::OPTIONS_TABLE_COLUMN_COUNT); table->setRowCount(1); - initializeTableColumns(*table, algorithmForTooltips); + initializeTableColumns(*table, std::move(algorithmForTooltips)); initializeTableItems(*table); auto header = table->horizontalHeader(); @@ -254,20 +256,19 @@ void QtExperimentView::disableAll() { setEnabledStateForAllWidgets(false); } void QtExperimentView::enableAll() { setEnabledStateForAllWidgets(true); } void QtExperimentView::registerSettingsWidgets( - Mantid::API::IAlgorithm_sptr alg) { - registerExperimentSettingsWidgets(alg); + const Mantid::API::IAlgorithm_sptr &alg) { + registerExperimentSettingsWidgets(std::move(alg)); connectExperimentSettingsWidgets(); } void QtExperimentView::registerExperimentSettingsWidgets( - Mantid::API::IAlgorithm_sptr alg) { + const Mantid::API::IAlgorithm_sptr &alg) { registerSettingWidget(*m_ui.analysisModeComboBox, "AnalysisMode", alg); registerSettingWidget(*m_ui.startOverlapEdit, "StartOverlap", alg); registerSettingWidget(*m_ui.endOverlapEdit, "EndOverlap", alg); registerSettingWidget(*m_ui.transStitchParamsEdit, "Params", alg); registerSettingWidget(*m_ui.transScaleRHSCheckBox, "ScaleRHSWorkspace", alg); registerSettingWidget(*m_ui.polCorrCheckBox, "PolarizationAnalysis", alg); - registerSettingWidget(stitchOptionsLineEdit(), "Params", alg); registerSettingWidget(*m_ui.reductionTypeComboBox, "ReductionType", alg); registerSettingWidget(*m_ui.summationTypeComboBox, "SummationType", alg); registerSettingWidget(*m_ui.includePartialBinsCheckBox, "IncludePartialBins", @@ -275,6 +276,12 @@ void QtExperimentView::registerExperimentSettingsWidgets( registerSettingWidget(*m_ui.floodCorComboBox, "FloodCorrection", alg); registerSettingWidget(*m_ui.floodWorkspaceWsSelector, "FloodWorkspace", alg); registerSettingWidget(*m_ui.debugCheckBox, "Debug", alg); + + registerSettingWidget(stitchOptionsLineEdit(), + "Properties to use for stitching the output workspaces " + "in Q. Only required for groups containing multiple " + "rows. Start typing to see property hints or see " + "Stitch1DMany for details."); } void QtExperimentView::connectExperimentSettingsWidgets() { @@ -341,15 +348,21 @@ void QtExperimentView::disableIncludePartialBins() { } template <typename Widget> -void QtExperimentView::registerSettingWidget(Widget &widget, - std::string const &propertyName, - Mantid::API::IAlgorithm_sptr alg) { +void QtExperimentView::registerSettingWidget( + Widget &widget, std::string const &propertyName, + const Mantid::API::IAlgorithm_sptr &alg) { setToolTipAsPropertyDocumentation(widget, propertyName, alg); } +template <typename Widget> +void QtExperimentView::registerSettingWidget(Widget &widget, + std::string const &tooltip) { + widget.setToolTip(QString::fromStdString(tooltip)); +} + void QtExperimentView::setToolTipAsPropertyDocumentation( QWidget &widget, std::string const &propertyName, - Mantid::API::IAlgorithm_sptr alg) { + const Mantid::API::IAlgorithm_sptr &alg) { widget.setToolTip(QString::fromStdString( alg->getPointerToProperty(propertyName)->documentation())); } diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/QtExperimentView.h b/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/QtExperimentView.h index f9ec1b48a497b79b7696ed809c257d94b69eba9a..2efaf48f3fd0fc80195586c95ac6403f40075e9d 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/QtExperimentView.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/QtExperimentView.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -25,7 +25,7 @@ class MANTIDQT_ISISREFLECTOMETRY_DLL QtExperimentView : public QWidget, public IExperimentView { Q_OBJECT public: - QtExperimentView(Mantid::API::IAlgorithm_sptr algorithmForTooltips, + QtExperimentView(const Mantid::API::IAlgorithm_sptr &algorithmForTooltips, QWidget *parent = nullptr); void subscribe(ExperimentViewSubscriber *notifyee) override; void connectExperimentSettingsWidgets() override; @@ -114,9 +114,9 @@ public slots: void onPerAngleDefaultsChanged(int row, int column); private: - void - initializeTableColumns(QTableWidget &table, - Mantid::API::IAlgorithm_sptr algorithmForTooltips); + void initializeTableColumns( + QTableWidget &table, + const Mantid::API::IAlgorithm_sptr &algorithmForTooltips); void initializeTableItems(QTableWidget &table); void initializeTableRow(QTableWidget &table, int row); void initializeTableRow(QTableWidget &table, int row, @@ -127,17 +127,22 @@ private: /// Initialise the interface void initLayout(Mantid::API::IAlgorithm_sptr algorithmForTooltips); - void initOptionsTable(Mantid::API::IAlgorithm_sptr algorithmForTooltips); + void + initOptionsTable(const Mantid::API::IAlgorithm_sptr &algorithmForTooltips); void initFloodControls(); - void registerSettingsWidgets(Mantid::API::IAlgorithm_sptr alg); - void registerExperimentSettingsWidgets(Mantid::API::IAlgorithm_sptr alg); - void setToolTipAsPropertyDocumentation(QWidget &widget, - std::string const &propertyName, - Mantid::API::IAlgorithm_sptr alg); + void registerSettingsWidgets(const Mantid::API::IAlgorithm_sptr &alg); + void + registerExperimentSettingsWidgets(const Mantid::API::IAlgorithm_sptr &alg); + void + setToolTipAsPropertyDocumentation(QWidget &widget, + std::string const &propertyName, + const Mantid::API::IAlgorithm_sptr &alg); template <typename Widget> void registerSettingWidget(Widget &widget, std::string const &propertyName, - Mantid::API::IAlgorithm_sptr alg); + const Mantid::API::IAlgorithm_sptr &alg); + template <typename Widget> + void registerSettingWidget(Widget &widget, std::string const &tooltip); void connectSettingsChange(QLineEdit &edit); void connectSettingsChange(QComboBox &edit); void connectSettingsChange(QCheckBox &edit); diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/ThetaValuesValidationError.h b/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/ThetaValuesValidationError.h index 80cd1e8253c4dc1df8fb39639d04fa156a7a2016..2eada8a93fbf5acd342fe5791df0e3f88a734606 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/ThetaValuesValidationError.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Experiment/ThetaValuesValidationError.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once namespace MantidQt { diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Instrument/IInstrumentPresenter.h b/qt/scientific_interfaces/ISISReflectometry/GUI/Instrument/IInstrumentPresenter.h index 2b4e4d10152dc454ddcb9b731e627da20cf19bc0..d34eccaba81ffcf1e7f9551ce6ee6eeeb5b762d1 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Instrument/IInstrumentPresenter.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Instrument/IInstrumentPresenter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Instrument/IInstrumentView.h b/qt/scientific_interfaces/ISISReflectometry/GUI/Instrument/IInstrumentView.h index 2aca22386080de5114652d9dc9e798ea160c74c0..ceb3ef8e1c8ead0fcb218626268aa21a5437b306 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Instrument/IInstrumentView.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Instrument/IInstrumentView.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Instrument/InstrumentOptionDefaults.cpp b/qt/scientific_interfaces/ISISReflectometry/GUI/Instrument/InstrumentOptionDefaults.cpp index a1c3b4f1f4c56660b836e590e4ddbab559d67956..73d3c4b5ecfb954971b4c2893bdd176914619766 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Instrument/InstrumentOptionDefaults.cpp +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Instrument/InstrumentOptionDefaults.cpp @@ -1,10 +1,13 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "InstrumentOptionDefaults.h" + +#include <utility> + #include "Common/OptionDefaults.h" #include "MantidAPI/AlgorithmManager.h" #include "Reduction/Instrument.h" @@ -19,7 +22,7 @@ Mantid::Kernel::Logger g_log("Reflectometry GUI"); Instrument getInstrumentDefaults(Mantid::Geometry::Instrument_const_sptr instrument) { - auto defaults = OptionDefaults(instrument); + auto defaults = OptionDefaults(std::move(instrument)); auto wavelengthRange = RangeInLambda(defaults.getValue<double>("WavelengthMin", "LambdaMin"), diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Instrument/InstrumentOptionDefaults.h b/qt/scientific_interfaces/ISISReflectometry/GUI/Instrument/InstrumentOptionDefaults.h index 7050eab54f6652a4d847edd47fa9307397cfdde6..c5f5de686dda4dd8860a28194ef29360229e94f6 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Instrument/InstrumentOptionDefaults.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Instrument/InstrumentOptionDefaults.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "Common/DllConfig.h" diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Instrument/InstrumentPresenter.cpp b/qt/scientific_interfaces/ISISReflectometry/GUI/Instrument/InstrumentPresenter.cpp index 28284da3fd43e77b92dd2cd52025d314f7a8d95c..c886b80071be63f6a237d63a19416b81c520bc1e 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Instrument/InstrumentPresenter.cpp +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Instrument/InstrumentPresenter.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "InstrumentPresenter.h" #include "GUI/Batch/IBatchPresenter.h" diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Instrument/InstrumentPresenter.h b/qt/scientific_interfaces/ISISReflectometry/GUI/Instrument/InstrumentPresenter.h index c7b5e37cefa29ddefd43f439f02e247b8e9fd6f9..f8b86d2b6482ffd0b74fd21e54800becee534d9b 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Instrument/InstrumentPresenter.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Instrument/InstrumentPresenter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Instrument/InstrumentPresenterFactory.h b/qt/scientific_interfaces/ISISReflectometry/GUI/Instrument/InstrumentPresenterFactory.h index 182bed57e6fca6e71b86a150fce5142bc4c53891..de231f5441b6a879e7b78cf85f67cc991072bfc6 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Instrument/InstrumentPresenterFactory.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Instrument/InstrumentPresenterFactory.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "../../Reduction/Instrument.h" diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Instrument/QtInstrumentView.cpp b/qt/scientific_interfaces/ISISReflectometry/GUI/Instrument/QtInstrumentView.cpp index 26b2ef3383771fd470f8719fe0c8973a334eac10..7fd4fac9f4b24406af044d5d034b1b96022b5c51 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Instrument/QtInstrumentView.cpp +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Instrument/QtInstrumentView.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "QtInstrumentView.h" #include "MantidKernel/UsageService.h" @@ -10,6 +10,7 @@ #include <QMessageBox> #include <QScrollBar> #include <boost/algorithm/string/join.hpp> +#include <utility> namespace MantidQt { namespace CustomInterfaces { @@ -36,7 +37,7 @@ QtInstrumentView::QtInstrumentView( Mantid::API::IAlgorithm_sptr algorithmForTooltips, QWidget *parent) : QWidget(parent) { initLayout(); - registerSettingsWidgets(algorithmForTooltips); + registerSettingsWidgets(std::move(algorithmForTooltips)); } void QtInstrumentView::subscribe(InstrumentViewSubscriber *notifyee) { @@ -132,12 +133,12 @@ void QtInstrumentView::disableDetectorCorrectionType() { } void QtInstrumentView::registerSettingsWidgets( - Mantid::API::IAlgorithm_sptr alg) { - registerInstrumentSettingsWidgets(alg); + const Mantid::API::IAlgorithm_sptr &alg) { + registerInstrumentSettingsWidgets(std::move(alg)); } void QtInstrumentView::registerInstrumentSettingsWidgets( - Mantid::API::IAlgorithm_sptr alg) { + const Mantid::API::IAlgorithm_sptr &alg) { registerSettingWidget(*m_ui.intMonCheckBox, "NormalizeByIntegratedMonitors", alg); registerSettingWidget(*m_ui.monIntMinEdit, "MonitorIntegrationWavelengthMin", @@ -184,16 +185,16 @@ void QtInstrumentView::disconnectInstrumentSettingsWidgets() { } template <typename Widget> -void QtInstrumentView::registerSettingWidget(Widget &widget, - std::string const &propertyName, - Mantid::API::IAlgorithm_sptr alg) { +void QtInstrumentView::registerSettingWidget( + Widget &widget, std::string const &propertyName, + const Mantid::API::IAlgorithm_sptr &alg) { connectSettingsChange(widget); setToolTipAsPropertyDocumentation(widget, propertyName, alg); } void QtInstrumentView::setToolTipAsPropertyDocumentation( QWidget &widget, std::string const &propertyName, - Mantid::API::IAlgorithm_sptr alg) { + const Mantid::API::IAlgorithm_sptr &alg) { widget.setToolTip(QString::fromStdString( alg->getPointerToProperty(propertyName)->documentation())); } diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Instrument/QtInstrumentView.h b/qt/scientific_interfaces/ISISReflectometry/GUI/Instrument/QtInstrumentView.h index 2caf4bb3492d3b8edf977f55b7adfeaf650d3894..6735bcf0fffd75c0b83a894bc30c19d8453ac9ab 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Instrument/QtInstrumentView.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Instrument/QtInstrumentView.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -77,15 +77,17 @@ private: /// Initialise the interface void initLayout(); - void registerSettingsWidgets(Mantid::API::IAlgorithm_sptr alg); - void registerInstrumentSettingsWidgets(Mantid::API::IAlgorithm_sptr alg); - void setToolTipAsPropertyDocumentation(QWidget &widget, - std::string const &propertyName, - Mantid::API::IAlgorithm_sptr alg); + void registerSettingsWidgets(const Mantid::API::IAlgorithm_sptr &alg); + void + registerInstrumentSettingsWidgets(const Mantid::API::IAlgorithm_sptr &alg); + void + setToolTipAsPropertyDocumentation(QWidget &widget, + std::string const &propertyName, + const Mantid::API::IAlgorithm_sptr &alg); template <typename Widget> void registerSettingWidget(Widget &widget, std::string const &propertyName, - Mantid::API::IAlgorithm_sptr alg); + const Mantid::API::IAlgorithm_sptr &alg); void connectSettingsChange(QLineEdit &edit); void connectSettingsChange(QComboBox &edit); void connectSettingsChange(QCheckBox &edit); diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/MainWindow/IMainWindowPresenter.h b/qt/scientific_interfaces/ISISReflectometry/GUI/MainWindow/IMainWindowPresenter.h index a0bb977cdb6ea316a6ad73c9b6ee1590b27b9e84..42529eb2e18d45b4feb19aa27b9df0511cdeae41 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/MainWindow/IMainWindowPresenter.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/MainWindow/IMainWindowPresenter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/MainWindow/IMainWindowView.h b/qt/scientific_interfaces/ISISReflectometry/GUI/MainWindow/IMainWindowView.h index f1d394fbd2e3400e4f00da7022fcabbc9374796e..4dd13472ea8738d8c3873c9a6115e771574bd632 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/MainWindow/IMainWindowView.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/MainWindow/IMainWindowView.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/MainWindow/MainWindowPresenter.cpp b/qt/scientific_interfaces/ISISReflectometry/GUI/MainWindow/MainWindowPresenter.cpp index 74fdef9292ee5e348feae713ddf250b5392479df..e6d59d255a92679453de4bf8a2ddc964483d325f 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/MainWindow/MainWindowPresenter.cpp +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/MainWindow/MainWindowPresenter.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MainWindowPresenter.h" #include "GUI/Batch/IBatchPresenterFactory.h" diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/MainWindow/MainWindowPresenter.h b/qt/scientific_interfaces/ISISReflectometry/GUI/MainWindow/MainWindowPresenter.h index e058d8eac120302532a59623582e0d487ca5782f..895a0b2829fadf4f132d82663b6ea1d52e7a2c4f 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/MainWindow/MainWindowPresenter.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/MainWindow/MainWindowPresenter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/MainWindow/QtMainWindowView.cpp b/qt/scientific_interfaces/ISISReflectometry/GUI/MainWindow/QtMainWindowView.cpp index d4efba5b78bc3a03bd4a07a95bf594e5987b1f87..89bdf58d3403d0ed5169867a3eb754c91293ad93 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/MainWindow/QtMainWindowView.cpp +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/MainWindow/QtMainWindowView.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "QtMainWindowView.h" #include "Common/IndexOf.h" diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/MainWindow/QtMainWindowView.h b/qt/scientific_interfaces/ISISReflectometry/GUI/MainWindow/QtMainWindowView.h index 6322ab2e6bfd788b4fb09b3b7b895ef4224f5aec..9e3dd9c40ac704fb03b37af87e987ad8e2f118d0 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/MainWindow/QtMainWindowView.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/MainWindow/QtMainWindowView.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/CatalogRunNotifier.cpp b/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/CatalogRunNotifier.cpp index 950e58fbe37dd89afc7e1940f29757eb07c7ebfc..37d93ce0863f313b84f22f0f9fa63b3a88e6151c 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/CatalogRunNotifier.cpp +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/CatalogRunNotifier.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "CatalogRunNotifier.h" diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/CatalogRunNotifier.h b/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/CatalogRunNotifier.h index 6d084cf5cb0522add7b42359f53bda1fbac006a5..930e523fe3a350aa75474010b66d4ffd662ae1f4 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/CatalogRunNotifier.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/CatalogRunNotifier.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/IRunNotifier.h b/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/IRunNotifier.h index fbbe7f51ba20c3ddc4f88d42a3d87cf29f58c99d..9d76decefd4db760b2f2fc37181546b2f9b4f169 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/IRunNotifier.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/IRunNotifier.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/IRunsPresenter.h b/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/IRunsPresenter.h index 70d1f602ef180ef965c9749004514128da50a397..d986bc01fed3ef74fc6b730d2e781d8dfd7022f3 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/IRunsPresenter.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/IRunsPresenter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/IRunsView.h b/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/IRunsView.h index ac450f092c095b734dfdef3242a73d0b1583446d..9d37ae9e5338ea0baed8c1344f828000d827c65d 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/IRunsView.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/IRunsView.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/ISearchModel.h b/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/ISearchModel.h index 2592dac37aec20e221e6a2da972133bca7e6430b..e8c887ff807c77134cb52ca42f34ce12462a1b67 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/ISearchModel.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/ISearchModel.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/ISearcher.h b/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/ISearcher.h index c1bc8591be52c8b95e6a240e2ca6e35798a36cba..a7037407cf0190a07edf03443fa35ab7dbb6ea70 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/ISearcher.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/ISearcher.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/QtCatalogSearcher.cpp b/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/QtCatalogSearcher.cpp index c93460d5ad12d541fb5f98fec921840b374f6506..a270d106334b2257eb6e7bdb0782ef2dd51f6895 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/QtCatalogSearcher.cpp +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/QtCatalogSearcher.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "QtCatalogSearcher.h" #include "GUI/Runs/IRunsView.h" @@ -21,7 +21,8 @@ namespace CustomInterfaces { namespace ISISReflectometry { namespace { // unnamed -void removeResultsWithoutFilenameExtension(ITableWorkspace_sptr results) { +void removeResultsWithoutFilenameExtension( + const ITableWorkspace_sptr &results) { std::set<size_t> toRemove; for (size_t i = 0; i < results->rowCount(); ++i) { std::string &run = results->String(i, 0); diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/QtCatalogSearcher.h b/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/QtCatalogSearcher.h index 8d0c21e2b557dbab0d247e52415bf1bb9ba53011..a94d0fd326122b0bc401686d7de811c139194c99 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/QtCatalogSearcher.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/QtCatalogSearcher.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/QtRunsView.cpp b/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/QtRunsView.cpp index 238c1109ff0da0482e6cc4255a6cece44ce6ec91..2ac57dcdbe5646904cf664d81e3bbfc4924dfe88 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/QtRunsView.cpp +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/QtRunsView.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "QtRunsView.h" #include "MantidAPI/ITableWorkspace.h" @@ -27,7 +27,8 @@ using namespace MantidQt::Icons; * @param parent :: The parent of this view * @param makeRunsTableView :: The factory for the RunsTableView. */ -QtRunsView::QtRunsView(QWidget *parent, RunsTableViewFactory makeRunsTableView) +QtRunsView::QtRunsView(QWidget *parent, + const RunsTableViewFactory &makeRunsTableView) : MantidWidget(parent), m_notifyee(nullptr), m_timerNotifyee(nullptr), m_searchNotifyee(nullptr), m_searchModel(), m_tableView(makeRunsTableView()), m_timer() { diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/QtRunsView.h b/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/QtRunsView.h index 72306afe5c584d7b5592ee30b2c8133f302c8a8f..9f50d4c262b6404cfc19ff10920032e95dd59c73 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/QtRunsView.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/QtRunsView.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -33,7 +33,7 @@ class MANTIDQT_ISISREFLECTOMETRY_DLL QtRunsView public IRunsView { Q_OBJECT public: - QtRunsView(QWidget *parent, RunsTableViewFactory makeView); + QtRunsView(QWidget *parent, const RunsTableViewFactory &makeView); void subscribe(RunsViewSubscriber *notifyee) override; void subscribeTimer(RunsViewTimerSubscriber *notifyee) override; diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/QtSearchModel.cpp b/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/QtSearchModel.cpp index b783abc6309408e8d1b39f13e4e3ba6201852717..2957f478175058febec80ec204f58394aef65115 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/QtSearchModel.cpp +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/QtSearchModel.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "QtSearchModel.h" #include "MantidAPI/ITableWorkspace.h" diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/QtSearchModel.h b/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/QtSearchModel.h index c17a731c531cd0ff1ccaaf3f7583f856b3e3fe52..9ae1b8108e9c293b67f649247af7dfdb39d047e5 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/QtSearchModel.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/QtSearchModel.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/RunsPresenter.cpp b/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/RunsPresenter.cpp index 42936c144ac3619256d46c23458f59c1d6a8f6a0..0b9d78aed3b784df1e81810c4af584d06f250d3c 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/RunsPresenter.cpp +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/RunsPresenter.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "RunsPresenter.h" #include "CatalogRunNotifier.h" diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/RunsPresenter.h b/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/RunsPresenter.h index adb5f64b1012cbb52090d609360111dd8c611777..8d0d70f11fc72135c8520ffa3dbfd387940323fe 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/RunsPresenter.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/RunsPresenter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/RunsPresenterFactory.h b/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/RunsPresenterFactory.h index 1906e02fc0ab83fad744840df83f8bff68eed6dd..09fabca0718e7ae546f13b1b65d150e819352060 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/RunsPresenterFactory.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/RunsPresenterFactory.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "Common/DllConfig.h" diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/SearchResult.cpp b/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/SearchResult.cpp index 650c478735cdf29990f619969814e9983d824104..fbba08ae91a3af23b23f8800b05f2b40bab7613c 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/SearchResult.cpp +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/SearchResult.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "SearchResult.h" #include <boost/regex.hpp> diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/SearchResult.h b/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/SearchResult.h index 79fa97b754251cba6b4e098585d3c0e02d35c2d7..663bf275f719a436ccee81db4af5829687abe9b2 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/SearchResult.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Runs/SearchResult.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "Common/DllConfig.h" diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/IRunsTablePresenter.h b/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/IRunsTablePresenter.h index 93cb15a6c299493b6befb3280e8a9c668492ef4a..47859fa6c561ef4a446c7abaa43388c3e3fc4ad1 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/IRunsTablePresenter.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/IRunsTablePresenter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/IRunsTableView.h b/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/IRunsTableView.h index e359b5177d580de06c8abf81b9c67ce9ae4504f3..2b8ba003e7fa6c7681e3befb58c82633c41db815 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/IRunsTableView.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/IRunsTableView.h @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #pragma once #include "Common/DllConfig.h" #include "MantidQtWidgets/Common/Batch/IJobTreeView.h" diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/JobsViewUpdater.h b/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/JobsViewUpdater.h index c97233d7d22ffef0da5210e22f9dbaf135ffa27e..64925577f43b39841784b3991e27370cd28dff89 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/JobsViewUpdater.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/JobsViewUpdater.h @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #pragma once #include "Common/Map.h" #include "MantidQtWidgets/Common/Batch/IJobTreeView.h" diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/QtRunsTableView.cpp b/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/QtRunsTableView.cpp index 607f5be498d08d9713e1c41c134e76499ac80376..4fe3e4299d5013e1a4959bd409e33b736cc9be39 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/QtRunsTableView.cpp +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/QtRunsTableView.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "QtRunsTableView.h" #include "Common/IndexOf.h" diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/QtRunsTableView.h b/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/QtRunsTableView.h index 1d756dec5b032fd0d5480cefd03a1d2285de2329..0dfe949ec39c26ac0d3b3864621cb634b9e6f07b 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/QtRunsTableView.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/QtRunsTableView.h @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #pragma once #include "Common/DllConfig.h" #include "IRunsTableView.h" diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/RegexRowFilter.cpp b/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/RegexRowFilter.cpp index e3c53bf6fa714b73df92c33c95a4f1338db99f63..a6b08d7016a918c4814a8849595f8fe12a9ec828 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/RegexRowFilter.cpp +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/RegexRowFilter.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "RegexRowFilter.h" @@ -13,7 +13,7 @@ namespace ISISReflectometry { using MantidQt::MantidWidgets::Batch::IJobTreeView; using MantidQt::MantidWidgets::Batch::RowLocation; -RegexFilter::RegexFilter(boost::regex regex, IJobTreeView const &view, +RegexFilter::RegexFilter(const boost::regex ®ex, IJobTreeView const &view, ReductionJobs const &jobs) : m_filter(std::move(regex)), m_view(view), m_jobs(jobs) {} diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/RegexRowFilter.h b/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/RegexRowFilter.h index 9b61a8ae32114e5e877c5dd49c87266d26a2b27e..6c5e45643148783afe999e344e38784f9b626ded 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/RegexRowFilter.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/RegexRowFilter.h @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #pragma once #include "MantidQtWidgets/Common/Batch/IJobTreeView.h" @@ -20,7 +19,7 @@ namespace ISISReflectometry { class RegexFilter : public MantidQt::MantidWidgets::Batch::RowPredicate { public: - RegexFilter(boost::regex regex, + RegexFilter(const boost::regex ®ex, MantidQt::MantidWidgets::Batch::IJobTreeView const &view, ReductionJobs const &jobs); bool rowMeetsCriteria( diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/RunsTablePresenter.cpp b/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/RunsTablePresenter.cpp index e78201786aa45447ddb589f85940c884059a3a4d..2f0ede821f9b983c188b6db2e6a4396fefc3c370 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/RunsTablePresenter.cpp +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/RunsTablePresenter.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "RunsTablePresenter.h" #include "Common/Map.h" diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/RunsTablePresenter.h b/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/RunsTablePresenter.h index 33c8e81b239df7eefc6d6085c3edb5ed1205c127..580f894bf224743e137f2aeff8f69a7412646a85 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/RunsTablePresenter.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/RunsTablePresenter.h @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #pragma once #include "../Runs/IRunsPresenter.h" #include "Common/Clipboard.h" diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/RunsTablePresenterFactory.cpp b/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/RunsTablePresenterFactory.cpp index 4176cd4afc4c8e71cf1d3c498325d7254b7e46ee..7a2f006a997c74a180281ebd1d1ceb4df3447650 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/RunsTablePresenterFactory.cpp +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/RunsTablePresenterFactory.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "RunsTablePresenterFactory.h" #include "RunsTablePresenter.h" diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/RunsTablePresenterFactory.h b/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/RunsTablePresenterFactory.h index bae5f9f8c2b6b53cadc3c7f578643cd630172d9c..7e1e19205d47fc7064359767fe70e055863a04ae 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/RunsTablePresenterFactory.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/RunsTable/RunsTablePresenterFactory.h @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #pragma once #include "Common/DllConfig.h" #include "GUI/Common/Plotter.h" diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Save/AsciiSaver.cpp b/qt/scientific_interfaces/ISISReflectometry/GUI/Save/AsciiSaver.cpp index 7e788cfd64ae869d1f39adc98e9d36f5ecc4a840..80c8a48e4d11b5f5a6bef22ce31d47a5cb75821c 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Save/AsciiSaver.cpp +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Save/AsciiSaver.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "AsciiSaver.h" #include "MantidAPI/AlgorithmManager.h" @@ -11,6 +11,9 @@ #include "MantidAPI/WorkspaceGroup.h" #include <Poco/File.h> #include <Poco/Path.h> + +#include <utility> + namespace MantidQt { namespace CustomInterfaces { namespace ISISReflectometry { @@ -65,7 +68,7 @@ bool AsciiSaver::isValidSaveDirectory(std::string const &path) const { namespace { template <typename T> -void setPropertyIfSupported(Mantid::API::IAlgorithm_sptr alg, +void setPropertyIfSupported(const Mantid::API::IAlgorithm_sptr &alg, std::string const &propertyName, T const &value) { if (alg->existsProperty(propertyName)) alg->setProperty(propertyName, value); @@ -93,7 +96,7 @@ AsciiSaver::workspace(std::string const &workspaceName) const { Mantid::API::IAlgorithm_sptr AsciiSaver::setUpSaveAlgorithm(std::string const &saveDirectory, - Mantid::API::Workspace_sptr workspace, + const Mantid::API::Workspace_sptr &workspace, std::vector<std::string> const &logParameters, FileFormatOptions const &fileFormat) const { auto saveAlg = algorithmForFormat(fileFormat.format()); @@ -112,12 +115,12 @@ AsciiSaver::setUpSaveAlgorithm(std::string const &saveDirectory, return saveAlg; } -void AsciiSaver::save(Mantid::API::Workspace_sptr workspace, +void AsciiSaver::save(const Mantid::API::Workspace_sptr &workspace, std::string const &saveDirectory, std::vector<std::string> const &logParameters, FileFormatOptions const &fileFormat) const { - auto alg = - setUpSaveAlgorithm(saveDirectory, workspace, logParameters, fileFormat); + auto alg = setUpSaveAlgorithm(saveDirectory, std::move(workspace), + logParameters, fileFormat); alg->execute(); } diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Save/AsciiSaver.h b/qt/scientific_interfaces/ISISReflectometry/GUI/Save/AsciiSaver.h index eae4c2910f067b69364961e82f8e08f114b92f79..695674e61efe5403d38ae3615084f919e0a5224c 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Save/AsciiSaver.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Save/AsciiSaver.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "IAsciiSaver.h" @@ -28,7 +28,7 @@ public: private: Mantid::API::IAlgorithm_sptr setUpSaveAlgorithm(std::string const &saveDirectory, - Mantid::API::Workspace_sptr workspace, + const Mantid::API::Workspace_sptr &workspace, std::vector<std::string> const &logParameters, FileFormatOptions const &fileFormat) const; @@ -38,7 +38,7 @@ private: std::string const &extension) const; Mantid::API::Workspace_sptr workspace(std::string const &workspaceName) const; - void save(Mantid::API::Workspace_sptr workspace, + void save(const Mantid::API::Workspace_sptr &workspace, std::string const &saveDirectory, std::vector<std::string> const &logParameters, FileFormatOptions const &fileFormat) const; diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Save/IAsciiSaver.cpp b/qt/scientific_interfaces/ISISReflectometry/GUI/Save/IAsciiSaver.cpp index 719ec59d487b4fd88f87e40cb4cc97a4ad28e6d2..6873f7fe8fc327f1d78e3211b51a88d04c5d3f92 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Save/IAsciiSaver.cpp +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Save/IAsciiSaver.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "IAsciiSaver.h" namespace MantidQt { diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Save/IAsciiSaver.h b/qt/scientific_interfaces/ISISReflectometry/GUI/Save/IAsciiSaver.h index d1ab5b8f6eff05ed6c83ca18ee89b7eef3c36a36..2173d8a37a3d83b2bef63177c696f91b7e25e223 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Save/IAsciiSaver.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Save/IAsciiSaver.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "Common/DllConfig.h" diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Save/ISavePresenter.h b/qt/scientific_interfaces/ISISReflectometry/GUI/Save/ISavePresenter.h index c53282eca9ca16b4011609a5e85f92f20d54a15e..c30bcd32955dfad5bc9a57c834989e743513813a 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Save/ISavePresenter.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Save/ISavePresenter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Save/ISaveView.h b/qt/scientific_interfaces/ISISReflectometry/GUI/Save/ISaveView.h index a9cf34f897b9889b6e53b9763505b75b4126e77b..696503234bcc845e6f8168bbd9ecfcfb12d2c2b3 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Save/ISaveView.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Save/ISaveView.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Save/QtSaveView.cpp b/qt/scientific_interfaces/ISISReflectometry/GUI/Save/QtSaveView.cpp index e85bb561a20e28720eb40af173981b570c03ae45..c25129a09a372bc147f0a278e4607c745dc9e5a2 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Save/QtSaveView.cpp +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Save/QtSaveView.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "QtSaveView.h" #include "MantidKernel/UsageService.h" diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Save/QtSaveView.h b/qt/scientific_interfaces/ISISReflectometry/GUI/Save/QtSaveView.h index 05c8ba0432d1ae31168cf4af90f3c80e16d6a1e7..b3dd8fdf8321f3844ab3e20fd63825506e29ae4f 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Save/QtSaveView.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Save/QtSaveView.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Save/SavePresenter.cpp b/qt/scientific_interfaces/ISISReflectometry/GUI/Save/SavePresenter.cpp index d7939d871d0b1b89fe7d5cad199d0b645b6294bb..1c6e779087e6e95c4cb848113eb3f6bb377260e8 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Save/SavePresenter.cpp +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Save/SavePresenter.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "SavePresenter.h" #include "GUI/Batch/IBatchPresenter.h" @@ -135,7 +135,7 @@ void SavePresenter::filterWorkspaceNames() { boost::regex rgx(filter); it = std::copy_if( wsNames.begin(), wsNames.end(), validNames.begin(), - [rgx](std::string s) { return boost::regex_search(s, rgx); }); + [rgx](const std::string &s) { return boost::regex_search(s, rgx); }); m_view->showFilterEditValid(); } catch (boost::regex_error &) { m_view->showFilterEditInvalid(); @@ -143,7 +143,7 @@ void SavePresenter::filterWorkspaceNames() { } else { // Otherwise simply add names where the filter string is found in it = std::copy_if(wsNames.begin(), wsNames.end(), validNames.begin(), - [filter](std::string s) { + [filter](const std::string &s) { return s.find(filter) != std::string::npos; }); } diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Save/SavePresenter.h b/qt/scientific_interfaces/ISISReflectometry/GUI/Save/SavePresenter.h index 25a826806e070df663f15faaef665487176ddb4e..01261d4870bbffa84d4099d0dc5d9400b2e9d8d3 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Save/SavePresenter.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Save/SavePresenter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Save/SavePresenterFactory.h b/qt/scientific_interfaces/ISISReflectometry/GUI/Save/SavePresenterFactory.h index dd94c919f9ec681e4b859d76efe1b7563892fbb1..3441ce25fb259bd6617d52baf8253fa811c49e45 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Save/SavePresenterFactory.h +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Save/SavePresenterFactory.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "AsciiSaver.h" diff --git a/qt/scientific_interfaces/ISISReflectometry/PrecompiledHeader.h b/qt/scientific_interfaces/ISISReflectometry/PrecompiledHeader.h index 615c906d96f4ca5650f269d34d7bc61092dd5111..449a595e135794242211bf62b59cca3c2e7c9fa6 100644 --- a/qt/scientific_interfaces/ISISReflectometry/PrecompiledHeader.h +++ b/qt/scientific_interfaces/ISISReflectometry/PrecompiledHeader.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/ISISReflectometry/Reduction/AllInitialized.h b/qt/scientific_interfaces/ISISReflectometry/Reduction/AllInitialized.h index 5085eae5970621536b2790f7d80bb6a2ead94e9a..1d71dd73a0ad517ac326bb2e7da5848108977725 100644 --- a/qt/scientific_interfaces/ISISReflectometry/Reduction/AllInitialized.h +++ b/qt/scientific_interfaces/ISISReflectometry/Reduction/AllInitialized.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include <boost/optional.hpp> diff --git a/qt/scientific_interfaces/ISISReflectometry/Reduction/AnalysisMode.h b/qt/scientific_interfaces/ISISReflectometry/Reduction/AnalysisMode.h index a479c3e52350b820d60c122961f3d44511e958cd..ad8ec62aa175baa9932cee013b2b72f1d53f352d 100644 --- a/qt/scientific_interfaces/ISISReflectometry/Reduction/AnalysisMode.h +++ b/qt/scientific_interfaces/ISISReflectometry/Reduction/AnalysisMode.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include <stdexcept> diff --git a/qt/scientific_interfaces/ISISReflectometry/Reduction/Batch.cpp b/qt/scientific_interfaces/ISISReflectometry/Reduction/Batch.cpp index e90ddc2636f4f7837d70f5da00f6e33bac4fa2d4..96c4f384ab4e90688788c70c459a0605a2ce4d88 100644 --- a/qt/scientific_interfaces/ISISReflectometry/Reduction/Batch.cpp +++ b/qt/scientific_interfaces/ISISReflectometry/Reduction/Batch.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "Batch.h" namespace MantidQt { diff --git a/qt/scientific_interfaces/ISISReflectometry/Reduction/Batch.h b/qt/scientific_interfaces/ISISReflectometry/Reduction/Batch.h index 329331557486b4012f236694fab35fb7b77c954b..ad1cd51b1c3d6fe84601296e226cbe0a1786d97c 100644 --- a/qt/scientific_interfaces/ISISReflectometry/Reduction/Batch.h +++ b/qt/scientific_interfaces/ISISReflectometry/Reduction/Batch.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/ISISReflectometry/Reduction/DetectorCorrections.cpp b/qt/scientific_interfaces/ISISReflectometry/Reduction/DetectorCorrections.cpp index ca0f9cb10c7718f7b59c6e6738310df159f7341e..c9bbf7c9917934bbd7837999f90a36990d37abd3 100644 --- a/qt/scientific_interfaces/ISISReflectometry/Reduction/DetectorCorrections.cpp +++ b/qt/scientific_interfaces/ISISReflectometry/Reduction/DetectorCorrections.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "DetectorCorrections.h" namespace MantidQt { diff --git a/qt/scientific_interfaces/ISISReflectometry/Reduction/DetectorCorrections.h b/qt/scientific_interfaces/ISISReflectometry/Reduction/DetectorCorrections.h index 68bf379dda21f8eca5f8a89d3234097ad4f60d07..e54a48747e221612ef60a268e6bbc19037d43574 100644 --- a/qt/scientific_interfaces/ISISReflectometry/Reduction/DetectorCorrections.h +++ b/qt/scientific_interfaces/ISISReflectometry/Reduction/DetectorCorrections.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "Common/DllConfig.h" diff --git a/qt/scientific_interfaces/ISISReflectometry/Reduction/Experiment.cpp b/qt/scientific_interfaces/ISISReflectometry/Reduction/Experiment.cpp index 128c87ea06ddb7febd11ec33b7f0a021101b985f..68be0147817bb64641a9d79a0403abab7a10bbdc 100644 --- a/qt/scientific_interfaces/ISISReflectometry/Reduction/Experiment.cpp +++ b/qt/scientific_interfaces/ISISReflectometry/Reduction/Experiment.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "Experiment.h" #include "MantidQtWidgets/Common/ParseKeyValueString.h" diff --git a/qt/scientific_interfaces/ISISReflectometry/Reduction/Experiment.h b/qt/scientific_interfaces/ISISReflectometry/Reduction/Experiment.h index cc6b65cbe9442458bc704d63a670998d5b83bada..56f9fa8985be3106f10ec296ad45972c49121b30 100644 --- a/qt/scientific_interfaces/ISISReflectometry/Reduction/Experiment.h +++ b/qt/scientific_interfaces/ISISReflectometry/Reduction/Experiment.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/ISISReflectometry/Reduction/FloodCorrections.cpp b/qt/scientific_interfaces/ISISReflectometry/Reduction/FloodCorrections.cpp index 83f688461b13da3f0d2e0461120a10a1da304914..aba3620fb54f210545f843e55ec2a7cc43e414b3 100644 --- a/qt/scientific_interfaces/ISISReflectometry/Reduction/FloodCorrections.cpp +++ b/qt/scientific_interfaces/ISISReflectometry/Reduction/FloodCorrections.cpp @@ -1,17 +1,20 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "FloodCorrections.h" + +#include <utility> + namespace MantidQt { namespace CustomInterfaces { namespace ISISReflectometry { FloodCorrections::FloodCorrections(FloodCorrectionType correctionType, boost::optional<std::string> workspace) - : m_correctionType(correctionType), m_workspace(workspace) {} + : m_correctionType(correctionType), m_workspace(std::move(workspace)) {} FloodCorrectionType FloodCorrections::correctionType() const { return m_correctionType; diff --git a/qt/scientific_interfaces/ISISReflectometry/Reduction/FloodCorrections.h b/qt/scientific_interfaces/ISISReflectometry/Reduction/FloodCorrections.h index e3cf917a4195432f6455f651f6fc1d8b9d9c664c..ff6b6a4b7a240bbf4f829471de71d964bc12c23a 100644 --- a/qt/scientific_interfaces/ISISReflectometry/Reduction/FloodCorrections.h +++ b/qt/scientific_interfaces/ISISReflectometry/Reduction/FloodCorrections.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "Common/DllConfig.h" diff --git a/qt/scientific_interfaces/ISISReflectometry/Reduction/Group.cpp b/qt/scientific_interfaces/ISISReflectometry/Reduction/Group.cpp index 1e6273de06f7194c8e4a11445f23303e0f809412..4ecdb4963ef0523a64bc0b91d702a3801092df7e 100644 --- a/qt/scientific_interfaces/ISISReflectometry/Reduction/Group.cpp +++ b/qt/scientific_interfaces/ISISReflectometry/Reduction/Group.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "Group.h" #include "Common/IndexOf.h" diff --git a/qt/scientific_interfaces/ISISReflectometry/Reduction/Group.h b/qt/scientific_interfaces/ISISReflectometry/Reduction/Group.h index 344f2192693be43a936245165f3cfd193b2d8abf..fbeadb8d20ae69cd7023dedf2f39501508f4cbab 100644 --- a/qt/scientific_interfaces/ISISReflectometry/Reduction/Group.h +++ b/qt/scientific_interfaces/ISISReflectometry/Reduction/Group.h @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #pragma once #include "Common/DllConfig.h" #include "Item.h" diff --git a/qt/scientific_interfaces/ISISReflectometry/Reduction/Instrument.cpp b/qt/scientific_interfaces/ISISReflectometry/Reduction/Instrument.cpp index b2ee01f1a8d5bc6c937ec27e61fdb51fce48e68a..27b6ce600fc5df016ecc1bd3c897f74486f79aaf 100644 --- a/qt/scientific_interfaces/ISISReflectometry/Reduction/Instrument.cpp +++ b/qt/scientific_interfaces/ISISReflectometry/Reduction/Instrument.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "Instrument.h" namespace MantidQt { diff --git a/qt/scientific_interfaces/ISISReflectometry/Reduction/Instrument.h b/qt/scientific_interfaces/ISISReflectometry/Reduction/Instrument.h index 861c4867513b4b69f6b90c1639294532569a221e..d1e3f6f981737112942a34439a2e9c39130c4de8 100644 --- a/qt/scientific_interfaces/ISISReflectometry/Reduction/Instrument.h +++ b/qt/scientific_interfaces/ISISReflectometry/Reduction/Instrument.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/ISISReflectometry/Reduction/Item.cpp b/qt/scientific_interfaces/ISISReflectometry/Reduction/Item.cpp index 4ade9116921c961d65de0e8861d820f521a52ef0..ca931a14ee4f69dae539bfe519d5380857faa974 100644 --- a/qt/scientific_interfaces/ISISReflectometry/Reduction/Item.cpp +++ b/qt/scientific_interfaces/ISISReflectometry/Reduction/Item.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "Item.h" diff --git a/qt/scientific_interfaces/ISISReflectometry/Reduction/Item.h b/qt/scientific_interfaces/ISISReflectometry/Reduction/Item.h index 11f8c1adfd5da78a7c37a3b0ff4024d5ca28a44e..704160782e11f6e5a8f4625b7f52497a6ed10fc7 100644 --- a/qt/scientific_interfaces/ISISReflectometry/Reduction/Item.h +++ b/qt/scientific_interfaces/ISISReflectometry/Reduction/Item.h @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #pragma once #include "Common/DllConfig.h" #include "ItemState.h" diff --git a/qt/scientific_interfaces/ISISReflectometry/Reduction/ItemState.cpp b/qt/scientific_interfaces/ISISReflectometry/Reduction/ItemState.cpp index be96b207c7c1f69bd206c18ea552fb986211ebf5..66df17b29fe3b17eac17bb7e1bae6b785ebd9801 100644 --- a/qt/scientific_interfaces/ISISReflectometry/Reduction/ItemState.cpp +++ b/qt/scientific_interfaces/ISISReflectometry/Reduction/ItemState.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "ItemState.h" diff --git a/qt/scientific_interfaces/ISISReflectometry/Reduction/ItemState.h b/qt/scientific_interfaces/ISISReflectometry/Reduction/ItemState.h index abe1dd9c89446c0a49bdcb11e270c8c52aa3f826..e958f96b9336f0410abf9188d4a93909dcf512e4 100644 --- a/qt/scientific_interfaces/ISISReflectometry/Reduction/ItemState.h +++ b/qt/scientific_interfaces/ISISReflectometry/Reduction/ItemState.h @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #pragma once #include "Common/DllConfig.h" #include <boost/optional.hpp> diff --git a/qt/scientific_interfaces/ISISReflectometry/Reduction/MonitorCorrections.cpp b/qt/scientific_interfaces/ISISReflectometry/Reduction/MonitorCorrections.cpp index 14b114d9c77c9d99217fd81af1f065ee03304ae5..a4b931cb8395ae77b65788a843cb26a574a36a0c 100644 --- a/qt/scientific_interfaces/ISISReflectometry/Reduction/MonitorCorrections.cpp +++ b/qt/scientific_interfaces/ISISReflectometry/Reduction/MonitorCorrections.cpp @@ -1,10 +1,13 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MonitorCorrections.h" + +#include <utility> + namespace MantidQt { namespace CustomInterfaces { namespace ISISReflectometry { @@ -14,7 +17,8 @@ MonitorCorrections::MonitorCorrections( boost::optional<RangeInLambda> backgroundRange, boost::optional<RangeInLambda> integralRange) : m_monitorIndex(monitorIndex), m_integrate(integrate), - m_backgroundRange(backgroundRange), m_integralRange(integralRange) {} + m_backgroundRange(std::move(backgroundRange)), + m_integralRange(std::move(integralRange)) {} size_t MonitorCorrections::monitorIndex() const { return m_monitorIndex; } diff --git a/qt/scientific_interfaces/ISISReflectometry/Reduction/MonitorCorrections.h b/qt/scientific_interfaces/ISISReflectometry/Reduction/MonitorCorrections.h index 223c99b96b541794280f836acb5b566db0ee038a..3c8cd2916a0454e8efebe8064123af7f73aee55f 100644 --- a/qt/scientific_interfaces/ISISReflectometry/Reduction/MonitorCorrections.h +++ b/qt/scientific_interfaces/ISISReflectometry/Reduction/MonitorCorrections.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "Common/DllConfig.h" diff --git a/qt/scientific_interfaces/ISISReflectometry/Reduction/ParseReflectometryStrings.cpp b/qt/scientific_interfaces/ISISReflectometry/Reduction/ParseReflectometryStrings.cpp index 00e1775e63f6e95b208b99608d28f36ed48eab5f..fa684924c0c524328e0fdc4fb75f263b8edc92af 100644 --- a/qt/scientific_interfaces/ISISReflectometry/Reduction/ParseReflectometryStrings.cpp +++ b/qt/scientific_interfaces/ISISReflectometry/Reduction/ParseReflectometryStrings.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "ParseReflectometryStrings.h" #include "AllInitialized.h" diff --git a/qt/scientific_interfaces/ISISReflectometry/Reduction/ParseReflectometryStrings.h b/qt/scientific_interfaces/ISISReflectometry/Reduction/ParseReflectometryStrings.h index 385b177ec508ddca792bbe988c217e49be3abce1..d7c6bcc28627cfc58876326d49ad62cc7e0677ff 100644 --- a/qt/scientific_interfaces/ISISReflectometry/Reduction/ParseReflectometryStrings.h +++ b/qt/scientific_interfaces/ISISReflectometry/Reduction/ParseReflectometryStrings.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "Common/DllConfig.h" diff --git a/qt/scientific_interfaces/ISISReflectometry/Reduction/PerThetaDefaults.cpp b/qt/scientific_interfaces/ISISReflectometry/Reduction/PerThetaDefaults.cpp index 10b17fd1fadcbf4ba1911119ea31f8851fda9aef..068a9e565653ed206e95f196e461d96a412c0012 100644 --- a/qt/scientific_interfaces/ISISReflectometry/Reduction/PerThetaDefaults.cpp +++ b/qt/scientific_interfaces/ISISReflectometry/Reduction/PerThetaDefaults.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "PerThetaDefaults.h" diff --git a/qt/scientific_interfaces/ISISReflectometry/Reduction/PerThetaDefaults.h b/qt/scientific_interfaces/ISISReflectometry/Reduction/PerThetaDefaults.h index 3a83cac8b204e2d0371289315b311a26eb219301..f6fb19c4f1205af7bb19ec779a9c223f797b41f6 100644 --- a/qt/scientific_interfaces/ISISReflectometry/Reduction/PerThetaDefaults.h +++ b/qt/scientific_interfaces/ISISReflectometry/Reduction/PerThetaDefaults.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "Common/DllConfig.h" diff --git a/qt/scientific_interfaces/ISISReflectometry/Reduction/PolarizationCorrections.cpp b/qt/scientific_interfaces/ISISReflectometry/Reduction/PolarizationCorrections.cpp index c5defaa43ee632a0563ec688ec4c775863bfd47a..86fed673c2ac55d049cb5b726f27a7598d072c2d 100644 --- a/qt/scientific_interfaces/ISISReflectometry/Reduction/PolarizationCorrections.cpp +++ b/qt/scientific_interfaces/ISISReflectometry/Reduction/PolarizationCorrections.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "PolarizationCorrections.h" namespace MantidQt { diff --git a/qt/scientific_interfaces/ISISReflectometry/Reduction/PolarizationCorrections.h b/qt/scientific_interfaces/ISISReflectometry/Reduction/PolarizationCorrections.h index 34cdec31fcf03cdff90294e52130638fc9f1b048..b75f2ec8c42e733b42ac6b904a9b2039e331ee52 100644 --- a/qt/scientific_interfaces/ISISReflectometry/Reduction/PolarizationCorrections.h +++ b/qt/scientific_interfaces/ISISReflectometry/Reduction/PolarizationCorrections.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "Common/DllConfig.h" diff --git a/qt/scientific_interfaces/ISISReflectometry/Reduction/ProcessingInstructions.h b/qt/scientific_interfaces/ISISReflectometry/Reduction/ProcessingInstructions.h index b2e9efa1d4311f852b2346770609a63e27ad882d..6392b43074d1b20d2bd9209b820e82a9f25e078b 100644 --- a/qt/scientific_interfaces/ISISReflectometry/Reduction/ProcessingInstructions.h +++ b/qt/scientific_interfaces/ISISReflectometry/Reduction/ProcessingInstructions.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/ISISReflectometry/Reduction/RangeInLambda.cpp b/qt/scientific_interfaces/ISISReflectometry/Reduction/RangeInLambda.cpp index 812a66517f11ec8e8bf92a99fbc3c505184f67a6..7b0574df871f36dc723b315bf44dbb92d1aa7cee 100644 --- a/qt/scientific_interfaces/ISISReflectometry/Reduction/RangeInLambda.cpp +++ b/qt/scientific_interfaces/ISISReflectometry/Reduction/RangeInLambda.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "RangeInLambda.h" #include "MantidKernel/Tolerance.h" diff --git a/qt/scientific_interfaces/ISISReflectometry/Reduction/RangeInLambda.h b/qt/scientific_interfaces/ISISReflectometry/Reduction/RangeInLambda.h index a661339a1c50340afe37edaa71e91936d84269fa..2858893613262a5f144440e783af973a2e082e09 100644 --- a/qt/scientific_interfaces/ISISReflectometry/Reduction/RangeInLambda.h +++ b/qt/scientific_interfaces/ISISReflectometry/Reduction/RangeInLambda.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "Common/DllConfig.h" diff --git a/qt/scientific_interfaces/ISISReflectometry/Reduction/RangeInQ.cpp b/qt/scientific_interfaces/ISISReflectometry/Reduction/RangeInQ.cpp index 62a3781126ce0de34bc477916dfc8909932ed798..b629cdcb190fdb99d9bf264052a1fd0657f6eac9 100644 --- a/qt/scientific_interfaces/ISISReflectometry/Reduction/RangeInQ.cpp +++ b/qt/scientific_interfaces/ISISReflectometry/Reduction/RangeInQ.cpp @@ -1,18 +1,20 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "RangeInQ.h" #include <cassert> +#include <utility> + namespace MantidQt { namespace CustomInterfaces { namespace ISISReflectometry { RangeInQ::RangeInQ(boost::optional<double> min, boost::optional<double> step, boost::optional<double> max) - : m_min(min), m_step(step), m_max(max) { + : m_min(std::move(min)), m_step(std::move(step)), m_max(std::move(max)) { assert(!(m_min.is_initialized() && m_max.is_initialized() && m_max < m_min)); } diff --git a/qt/scientific_interfaces/ISISReflectometry/Reduction/RangeInQ.h b/qt/scientific_interfaces/ISISReflectometry/Reduction/RangeInQ.h index 3f1df568445680026a0a35b38567a3aa585e05aa..b22619bbcd7d23ee6a60df0addd82681213ca4e9 100644 --- a/qt/scientific_interfaces/ISISReflectometry/Reduction/RangeInQ.h +++ b/qt/scientific_interfaces/ISISReflectometry/Reduction/RangeInQ.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "Common/DllConfig.h" diff --git a/qt/scientific_interfaces/ISISReflectometry/Reduction/ReductionJobs.cpp b/qt/scientific_interfaces/ISISReflectometry/Reduction/ReductionJobs.cpp index be52459a833a2238cc4de69eba97d761f4993380..a3d92ecaeb706a968eeb269a220807ebede058bc 100644 --- a/qt/scientific_interfaces/ISISReflectometry/Reduction/ReductionJobs.cpp +++ b/qt/scientific_interfaces/ISISReflectometry/Reduction/ReductionJobs.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "ReductionJobs.h" #include "Common/IndexOf.h" @@ -288,7 +288,7 @@ ReductionJobs::getItemWithOutputWorkspaceOrNone(std::string const &wsName) { } Group const &ReductionJobs::getGroupFromPath( - const MantidWidgets::Batch::RowLocation rowLocation) const { + const MantidWidgets::Batch::RowLocation &rowLocation) const { if (isGroupLocation(rowLocation)) { return groups()[groupOf(rowLocation)]; } else { @@ -297,7 +297,7 @@ Group const &ReductionJobs::getGroupFromPath( } boost::optional<Row> const &ReductionJobs::getRowFromPath( - const MantidWidgets::Batch::RowLocation rowLocation) const { + const MantidWidgets::Batch::RowLocation &rowLocation) const { if (isRowLocation(rowLocation)) { return groups()[groupOf(rowLocation)].rows()[rowOf(rowLocation)]; } else { @@ -306,7 +306,7 @@ boost::optional<Row> const &ReductionJobs::getRowFromPath( } bool ReductionJobs::validItemAtPath( - const MantidWidgets::Batch::RowLocation rowLocation) const { + const MantidWidgets::Batch::RowLocation &rowLocation) const { if (isGroupLocation(rowLocation)) return true; @@ -314,7 +314,7 @@ bool ReductionJobs::validItemAtPath( } Item const &ReductionJobs::getItemFromPath( - const MantidWidgets::Batch::RowLocation rowLocation) const { + const MantidWidgets::Batch::RowLocation &rowLocation) const { if (isGroupLocation(rowLocation)) { return getGroupFromPath(rowLocation); } else { diff --git a/qt/scientific_interfaces/ISISReflectometry/Reduction/ReductionJobs.h b/qt/scientific_interfaces/ISISReflectometry/Reduction/ReductionJobs.h index 0ebbdfe1978ea0ef2b217608bb5c850cd880f0d6..030fb2033b20e31b2a2ee5d5e24008bce43a530e 100644 --- a/qt/scientific_interfaces/ISISReflectometry/Reduction/ReductionJobs.h +++ b/qt/scientific_interfaces/ISISReflectometry/Reduction/ReductionJobs.h @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #pragma once #include "Common/DllConfig.h" #include "MantidQtWidgets/Common/Batch/RowLocation.h" @@ -48,13 +47,13 @@ public: getItemWithOutputWorkspaceOrNone(std::string const &wsName); bool - validItemAtPath(const MantidWidgets::Batch::RowLocation rowLocation) const; + validItemAtPath(const MantidWidgets::Batch::RowLocation &rowLocation) const; Group const & - getGroupFromPath(const MantidWidgets::Batch::RowLocation path) const; + getGroupFromPath(const MantidWidgets::Batch::RowLocation &path) const; boost::optional<Row> const & - getRowFromPath(const MantidWidgets::Batch::RowLocation path) const; + getRowFromPath(const MantidWidgets::Batch::RowLocation &path) const; Item const & - getItemFromPath(const MantidWidgets::Batch::RowLocation path) const; + getItemFromPath(const MantidWidgets::Batch::RowLocation &path) const; private: std::vector<Group> m_groups; diff --git a/qt/scientific_interfaces/ISISReflectometry/Reduction/ReductionOptionsMap.h b/qt/scientific_interfaces/ISISReflectometry/Reduction/ReductionOptionsMap.h index f1e59306691b662fdc6bbb20f8295ba077e75a15..4337b2f97c30fba41957c43d64928382d5d31efe 100644 --- a/qt/scientific_interfaces/ISISReflectometry/Reduction/ReductionOptionsMap.h +++ b/qt/scientific_interfaces/ISISReflectometry/Reduction/ReductionOptionsMap.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include <map> diff --git a/qt/scientific_interfaces/ISISReflectometry/Reduction/ReductionType.h b/qt/scientific_interfaces/ISISReflectometry/Reduction/ReductionType.h index 368c58a0811aeb31bbc567ba7b2b94f8eb14c92d..4a25ff9a7a55b2c0ca52d8e667bb16c43e1fca2e 100644 --- a/qt/scientific_interfaces/ISISReflectometry/Reduction/ReductionType.h +++ b/qt/scientific_interfaces/ISISReflectometry/Reduction/ReductionType.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "Common/DllConfig.h" diff --git a/qt/scientific_interfaces/ISISReflectometry/Reduction/ReductionWorkspaces.cpp b/qt/scientific_interfaces/ISISReflectometry/Reduction/ReductionWorkspaces.cpp index dc067b646b365240546b137edaa54ea08414552e..fff3cc9003ec1f2fb4c0710ab63f60fa8084b359 100644 --- a/qt/scientific_interfaces/ISISReflectometry/Reduction/ReductionWorkspaces.cpp +++ b/qt/scientific_interfaces/ISISReflectometry/Reduction/ReductionWorkspaces.cpp @@ -1,10 +1,13 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "ReductionWorkspaces.h" + +#include <utility> + #include "Common/Map.h" namespace MantidQt { @@ -16,7 +19,7 @@ ReductionWorkspaces::ReductionWorkspaces( // cppcheck-suppress passedByValue TransmissionRunPair transmissionRuns) : m_inputRunNumbers(std::move(inputRunNumbers)), - m_transmissionRuns(transmissionRuns), m_iVsLambda(), m_iVsQ(), + m_transmissionRuns(std::move(transmissionRuns)), m_iVsLambda(), m_iVsQ(), m_iVsQBinned() {} std::vector<std::string> const &ReductionWorkspaces::inputRunNumbers() const { diff --git a/qt/scientific_interfaces/ISISReflectometry/Reduction/ReductionWorkspaces.h b/qt/scientific_interfaces/ISISReflectometry/Reduction/ReductionWorkspaces.h index 874f0d00840cf8db91052d522a02e1eca572de01..1f0bdb6b1da52e3b24fca2aa6840c4eb0b6b5401 100644 --- a/qt/scientific_interfaces/ISISReflectometry/Reduction/ReductionWorkspaces.h +++ b/qt/scientific_interfaces/ISISReflectometry/Reduction/ReductionWorkspaces.h @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #pragma once #include "Common/DllConfig.h" diff --git a/qt/scientific_interfaces/ISISReflectometry/Reduction/Row.cpp b/qt/scientific_interfaces/ISISReflectometry/Reduction/Row.cpp index a239ec73198758988056b923fc62a3f293376b1b..e54b2e1e1bd2edb04a3ecec6c0113507a9bf478a 100644 --- a/qt/scientific_interfaces/ISISReflectometry/Reduction/Row.cpp +++ b/qt/scientific_interfaces/ISISReflectometry/Reduction/Row.cpp @@ -1,9 +1,8 @@ - // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "Row.h" #include "Common/Map.h" diff --git a/qt/scientific_interfaces/ISISReflectometry/Reduction/Row.h b/qt/scientific_interfaces/ISISReflectometry/Reduction/Row.h index f613d825d5da157f70b6cef0a28ca0eeb390dcf3..dcf8c9e596a914ce649bbe336466a71fc9015e8f 100644 --- a/qt/scientific_interfaces/ISISReflectometry/Reduction/Row.h +++ b/qt/scientific_interfaces/ISISReflectometry/Reduction/Row.h @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #pragma once #include "Common/DllConfig.h" #include "Item.h" diff --git a/qt/scientific_interfaces/ISISReflectometry/Reduction/RowLocation.cpp b/qt/scientific_interfaces/ISISReflectometry/Reduction/RowLocation.cpp index 645baacf42fd587dc4d203450a3a882ede8e13e9..bb7207b964cca8768103b31213c72c9b389a8766 100644 --- a/qt/scientific_interfaces/ISISReflectometry/Reduction/RowLocation.cpp +++ b/qt/scientific_interfaces/ISISReflectometry/Reduction/RowLocation.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "RowLocation.h" #include "Common/Map.h" diff --git a/qt/scientific_interfaces/ISISReflectometry/Reduction/RowLocation.h b/qt/scientific_interfaces/ISISReflectometry/Reduction/RowLocation.h index bd71323ec107cdef23370fd698d53440058ccd3c..563fc4c8e8d2598b0cb33ad3c26184c95c1ff4c5 100644 --- a/qt/scientific_interfaces/ISISReflectometry/Reduction/RowLocation.h +++ b/qt/scientific_interfaces/ISISReflectometry/Reduction/RowLocation.h @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #pragma once #include "MantidQtWidgets/Common/Batch/RowLocation.h" #include "MantidQtWidgets/Common/Batch/Subtree.h" diff --git a/qt/scientific_interfaces/ISISReflectometry/Reduction/RunsTable.cpp b/qt/scientific_interfaces/ISISReflectometry/Reduction/RunsTable.cpp index 101d671004a5bb0a23fcc9be0d3a126fbaaecb18..4d5e97a33b8765f4fb700eec820a025279f897c9 100644 --- a/qt/scientific_interfaces/ISISReflectometry/Reduction/RunsTable.cpp +++ b/qt/scientific_interfaces/ISISReflectometry/Reduction/RunsTable.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "RunsTable.h" #include "RowLocation.h" diff --git a/qt/scientific_interfaces/ISISReflectometry/Reduction/RunsTable.h b/qt/scientific_interfaces/ISISReflectometry/Reduction/RunsTable.h index 957a055189876ec37a4528832d74c07f1a37df2f..c59b15474e145c834578c727b618b6dac327c507 100644 --- a/qt/scientific_interfaces/ISISReflectometry/Reduction/RunsTable.h +++ b/qt/scientific_interfaces/ISISReflectometry/Reduction/RunsTable.h @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #pragma once #include "MantidQtWidgets/Common/Batch/RowLocation.h" diff --git a/qt/scientific_interfaces/ISISReflectometry/Reduction/Slicing.cpp b/qt/scientific_interfaces/ISISReflectometry/Reduction/Slicing.cpp index 17bd9ec11802fe01ade97a1ea51a83aa7db96422..b58a72ae757a7e35a71bc275fe822e30ff870bd5 100644 --- a/qt/scientific_interfaces/ISISReflectometry/Reduction/Slicing.cpp +++ b/qt/scientific_interfaces/ISISReflectometry/Reduction/Slicing.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "Slicing.h" #include <vector> diff --git a/qt/scientific_interfaces/ISISReflectometry/Reduction/Slicing.h b/qt/scientific_interfaces/ISISReflectometry/Reduction/Slicing.h index c12d838a7d101ff6eb2e6ad643cf5d63b8ff3dc5..919cc32e28359971e1f66d9135abfc1841e195c0 100644 --- a/qt/scientific_interfaces/ISISReflectometry/Reduction/Slicing.h +++ b/qt/scientific_interfaces/ISISReflectometry/Reduction/Slicing.h @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #pragma once #include "Common/DllConfig.h" #include <boost/variant.hpp> diff --git a/qt/scientific_interfaces/ISISReflectometry/Reduction/SummationType.h b/qt/scientific_interfaces/ISISReflectometry/Reduction/SummationType.h index a83aa4967ee9ac3f7c5f395ee224baf86f41302e..6d5f331546f1af6fdaede370242781a04c8fb51e 100644 --- a/qt/scientific_interfaces/ISISReflectometry/Reduction/SummationType.h +++ b/qt/scientific_interfaces/ISISReflectometry/Reduction/SummationType.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include <boost/optional.hpp> diff --git a/qt/scientific_interfaces/ISISReflectometry/Reduction/TransmissionRunPair.cpp b/qt/scientific_interfaces/ISISReflectometry/Reduction/TransmissionRunPair.cpp index 74cb29ff40b614882576c0c4241c0bde9bfdc1e9..da039167baadbe17a932a03ecafbb2e86ccbfc65 100644 --- a/qt/scientific_interfaces/ISISReflectometry/Reduction/TransmissionRunPair.cpp +++ b/qt/scientific_interfaces/ISISReflectometry/Reduction/TransmissionRunPair.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "TransmissionRunPair.h" #include <boost/algorithm/string/join.hpp> diff --git a/qt/scientific_interfaces/ISISReflectometry/Reduction/TransmissionRunPair.h b/qt/scientific_interfaces/ISISReflectometry/Reduction/TransmissionRunPair.h index 8062c65228c9f42a81a9f21ccfc0fcb14e1952cd..0b6e5388d6364138881b0260c08c5d73e1071872 100644 --- a/qt/scientific_interfaces/ISISReflectometry/Reduction/TransmissionRunPair.h +++ b/qt/scientific_interfaces/ISISReflectometry/Reduction/TransmissionRunPair.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "Common/DllConfig.h" diff --git a/qt/scientific_interfaces/ISISReflectometry/Reduction/TransmissionStitchOptions.cpp b/qt/scientific_interfaces/ISISReflectometry/Reduction/TransmissionStitchOptions.cpp index 8a6ba8d4a24d13fe72e127845faaa1af776d075f..053a547b8db114cd6b46791fb7aace01b8284f0e 100644 --- a/qt/scientific_interfaces/ISISReflectometry/Reduction/TransmissionStitchOptions.cpp +++ b/qt/scientific_interfaces/ISISReflectometry/Reduction/TransmissionStitchOptions.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "TransmissionStitchOptions.h" diff --git a/qt/scientific_interfaces/ISISReflectometry/Reduction/TransmissionStitchOptions.h b/qt/scientific_interfaces/ISISReflectometry/Reduction/TransmissionStitchOptions.h index 98ac896ed86abb986ba1482be52c3bee1574a4e1..5a35423d0fd3d50ee8538a1c883bd35e5b9c417e 100644 --- a/qt/scientific_interfaces/ISISReflectometry/Reduction/TransmissionStitchOptions.h +++ b/qt/scientific_interfaces/ISISReflectometry/Reduction/TransmissionStitchOptions.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "Common/DllConfig.h" diff --git a/qt/scientific_interfaces/ISISReflectometry/Reduction/ValidatePerThetaDefaults.cpp b/qt/scientific_interfaces/ISISReflectometry/Reduction/ValidatePerThetaDefaults.cpp index e0b564f895727c3cac7fd560c137a8b775c7ea17..812ef2fdcabe79bf8dd4a59eb9342d83c519cb48 100644 --- a/qt/scientific_interfaces/ISISReflectometry/Reduction/ValidatePerThetaDefaults.cpp +++ b/qt/scientific_interfaces/ISISReflectometry/Reduction/ValidatePerThetaDefaults.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "ValidatePerThetaDefaults.h" #include "AllInitialized.h" @@ -28,7 +28,7 @@ public: return boost::none; } - boost::optional<T> operator()(std::vector<int> errorColumns) const { + boost::optional<T> operator()(const std::vector<int> &errorColumns) const { std::transform(errorColumns.cbegin(), errorColumns.cend(), std::back_inserter(m_invalidParams), [this](int column) -> int { return m_baseColumn + column; }); diff --git a/qt/scientific_interfaces/ISISReflectometry/Reduction/ValidatePerThetaDefaults.h b/qt/scientific_interfaces/ISISReflectometry/Reduction/ValidatePerThetaDefaults.h index 8bf3d05364cc259fec66c9f87eaf6feff9e7e131..9b2dc6eae2fb2b8c157c5feebbd9f26c99527dba 100644 --- a/qt/scientific_interfaces/ISISReflectometry/Reduction/ValidatePerThetaDefaults.h +++ b/qt/scientific_interfaces/ISISReflectometry/Reduction/ValidatePerThetaDefaults.h @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #pragma once #include "Common/DllConfig.h" #include "Common/ValidationResult.h" diff --git a/qt/scientific_interfaces/ISISReflectometry/Reduction/ValidateRow.cpp b/qt/scientific_interfaces/ISISReflectometry/Reduction/ValidateRow.cpp index 8fad42654867cd5132b767eb1f869a3990352b60..02edeee301e441e780f1c877f19b2c975f059c8c 100644 --- a/qt/scientific_interfaces/ISISReflectometry/Reduction/ValidateRow.cpp +++ b/qt/scientific_interfaces/ISISReflectometry/Reduction/ValidateRow.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "ValidateRow.h" #include "AllInitialized.h" @@ -44,7 +44,7 @@ public: return boost::none; } - boost::optional<T> operator()(std::vector<int> errorColumns) const { + boost::optional<T> operator()(const std::vector<int> &errorColumns) const { std::transform(errorColumns.cbegin(), errorColumns.cend(), std::back_inserter(m_invalidParams), [this](int column) -> int { return m_baseColumn + column; }); diff --git a/qt/scientific_interfaces/ISISReflectometry/Reduction/ValidateRow.h b/qt/scientific_interfaces/ISISReflectometry/Reduction/ValidateRow.h index 3ec5d330aea0c0c1847332bb2cf78c4709af26ca..848f8870d5fed4ec9d5c1af10f87475586c5db57 100644 --- a/qt/scientific_interfaces/ISISReflectometry/Reduction/ValidateRow.h +++ b/qt/scientific_interfaces/ISISReflectometry/Reduction/ValidateRow.h @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #pragma once #include "Common/DllConfig.h" #include "Common/ValidationResult.h" diff --git a/qt/scientific_interfaces/ISISReflectometry/TestHelpers/ModelCreationHelper.cpp b/qt/scientific_interfaces/ISISReflectometry/TestHelpers/ModelCreationHelper.cpp index 37e84de91ca307c50559bd7a5959b567b59cbbcc..27dc770b73f52e0b09468b276ba172badcbc591c 100644 --- a/qt/scientific_interfaces/ISISReflectometry/TestHelpers/ModelCreationHelper.cpp +++ b/qt/scientific_interfaces/ISISReflectometry/TestHelpers/ModelCreationHelper.cpp @@ -1,10 +1,13 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "ModelCreationHelper.h" + +#include <utility> + #include "../../ISISReflectometry/Reduction/Batch.h" namespace MantidQt { @@ -55,7 +58,8 @@ Row makeRow(std::string const &run, double theta, std::string const &trans1, boost::optional<double> scale, ReductionOptionsMap const &optionsMap) { return Row({run}, theta, TransmissionRunPair({trans1, trans2}), - RangeInQ(qMin, qMax, qStep), scale, optionsMap, + RangeInQ(std::move(qMin), std::move(qMax), std::move(qStep)), + std::move(scale), optionsMap, ReductionWorkspaces({run}, TransmissionRunPair({trans1, trans2}))); } diff --git a/qt/scientific_interfaces/ISISReflectometry/TestHelpers/ModelCreationHelper.h b/qt/scientific_interfaces/ISISReflectometry/TestHelpers/ModelCreationHelper.h index 43b8684c22f0faef0d8c2146eb20bdfbba3dfd44..3f5c620484defbfa4134a9fd5237ed571174776b 100644 --- a/qt/scientific_interfaces/ISISReflectometry/TestHelpers/ModelCreationHelper.h +++ b/qt/scientific_interfaces/ISISReflectometry/TestHelpers/ModelCreationHelper.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/ISISSANS/DllConfig.h b/qt/scientific_interfaces/ISISSANS/DllConfig.h index fb93b574607101d8416863640f43ffd4de96447f..d50e109e90fae242e152d0acbe2e9f59684d112f 100644 --- a/qt/scientific_interfaces/ISISSANS/DllConfig.h +++ b/qt/scientific_interfaces/ISISSANS/DllConfig.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/ISISSANS/PrecompiledHeader.h b/qt/scientific_interfaces/ISISSANS/PrecompiledHeader.h index 615c906d96f4ca5650f269d34d7bc61092dd5111..449a595e135794242211bf62b59cca3c2e7c9fa6 100644 --- a/qt/scientific_interfaces/ISISSANS/PrecompiledHeader.h +++ b/qt/scientific_interfaces/ISISSANS/PrecompiledHeader.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/ISISSANS/SANSAddFiles.cpp b/qt/scientific_interfaces/ISISSANS/SANSAddFiles.cpp index b9984ba319c3f631c384d213bccfb903f2b4031b..7f050f86aac28811a0514a3811ea3c9e8f391e08 100644 --- a/qt/scientific_interfaces/ISISSANS/SANSAddFiles.cpp +++ b/qt/scientific_interfaces/ISISSANS/SANSAddFiles.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "SANSAddFiles.h" #include "MantidAPI/AlgorithmManager.h" @@ -175,7 +175,7 @@ QListWidgetItem *SANSAddFiles::insertListFront(const QString &text) { * that users see * @param dir :: full path of the output directory */ -void SANSAddFiles::setOutDir(std::string dir) { +void SANSAddFiles::setOutDir(const std::string &dir) { m_outDir = QString::fromStdString(dir); m_SANSForm->summedPath_lb->setText(OUT_MSG + m_outDir); } @@ -521,8 +521,10 @@ bool SANSAddFiles::checkValidityTimeShiftsForAddedEventFiles() { * @param lineEditText :: text for the line edit field * @param enabled :: if the input should be enabled. */ -void SANSAddFiles::setHistogramUiLogic(QString label, QString toolTip, - QString lineEditText, bool enabled) { +void SANSAddFiles::setHistogramUiLogic(const QString &label, + const QString &toolTip, + const QString &lineEditText, + bool enabled) { // Line edit field m_SANSForm->eventToHistBinning->setText(lineEditText); m_SANSForm->eventToHistBinning->setToolTip(toolTip); diff --git a/qt/scientific_interfaces/ISISSANS/SANSAddFiles.h b/qt/scientific_interfaces/ISISSANS/SANSAddFiles.h index 5be57f3412156ed777c98a3514c3f43be0fca420..ad16cc7c93d7600ef8f4ef519a052205d513a1f8 100644 --- a/qt/scientific_interfaces/ISISSANS/SANSAddFiles.h +++ b/qt/scientific_interfaces/ISISSANS/SANSAddFiles.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -55,8 +55,8 @@ private: /// Text for tooltip for save event data QString m_saveEventDataToolTip; /// Set the bin field - void setHistogramUiLogic(QString label, QString toolTip, QString lineEditText, - bool enabled); + void setHistogramUiLogic(const QString &label, const QString &toolTip, + const QString &lineEditText, bool enabled); /// Set the histo gram input enabled or disabled void setInputEnabled(bool enabled); /// Create Python string list @@ -69,7 +69,7 @@ private: QListWidgetItem *insertListFront(const QString &text); void changeOutputDir(Mantid::Kernel::ConfigValChangeNotification_ptr pDirInfo); - void setOutDir(std::string dir); + void setOutDir(const std::string &dir); bool checkValidityTimeShiftsForAddedEventFiles(); private slots: diff --git a/qt/scientific_interfaces/ISISSANS/SANSBackgroundCorrectionSettings.cpp b/qt/scientific_interfaces/ISISSANS/SANSBackgroundCorrectionSettings.cpp index b0a16b4b68dac2020abafcbcb158860a91f49ce5..e0aeb2f9f73de9a4b74d615c33760315fef4d429 100644 --- a/qt/scientific_interfaces/ISISSANS/SANSBackgroundCorrectionSettings.cpp +++ b/qt/scientific_interfaces/ISISSANS/SANSBackgroundCorrectionSettings.cpp @@ -1,15 +1,16 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "SANSBackgroundCorrectionSettings.h" namespace MantidQt { namespace CustomInterfaces { SANSBackgroundCorrectionSettings::SANSBackgroundCorrectionSettings( - QString runNumber, bool useMean, bool useMon, QString monNumber) + const QString &runNumber, bool useMean, bool useMon, + const QString &monNumber) : m_runNumber(runNumber), m_useMean(useMean), m_useMon(useMon), m_monNumber(monNumber) { hasValidSettings(); diff --git a/qt/scientific_interfaces/ISISSANS/SANSBackgroundCorrectionSettings.h b/qt/scientific_interfaces/ISISSANS/SANSBackgroundCorrectionSettings.h index 926a85aeaa61f2a567b64fc7ecd0c41f7b50b778..546b9a0b9d8953430e12230d9c48e1ba650c18a7 100644 --- a/qt/scientific_interfaces/ISISSANS/SANSBackgroundCorrectionSettings.h +++ b/qt/scientific_interfaces/ISISSANS/SANSBackgroundCorrectionSettings.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -19,8 +19,8 @@ the SANSBackgroundCorrectionWidget */ class MANTIDQT_ISISSANS_DLL SANSBackgroundCorrectionSettings { public: - SANSBackgroundCorrectionSettings(QString runNumber, bool useMean, bool useMon, - QString monNumber); + SANSBackgroundCorrectionSettings(const QString &runNumber, bool useMean, + bool useMon, const QString &monNumber); bool hasValidSettings(); diff --git a/qt/scientific_interfaces/ISISSANS/SANSBackgroundCorrectionWidget.cpp b/qt/scientific_interfaces/ISISSANS/SANSBackgroundCorrectionWidget.cpp index 0ef9652e9128c145de2260a8aaccca53c4e66ba3..2120d89456deaec65aae556526aacc15b9531ef1 100644 --- a/qt/scientific_interfaces/ISISSANS/SANSBackgroundCorrectionWidget.cpp +++ b/qt/scientific_interfaces/ISISSANS/SANSBackgroundCorrectionWidget.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "SANSBackgroundCorrectionWidget.h" #include "MantidKernel/Logger.h" @@ -16,7 +16,8 @@ namespace { Mantid::Kernel::Logger g_log("SANSBackgroundCorrectionWidget"); bool hasRunNumber( - MantidQt::CustomInterfaces::SANSBackgroundCorrectionSettings setting) { + const MantidQt::CustomInterfaces::SANSBackgroundCorrectionSettings + &setting) { auto hasNumber = true; if (setting.getRunNumber().isEmpty()) { hasNumber = false; @@ -49,7 +50,7 @@ SANSBackgroundCorrectionWidget::SANSBackgroundCorrectionWidget(QWidget *parent) * want */ void SANSBackgroundCorrectionWidget::setDarkRunSettingForTimeDetectors( - SANSBackgroundCorrectionSettings setting) { + const SANSBackgroundCorrectionSettings &setting) { if (!hasRunNumber(setting)) { return; @@ -73,7 +74,7 @@ void SANSBackgroundCorrectionWidget::setDarkRunSettingForTimeDetectors( * want */ void SANSBackgroundCorrectionWidget::setDarkRunSettingForTimeMonitors( - SANSBackgroundCorrectionSettings setting) { + const SANSBackgroundCorrectionSettings &setting) { if (!hasRunNumber(setting)) { return; } @@ -97,7 +98,7 @@ void SANSBackgroundCorrectionWidget::setDarkRunSettingForTimeMonitors( * want */ void SANSBackgroundCorrectionWidget::setDarkRunSettingForUampDetectors( - SANSBackgroundCorrectionSettings setting) { + const SANSBackgroundCorrectionSettings &setting) { if (!hasRunNumber(setting)) { return; } @@ -118,7 +119,7 @@ void SANSBackgroundCorrectionWidget::setDarkRunSettingForUampDetectors( * want */ void SANSBackgroundCorrectionWidget::setDarkRunSettingForUampMonitors( - SANSBackgroundCorrectionSettings setting) { + const SANSBackgroundCorrectionSettings &setting) { if (!hasRunNumber(setting)) { return; } diff --git a/qt/scientific_interfaces/ISISSANS/SANSBackgroundCorrectionWidget.h b/qt/scientific_interfaces/ISISSANS/SANSBackgroundCorrectionWidget.h index fad22ef91ccc8060a608d1a3393f0f6c035a9f7d..dfe8a3550d29250144723b7596a7a8ad010d238a 100644 --- a/qt/scientific_interfaces/ISISSANS/SANSBackgroundCorrectionWidget.h +++ b/qt/scientific_interfaces/ISISSANS/SANSBackgroundCorrectionWidget.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -25,18 +25,18 @@ class MANTIDQT_ISISSANS_DLL SANSBackgroundCorrectionWidget : public QWidget { public: SANSBackgroundCorrectionWidget(QWidget *parent = nullptr); - void - setDarkRunSettingForTimeDetectors(SANSBackgroundCorrectionSettings setting); + void setDarkRunSettingForTimeDetectors( + const SANSBackgroundCorrectionSettings &setting); SANSBackgroundCorrectionSettings getDarkRunSettingForTimeDetectors(); - void - setDarkRunSettingForUampDetectors(SANSBackgroundCorrectionSettings setting); + void setDarkRunSettingForUampDetectors( + const SANSBackgroundCorrectionSettings &setting); SANSBackgroundCorrectionSettings getDarkRunSettingForUampDetectors(); - void - setDarkRunSettingForTimeMonitors(SANSBackgroundCorrectionSettings setting); + void setDarkRunSettingForTimeMonitors( + const SANSBackgroundCorrectionSettings &setting); SANSBackgroundCorrectionSettings getDarkRunSettingForTimeMonitors(); - void - setDarkRunSettingForUampMonitors(SANSBackgroundCorrectionSettings setting); + void setDarkRunSettingForUampMonitors( + const SANSBackgroundCorrectionSettings &setting); SANSBackgroundCorrectionSettings getDarkRunSettingForUampMonitors(); void resetEntries(); diff --git a/qt/scientific_interfaces/ISISSANS/SANSConstants.cpp b/qt/scientific_interfaces/ISISSANS/SANSConstants.cpp index 82ec6a897427688b2f7fe24f1c72d387a72fff8e..2f98c687dffd3c53e8154095b8a955e68dfc357a 100644 --- a/qt/scientific_interfaces/ISISSANS/SANSConstants.cpp +++ b/qt/scientific_interfaces/ISISSANS/SANSConstants.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "SANSConstants.h" #include <limits> diff --git a/qt/scientific_interfaces/ISISSANS/SANSConstants.h b/qt/scientific_interfaces/ISISSANS/SANSConstants.h index c77e2e87e1646384d4ac6f65e222e57e9e4c9f31..a74030b85904be918a25d0012f276f73c4ebc25a 100644 --- a/qt/scientific_interfaces/ISISSANS/SANSConstants.h +++ b/qt/scientific_interfaces/ISISSANS/SANSConstants.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/ISISSANS/SANSDiagnostics.cpp b/qt/scientific_interfaces/ISISSANS/SANSDiagnostics.cpp index ccca245fa37b441b4f12b5b4625c32930beec6fe..a315af1582f5369fe9814bf5276bb1c2b860e2c6 100644 --- a/qt/scientific_interfaces/ISISSANS/SANSDiagnostics.cpp +++ b/qt/scientific_interfaces/ISISSANS/SANSDiagnostics.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "SANSDiagnostics.h" #include "MantidAPI/MatrixWorkspace.h" @@ -1185,7 +1185,7 @@ void SANSDiagnostics::saveSettings() { * @param orientation - orientation of the detector */ bool SANSDiagnostics::executeSumRowColumn( - const std::vector<unsigned int> &values, const QString ipws, + const std::vector<unsigned int> &values, const QString &ipws, const QString &opws, const QString &orientation) { if (values.empty()) { return false; @@ -1229,7 +1229,7 @@ bool SANSDiagnostics::executeSumRowColumn( * @param hvMin minimum value of * @param hvMax */ -bool SANSDiagnostics::runsumRowColumn(const QString ipwsName, +bool SANSDiagnostics::runsumRowColumn(const QString &ipwsName, const QString &opwsName, const QString &orientation, const QString &hvMin, @@ -1431,8 +1431,8 @@ void SANSDiagnostics::enableMaskFileControls() { * @returns an output workspace name */ QString SANSDiagnostics::createOutputWorkspaceName( - QString originalWorkspaceName, QString detectorName, - QString integrationType, QString min, QString max) { + const QString &originalWorkspaceName, const QString &detectorName, + const QString &integrationType, const QString &min, const QString &max) { // Get run number from the loaded workspace boost::optional<int> runNumber = boost::none; try { diff --git a/qt/scientific_interfaces/ISISSANS/SANSDiagnostics.h b/qt/scientific_interfaces/ISISSANS/SANSDiagnostics.h index 3f58d9a1495aba4e36057185613429ade51040de..f3ab468401ab4b3be72773be96592797616efd07 100644 --- a/qt/scientific_interfaces/ISISSANS/SANSDiagnostics.h +++ b/qt/scientific_interfaces/ISISSANS/SANSDiagnostics.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -80,7 +80,7 @@ private: void setToolTips(); /// execute sumrowcolumn algorithm bool executeSumRowColumn(const std::vector<unsigned int> &values, - const QString ipws, const QString &op, + const QString &ipws, const QString &op, const QString &orientation); /// load the settings from the registry void loadSettings(); @@ -99,7 +99,7 @@ private: bool runLoadAlgorithm(const QString &fileName, const QString &specMin = "-1", const QString &specMax = "-1"); /// returns sumrowcolumn script - bool runsumRowColumn(const QString ipwsName, const QString &opwsName, + bool runsumRowColumn(const QString &ipwsName, const QString &opwsName, const QString &orientation, const QString &hvMin, const QString &hvMax); // get rectangular detector details @@ -173,10 +173,10 @@ private: void HVMinHVMaxStringValues(const int minVal, const int maxVal, QString &hvMin, QString &hvMax); /// Create the name for the outputworkspace - QString createOutputWorkspaceName(QString originalWorkspaceName, - QString detectorName, - QString integrationType, QString min, - QString max); + QString createOutputWorkspaceName(const QString &originalWorkspaceName, + const QString &detectorName, + const QString &integrationType, + const QString &min, const QString &max); private: QString m_dataDir; ///< default data search directory diff --git a/qt/scientific_interfaces/ISISSANS/SANSEventSlicing.cpp b/qt/scientific_interfaces/ISISSANS/SANSEventSlicing.cpp index 7270abb691857b861f3f4d5bafd18d94f24881b1..e9f824dd02ecddfd7c0fa8a5a9b7c1ec39924c86 100644 --- a/qt/scientific_interfaces/ISISSANS/SANSEventSlicing.cpp +++ b/qt/scientific_interfaces/ISISSANS/SANSEventSlicing.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "SANSEventSlicing.h" #include "MantidAPI/AlgorithmManager.h" @@ -148,7 +148,8 @@ SANSEventSlicing::runSliceEvent(const QString &code) { return values2ChargeAndTime(result); } -void SANSEventSlicing::raiseWarning(QString title, QString message) { +void SANSEventSlicing::raiseWarning(const QString &title, + const QString &message) { QMessageBox::warning(this, title, message); } diff --git a/qt/scientific_interfaces/ISISSANS/SANSEventSlicing.h b/qt/scientific_interfaces/ISISSANS/SANSEventSlicing.h index 5a8175e2902a546f381125121d015e0db391d82e..446f138a5eee9661efeff6548d52bd9408c1576b 100644 --- a/qt/scientific_interfaces/ISISSANS/SANSEventSlicing.h +++ b/qt/scientific_interfaces/ISISSANS/SANSEventSlicing.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -39,7 +39,7 @@ private: ChargeAndTime runSliceEvent(const QString &code2run); void checkPythonOutput(const QString &result); ChargeAndTime values2ChargeAndTime(const QString &input); - void raiseWarning(QString title, QString message); + void raiseWarning(const QString &title, const QString &message); protected: void showEvent(QShowEvent * /*unused*/) override; diff --git a/qt/scientific_interfaces/ISISSANS/SANSPlotSpecial.cpp b/qt/scientific_interfaces/ISISSANS/SANSPlotSpecial.cpp index 6b2d93fb2b588902446ff99e7135755f0aebdcd6..d4094c00dc48c08bc2230c68cb45a2aa15d76f15 100644 --- a/qt/scientific_interfaces/ISISSANS/SANSPlotSpecial.cpp +++ b/qt/scientific_interfaces/ISISSANS/SANSPlotSpecial.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "SANSPlotSpecial.h" @@ -474,7 +474,7 @@ void SANSPlotSpecial::setupTable() { QwtPlotCurve *SANSPlotSpecial::plotMiniplot( QwtPlotCurve *curve, - boost::shared_ptr<Mantid::API::MatrixWorkspace> workspace, + const boost::shared_ptr<Mantid::API::MatrixWorkspace> &workspace, size_t workspaceIndex) { bool data = (curve == m_dataCurve); diff --git a/qt/scientific_interfaces/ISISSANS/SANSPlotSpecial.h b/qt/scientific_interfaces/ISISSANS/SANSPlotSpecial.h index 2e612a150f39621997b592d10032eb0aadd20bdb..abcddc324ee66727d6f864f271883f5035567113 100644 --- a/qt/scientific_interfaces/ISISSANS/SANSPlotSpecial.h +++ b/qt/scientific_interfaces/ISISSANS/SANSPlotSpecial.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -100,7 +100,7 @@ private: void createTransforms(); QwtPlotCurve * plotMiniplot(QwtPlotCurve *curve, - boost::shared_ptr<Mantid::API::MatrixWorkspace> workspace, + const boost::shared_ptr<Mantid::API::MatrixWorkspace> &workspace, size_t workspaceIndex = 0); void deriveGuinierSpheres(); diff --git a/qt/scientific_interfaces/ISISSANS/SANSRunWindow.cpp b/qt/scientific_interfaces/ISISSANS/SANSRunWindow.cpp index a3b64934cae9c12a6f9770317b31181f545bbe3b..f882baace119c80ae470f6acf4626427e8afa0bd 100644 --- a/qt/scientific_interfaces/ISISSANS/SANSRunWindow.cpp +++ b/qt/scientific_interfaces/ISISSANS/SANSRunWindow.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "SANSRunWindow.h" @@ -45,6 +45,7 @@ #include <boost/tuple/tuple.hpp> #include <cmath> +#include <utility> using Mantid::detid_t; @@ -159,7 +160,7 @@ QString convertBoolToPythonBoolString(bool input) { * @param input: the python string representation * @returns a true or false */ -bool convertPythonBoolStringToBool(QString input) { +bool convertPythonBoolStringToBool(const QString &input) { bool value = false; if (input == MantidQt::CustomInterfaces::SANSConstants::getPythonTrueKeyword()) { @@ -173,7 +174,8 @@ bool convertPythonBoolStringToBool(QString input) { } void setTransmissionOnSaveCommand( - QString &saveCommand, Mantid::API::MatrixWorkspace_sptr matrix_workspace, + QString &saveCommand, + const Mantid::API::MatrixWorkspace_sptr &matrix_workspace, const QString &detectorSelection) { if (matrix_workspace->getInstrument()->getName() == "SANS2D") saveCommand += "'front-detector, rear-detector'"; @@ -1461,7 +1463,7 @@ void SANSRunWindow::appendRowToMaskTable(const QString &type, * @param lsdb :: The result of the sample-detector bank 2 distance */ void SANSRunWindow::componentLOQDistances( - boost::shared_ptr<const Mantid::API::MatrixWorkspace> workspace, + const boost::shared_ptr<const Mantid::API::MatrixWorkspace> &workspace, double &lms, double &lsda, double &lsdb) { Instrument_const_sptr instr = workspace->getInstrument(); if (!instr) @@ -1882,7 +1884,7 @@ void SANSRunWindow::setGeometryDetails() { * @param wscode :: 0 for sample, 1 for can, others not defined */ void SANSRunWindow::setSANS2DGeometry( - boost::shared_ptr<const Mantid::API::MatrixWorkspace> workspace, + const boost::shared_ptr<const Mantid::API::MatrixWorkspace> &workspace, int wscode) { const double unitconv = 1000.; const double distance = workspace->spectrumInfo().l1() * unitconv; @@ -1934,11 +1936,11 @@ void SANSRunWindow::setSANS2DGeometry( * @param wscode :: ????? */ void SANSRunWindow::setLOQGeometry( - boost::shared_ptr<const Mantid::API::MatrixWorkspace> workspace, + const boost::shared_ptr<const Mantid::API::MatrixWorkspace> &workspace, int wscode) { double dist_ms(0.0), dist_mdb(0.0), dist_hab(0.0); // Sample - componentLOQDistances(workspace, dist_ms, dist_mdb, dist_hab); + componentLOQDistances(std::move(workspace), dist_ms, dist_mdb, dist_hab); QHash<QString, QLabel *> &labels = m_loq_detlabels[wscode]; QLabel *detlabel = labels.value("moderator-sample"); @@ -3687,7 +3689,7 @@ void SANSRunWindow::fillDetectNames(QComboBox *output) { * @throw NotFoundError if a workspace can't be returned */ Mantid::API::MatrixWorkspace_sptr -SANSRunWindow::getGroupMember(Mantid::API::Workspace_const_sptr in, +SANSRunWindow::getGroupMember(const Mantid::API::Workspace_const_sptr &in, const int member) const { Mantid::API::WorkspaceGroup_const_sptr group = boost::dynamic_pointer_cast<const Mantid::API::WorkspaceGroup>(in); @@ -3820,7 +3822,7 @@ void SANSRunWindow::cleanup() { * @param csv_line :: Add a line of csv text to the grid * @param separator :: An optional separator, default = "," */ -int SANSRunWindow::addBatchLine(QString csv_line, QString separator) { +int SANSRunWindow::addBatchLine(const QString &csv_line, QString separator) { // Try to detect separator if one is not specified if (separator.isEmpty()) { if (csv_line.contains(",")) { @@ -4688,7 +4690,7 @@ bool SANSRunWindow::areSettingsValid(States type) { void SANSRunWindow::checkWaveLengthAndQValues(bool &isValid, QString &message, QLineEdit *min, QLineEdit *max, QComboBox *selection, - QString type) { + const QString &type) { auto min_value = min->text().simplified().toDouble(); auto max_value = max->text().simplified().toDouble(); @@ -4834,7 +4836,7 @@ void SANSRunWindow::retrieveQResolutionAperture() { * @param command: the python command to execute * @returns either a length (string) in mm or an empty string */ -QString SANSRunWindow::retrieveQResolutionGeometry(QString command) { +QString SANSRunWindow::retrieveQResolutionGeometry(const QString &command) { QString result(runPythonCode(command, false)); result = result.simplified(); if (result == m_constants.getPythonEmptyKeyword()) { @@ -4864,9 +4866,10 @@ void SANSRunWindow::setupQResolutionCircularAperture() { * @param h2: the height of the second aperture * @param w2: the width of the second aperture */ -void SANSRunWindow::setupQResolutionRectangularAperture(QString h1, QString w1, - QString h2, - QString w2) { +void SANSRunWindow::setupQResolutionRectangularAperture(const QString &h1, + const QString &w1, + const QString &h2, + const QString &w2) { // Set the QResolution Aperture setQResolutionApertureType(QResoluationAperture::RECTANGULAR, "H1 [mm]", "H2 [mm]", h1, h2, @@ -4914,9 +4917,9 @@ void SANSRunWindow::setupQResolutionRectangularAperture() { * @param w1W2Disabled: if the w1W2Inputs should be disabled */ void SANSRunWindow::setQResolutionApertureType( - QResoluationAperture apertureType, QString a1H1Label, QString a2H2Label, - QString a1H1, QString a2H2, QString toolTipA1H1, QString toolTipA2H2, - bool w1W2Disabled) { + QResoluationAperture apertureType, const QString &a1H1Label, + const QString &a2H2Label, const QString &a1H1, const QString &a2H2, + const QString &toolTipA1H1, const QString &toolTipA2H2, bool w1W2Disabled) { // Set the labels m_uiForm.q_resolution_a1_h1_label->setText(a1H1Label); m_uiForm.q_resolution_a2_h2_label->setText(a2H2Label); @@ -5012,7 +5015,7 @@ void SANSRunWindow::writeQResolutionSettingsToPythonScript( * @param py_code: the code segment to which we want to append */ void SANSRunWindow::writeQResolutionSettingsToPythonScriptSingleEntry( - QString value, QString code_entry, const QString lineEnding, + const QString &value, const QString &code_entry, const QString &lineEnding, QString &py_code) const { if (!value.isEmpty()) { py_code += code_entry + value + lineEnding; @@ -5125,7 +5128,8 @@ SANSRunWindow::retrieveBackgroundCorrectionSetting(bool isTime, bool isMon) { std::map<QString, QString> commandMap = { {"run_number", ""}, {"is_mean", ""}, {"is_mon", ""}, {"mon_number", ""}}; - auto createPythonScript = [](bool isTime, bool isMon, QString component) { + auto createPythonScript = [](bool isTime, bool isMon, + const QString &component) { return "i.get_background_correction(is_time = " + convertBoolToPythonBoolString(isTime) + ", is_mon=" + convertBoolToPythonBoolString(isMon) + @@ -5185,7 +5189,7 @@ void SANSRunWindow::writeBackgroundCorrectionToPythonScript( */ void SANSRunWindow::addBackgroundCorrectionToPythonScript( QString &pythonCode, - MantidQt::CustomInterfaces::SANSBackgroundCorrectionSettings setting, + const MantidQt::CustomInterfaces::SANSBackgroundCorrectionSettings &setting, bool isTimeBased) { QString newSetting = diff --git a/qt/scientific_interfaces/ISISSANS/SANSRunWindow.h b/qt/scientific_interfaces/ISISSANS/SANSRunWindow.h index f6cd886caae94ab8f9173c856b1616593a194ea1..096cfd7636556ef64a1a1f262e41af2bab5e71c9 100644 --- a/qt/scientific_interfaces/ISISSANS/SANSRunWindow.h +++ b/qt/scientific_interfaces/ISISSANS/SANSRunWindow.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -149,14 +149,15 @@ private: QString readSampleObjectGUIChanges(); /// Get the component distances void componentLOQDistances( - boost::shared_ptr<const Mantid::API::MatrixWorkspace> workspace, + const boost::shared_ptr<const Mantid::API::MatrixWorkspace> &workspace, double &lms, double &lsda, double &lsdb); /// Enable/disable user interaction void setProcessingState(const States action); /// Check for workspace name in the AnalysisDataService bool workspaceExists(const QString &ws_name) const; Mantid::API::MatrixWorkspace_sptr - getGroupMember(Mantid::API::Workspace_const_sptr in, const int member) const; + getGroupMember(const Mantid::API::Workspace_const_sptr &in, + const int member) const; /// Construct a QStringList of the currently loaded workspaces QStringList currentWorkspaceList() const; /// Is the user file loaded @@ -168,11 +169,11 @@ private: void setGeometryDetails(); /// Set the SANS2D geometry void setSANS2DGeometry( - boost::shared_ptr<const Mantid::API::MatrixWorkspace> workspace, + const boost::shared_ptr<const Mantid::API::MatrixWorkspace> &workspace, int wscode); /// Set LOQ geometry void setLOQGeometry( - boost::shared_ptr<const Mantid::API::MatrixWorkspace> workspace, + const boost::shared_ptr<const Mantid::API::MatrixWorkspace> &workspace, int wscode); /// Mark an error on a label void markError(QLabel *label); @@ -207,7 +208,7 @@ private: bool browseForFile(const QString &box_title, QLineEdit *file_field, QString file_filter = QString()); /// Add a csv line to the batch grid - int addBatchLine(QString csv_line, QString separator = ""); + int addBatchLine(const QString &csv_line, QString separator = ""); /// Save the batch file QString saveBatchGrid(const QString &filename = ""); /// Check that the workspace can have the zero errors removed @@ -445,7 +446,7 @@ private: /// Check setting for wavelengths and Q values void checkWaveLengthAndQValues(bool &isValid, QString &message, QLineEdit *min, QLineEdit *max, - QComboBox *selection, QString type); + QComboBox *selection, const QString &type); /// Checks if the save settings are valid for a particular workspace bool areSaveSettingsValid(const QString &workspaceName); /// Update the beam center fields @@ -458,26 +459,29 @@ private: /// correct setting and displays it void retrieveQResolutionAperture(); /// General getter for aperture settings of Q Resolution - QString retrieveQResolutionGeometry(QString command); + QString retrieveQResolutionGeometry(const QString &command); /// Write the QResolution GUI changes to a python script void writeQResolutionSettingsToPythonScript(QString &pythonCode); /// Write single line for Q Resolution void writeQResolutionSettingsToPythonScriptSingleEntry( - QString value, QString code_entry, const QString lineEnding, - QString &py_code) const; + const QString &value, const QString &code_entry, + const QString &lineEnding, QString &py_code) const; /// Sets the cirucular aperture, ie labels and populates the values with what /// is available from the user file void setupQResolutionCircularAperture(); /// Sets the rectuanular aperture - void setupQResolutionRectangularAperture(QString h1, QString w1, QString h2, - QString w2); + void setupQResolutionRectangularAperture(const QString &h1, const QString &w1, + const QString &h2, + const QString &w2); /// Set the rectangular aperture void setupQResolutionRectangularAperture(); /// Set the aperture type void setQResolutionApertureType(QResoluationAperture apertureType, - QString a1H1Label, QString a2H2Label, - QString a1H1, QString a2H2, - QString toolTipA1H1, QString toolTipA2H2, + const QString &a1H1Label, + const QString &a2H2Label, const QString &a1H1, + const QString &a2H2, + const QString &toolTipA1H1, + const QString &toolTipA2H2, bool w1W2Disabled); /// Initialize the QResolution settings void initQResolutionSettings(); @@ -494,7 +498,8 @@ private: /// Generic addition of background correction to python script void addBackgroundCorrectionToPythonScript( QString &pythonCode, - MantidQt::CustomInterfaces::SANSBackgroundCorrectionSettings setting, + const MantidQt::CustomInterfaces::SANSBackgroundCorrectionSettings + &setting, bool isTimeBased); /// Check if the user file has a valid user file extension bool hasUserFileValidFileExtension(); diff --git a/qt/scientific_interfaces/Indirect/AbsorptionCorrections.cpp b/qt/scientific_interfaces/Indirect/AbsorptionCorrections.cpp index bff925c1254a99d5d1eb95ef36f5bfcd68ce1a8b..a3e6cbf5d131c400fbc8f8c52c028893ba6bc32e 100644 --- a/qt/scientific_interfaces/Indirect/AbsorptionCorrections.cpp +++ b/qt/scientific_interfaces/Indirect/AbsorptionCorrections.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "AbsorptionCorrections.h" @@ -47,7 +47,7 @@ std::string extractFirstOf(std::string const &str, return str; } -void setYAxisLabels(WorkspaceGroup_sptr group, std::string const &unit, +void setYAxisLabels(const WorkspaceGroup_sptr &group, std::string const &unit, std::string const &axisLabel) { for (auto const &workspace : *group) { auto matrixWs = boost::dynamic_pointer_cast<MatrixWorkspace>(workspace); @@ -56,7 +56,8 @@ void setYAxisLabels(WorkspaceGroup_sptr group, std::string const &unit, } } -void convertSpectrumAxis(MatrixWorkspace_sptr workspace, double eFixed = 0.0) { +void convertSpectrumAxis(const MatrixWorkspace_sptr &workspace, + double eFixed = 0.0) { auto convertAlg = AlgorithmManager::Instance().create("ConvertSpectrumAxis"); convertAlg->initialize(); convertAlg->setProperty("InputWorkspace", workspace); @@ -68,7 +69,7 @@ void convertSpectrumAxis(MatrixWorkspace_sptr workspace, double eFixed = 0.0) { convertAlg->execute(); } -MatrixWorkspace_sptr convertUnits(MatrixWorkspace_sptr workspace, +MatrixWorkspace_sptr convertUnits(const MatrixWorkspace_sptr &workspace, std::string const &target) { auto convertAlg = AlgorithmManager::Instance().create("ConvertUnits"); convertAlg->initialize(); @@ -95,7 +96,7 @@ groupWorkspaces(std::vector<std::string> const &workspaceNames) { return groupAlg->getProperty("OutputWorkspace"); } -WorkspaceGroup_sptr convertUnits(WorkspaceGroup_sptr workspaceGroup, +WorkspaceGroup_sptr convertUnits(const WorkspaceGroup_sptr &workspaceGroup, std::string const &target) { std::vector<std::string> convertedNames; convertedNames.reserve(workspaceGroup->size()); @@ -299,8 +300,8 @@ void AbsorptionCorrections::run() { * @param alg Algorithm to set properties of * @param shape Sample shape */ -void AbsorptionCorrections::addShapeSpecificSampleOptions(IAlgorithm_sptr alg, - QString shape) { +void AbsorptionCorrections::addShapeSpecificSampleOptions( + const IAlgorithm_sptr &alg, const QString &shape) { if (shape == "FlatPlate") { double const sampleHeight = m_uiForm.spFlatSampleHeight->value(); @@ -342,8 +343,8 @@ void AbsorptionCorrections::addShapeSpecificSampleOptions(IAlgorithm_sptr alg, * @param alg Algorithm to set properties of * @param shape Sample shape */ -void AbsorptionCorrections::addShapeSpecificCanOptions(IAlgorithm_sptr alg, - QString const &shape) { +void AbsorptionCorrections::addShapeSpecificCanOptions( + const IAlgorithm_sptr &alg, QString const &shape) { if (shape == "FlatPlate") { double const canFrontThickness = m_uiForm.spFlatCanFrontThickness->value(); alg->setProperty("ContainerFrontThickness", canFrontThickness); @@ -470,7 +471,7 @@ void AbsorptionCorrections::processWavelengthWorkspace() { } void AbsorptionCorrections::convertSpectrumAxes( - WorkspaceGroup_sptr correctionsWs) { + const WorkspaceGroup_sptr &correctionsWs) { auto const sampleWsName = m_uiForm.dsSampleInput->getCurrentDataName().toStdString(); convertSpectrumAxes(correctionsWs, getADSMatrixWorkspace(sampleWsName)); @@ -478,7 +479,8 @@ void AbsorptionCorrections::convertSpectrumAxes( } void AbsorptionCorrections::convertSpectrumAxes( - WorkspaceGroup_sptr correctionsGroup, MatrixWorkspace_sptr sample) { + const WorkspaceGroup_sptr &correctionsGroup, + const MatrixWorkspace_sptr &sample) { for (auto const &workspace : *correctionsGroup) { auto const correction = boost::dynamic_pointer_cast<MatrixWorkspace>(workspace); @@ -486,8 +488,9 @@ void AbsorptionCorrections::convertSpectrumAxes( } } -void AbsorptionCorrections::convertSpectrumAxes(MatrixWorkspace_sptr correction, - MatrixWorkspace_sptr sample) { +void AbsorptionCorrections::convertSpectrumAxes( + const MatrixWorkspace_sptr &correction, + const MatrixWorkspace_sptr &sample) { if (correction && sample && getEMode(sample) == "Indirect") { try { convertSpectrumAxis(correction, getEFixed(correction)); @@ -523,7 +526,7 @@ void AbsorptionCorrections::getParameterDefaults(QString const &dataName) { } void AbsorptionCorrections::getParameterDefaults( - Instrument_const_sptr instrument) { + const Instrument_const_sptr &instrument) { setBeamWidthValue(instrument, "Workflow.beam-width"); setBeamHeightValue(instrument, "Workflow.beam-height"); setWavelengthsValue(instrument, "Workflow.absorption-wavelengths"); @@ -533,7 +536,7 @@ void AbsorptionCorrections::getParameterDefaults( } void AbsorptionCorrections::setBeamWidthValue( - Instrument_const_sptr instrument, + const Instrument_const_sptr &instrument, std::string const &beamWidthParamName) const { if (instrument->hasParameter(beamWidthParamName)) { auto const beamWidth = QString::fromStdString( @@ -544,7 +547,7 @@ void AbsorptionCorrections::setBeamWidthValue( } void AbsorptionCorrections::setBeamHeightValue( - Instrument_const_sptr instrument, + const Instrument_const_sptr &instrument, std::string const &beamHeightParamName) const { if (instrument->hasParameter(beamHeightParamName)) { auto const beamHeight = QString::fromStdString( @@ -555,7 +558,7 @@ void AbsorptionCorrections::setBeamHeightValue( } void AbsorptionCorrections::setWavelengthsValue( - Instrument_const_sptr instrument, + const Instrument_const_sptr &instrument, std::string const &wavelengthsParamName) const { if (instrument->hasParameter(wavelengthsParamName)) { auto const wavelengths = QString::fromStdString( @@ -566,7 +569,7 @@ void AbsorptionCorrections::setWavelengthsValue( } void AbsorptionCorrections::setEventsValue( - Instrument_const_sptr instrument, + const Instrument_const_sptr &instrument, std::string const &eventsParamName) const { if (instrument->hasParameter(eventsParamName)) { auto const events = QString::fromStdString( @@ -577,7 +580,7 @@ void AbsorptionCorrections::setEventsValue( } void AbsorptionCorrections::setInterpolationValue( - Instrument_const_sptr instrument, + const Instrument_const_sptr &instrument, std::string const &interpolationParamName) const { if (instrument->hasParameter(interpolationParamName)) { auto const interpolation = QString::fromStdString( @@ -589,7 +592,7 @@ void AbsorptionCorrections::setInterpolationValue( } void AbsorptionCorrections::setMaxAttemptsValue( - Instrument_const_sptr instrument, + const Instrument_const_sptr &instrument, std::string const &maxAttemptsParamName) const { if (instrument->hasParameter(maxAttemptsParamName)) { auto const maxScatterAttempts = QString::fromStdString( diff --git a/qt/scientific_interfaces/Indirect/AbsorptionCorrections.h b/qt/scientific_interfaces/Indirect/AbsorptionCorrections.h index fcc0525de27d8e8873c16aef3feb1e2b6487d5a9..fbac43c086653408fbc6a6f412d1879e5745314c 100644 --- a/qt/scientific_interfaces/Indirect/AbsorptionCorrections.h +++ b/qt/scientific_interfaces/Indirect/AbsorptionCorrections.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -51,31 +51,39 @@ private: void setFileExtensionsByName(bool filter) override; void addSaveWorkspace(std::string const &wsName); - void addShapeSpecificSampleOptions(Mantid::API::IAlgorithm_sptr alg, - QString shape); - void addShapeSpecificCanOptions(Mantid::API::IAlgorithm_sptr alg, + void addShapeSpecificSampleOptions(const Mantid::API::IAlgorithm_sptr &alg, + const QString &shape); + void addShapeSpecificCanOptions(const Mantid::API::IAlgorithm_sptr &alg, QString const &shape); void processWavelengthWorkspace(); - void convertSpectrumAxes(Mantid::API::WorkspaceGroup_sptr correctionsWs); - void convertSpectrumAxes(Mantid::API::WorkspaceGroup_sptr correctionsGroup, - Mantid::API::MatrixWorkspace_sptr sample); - void convertSpectrumAxes(Mantid::API::MatrixWorkspace_sptr correction, - Mantid::API::MatrixWorkspace_sptr sample); - - void getParameterDefaults(Mantid::Geometry::Instrument_const_sptr instrument); - void setBeamWidthValue(Mantid::Geometry::Instrument_const_sptr instrument, - std::string const &beamWidthParamName) const; - void setBeamHeightValue(Mantid::Geometry::Instrument_const_sptr instrument, - std::string const &beamHeightParamName) const; - void setWavelengthsValue(Mantid::Geometry::Instrument_const_sptr instrument, - std::string const &wavelengthsParamName) const; - void setEventsValue(Mantid::Geometry::Instrument_const_sptr instrument, + void + convertSpectrumAxes(const Mantid::API::WorkspaceGroup_sptr &correctionsWs); + void + convertSpectrumAxes(const Mantid::API::WorkspaceGroup_sptr &correctionsGroup, + const Mantid::API::MatrixWorkspace_sptr &sample); + void convertSpectrumAxes(const Mantid::API::MatrixWorkspace_sptr &correction, + const Mantid::API::MatrixWorkspace_sptr &sample); + + void getParameterDefaults( + const Mantid::Geometry::Instrument_const_sptr &instrument); + void + setBeamWidthValue(const Mantid::Geometry::Instrument_const_sptr &instrument, + std::string const &beamWidthParamName) const; + void + setBeamHeightValue(const Mantid::Geometry::Instrument_const_sptr &instrument, + std::string const &beamHeightParamName) const; + void + setWavelengthsValue(const Mantid::Geometry::Instrument_const_sptr &instrument, + std::string const &wavelengthsParamName) const; + void setEventsValue(const Mantid::Geometry::Instrument_const_sptr &instrument, std::string const &eventsParamName) const; - void setInterpolationValue(Mantid::Geometry::Instrument_const_sptr instrument, - std::string const &interpolationParamName) const; - void setMaxAttemptsValue(Mantid::Geometry::Instrument_const_sptr instrument, - std::string const &maxAttemptsParamName) const; + void setInterpolationValue( + const Mantid::Geometry::Instrument_const_sptr &instrument, + std::string const &interpolationParamName) const; + void + setMaxAttemptsValue(const Mantid::Geometry::Instrument_const_sptr &instrument, + std::string const &maxAttemptsParamName) const; void setComboBoxOptions(QComboBox *combobox, std::vector<std::string> const &options); diff --git a/qt/scientific_interfaces/Indirect/ApplyAbsorptionCorrections.cpp b/qt/scientific_interfaces/Indirect/ApplyAbsorptionCorrections.cpp index 6783f7a96fc175154ef6d2d4b89e342893a38191..ba1fb9b74c69ddb92c865c6a409b42016a3efc2c 100644 --- a/qt/scientific_interfaces/Indirect/ApplyAbsorptionCorrections.cpp +++ b/qt/scientific_interfaces/Indirect/ApplyAbsorptionCorrections.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "ApplyAbsorptionCorrections.h" #include "IndirectDataValidationHelper.h" @@ -15,6 +15,7 @@ #include "MantidQtWidgets/Common/SignalBlocker.h" #include <QStringList> +#include <utility> using namespace IndirectDataValidationHelper; using namespace Mantid::API; @@ -370,9 +371,9 @@ void ApplyAbsorptionCorrections::run() { * @param toMatch Name of the workspace to match */ void ApplyAbsorptionCorrections::addInterpolationStep( - MatrixWorkspace_sptr toInterpolate, std::string toMatch) { + const MatrixWorkspace_sptr &toInterpolate, std::string toMatch) { API::BatchAlgorithmRunner::AlgorithmRuntimeProps interpolationProps; - interpolationProps["WorkspaceToMatch"] = toMatch; + interpolationProps["WorkspaceToMatch"] = std::move(toMatch); IAlgorithm_sptr interpolationAlg = AlgorithmManager::Instance().create("SplineInterpolation"); diff --git a/qt/scientific_interfaces/Indirect/ApplyAbsorptionCorrections.h b/qt/scientific_interfaces/Indirect/ApplyAbsorptionCorrections.h index 5620aac303976076f6206cac4594b381e47f19a9..13420b73c8f725f4aabcd5452c4bfaaec9617980 100644 --- a/qt/scientific_interfaces/Indirect/ApplyAbsorptionCorrections.h +++ b/qt/scientific_interfaces/Indirect/ApplyAbsorptionCorrections.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -47,8 +47,9 @@ private: void loadSettings(const QSettings &settings) override; void setFileExtensionsByName(bool filter) override; - void addInterpolationStep(Mantid::API::MatrixWorkspace_sptr toInterpolate, - std::string toMatch); + void + addInterpolationStep(const Mantid::API::MatrixWorkspace_sptr &toInterpolate, + std::string toMatch); void plotInPreview(const QString &curveName, Mantid::API::MatrixWorkspace_sptr &ws, const QColor &curveColor); diff --git a/qt/scientific_interfaces/Indirect/CalculatePaalmanPings.cpp b/qt/scientific_interfaces/Indirect/CalculatePaalmanPings.cpp index 498a4d056eb86e587aecd82d00d68adbac99f424..01166a226eb8fbff811ee2bd1e024de55aa9653c 100644 --- a/qt/scientific_interfaces/Indirect/CalculatePaalmanPings.cpp +++ b/qt/scientific_interfaces/Indirect/CalculatePaalmanPings.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "CalculatePaalmanPings.h" #include "MantidAPI/AnalysisDataService.h" @@ -572,7 +572,7 @@ void CalculatePaalmanPings::getBeamWidthFromWorkspace(const QString &wsName) { * boost::none. */ boost::optional<double> CalculatePaalmanPings::getInstrumentParameter( - Mantid::Geometry::Instrument_const_sptr instrument, + const Mantid::Geometry::Instrument_const_sptr &instrument, const std::string ¶meterName) { if (instrument->hasParameter(parameterName)) { @@ -589,8 +589,8 @@ boost::optional<double> CalculatePaalmanPings::getInstrumentParameter( * @param alg Algorithm to set properties of * @param shape Sample shape */ -void CalculatePaalmanPings::addShapeSpecificSampleOptions(IAlgorithm_sptr alg, - QString shape) { +void CalculatePaalmanPings::addShapeSpecificSampleOptions( + const IAlgorithm_sptr &alg, const QString &shape) { if (shape == "FlatPlate") { const auto sampleThickness = m_uiForm.spFlatSampleThickness->value(); alg->setProperty("SampleThickness", sampleThickness); @@ -635,8 +635,8 @@ void CalculatePaalmanPings::addShapeSpecificSampleOptions(IAlgorithm_sptr alg, * @param alg Algorithm to set properties of * @param shape Sample shape */ -void CalculatePaalmanPings::addShapeSpecificCanOptions(IAlgorithm_sptr alg, - QString shape) { +void CalculatePaalmanPings::addShapeSpecificCanOptions( + const IAlgorithm_sptr &alg, const QString &shape) { if (shape == "FlatPlate") { const auto canFrontThickness = m_uiForm.spFlatCanFrontThickness->value(); alg->setProperty("CanFrontThickness", canFrontThickness); diff --git a/qt/scientific_interfaces/Indirect/CalculatePaalmanPings.h b/qt/scientific_interfaces/Indirect/CalculatePaalmanPings.h index c3f51693669d72bd0b4832999b4d335b8ed77c3f..907f9490186b356f75568253b9aaa800f5910f4b 100644 --- a/qt/scientific_interfaces/Indirect/CalculatePaalmanPings.h +++ b/qt/scientific_interfaces/Indirect/CalculatePaalmanPings.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -51,10 +51,10 @@ private: bool doValidation(bool silent = false); - void addShapeSpecificSampleOptions(Mantid::API::IAlgorithm_sptr alg, - QString shape); - void addShapeSpecificCanOptions(Mantid::API::IAlgorithm_sptr alg, - QString shape); + void addShapeSpecificSampleOptions(const Mantid::API::IAlgorithm_sptr &alg, + const QString &shape); + void addShapeSpecificCanOptions(const Mantid::API::IAlgorithm_sptr &alg, + const QString &shape); void setComboBoxOptions(QComboBox *combobox, std::vector<std::string> const &options); @@ -71,9 +71,9 @@ private: void setButtonsEnabled(bool enabled); void setRunIsRunning(bool running); - boost::optional<double> - getInstrumentParameter(Mantid::Geometry::Instrument_const_sptr instrument, - const std::string ¶meterName); + boost::optional<double> getInstrumentParameter( + const Mantid::Geometry::Instrument_const_sptr &instrument, + const std::string ¶meterName); Ui::CalculatePaalmanPings m_uiForm; diff --git a/qt/scientific_interfaces/Indirect/ContainerSubtraction.cpp b/qt/scientific_interfaces/Indirect/ContainerSubtraction.cpp index 8ead5ab162235908371745aeb1dd5f35dcd4c8d1..d917718b4a219895dec728e8bbb3670f01c88d98 100644 --- a/qt/scientific_interfaces/Indirect/ContainerSubtraction.cpp +++ b/qt/scientific_interfaces/Indirect/ContainerSubtraction.cpp @@ -1,10 +1,13 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "ContainerSubtraction.h" + +#include <utility> + #include "MantidQtWidgets/Common/UserInputValidator.h" #include "MantidAPI/Axis.h" @@ -58,12 +61,12 @@ ContainerSubtraction::~ContainerSubtraction() { void ContainerSubtraction::setTransformedContainer( MatrixWorkspace_sptr workspace, const std::string &name) { - m_transformedContainerWS = workspace; + m_transformedContainerWS = std::move(workspace); AnalysisDataService::Instance().addOrReplace(name, m_transformedContainerWS); } void ContainerSubtraction::setTransformedContainer( - MatrixWorkspace_sptr workspace) { + const MatrixWorkspace_sptr &workspace) { m_transformedContainerWS = workspace; AnalysisDataService::Instance().addOrReplace(workspace->getName(), m_transformedContainerWS); @@ -456,46 +459,48 @@ MatrixWorkspace_sptr ContainerSubtraction::requestRebinToSample( } MatrixWorkspace_sptr -ContainerSubtraction::shiftWorkspace(MatrixWorkspace_sptr workspace, +ContainerSubtraction::shiftWorkspace(const MatrixWorkspace_sptr &workspace, double shiftValue) const { - auto shiftAlg = shiftAlgorithm(workspace, shiftValue); + auto shiftAlg = shiftAlgorithm(std::move(workspace), shiftValue); shiftAlg->execute(); return shiftAlg->getProperty("OutputWorkspace"); } MatrixWorkspace_sptr -ContainerSubtraction::scaleWorkspace(MatrixWorkspace_sptr workspace, +ContainerSubtraction::scaleWorkspace(const MatrixWorkspace_sptr &workspace, double scaleValue) const { - auto scaleAlg = scaleAlgorithm(workspace, scaleValue); + auto scaleAlg = scaleAlgorithm(std::move(workspace), scaleValue); scaleAlg->execute(); return scaleAlg->getProperty("OutputWorkspace"); } -MatrixWorkspace_sptr -ContainerSubtraction::minusWorkspace(MatrixWorkspace_sptr lhsWorkspace, - MatrixWorkspace_sptr rhsWorkspace) const { - auto minusAlg = minusAlgorithm(lhsWorkspace, rhsWorkspace); +MatrixWorkspace_sptr ContainerSubtraction::minusWorkspace( + const MatrixWorkspace_sptr &lhsWorkspace, + const MatrixWorkspace_sptr &rhsWorkspace) const { + auto minusAlg = + minusAlgorithm(std::move(lhsWorkspace), std::move(rhsWorkspace)); minusAlg->execute(); return minusAlg->getProperty("OutputWorkspace"); } MatrixWorkspace_sptr ContainerSubtraction::rebinToWorkspace( - MatrixWorkspace_sptr workspaceToRebin, - MatrixWorkspace_sptr workspaceToMatch) const { - auto rebinAlg = rebinToWorkspaceAlgorithm(workspaceToRebin, workspaceToMatch); + const MatrixWorkspace_sptr &workspaceToRebin, + const MatrixWorkspace_sptr &workspaceToMatch) const { + auto rebinAlg = rebinToWorkspaceAlgorithm(std::move(workspaceToRebin), + std::move(workspaceToMatch)); rebinAlg->execute(); return rebinAlg->getProperty("OutputWorkspace"); } -MatrixWorkspace_sptr -ContainerSubtraction::convertToHistogram(MatrixWorkspace_sptr workspace) const { - auto convertAlg = convertToHistogramAlgorithm(workspace); +MatrixWorkspace_sptr ContainerSubtraction::convertToHistogram( + const MatrixWorkspace_sptr &workspace) const { + auto convertAlg = convertToHistogramAlgorithm(std::move(workspace)); convertAlg->execute(); return convertAlg->getProperty("OutputWorkspace"); } IAlgorithm_sptr -ContainerSubtraction::shiftAlgorithm(MatrixWorkspace_sptr workspace, +ContainerSubtraction::shiftAlgorithm(const MatrixWorkspace_sptr &workspace, double shiftValue) const { IAlgorithm_sptr shift = AlgorithmManager::Instance().create("ScaleX"); shift->initialize(); @@ -509,7 +514,7 @@ ContainerSubtraction::shiftAlgorithm(MatrixWorkspace_sptr workspace, } IAlgorithm_sptr -ContainerSubtraction::scaleAlgorithm(MatrixWorkspace_sptr workspace, +ContainerSubtraction::scaleAlgorithm(const MatrixWorkspace_sptr &workspace, double scaleValue) const { IAlgorithm_sptr scale = AlgorithmManager::Instance().create("Scale"); scale->initialize(); @@ -522,9 +527,9 @@ ContainerSubtraction::scaleAlgorithm(MatrixWorkspace_sptr workspace, return scale; } -IAlgorithm_sptr -ContainerSubtraction::minusAlgorithm(MatrixWorkspace_sptr lhsWorkspace, - MatrixWorkspace_sptr rhsWorkspace) const { +IAlgorithm_sptr ContainerSubtraction::minusAlgorithm( + const MatrixWorkspace_sptr &lhsWorkspace, + const MatrixWorkspace_sptr &rhsWorkspace) const { IAlgorithm_sptr minus = AlgorithmManager::Instance().create("Minus"); minus->initialize(); minus->setChild(true); @@ -536,8 +541,8 @@ ContainerSubtraction::minusAlgorithm(MatrixWorkspace_sptr lhsWorkspace, } IAlgorithm_sptr ContainerSubtraction::rebinToWorkspaceAlgorithm( - MatrixWorkspace_sptr workspaceToRebin, - MatrixWorkspace_sptr workspaceToMatch) const { + const MatrixWorkspace_sptr &workspaceToRebin, + const MatrixWorkspace_sptr &workspaceToMatch) const { IAlgorithm_sptr rebin = AlgorithmManager::Instance().create("RebinToWorkspace"); rebin->initialize(); @@ -550,7 +555,7 @@ IAlgorithm_sptr ContainerSubtraction::rebinToWorkspaceAlgorithm( } IAlgorithm_sptr ContainerSubtraction::convertToHistogramAlgorithm( - MatrixWorkspace_sptr workspace) const { + const MatrixWorkspace_sptr &workspace) const { IAlgorithm_sptr convert = AlgorithmManager::Instance().create("ConvertToHistogram"); convert->initialize(); @@ -562,7 +567,7 @@ IAlgorithm_sptr ContainerSubtraction::convertToHistogramAlgorithm( } IAlgorithm_sptr ContainerSubtraction::addSampleLogAlgorithm( - MatrixWorkspace_sptr workspace, const std::string &name, + const MatrixWorkspace_sptr &workspace, const std::string &name, const std::string &type, const std::string &value) const { IAlgorithm_sptr shiftLog = AlgorithmManager::Instance().create("AddSampleLog"); diff --git a/qt/scientific_interfaces/Indirect/ContainerSubtraction.h b/qt/scientific_interfaces/Indirect/ContainerSubtraction.h index 5a7bf0a8dd621fe0df7e81d0c7d257a0c6d0e59e..2821e893d53ae4ff586185779b11eaf14e5143ba 100644 --- a/qt/scientific_interfaces/Indirect/ContainerSubtraction.h +++ b/qt/scientific_interfaces/Indirect/ContainerSubtraction.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -20,7 +20,8 @@ public: void setTransformedContainer(Mantid::API::MatrixWorkspace_sptr workspace, const std::string &name); - void setTransformedContainer(Mantid::API::MatrixWorkspace_sptr workspace); + void + setTransformedContainer(const Mantid::API::MatrixWorkspace_sptr &workspace); private slots: /// Handles a new sample being loaded @@ -57,36 +58,36 @@ private: requestRebinToSample(Mantid::API::MatrixWorkspace_sptr workspace) const; Mantid::API::MatrixWorkspace_sptr - shiftWorkspace(Mantid::API::MatrixWorkspace_sptr workspace, + shiftWorkspace(const Mantid::API::MatrixWorkspace_sptr &workspace, double shiftValue) const; Mantid::API::MatrixWorkspace_sptr - scaleWorkspace(Mantid::API::MatrixWorkspace_sptr workspace, + scaleWorkspace(const Mantid::API::MatrixWorkspace_sptr &workspace, double scaleValue) const; Mantid::API::MatrixWorkspace_sptr - minusWorkspace(Mantid::API::MatrixWorkspace_sptr lhsWorkspace, - Mantid::API::MatrixWorkspace_sptr rhsWorkspace) const; + minusWorkspace(const Mantid::API::MatrixWorkspace_sptr &lhsWorkspace, + const Mantid::API::MatrixWorkspace_sptr &rhsWorkspace) const; + Mantid::API::MatrixWorkspace_sptr rebinToWorkspace( + const Mantid::API::MatrixWorkspace_sptr &workspaceToRebin, + const Mantid::API::MatrixWorkspace_sptr &workspaceToMatch) const; Mantid::API::MatrixWorkspace_sptr - rebinToWorkspace(Mantid::API::MatrixWorkspace_sptr workspaceToRebin, - Mantid::API::MatrixWorkspace_sptr workspaceToMatch) const; - Mantid::API::MatrixWorkspace_sptr - convertToHistogram(Mantid::API::MatrixWorkspace_sptr workspace) const; + convertToHistogram(const Mantid::API::MatrixWorkspace_sptr &workspace) const; Mantid::API::IAlgorithm_sptr - shiftAlgorithm(Mantid::API::MatrixWorkspace_sptr workspace, + shiftAlgorithm(const Mantid::API::MatrixWorkspace_sptr &workspace, double shiftValue) const; Mantid::API::IAlgorithm_sptr - scaleAlgorithm(Mantid::API::MatrixWorkspace_sptr workspace, + scaleAlgorithm(const Mantid::API::MatrixWorkspace_sptr &workspace, double scaleValue) const; Mantid::API::IAlgorithm_sptr - minusAlgorithm(Mantid::API::MatrixWorkspace_sptr lhsWorkspace, - Mantid::API::MatrixWorkspace_sptr rhsWorkspace) const; + minusAlgorithm(const Mantid::API::MatrixWorkspace_sptr &lhsWorkspace, + const Mantid::API::MatrixWorkspace_sptr &rhsWorkspace) const; Mantid::API::IAlgorithm_sptr rebinToWorkspaceAlgorithm( - Mantid::API::MatrixWorkspace_sptr workspaceToRebin, - Mantid::API::MatrixWorkspace_sptr workspaceToMatch) const; + const Mantid::API::MatrixWorkspace_sptr &workspaceToRebin, + const Mantid::API::MatrixWorkspace_sptr &workspaceToMatch) const; Mantid::API::IAlgorithm_sptr convertToHistogramAlgorithm( - Mantid::API::MatrixWorkspace_sptr workspace) const; + const Mantid::API::MatrixWorkspace_sptr &workspace) const; Mantid::API::IAlgorithm_sptr - addSampleLogAlgorithm(Mantid::API::MatrixWorkspace_sptr workspace, + addSampleLogAlgorithm(const Mantid::API::MatrixWorkspace_sptr &workspace, const std::string &name, const std::string &type, const std::string &value) const; diff --git a/qt/scientific_interfaces/Indirect/ConvFit.cpp b/qt/scientific_interfaces/Indirect/ConvFit.cpp index be45bef0b42569be169aadc9faeef25991071de4..029ff6302b6a6a2e15a1942cc2f67ca93d9d3230 100644 --- a/qt/scientific_interfaces/Indirect/ConvFit.cpp +++ b/qt/scientific_interfaces/Indirect/ConvFit.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "ConvFit.h" #include "ConvFitDataPresenter.h" diff --git a/qt/scientific_interfaces/Indirect/ConvFit.h b/qt/scientific_interfaces/Indirect/ConvFit.h index e44f566f109b127e0b61e41e65c1a735e6cc72c1..e51a05cb8aae2141c550a5d1b60e42d8768473ee 100644 --- a/qt/scientific_interfaces/Indirect/ConvFit.h +++ b/qt/scientific_interfaces/Indirect/ConvFit.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Indirect/ConvFitAddWorkspaceDialog.cpp b/qt/scientific_interfaces/Indirect/ConvFitAddWorkspaceDialog.cpp index bb03048de8ae932acfe67bd56e8e9f03cde50bf2..16f7e273429bb9e9b99131919624fb0c48b21895 100644 --- a/qt/scientific_interfaces/Indirect/ConvFitAddWorkspaceDialog.cpp +++ b/qt/scientific_interfaces/Indirect/ConvFitAddWorkspaceDialog.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "ConvFitAddWorkspaceDialog.h" @@ -11,6 +11,7 @@ #include "MantidQtWidgets/Common/SignalBlocker.h" #include <boost/optional.hpp> +#include <utility> namespace { using namespace Mantid::API; @@ -27,7 +28,8 @@ bool validWorkspace(std::string const &name) { return !name.empty() && doesExistInADS(name); } -boost::optional<std::size_t> maximumIndex(MatrixWorkspace_sptr workspace) { +boost::optional<std::size_t> +maximumIndex(const MatrixWorkspace_sptr &workspace) { if (workspace) { const auto numberOfHistograms = workspace->getNumberHistograms(); if (numberOfHistograms > 0) @@ -36,8 +38,8 @@ boost::optional<std::size_t> maximumIndex(MatrixWorkspace_sptr workspace) { return boost::none; } -QString getIndexString(MatrixWorkspace_sptr workspace) { - const auto maximum = maximumIndex(workspace); +QString getIndexString(const MatrixWorkspace_sptr &workspace) { + const auto maximum = maximumIndex(std::move(workspace)); if (maximum) return QString("0-%1").arg(*maximum); return ""; diff --git a/qt/scientific_interfaces/Indirect/ConvFitAddWorkspaceDialog.h b/qt/scientific_interfaces/Indirect/ConvFitAddWorkspaceDialog.h index 116da678ef587e5ba51c42b5827f1649bcbacfe9..86a3364780d924cf471c61f3fd69c817b1d14260 100644 --- a/qt/scientific_interfaces/Indirect/ConvFitAddWorkspaceDialog.h +++ b/qt/scientific_interfaces/Indirect/ConvFitAddWorkspaceDialog.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Indirect/ConvFitDataPresenter.cpp b/qt/scientific_interfaces/Indirect/ConvFitDataPresenter.cpp index ebed3855222a6f7838e0f5a16087ecd0135c89db..bb4060b5def8916c8cdc1a9b151d080f04993b6c 100644 --- a/qt/scientific_interfaces/Indirect/ConvFitDataPresenter.cpp +++ b/qt/scientific_interfaces/Indirect/ConvFitDataPresenter.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "ConvFitDataPresenter.h" #include "ConvFitAddWorkspaceDialog.h" diff --git a/qt/scientific_interfaces/Indirect/ConvFitDataPresenter.h b/qt/scientific_interfaces/Indirect/ConvFitDataPresenter.h index 225f23edc62a8efa8197621ed11968adc854dff7..253608a3c334e9583cb5dce2addde166cf328aa4 100644 --- a/qt/scientific_interfaces/Indirect/ConvFitDataPresenter.h +++ b/qt/scientific_interfaces/Indirect/ConvFitDataPresenter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Indirect/ConvFitDataTablePresenter.cpp b/qt/scientific_interfaces/Indirect/ConvFitDataTablePresenter.cpp index 3a4e3cf7612317959f2917fb8457a1995cbb17e0..8d091bb4b7480aded127f361be8af48eb0017467 100644 --- a/qt/scientific_interfaces/Indirect/ConvFitDataTablePresenter.cpp +++ b/qt/scientific_interfaces/Indirect/ConvFitDataTablePresenter.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "ConvFitDataTablePresenter.h" diff --git a/qt/scientific_interfaces/Indirect/ConvFitDataTablePresenter.h b/qt/scientific_interfaces/Indirect/ConvFitDataTablePresenter.h index 7a2d92aaa814b2b613015c408c8a0a9ef007f5b9..5432612ab612e99c9eb7080971d0a5fedbd92b35 100644 --- a/qt/scientific_interfaces/Indirect/ConvFitDataTablePresenter.h +++ b/qt/scientific_interfaces/Indirect/ConvFitDataTablePresenter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Indirect/ConvFitModel.cpp b/qt/scientific_interfaces/Indirect/ConvFitModel.cpp index b6e1e616377941317ce00bea4b4c34fd9eaa8aaa..8e2af45fa01a33eca3b490fd30e69a91c766ac53 100644 --- a/qt/scientific_interfaces/Indirect/ConvFitModel.cpp +++ b/qt/scientific_interfaces/Indirect/ConvFitModel.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "ConvFitModel.h" @@ -14,6 +14,7 @@ #include <boost/algorithm/string/join.hpp> #include <stdexcept> +#include <utility> using namespace Mantid::API; @@ -38,7 +39,7 @@ IAlgorithm_sptr loadParameterFileAlgorithm(std::string const &workspaceName, } void readAnalyserFromFile(const std::string &analyser, - MatrixWorkspace_sptr workspace) { + const MatrixWorkspace_sptr &workspace) { auto const instrument = workspace->getInstrument(); auto const idfDirectory = Mantid::Kernel::ConfigService::Instance().getString( "instrumentDefinition.directory"); @@ -57,7 +58,7 @@ void readAnalyserFromFile(const std::string &analyser, } Mantid::Geometry::IComponent_const_sptr -getAnalyser(MatrixWorkspace_sptr workspace) { +getAnalyser(const MatrixWorkspace_sptr &workspace) { auto const instrument = workspace->getInstrument(); auto const analysers = instrument->getStringParameter("analyser"); @@ -79,7 +80,8 @@ getAnalyser(MatrixWorkspace_sptr workspace) { return instrument->getComponentByName(analysers[0]); } -boost::optional<double> instrumentResolution(MatrixWorkspace_sptr workspace) { +boost::optional<double> +instrumentResolution(const MatrixWorkspace_sptr &workspace) { try { auto const analyser = getAnalyser(workspace); if (analyser && analyser->hasParameter("resolution")) @@ -101,7 +103,7 @@ boost::optional<double> instrumentResolution(MatrixWorkspace_sptr workspace) { } } -MatrixWorkspace_sptr cloneWorkspace(MatrixWorkspace_sptr inputWS, +MatrixWorkspace_sptr cloneWorkspace(const MatrixWorkspace_sptr &inputWS, std::string const &outputName) { auto cloneAlg = AlgorithmManager::Instance().create("CloneWorkspace"); cloneAlg->setLogging(false); @@ -112,8 +114,8 @@ MatrixWorkspace_sptr cloneWorkspace(MatrixWorkspace_sptr inputWS, return getADSMatrixWorkspace(outputName); } -MatrixWorkspace_sptr appendWorkspace(MatrixWorkspace_sptr leftWS, - MatrixWorkspace_sptr rightWS, +MatrixWorkspace_sptr appendWorkspace(const MatrixWorkspace_sptr &leftWS, + const MatrixWorkspace_sptr &rightWS, int numHistograms, std::string const &outputName) { auto appendAlg = AlgorithmManager::Instance().create("AppendSpectra"); @@ -144,7 +146,7 @@ void deleteWorkspace(std::string const &workspaceName) { deleter->execute(); } -void extendResolutionWorkspace(MatrixWorkspace_sptr resolution, +void extendResolutionWorkspace(const MatrixWorkspace_sptr &resolution, std::size_t numberOfHistograms, std::string const &outputName) { const auto resolutionNumHist = resolution->getNumberHistograms(); @@ -257,7 +259,7 @@ constructParameterNameChanges(const IFunction &model, } } -IAlgorithm_sptr addSampleLogAlgorithm(Workspace_sptr workspace, +IAlgorithm_sptr addSampleLogAlgorithm(const Workspace_sptr &workspace, const std::string &name, const std::string &text, const std::string &type) { @@ -273,7 +275,8 @@ IAlgorithm_sptr addSampleLogAlgorithm(Workspace_sptr workspace, struct AddSampleLogRunner { AddSampleLogRunner(Workspace_sptr resultWorkspace, WorkspaceGroup_sptr resultGroup) - : m_resultWorkspace(resultWorkspace), m_resultGroup(resultGroup) {} + : m_resultWorkspace(std::move(resultWorkspace)), + m_resultGroup(std::move(resultGroup)) {} void operator()(const std::string &name, const std::string &text, const std::string &type) { @@ -291,15 +294,15 @@ getNames(const MantidQt::CustomInterfaces::IDA::ResolutionCollectionType &workspaces) { std::vector<std::string> names; names.reserve(workspaces.size().value); - std::transform(workspaces.begin(), workspaces.end(), - std::back_inserter(names), - [](boost::weak_ptr<Mantid::API::MatrixWorkspace> workspace) { - return workspace.lock()->getName(); - }); + std::transform( + workspaces.begin(), workspaces.end(), std::back_inserter(names), + [](const boost::weak_ptr<Mantid::API::MatrixWorkspace> &workspace) { + return workspace.lock()->getName(); + }); return names; } -void setResolutionAttribute(CompositeFunction_sptr convolutionModel, +void setResolutionAttribute(const CompositeFunction_sptr &convolutionModel, const IFunction::Attribute &attr) { if (convolutionModel->name() == "Convolution") convolutionModel->getFunction(0)->setAttribute("Workspace", attr); @@ -425,7 +428,7 @@ void ConvFitModel::setResolution(const std::string &name, throw std::runtime_error("A valid resolution file needs to be selected."); } -void ConvFitModel::setResolution(MatrixWorkspace_sptr resolution, +void ConvFitModel::setResolution(const MatrixWorkspace_sptr &resolution, TableDatasetIndex index) { if (m_resolution.size() > index) m_resolution[index] = resolution; @@ -556,7 +559,7 @@ void ConvFitModel::addOutput(IndirectFitOutput *fitOutput, void ConvFitModel::setParameterNameChanges( const IFunction &model, boost::optional<std::size_t> backgroundIndex) { m_parameterNameChanges = constructParameterNameChanges( - model, backgroundIndex, m_temperature.is_initialized()); + model, std::move(backgroundIndex), m_temperature.is_initialized()); } std::vector<std::pair<std::string, int>> diff --git a/qt/scientific_interfaces/Indirect/ConvFitModel.h b/qt/scientific_interfaces/Indirect/ConvFitModel.h index 9aff87a8d77d324a00d9c7c82aac6d55d3cec986..c1e01b72876984760f4fbf97d7c8c7c81b1944ef 100644 --- a/qt/scientific_interfaces/Indirect/ConvFitModel.h +++ b/qt/scientific_interfaces/Indirect/ConvFitModel.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -41,7 +41,7 @@ public: const Spectra &spectra) override; void removeWorkspace(TableDatasetIndex index) override; void setResolution(const std::string &name, TableDatasetIndex index); - void setResolution(Mantid::API::MatrixWorkspace_sptr resolution, + void setResolution(const Mantid::API::MatrixWorkspace_sptr &resolution, TableDatasetIndex index); void setFitTypeString(const std::string &fitType); diff --git a/qt/scientific_interfaces/Indirect/CorrectionsTab.cpp b/qt/scientific_interfaces/Indirect/CorrectionsTab.cpp index 034a04b0c56bb67d7f80da27a7f65aafd0cedf6f..4e0918d4721826aa247bf0c2faa7dffb9aae52d6 100644 --- a/qt/scientific_interfaces/Indirect/CorrectionsTab.cpp +++ b/qt/scientific_interfaces/Indirect/CorrectionsTab.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "CorrectionsTab.h" #include "MantidAPI/MatrixWorkspace.h" @@ -74,7 +74,8 @@ void CorrectionsTab::inputChanged() { validate(); } * @throws std::runtime_error if one of the workspaces is an invalid pointer */ bool CorrectionsTab::checkWorkspaceBinningMatches( - MatrixWorkspace_const_sptr left, MatrixWorkspace_const_sptr right) { + const MatrixWorkspace_const_sptr &left, + const MatrixWorkspace_const_sptr &right) { if (left && right) // check the workspaces actually point to something first { const auto &leftX = left->x(0); @@ -100,7 +101,7 @@ bool CorrectionsTab::checkWorkspaceBinningMatches( * @return Name of output workspace */ boost::optional<std::string> CorrectionsTab::addConvertUnitsStep( - MatrixWorkspace_sptr ws, std::string const &unitID, + const MatrixWorkspace_sptr &ws, std::string const &unitID, std::string const &suffix, std::string eMode, double eFixed) { std::string outputName = ws->getName(); diff --git a/qt/scientific_interfaces/Indirect/CorrectionsTab.h b/qt/scientific_interfaces/Indirect/CorrectionsTab.h index 515b7d99df21ca2906c4e01012ab0586a61ba17c..665934445bcc4a3edcbe1dd214e93006743fd849 100644 --- a/qt/scientific_interfaces/Indirect/CorrectionsTab.h +++ b/qt/scientific_interfaces/Indirect/CorrectionsTab.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -84,12 +84,12 @@ public: protected: /// Check the binning between two workspaces match - bool - checkWorkspaceBinningMatches(Mantid::API::MatrixWorkspace_const_sptr left, - Mantid::API::MatrixWorkspace_const_sptr right); + bool checkWorkspaceBinningMatches( + const Mantid::API::MatrixWorkspace_const_sptr &left, + const Mantid::API::MatrixWorkspace_const_sptr &right); /// Adds a unit conversion step to the algorithm queue boost::optional<std::string> - addConvertUnitsStep(Mantid::API::MatrixWorkspace_sptr ws, + addConvertUnitsStep(const Mantid::API::MatrixWorkspace_sptr &ws, const std::string &unitID, const std::string &suffix = "UNIT", std::string eMode = "", double eFixed = 0.0); diff --git a/qt/scientific_interfaces/Indirect/DensityOfStates.cpp b/qt/scientific_interfaces/Indirect/DensityOfStates.cpp index ea360ae855e325982d1bb7f7a5f6618b1edcfe8e..fd27367d731d2b95507f817ed6580ef456577c50 100644 --- a/qt/scientific_interfaces/Indirect/DensityOfStates.cpp +++ b/qt/scientific_interfaces/Indirect/DensityOfStates.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "DensityOfStates.h" diff --git a/qt/scientific_interfaces/Indirect/DensityOfStates.h b/qt/scientific_interfaces/Indirect/DensityOfStates.h index 1127b605114ff6e7598a6ed675e9acd711c4980d..9a5f76775c9b31f3b1a1a28a714ee95263ee089f 100644 --- a/qt/scientific_interfaces/Indirect/DensityOfStates.h +++ b/qt/scientific_interfaces/Indirect/DensityOfStates.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Indirect/DllConfig.h b/qt/scientific_interfaces/Indirect/DllConfig.h index 33d1735629a4e23d124c8477b59693816e3ba368..af6c82505ae8701d3f5e49ede2fadf270f55a003 100644 --- a/qt/scientific_interfaces/Indirect/DllConfig.h +++ b/qt/scientific_interfaces/Indirect/DllConfig.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Indirect/Elwin.cpp b/qt/scientific_interfaces/Indirect/Elwin.cpp index 3f15183434da2ba23ced80f6ce8126c75a2341e2..93bece3aef0dadd4e4e24ea08a49bf518b33fd79 100644 --- a/qt/scientific_interfaces/Indirect/Elwin.cpp +++ b/qt/scientific_interfaces/Indirect/Elwin.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "Elwin.h" #include "MantidQtWidgets/Common/UserInputValidator.h" @@ -384,8 +384,9 @@ void Elwin::setFileExtensionsByName(bool filter) { : getExtensions(tabName)); } -void Elwin::setDefaultResolution(Mantid::API::MatrixWorkspace_const_sptr ws, - const QPair<double, double> &range) { +void Elwin::setDefaultResolution( + const Mantid::API::MatrixWorkspace_const_sptr &ws, + const QPair<double, double> &range) { auto inst = ws->getInstrument(); auto analyser = inst->getStringParameter("analyser"); @@ -414,7 +415,8 @@ void Elwin::setDefaultResolution(Mantid::API::MatrixWorkspace_const_sptr ws, } } -void Elwin::setDefaultSampleLog(Mantid::API::MatrixWorkspace_const_sptr ws) { +void Elwin::setDefaultSampleLog( + const Mantid::API::MatrixWorkspace_const_sptr &ws) { auto inst = ws->getInstrument(); // Set sample environment log name auto log = inst->getStringParameter("Workflow.SE-log"); diff --git a/qt/scientific_interfaces/Indirect/Elwin.h b/qt/scientific_interfaces/Indirect/Elwin.h index d4e4367139d20292f5fa7c53d805f35dda3d006c..40a87b96c83f3d9eab47a06b5b10efe91b7d1cab 100644 --- a/qt/scientific_interfaces/Indirect/Elwin.h +++ b/qt/scientific_interfaces/Indirect/Elwin.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -40,9 +40,9 @@ private: void loadSettings(const QSettings &settings) override; void setFileExtensionsByName(bool filter) override; void setBrowserWorkspace() override{}; - void setDefaultResolution(Mantid::API::MatrixWorkspace_const_sptr ws, + void setDefaultResolution(const Mantid::API::MatrixWorkspace_const_sptr &ws, const QPair<double, double> &range); - void setDefaultSampleLog(Mantid::API::MatrixWorkspace_const_sptr ws); + void setDefaultSampleLog(const Mantid::API::MatrixWorkspace_const_sptr &ws); void checkForELTWorkspace(); diff --git a/qt/scientific_interfaces/Indirect/FunctionTemplateBrowser.cpp b/qt/scientific_interfaces/Indirect/FunctionTemplateBrowser.cpp index ee9cd78fbdb161a7adfc8dd67bbcf0e54921260d..2b8f7eb337ab5f9a4a77907d64f105df97dd0f73 100644 --- a/qt/scientific_interfaces/Indirect/FunctionTemplateBrowser.cpp +++ b/qt/scientific_interfaces/Indirect/FunctionTemplateBrowser.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "FunctionTemplateBrowser.h" diff --git a/qt/scientific_interfaces/Indirect/FunctionTemplateBrowser.h b/qt/scientific_interfaces/Indirect/FunctionTemplateBrowser.h index b2fe43fde3595f622bb1d4bf7df4f452185fbc4a..b6da42af095451b1f185f7a6602e805fbed51e05 100644 --- a/qt/scientific_interfaces/Indirect/FunctionTemplateBrowser.h +++ b/qt/scientific_interfaces/Indirect/FunctionTemplateBrowser.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Indirect/IAddWorkspaceDialog.h b/qt/scientific_interfaces/Indirect/IAddWorkspaceDialog.h index b921e5faeba64bdfdb251080f49218af0c17f137..b1f5e5bd14e46e13244b82e54fa303b85716afbd 100644 --- a/qt/scientific_interfaces/Indirect/IAddWorkspaceDialog.h +++ b/qt/scientific_interfaces/Indirect/IAddWorkspaceDialog.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Indirect/IFQFitObserver.h b/qt/scientific_interfaces/Indirect/IFQFitObserver.h index 31b6ead9b998870d66751697d4f6a6e0ecd4cac2..25ea5731e0af0e0e02a1dcbef50f185bba7203d3 100644 --- a/qt/scientific_interfaces/Indirect/IFQFitObserver.h +++ b/qt/scientific_interfaces/Indirect/IFQFitObserver.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Indirect/IIndirectFitDataView.h b/qt/scientific_interfaces/Indirect/IIndirectFitDataView.h index 68fb854f1111d5937cfa3b2ba89dd7f04cef5450..2d9bc2cb77dd3ff3175fa832c8b9dcde3e27acb6 100644 --- a/qt/scientific_interfaces/Indirect/IIndirectFitDataView.h +++ b/qt/scientific_interfaces/Indirect/IIndirectFitDataView.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Indirect/IIndirectFitDataViewLegacy.h b/qt/scientific_interfaces/Indirect/IIndirectFitDataViewLegacy.h index b2e84d91c5894fd01a2e2f4bf264853825eee70c..48724c922a363920ba4f794eeb1f5b8ffb42424b 100644 --- a/qt/scientific_interfaces/Indirect/IIndirectFitDataViewLegacy.h +++ b/qt/scientific_interfaces/Indirect/IIndirectFitDataViewLegacy.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Indirect/IIndirectFitOutputOptionsModel.h b/qt/scientific_interfaces/Indirect/IIndirectFitOutputOptionsModel.h index 0cbddc6073c0b3a319308efab9028ad965759f1d..b80f6537e97554e4b8ce20f765bc3d1965b6ec80 100644 --- a/qt/scientific_interfaces/Indirect/IIndirectFitOutputOptionsModel.h +++ b/qt/scientific_interfaces/Indirect/IIndirectFitOutputOptionsModel.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Indirect/IIndirectFitOutputOptionsView.h b/qt/scientific_interfaces/Indirect/IIndirectFitOutputOptionsView.h index fd06d8bfa5ace865080099829570a95a67c15392..afdfbbcac4f3c98e82da81f21d6be4cbcde0bb52 100644 --- a/qt/scientific_interfaces/Indirect/IIndirectFitOutputOptionsView.h +++ b/qt/scientific_interfaces/Indirect/IIndirectFitOutputOptionsView.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Indirect/IIndirectFitPlotView.h b/qt/scientific_interfaces/Indirect/IIndirectFitPlotView.h index 7058829a627bead9bb36e256e990a431cac738c3..8cb5ad7f1c558d565ca7b72ae447939051c9eb1f 100644 --- a/qt/scientific_interfaces/Indirect/IIndirectFitPlotView.h +++ b/qt/scientific_interfaces/Indirect/IIndirectFitPlotView.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Indirect/IIndirectFitPlotViewLegacy.h b/qt/scientific_interfaces/Indirect/IIndirectFitPlotViewLegacy.h index fa91636c7dbbc028bb63992086813ea772f5d3ec..6532dbcfd3200c22e5c295611f66db27f0668b19 100644 --- a/qt/scientific_interfaces/Indirect/IIndirectFitPlotViewLegacy.h +++ b/qt/scientific_interfaces/Indirect/IIndirectFitPlotViewLegacy.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Indirect/IIndirectSettingsView.h b/qt/scientific_interfaces/Indirect/IIndirectSettingsView.h index 586a2f7880424934d2b4534d2744d51f71e9e4dd..2db48807999e4e13eda8f19e7701b5345c3afb33 100644 --- a/qt/scientific_interfaces/Indirect/IIndirectSettingsView.h +++ b/qt/scientific_interfaces/Indirect/IIndirectSettingsView.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Indirect/ILLEnergyTransfer.cpp b/qt/scientific_interfaces/Indirect/ILLEnergyTransfer.cpp index c10fc7cb587cf918449224e97283937435fb86bc..6da405dd977e1510631c9656e1c4cb393a9ec467 100644 --- a/qt/scientific_interfaces/Indirect/ILLEnergyTransfer.cpp +++ b/qt/scientific_interfaces/Indirect/ILLEnergyTransfer.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "ILLEnergyTransfer.h" @@ -386,8 +386,8 @@ void ILLEnergyTransfer::setRunEnabled(bool enabled) { void ILLEnergyTransfer::updateRunButton(bool enabled, std::string const &enableOutputButtons, - QString const message, - QString const tooltip) { + QString const &message, + QString const &tooltip) { UNUSED_ARG(enableOutputButtons); setRunEnabled(enabled); m_uiForm.pbRun->setText(message); diff --git a/qt/scientific_interfaces/Indirect/ILLEnergyTransfer.h b/qt/scientific_interfaces/Indirect/ILLEnergyTransfer.h index fec4a9b7f4c4b7b85834ae40b9e91fbeea66cc7a..3ac3e459575fa4b99278b0d04455f98dbd702b94 100644 --- a/qt/scientific_interfaces/Indirect/ILLEnergyTransfer.h +++ b/qt/scientific_interfaces/Indirect/ILLEnergyTransfer.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -39,8 +39,8 @@ private slots: void setRunEnabled(bool enabled); void updateRunButton(bool enabled = true, std::string const &enableOutputButtons = "unchanged", - QString const message = "Run", - QString const tooltip = ""); + QString const &message = "Run", + QString const &tooltip = ""); private: Ui::ILLEnergyTransfer m_uiForm; diff --git a/qt/scientific_interfaces/Indirect/IPythonRunner.h b/qt/scientific_interfaces/Indirect/IPythonRunner.h index 85915307d69a69e52e31d8d10e9970f479e343c9..b81e4290e3d703dc7de06cc8ddc5f756d5565d49 100644 --- a/qt/scientific_interfaces/Indirect/IPythonRunner.h +++ b/qt/scientific_interfaces/Indirect/IPythonRunner.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Indirect/ISISCalibration.cpp b/qt/scientific_interfaces/Indirect/ISISCalibration.cpp index 026c1984cf55d95dc6036e2e4909f249778c4836..fb906d2b395162ec0dc1a1e4f23e974fe4c09d92 100644 --- a/qt/scientific_interfaces/Indirect/ISISCalibration.cpp +++ b/qt/scientific_interfaces/Indirect/ISISCalibration.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "ISISCalibration.h" @@ -522,7 +522,8 @@ void ISISCalibration::calPlotEnergy() { * * @param ws :: Mantid workspace containing the loaded instrument */ -void ISISCalibration::calSetDefaultResolution(MatrixWorkspace_const_sptr ws) { +void ISISCalibration::calSetDefaultResolution( + const MatrixWorkspace_const_sptr &ws) { auto inst = ws->getInstrument(); auto analyser = inst->getStringParameter("analyser"); @@ -816,8 +817,8 @@ void ISISCalibration::setSaveEnabled(bool enabled) { void ISISCalibration::updateRunButton(bool enabled, std::string const &enableOutputButtons, - QString const message, - QString const tooltip) { + QString const &message, + QString const &tooltip) { setRunEnabled(enabled); m_uiForm.pbRun->setText(message); m_uiForm.pbRun->setToolTip(tooltip); diff --git a/qt/scientific_interfaces/Indirect/ISISCalibration.h b/qt/scientific_interfaces/Indirect/ISISCalibration.h index 635528f06a89848168391b1b397a7d6ff38410f5..1aa3634d6c230ccc5d8b8db5595b045aa0cd9680 100644 --- a/qt/scientific_interfaces/Indirect/ISISCalibration.h +++ b/qt/scientific_interfaces/Indirect/ISISCalibration.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -56,7 +56,8 @@ private slots: void calMinChanged(double /*val*/); void calMaxChanged(double /*val*/); void calUpdateRS(QtProperty * /*prop*/, double /*val*/); - void calSetDefaultResolution(Mantid::API::MatrixWorkspace_const_sptr ws); + void + calSetDefaultResolution(const Mantid::API::MatrixWorkspace_const_sptr &ws); void resCheck(bool state); ///< handles checking/unchecking of "Create RES /// File" checkbox void setDefaultInstDetails(); @@ -73,8 +74,8 @@ private slots: void setSaveEnabled(bool enabled); void updateRunButton(bool enabled = true, std::string const &enableOutputButtons = "unchanged", - QString const message = "Run", - QString const tooltip = ""); + QString const &message = "Run", + QString const &tooltip = ""); private: void setDefaultInstDetails(QMap<QString, QString> const &instrumentDetails); diff --git a/qt/scientific_interfaces/Indirect/ISISDiagnostics.cpp b/qt/scientific_interfaces/Indirect/ISISDiagnostics.cpp index 4949e60d550508b4da7a765564bc8bf44db4618f..df670758704a45bc0565008083b6efd6e99c69b8 100644 --- a/qt/scientific_interfaces/Indirect/ISISDiagnostics.cpp +++ b/qt/scientific_interfaces/Indirect/ISISDiagnostics.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "ISISDiagnostics.h" @@ -561,8 +561,8 @@ void ISISDiagnostics::setSaveEnabled(bool enabled) { void ISISDiagnostics::updateRunButton(bool enabled, std::string const &enableOutputButtons, - QString const message, - QString const tooltip) { + QString const &message, + QString const &tooltip) { setRunEnabled(enabled); m_uiForm.pbRun->setText(message); m_uiForm.pbRun->setToolTip(tooltip); diff --git a/qt/scientific_interfaces/Indirect/ISISDiagnostics.h b/qt/scientific_interfaces/Indirect/ISISDiagnostics.h index 37cb9b33f7f84e7528ae5cacd1fbfd7a0c0ba9a9..05cb96df8ed99bc7dfe682761f2bb765eeae3621 100644 --- a/qt/scientific_interfaces/Indirect/ISISDiagnostics.h +++ b/qt/scientific_interfaces/Indirect/ISISDiagnostics.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -69,8 +69,8 @@ private slots: void setSaveEnabled(bool enabled); void updateRunButton(bool enabled = true, std::string const &enableOutputButtons = "unchanged", - QString const message = "Run", - QString const tooltip = ""); + QString const &message = "Run", + QString const &tooltip = ""); private: void setDefaultInstDetails(QMap<QString, QString> const &instrumentDetails); diff --git a/qt/scientific_interfaces/Indirect/ISISEnergyTransfer.cpp b/qt/scientific_interfaces/Indirect/ISISEnergyTransfer.cpp index ea82eced6a3a05a02caeca3e572a485b2df3f6ab..71bf58cb7d69dec92a7507df1729b400e167c591 100644 --- a/qt/scientific_interfaces/Indirect/ISISEnergyTransfer.cpp +++ b/qt/scientific_interfaces/Indirect/ISISEnergyTransfer.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "ISISEnergyTransfer.h" #include "IndirectDataValidationHelper.h" @@ -115,7 +115,7 @@ void deleteWorkspace(std::string const &name) { deleter->execute(); } -double getSampleLog(MatrixWorkspace_const_sptr workspace, +double getSampleLog(const MatrixWorkspace_const_sptr &workspace, std::string const &logName, double const &defaultValue) { try { return workspace->getLogAsSingleValue(logName); @@ -124,7 +124,7 @@ double getSampleLog(MatrixWorkspace_const_sptr workspace, } } -double getSampleLog(MatrixWorkspace_const_sptr workspace, +double getSampleLog(const MatrixWorkspace_const_sptr &workspace, std::vector<std::string> const &logNames, double const &defaultValue) { double value(defaultValue); @@ -1014,8 +1014,8 @@ void ISISEnergyTransfer::setSaveEnabled(bool enable) { void ISISEnergyTransfer::updateRunButton(bool enabled, std::string const &enableOutputButtons, - QString const message, - QString const tooltip) { + QString const &message, + QString const &tooltip) { setRunEnabled(enabled); m_uiForm.pbRun->setText(message); m_uiForm.pbRun->setToolTip(tooltip); diff --git a/qt/scientific_interfaces/Indirect/ISISEnergyTransfer.h b/qt/scientific_interfaces/Indirect/ISISEnergyTransfer.h index 97a8a83368e17a9929bccfe090fd33f738a79ddb..3dfcca5b65964320f1ea7ad38e5c213c81552b1a 100644 --- a/qt/scientific_interfaces/Indirect/ISISEnergyTransfer.h +++ b/qt/scientific_interfaces/Indirect/ISISEnergyTransfer.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -60,8 +60,8 @@ private slots: void updateRunButton(bool enabled = true, std::string const &enableOutputButtons = "unchanged", - QString const message = "Run", - QString const tooltip = ""); + QString const &message = "Run", + QString const &tooltip = ""); private: void setInstrumentDefault(QMap<QString, QString> const &instDetails); diff --git a/qt/scientific_interfaces/Indirect/IndexTypes.cpp b/qt/scientific_interfaces/Indirect/IndexTypes.cpp index cd97acef33a61c4bc560ad4d339aee21268cad4b..6447399242e1212f82dd96f4ea196bd142b06fc4 100644 --- a/qt/scientific_interfaces/Indirect/IndexTypes.cpp +++ b/qt/scientific_interfaces/Indirect/IndexTypes.cpp @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #include "IndexTypes.h" #include <QMetaType> diff --git a/qt/scientific_interfaces/Indirect/IndexTypes.h b/qt/scientific_interfaces/Indirect/IndexTypes.h index f68d3010e418cced0b26a399ddd72eab105fac08..d8d206ecc86f1e0c3a4f8a97d8a3249a698e8648 100644 --- a/qt/scientific_interfaces/Indirect/IndexTypes.h +++ b/qt/scientific_interfaces/Indirect/IndexTypes.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + // // This file contains the implimentation of type safe indices for use diff --git a/qt/scientific_interfaces/Indirect/IndirectAddWorkspaceDialog.cpp b/qt/scientific_interfaces/Indirect/IndirectAddWorkspaceDialog.cpp index c6dcb7ca722a9108df4cf09ce5158907d33842fb..9917de6f81633485fb416e6579323ad942267bfa 100644 --- a/qt/scientific_interfaces/Indirect/IndirectAddWorkspaceDialog.cpp +++ b/qt/scientific_interfaces/Indirect/IndirectAddWorkspaceDialog.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "IndirectAddWorkspaceDialog.h" @@ -10,6 +10,7 @@ #include "MantidAPI/MatrixWorkspace.h" #include <boost/optional.hpp> +#include <utility> namespace { using namespace Mantid::API; @@ -26,7 +27,8 @@ bool validWorkspace(std::string const &name) { return !name.empty() && doesExistInADS(name); } -boost::optional<std::size_t> maximumIndex(MatrixWorkspace_sptr workspace) { +boost::optional<std::size_t> +maximumIndex(const MatrixWorkspace_sptr &workspace) { if (workspace) { const auto numberOfHistograms = workspace->getNumberHistograms(); if (numberOfHistograms > 0) @@ -35,8 +37,8 @@ boost::optional<std::size_t> maximumIndex(MatrixWorkspace_sptr workspace) { return boost::none; } -QString getIndexString(MatrixWorkspace_sptr workspace) { - const auto maximum = maximumIndex(workspace); +QString getIndexString(const MatrixWorkspace_sptr &workspace) { + const auto maximum = maximumIndex(std::move(workspace)); if (maximum) { if (*maximum > 0) return QString("0-%1").arg(*maximum); diff --git a/qt/scientific_interfaces/Indirect/IndirectAddWorkspaceDialog.h b/qt/scientific_interfaces/Indirect/IndirectAddWorkspaceDialog.h index 98e21436b647e5f760469f41f91d530507df2ef9..676f4de91efac1c4cdf524b7baa11eec9e2f98e8 100644 --- a/qt/scientific_interfaces/Indirect/IndirectAddWorkspaceDialog.h +++ b/qt/scientific_interfaces/Indirect/IndirectAddWorkspaceDialog.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Indirect/IndirectBayes.cpp b/qt/scientific_interfaces/Indirect/IndirectBayes.cpp index ba6ec055943d7ee3311abb852d791241e801091f..bc6971eda588ca8849cf31355201d41ecebaac42 100644 --- a/qt/scientific_interfaces/Indirect/IndirectBayes.cpp +++ b/qt/scientific_interfaces/Indirect/IndirectBayes.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "IndirectBayes.h" #include "Quasi.h" diff --git a/qt/scientific_interfaces/Indirect/IndirectBayes.h b/qt/scientific_interfaces/Indirect/IndirectBayes.h index 366d017b3c09a328b434e92355664b35b9898bf1..163f96a39247d19399db5cf2327d6bc86530a11a 100644 --- a/qt/scientific_interfaces/Indirect/IndirectBayes.h +++ b/qt/scientific_interfaces/Indirect/IndirectBayes.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "ui_IndirectBayes.h" diff --git a/qt/scientific_interfaces/Indirect/IndirectBayesTab.cpp b/qt/scientific_interfaces/Indirect/IndirectBayesTab.cpp index 286cdaaa56b5c7901681ee5197e3726b82016d98..8d7484a3a3f81e6868d9deaa9841100fab83ddcf 100644 --- a/qt/scientific_interfaces/Indirect/IndirectBayesTab.cpp +++ b/qt/scientific_interfaces/Indirect/IndirectBayesTab.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "IndirectBayesTab.h" @@ -14,6 +14,7 @@ IndirectBayesTab::IndirectBayesTab(QWidget *parent) m_propTree->setFactoryForManager(m_dblManager, m_dblEdFac); connect(m_dblManager, SIGNAL(valueChanged(QtProperty *, double)), this, + // cppcheck-suppress pureVirtualCall SLOT(updateProperties(QtProperty *, double))); } diff --git a/qt/scientific_interfaces/Indirect/IndirectBayesTab.h b/qt/scientific_interfaces/Indirect/IndirectBayesTab.h index aea8a5bf77da7b95b11dede9e82a181190bf8cad..64499033f05e097dff3500601b943aee2e7eb3c0 100644 --- a/qt/scientific_interfaces/Indirect/IndirectBayesTab.h +++ b/qt/scientific_interfaces/Indirect/IndirectBayesTab.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Indirect/IndirectCorrections.cpp b/qt/scientific_interfaces/Indirect/IndirectCorrections.cpp index 8d58c01d104d74d1b6f51bc32538af4699905113..69efe1a16212fdfb2f17e0b1c2547e458cb8c18e 100644 --- a/qt/scientific_interfaces/Indirect/IndirectCorrections.cpp +++ b/qt/scientific_interfaces/Indirect/IndirectCorrections.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "IndirectCorrections.h" #include "AbsorptionCorrections.h" diff --git a/qt/scientific_interfaces/Indirect/IndirectCorrections.h b/qt/scientific_interfaces/Indirect/IndirectCorrections.h index 9c96a0d8af8050d3abddd3e1d401215d855ab7b6..fbf009d939b52fbce874d89fdf6487fa62b93259 100644 --- a/qt/scientific_interfaces/Indirect/IndirectCorrections.h +++ b/qt/scientific_interfaces/Indirect/IndirectCorrections.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Indirect/IndirectDataAnalysis.cpp b/qt/scientific_interfaces/Indirect/IndirectDataAnalysis.cpp index d9fccd1da51bccac2d13287d2bdac9592836c160..7994ef69f849898e05407e77050e8e19a78769c7 100644 --- a/qt/scientific_interfaces/Indirect/IndirectDataAnalysis.cpp +++ b/qt/scientific_interfaces/Indirect/IndirectDataAnalysis.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "IndirectDataAnalysis.h" diff --git a/qt/scientific_interfaces/Indirect/IndirectDataAnalysis.h b/qt/scientific_interfaces/Indirect/IndirectDataAnalysis.h index cceca4d199c3140e22bba6804338e1739c3a8078..537b44fa2849109fe1e7102a49f6b3322593e5f2 100644 --- a/qt/scientific_interfaces/Indirect/IndirectDataAnalysis.h +++ b/qt/scientific_interfaces/Indirect/IndirectDataAnalysis.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "ui_IndirectDataAnalysis.h" diff --git a/qt/scientific_interfaces/Indirect/IndirectDataAnalysisTab.cpp b/qt/scientific_interfaces/Indirect/IndirectDataAnalysisTab.cpp index 0823b6b76e7d46aedd895fda1945df189339a89b..ff7996578005feba4f433f1de35a31c00d5f8594 100644 --- a/qt/scientific_interfaces/Indirect/IndirectDataAnalysisTab.cpp +++ b/qt/scientific_interfaces/Indirect/IndirectDataAnalysisTab.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "IndirectDataAnalysisTab.h" @@ -15,6 +15,7 @@ #include <QSettings> #include <QString> +#include <utility> using namespace Mantid::API; @@ -92,7 +93,7 @@ MatrixWorkspace_sptr IndirectDataAnalysisTab::inputWorkspace() const { */ void IndirectDataAnalysisTab::setInputWorkspace( MatrixWorkspace_sptr inputWorkspace) { - m_inputWorkspace = inputWorkspace; + m_inputWorkspace = std::move(inputWorkspace); } /** @@ -113,7 +114,7 @@ MatrixWorkspace_sptr IndirectDataAnalysisTab::previewPlotWorkspace() { * @param previewPlotWorkspace The workspace to set. */ void IndirectDataAnalysisTab::setPreviewPlotWorkspace( - MatrixWorkspace_sptr previewPlotWorkspace) { + const MatrixWorkspace_sptr &previewPlotWorkspace) { m_previewPlotWorkspace = previewPlotWorkspace; } @@ -262,7 +263,7 @@ void IndirectDataAnalysisTab::updatePlot( * @param diffPreviewPlot The difference preview plot. */ void IndirectDataAnalysisTab::updatePlot( - WorkspaceGroup_sptr outputWS, size_t index, + const WorkspaceGroup_sptr &outputWS, size_t index, MantidQt::MantidWidgets::PreviewPlot *fitPreviewPlot, MantidQt::MantidWidgets::PreviewPlot *diffPreviewPlot) { // Check whether the specified index is within the bounds of the @@ -318,7 +319,7 @@ void IndirectDataAnalysisTab::updatePlot( * @param diffPreviewPlot The difference preview plot. */ void IndirectDataAnalysisTab::updatePlot( - WorkspaceGroup_sptr outputWS, + const WorkspaceGroup_sptr &outputWS, MantidQt::MantidWidgets::PreviewPlot *fitPreviewPlot, MantidQt::MantidWidgets::PreviewPlot *diffPreviewPlot) { if (outputWS && selectedSpectrum() >= minimumSpectrum() && @@ -339,7 +340,7 @@ void IndirectDataAnalysisTab::updatePlot( * @param diffPreviewPlot The difference preview plot. */ void IndirectDataAnalysisTab::updatePlot( - MatrixWorkspace_sptr outputWS, + const MatrixWorkspace_sptr &outputWS, MantidQt::MantidWidgets::PreviewPlot *fitPreviewPlot, MantidQt::MantidWidgets::PreviewPlot *diffPreviewPlot) { fitPreviewPlot->clear(); diff --git a/qt/scientific_interfaces/Indirect/IndirectDataAnalysisTab.h b/qt/scientific_interfaces/Indirect/IndirectDataAnalysisTab.h index 1e88256d28326af554665b755073eefeeb55e4fa..beb59db18d80a1d1daf5cd98d6fc724f252291f2 100644 --- a/qt/scientific_interfaces/Indirect/IndirectDataAnalysisTab.h +++ b/qt/scientific_interfaces/Indirect/IndirectDataAnalysisTab.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -90,7 +90,7 @@ protected: /// Set preview plot workspace void setPreviewPlotWorkspace( - Mantid::API::MatrixWorkspace_sptr previewPlotWorkspace); + const Mantid::API::MatrixWorkspace_sptr &previewPlotWorkspace); /// Retrieve the selected spectrum int selectedSpectrum() const; @@ -110,11 +110,12 @@ protected: MantidQt::MantidWidgets::PreviewPlot *fitPreviewPlot, MantidQt::MantidWidgets::PreviewPlot *diffPreviewPlot); - void updatePlot(Mantid::API::WorkspaceGroup_sptr workspaceGroup, size_t index, + void updatePlot(const Mantid::API::WorkspaceGroup_sptr &workspaceGroup, + size_t index, MantidQt::MantidWidgets::PreviewPlot *fitPreviewPlot, MantidQt::MantidWidgets::PreviewPlot *diffPreviewPlot); - void updatePlot(Mantid::API::WorkspaceGroup_sptr outputWS, + void updatePlot(const Mantid::API::WorkspaceGroup_sptr &outputWS, MantidQt::MantidWidgets::PreviewPlot *fitPreviewPlot, MantidQt::MantidWidgets::PreviewPlot *diffPreviewPlot); @@ -122,7 +123,7 @@ protected: MantidQt::MantidWidgets::PreviewPlot *fitPreviewPlot, MantidQt::MantidWidgets::PreviewPlot *diffPreviewPlot); - void updatePlot(Mantid::API::MatrixWorkspace_sptr outputWS, + void updatePlot(const Mantid::API::MatrixWorkspace_sptr &outputWS, MantidQt::MantidWidgets::PreviewPlot *fitPreviewPlot, MantidQt::MantidWidgets::PreviewPlot *diffPreviewPlot); diff --git a/qt/scientific_interfaces/Indirect/IndirectDataReduction.cpp b/qt/scientific_interfaces/Indirect/IndirectDataReduction.cpp index c5472144ed6880e2e504e3ceaa1ef7ce35b0fa7e..61b659e070469ecb332a0382c298d28c3f386424 100644 --- a/qt/scientific_interfaces/Indirect/IndirectDataReduction.cpp +++ b/qt/scientific_interfaces/Indirect/IndirectDataReduction.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------- // Includes @@ -316,7 +316,8 @@ void IndirectDataReduction::loadInstrumentDetails() { * @return Value as QString */ QString IndirectDataReduction::getInstrumentParameterFrom( - Mantid::Geometry::IComponent_const_sptr comp, std::string param) { + const Mantid::Geometry::IComponent_const_sptr &comp, + const std::string ¶m) { QString value; if (!comp->hasParameter(param)) { @@ -445,7 +446,7 @@ void IndirectDataReduction::saveSettings() { * * @param facility Name of facility */ -void IndirectDataReduction::filterUiForFacility(QString facility) { +void IndirectDataReduction::filterUiForFacility(const QString &facility) { g_log.information() << "Facility selected: " << facility.toStdString() << '\n'; QStringList enabledTabs; diff --git a/qt/scientific_interfaces/Indirect/IndirectDataReduction.h b/qt/scientific_interfaces/Indirect/IndirectDataReduction.h index f1a8e9c045b8b471f7641a333060480eb774e264..582b93441d3b6f16bf63f87818e23e7863b3f85e 100644 --- a/qt/scientific_interfaces/Indirect/IndirectDataReduction.h +++ b/qt/scientific_interfaces/Indirect/IndirectDataReduction.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "ui_IndirectDataReduction.h" @@ -69,7 +69,7 @@ signals: private slots: /// Shows/hides tabs based on facility - void filterUiForFacility(QString facility); + void filterUiForFacility(const QString &facility); /// Exports the current tab algorithms as a Python script void exportTabPython(); @@ -89,9 +89,9 @@ private: void loadInstrumentDetails(); - QString - getInstrumentParameterFrom(Mantid::Geometry::IComponent_const_sptr comp, - std::string param); + QString getInstrumentParameterFrom( + const Mantid::Geometry::IComponent_const_sptr &comp, + const std::string ¶m); void readSettings(); void saveSettings(); diff --git a/qt/scientific_interfaces/Indirect/IndirectDataReductionTab.cpp b/qt/scientific_interfaces/Indirect/IndirectDataReductionTab.cpp index d9a1453ab53bdd1ad69878bd7292cd455a7b9f59..191dccecfdfd8b44da3f5c3cbde9ae89bf4db24a 100644 --- a/qt/scientific_interfaces/Indirect/IndirectDataReductionTab.cpp +++ b/qt/scientific_interfaces/Indirect/IndirectDataReductionTab.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "IndirectDataReductionTab.h" diff --git a/qt/scientific_interfaces/Indirect/IndirectDataReductionTab.h b/qt/scientific_interfaces/Indirect/IndirectDataReductionTab.h index c253d3e6e77da8856d992e4c84ed57f51077357a..e319aa028d266d38b7272a42955804b14f91af9e 100644 --- a/qt/scientific_interfaces/Indirect/IndirectDataReductionTab.h +++ b/qt/scientific_interfaces/Indirect/IndirectDataReductionTab.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Indirect/IndirectDataTablePresenter.cpp b/qt/scientific_interfaces/Indirect/IndirectDataTablePresenter.cpp index 86190c4f3b0212004e4c0b083aa9074f97c79d4e..3039804bcef9a0a3ee99b0f86988a388e6616e3e 100644 --- a/qt/scientific_interfaces/Indirect/IndirectDataTablePresenter.cpp +++ b/qt/scientific_interfaces/Indirect/IndirectDataTablePresenter.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "IndirectDataTablePresenter.h" @@ -216,11 +216,11 @@ IndirectDataTablePresenter::getSpectra(TableRowIndex start, while (start < end) { WorkspaceIndex minimum = getWorkspaceIndex(start); WorkspaceIndex maximum = minimum; - start++; + ++start; while (start < end && getWorkspaceIndex(start) == maximum + WorkspaceIndex{1}) { ++maximum; - start++; + ++start; } spectraPairs.emplace_back(minimum, maximum); } diff --git a/qt/scientific_interfaces/Indirect/IndirectDataTablePresenter.h b/qt/scientific_interfaces/Indirect/IndirectDataTablePresenter.h index fc452e7406abd6de601679db66223cdf904ee08b..936965d885229ef01310ef8b88f080f93b60e8dd 100644 --- a/qt/scientific_interfaces/Indirect/IndirectDataTablePresenter.h +++ b/qt/scientific_interfaces/Indirect/IndirectDataTablePresenter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Indirect/IndirectDataTablePresenterLegacy.cpp b/qt/scientific_interfaces/Indirect/IndirectDataTablePresenterLegacy.cpp index a63b4161280eb5685c8d4f9bfa25cde7f636f48f..c14d6f4c6ec0a46fe480b8f723d4e5349aa22bd7 100644 --- a/qt/scientific_interfaces/Indirect/IndirectDataTablePresenterLegacy.cpp +++ b/qt/scientific_interfaces/Indirect/IndirectDataTablePresenterLegacy.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "IndirectDataTablePresenterLegacy.h" diff --git a/qt/scientific_interfaces/Indirect/IndirectDataTablePresenterLegacy.h b/qt/scientific_interfaces/Indirect/IndirectDataTablePresenterLegacy.h index 153838809797785a44f461ff26dde4838ebc69a4..8539047f340b7974c9b52bf0920ce0c9b8820af9 100644 --- a/qt/scientific_interfaces/Indirect/IndirectDataTablePresenterLegacy.h +++ b/qt/scientific_interfaces/Indirect/IndirectDataTablePresenterLegacy.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Indirect/IndirectDataValidationHelper.cpp b/qt/scientific_interfaces/Indirect/IndirectDataValidationHelper.cpp index b482f599906d3d7fb7f3d72b53f97c31d35990df..1e860d250e19a4c8120d011978904b0cdc458e0f 100644 --- a/qt/scientific_interfaces/Indirect/IndirectDataValidationHelper.cpp +++ b/qt/scientific_interfaces/Indirect/IndirectDataValidationHelper.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "IndirectDataValidationHelper.h" diff --git a/qt/scientific_interfaces/Indirect/IndirectDataValidationHelper.h b/qt/scientific_interfaces/Indirect/IndirectDataValidationHelper.h index d5c21f86c2d7253e96c8cb27e0838e6cfe86294e..6140da4762257f0e2460242f8bc02c67d8a23af4 100644 --- a/qt/scientific_interfaces/Indirect/IndirectDataValidationHelper.h +++ b/qt/scientific_interfaces/Indirect/IndirectDataValidationHelper.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Indirect/IndirectDiffractionReduction.cpp b/qt/scientific_interfaces/Indirect/IndirectDiffractionReduction.cpp index 8999de43d127907d770895d97900e6f4164a5540..6ae644b2f730c022931243fe0840e34e7c3d3e72 100644 --- a/qt/scientific_interfaces/Indirect/IndirectDiffractionReduction.cpp +++ b/qt/scientific_interfaces/Indirect/IndirectDiffractionReduction.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "IndirectDiffractionReduction.h" @@ -354,8 +354,8 @@ IAlgorithm_sptr IndirectDiffractionReduction::convertUnitsAlgorithm( * @param instName Name of the instrument * @param mode Mode instrument is operating in (diffspec/diffonly) */ -void IndirectDiffractionReduction::runGenericReduction(QString instName, - QString mode) { +void IndirectDiffractionReduction::runGenericReduction(const QString &instName, + const QString &mode) { QString rebinStart = ""; QString rebinWidth = ""; diff --git a/qt/scientific_interfaces/Indirect/IndirectDiffractionReduction.h b/qt/scientific_interfaces/Indirect/IndirectDiffractionReduction.h index 2201b2c3a084cf5c12ee1136668871b7cab76cfb..8e9e8aafd85849fa8a3458d7d3e9b12e52abfe54 100644 --- a/qt/scientific_interfaces/Indirect/IndirectDiffractionReduction.h +++ b/qt/scientific_interfaces/Indirect/IndirectDiffractionReduction.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -79,7 +79,7 @@ private: loadInstrument(const std::string &instrumentName, const std::string &reflection = ""); - void runGenericReduction(QString instName, QString mode); + void runGenericReduction(const QString &instName, const QString &mode); void connectRunButtonValidation(const MantidQt::API::MWRunFiles *file_field); void runOSIRISdiffonlyReduction(); void createGroupingWorkspace(const std::string &outputWsName); diff --git a/qt/scientific_interfaces/Indirect/IndirectEditResultsDialog.cpp b/qt/scientific_interfaces/Indirect/IndirectEditResultsDialog.cpp index 20cc5b34e5c039a7f9b37d81fafd5f5b6a13ef1a..a89aa0cde734e8b2d64e0e39bf03eeac09c3282b 100644 --- a/qt/scientific_interfaces/Indirect/IndirectEditResultsDialog.cpp +++ b/qt/scientific_interfaces/Indirect/IndirectEditResultsDialog.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "IndirectEditResultsDialog.h" diff --git a/qt/scientific_interfaces/Indirect/IndirectEditResultsDialog.h b/qt/scientific_interfaces/Indirect/IndirectEditResultsDialog.h index fd13d90745d8a9c1ac0387615924c1deca94027e..2876f2e4bce2d157964d3f2a12a8e926173c8070 100644 --- a/qt/scientific_interfaces/Indirect/IndirectEditResultsDialog.h +++ b/qt/scientific_interfaces/Indirect/IndirectEditResultsDialog.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Indirect/IndirectFitAnalysisTab.cpp b/qt/scientific_interfaces/Indirect/IndirectFitAnalysisTab.cpp index 4374a4adbc7e5a9e1a1fa2fb50d60c251e7f8e33..4c4793df70b4e6c6751bc9779bd44e1451af1812 100644 --- a/qt/scientific_interfaces/Indirect/IndirectFitAnalysisTab.cpp +++ b/qt/scientific_interfaces/Indirect/IndirectFitAnalysisTab.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "IndirectFitAnalysisTab.h" #include "ui_IqtFit.h" @@ -19,6 +19,7 @@ #include <QtCore> #include <algorithm> +#include <utility> /// Logger Mantid::Kernel::Logger g_log("IndirectFitAnalysisTab"); @@ -643,7 +644,7 @@ void IndirectFitAnalysisTab::setEditResultVisible(bool visible) { } void IndirectFitAnalysisTab::setAlgorithmProperties( - IAlgorithm_sptr fitAlgorithm) const { + const IAlgorithm_sptr &fitAlgorithm) const { fitAlgorithm->setProperty("Minimizer", m_fitPropertyBrowser->minimizer(true)); fitAlgorithm->setProperty("MaxIterations", m_fitPropertyBrowser->maxIterations()); @@ -674,14 +675,14 @@ void IndirectFitAnalysisTab::setAlgorithmProperties( void IndirectFitAnalysisTab::runFitAlgorithm(IAlgorithm_sptr fitAlgorithm) { connect(m_batchAlgoRunner, SIGNAL(batchComplete(bool)), this, SLOT(updateFitOutput(bool))); - setupFit(fitAlgorithm); + setupFit(std::move(fitAlgorithm)); m_batchAlgoRunner->executeBatchAsync(); } void IndirectFitAnalysisTab::runSingleFit(IAlgorithm_sptr fitAlgorithm) { connect(m_batchAlgoRunner, SIGNAL(batchComplete(bool)), this, SLOT(updateSingleFitOutput(bool))); - setupFit(fitAlgorithm); + setupFit(std::move(fitAlgorithm)); m_batchAlgoRunner->executeBatchAsync(); } diff --git a/qt/scientific_interfaces/Indirect/IndirectFitAnalysisTab.h b/qt/scientific_interfaces/Indirect/IndirectFitAnalysisTab.h index ac8b602dd2bc0a66275abfcfb04a69aceaa9f399..001d4335225586f3044943a968874f1b9003f65d 100644 --- a/qt/scientific_interfaces/Indirect/IndirectFitAnalysisTab.h +++ b/qt/scientific_interfaces/Indirect/IndirectFitAnalysisTab.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -71,7 +71,8 @@ protected: void setSampleSuffixes(std::string const &tab, bool filter); void setResolutionSuffixes(std::string const &tab, bool filter); - void setAlgorithmProperties(Mantid::API::IAlgorithm_sptr fitAlgorithm) const; + void setAlgorithmProperties( + const Mantid::API::IAlgorithm_sptr &fitAlgorithm) const; void runFitAlgorithm(Mantid::API::IAlgorithm_sptr fitAlgorithm); void runSingleFit(Mantid::API::IAlgorithm_sptr fitAlgorithm); virtual void setupFit(Mantid::API::IAlgorithm_sptr fitAlgorithm); diff --git a/qt/scientific_interfaces/Indirect/IndirectFitAnalysisTabLegacy.cpp b/qt/scientific_interfaces/Indirect/IndirectFitAnalysisTabLegacy.cpp index d77f9e356a347e24d84f7483bd431f1116e57425..02d0163c5e8e5afb4fff36f80fe9d293ca31d026 100644 --- a/qt/scientific_interfaces/Indirect/IndirectFitAnalysisTabLegacy.cpp +++ b/qt/scientific_interfaces/Indirect/IndirectFitAnalysisTabLegacy.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "IndirectFitAnalysisTabLegacy.h" #include "ui_ConvFit.h" @@ -21,6 +21,7 @@ #include <QtCore> #include <algorithm> +#include <utility> using namespace Mantid::API; @@ -37,7 +38,7 @@ WorkspaceGroup_sptr getADSGroupWorkspace(std::string const &workspaceName) { } void updateParameters( - IFunction_sptr function, + const IFunction_sptr &function, std::unordered_map<std::string, ParameterValueLegacy> const ¶meters) { for (auto i = 0u; i < function->nParams(); ++i) { auto const value = parameters.find(function->parameterName(i)); @@ -50,7 +51,8 @@ void updateParameters( } void updateAttributes( - IFunction_sptr function, std::vector<std::string> const &attributeNames, + const IFunction_sptr &function, + std::vector<std::string> const &attributeNames, std::unordered_map<std::string, IFunction::Attribute> const &attributes) { for (const auto &attributeName : attributeNames) { auto const value = attributes.find(attributeName); @@ -807,17 +809,19 @@ void IndirectFitAnalysisTabLegacy::updateAttributeValues() { * @param attributeNames The attributes to update */ void IndirectFitAnalysisTabLegacy::updateAttributeValues( - IFunction_sptr function, std::vector<std::string> const &attributeNames) { + const IFunction_sptr &function, + std::vector<std::string> const &attributeNames) { auto const attributes = getAttributes(function, attributeNames); if (!attributes.empty()) updateAttributeValues(function, attributeNames, attributes); } void IndirectFitAnalysisTabLegacy::updateAttributeValues( - IFunction_sptr fitFunction, std::vector<std::string> const &attributeNames, + const IFunction_sptr &fitFunction, + std::vector<std::string> const &attributeNames, std::unordered_map<std::string, IFunction::Attribute> const &attributes) { try { - updateAttributes(fitFunction, attributeNames, attributes); + updateAttributes(std::move(fitFunction), attributeNames, attributes); updateFitBrowserAttributeValues(); } catch (const std::runtime_error &) { showMessageBox("An unexpected error occured:\n The setting of attribute " @@ -1067,7 +1071,7 @@ void IndirectFitAnalysisTabLegacy::setEditResultVisible(bool visible) { } void IndirectFitAnalysisTabLegacy::setAlgorithmProperties( - IAlgorithm_sptr fitAlgorithm) const { + const IAlgorithm_sptr &fitAlgorithm) const { fitAlgorithm->setProperty("Minimizer", m_fitPropertyBrowser->minimizer(true)); fitAlgorithm->setProperty("MaxIterations", m_fitPropertyBrowser->maxIterations()); @@ -1094,14 +1098,14 @@ void IndirectFitAnalysisTabLegacy::runFitAlgorithm( IAlgorithm_sptr fitAlgorithm) { connect(m_batchAlgoRunner, SIGNAL(batchComplete(bool)), this, SLOT(updateFitOutput(bool))); - setupFit(fitAlgorithm); + setupFit(std::move(fitAlgorithm)); m_batchAlgoRunner->executeBatchAsync(); } void IndirectFitAnalysisTabLegacy::runSingleFit(IAlgorithm_sptr fitAlgorithm) { connect(m_batchAlgoRunner, SIGNAL(batchComplete(bool)), this, SLOT(updateSingleFitOutput(bool))); - setupFit(fitAlgorithm); + setupFit(std::move(fitAlgorithm)); m_batchAlgoRunner->executeBatchAsync(); } diff --git a/qt/scientific_interfaces/Indirect/IndirectFitAnalysisTabLegacy.h b/qt/scientific_interfaces/Indirect/IndirectFitAnalysisTabLegacy.h index 2b1b958267e87f628b9a0bdc2479dfc0afd9c4e8..0deb72aedee5bfbe11213310bac15a59038ff50a 100644 --- a/qt/scientific_interfaces/Indirect/IndirectFitAnalysisTabLegacy.h +++ b/qt/scientific_interfaces/Indirect/IndirectFitAnalysisTabLegacy.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -131,7 +131,8 @@ protected: void setResolutionWSSuffixes(const QStringList &suffices); void setResolutionFBSuffixes(const QStringList &suffices); - void setAlgorithmProperties(Mantid::API::IAlgorithm_sptr fitAlgorithm) const; + void setAlgorithmProperties( + const Mantid::API::IAlgorithm_sptr &fitAlgorithm) const; void runFitAlgorithm(Mantid::API::IAlgorithm_sptr fitAlgorithm); void runSingleFit(Mantid::API::IAlgorithm_sptr fitAlgorithm); virtual void setupFit(Mantid::API::IAlgorithm_sptr fitAlgorithm); @@ -176,10 +177,10 @@ protected slots: void executeFit(); void updateAttributeValues(); - void updateAttributeValues(Mantid::API::IFunction_sptr function, + void updateAttributeValues(const Mantid::API::IFunction_sptr &function, std::vector<std::string> const &attributeNames); void updateAttributeValues( - Mantid::API::IFunction_sptr function, + const Mantid::API::IFunction_sptr &function, std::vector<std::string> const &attributeNames, std::unordered_map<std::string, Mantid::API::IFunction::Attribute> const &attributes); diff --git a/qt/scientific_interfaces/Indirect/IndirectFitData.cpp b/qt/scientific_interfaces/Indirect/IndirectFitData.cpp index 16310986c97fd6d724d2994837c5fea82db65159..d3cddcda4766c4d18cf2a7c21cc1bac2199bd367 100644 --- a/qt/scientific_interfaces/Indirect/IndirectFitData.cpp +++ b/qt/scientific_interfaces/Indirect/IndirectFitData.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "IndirectFitData.h" @@ -29,7 +29,7 @@ using namespace Mantid::Kernel::Strings; * them. * @param workspace workspace possibly containing Q values. */ -std::vector<double> extractQValues(const MatrixWorkspace_sptr workspace, +std::vector<double> extractQValues(const MatrixWorkspace_sptr &workspace, const Spectra &spectra) { std::vector<double> qs; // Check if the vertical axis has units of momentum transfer, then extract Q @@ -143,7 +143,7 @@ tryPassFormatArgument(boost::basic_format<char> &formatString, } } -std::pair<double, double> getBinRange(MatrixWorkspace_sptr workspace) { +std::pair<double, double> getBinRange(const MatrixWorkspace_sptr &workspace) { return std::make_pair(workspace->x(0).front(), workspace->x(0).back()); } @@ -296,7 +296,7 @@ void Spectra::checkContinuous() { } } -IndirectFitData::IndirectFitData(MatrixWorkspace_sptr workspace, +IndirectFitData::IndirectFitData(const MatrixWorkspace_sptr &workspace, const Spectra &spectra) : m_workspace(workspace), m_spectra(Spectra("")) { setSpectra(spectra); diff --git a/qt/scientific_interfaces/Indirect/IndirectFitData.h b/qt/scientific_interfaces/Indirect/IndirectFitData.h index b74a5d79303f462ae63af9f2b2d9bda52b172c51..41f44de2b63bd2dc647491451cb2c52271d831ff 100644 --- a/qt/scientific_interfaces/Indirect/IndirectFitData.h +++ b/qt/scientific_interfaces/Indirect/IndirectFitData.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -108,7 +108,7 @@ std::vector<T> vectorFromString(const std::string &listString) { */ class MANTIDQT_INDIRECT_DLL IndirectFitData { public: - IndirectFitData(Mantid::API::MatrixWorkspace_sptr workspace, + IndirectFitData(const Mantid::API::MatrixWorkspace_sptr &workspace, const Spectra &spectra); std::string displayName(const std::string &formatString, diff --git a/qt/scientific_interfaces/Indirect/IndirectFitDataLegacy.cpp b/qt/scientific_interfaces/Indirect/IndirectFitDataLegacy.cpp index 447acfa216a2b1623b3d13ad10b77df05dbf847f..f54ed01a18df09584bc532223514f8970f740611 100644 --- a/qt/scientific_interfaces/Indirect/IndirectFitDataLegacy.cpp +++ b/qt/scientific_interfaces/Indirect/IndirectFitDataLegacy.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "IndirectFitDataLegacy.h" @@ -12,6 +12,7 @@ #include <boost/format.hpp> #include <sstream> +#include <utility> using namespace Mantid::API; @@ -227,7 +228,7 @@ tryPassFormatArgument(boost::basic_format<char> &formatString, } } -std::pair<double, double> getBinRange(MatrixWorkspace_sptr workspace) { +std::pair<double, double> getBinRange(const MatrixWorkspace_sptr &workspace) { return std::make_pair(workspace->x(0).front(), workspace->x(0).back()); } @@ -275,7 +276,8 @@ namespace IDA { IndirectFitDataLegacy::IndirectFitDataLegacy(MatrixWorkspace_sptr workspace, const SpectraLegacy &spectra) - : m_workspace(workspace), m_spectra(DiscontinuousSpectra<std::size_t>("")) { + : m_workspace(std::move(workspace)), + m_spectra(DiscontinuousSpectra<std::size_t>("")) { setSpectra(spectra); } diff --git a/qt/scientific_interfaces/Indirect/IndirectFitDataLegacy.h b/qt/scientific_interfaces/Indirect/IndirectFitDataLegacy.h index e04b8829435e8496c7803161cd4af627cdaa3624..f8ff9eb050c7a2d41466328515f202cdf5f5a5b8 100644 --- a/qt/scientific_interfaces/Indirect/IndirectFitDataLegacy.h +++ b/qt/scientific_interfaces/Indirect/IndirectFitDataLegacy.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Indirect/IndirectFitDataPresenter.cpp b/qt/scientific_interfaces/Indirect/IndirectFitDataPresenter.cpp index 1f97fd0f015e1bbe00cb56008543033bded60adb..0c6eb63abff0431ec2ad08ff2f0f229b6e1ca7dd 100644 --- a/qt/scientific_interfaces/Indirect/IndirectFitDataPresenter.cpp +++ b/qt/scientific_interfaces/Indirect/IndirectFitDataPresenter.cpp @@ -1,10 +1,13 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "IndirectFitDataPresenter.h" + +#include <utility> + #include "IndirectAddWorkspaceDialog.h" namespace MantidQt { @@ -208,8 +211,8 @@ void IndirectFitDataPresenter::replaceHandle(const std::string &workspaceName, DataForParameterEstimationCollection IndirectFitDataPresenter::getDataForParameterEstimation( - EstimationDataSelector selector) const { - return m_model->getDataForParameterEstimation(selector); + const EstimationDataSelector &selector) const { + return m_model->getDataForParameterEstimation(std::move(selector)); } void IndirectFitDataPresenter::selectReplacedWorkspace( diff --git a/qt/scientific_interfaces/Indirect/IndirectFitDataPresenter.h b/qt/scientific_interfaces/Indirect/IndirectFitDataPresenter.h index 96167ddf10e400d41940aae906779433aa2823a6..ae5f9d668e03d709b14ec4dfaedce365bc79850e 100644 --- a/qt/scientific_interfaces/Indirect/IndirectFitDataPresenter.h +++ b/qt/scientific_interfaces/Indirect/IndirectFitDataPresenter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -58,7 +58,7 @@ public: void replaceHandle(const std::string &workspaceName, const Workspace_sptr &workspace) override; DataForParameterEstimationCollection - getDataForParameterEstimation(EstimationDataSelector selector) const; + getDataForParameterEstimation(const EstimationDataSelector &selector) const; public slots: void updateSpectraInTable(TableDatasetIndex dataIndex); diff --git a/qt/scientific_interfaces/Indirect/IndirectFitDataPresenterLegacy.cpp b/qt/scientific_interfaces/Indirect/IndirectFitDataPresenterLegacy.cpp index 634e824bb681141aaf5aba617a71b8e4becd96f7..c5fcc17795d5e3451517908e0dfb2802a9bd4c70 100644 --- a/qt/scientific_interfaces/Indirect/IndirectFitDataPresenterLegacy.cpp +++ b/qt/scientific_interfaces/Indirect/IndirectFitDataPresenterLegacy.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "IndirectFitDataPresenterLegacy.h" #include "IndirectAddWorkspaceDialog.h" diff --git a/qt/scientific_interfaces/Indirect/IndirectFitDataPresenterLegacy.h b/qt/scientific_interfaces/Indirect/IndirectFitDataPresenterLegacy.h index 70194a368fbc83320a560f4bde9f2d2522bbb384..d85474399d5d38ce01e7a76af87dc64f4679d8cc 100644 --- a/qt/scientific_interfaces/Indirect/IndirectFitDataPresenterLegacy.h +++ b/qt/scientific_interfaces/Indirect/IndirectFitDataPresenterLegacy.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Indirect/IndirectFitDataView.cpp b/qt/scientific_interfaces/Indirect/IndirectFitDataView.cpp index 4b342058d4bb1a521442314b1f130e90564d3d6f..1c4226aed4bbb7d1431b059409a4e64bc8d2adec 100644 --- a/qt/scientific_interfaces/Indirect/IndirectFitDataView.cpp +++ b/qt/scientific_interfaces/Indirect/IndirectFitDataView.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "IndirectFitDataView.h" diff --git a/qt/scientific_interfaces/Indirect/IndirectFitDataView.h b/qt/scientific_interfaces/Indirect/IndirectFitDataView.h index 1218f3a0f9b8b2ed4aa8f1450b88e82524d34cfc..b9e48b66d584c4ebb9f62a7be26f440c7651f3a0 100644 --- a/qt/scientific_interfaces/Indirect/IndirectFitDataView.h +++ b/qt/scientific_interfaces/Indirect/IndirectFitDataView.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Indirect/IndirectFitDataViewLegacy.cpp b/qt/scientific_interfaces/Indirect/IndirectFitDataViewLegacy.cpp index 4300ee10e6993b79ddb349895f1d3989a14878dc..b316a64356a94577fd8f9f31517e4214cd44f8f1 100644 --- a/qt/scientific_interfaces/Indirect/IndirectFitDataViewLegacy.cpp +++ b/qt/scientific_interfaces/Indirect/IndirectFitDataViewLegacy.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "IndirectFitDataViewLegacy.h" diff --git a/qt/scientific_interfaces/Indirect/IndirectFitDataViewLegacy.h b/qt/scientific_interfaces/Indirect/IndirectFitDataViewLegacy.h index caa01cb9ad5c6e4b5a13c3d32d88237112c8440e..0b6c16f8c3b7c385defcff5101ecc93324357fc8 100644 --- a/qt/scientific_interfaces/Indirect/IndirectFitDataViewLegacy.h +++ b/qt/scientific_interfaces/Indirect/IndirectFitDataViewLegacy.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Indirect/IndirectFitOutput.cpp b/qt/scientific_interfaces/Indirect/IndirectFitOutput.cpp index 7a86fa9361b108c5fd815af9b4928473dcd2738c..f471023b4a08c10ca59efc6a15cd3a45d6d1fa2c 100644 --- a/qt/scientific_interfaces/Indirect/IndirectFitOutput.cpp +++ b/qt/scientific_interfaces/Indirect/IndirectFitOutput.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "IndirectFitOutput.h" @@ -14,6 +14,7 @@ #include <boost/functional/hash.hpp> #include <unordered_set> +#include <utility> using namespace Mantid::API; using IDAWorkspaceIndex = MantidQt::CustomInterfaces::IDA::WorkspaceIndex; @@ -23,7 +24,7 @@ using namespace MantidQt::CustomInterfaces::IDA; struct TableRowExtractor { explicit TableRowExtractor(ITableWorkspace_sptr table) - : m_table(table), m_columns(m_table->getColumnNames()) { + : m_table(std::move(table)), m_columns(m_table->getColumnNames()) { m_chiIndex = std::find(m_columns.begin(), m_columns.end(), "Chi_squared") - m_columns.begin(); } @@ -74,7 +75,7 @@ void extractParametersFromTable( const FitDataIterator &fitDataEnd, std::unordered_map<IndirectFitData const *, ParameterValuesNew> ¶meters) { - TableRowExtractor extractRowFromTable(tableWs); + TableRowExtractor extractRowFromTable(std::move(tableWs)); IDAWorkspaceIndex index; for (auto fitData = fitDataBegin; fitData < fitDataEnd; ++fitData) { auto &values = parameters[fitData->get()]; @@ -116,8 +117,9 @@ Map mapKeys(const Map &map, const KeyMap &keyMap) { return newMap; } -MatrixWorkspace_sptr getMatrixWorkspaceFromGroup(WorkspaceGroup_sptr group, - std::size_t index) { +MatrixWorkspace_sptr +getMatrixWorkspaceFromGroup(const WorkspaceGroup_sptr &group, + std::size_t index) { if (group->size() > index) return boost::dynamic_pointer_cast<MatrixWorkspace>(group->getItem(index)); return nullptr; @@ -131,7 +133,7 @@ std::vector<std::string> getAxisLabels(TextAxis const *axis) { return labels; } -std::vector<std::string> getAxisLabels(MatrixWorkspace_sptr workspace, +std::vector<std::string> getAxisLabels(const MatrixWorkspace_sptr &workspace, std::size_t index) { auto axis = dynamic_cast<TextAxis *>(workspace->getAxis(index)); if (axis) @@ -166,12 +168,12 @@ void renameWorkspace(std::string const &name, std::string const &newName) { renamer->execute(); } -void renameResult(Workspace_sptr resultWorkspace, +void renameResult(const Workspace_sptr &resultWorkspace, const std::string &workspaceName) { renameWorkspace(resultWorkspace->getName(), workspaceName + "_Result"); } -void renameResult(Workspace_sptr resultWorkspace, +void renameResult(const Workspace_sptr &resultWorkspace, IndirectFitData const *fitData) { const auto name = resultWorkspace->getName(); const auto newName = constructResultName(name, fitData); @@ -179,13 +181,13 @@ void renameResult(Workspace_sptr resultWorkspace, renameWorkspace(name, newName); } -void renameResult(WorkspaceGroup_sptr resultWorkspace, +void renameResult(const WorkspaceGroup_sptr &resultWorkspace, IndirectFitData const *fitData) { for (auto const &workspace : *resultWorkspace) renameResult(workspace, fitData); } -void renameResultWithoutSpectra(WorkspaceGroup_sptr resultWorkspace, +void renameResultWithoutSpectra(const WorkspaceGroup_sptr &resultWorkspace, const FitDataIterator &fitDataBegin, const FitDataIterator &fitDataEnd) { std::size_t index = 0; @@ -200,7 +202,7 @@ void renameResultWithoutSpectra(WorkspaceGroup_sptr resultWorkspace, } } -void renameResultWithSpectra(WorkspaceGroup_sptr resultWorkspace, +void renameResultWithSpectra(const WorkspaceGroup_sptr &resultWorkspace, const FitDataIterator &fitDataBegin, const FitDataIterator &fitDataEnd) { std::size_t index = 0; @@ -208,7 +210,7 @@ void renameResultWithSpectra(WorkspaceGroup_sptr resultWorkspace, renameResult(resultWorkspace->getItem(index++), it->get()); } -void renameResult(WorkspaceGroup_sptr resultWorkspace, +void renameResult(const WorkspaceGroup_sptr &resultWorkspace, const FitDataIterator &fitDataBegin, const FitDataIterator &fitDataEnd) { if (static_cast<int>(resultWorkspace->size()) >= fitDataEnd - fitDataBegin) @@ -238,25 +240,26 @@ namespace MantidQt { namespace CustomInterfaces { namespace IDA { -IndirectFitOutput::IndirectFitOutput(WorkspaceGroup_sptr resultGroup, +IndirectFitOutput::IndirectFitOutput(const WorkspaceGroup_sptr &resultGroup, ITableWorkspace_sptr parameterTable, - WorkspaceGroup_sptr resultWorkspace, + const WorkspaceGroup_sptr &resultWorkspace, const FitDataIterator &fitDataBegin, const FitDataIterator &fitDataEnd) : m_resultGroup(resultGroup), m_resultWorkspace(resultWorkspace), m_parameters(), m_outputResultLocations() { - addOutput(resultGroup, parameterTable, resultWorkspace, fitDataBegin, - fitDataEnd); + addOutput(resultGroup, std::move(parameterTable), resultWorkspace, + fitDataBegin, fitDataEnd); } -IndirectFitOutput::IndirectFitOutput(WorkspaceGroup_sptr resultGroup, +IndirectFitOutput::IndirectFitOutput(const WorkspaceGroup_sptr &resultGroup, ITableWorkspace_sptr parameterTable, - WorkspaceGroup_sptr resultWorkspace, + const WorkspaceGroup_sptr &resultWorkspace, IndirectFitData const *fitData, WorkspaceIndex spectrum) { m_parameters[fitData] = ParameterValuesNew(); m_outputResultLocations[fitData] = ResultLocationsNew(); - addOutput(resultGroup, parameterTable, resultWorkspace, fitData, spectrum); + addOutput(std::move(resultGroup), std::move(parameterTable), + std::move(resultWorkspace), fitData, spectrum); } bool IndirectFitOutput::isSpectrumFit(IndirectFitData const *fitData, @@ -322,24 +325,24 @@ void IndirectFitOutput::mapParameterNames( parameters = mapKeys(parameters, parameterNameChanges); } -void IndirectFitOutput::addOutput(WorkspaceGroup_sptr resultGroup, +void IndirectFitOutput::addOutput(const WorkspaceGroup_sptr &resultGroup, ITableWorkspace_sptr parameterTable, - WorkspaceGroup_sptr resultWorkspace, + const WorkspaceGroup_sptr &resultWorkspace, const FitDataIterator &fitDataBegin, const FitDataIterator &fitDataEnd) { - updateParameters(parameterTable, fitDataBegin, fitDataEnd); + updateParameters(std::move(parameterTable), fitDataBegin, fitDataEnd); updateFitResults(resultGroup, fitDataBegin, fitDataEnd); renameResult(resultWorkspace, fitDataBegin, fitDataEnd); m_resultWorkspace = resultWorkspace; m_resultGroup = resultGroup; } -void IndirectFitOutput::addOutput(WorkspaceGroup_sptr resultGroup, +void IndirectFitOutput::addOutput(const WorkspaceGroup_sptr &resultGroup, ITableWorkspace_sptr parameterTable, - WorkspaceGroup_sptr resultWorkspace, + const WorkspaceGroup_sptr &resultWorkspace, IndirectFitData const *fitData, WorkspaceIndex spectrum) { - TableRowExtractor extractRowFromTable(parameterTable); + TableRowExtractor extractRowFromTable(std::move(parameterTable)); m_parameters[fitData][spectrum] = extractRowFromTable(WorkspaceIndex{0}); m_outputResultLocations[fitData][spectrum] = ResultLocationNew(resultGroup, WorkspaceGroupIndex{0}); @@ -353,7 +356,7 @@ void IndirectFitOutput::removeOutput(IndirectFitData const *fitData) { m_outputResultLocations.erase(fitData); } -void IndirectFitOutput::updateFitResults(WorkspaceGroup_sptr resultGroup, +void IndirectFitOutput::updateFitResults(const WorkspaceGroup_sptr &resultGroup, const FitDataIterator &fitDataBegin, const FitDataIterator &fitDataEnd) { if (numberOfSpectraIn(fitDataBegin, fitDataEnd).value <= @@ -366,12 +369,12 @@ void IndirectFitOutput::updateFitResults(WorkspaceGroup_sptr resultGroup, void IndirectFitOutput::updateParameters(ITableWorkspace_sptr parameterTable, const FitDataIterator &fitDataBegin, const FitDataIterator &fitDataEnd) { - extractParametersFromTable(parameterTable, fitDataBegin, fitDataEnd, - m_parameters); + extractParametersFromTable(std::move(parameterTable), fitDataBegin, + fitDataEnd, m_parameters); } void IndirectFitOutput::updateFitResultsFromUnstructured( - WorkspaceGroup_sptr resultGroup, const FitDataIterator &fitDataBegin, + const WorkspaceGroup_sptr &resultGroup, const FitDataIterator &fitDataBegin, const FitDataIterator &fitDataEnd) { std::unordered_map<MatrixWorkspace *, std::map<WorkspaceIndex, WorkspaceGroupIndex>> @@ -396,7 +399,7 @@ void IndirectFitOutput::updateFitResultsFromUnstructured( } void IndirectFitOutput::updateFitResultsFromStructured( - WorkspaceGroup_sptr resultGroup, const FitDataIterator &fitDataBegin, + const WorkspaceGroup_sptr &resultGroup, const FitDataIterator &fitDataBegin, const FitDataIterator &fitDataEnd) { WorkspaceGroupIndex index; for (auto fitData = fitDataBegin; fitData < fitDataEnd; ++fitData) { diff --git a/qt/scientific_interfaces/Indirect/IndirectFitOutput.h b/qt/scientific_interfaces/Indirect/IndirectFitOutput.h index 1d76b28269e891642a0d485fc76bd1c2a6656c51..92bc19a0612fbdd10be1b71527d90af27dcc5c6d 100644 --- a/qt/scientific_interfaces/Indirect/IndirectFitOutput.h +++ b/qt/scientific_interfaces/Indirect/IndirectFitOutput.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -30,7 +30,7 @@ struct ParameterValue { struct ResultLocationNew { ResultLocationNew() = default; - ResultLocationNew(Mantid::API::WorkspaceGroup_sptr group, + ResultLocationNew(const Mantid::API::WorkspaceGroup_sptr &group, WorkspaceGroupIndex i) : result(group), index(i) {} boost::weak_ptr<Mantid::API::WorkspaceGroup> result; @@ -51,15 +51,15 @@ using FitDataIterator = */ class MANTIDQT_INDIRECT_DLL IndirectFitOutput { public: - IndirectFitOutput(Mantid::API::WorkspaceGroup_sptr resultGroup, + IndirectFitOutput(const Mantid::API::WorkspaceGroup_sptr &resultGroup, Mantid::API::ITableWorkspace_sptr parameterTable, - Mantid::API::WorkspaceGroup_sptr resultWorkspace, + const Mantid::API::WorkspaceGroup_sptr &resultWorkspace, const FitDataIterator &fitDataBegin, const FitDataIterator &fitDataEnd); - IndirectFitOutput(Mantid::API::WorkspaceGroup_sptr resultGroup, + IndirectFitOutput(const Mantid::API::WorkspaceGroup_sptr &resultGroup, Mantid::API::ITableWorkspace_sptr parameterTable, - Mantid::API::WorkspaceGroup_sptr resultWorkspace, + const Mantid::API::WorkspaceGroup_sptr &resultWorkspace, IndirectFitData const *fitData, WorkspaceIndex spectrum); bool isSpectrumFit(IndirectFitData const *fitData, @@ -85,33 +85,31 @@ public: const std::unordered_map<std::string, std::string> ¶meterNameChanges, IndirectFitData const *fitData, WorkspaceIndex spectrum); - void addOutput(Mantid::API::WorkspaceGroup_sptr resultGroup, + void addOutput(const Mantid::API::WorkspaceGroup_sptr &resultGroup, Mantid::API::ITableWorkspace_sptr parameterTable, - Mantid::API::WorkspaceGroup_sptr resultWorkspace, + const Mantid::API::WorkspaceGroup_sptr &resultWorkspace, const FitDataIterator &fitDataBegin, const FitDataIterator &fitDataEnd); - void addOutput(Mantid::API::WorkspaceGroup_sptr resultGroup, + void addOutput(const Mantid::API::WorkspaceGroup_sptr &resultGroup, Mantid::API::ITableWorkspace_sptr parameterTable, - Mantid::API::WorkspaceGroup_sptr resultWorkspace, + const Mantid::API::WorkspaceGroup_sptr &resultWorkspace, IndirectFitData const *fitData, WorkspaceIndex spectrum); void removeOutput(IndirectFitData const *fitData); private: - void updateFitResults(Mantid::API::WorkspaceGroup_sptr resultGroup, + void updateFitResults(const Mantid::API::WorkspaceGroup_sptr &resultGroup, const FitDataIterator &fitDataBegin, const FitDataIterator &fitDataEnd); void updateParameters(Mantid::API::ITableWorkspace_sptr parameterTable, const FitDataIterator &fitDataBegin, const FitDataIterator &fitDataEnd); - void - updateFitResultsFromUnstructured(Mantid::API::WorkspaceGroup_sptr resultGroup, - const FitDataIterator &fitDataBegin, - const FitDataIterator &fitDataEnd); - void - updateFitResultsFromStructured(Mantid::API::WorkspaceGroup_sptr resultGroup, - const FitDataIterator &fitDataBegin, - const FitDataIterator &fitDataEnd); + void updateFitResultsFromUnstructured( + const Mantid::API::WorkspaceGroup_sptr &resultGroup, + const FitDataIterator &fitDataBegin, const FitDataIterator &fitDataEnd); + void updateFitResultsFromStructured( + const Mantid::API::WorkspaceGroup_sptr &resultGroup, + const FitDataIterator &fitDataBegin, const FitDataIterator &fitDataEnd); boost::weak_ptr<Mantid::API::WorkspaceGroup> m_resultGroup; boost::weak_ptr<Mantid::API::WorkspaceGroup> m_resultWorkspace; diff --git a/qt/scientific_interfaces/Indirect/IndirectFitOutputLegacy.cpp b/qt/scientific_interfaces/Indirect/IndirectFitOutputLegacy.cpp index 637942957e83b9e0c1f94f879d9ab3b1e72f7cd2..0fce2d58734799ad1cc3c112478051d732c55255 100644 --- a/qt/scientific_interfaces/Indirect/IndirectFitOutputLegacy.cpp +++ b/qt/scientific_interfaces/Indirect/IndirectFitOutputLegacy.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "IndirectFitOutputLegacy.h" @@ -14,6 +14,7 @@ #include <boost/functional/hash.hpp> #include <unordered_set> +#include <utility> using namespace Mantid::API; @@ -22,7 +23,7 @@ using namespace MantidQt::CustomInterfaces::IDA; struct TableRowExtractor { explicit TableRowExtractor(ITableWorkspace_sptr table) - : m_table(table), m_columns(m_table->getColumnNames()) { + : m_table(std::move(table)), m_columns(m_table->getColumnNames()) { m_chiIndex = std::find(m_columns.begin(), m_columns.end(), "Chi_squared") - m_columns.begin(); } @@ -74,7 +75,7 @@ void extractParametersFromTable( const FitDataIteratorLegacy &fitDataEnd, std::unordered_map<IndirectFitDataLegacy const *, ParameterValues> ¶meters) { - TableRowExtractor extractRowFromTable(tableWs); + TableRowExtractor extractRowFromTable(std::move(tableWs)); auto extract = [&](IndirectFitDataLegacy const *inputData) { auto &values = extractOrAddDefault(parameters, inputData); return [&](std::size_t index, std::size_t spectrum) { @@ -115,8 +116,9 @@ Map mapKeys(const Map &map, const KeyMap &keyMap) { return newMap; } -MatrixWorkspace_sptr getMatrixWorkspaceFromGroup(WorkspaceGroup_sptr group, - std::size_t index) { +MatrixWorkspace_sptr +getMatrixWorkspaceFromGroup(const WorkspaceGroup_sptr &group, + std::size_t index) { if (group->size() > index) return boost::dynamic_pointer_cast<MatrixWorkspace>(group->getItem(index)); return nullptr; @@ -130,7 +132,7 @@ std::vector<std::string> getAxisLabels(TextAxis const *axis) { return labels; } -std::vector<std::string> getAxisLabels(MatrixWorkspace_sptr workspace, +std::vector<std::string> getAxisLabels(const MatrixWorkspace_sptr &workspace, std::size_t index) { auto axis = dynamic_cast<TextAxis *>(workspace->getAxis(index)); if (axis) @@ -165,12 +167,12 @@ void renameWorkspace(std::string const &name, std::string const &newName) { renamer->execute(); } -void renameResult(Workspace_sptr resultWorkspace, +void renameResult(const Workspace_sptr &resultWorkspace, const std::string &workspaceName) { renameWorkspace(resultWorkspace->getName(), workspaceName + "_Result"); } -void renameResult(Workspace_sptr resultWorkspace, +void renameResult(const Workspace_sptr &resultWorkspace, IndirectFitDataLegacy const *fitData) { const auto name = resultWorkspace->getName(); const auto newName = constructResultName(name, fitData); @@ -178,13 +180,13 @@ void renameResult(Workspace_sptr resultWorkspace, renameWorkspace(name, newName); } -void renameResult(WorkspaceGroup_sptr resultWorkspace, +void renameResult(const WorkspaceGroup_sptr &resultWorkspace, IndirectFitDataLegacy const *fitData) { for (auto const &workspace : *resultWorkspace) renameResult(workspace, fitData); } -void renameResultWithoutSpectra(WorkspaceGroup_sptr resultWorkspace, +void renameResultWithoutSpectra(const WorkspaceGroup_sptr &resultWorkspace, const FitDataIteratorLegacy &fitDataBegin, const FitDataIteratorLegacy &fitDataEnd) { std::size_t index = 0; @@ -199,7 +201,7 @@ void renameResultWithoutSpectra(WorkspaceGroup_sptr resultWorkspace, } } -void renameResultWithSpectra(WorkspaceGroup_sptr resultWorkspace, +void renameResultWithSpectra(const WorkspaceGroup_sptr &resultWorkspace, const FitDataIteratorLegacy &fitDataBegin, const FitDataIteratorLegacy &fitDataEnd) { std::size_t index = 0; @@ -207,7 +209,7 @@ void renameResultWithSpectra(WorkspaceGroup_sptr resultWorkspace, renameResult(resultWorkspace->getItem(index++), it->get()); } -void renameResult(WorkspaceGroup_sptr resultWorkspace, +void renameResult(const WorkspaceGroup_sptr &resultWorkspace, const FitDataIteratorLegacy &fitDataBegin, const FitDataIteratorLegacy &fitDataEnd) { if (static_cast<int>(resultWorkspace->size()) >= fitDataEnd - fitDataBegin) @@ -230,7 +232,7 @@ public: WorkspaceGroup_sptr resultGroup, ResultLocations &locations, std::unordered_map<std::size_t, std::size_t> &defaultPositions, std::size_t &index) - : m_resultGroup(resultGroup), m_locations(locations), + : m_resultGroup(std::move(resultGroup)), m_locations(locations), m_defaultPositions(defaultPositions), m_index(index) {} void operator()(std::size_t spectrum) const { @@ -264,23 +266,24 @@ namespace CustomInterfaces { namespace IDA { IndirectFitOutputLegacy::IndirectFitOutputLegacy( - WorkspaceGroup_sptr resultGroup, ITableWorkspace_sptr parameterTable, - WorkspaceGroup_sptr resultWorkspace, + const WorkspaceGroup_sptr &resultGroup, ITableWorkspace_sptr parameterTable, + const WorkspaceGroup_sptr &resultWorkspace, const FitDataIteratorLegacy &fitDataBegin, const FitDataIteratorLegacy &fitDataEnd) : m_resultGroup(resultGroup), m_resultWorkspace(resultWorkspace), m_parameters(), m_outputResultLocations() { - addOutput(resultGroup, parameterTable, resultWorkspace, fitDataBegin, - fitDataEnd); + addOutput(resultGroup, std::move(parameterTable), resultWorkspace, + fitDataBegin, fitDataEnd); } IndirectFitOutputLegacy::IndirectFitOutputLegacy( - WorkspaceGroup_sptr resultGroup, ITableWorkspace_sptr parameterTable, - WorkspaceGroup_sptr resultWorkspace, IndirectFitDataLegacy const *fitData, - std::size_t spectrum) { + const WorkspaceGroup_sptr &resultGroup, ITableWorkspace_sptr parameterTable, + const WorkspaceGroup_sptr &resultWorkspace, + IndirectFitDataLegacy const *fitData, std::size_t spectrum) { m_parameters[fitData] = ParameterValues(); m_outputResultLocations[fitData] = ResultLocations(); - addOutput(resultGroup, parameterTable, resultWorkspace, fitData, spectrum); + addOutput(std::move(resultGroup), std::move(parameterTable), + std::move(resultWorkspace), fitData, spectrum); } bool IndirectFitOutputLegacy::isSpectrumFit( @@ -349,23 +352,22 @@ void IndirectFitOutputLegacy::mapParameterNames( } void IndirectFitOutputLegacy::addOutput( - WorkspaceGroup_sptr resultGroup, ITableWorkspace_sptr parameterTable, - WorkspaceGroup_sptr resultWorkspace, + const WorkspaceGroup_sptr &resultGroup, ITableWorkspace_sptr parameterTable, + const WorkspaceGroup_sptr &resultWorkspace, const FitDataIteratorLegacy &fitDataBegin, const FitDataIteratorLegacy &fitDataEnd) { - updateParameters(parameterTable, fitDataBegin, fitDataEnd); + updateParameters(std::move(parameterTable), fitDataBegin, fitDataEnd); updateFitResults(resultGroup, fitDataBegin, fitDataEnd); renameResult(resultWorkspace, fitDataBegin, fitDataEnd); m_resultWorkspace = resultWorkspace; m_resultGroup = resultGroup; } -void IndirectFitOutputLegacy::addOutput(WorkspaceGroup_sptr resultGroup, - ITableWorkspace_sptr parameterTable, - WorkspaceGroup_sptr resultWorkspace, - IndirectFitDataLegacy const *fitData, - std::size_t spectrum) { - TableRowExtractor extractRowFromTable(parameterTable); +void IndirectFitOutputLegacy::addOutput( + const WorkspaceGroup_sptr &resultGroup, ITableWorkspace_sptr parameterTable, + const WorkspaceGroup_sptr &resultWorkspace, + IndirectFitDataLegacy const *fitData, std::size_t spectrum) { + TableRowExtractor extractRowFromTable(std::move(parameterTable)); m_parameters[fitData][spectrum] = extractRowFromTable(0); m_outputResultLocations[fitData][spectrum] = ResultLocation(resultGroup, 0); renameResult(resultWorkspace, fitData); @@ -380,7 +382,8 @@ void IndirectFitOutputLegacy::removeOutput( } void IndirectFitOutputLegacy::updateFitResults( - WorkspaceGroup_sptr resultGroup, const FitDataIteratorLegacy &fitDataBegin, + const WorkspaceGroup_sptr &resultGroup, + const FitDataIteratorLegacy &fitDataBegin, const FitDataIteratorLegacy &fitDataEnd) { if (numberOfSpectraIn(fitDataBegin, fitDataEnd) <= resultGroup->size()) updateFitResultsFromStructured(resultGroup, fitDataBegin, fitDataEnd); @@ -392,8 +395,8 @@ void IndirectFitOutputLegacy::updateParameters( ITableWorkspace_sptr parameterTable, const FitDataIteratorLegacy &fitDataBegin, const FitDataIteratorLegacy &fitDataEnd) { - extractParametersFromTable(parameterTable, fitDataBegin, fitDataEnd, - m_parameters); + extractParametersFromTable(std::move(parameterTable), fitDataBegin, + fitDataEnd, m_parameters); } void IndirectFitOutputLegacy::updateFitResultsFromUnstructured( diff --git a/qt/scientific_interfaces/Indirect/IndirectFitOutputLegacy.h b/qt/scientific_interfaces/Indirect/IndirectFitOutputLegacy.h index 6721b3402dddeaa92329662494b9484aef6935fd..7dc61035373a1c45b570e16469947dc6cc605da0 100644 --- a/qt/scientific_interfaces/Indirect/IndirectFitOutputLegacy.h +++ b/qt/scientific_interfaces/Indirect/IndirectFitOutputLegacy.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -30,7 +30,7 @@ struct ParameterValueLegacy { struct ResultLocation { ResultLocation() : result(), index(0) {} - ResultLocation(Mantid::API::WorkspaceGroup_sptr group, std::size_t i) + ResultLocation(const Mantid::API::WorkspaceGroup_sptr &group, std::size_t i) : result(group), index(i) {} boost::weak_ptr<Mantid::API::WorkspaceGroup> result; std::size_t index; @@ -51,17 +51,18 @@ using FitDataIteratorLegacy = */ class MANTIDQT_INDIRECT_DLL IndirectFitOutputLegacy { public: - IndirectFitOutputLegacy(Mantid::API::WorkspaceGroup_sptr resultGroup, - Mantid::API::ITableWorkspace_sptr parameterTable, - Mantid::API::WorkspaceGroup_sptr resultWorkspace, - const FitDataIteratorLegacy &fitDataBegin, - const FitDataIteratorLegacy &fitDataEnd); - - IndirectFitOutputLegacy(Mantid::API::WorkspaceGroup_sptr resultGroup, - Mantid::API::ITableWorkspace_sptr parameterTable, - Mantid::API::WorkspaceGroup_sptr resultWorkspace, - IndirectFitDataLegacy const *fitData, - std::size_t spectrum); + IndirectFitOutputLegacy( + const Mantid::API::WorkspaceGroup_sptr &resultGroup, + Mantid::API::ITableWorkspace_sptr parameterTable, + const Mantid::API::WorkspaceGroup_sptr &resultWorkspace, + const FitDataIteratorLegacy &fitDataBegin, + const FitDataIteratorLegacy &fitDataEnd); + + IndirectFitOutputLegacy( + const Mantid::API::WorkspaceGroup_sptr &resultGroup, + Mantid::API::ITableWorkspace_sptr parameterTable, + const Mantid::API::WorkspaceGroup_sptr &resultWorkspace, + IndirectFitDataLegacy const *fitData, std::size_t spectrum); bool isSpectrumFit(IndirectFitDataLegacy const *fitData, std::size_t spectrum) const; @@ -88,20 +89,20 @@ public: const std::unordered_map<std::string, std::string> ¶meterNameChanges, IndirectFitDataLegacy const *fitData, std::size_t spectrum); - void addOutput(Mantid::API::WorkspaceGroup_sptr resultGroup, + void addOutput(const Mantid::API::WorkspaceGroup_sptr &resultGroup, Mantid::API::ITableWorkspace_sptr parameterTable, - Mantid::API::WorkspaceGroup_sptr resultWorkspace, + const Mantid::API::WorkspaceGroup_sptr &resultWorkspace, const FitDataIteratorLegacy &fitDataBegin, const FitDataIteratorLegacy &fitDataEnd); - void addOutput(Mantid::API::WorkspaceGroup_sptr resultGroup, + void addOutput(const Mantid::API::WorkspaceGroup_sptr &resultGroup, Mantid::API::ITableWorkspace_sptr parameterTable, - Mantid::API::WorkspaceGroup_sptr resultWorkspace, + const Mantid::API::WorkspaceGroup_sptr &resultWorkspace, IndirectFitDataLegacy const *fitData, std::size_t spectrum); void removeOutput(IndirectFitDataLegacy const *fitData); private: - void updateFitResults(Mantid::API::WorkspaceGroup_sptr resultGroup, + void updateFitResults(const Mantid::API::WorkspaceGroup_sptr &resultGroup, const FitDataIteratorLegacy &fitDataBegin, const FitDataIteratorLegacy &fitDataEnd); void updateParameters(Mantid::API::ITableWorkspace_sptr parameterTable, diff --git a/qt/scientific_interfaces/Indirect/IndirectFitOutputOptionsModel.cpp b/qt/scientific_interfaces/Indirect/IndirectFitOutputOptionsModel.cpp index 05743bf9d08579b5a5f47dfedbc49eebfe3dd6e6..d946dbe86babef55436b78ab98c7d7ac66ed7f13 100644 --- a/qt/scientific_interfaces/Indirect/IndirectFitOutputOptionsModel.cpp +++ b/qt/scientific_interfaces/Indirect/IndirectFitOutputOptionsModel.cpp @@ -1,11 +1,13 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "IndirectFitOutputOptionsModel.h" +#include <utility> + #include "MantidAPI/AlgorithmManager.h" #include "MantidAPI/AnalysisDataService.h" #include "MantidAPI/Axis.h" @@ -20,11 +22,11 @@ std::string noWorkspaceErrorMessage(std::string const &process) { return "The " + process + " of a workspace failed:\n\n No workspace found"; } -MatrixWorkspace_sptr convertToMatrixWorkspace(Workspace_sptr workspace) { +MatrixWorkspace_sptr convertToMatrixWorkspace(const Workspace_sptr &workspace) { return boost::dynamic_pointer_cast<MatrixWorkspace>(workspace); } -WorkspaceGroup_sptr convertToGroupWorkspace(Workspace_sptr workspace) { +WorkspaceGroup_sptr convertToGroupWorkspace(const Workspace_sptr &workspace) { return boost::dynamic_pointer_cast<WorkspaceGroup>(workspace); } @@ -50,7 +52,7 @@ std::unordered_map<std::string, std::size_t> extractAxisLabels(Axis *axis) { } std::unordered_map<std::string, std::size_t> -extractAxisLabels(MatrixWorkspace_const_sptr workspace, +extractAxisLabels(const MatrixWorkspace_const_sptr &workspace, std::size_t const &axisIndex) { auto const axis = workspace->getAxis(axisIndex); if (axis->isText()) @@ -67,18 +69,20 @@ std::vector<std::string> extractParameterNames(Axis *axis) { return parameters; } -std::vector<std::string> extractParameterNames(MatrixWorkspace_sptr workspace) { +std::vector<std::string> +extractParameterNames(const MatrixWorkspace_sptr &workspace) { auto const axis = workspace->getAxis(1); if (axis->isText()) return extractParameterNames(axis); return std::vector<std::string>(); } -std::vector<std::string> extractParameterNames(Workspace_sptr workspace) { - return extractParameterNames(convertToMatrixWorkspace(workspace)); +std::vector<std::string> +extractParameterNames(const Workspace_sptr &workspace) { + return extractParameterNames(convertToMatrixWorkspace(std::move(workspace))); } -IAlgorithm_sptr saveNexusProcessedAlgorithm(Workspace_sptr workspace, +IAlgorithm_sptr saveNexusProcessedAlgorithm(const Workspace_sptr &workspace, std::string const &filename) { auto saveAlg = AlgorithmManager::Instance().create("SaveNexusProcessed"); saveAlg->setProperty("InputWorkspace", workspace); @@ -86,23 +90,24 @@ IAlgorithm_sptr saveNexusProcessedAlgorithm(Workspace_sptr workspace, return saveAlg; } -void saveWorkspace(Workspace_sptr workspace) { +void saveWorkspace(const Workspace_sptr &workspace) { auto const filename = Mantid::Kernel::ConfigService::Instance().getString( "defaultsave.directory") + workspace->getName() + ".nxs"; saveNexusProcessedAlgorithm(workspace, filename)->execute(); } -void saveWorkspacesInGroup(WorkspaceGroup_const_sptr group) { +void saveWorkspacesInGroup(const WorkspaceGroup_const_sptr &group) { for (auto const workspace : *group) saveWorkspace(workspace); } -bool workspaceIsPlottable(MatrixWorkspace_const_sptr workspace) { +bool workspaceIsPlottable(const MatrixWorkspace_const_sptr &workspace) { return workspace->y(0).size() > 1; } -bool containsPlottableWorkspace(WorkspaceGroup_const_sptr groupWorkspace) { +bool containsPlottableWorkspace( + const WorkspaceGroup_const_sptr &groupWorkspace) { return std::any_of(groupWorkspace->begin(), groupWorkspace->end(), [](auto const &workspace) { return workspaceIsPlottable( @@ -126,8 +131,8 @@ validateInputs(std::string const &inputWorkspaceName, return errors; } -IAlgorithm_sptr replaceAlgorithm(MatrixWorkspace_sptr inputWorkspace, - MatrixWorkspace_sptr singleFitWorkspace, +IAlgorithm_sptr replaceAlgorithm(const MatrixWorkspace_sptr &inputWorkspace, + const MatrixWorkspace_sptr &singleFitWorkspace, std::string const &outputName) { auto replaceAlg = AlgorithmManager::Instance().create("IndirectReplaceFitResult"); @@ -159,7 +164,7 @@ std::vector<std::string> filterByEndSuffix(std::vector<std::string> &strings, } bool doesGroupContain(std::string const &groupName, - MatrixWorkspace_sptr workspace) { + const MatrixWorkspace_sptr &workspace) { auto const adsWorkspace = getADSWorkspace(groupName); if (adsWorkspace->isGroup()) { auto const group = @@ -180,7 +185,9 @@ std::string filterByContents(std::vector<std::string> &strings, std::string findGroupWorkspaceContaining(MatrixWorkspace_sptr workspace) { auto workspaceNames = AnalysisDataService::Instance().getObjectNames(); auto resultGroups = filterByEndSuffix(workspaceNames, "_Results"); - return !resultGroups.empty() ? filterByContents(resultGroups, workspace) : ""; + return !resultGroups.empty() + ? filterByContents(resultGroups, std::move(workspace)) + : ""; } } // namespace @@ -247,7 +254,8 @@ void IndirectFitOutputOptionsModel::plotResult(std::string const &plotType) { } void IndirectFitOutputOptionsModel::plotResult( - WorkspaceGroup_const_sptr groupWorkspace, std::string const &plotType) { + const WorkspaceGroup_const_sptr &groupWorkspace, + std::string const &plotType) { if (plotType == "All") plotAll(groupWorkspace); else @@ -255,19 +263,19 @@ void IndirectFitOutputOptionsModel::plotResult( } void IndirectFitOutputOptionsModel::plotAll( - WorkspaceGroup_const_sptr groupWorkspace) { + const WorkspaceGroup_const_sptr &groupWorkspace) { for (auto const &workspace : *groupWorkspace) plotAll(convertToMatrixWorkspace(workspace)); } void IndirectFitOutputOptionsModel::plotAll( - MatrixWorkspace_const_sptr workspace) { + const MatrixWorkspace_const_sptr &workspace) { if (workspaceIsPlottable(workspace)) plotAllSpectra(workspace); } void IndirectFitOutputOptionsModel::plotAllSpectra( - MatrixWorkspace_const_sptr workspace) { + const MatrixWorkspace_const_sptr &workspace) { for (auto index = 0u; index < workspace->getNumberHistograms(); ++index) { auto const plotInfo = std::make_pair(workspace->getName(), index); m_spectraToPlot.emplace_back(plotInfo); @@ -275,19 +283,20 @@ void IndirectFitOutputOptionsModel::plotAllSpectra( } void IndirectFitOutputOptionsModel::plotParameter( - WorkspaceGroup_const_sptr groupWorkspace, std::string const ¶meter) { + const WorkspaceGroup_const_sptr &groupWorkspace, + std::string const ¶meter) { for (auto const &workspace : *groupWorkspace) plotParameter(convertToMatrixWorkspace(workspace), parameter); } void IndirectFitOutputOptionsModel::plotParameter( - MatrixWorkspace_const_sptr workspace, std::string const ¶meter) { + const MatrixWorkspace_const_sptr &workspace, std::string const ¶meter) { if (workspaceIsPlottable(workspace)) plotParameterSpectrum(workspace, parameter); } void IndirectFitOutputOptionsModel::plotParameterSpectrum( - MatrixWorkspace_const_sptr workspace, std::string const ¶meter) { + const MatrixWorkspace_const_sptr &workspace, std::string const ¶meter) { auto const parameters = extractAxisLabels(workspace, 1); auto const iter = parameters.find(parameter); if (iter != parameters.end()) { @@ -306,7 +315,7 @@ void IndirectFitOutputOptionsModel::plotPDF(std::string const &workspaceName, } void IndirectFitOutputOptionsModel::plotPDF( - MatrixWorkspace_const_sptr workspace, std::string const &plotType) { + const MatrixWorkspace_const_sptr &workspace, std::string const &plotType) { if (plotType == "All") plotAll(workspace); else @@ -353,16 +362,17 @@ void IndirectFitOutputOptionsModel::replaceFitResult( } void IndirectFitOutputOptionsModel::replaceFitResult( - MatrixWorkspace_sptr inputWorkspace, - MatrixWorkspace_sptr singleFitWorkspace, std::string const &outputName) { - auto const replaceAlg = - replaceAlgorithm(inputWorkspace, singleFitWorkspace, outputName); + const MatrixWorkspace_sptr &inputWorkspace, + const MatrixWorkspace_sptr &singleFitWorkspace, + std::string const &outputName) { + auto const replaceAlg = replaceAlgorithm( + std::move(inputWorkspace), std::move(singleFitWorkspace), outputName); replaceAlg->execute(); setOutputAsResultWorkspace(replaceAlg); } void IndirectFitOutputOptionsModel::setOutputAsResultWorkspace( - IAlgorithm_sptr algorithm) { + const IAlgorithm_sptr &algorithm) { auto const outputName = algorithm->getPropertyValue("OutputWorkspace"); auto const output = getADSMatrixWorkspace(outputName); setResultWorkspace(findGroupWorkspaceContaining(output)); diff --git a/qt/scientific_interfaces/Indirect/IndirectFitOutputOptionsModel.h b/qt/scientific_interfaces/Indirect/IndirectFitOutputOptionsModel.h index afc07506761b66f65407c98032a5c721ff8ff91e..958fc3823a18d19efb74bb2854f0ff190f5c8949 100644 --- a/qt/scientific_interfaces/Indirect/IndirectFitOutputOptionsModel.h +++ b/qt/scientific_interfaces/Indirect/IndirectFitOutputOptionsModel.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -59,25 +59,29 @@ public: std::string const &outputName) override; private: - void plotResult(Mantid::API::WorkspaceGroup_const_sptr groupWorkspace, + void plotResult(const Mantid::API::WorkspaceGroup_const_sptr &groupWorkspace, std::string const &plotType); - void plotAll(Mantid::API::WorkspaceGroup_const_sptr groupWorkspace); - void plotAll(Mantid::API::MatrixWorkspace_const_sptr workspace); - void plotAllSpectra(Mantid::API::MatrixWorkspace_const_sptr workspace); - void plotParameter(Mantid::API::WorkspaceGroup_const_sptr groupWorkspace, - std::string const ¶meter); - void plotParameter(Mantid::API::MatrixWorkspace_const_sptr workspace, + void plotAll(const Mantid::API::WorkspaceGroup_const_sptr &groupWorkspace); + void plotAll(const Mantid::API::MatrixWorkspace_const_sptr &workspace); + void plotAllSpectra(const Mantid::API::MatrixWorkspace_const_sptr &workspace); + void + plotParameter(const Mantid::API::WorkspaceGroup_const_sptr &groupWorkspace, + std::string const ¶meter); + void plotParameter(const Mantid::API::MatrixWorkspace_const_sptr &workspace, std::string const ¶meter); - void plotParameterSpectrum(Mantid::API::MatrixWorkspace_const_sptr workspace, - std::string const ¶meter); + void plotParameterSpectrum( + const Mantid::API::MatrixWorkspace_const_sptr &workspace, + std::string const ¶meter); - void plotPDF(Mantid::API::MatrixWorkspace_const_sptr workspace, + void plotPDF(const Mantid::API::MatrixWorkspace_const_sptr &workspace, std::string const &plotType); - void replaceFitResult(Mantid::API::MatrixWorkspace_sptr inputWorkspace, - Mantid::API::MatrixWorkspace_sptr singleFitWorkspace, - std::string const &outputName); - void setOutputAsResultWorkspace(Mantid::API::IAlgorithm_sptr algorithm); + void + replaceFitResult(const Mantid::API::MatrixWorkspace_sptr &inputWorkspace, + const Mantid::API::MatrixWorkspace_sptr &singleFitWorkspace, + std::string const &outputName); + void + setOutputAsResultWorkspace(const Mantid::API::IAlgorithm_sptr &algorithm); void setResultWorkspace(std::string const &groupName); Mantid::API::WorkspaceGroup_sptr m_resultGroup; diff --git a/qt/scientific_interfaces/Indirect/IndirectFitOutputOptionsPresenter.cpp b/qt/scientific_interfaces/Indirect/IndirectFitOutputOptionsPresenter.cpp index c9a9e1d932a117edde47ff4bf15bc2ef9abf5abd..01a58541e8871c6b38ce39c714aea3942ffe4dcf 100644 --- a/qt/scientific_interfaces/Indirect/IndirectFitOutputOptionsPresenter.cpp +++ b/qt/scientific_interfaces/Indirect/IndirectFitOutputOptionsPresenter.cpp @@ -1,11 +1,13 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "IndirectFitOutputOptionsPresenter.h" +#include <utility> + using namespace Mantid::API; namespace MantidQt { @@ -56,12 +58,12 @@ void IndirectFitOutputOptionsPresenter::setAvailablePlotOptions( void IndirectFitOutputOptionsPresenter::setResultWorkspace( WorkspaceGroup_sptr groupWorkspace) { - m_model->setResultWorkspace(groupWorkspace); + m_model->setResultWorkspace(std::move(groupWorkspace)); } void IndirectFitOutputOptionsPresenter::setPDFWorkspace( WorkspaceGroup_sptr groupWorkspace) { - m_model->setPDFWorkspace(groupWorkspace); + m_model->setPDFWorkspace(std::move(groupWorkspace)); } void IndirectFitOutputOptionsPresenter::setPlotWorkspaces() { diff --git a/qt/scientific_interfaces/Indirect/IndirectFitOutputOptionsPresenter.h b/qt/scientific_interfaces/Indirect/IndirectFitOutputOptionsPresenter.h index 7338fee5ee6d4a52a5e3576c35a4a370b55f13cf..52f3841cb5a17d499d74bdf94202fac43ff08ddf 100644 --- a/qt/scientific_interfaces/Indirect/IndirectFitOutputOptionsPresenter.h +++ b/qt/scientific_interfaces/Indirect/IndirectFitOutputOptionsPresenter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Indirect/IndirectFitOutputOptionsView.cpp b/qt/scientific_interfaces/Indirect/IndirectFitOutputOptionsView.cpp index 280d4913e34b6a2692bed40a511823b52f89132f..7e4eb6302858fac41d4538edf88665d5a9fed0ca 100644 --- a/qt/scientific_interfaces/Indirect/IndirectFitOutputOptionsView.cpp +++ b/qt/scientific_interfaces/Indirect/IndirectFitOutputOptionsView.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "IndirectFitOutputOptionsView.h" diff --git a/qt/scientific_interfaces/Indirect/IndirectFitOutputOptionsView.h b/qt/scientific_interfaces/Indirect/IndirectFitOutputOptionsView.h index 103d4e8ea9a9787e4916848901b9b83269113601..37cd76959d57d2e6c98a142bfc29f1e1e1266c69 100644 --- a/qt/scientific_interfaces/Indirect/IndirectFitOutputOptionsView.h +++ b/qt/scientific_interfaces/Indirect/IndirectFitOutputOptionsView.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Indirect/IndirectFitPlotModel.cpp b/qt/scientific_interfaces/Indirect/IndirectFitPlotModel.cpp index 35d63572eeefcd0c46c164fdf6306fde548e37f9..e0663de8ace8189e0510bd4c6aed94ae6b486b9b 100644 --- a/qt/scientific_interfaces/Indirect/IndirectFitPlotModel.cpp +++ b/qt/scientific_interfaces/Indirect/IndirectFitPlotModel.cpp @@ -1,11 +1,13 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "IndirectFitPlotModel.h" +#include <utility> + #include "MantidAPI/AlgorithmManager.h" #include "MantidAPI/AnalysisDataService.h" #include "MantidAPI/FunctionDomain1D.h" @@ -25,9 +27,10 @@ IFunction_sptr firstFunctionWithParameter(IFunction_sptr function, const std::string &category, const std::string ¶meterName); -IFunction_sptr firstFunctionWithParameter(CompositeFunction_sptr composite, - const std::string &category, - const std::string ¶meterName) { +IFunction_sptr +firstFunctionWithParameter(const CompositeFunction_sptr &composite, + const std::string &category, + const std::string ¶meterName) { for (auto i = 0u; i < composite->nFunctions(); ++i) { const auto value = firstFunctionWithParameter(composite->getFunction(i), category, parameterName); @@ -50,7 +53,7 @@ IFunction_sptr firstFunctionWithParameter(IFunction_sptr function, return nullptr; } -boost::optional<double> firstParameterValue(IFunction_sptr function, +boost::optional<double> firstParameterValue(const IFunction_sptr &function, const std::string &category, const std::string ¶meterName) { if (!function) @@ -63,22 +66,24 @@ boost::optional<double> firstParameterValue(IFunction_sptr function, return boost::none; } -boost::optional<double> findFirstPeakCentre(IFunction_sptr function) { - return firstParameterValue(function, "Peak", "PeakCentre"); +boost::optional<double> findFirstPeakCentre(const IFunction_sptr &function) { + return firstParameterValue(std::move(function), "Peak", "PeakCentre"); } -boost::optional<double> findFirstFWHM(IFunction_sptr function) { - return firstParameterValue(function, "Peak", "FWHM"); +boost::optional<double> findFirstFWHM(const IFunction_sptr &function) { + return firstParameterValue(std::move(function), "Peak", "FWHM"); } -boost::optional<double> findFirstBackgroundLevel(IFunction_sptr function) { - return firstParameterValue(function, "Background", "A0"); +boost::optional<double> +findFirstBackgroundLevel(const IFunction_sptr &function) { + return firstParameterValue(std::move(function), "Background", "A0"); } -void setFunctionParameters(IFunction_sptr function, const std::string &category, +void setFunctionParameters(const IFunction_sptr &function, + const std::string &category, const std::string ¶meterName, double value); -void setFunctionParameters(CompositeFunction_sptr composite, +void setFunctionParameters(const CompositeFunction_sptr &composite, const std::string &category, const std::string ¶meterName, double value) { for (auto i = 0u; i < composite->nFunctions(); ++i) @@ -86,7 +91,8 @@ void setFunctionParameters(CompositeFunction_sptr composite, value); } -void setFunctionParameters(IFunction_sptr function, const std::string &category, +void setFunctionParameters(const IFunction_sptr &function, + const std::string &category, const std::string ¶meterName, double value) { if (function->category() == category && function->hasParameter(parameterName)) function->setParameter(parameterName, value); @@ -96,7 +102,7 @@ void setFunctionParameters(IFunction_sptr function, const std::string &category, setFunctionParameters(composite, category, parameterName, value); } -void setFunctionParameters(MultiDomainFunction_sptr function, +void setFunctionParameters(const MultiDomainFunction_sptr &function, const std::string &category, const std::string ¶meterName, double value) { for (size_t i = 0u; i < function->nFunctions(); ++i) @@ -105,11 +111,11 @@ void setFunctionParameters(MultiDomainFunction_sptr function, } void setFirstBackground(IFunction_sptr function, double value) { - firstFunctionWithParameter(function, "Background", "A0") + firstFunctionWithParameter(std::move(function), "Background", "A0") ->setParameter("A0", value); } -MatrixWorkspace_sptr castToMatrixWorkspace(Workspace_sptr workspace) { +MatrixWorkspace_sptr castToMatrixWorkspace(const Workspace_sptr &workspace) { return boost::dynamic_pointer_cast<MatrixWorkspace>(workspace); } @@ -297,9 +303,9 @@ MatrixWorkspace_sptr IndirectFitPlotModel::getGuessWorkspace() const { } MatrixWorkspace_sptr IndirectFitPlotModel::appendGuessToInput( - MatrixWorkspace_sptr guessWorkspace) const { + const MatrixWorkspace_sptr &guessWorkspace) const { const auto range = getGuessRange(); - return createInputAndGuessWorkspace(getWorkspace(), guessWorkspace, + return createInputAndGuessWorkspace(getWorkspace(), std::move(guessWorkspace), m_activeSpectrum.value, range.first, range.second); } @@ -311,8 +317,9 @@ std::pair<double, double> IndirectFitPlotModel::getGuessRange() const { } MatrixWorkspace_sptr IndirectFitPlotModel::createInputAndGuessWorkspace( - MatrixWorkspace_sptr inputWS, MatrixWorkspace_sptr guessWorkspace, - int spectrum, double startX, double endX) const { + const MatrixWorkspace_sptr &inputWS, + const MatrixWorkspace_sptr &guessWorkspace, int spectrum, double startX, + double endX) const { guessWorkspace->setInstrument(inputWS->getInstrument()); guessWorkspace->replaceAxis( 0, @@ -331,10 +338,9 @@ MatrixWorkspace_sptr IndirectFitPlotModel::createInputAndGuessWorkspace( return inputAndGuess; } -MatrixWorkspace_sptr -IndirectFitPlotModel::createGuessWorkspace(MatrixWorkspace_sptr inputWorkspace, - IFunction_const_sptr func, - double startX, double endX) const { +MatrixWorkspace_sptr IndirectFitPlotModel::createGuessWorkspace( + const MatrixWorkspace_sptr &inputWorkspace, + const IFunction_const_sptr &func, double startX, double endX) const { IAlgorithm_sptr createWsAlg = AlgorithmManager::Instance().create("EvaluateFunction"); createWsAlg->initialize(); @@ -354,7 +360,7 @@ IndirectFitPlotModel::createGuessWorkspace(MatrixWorkspace_sptr inputWorkspace, } std::vector<double> -IndirectFitPlotModel::computeOutput(IFunction_const_sptr func, +IndirectFitPlotModel::computeOutput(const IFunction_const_sptr &func, const std::vector<double> &dataX) const { if (dataX.empty()) return std::vector<double>(); @@ -385,7 +391,7 @@ IAlgorithm_sptr IndirectFitPlotModel::createWorkspaceAlgorithm( } MatrixWorkspace_sptr -IndirectFitPlotModel::extractSpectra(MatrixWorkspace_sptr inputWS, +IndirectFitPlotModel::extractSpectra(const MatrixWorkspace_sptr &inputWS, int startIndex, int endIndex, double startX, double endX) const { auto extractSpectraAlg = @@ -403,9 +409,9 @@ IndirectFitPlotModel::extractSpectra(MatrixWorkspace_sptr inputWS, return extractSpectraAlg->getProperty("OutputWorkspace"); } -MatrixWorkspace_sptr -IndirectFitPlotModel::appendSpectra(MatrixWorkspace_sptr inputWS, - MatrixWorkspace_sptr spectraWS) const { +MatrixWorkspace_sptr IndirectFitPlotModel::appendSpectra( + const MatrixWorkspace_sptr &inputWS, + const MatrixWorkspace_sptr &spectraWS) const { auto appendSpectraAlg = AlgorithmManager::Instance().create("AppendSpectra"); appendSpectraAlg->initialize(); appendSpectraAlg->setChild(true); @@ -418,8 +424,8 @@ IndirectFitPlotModel::appendSpectra(MatrixWorkspace_sptr inputWS, } MatrixWorkspace_sptr -IndirectFitPlotModel::cropWorkspace(MatrixWorkspace_sptr inputWS, double startX, - double endX, int startIndex, +IndirectFitPlotModel::cropWorkspace(const MatrixWorkspace_sptr &inputWS, + double startX, double endX, int startIndex, int endIndex) const { const auto cropAlg = AlgorithmManager::Instance().create("CropWorkspace"); cropAlg->initialize(); diff --git a/qt/scientific_interfaces/Indirect/IndirectFitPlotModel.h b/qt/scientific_interfaces/Indirect/IndirectFitPlotModel.h index aa7d396bfc13cffa77cff6854b14f57ab19704cb..9d8603612c19e00593d96e09e429c6deacc238e9 100644 --- a/qt/scientific_interfaces/Indirect/IndirectFitPlotModel.h +++ b/qt/scientific_interfaces/Indirect/IndirectFitPlotModel.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -30,8 +30,8 @@ public: Mantid::API::MatrixWorkspace_sptr getGuessWorkspace() const; Spectra getSpectra() const; - Mantid::API::MatrixWorkspace_sptr - appendGuessToInput(Mantid::API::MatrixWorkspace_sptr guessWorkspace) const; + Mantid::API::MatrixWorkspace_sptr appendGuessToInput( + const Mantid::API::MatrixWorkspace_sptr &guessWorkspace) const; TableDatasetIndex getActiveDataIndex() const; WorkspaceIndex getActiveSpectrum() const; @@ -62,18 +62,19 @@ public: private: std::pair<double, double> getGuessRange() const; - Mantid::API::MatrixWorkspace_sptr - createInputAndGuessWorkspace(Mantid::API::MatrixWorkspace_sptr inputWS, - Mantid::API::MatrixWorkspace_sptr guessWorkspace, - int spectrum, double startX, double endX) const; + Mantid::API::MatrixWorkspace_sptr createInputAndGuessWorkspace( + const Mantid::API::MatrixWorkspace_sptr &inputWS, + const Mantid::API::MatrixWorkspace_sptr &guessWorkspace, int spectrum, + double startX, double endX) const; Mantid::API::MatrixWorkspace_sptr - createGuessWorkspace(Mantid::API::MatrixWorkspace_sptr inputWorkspace, - Mantid::API::IFunction_const_sptr func, double startX, - double endX) const; + createGuessWorkspace(const Mantid::API::MatrixWorkspace_sptr &inputWorkspace, + const Mantid::API::IFunction_const_sptr &func, + double startX, double endX) const; - std::vector<double> computeOutput(Mantid::API::IFunction_const_sptr func, - const std::vector<double> &dataX) const; + std::vector<double> + computeOutput(const Mantid::API::IFunction_const_sptr &func, + const std::vector<double> &dataX) const; Mantid::API::IAlgorithm_sptr createWorkspaceAlgorithm(std::size_t numberOfSpectra, @@ -81,15 +82,16 @@ private: const std::vector<double> &dataY) const; Mantid::API::MatrixWorkspace_sptr - extractSpectra(Mantid::API::MatrixWorkspace_sptr inputWS, int startIndex, - int endIndex, double startX, double endX) const; + extractSpectra(const Mantid::API::MatrixWorkspace_sptr &inputWS, + int startIndex, int endIndex, double startX, + double endX) const; Mantid::API::MatrixWorkspace_sptr - appendSpectra(Mantid::API::MatrixWorkspace_sptr inputWS, - Mantid::API::MatrixWorkspace_sptr spectraWS) const; + appendSpectra(const Mantid::API::MatrixWorkspace_sptr &inputWS, + const Mantid::API::MatrixWorkspace_sptr &spectraWS) const; Mantid::API::MatrixWorkspace_sptr - cropWorkspace(Mantid::API::MatrixWorkspace_sptr inputWS, double startX, + cropWorkspace(const Mantid::API::MatrixWorkspace_sptr &inputWS, double startX, double endX, int startIndex, int endIndex) const; void deleteWorkspace(const std::string &name) const; diff --git a/qt/scientific_interfaces/Indirect/IndirectFitPlotModelLegacy.cpp b/qt/scientific_interfaces/Indirect/IndirectFitPlotModelLegacy.cpp index 5659cf2021c3f979c994280404b616dc035f6234..b6bd5fc96ce99f51250fdb1ccfe197937cec39f9 100644 --- a/qt/scientific_interfaces/Indirect/IndirectFitPlotModelLegacy.cpp +++ b/qt/scientific_interfaces/Indirect/IndirectFitPlotModelLegacy.cpp @@ -1,11 +1,13 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "IndirectFitPlotModelLegacy.h" +#include <utility> + #include "MantidAPI/AlgorithmManager.h" #include "MantidAPI/AnalysisDataService.h" #include "MantidAPI/CompositeFunction.h" @@ -25,9 +27,10 @@ IFunction_sptr firstFunctionWithParameter(IFunction_sptr function, const std::string &category, const std::string ¶meterName); -IFunction_sptr firstFunctionWithParameter(CompositeFunction_sptr composite, - const std::string &category, - const std::string ¶meterName) { +IFunction_sptr +firstFunctionWithParameter(const CompositeFunction_sptr &composite, + const std::string &category, + const std::string ¶meterName) { for (auto i = 0u; i < composite->nFunctions(); ++i) { const auto value = firstFunctionWithParameter(composite->getFunction(i), category, parameterName); @@ -50,7 +53,7 @@ IFunction_sptr firstFunctionWithParameter(IFunction_sptr function, return nullptr; } -boost::optional<double> firstParameterValue(IFunction_sptr function, +boost::optional<double> firstParameterValue(const IFunction_sptr &function, const std::string &category, const std::string ¶meterName) { if (!function) @@ -63,22 +66,24 @@ boost::optional<double> firstParameterValue(IFunction_sptr function, return boost::none; } -boost::optional<double> findFirstPeakCentre(IFunction_sptr function) { - return firstParameterValue(function, "Peak", "PeakCentre"); +boost::optional<double> findFirstPeakCentre(const IFunction_sptr &function) { + return firstParameterValue(std::move(function), "Peak", "PeakCentre"); } -boost::optional<double> findFirstFWHM(IFunction_sptr function) { - return firstParameterValue(function, "Peak", "FWHM"); +boost::optional<double> findFirstFWHM(const IFunction_sptr &function) { + return firstParameterValue(std::move(function), "Peak", "FWHM"); } -boost::optional<double> findFirstBackgroundLevel(IFunction_sptr function) { - return firstParameterValue(function, "Background", "A0"); +boost::optional<double> +findFirstBackgroundLevel(const IFunction_sptr &function) { + return firstParameterValue(std::move(function), "Background", "A0"); } -void setFunctionParameters(IFunction_sptr function, const std::string &category, +void setFunctionParameters(const IFunction_sptr &function, + const std::string &category, const std::string ¶meterName, double value); -void setFunctionParameters(CompositeFunction_sptr composite, +void setFunctionParameters(const CompositeFunction_sptr &composite, const std::string &category, const std::string ¶meterName, double value) { for (auto i = 0u; i < composite->nFunctions(); ++i) @@ -86,7 +91,8 @@ void setFunctionParameters(CompositeFunction_sptr composite, value); } -void setFunctionParameters(IFunction_sptr function, const std::string &category, +void setFunctionParameters(const IFunction_sptr &function, + const std::string &category, const std::string ¶meterName, double value) { if (function->category() == category && function->hasParameter(parameterName)) function->setParameter(parameterName, value); @@ -97,11 +103,11 @@ void setFunctionParameters(IFunction_sptr function, const std::string &category, } void setFirstBackground(IFunction_sptr function, double value) { - firstFunctionWithParameter(function, "Background", "A0") + firstFunctionWithParameter(std::move(function), "Background", "A0") ->setParameter("A0", value); } -MatrixWorkspace_sptr castToMatrixWorkspace(Workspace_sptr workspace) { +MatrixWorkspace_sptr castToMatrixWorkspace(const Workspace_sptr &workspace) { return boost::dynamic_pointer_cast<MatrixWorkspace>(workspace); } @@ -265,10 +271,10 @@ MatrixWorkspace_sptr IndirectFitPlotModelLegacy::getGuessWorkspace() const { } MatrixWorkspace_sptr IndirectFitPlotModelLegacy::appendGuessToInput( - MatrixWorkspace_sptr guessWorkspace) const { + const MatrixWorkspace_sptr &guessWorkspace) const { const auto range = getGuessRange(); return createInputAndGuessWorkspace( - getWorkspace(), guessWorkspace, + getWorkspace(), std::move(guessWorkspace), boost::numeric_cast<int>(m_activeSpectrum), range.first, range.second); } @@ -279,8 +285,9 @@ std::pair<double, double> IndirectFitPlotModelLegacy::getGuessRange() const { } MatrixWorkspace_sptr IndirectFitPlotModelLegacy::createInputAndGuessWorkspace( - MatrixWorkspace_sptr inputWS, MatrixWorkspace_sptr guessWorkspace, - int spectrum, double startX, double endX) const { + const MatrixWorkspace_sptr &inputWS, + const MatrixWorkspace_sptr &guessWorkspace, int spectrum, double startX, + double endX) const { guessWorkspace->setInstrument(inputWS->getInstrument()); guessWorkspace->replaceAxis( 0, @@ -300,8 +307,8 @@ MatrixWorkspace_sptr IndirectFitPlotModelLegacy::createInputAndGuessWorkspace( } MatrixWorkspace_sptr IndirectFitPlotModelLegacy::createGuessWorkspace( - MatrixWorkspace_sptr inputWorkspace, IFunction_const_sptr func, - double startX, double endX) const { + const MatrixWorkspace_sptr &inputWorkspace, + const IFunction_const_sptr &func, double startX, double endX) const { IAlgorithm_sptr createWsAlg = AlgorithmManager::Instance().create("EvaluateFunction"); createWsAlg->initialize(); @@ -321,7 +328,7 @@ MatrixWorkspace_sptr IndirectFitPlotModelLegacy::createGuessWorkspace( } std::vector<double> IndirectFitPlotModelLegacy::computeOutput( - IFunction_const_sptr func, const std::vector<double> &dataX) const { + const IFunction_const_sptr &func, const std::vector<double> &dataX) const { if (dataX.empty()) return std::vector<double>(); @@ -351,7 +358,7 @@ IAlgorithm_sptr IndirectFitPlotModelLegacy::createWorkspaceAlgorithm( } MatrixWorkspace_sptr -IndirectFitPlotModelLegacy::extractSpectra(MatrixWorkspace_sptr inputWS, +IndirectFitPlotModelLegacy::extractSpectra(const MatrixWorkspace_sptr &inputWS, int startIndex, int endIndex, double startX, double endX) const { auto extractSpectraAlg = @@ -370,7 +377,8 @@ IndirectFitPlotModelLegacy::extractSpectra(MatrixWorkspace_sptr inputWS, } MatrixWorkspace_sptr IndirectFitPlotModelLegacy::appendSpectra( - MatrixWorkspace_sptr inputWS, MatrixWorkspace_sptr spectraWS) const { + const MatrixWorkspace_sptr &inputWS, + const MatrixWorkspace_sptr &spectraWS) const { auto appendSpectraAlg = AlgorithmManager::Instance().create("AppendSpectra"); appendSpectraAlg->initialize(); appendSpectraAlg->setChild(true); @@ -383,7 +391,7 @@ MatrixWorkspace_sptr IndirectFitPlotModelLegacy::appendSpectra( } MatrixWorkspace_sptr -IndirectFitPlotModelLegacy::cropWorkspace(MatrixWorkspace_sptr inputWS, +IndirectFitPlotModelLegacy::cropWorkspace(const MatrixWorkspace_sptr &inputWS, double startX, double endX, int startIndex, int endIndex) const { const auto cropAlg = AlgorithmManager::Instance().create("CropWorkspace"); diff --git a/qt/scientific_interfaces/Indirect/IndirectFitPlotModelLegacy.h b/qt/scientific_interfaces/Indirect/IndirectFitPlotModelLegacy.h index 250464942db311294f4a79f23dc63971cc2426ce..2da0b9fa59b40b24f3077fbbfe2ff4b3db77c503 100644 --- a/qt/scientific_interfaces/Indirect/IndirectFitPlotModelLegacy.h +++ b/qt/scientific_interfaces/Indirect/IndirectFitPlotModelLegacy.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -29,8 +29,8 @@ public: Mantid::API::MatrixWorkspace_sptr getGuessWorkspace() const; SpectraLegacy getSpectra() const; - Mantid::API::MatrixWorkspace_sptr - appendGuessToInput(Mantid::API::MatrixWorkspace_sptr guessWorkspace) const; + Mantid::API::MatrixWorkspace_sptr appendGuessToInput( + const Mantid::API::MatrixWorkspace_sptr &guessWorkspace) const; std::size_t getActiveDataIndex() const; std::size_t getActiveSpectrum() const; @@ -60,18 +60,19 @@ public: private: std::pair<double, double> getGuessRange() const; - Mantid::API::MatrixWorkspace_sptr - createInputAndGuessWorkspace(Mantid::API::MatrixWorkspace_sptr inputWS, - Mantid::API::MatrixWorkspace_sptr guessWorkspace, - int spectrum, double startX, double endX) const; + Mantid::API::MatrixWorkspace_sptr createInputAndGuessWorkspace( + const Mantid::API::MatrixWorkspace_sptr &inputWS, + const Mantid::API::MatrixWorkspace_sptr &guessWorkspace, int spectrum, + double startX, double endX) const; Mantid::API::MatrixWorkspace_sptr - createGuessWorkspace(Mantid::API::MatrixWorkspace_sptr inputWorkspace, - Mantid::API::IFunction_const_sptr func, double startX, - double endX) const; + createGuessWorkspace(const Mantid::API::MatrixWorkspace_sptr &inputWorkspace, + const Mantid::API::IFunction_const_sptr &func, + double startX, double endX) const; - std::vector<double> computeOutput(Mantid::API::IFunction_const_sptr func, - const std::vector<double> &dataX) const; + std::vector<double> + computeOutput(const Mantid::API::IFunction_const_sptr &func, + const std::vector<double> &dataX) const; Mantid::API::IAlgorithm_sptr createWorkspaceAlgorithm(std::size_t numberOfSpectra, @@ -79,15 +80,16 @@ private: const std::vector<double> &dataY) const; Mantid::API::MatrixWorkspace_sptr - extractSpectra(Mantid::API::MatrixWorkspace_sptr inputWS, int startIndex, - int endIndex, double startX, double endX) const; + extractSpectra(const Mantid::API::MatrixWorkspace_sptr &inputWS, + int startIndex, int endIndex, double startX, + double endX) const; Mantid::API::MatrixWorkspace_sptr - appendSpectra(Mantid::API::MatrixWorkspace_sptr inputWS, - Mantid::API::MatrixWorkspace_sptr spectraWS) const; + appendSpectra(const Mantid::API::MatrixWorkspace_sptr &inputWS, + const Mantid::API::MatrixWorkspace_sptr &spectraWS) const; Mantid::API::MatrixWorkspace_sptr - cropWorkspace(Mantid::API::MatrixWorkspace_sptr inputWS, double startX, + cropWorkspace(const Mantid::API::MatrixWorkspace_sptr &inputWS, double startX, double endX, int startIndex, int endIndex) const; void deleteWorkspace(const std::string &name) const; diff --git a/qt/scientific_interfaces/Indirect/IndirectFitPlotPresenter.cpp b/qt/scientific_interfaces/Indirect/IndirectFitPlotPresenter.cpp index 4ad677b846bb156bbc89a73b6b3e94955047e446..bfcea94e63e568dbbce6b6710a1fbc8a770685d5 100644 --- a/qt/scientific_interfaces/Indirect/IndirectFitPlotPresenter.cpp +++ b/qt/scientific_interfaces/Indirect/IndirectFitPlotPresenter.cpp @@ -1,14 +1,15 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "IndirectFitPlotPresenter.h" #include "MantidQtWidgets/Common/SignalBlocker.h" #include <QTimer> +#include <utility> namespace { using MantidQt::CustomInterfaces::IDA::IIndirectFitPlotView; @@ -278,17 +279,17 @@ void IndirectFitPlotPresenter::plotLines() { } void IndirectFitPlotPresenter::plotInput(MatrixWorkspace_sptr workspace) { - plotInput(workspace, m_model->getActiveSpectrum()); + plotInput(std::move(workspace), m_model->getActiveSpectrum()); if (auto doGuess = m_view->isPlotGuessChecked()) plotGuess(doGuess); } void IndirectFitPlotPresenter::plotInput(MatrixWorkspace_sptr workspace, WorkspaceIndex spectrum) { - m_view->plotInTopPreview("Sample", workspace, spectrum, Qt::black); + m_view->plotInTopPreview("Sample", std::move(workspace), spectrum, Qt::black); } -void IndirectFitPlotPresenter::plotFit(MatrixWorkspace_sptr workspace) { +void IndirectFitPlotPresenter::plotFit(const MatrixWorkspace_sptr &workspace) { plotInput(workspace, WorkspaceIndex{0}); if (auto doGuess = m_view->isPlotGuessChecked()) plotGuess(doGuess); @@ -298,12 +299,13 @@ void IndirectFitPlotPresenter::plotFit(MatrixWorkspace_sptr workspace) { void IndirectFitPlotPresenter::plotFit(MatrixWorkspace_sptr workspace, WorkspaceIndex spectrum) { - m_view->plotInTopPreview("Fit", workspace, spectrum, Qt::red); + m_view->plotInTopPreview("Fit", std::move(workspace), spectrum, Qt::red); } void IndirectFitPlotPresenter::plotDifference(MatrixWorkspace_sptr workspace, WorkspaceIndex spectrum) { - m_view->plotInBottomPreview("Difference", workspace, spectrum, Qt::blue); + m_view->plotInBottomPreview("Difference", std::move(workspace), spectrum, + Qt::blue); } void IndirectFitPlotPresenter::updatePlotRange( @@ -360,11 +362,12 @@ void IndirectFitPlotPresenter::plotGuess(bool doPlotGuess) { void IndirectFitPlotPresenter::plotGuess( Mantid::API::MatrixWorkspace_sptr workspace) { - m_view->plotInTopPreview("Guess", workspace, WorkspaceIndex{0}, Qt::green); + m_view->plotInTopPreview("Guess", std::move(workspace), WorkspaceIndex{0}, + Qt::green); } void IndirectFitPlotPresenter::plotGuessInSeparateWindow( - Mantid::API::MatrixWorkspace_sptr workspace) { + const Mantid::API::MatrixWorkspace_sptr &workspace) { m_plotExternalGuessRunner.addCallback( [this, workspace]() { m_model->appendGuessToInput(workspace); }); } diff --git a/qt/scientific_interfaces/Indirect/IndirectFitPlotPresenter.h b/qt/scientific_interfaces/Indirect/IndirectFitPlotPresenter.h index 33baf7bfa2df50aa319e06a2256941a618a03d64..0a4218be8eb52f52929054ec946af4fef2a411a5 100644 --- a/qt/scientific_interfaces/Indirect/IndirectFitPlotPresenter.h +++ b/qt/scientific_interfaces/Indirect/IndirectFitPlotPresenter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -91,7 +91,7 @@ private: void plotInput(Mantid::API::MatrixWorkspace_sptr workspace); void plotInput(Mantid::API::MatrixWorkspace_sptr workspace, WorkspaceIndex spectrum); - void plotFit(Mantid::API::MatrixWorkspace_sptr workspace); + void plotFit(const Mantid::API::MatrixWorkspace_sptr &workspace); void plotFit(Mantid::API::MatrixWorkspace_sptr workspace, WorkspaceIndex spectrum); void plotDifference(Mantid::API::MatrixWorkspace_sptr workspace, @@ -100,7 +100,8 @@ private: void clearFit(); void clearDifference(); void plotGuess(Mantid::API::MatrixWorkspace_sptr workspace); - void plotGuessInSeparateWindow(Mantid::API::MatrixWorkspace_sptr workspace); + void + plotGuessInSeparateWindow(const Mantid::API::MatrixWorkspace_sptr &workspace); void plotLines(); void updatePlotRange(const std::pair<double, double> &range); void clearGuess(); diff --git a/qt/scientific_interfaces/Indirect/IndirectFitPlotPresenterLegacy.cpp b/qt/scientific_interfaces/Indirect/IndirectFitPlotPresenterLegacy.cpp index 0c0dfd24d3502f6d12c44458a4b5c5eeb23f7b82..1039289f86d912575fc0df9740e02b6ea0aa428a 100644 --- a/qt/scientific_interfaces/Indirect/IndirectFitPlotPresenterLegacy.cpp +++ b/qt/scientific_interfaces/Indirect/IndirectFitPlotPresenterLegacy.cpp @@ -1,14 +1,15 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "IndirectFitPlotPresenterLegacy.h" #include "MantidQtWidgets/Common/SignalBlocker.h" #include <QTimer> +#include <utility> namespace { using MantidQt::CustomInterfaces::IDA::DiscontinuousSpectra; @@ -264,17 +265,18 @@ void IndirectFitPlotPresenterLegacy::plotLines() { } void IndirectFitPlotPresenterLegacy::plotInput(MatrixWorkspace_sptr workspace) { - plotInput(workspace, m_model->getActiveSpectrum()); + plotInput(std::move(workspace), m_model->getActiveSpectrum()); if (auto doGuess = m_view->isPlotGuessChecked()) plotGuess(doGuess); } void IndirectFitPlotPresenterLegacy::plotInput(MatrixWorkspace_sptr workspace, std::size_t spectrum) { - m_view->plotInTopPreview("Sample", workspace, spectrum, Qt::black); + m_view->plotInTopPreview("Sample", std::move(workspace), spectrum, Qt::black); } -void IndirectFitPlotPresenterLegacy::plotFit(MatrixWorkspace_sptr workspace) { +void IndirectFitPlotPresenterLegacy::plotFit( + const MatrixWorkspace_sptr &workspace) { plotInput(workspace, 0); if (auto doGuess = m_view->isPlotGuessChecked()) plotGuess(doGuess); @@ -284,12 +286,13 @@ void IndirectFitPlotPresenterLegacy::plotFit(MatrixWorkspace_sptr workspace) { void IndirectFitPlotPresenterLegacy::plotFit(MatrixWorkspace_sptr workspace, std::size_t spectrum) { - m_view->plotInTopPreview("Fit", workspace, spectrum, Qt::red); + m_view->plotInTopPreview("Fit", std::move(workspace), spectrum, Qt::red); } void IndirectFitPlotPresenterLegacy::plotDifference( MatrixWorkspace_sptr workspace, std::size_t spectrum) { - m_view->plotInBottomPreview("Difference", workspace, spectrum, Qt::blue); + m_view->plotInBottomPreview("Difference", std::move(workspace), spectrum, + Qt::blue); } void IndirectFitPlotPresenterLegacy::updatePlotRange( @@ -346,11 +349,11 @@ void IndirectFitPlotPresenterLegacy::plotGuess(bool doPlotGuess) { void IndirectFitPlotPresenterLegacy::plotGuess( Mantid::API::MatrixWorkspace_sptr workspace) { - m_view->plotInTopPreview("Guess", workspace, 0, Qt::green); + m_view->plotInTopPreview("Guess", std::move(workspace), 0, Qt::green); } void IndirectFitPlotPresenterLegacy::plotGuessInSeparateWindow( - Mantid::API::MatrixWorkspace_sptr workspace) { + const Mantid::API::MatrixWorkspace_sptr &workspace) { m_plotExternalGuessRunner.addCallback( [this, workspace]() { m_model->appendGuessToInput(workspace); }); } diff --git a/qt/scientific_interfaces/Indirect/IndirectFitPlotPresenterLegacy.h b/qt/scientific_interfaces/Indirect/IndirectFitPlotPresenterLegacy.h index e5fc00b1b8b0fd02fb7b1e94617f127ce5898ab2..b893ba19b8acc33ae0cdd224941c662d4cad06c3 100644 --- a/qt/scientific_interfaces/Indirect/IndirectFitPlotPresenterLegacy.h +++ b/qt/scientific_interfaces/Indirect/IndirectFitPlotPresenterLegacy.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -85,13 +85,14 @@ private: void plotInput(Mantid::API::MatrixWorkspace_sptr workspace); void plotInput(Mantid::API::MatrixWorkspace_sptr workspace, std::size_t spectrum); - void plotFit(Mantid::API::MatrixWorkspace_sptr workspace); + void plotFit(const Mantid::API::MatrixWorkspace_sptr &workspace); void plotFit(Mantid::API::MatrixWorkspace_sptr workspace, std::size_t spectrum); void plotDifference(Mantid::API::MatrixWorkspace_sptr workspace, std::size_t spectrum); void plotGuess(Mantid::API::MatrixWorkspace_sptr workspace); - void plotGuessInSeparateWindow(Mantid::API::MatrixWorkspace_sptr workspace); + void + plotGuessInSeparateWindow(const Mantid::API::MatrixWorkspace_sptr &workspace); void plotLines(); void updatePlotRange(const std::pair<double, double> &range); void clearGuess(); diff --git a/qt/scientific_interfaces/Indirect/IndirectFitPlotView.cpp b/qt/scientific_interfaces/Indirect/IndirectFitPlotView.cpp index eacae00ab1a3f30987ee5d1d5d9305055a6f8fef..f17bde743decf83e244b131b18ae462682dbcedd 100644 --- a/qt/scientific_interfaces/Indirect/IndirectFitPlotView.cpp +++ b/qt/scientific_interfaces/Indirect/IndirectFitPlotView.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "IndirectFitPlotView.h" diff --git a/qt/scientific_interfaces/Indirect/IndirectFitPlotView.h b/qt/scientific_interfaces/Indirect/IndirectFitPlotView.h index dd5aea5054945f85620a3c70ab30ee8347f13a37..f2c750704e044c7ae0b155d7b4764c8dfc294740 100644 --- a/qt/scientific_interfaces/Indirect/IndirectFitPlotView.h +++ b/qt/scientific_interfaces/Indirect/IndirectFitPlotView.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -19,6 +19,7 @@ #include <QSplitterHandle> #endif #include <QSplitter> +#include <utility> namespace MantidQt { namespace CustomInterfaces { @@ -30,7 +31,7 @@ class SplitterHandle : public QSplitterHandle { public: SplitterHandle(QIcon icon, Qt::Orientation orientation, QSplitter *parent = nullptr) - : QSplitterHandle(orientation, parent), m_icon(icon) {} + : QSplitterHandle(orientation, parent), m_icon(std::move(icon)) {} void paintEvent(QPaintEvent *e) override { QSplitterHandle::paintEvent(e); @@ -47,7 +48,7 @@ private: class Splitter : public QSplitter { public: Splitter(QIcon icon, QWidget *parent = nullptr) - : QSplitter(parent), m_icon(icon) {} + : QSplitter(parent), m_icon(std::move(icon)) {} QSplitterHandle *createHandle() override { return new SplitterHandle(m_icon, Qt::Vertical, this); diff --git a/qt/scientific_interfaces/Indirect/IndirectFitPlotViewLegacy.cpp b/qt/scientific_interfaces/Indirect/IndirectFitPlotViewLegacy.cpp index f21ae9fe3ede28f47ef0f00e234a632e7c1bd5a9..4497328aa2344c30e9dbfbdaa47080fadacbccc8 100644 --- a/qt/scientific_interfaces/Indirect/IndirectFitPlotViewLegacy.cpp +++ b/qt/scientific_interfaces/Indirect/IndirectFitPlotViewLegacy.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "IndirectFitPlotViewLegacy.h" diff --git a/qt/scientific_interfaces/Indirect/IndirectFitPlotViewLegacy.h b/qt/scientific_interfaces/Indirect/IndirectFitPlotViewLegacy.h index 8dee89a02086935dc6fd0871b5338b0224452f6a..541d49473036c30d9664fcdc809a39f4aee0ead9 100644 --- a/qt/scientific_interfaces/Indirect/IndirectFitPlotViewLegacy.h +++ b/qt/scientific_interfaces/Indirect/IndirectFitPlotViewLegacy.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -19,6 +19,7 @@ #include <QSplitterHandle> #endif #include <QSplitter> +#include <utility> namespace MantidQt { namespace CustomInterfaces { @@ -30,7 +31,7 @@ class SplitterHandleLegacy : public QSplitterHandle { public: SplitterHandleLegacy(QIcon icon, Qt::Orientation orientation, QSplitter *parent = nullptr) - : QSplitterHandle(orientation, parent), m_icon(icon) {} + : QSplitterHandle(orientation, parent), m_icon(std::move(icon)) {} void paintEvent(QPaintEvent *e) override { QSplitterHandle::paintEvent(e); @@ -47,7 +48,7 @@ private: class SplitterLegacy : public QSplitter { public: SplitterLegacy(QIcon icon, QWidget *parent = nullptr) - : QSplitter(parent), m_icon(icon) {} + : QSplitter(parent), m_icon(std::move(icon)) {} QSplitterHandle *createHandle() override { return new SplitterHandleLegacy(m_icon, Qt::Vertical, this); diff --git a/qt/scientific_interfaces/Indirect/IndirectFitPropertyBrowser.cpp b/qt/scientific_interfaces/Indirect/IndirectFitPropertyBrowser.cpp index c695756b0c422d9270da3ae547e23a42ed91e761..1471c62ee515438741fe44dba0deb011d2394b5c 100644 --- a/qt/scientific_interfaces/Indirect/IndirectFitPropertyBrowser.cpp +++ b/qt/scientific_interfaces/Indirect/IndirectFitPropertyBrowser.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "IndirectFitPropertyBrowser.h" #include "FunctionTemplateBrowser.h" @@ -318,7 +318,8 @@ void IndirectFitPropertyBrowser::clear() { * Updates the plot guess feature in this indirect fit property browser. * @param sampleWorkspace :: The workspace loaded as sample */ -void IndirectFitPropertyBrowser::updatePlotGuess(MatrixWorkspace_const_sptr) {} +void IndirectFitPropertyBrowser::updatePlotGuess( + const MatrixWorkspace_const_sptr &) {} void IndirectFitPropertyBrowser::setErrorsEnabled(bool enabled) { m_functionBrowser->setErrorsEnabled(enabled); diff --git a/qt/scientific_interfaces/Indirect/IndirectFitPropertyBrowser.h b/qt/scientific_interfaces/Indirect/IndirectFitPropertyBrowser.h index 1857a16f8def43cf9f5dbd5b909bd174abcd9edd..80fbebee9fb2c92bb6c4ef1e38f7fec07b9d8735 100644 --- a/qt/scientific_interfaces/Indirect/IndirectFitPropertyBrowser.h +++ b/qt/scientific_interfaces/Indirect/IndirectFitPropertyBrowser.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -66,7 +66,7 @@ public: TableRowIndex nData, const QStringList &datasetNames, const std::vector<double> &qValues, const std::vector<std::pair<std::string, int>> &fitResolutions); - void updatePlotGuess(MatrixWorkspace_const_sptr sampleWorkspace); + void updatePlotGuess(const MatrixWorkspace_const_sptr &sampleWorkspace); void setErrorsEnabled(bool enabled); void updateParameterEstimationData(DataForParameterEstimationCollection &&data); diff --git a/qt/scientific_interfaces/Indirect/IndirectFittingModel.cpp b/qt/scientific_interfaces/Indirect/IndirectFittingModel.cpp index ea8e822c2e51323862c51a17862a93380a9aa6e0..67a5e0b8db4e7865b3e56e785a24f101bfbdde7c 100644 --- a/qt/scientific_interfaces/Indirect/IndirectFittingModel.cpp +++ b/qt/scientific_interfaces/Indirect/IndirectFittingModel.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "IndirectFittingModel.h" @@ -19,6 +19,7 @@ #include <set> #include <boost/algorithm/string.hpp> +#include <utility> using namespace Mantid::API; using IDAWorkspaceIndex = MantidQt::CustomInterfaces::IDA::WorkspaceIndex; @@ -37,8 +38,8 @@ std::string cutLastOf(std::string const &str, std::string const &delimiter) { return str; } -bool equivalentWorkspaces(MatrixWorkspace_const_sptr lhs, - MatrixWorkspace_const_sptr rhs) { +bool equivalentWorkspaces(const MatrixWorkspace_const_sptr &lhs, + const MatrixWorkspace_const_sptr &rhs) { if (!lhs || !rhs) return false; else if (lhs->getName() == "" && rhs->getName() == "") @@ -50,8 +51,8 @@ bool equivalentWorkspaces(MatrixWorkspace_const_sptr lhs, * @return True if the first function precedes the second when ordering by * name. */ -bool functionNameComparator(IFunction_const_sptr first, - IFunction_const_sptr second) { +bool functionNameComparator(const IFunction_const_sptr &first, + const IFunction_const_sptr &second) { return first->name() < second->name(); } @@ -72,8 +73,8 @@ extractFunctions(const CompositeFunction &composite) { return functions; } -bool equivalentFunctions(IFunction_const_sptr func1, - IFunction_const_sptr func2); +bool equivalentFunctions(const IFunction_const_sptr &func1, + const IFunction_const_sptr &func2); /* * Checks whether the specified composite functions have the same composition. @@ -111,8 +112,8 @@ bool equivalentComposites(const CompositeFunction &composite1, * @return True if the specified functions have the same composition, * False otherwise. */ -bool equivalentFunctions(IFunction_const_sptr func1, - IFunction_const_sptr func2) { +bool equivalentFunctions(const IFunction_const_sptr &func1, + const IFunction_const_sptr &func2) { const auto composite1 = boost::dynamic_pointer_cast<const CompositeFunction>(func1); const auto composite2 = @@ -147,8 +148,8 @@ constructInputString(const IndirectFitDataCollectionType &fittingData) { return input.str(); } -void addInputDataToSimultaneousFit(IAlgorithm_sptr fitAlgorithm, - MatrixWorkspace_sptr workspace, +void addInputDataToSimultaneousFit(const IAlgorithm_sptr &fitAlgorithm, + const MatrixWorkspace_sptr &workspace, IDAWorkspaceIndex spectrum, const std::pair<double, double> &xRange, const std::vector<double> &excludeRegions, @@ -192,7 +193,7 @@ void addInputDataToSimultaneousFit( } void addInputDataToSimultaneousFit( - IAlgorithm_sptr fitAlgorithm, + const IAlgorithm_sptr &fitAlgorithm, const IndirectFitDataCollectionType &fittingData) { std::size_t counter = 0; for (const auto &data : fittingData) @@ -200,7 +201,7 @@ void addInputDataToSimultaneousFit( } void addInputDataToSimultaneousFit( - IAlgorithm_sptr fitAlgorithm, + const IAlgorithm_sptr &fitAlgorithm, const IndirectFitDataCollectionType &fittingData, const std::pair<double, double> &range, const std::vector<double> &exclude) { @@ -216,7 +217,7 @@ template <typename Map> Map combine(const Map &mapA, const Map &mapB) { } std::unordered_map<std::string, std::string> -shortToLongParameterNames(IFunction_sptr function) { +shortToLongParameterNames(const IFunction_sptr &function) { std::unordered_map<std::string, std::string> shortToLong; for (const auto &name : function->getParameterNames()) shortToLong[name.substr(name.rfind(".") + 1)] = name; @@ -279,26 +280,29 @@ IFunction_sptr extractFirstInnerFunction(const std::string &function) { template <typename WorkspaceType> boost::shared_ptr<WorkspaceType> -getWorkspaceOutput(IAlgorithm_sptr algorithm, const std::string &propertyName) { +getWorkspaceOutput(const IAlgorithm_sptr &algorithm, + const std::string &propertyName) { return AnalysisDataService::Instance().retrieveWS<WorkspaceType>( algorithm->getProperty(propertyName)); } -WorkspaceGroup_sptr getOutputResult(IAlgorithm_sptr algorithm) { - return getWorkspaceOutput<WorkspaceGroup>(algorithm, "OutputWorkspace"); +WorkspaceGroup_sptr getOutputResult(const IAlgorithm_sptr &algorithm) { + return getWorkspaceOutput<WorkspaceGroup>(std::move(algorithm), + "OutputWorkspace"); } -ITableWorkspace_sptr getOutputParameters(IAlgorithm_sptr algorithm) { - return getWorkspaceOutput<ITableWorkspace>(algorithm, +ITableWorkspace_sptr getOutputParameters(const IAlgorithm_sptr &algorithm) { + return getWorkspaceOutput<ITableWorkspace>(std::move(algorithm), "OutputParameterWorkspace"); } -WorkspaceGroup_sptr getOutputGroup(IAlgorithm_sptr algorithm) { - return getWorkspaceOutput<WorkspaceGroup>(algorithm, "OutputWorkspaceGroup"); +WorkspaceGroup_sptr getOutputGroup(const IAlgorithm_sptr &algorithm) { + return getWorkspaceOutput<WorkspaceGroup>(std::move(algorithm), + "OutputWorkspaceGroup"); } void addFitProperties(Mantid::API::IAlgorithm &algorithm, - Mantid::API::IFunction_sptr function, + const Mantid::API::IFunction_sptr &function, std::string const &xAxisUnit) { algorithm.setProperty("Function", function); algorithm.setProperty("ResultXAxisUnit", xAxisUnit); @@ -576,9 +580,10 @@ void IndirectFittingModel::addWorkspace(MatrixWorkspace_sptr workspace, addNewWorkspace(workspace, spectra); } -void IndirectFittingModel::addNewWorkspace(MatrixWorkspace_sptr workspace, - const Spectra &spectra) { - m_fittingData.emplace_back(new IndirectFitData(workspace, spectra)); +void IndirectFittingModel::addNewWorkspace( + const MatrixWorkspace_sptr &workspace, const Spectra &spectra) { + m_fittingData.emplace_back( + new IndirectFitData(std::move(workspace), spectra)); m_defaultParameters.emplace_back( createDefaultParameters(m_fittingData.last())); } @@ -626,7 +631,7 @@ void IndirectFittingModel::setFittingMode(FittingMode mode) { } void IndirectFittingModel::setFitFunction(MultiDomainFunction_sptr function) { - m_activeFunction = function; + m_activeFunction = std::move(function); m_previousModelSelected = isPreviousModelSelected(); } @@ -637,10 +642,11 @@ void IndirectFittingModel::setDefaultParameterValue( } void IndirectFittingModel::addOutput(IAlgorithm_sptr fitAlgorithm) { - addOutput(fitAlgorithm, m_fittingData.begin(), m_fittingData.end()); + addOutput(std::move(fitAlgorithm), m_fittingData.begin(), + m_fittingData.end()); } -void IndirectFittingModel::addOutput(IAlgorithm_sptr fitAlgorithm, +void IndirectFittingModel::addOutput(const IAlgorithm_sptr &fitAlgorithm, const FitDataIterator &fitDataBegin, const FitDataIterator &fitDataEnd) { auto group = getOutputGroup(fitAlgorithm); @@ -651,8 +657,8 @@ void IndirectFittingModel::addOutput(IAlgorithm_sptr fitAlgorithm, addOutput(group, parameters, result, fitDataBegin, fitDataEnd); } -void IndirectFittingModel::addSingleFitOutput(IAlgorithm_sptr fitAlgorithm, - TableDatasetIndex index) { +void IndirectFittingModel::addSingleFitOutput( + const IAlgorithm_sptr &fitAlgorithm, TableDatasetIndex index) { auto group = getOutputGroup(fitAlgorithm); auto parameters = getOutputParameters(fitAlgorithm); auto result = getOutputResult(fitAlgorithm); @@ -663,9 +669,9 @@ void IndirectFittingModel::addSingleFitOutput(IAlgorithm_sptr fitAlgorithm, WorkspaceIndex{spectrum}); } -void IndirectFittingModel::addOutput(WorkspaceGroup_sptr resultGroup, - ITableWorkspace_sptr parameterTable, - WorkspaceGroup_sptr resultWorkspace, +void IndirectFittingModel::addOutput(const WorkspaceGroup_sptr &resultGroup, + const ITableWorkspace_sptr ¶meterTable, + const WorkspaceGroup_sptr &resultWorkspace, const FitDataIterator &fitDataBegin, const FitDataIterator &fitDataEnd) { if (m_previousModelSelected && m_fitOutput) @@ -678,9 +684,9 @@ void IndirectFittingModel::addOutput(WorkspaceGroup_sptr resultGroup, m_previousModelSelected = isPreviousModelSelected(); } -void IndirectFittingModel::addOutput(WorkspaceGroup_sptr resultGroup, - ITableWorkspace_sptr parameterTable, - WorkspaceGroup_sptr resultWorkspace, +void IndirectFittingModel::addOutput(const WorkspaceGroup_sptr &resultGroup, + const ITableWorkspace_sptr ¶meterTable, + const WorkspaceGroup_sptr &resultWorkspace, IndirectFitData *fitData, WorkspaceIndex spectrum) { if (m_previousModelSelected && m_fitOutput) @@ -696,8 +702,9 @@ IndirectFitOutput IndirectFittingModel::createFitOutput( WorkspaceGroup_sptr resultGroup, ITableWorkspace_sptr parameterTable, WorkspaceGroup_sptr resultWorkspace, const FitDataIterator &fitDataBegin, const FitDataIterator &fitDataEnd) const { - return IndirectFitOutput(resultGroup, parameterTable, resultWorkspace, - fitDataBegin, fitDataEnd); + return IndirectFitOutput(std::move(resultGroup), std::move(parameterTable), + std::move(resultWorkspace), fitDataBegin, + fitDataEnd); } IndirectFitOutput IndirectFittingModel::createFitOutput( @@ -705,8 +712,8 @@ IndirectFitOutput IndirectFittingModel::createFitOutput( Mantid::API::ITableWorkspace_sptr parameterTable, Mantid::API::WorkspaceGroup_sptr resultWorkspace, IndirectFitData *fitData, WorkspaceIndex spectrum) const { - return IndirectFitOutput(resultGroup, parameterTable, resultWorkspace, - fitData, spectrum); + return IndirectFitOutput(std::move(resultGroup), std::move(parameterTable), + std::move(resultWorkspace), fitData, spectrum); } void IndirectFittingModel::addOutput(IndirectFitOutput *fitOutput, @@ -715,8 +722,8 @@ void IndirectFittingModel::addOutput(IndirectFitOutput *fitOutput, WorkspaceGroup_sptr resultWorkspace, const FitDataIterator &fitDataBegin, const FitDataIterator &fitDataEnd) const { - fitOutput->addOutput(resultGroup, parameterTable, resultWorkspace, - fitDataBegin, fitDataEnd); + fitOutput->addOutput(std::move(resultGroup), std::move(parameterTable), + std::move(resultWorkspace), fitDataBegin, fitDataEnd); } void IndirectFittingModel::addOutput( @@ -724,8 +731,8 @@ void IndirectFittingModel::addOutput( Mantid::API::ITableWorkspace_sptr parameterTable, Mantid::API::WorkspaceGroup_sptr resultWorkspace, IndirectFitData *fitData, WorkspaceIndex spectrum) const { - fitOutput->addOutput(resultGroup, parameterTable, resultWorkspace, fitData, - spectrum); + fitOutput->addOutput(std::move(resultGroup), std::move(parameterTable), + std::move(resultWorkspace), fitData, spectrum); } FittingMode IndirectFittingModel::getFittingMode() const { @@ -867,14 +874,15 @@ IndirectFittingModel::simultaneousFitAlgorithm() const { IAlgorithm_sptr IndirectFittingModel::createSequentialFit(IFunction_sptr function) const { const auto input = constructInputString(m_fittingData); - return createSequentialFit(function, input, m_fittingData.front().get()); + return createSequentialFit(std::move(function), input, + m_fittingData.front().get()); } IAlgorithm_sptr IndirectFittingModel::createSequentialFit( - IFunction_sptr function, const std::string &input, + const IFunction_sptr &function, const std::string &input, IndirectFitData *initialFitData) const { auto fitAlgorithm = sequentialFitAlgorithm(); - addFitProperties(*fitAlgorithm, function, getResultXAxisUnit()); + addFitProperties(*fitAlgorithm, std::move(function), getResultXAxisUnit()); fitAlgorithm->setProperty("Input", input); fitAlgorithm->setProperty("OutputWorkspace", sequentialFitOutputName()); fitAlgorithm->setProperty("LogName", getResultLogName()); @@ -892,7 +900,7 @@ IAlgorithm_sptr IndirectFittingModel::createSequentialFit( } IAlgorithm_sptr IndirectFittingModel::createSimultaneousFit( - MultiDomainFunction_sptr function) const { + const MultiDomainFunction_sptr &function) const { auto fitAlgorithm = simultaneousFitAlgorithm(); addFitProperties(*fitAlgorithm, function, getResultXAxisUnit()); addInputDataToSimultaneousFit(fitAlgorithm, m_fittingData); @@ -901,9 +909,9 @@ IAlgorithm_sptr IndirectFittingModel::createSimultaneousFit( } IAlgorithm_sptr IndirectFittingModel::createSimultaneousFitWithEqualRange( - IFunction_sptr function) const { + const IFunction_sptr &function) const { auto fitAlgorithm = simultaneousFitAlgorithm(); - addFitProperties(*fitAlgorithm, function, getResultXAxisUnit()); + addFitProperties(*fitAlgorithm, std::move(function), getResultXAxisUnit()); auto const dataIndex = TableDatasetIndex{0}; auto const workspaceIndex = getSpectra(dataIndex).front(); @@ -931,12 +939,13 @@ std::string IndirectFittingModel::getOutputBasename() const { return cutLastOf(sequentialFitOutputName(), "_Results"); } -void IndirectFittingModel::cleanFailedRun(IAlgorithm_sptr fittingAlgorithm) { +void IndirectFittingModel::cleanFailedRun( + const IAlgorithm_sptr &fittingAlgorithm) { cleanTemporaries(fittingAlgorithm->name(), m_fittingData); } void IndirectFittingModel::cleanFailedSingleRun( - IAlgorithm_sptr fittingAlgorithm, TableDatasetIndex index) { + const IAlgorithm_sptr &fittingAlgorithm, TableDatasetIndex index) { const auto base = "__" + fittingAlgorithm->name() + "_ws" + std::to_string(index.value + 1); removeFromADSIfExists(base); @@ -945,7 +954,7 @@ void IndirectFittingModel::cleanFailedSingleRun( DataForParameterEstimationCollection IndirectFittingModel::getDataForParameterEstimation( - EstimationDataSelector selector) const { + const EstimationDataSelector &selector) const { DataForParameterEstimationCollection dataCollection; for (auto i = m_fittingData.zero(); i < m_fittingData.size(); ++i) { auto const &data = *m_fittingData[i]; diff --git a/qt/scientific_interfaces/Indirect/IndirectFittingModel.h b/qt/scientific_interfaces/Indirect/IndirectFittingModel.h index da0754ac501ed83adab9e77a5c4827829ca74649..b4b39ccbb0ab93ab8906fb5d482988c9eb06820e 100644 --- a/qt/scientific_interfaces/Indirect/IndirectFittingModel.h +++ b/qt/scientific_interfaces/Indirect/IndirectFittingModel.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -109,7 +109,7 @@ public: virtual void setFitFunction(Mantid::API::MultiDomainFunction_sptr function); virtual void setDefaultParameterValue(const std::string &name, double value, TableDatasetIndex dataIndex); - void addSingleFitOutput(Mantid::API::IAlgorithm_sptr fitAlgorithm, + void addSingleFitOutput(const Mantid::API::IAlgorithm_sptr &fitAlgorithm, TableDatasetIndex index); virtual void addOutput(Mantid::API::IAlgorithm_sptr fitAlgorithm); @@ -135,11 +135,12 @@ public: WorkspaceIndex spectrum) const; std::string getOutputBasename() const; - void cleanFailedRun(Mantid::API::IAlgorithm_sptr fittingAlgorithm); - void cleanFailedSingleRun(Mantid::API::IAlgorithm_sptr fittingAlgorithm, - TableDatasetIndex index); + void cleanFailedRun(const Mantid::API::IAlgorithm_sptr &fittingAlgorithm); + void + cleanFailedSingleRun(const Mantid::API::IAlgorithm_sptr &fittingAlgorithm, + TableDatasetIndex index); DataForParameterEstimationCollection - getDataForParameterEstimation(EstimationDataSelector selector) const; + getDataForParameterEstimation(const EstimationDataSelector &selector) const; std::vector<double> getQValuesForData() const; virtual std::vector<std::pair<std::string, int>> getResolutionsForFit() const; @@ -148,17 +149,17 @@ protected: Mantid::API::IAlgorithm_sptr getFittingAlgorithm(FittingMode mode) const; Mantid::API::IAlgorithm_sptr createSequentialFit(Mantid::API::IFunction_sptr function) const; - Mantid::API::IAlgorithm_sptr - createSimultaneousFit(Mantid::API::MultiDomainFunction_sptr function) const; + Mantid::API::IAlgorithm_sptr createSimultaneousFit( + const Mantid::API::MultiDomainFunction_sptr &function) const; Mantid::API::IAlgorithm_sptr createSimultaneousFitWithEqualRange( - Mantid::API::IFunction_sptr function) const; + const Mantid::API::IFunction_sptr &function) const; virtual Mantid::API::MultiDomainFunction_sptr getMultiDomainFunction() const; virtual std::unordered_map<std::string, std::string> mapDefaultParameterNames() const; std::string createSingleFitOutputName(const std::string &formatString, TableDatasetIndex index, WorkspaceIndex spectrum) const; - void addNewWorkspace(Mantid::API::MatrixWorkspace_sptr workspace, + void addNewWorkspace(const Mantid::API::MatrixWorkspace_sptr &workspace, const Spectra &spectra); void removeFittingData(TableDatasetIndex index); @@ -168,7 +169,7 @@ private: void removeWorkspaceFromFittingData(TableDatasetIndex const &index); Mantid::API::IAlgorithm_sptr - createSequentialFit(Mantid::API::IFunction_sptr function, + createSequentialFit(const Mantid::API::IFunction_sptr &function, const std::string &input, IndirectFitData *initialFitData) const; virtual Mantid::API::IAlgorithm_sptr sequentialFitAlgorithm() const; @@ -197,17 +198,17 @@ private: Mantid::API::WorkspaceGroup_sptr resultWorkspace, IndirectFitData *fitData, WorkspaceIndex spectrum) const; - void addOutput(Mantid::API::IAlgorithm_sptr fitAlgorithm, + void addOutput(const Mantid::API::IAlgorithm_sptr &fitAlgorithm, const FitDataIterator &fitDataBegin, const FitDataIterator &fitDataEnd); - void addOutput(Mantid::API::WorkspaceGroup_sptr resultGroup, - Mantid::API::ITableWorkspace_sptr parameterTable, - Mantid::API::WorkspaceGroup_sptr resultWorkspace, + void addOutput(const Mantid::API::WorkspaceGroup_sptr &resultGroup, + const Mantid::API::ITableWorkspace_sptr ¶meterTable, + const Mantid::API::WorkspaceGroup_sptr &resultWorkspace, const FitDataIterator &fitDataBegin, const FitDataIterator &fitDataEnd); - void addOutput(Mantid::API::WorkspaceGroup_sptr resultGroup, - Mantid::API::ITableWorkspace_sptr parameterTable, - Mantid::API::WorkspaceGroup_sptr resultWorkspace, + void addOutput(const Mantid::API::WorkspaceGroup_sptr &resultGroup, + const Mantid::API::ITableWorkspace_sptr ¶meterTable, + const Mantid::API::WorkspaceGroup_sptr &resultWorkspace, IndirectFitData *fitData, WorkspaceIndex spectrum); virtual void addOutput(IndirectFitOutput *fitOutput, diff --git a/qt/scientific_interfaces/Indirect/IndirectFittingModelLegacy.cpp b/qt/scientific_interfaces/Indirect/IndirectFittingModelLegacy.cpp index 77889d1c58e13e4cbeeca029ba942c8b5da788a7..fb1120f4b61c61ed7219c6a4ebf00032349597e6 100644 --- a/qt/scientific_interfaces/Indirect/IndirectFittingModelLegacy.cpp +++ b/qt/scientific_interfaces/Indirect/IndirectFittingModelLegacy.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "IndirectFittingModelLegacy.h" @@ -19,6 +19,7 @@ #include <set> #include <boost/algorithm/string.hpp> +#include <utility> using namespace Mantid::API; @@ -36,8 +37,8 @@ std::string cutLastOf(std::string const &str, std::string const &delimiter) { return str; } -bool equivalentWorkspaces(MatrixWorkspace_const_sptr lhs, - MatrixWorkspace_const_sptr rhs) { +bool equivalentWorkspaces(const MatrixWorkspace_const_sptr &lhs, + const MatrixWorkspace_const_sptr &rhs) { if (!lhs || !rhs) return false; else if (lhs->getName() == "" && rhs->getName() == "") @@ -49,8 +50,8 @@ bool equivalentWorkspaces(MatrixWorkspace_const_sptr lhs, * @return True if the first function precedes the second when ordering by * name. */ -bool functionNameComparator(IFunction_const_sptr first, - IFunction_const_sptr second) { +bool functionNameComparator(const IFunction_const_sptr &first, + const IFunction_const_sptr &second) { return first->name() < second->name(); } @@ -71,8 +72,8 @@ extractFunctions(const CompositeFunction &composite) { return functions; } -bool equivalentFunctions(IFunction_const_sptr func1, - IFunction_const_sptr func2); +bool equivalentFunctions(const IFunction_const_sptr &func1, + const IFunction_const_sptr &func2); /* * Checks whether the specified composite functions have the same composition. @@ -110,8 +111,8 @@ bool equivalentComposites(const CompositeFunction &composite1, * @return True if the specified functions have the same composition, * False otherwise. */ -bool equivalentFunctions(IFunction_const_sptr func1, - IFunction_const_sptr func2) { +bool equivalentFunctions(const IFunction_const_sptr &func1, + const IFunction_const_sptr &func2) { const auto composite1 = boost::dynamic_pointer_cast<const CompositeFunction>(func1); const auto composite2 = @@ -146,8 +147,8 @@ std::string constructInputString( return input.str(); } -void addInputDataToSimultaneousFit(IAlgorithm_sptr fitAlgorithm, - MatrixWorkspace_sptr workspace, +void addInputDataToSimultaneousFit(const IAlgorithm_sptr &fitAlgorithm, + const MatrixWorkspace_sptr &workspace, std::size_t spectrum, const std::pair<double, double> &xRange, const std::vector<double> &excludeRegions, @@ -193,7 +194,7 @@ void addInputDataToSimultaneousFit( } void addInputDataToSimultaneousFit( - IAlgorithm_sptr fitAlgorithm, + const IAlgorithm_sptr &fitAlgorithm, const std::vector<std::unique_ptr<IndirectFitDataLegacy>> &fittingData) { std::size_t counter = 0; for (const auto &data : fittingData) @@ -201,7 +202,7 @@ void addInputDataToSimultaneousFit( } void addInputDataToSimultaneousFit( - IAlgorithm_sptr fitAlgorithm, + const IAlgorithm_sptr &fitAlgorithm, const std::vector<std::unique_ptr<IndirectFitDataLegacy>> &fittingData, const std::pair<double, double> &range, const std::vector<double> &exclude) { @@ -217,7 +218,7 @@ template <typename Map> Map combine(const Map &mapA, const Map &mapB) { } std::unordered_map<std::string, std::string> -shortToLongParameterNames(IFunction_sptr function) { +shortToLongParameterNames(const IFunction_sptr &function) { std::unordered_map<std::string, std::string> shortToLong; for (const auto &name : function->getParameterNames()) shortToLong[name.substr(name.rfind(".") + 1)] = name; @@ -264,7 +265,7 @@ void cleanTemporaries( cleanTemporaries(prefix + std::to_string(i + 1), fittingData[i]); } -CompositeFunction_sptr createMultiDomainFunction(IFunction_sptr function, +CompositeFunction_sptr createMultiDomainFunction(const IFunction_sptr &function, std::size_t numberOfDomains) { auto multiDomainFunction = boost::make_shared<MultiDomainFunction>(); @@ -291,26 +292,29 @@ IFunction_sptr extractFirstInnerFunction(const std::string &function) { template <typename WorkspaceType> boost::shared_ptr<WorkspaceType> -getWorkspaceOutput(IAlgorithm_sptr algorithm, const std::string &propertyName) { +getWorkspaceOutput(const IAlgorithm_sptr &algorithm, + const std::string &propertyName) { return AnalysisDataService::Instance().retrieveWS<WorkspaceType>( algorithm->getProperty(propertyName)); } -WorkspaceGroup_sptr getOutputResult(IAlgorithm_sptr algorithm) { - return getWorkspaceOutput<WorkspaceGroup>(algorithm, "OutputWorkspace"); +WorkspaceGroup_sptr getOutputResult(const IAlgorithm_sptr &algorithm) { + return getWorkspaceOutput<WorkspaceGroup>(std::move(algorithm), + "OutputWorkspace"); } -ITableWorkspace_sptr getOutputParameters(IAlgorithm_sptr algorithm) { - return getWorkspaceOutput<ITableWorkspace>(algorithm, +ITableWorkspace_sptr getOutputParameters(const IAlgorithm_sptr &algorithm) { + return getWorkspaceOutput<ITableWorkspace>(std::move(algorithm), "OutputParameterWorkspace"); } -WorkspaceGroup_sptr getOutputGroup(IAlgorithm_sptr algorithm) { - return getWorkspaceOutput<WorkspaceGroup>(algorithm, "OutputWorkspaceGroup"); +WorkspaceGroup_sptr getOutputGroup(const IAlgorithm_sptr &algorithm) { + return getWorkspaceOutput<WorkspaceGroup>(std::move(algorithm), + "OutputWorkspaceGroup"); } void addFitProperties(Mantid::API::IAlgorithm &algorithm, - Mantid::API::IFunction_sptr function, + const Mantid::API::IFunction_sptr &function, std::string const &xAxisUnit) { algorithm.setProperty("Function", function); algorithm.setProperty("ResultXAxisUnit", xAxisUnit); @@ -550,7 +554,8 @@ void IndirectFittingModelLegacy::addWorkspace(MatrixWorkspace_sptr workspace, void IndirectFittingModelLegacy::addNewWorkspace(MatrixWorkspace_sptr workspace, const SpectraLegacy &spectra) { - m_fittingData.emplace_back(new IndirectFitDataLegacy(workspace, spectra)); + m_fittingData.emplace_back( + new IndirectFitDataLegacy(std::move(workspace), spectra)); m_defaultParameters.emplace_back( createDefaultParameters(m_fittingData.size() - 1)); } @@ -596,7 +601,7 @@ void IndirectFittingModelLegacy::setFittingMode(FittingModeLegacy mode) { } void IndirectFittingModelLegacy::setFitFunction(IFunction_sptr function) { - m_activeFunction = function; + m_activeFunction = std::move(function); m_previousModelSelected = isPreviousModelSelected(); } @@ -607,11 +612,13 @@ void IndirectFittingModelLegacy::setDefaultParameterValue( } void IndirectFittingModelLegacy::addOutput(IAlgorithm_sptr fitAlgorithm) { - addOutput(fitAlgorithm, m_fittingData.begin(), m_fittingData.end()); + addOutput(std::move(fitAlgorithm), m_fittingData.begin(), + m_fittingData.end()); } void IndirectFittingModelLegacy::addOutput( - IAlgorithm_sptr fitAlgorithm, const FitDataIteratorLegacy &fitDataBegin, + const IAlgorithm_sptr &fitAlgorithm, + const FitDataIteratorLegacy &fitDataBegin, const FitDataIteratorLegacy &fitDataEnd) { auto group = getOutputGroup(fitAlgorithm); auto parameters = getOutputParameters(fitAlgorithm); @@ -622,7 +629,7 @@ void IndirectFittingModelLegacy::addOutput( } void IndirectFittingModelLegacy::addSingleFitOutput( - IAlgorithm_sptr fitAlgorithm, std::size_t index) { + const IAlgorithm_sptr &fitAlgorithm, std::size_t index) { auto group = getOutputGroup(fitAlgorithm); auto parameters = getOutputParameters(fitAlgorithm); auto result = getOutputResult(fitAlgorithm); @@ -634,8 +641,9 @@ void IndirectFittingModelLegacy::addSingleFitOutput( } void IndirectFittingModelLegacy::addOutput( - WorkspaceGroup_sptr resultGroup, ITableWorkspace_sptr parameterTable, - WorkspaceGroup_sptr resultWorkspace, + const WorkspaceGroup_sptr &resultGroup, + const ITableWorkspace_sptr ¶meterTable, + const WorkspaceGroup_sptr &resultWorkspace, const FitDataIteratorLegacy &fitDataBegin, const FitDataIteratorLegacy &fitDataEnd) { if (m_previousModelSelected && m_fitOutput) @@ -648,11 +656,11 @@ void IndirectFittingModelLegacy::addOutput( m_previousModelSelected = isPreviousModelSelected(); } -void IndirectFittingModelLegacy::addOutput(WorkspaceGroup_sptr resultGroup, - ITableWorkspace_sptr parameterTable, - WorkspaceGroup_sptr resultWorkspace, - IndirectFitDataLegacy *fitData, - std::size_t spectrum) { +void IndirectFittingModelLegacy::addOutput( + const WorkspaceGroup_sptr &resultGroup, + const ITableWorkspace_sptr ¶meterTable, + const WorkspaceGroup_sptr &resultWorkspace, IndirectFitDataLegacy *fitData, + std::size_t spectrum) { if (m_previousModelSelected && m_fitOutput) addOutput(m_fitOutput.get(), resultGroup, parameterTable, resultWorkspace, fitData, spectrum); @@ -667,8 +675,9 @@ IndirectFitOutputLegacy IndirectFittingModelLegacy::createFitOutput( WorkspaceGroup_sptr resultWorkspace, const FitDataIteratorLegacy &fitDataBegin, const FitDataIteratorLegacy &fitDataEnd) const { - return IndirectFitOutputLegacy(resultGroup, parameterTable, resultWorkspace, - fitDataBegin, fitDataEnd); + return IndirectFitOutputLegacy( + std::move(resultGroup), std::move(parameterTable), + std::move(resultWorkspace), fitDataBegin, fitDataEnd); } IndirectFitOutputLegacy IndirectFittingModelLegacy::createFitOutput( @@ -676,8 +685,9 @@ IndirectFitOutputLegacy IndirectFittingModelLegacy::createFitOutput( Mantid::API::ITableWorkspace_sptr parameterTable, Mantid::API::WorkspaceGroup_sptr resultWorkspace, IndirectFitDataLegacy *fitData, std::size_t spectrum) const { - return IndirectFitOutputLegacy(resultGroup, parameterTable, resultWorkspace, - fitData, spectrum); + return IndirectFitOutputLegacy(std::move(resultGroup), + std::move(parameterTable), + std::move(resultWorkspace), fitData, spectrum); } void IndirectFittingModelLegacy::addOutput( @@ -685,8 +695,8 @@ void IndirectFittingModelLegacy::addOutput( ITableWorkspace_sptr parameterTable, WorkspaceGroup_sptr resultWorkspace, const FitDataIteratorLegacy &fitDataBegin, const FitDataIteratorLegacy &fitDataEnd) const { - fitOutput->addOutput(resultGroup, parameterTable, resultWorkspace, - fitDataBegin, fitDataEnd); + fitOutput->addOutput(std::move(resultGroup), std::move(parameterTable), + std::move(resultWorkspace), fitDataBegin, fitDataEnd); } void IndirectFittingModelLegacy::addOutput( @@ -695,8 +705,8 @@ void IndirectFittingModelLegacy::addOutput( Mantid::API::ITableWorkspace_sptr parameterTable, Mantid::API::WorkspaceGroup_sptr resultWorkspace, IndirectFitDataLegacy *fitData, std::size_t spectrum) const { - fitOutput->addOutput(resultGroup, parameterTable, resultWorkspace, fitData, - spectrum); + fitOutput->addOutput(std::move(resultGroup), std::move(parameterTable), + std::move(resultWorkspace), fitData, spectrum); } FittingModeLegacy IndirectFittingModelLegacy::getFittingMode() const { @@ -820,14 +830,15 @@ IndirectFittingModelLegacy::simultaneousFitAlgorithm() const { IAlgorithm_sptr IndirectFittingModelLegacy::createSequentialFit(IFunction_sptr function) const { const auto input = constructInputString(m_fittingData); - return createSequentialFit(function, input, m_fittingData.front().get()); + return createSequentialFit(std::move(function), input, + m_fittingData.front().get()); } IAlgorithm_sptr IndirectFittingModelLegacy::createSequentialFit( - IFunction_sptr function, const std::string &input, + const IFunction_sptr &function, const std::string &input, IndirectFitDataLegacy *initialFitData) const { auto fitAlgorithm = sequentialFitAlgorithm(); - addFitProperties(*fitAlgorithm, function, getResultXAxisUnit()); + addFitProperties(*fitAlgorithm, std::move(function), getResultXAxisUnit()); fitAlgorithm->setProperty("Input", input); fitAlgorithm->setProperty("OutputWorkspace", sequentialFitOutputName()); fitAlgorithm->setProperty("PassWSIndexToFunction", true); @@ -845,18 +856,18 @@ IAlgorithm_sptr IndirectFittingModelLegacy::createSequentialFit( } IAlgorithm_sptr IndirectFittingModelLegacy::createSimultaneousFit( - IFunction_sptr function) const { + const IFunction_sptr &function) const { auto fitAlgorithm = simultaneousFitAlgorithm(); - addFitProperties(*fitAlgorithm, function, getResultXAxisUnit()); + addFitProperties(*fitAlgorithm, std::move(function), getResultXAxisUnit()); addInputDataToSimultaneousFit(fitAlgorithm, m_fittingData); fitAlgorithm->setProperty("OutputWorkspace", simultaneousFitOutputName()); return fitAlgorithm; } IAlgorithm_sptr IndirectFittingModelLegacy::createSimultaneousFitWithEqualRange( - IFunction_sptr function) const { + const IFunction_sptr &function) const { auto fitAlgorithm = simultaneousFitAlgorithm(); - addFitProperties(*fitAlgorithm, function, getResultXAxisUnit()); + addFitProperties(*fitAlgorithm, std::move(function), getResultXAxisUnit()); auto exclude = vectorFromStringLegacy<double>(getExcludeRegion(0, 0)); addInputDataToSimultaneousFit(fitAlgorithm, m_fittingData, @@ -880,12 +891,12 @@ std::string IndirectFittingModelLegacy::getOutputBasename() const { } void IndirectFittingModelLegacy::cleanFailedRun( - IAlgorithm_sptr fittingAlgorithm) { + const IAlgorithm_sptr &fittingAlgorithm) { cleanTemporaries(fittingAlgorithm->name(), m_fittingData); } void IndirectFittingModelLegacy::cleanFailedSingleRun( - IAlgorithm_sptr fittingAlgorithm, std::size_t index) { + const IAlgorithm_sptr &fittingAlgorithm, std::size_t index) { const auto base = "__" + fittingAlgorithm->name() + "_ws" + std::to_string(index + 1); removeFromADSIfExists(base); diff --git a/qt/scientific_interfaces/Indirect/IndirectFittingModelLegacy.h b/qt/scientific_interfaces/Indirect/IndirectFittingModelLegacy.h index 42091a52fa6d156ad044f566b5ffa6e9dc1a6d26..d87fee500ee4439fad1b67dd3fde9936ea76ea58 100644 --- a/qt/scientific_interfaces/Indirect/IndirectFittingModelLegacy.h +++ b/qt/scientific_interfaces/Indirect/IndirectFittingModelLegacy.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -96,7 +96,7 @@ public: virtual void setFitFunction(Mantid::API::IFunction_sptr function); virtual void setDefaultParameterValue(const std::string &name, double value, std::size_t dataIndex); - void addSingleFitOutput(Mantid::API::IAlgorithm_sptr fitAlgorithm, + void addSingleFitOutput(const Mantid::API::IAlgorithm_sptr &fitAlgorithm, std::size_t index); virtual void addOutput(Mantid::API::IAlgorithm_sptr fitAlgorithm); @@ -119,9 +119,10 @@ public: std::size_t spectrum) const; std::string getOutputBasename() const; - void cleanFailedRun(Mantid::API::IAlgorithm_sptr fittingAlgorithm); - void cleanFailedSingleRun(Mantid::API::IAlgorithm_sptr fittingAlgorithm, - std::size_t index); + void cleanFailedRun(const Mantid::API::IAlgorithm_sptr &fittingAlgorithm); + void + cleanFailedSingleRun(const Mantid::API::IAlgorithm_sptr &fittingAlgorithm, + std::size_t index); protected: Mantid::API::IAlgorithm_sptr @@ -129,9 +130,9 @@ protected: Mantid::API::IAlgorithm_sptr createSequentialFit(Mantid::API::IFunction_sptr function) const; Mantid::API::IAlgorithm_sptr - createSimultaneousFit(Mantid::API::IFunction_sptr function) const; + createSimultaneousFit(const Mantid::API::IFunction_sptr &function) const; Mantid::API::IAlgorithm_sptr createSimultaneousFitWithEqualRange( - Mantid::API::IFunction_sptr function) const; + const Mantid::API::IFunction_sptr &function) const; virtual Mantid::API::CompositeFunction_sptr getMultiDomainFunction() const; virtual std::unordered_map<std::string, std::string> mapDefaultParameterNames() const; @@ -148,7 +149,7 @@ private: void removeWorkspaceFromFittingData(std::size_t const &index); Mantid::API::IAlgorithm_sptr - createSequentialFit(Mantid::API::IFunction_sptr function, + createSequentialFit(const Mantid::API::IFunction_sptr &function, const std::string &input, IndirectFitDataLegacy *initialFitData) const; virtual Mantid::API::IAlgorithm_sptr sequentialFitAlgorithm() const; @@ -177,17 +178,17 @@ private: Mantid::API::WorkspaceGroup_sptr resultWorkspace, IndirectFitDataLegacy *fitData, std::size_t spectrum) const; - void addOutput(Mantid::API::IAlgorithm_sptr fitAlgorithm, + void addOutput(const Mantid::API::IAlgorithm_sptr &fitAlgorithm, const FitDataIteratorLegacy &fitDataBegin, const FitDataIteratorLegacy &fitDataEnd); - void addOutput(Mantid::API::WorkspaceGroup_sptr resultGroup, - Mantid::API::ITableWorkspace_sptr parameterTable, - Mantid::API::WorkspaceGroup_sptr resultWorkspace, + void addOutput(const Mantid::API::WorkspaceGroup_sptr &resultGroup, + const Mantid::API::ITableWorkspace_sptr ¶meterTable, + const Mantid::API::WorkspaceGroup_sptr &resultWorkspace, const FitDataIteratorLegacy &fitDataBegin, const FitDataIteratorLegacy &fitDataEnd); - void addOutput(Mantid::API::WorkspaceGroup_sptr resultGroup, - Mantid::API::ITableWorkspace_sptr parameterTable, - Mantid::API::WorkspaceGroup_sptr resultWorkspace, + void addOutput(const Mantid::API::WorkspaceGroup_sptr &resultGroup, + const Mantid::API::ITableWorkspace_sptr ¶meterTable, + const Mantid::API::WorkspaceGroup_sptr &resultWorkspace, IndirectFitDataLegacy *fitData, std::size_t spectrum); virtual void addOutput(IndirectFitOutputLegacy *fitOutput, diff --git a/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/ConvFunctionModel.cpp b/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/ConvFunctionModel.cpp index 47d2d9b49528c6efedeafde3807fa5c5f616c1a8..0cf9dc9adbe76ad0176ecc227295b216d5048b36 100644 --- a/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/ConvFunctionModel.cpp +++ b/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/ConvFunctionModel.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "ConvFunctionModel.h" #include "MantidAPI/FunctionFactory.h" @@ -69,7 +69,7 @@ void ConvFunctionModel::setFunction(IFunction_sptr fun) { m_model.setFunction(fun); } -void ConvFunctionModel::checkConvolution(IFunction_sptr fun) { +void ConvFunctionModel::checkConvolution(const IFunction_sptr &fun) { bool isFitTypeSet = false; bool isResolutionSet = false; for (size_t i = 0; i < fun->nFunctions(); ++i) { @@ -102,7 +102,7 @@ void ConvFunctionModel::checkConvolution(IFunction_sptr fun) { } } -void ConvFunctionModel::checkSingleFunction(IFunction_sptr fun, +void ConvFunctionModel::checkSingleFunction(const IFunction_sptr &fun, bool &isFitTypeSet) { assert(fun->nFunctions() == 0); auto const name = fun->name(); @@ -609,7 +609,7 @@ void ConvFunctionModel::setCurrentValues(const QMap<ParamID, double> &values) { } void ConvFunctionModel::applyParameterFunction( - std::function<void(ParamID)> paramFun) const { + const std::function<void(ParamID)> ¶mFun) const { applyToFitType(m_fitType, paramFun); applyToBackground(m_backgroundType, paramFun); applyToDelta(m_hasDeltaFunction, paramFun); diff --git a/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/ConvFunctionModel.h b/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/ConvFunctionModel.h index 19a8a8ec887065a745ad05928197ebe0fcbcd1b5..edfa5f477bf7d12ac9c9bd5671f5f8e276016be4 100644 --- a/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/ConvFunctionModel.h +++ b/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/ConvFunctionModel.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -115,7 +115,8 @@ private: boost::optional<QString> getParameterDescription(ParamID name) const; boost::optional<QString> getPrefix(ParamID name) const; void setCurrentValues(const QMap<ParamID, double> &); - void applyParameterFunction(std::function<void(ParamID)> paramFun) const; + void + applyParameterFunction(const std::function<void(ParamID)> ¶mFun) const; boost::optional<ParamID> getParameterId(const QString &parName); std::string buildLorentzianFunctionString() const; std::string buildTeixeiraFunctionString() const; @@ -130,8 +131,8 @@ private: void removeGlobal(const QString &parName); QStringList makeGlobalList() const; int getNumberOfPeaks() const; - void checkConvolution(IFunction_sptr fun); - void checkSingleFunction(IFunction_sptr fun, bool &isFitTypeSet); + void checkConvolution(const IFunction_sptr &fun); + void checkSingleFunction(const IFunction_sptr &fun, bool &isFitTypeSet); ConvolutionFunctionModel m_model; FitType m_fitType = FitType::None; diff --git a/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/ConvTemplateBrowser.cpp b/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/ConvTemplateBrowser.cpp index 189d9768a6ec5bcdc61a72d9eb53fc3c5ae9df47..fe36ff003f8792d8a0351f197b294e41506e707c 100644 --- a/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/ConvTemplateBrowser.cpp +++ b/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/ConvTemplateBrowser.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "ConvTemplateBrowser.h" diff --git a/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/ConvTemplateBrowser.h b/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/ConvTemplateBrowser.h index 4e1bc262e9992d53bcdd5780388a451ec811d84e..2a17f839a238bed9b5a00b7a862066ca9d4e3ee0 100644 --- a/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/ConvTemplateBrowser.h +++ b/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/ConvTemplateBrowser.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/ConvTemplatePresenter.cpp b/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/ConvTemplatePresenter.cpp index febb6ed1976a9747466f6d1aab7168b85ff12333..c047f3c3eb1d2f2c6b21abcfc6630058282bf6bc 100644 --- a/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/ConvTemplatePresenter.cpp +++ b/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/ConvTemplatePresenter.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "ConvTemplatePresenter.h" #include "ConvTemplateBrowser.h" diff --git a/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/ConvTemplatePresenter.h b/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/ConvTemplatePresenter.h index 5c6dca58544f7bc258e9f1e52f66393f60b8a197..a50071dd3fa4e52b39cb46abe63b89d654d1f405 100644 --- a/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/ConvTemplatePresenter.h +++ b/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/ConvTemplatePresenter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/ConvTypes.cpp b/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/ConvTypes.cpp index b0450895a46ca4d6293e53bdb38350e930995ab9..5097f5c3219383e1824f5855d1e46101c76f0909 100644 --- a/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/ConvTypes.cpp +++ b/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/ConvTypes.cpp @@ -1,3 +1,9 @@ +// Mantid Repository : https://github.com/mantidproject/mantid +// +// Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS +// SPDX - License - Identifier: GPL - 3.0 + #include "ConvTypes.h" #include "MantidAPI/FunctionFactory.h" #include "MantidAPI/IFunction.h" diff --git a/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/ConvTypes.h b/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/ConvTypes.h index 204ec8d49904ef1afeea26916ce530184726e327..99473fdaed02f6e47418adb05dd9f89650721732 100644 --- a/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/ConvTypes.h +++ b/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/ConvTypes.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -91,7 +91,7 @@ inline ParamID &operator++(ParamID &id) { } inline void applyToParamIDRange(ParamID from, ParamID to, - std::function<void(ParamID)> fun) { + const std::function<void(ParamID)> &fun) { if (from == ParamID::NONE || to == ParamID::NONE) return; for (auto i = from; i <= to; ++i) diff --git a/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/FQFunctionModel.cpp b/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/FQFunctionModel.cpp index 9db35f02deee90ec3776f1b6a34e9acffc8fccb5..48561aa1c5aae8a746f6eca8f4039a523fa36d00 100644 --- a/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/FQFunctionModel.cpp +++ b/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/FQFunctionModel.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "FQFunctionModel.h" #include "MantidAPI/FunctionFactory.h" diff --git a/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/FQFunctionModel.h b/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/FQFunctionModel.h index 06962efe30c4db434175593cf153a8b4cdbf0e63..a76ac0b417314d919ddda170f422089b9dd560ca 100644 --- a/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/FQFunctionModel.h +++ b/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/FQFunctionModel.h @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #pragma once #include "DllConfig.h" diff --git a/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/FQTemplateBrowser.cpp b/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/FQTemplateBrowser.cpp index 7e6ec9c6ed5de604b601962bfd5a64f31699b361..d46c53ec0aaf43003a79e3cd2f6a82865960d0f3 100644 --- a/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/FQTemplateBrowser.cpp +++ b/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/FQTemplateBrowser.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "FQTemplateBrowser.h" @@ -56,7 +56,7 @@ void FQTemplateBrowser::createProperties() { m_boolManager->blockSignals(false); } -void FQTemplateBrowser::setDataType(QStringList allowedFunctionsList) { +void FQTemplateBrowser::setDataType(const QStringList &allowedFunctionsList) { ScopedFalse _false(m_emitEnumChange); m_enumManager->setEnumNames(m_fitType, allowedFunctionsList); m_enumManager->setValue(m_fitType, 0); @@ -67,8 +67,8 @@ void FQTemplateBrowser::setEnumValue(int enumIndex) { m_enumManager->setValue(m_fitType, enumIndex); } -void FQTemplateBrowser::addParameter(QString parameterName, - QString parameterDescription) { +void FQTemplateBrowser::addParameter(const QString ¶meterName, + const QString ¶meterDescription) { auto newParameter = m_parameterManager->addProperty(parameterName); m_parameterManager->setDescription(newParameter, parameterDescription.toStdString()); @@ -152,7 +152,7 @@ void FQTemplateBrowser::updateParameters(const IFunction &fun) { m_presenter.updateParameters(fun); } -void FQTemplateBrowser::setParameterValue(QString parameterName, +void FQTemplateBrowser::setParameterValue(const QString ¶meterName, double parameterValue, double parameterError) { m_parameterManager->setValue(m_parameterMap[parameterName], parameterValue); diff --git a/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/FQTemplateBrowser.h b/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/FQTemplateBrowser.h index 58eec695173037becf57ca302b7e72bab1bb7b7b..72c5221d0a1079a0a6358bff8ce07fc7b0ddf767 100644 --- a/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/FQTemplateBrowser.h +++ b/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/FQTemplateBrowser.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -59,10 +59,11 @@ public: int getCurrentDataset() override; void updateDataType(DataType) override; void spectrumChanged(int) override; - void addParameter(QString parameterName, QString parameterDescription); - void setParameterValue(QString parameterName, double parameterValue, + void addParameter(const QString ¶meterName, + const QString ¶meterDescription); + void setParameterValue(const QString ¶meterName, double parameterValue, double parameterError); - void setDataType(QStringList allowedFunctionsList); + void setDataType(const QStringList &allowedFunctionsList); void setEnumValue(int enumIndex); signals: diff --git a/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/FQTemplatePresenter.cpp b/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/FQTemplatePresenter.cpp index 0052218cf4e00dafead6b57a6b9fb18c1a68c7b6..0e90cd0a414bffa98bb7c72a39a15e7489d8ccc8 100644 --- a/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/FQTemplatePresenter.cpp +++ b/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/FQTemplatePresenter.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "FQTemplatePresenter.h" #include "FQTemplateBrowser.h" diff --git a/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/FQTemplatePresenter.h b/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/FQTemplatePresenter.h index 8073c534eab7be1ecf3fa332fd49571525c95577..da6111ada93561e248d494b1b53c818ae1a9f9fa 100644 --- a/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/FQTemplatePresenter.h +++ b/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/FQTemplatePresenter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/IqtFunctionModel.cpp b/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/IqtFunctionModel.cpp index 5b2b04a6b437fee9a4a5d48140440fba576c40a5..d299d35e23b23a007c2cb35c10dc07c2b410232b 100644 --- a/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/IqtFunctionModel.cpp +++ b/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/IqtFunctionModel.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "IqtFunctionModel.h" #include "MantidAPI/FunctionFactory.h" @@ -565,7 +565,7 @@ void IqtFunctionModel::setCurrentValues(const QMap<ParamID, double> &values) { } void IqtFunctionModel::applyParameterFunction( - std::function<void(ParamID)> paramFun) const { + const std::function<void(ParamID)> ¶mFun) const { if (m_numberOfExponentials > 0) { paramFun(ParamID::EXP1_HEIGHT); paramFun(ParamID::EXP1_LIFETIME); diff --git a/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/IqtFunctionModel.h b/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/IqtFunctionModel.h index 2ce7df10565ef3d734a5eeb5d6b7c858efcb4ff0..3751883378023cfbda4124420f6936ef14e40f1b 100644 --- a/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/IqtFunctionModel.h +++ b/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/IqtFunctionModel.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -114,7 +114,8 @@ private: boost::optional<QString> getParameterDescription(ParamID name) const; boost::optional<QString> getPrefix(ParamID name) const; void setCurrentValues(const QMap<ParamID, double> &); - void applyParameterFunction(std::function<void(ParamID)> paramFun) const; + void + applyParameterFunction(const std::function<void(ParamID)> ¶mFun) const; boost::optional<ParamID> getParameterId(const QString &parName); std::string buildExpDecayFunctionString() const; std::string buildStretchExpFunctionString() const; diff --git a/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/IqtTemplateBrowser.cpp b/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/IqtTemplateBrowser.cpp index 6e4d14d25d2b5911ab8fa642d9c995521989375b..b7ff536dd9bd9ed329e18a009c72a85f1b90b308 100644 --- a/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/IqtTemplateBrowser.cpp +++ b/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/IqtTemplateBrowser.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "IqtTemplateBrowser.h" diff --git a/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/IqtTemplateBrowser.h b/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/IqtTemplateBrowser.h index 81a68a85d26f9c34961b4cc792d96be100fba7c9..2f9f023cc8a1a71984f44f9a894adfb59bc9218d 100644 --- a/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/IqtTemplateBrowser.h +++ b/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/IqtTemplateBrowser.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/IqtTemplatePresenter.cpp b/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/IqtTemplatePresenter.cpp index df3cabdf5fbeea067462e51fabae93bd23af7d03..92e57a0a66ad37a96913b60b5a13efd2a010febe 100644 --- a/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/IqtTemplatePresenter.cpp +++ b/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/IqtTemplatePresenter.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "IqtTemplatePresenter.h" #include "IqtTemplateBrowser.h" diff --git a/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/IqtTemplatePresenter.h b/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/IqtTemplatePresenter.h index 328175c28a079759bc1fa5e26829467e7b6c4fad..fd8a0e78cb4fc6aa50332fb97cf6d54410d19f36 100644 --- a/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/IqtTemplatePresenter.h +++ b/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/IqtTemplatePresenter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/MSDFunctionModel.cpp b/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/MSDFunctionModel.cpp index 7ab749f70091b267f554244aa06c722670814484..be208b3b0673db08b6b8b675591117954eab4645 100644 --- a/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/MSDFunctionModel.cpp +++ b/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/MSDFunctionModel.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MSDFunctionModel.h" #include "MantidAPI/FunctionFactory.h" @@ -457,7 +457,7 @@ void MSDFunctionModel::setCurrentValues(const QMap<ParamID, double> &values) { } void MSDFunctionModel::applyParameterFunction( - std::function<void(ParamID)> paramFun) const { + const std::function<void(ParamID)> ¶mFun) const { if (m_fitType == QString::fromStdString(Gauss)) { paramFun(ParamID::GAUSSIAN_HEIGHT); paramFun(ParamID::GAUSSIAN_MSD); diff --git a/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/MSDFunctionModel.h b/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/MSDFunctionModel.h index 3f54a7f6ed27c817516e866d3e254ffb03367a5c..19962b630a85e237e4985e0158fe346f1edfc6e9 100644 --- a/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/MSDFunctionModel.h +++ b/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/MSDFunctionModel.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -109,7 +109,8 @@ private: boost::optional<QString> getParameterDescription(ParamID name) const; boost::optional<QString> getPrefix(ParamID name) const; void setCurrentValues(const QMap<ParamID, double> &); - void applyParameterFunction(std::function<void(ParamID)> paramFun) const; + void + applyParameterFunction(const std::function<void(ParamID)> ¶mFun) const; boost::optional<ParamID> getParameterId(const QString &parName); std::string buildGaussianFunctionString() const; std::string buildPetersFunctionString() const; diff --git a/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/MSDTemplateBrowser.cpp b/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/MSDTemplateBrowser.cpp index 731b59920d685d0a76b2c8d379a54b99bab910a4..2a35e461fd53ed7072e3f4bb82975ad77ffda963 100644 --- a/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/MSDTemplateBrowser.cpp +++ b/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/MSDTemplateBrowser.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MSDTemplateBrowser.h" diff --git a/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/MSDTemplateBrowser.h b/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/MSDTemplateBrowser.h index a6ceb748c2ba135506fd84aa4e9614d8578d5a0e..575c83483b2316084c74854bbba643e8c8792c8c 100644 --- a/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/MSDTemplateBrowser.h +++ b/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/MSDTemplateBrowser.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/MSDTemplatePresenter.cpp b/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/MSDTemplatePresenter.cpp index 7de651c63a8383767c14bd663c363baa7d1f6d7d..3cd6c425a6b3088e8a1e20abaf9ddffbd8361ee6 100644 --- a/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/MSDTemplatePresenter.cpp +++ b/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/MSDTemplatePresenter.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MSDTemplatePresenter.h" #include "MSDTemplateBrowser.h" diff --git a/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/MSDTemplatePresenter.h b/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/MSDTemplatePresenter.h index ecc94cbc24eafe0debc2f9125569e880fb77c1bb..4cbfd590705d1005c38d14ec5b9baf5665a016e6 100644 --- a/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/MSDTemplatePresenter.h +++ b/qt/scientific_interfaces/Indirect/IndirectFunctionBrowser/MSDTemplatePresenter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Indirect/IndirectInstrumentConfig.cpp b/qt/scientific_interfaces/Indirect/IndirectInstrumentConfig.cpp index 267404c2d32b81e80ce647148fbe25f4ed9e9419..a743511ad4c57647bccb370618416c66b18f6602 100644 --- a/qt/scientific_interfaces/Indirect/IndirectInstrumentConfig.cpp +++ b/qt/scientific_interfaces/Indirect/IndirectInstrumentConfig.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "IndirectInstrumentConfig.h" @@ -300,7 +300,8 @@ void IndirectInstrumentConfig::updateInstrumentConfigurations( * @param ws Instrument workspace * @return If the workspace contained valid analysers */ -bool IndirectInstrumentConfig::updateAnalysersList(MatrixWorkspace_sptr ws) { +bool IndirectInstrumentConfig::updateAnalysersList( + const MatrixWorkspace_sptr &ws) { if (!ws) return false; diff --git a/qt/scientific_interfaces/Indirect/IndirectInstrumentConfig.h b/qt/scientific_interfaces/Indirect/IndirectInstrumentConfig.h index 2c50dfc24a9f3ef77cd5cb1158f6690901314a18..1419916b327a71b4386a732ddc508ae132ae3e48 100644 --- a/qt/scientific_interfaces/Indirect/IndirectInstrumentConfig.h +++ b/qt/scientific_interfaces/Indirect/IndirectInstrumentConfig.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -96,7 +96,7 @@ signals: private slots: /// Updates the list of analysers when an instrument is selected - bool updateAnalysersList(Mantid::API::MatrixWorkspace_sptr ws); + bool updateAnalysersList(const Mantid::API::MatrixWorkspace_sptr &ws); /// Updates the list of reflections when an analyser is selected void updateReflectionsList(int index); /// Filters out any disabled instruments diff --git a/qt/scientific_interfaces/Indirect/IndirectInterface.cpp b/qt/scientific_interfaces/Indirect/IndirectInterface.cpp index a7d8da415a184b359dfbf0e848ab512a00e30bb4..b787656126cc284bcd9f4c0d99fc3c2d8a662032 100644 --- a/qt/scientific_interfaces/Indirect/IndirectInterface.cpp +++ b/qt/scientific_interfaces/Indirect/IndirectInterface.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "IndirectInterface.h" diff --git a/qt/scientific_interfaces/Indirect/IndirectInterface.h b/qt/scientific_interfaces/Indirect/IndirectInterface.h index 4b3680ebc8131f920038d56c880c55ba05c10bee..a996af37d0ba7b18ba01be5bcd7649bcc67fbb29 100644 --- a/qt/scientific_interfaces/Indirect/IndirectInterface.h +++ b/qt/scientific_interfaces/Indirect/IndirectInterface.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Indirect/IndirectLoadILL.cpp b/qt/scientific_interfaces/Indirect/IndirectLoadILL.cpp index 5c8242097593ec9601003f5b4103d0035c24f89c..9b7e11f354ac40d62053ad0bc93ce401c03cfcdc 100644 --- a/qt/scientific_interfaces/Indirect/IndirectLoadILL.cpp +++ b/qt/scientific_interfaces/Indirect/IndirectLoadILL.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "IndirectLoadILL.h" #include "MantidAPI/AlgorithmManager.h" @@ -47,7 +47,7 @@ std::string constructPrefix(std::string const &runName, return constructPrefix(runName, analyser, reflection); } -std::string getWorkspacePrefix(MatrixWorkspace_const_sptr workspace, +std::string getWorkspacePrefix(const MatrixWorkspace_const_sptr &workspace, std::string const &facility) { auto const instrument = workspace->getInstrument(); auto const runName = diff --git a/qt/scientific_interfaces/Indirect/IndirectLoadILL.h b/qt/scientific_interfaces/Indirect/IndirectLoadILL.h index 6188b4140b57147b502f8fb999e7282010ba52b9..4b3af93885223d0de3e44c4506d3ef1296e405b5 100644 --- a/qt/scientific_interfaces/Indirect/IndirectLoadILL.h +++ b/qt/scientific_interfaces/Indirect/IndirectLoadILL.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Indirect/IndirectMolDyn.cpp b/qt/scientific_interfaces/Indirect/IndirectMolDyn.cpp index 5f23d8cecfd16358156561f71af1edd2672a88a6..aa188ba535ccd592fb8bb38dd57bdade00a09fd0 100644 --- a/qt/scientific_interfaces/Indirect/IndirectMolDyn.cpp +++ b/qt/scientific_interfaces/Indirect/IndirectMolDyn.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "IndirectMolDyn.h" diff --git a/qt/scientific_interfaces/Indirect/IndirectMolDyn.h b/qt/scientific_interfaces/Indirect/IndirectMolDyn.h index e5f303883e8006bec4e76b4e7612edb1c435578f..793476deb4364510223050705d69911079a3d024 100644 --- a/qt/scientific_interfaces/Indirect/IndirectMolDyn.h +++ b/qt/scientific_interfaces/Indirect/IndirectMolDyn.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Indirect/IndirectMoments.cpp b/qt/scientific_interfaces/Indirect/IndirectMoments.cpp index 7135c0dd5dfd94d1d3bc316ba3781b618d371f38..85f54fcd2caa75df4ef5c3cc805aee95b111eecb 100644 --- a/qt/scientific_interfaces/Indirect/IndirectMoments.cpp +++ b/qt/scientific_interfaces/Indirect/IndirectMoments.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "IndirectMoments.h" #include "IndirectDataValidationHelper.h" @@ -267,8 +267,8 @@ void IndirectMoments::setSaveEnabled(bool enabled) { void IndirectMoments::updateRunButton(bool enabled, std::string const &enableOutputButtons, - QString const message, - QString const tooltip) { + QString const &message, + QString const &tooltip) { setRunEnabled(enabled); m_uiForm.pbRun->setText(message); m_uiForm.pbRun->setToolTip(tooltip); diff --git a/qt/scientific_interfaces/Indirect/IndirectMoments.h b/qt/scientific_interfaces/Indirect/IndirectMoments.h index 4a10e1d949cc9eaae27f2c1fa5703efea2e94df7..35234afd12b0d51f2f20d05799ceeb4067cb36ab 100644 --- a/qt/scientific_interfaces/Indirect/IndirectMoments.h +++ b/qt/scientific_interfaces/Indirect/IndirectMoments.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -48,8 +48,8 @@ protected slots: void setSaveEnabled(bool enabled); void updateRunButton(bool enabled = true, std::string const &enableOutputButtons = "unchanged", - QString const message = "Run", - QString const tooltip = ""); + QString const &message = "Run", + QString const &tooltip = ""); private slots: void handleDataReady(QString const &dataName) override; diff --git a/qt/scientific_interfaces/Indirect/IndirectPlotOptionsModel.cpp b/qt/scientific_interfaces/Indirect/IndirectPlotOptionsModel.cpp index 808691f4918ecb226a7da6d61f78d291f6c5d62b..cb11eac1a0821bb5591aa4ff86884a4684182766 100644 --- a/qt/scientific_interfaces/Indirect/IndirectPlotOptionsModel.cpp +++ b/qt/scientific_interfaces/Indirect/IndirectPlotOptionsModel.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "IndirectPlotOptionsModel.h" @@ -86,7 +86,7 @@ void insertWorkspaceNames(std::vector<std::string> &allNames, } boost::optional<std::string> -checkWorkspaceSpectrumSize(MatrixWorkspace_const_sptr workspace) { +checkWorkspaceSpectrumSize(const MatrixWorkspace_const_sptr &workspace) { if (workspace->y(0).size() < 2) return "Plot Spectra failed: There is only one data point to plot in " + workspace->getName() + "."; @@ -94,7 +94,7 @@ checkWorkspaceSpectrumSize(MatrixWorkspace_const_sptr workspace) { } boost::optional<std::string> -checkWorkspaceBinSize(MatrixWorkspace_const_sptr workspace) { +checkWorkspaceBinSize(const MatrixWorkspace_const_sptr &workspace) { if (workspace->getNumberHistograms() < 2) return "Plot Bins failed: There is only one data point to plot in " + workspace->getName() + "."; @@ -208,14 +208,14 @@ bool IndirectPlotOptionsModel::validateIndices( } bool IndirectPlotOptionsModel::validateSpectra( - MatrixWorkspace_sptr workspace, std::string const &spectra) const { + const MatrixWorkspace_sptr &workspace, std::string const &spectra) const { auto const numberOfHistograms = workspace->getNumberHistograms(); auto const lastIndex = std::stoul(splitStringBy(spectra, ",-").back()); return lastIndex < numberOfHistograms; } -bool IndirectPlotOptionsModel::validateBins(MatrixWorkspace_sptr workspace, - std::string const &bins) const { +bool IndirectPlotOptionsModel::validateBins( + const MatrixWorkspace_sptr &workspace, std::string const &bins) const { auto const numberOfBins = workspace->y(0).size(); auto const lastIndex = std::stoul(splitStringBy(bins, ",-").back()); return lastIndex < numberOfBins; diff --git a/qt/scientific_interfaces/Indirect/IndirectPlotOptionsModel.h b/qt/scientific_interfaces/Indirect/IndirectPlotOptionsModel.h index 7719f5c20f15eebe48f1961ea879db42b93faf9d..eebcf27dbddd4899f2920c2b88194140383c350b 100644 --- a/qt/scientific_interfaces/Indirect/IndirectPlotOptionsModel.h +++ b/qt/scientific_interfaces/Indirect/IndirectPlotOptionsModel.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -61,9 +61,9 @@ public: std::map<std::string, std::string> availableActions() const; private: - bool validateSpectra(Mantid::API::MatrixWorkspace_sptr workspace, + bool validateSpectra(const Mantid::API::MatrixWorkspace_sptr &workspace, std::string const &spectra) const; - bool validateBins(Mantid::API::MatrixWorkspace_sptr workspace, + bool validateBins(const Mantid::API::MatrixWorkspace_sptr &workspace, std::string const &bins) const; boost::optional<std::string> diff --git a/qt/scientific_interfaces/Indirect/IndirectPlotOptionsPresenter.cpp b/qt/scientific_interfaces/Indirect/IndirectPlotOptionsPresenter.cpp index e5a9731c0c376b8d196fb9d6d4a07bc4ed2f0d7b..1da888a7eed14270c7f3b656ee1d7b77c754e124 100644 --- a/qt/scientific_interfaces/Indirect/IndirectPlotOptionsPresenter.cpp +++ b/qt/scientific_interfaces/Indirect/IndirectPlotOptionsPresenter.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "IndirectPlotOptionsPresenter.h" diff --git a/qt/scientific_interfaces/Indirect/IndirectPlotOptionsPresenter.h b/qt/scientific_interfaces/Indirect/IndirectPlotOptionsPresenter.h index ca85b2913f93bd96930def32d865e46a2059d98e..e521ca975a2a7b65c0af80d6e601a71ae9a519cc 100644 --- a/qt/scientific_interfaces/Indirect/IndirectPlotOptionsPresenter.h +++ b/qt/scientific_interfaces/Indirect/IndirectPlotOptionsPresenter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Indirect/IndirectPlotOptionsView.cpp b/qt/scientific_interfaces/Indirect/IndirectPlotOptionsView.cpp index 8112a18f62cb23fde80a413eb354f9adc6036f49..dea98a44c6868c46df0ef159bbf8d52b5fe6f802 100644 --- a/qt/scientific_interfaces/Indirect/IndirectPlotOptionsView.cpp +++ b/qt/scientific_interfaces/Indirect/IndirectPlotOptionsView.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "IndirectPlotOptionsView.h" diff --git a/qt/scientific_interfaces/Indirect/IndirectPlotOptionsView.h b/qt/scientific_interfaces/Indirect/IndirectPlotOptionsView.h index 3c9ec905b57a885b36584d3085a4623f23157447..8b4f5ca0a747e5a898acd87334dd374b178103d0 100644 --- a/qt/scientific_interfaces/Indirect/IndirectPlotOptionsView.h +++ b/qt/scientific_interfaces/Indirect/IndirectPlotOptionsView.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Indirect/IndirectPlotter.cpp b/qt/scientific_interfaces/Indirect/IndirectPlotter.cpp index ca329402fd7ea9c90b232b887dae0aa256e2f50e..56711979d16521a4924a6483d515050ed7a4702d 100644 --- a/qt/scientific_interfaces/Indirect/IndirectPlotter.cpp +++ b/qt/scientific_interfaces/Indirect/IndirectPlotter.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "IndirectPlotter.h" #include "IndirectSettingsHelper.h" @@ -18,6 +18,7 @@ #include <QString> #include <QStringList> #include <QVariant> +#include <utility> using namespace MantidQt::Widgets::MplCpp; #endif @@ -178,8 +179,8 @@ workbenchPlot(QStringList const &workspaceNames, plotKwargs["capsize"] = ERROR_CAPSIZE; using MantidQt::Widgets::MplCpp::plot; - return plot(workspaceNames, boost::none, indices, figure, plotKwargs, - boost::none, boost::none, errorBars); + return plot(workspaceNames, boost::none, indices, std::move(figure), + plotKwargs, boost::none, boost::none, errorBars); } #endif @@ -360,7 +361,7 @@ bool IndirectPlotter::validate( * @return True if the data is valid */ bool IndirectPlotter::validate( - MatrixWorkspace_const_sptr workspace, + const MatrixWorkspace_const_sptr &workspace, boost::optional<std::string> const &workspaceIndices, boost::optional<MantidAxis> const &axisType) const { if (workspaceIndices && axisType && axisType.get() == MantidAxis::Spectrum) @@ -379,7 +380,7 @@ bool IndirectPlotter::validate( * @return True if the indices exist */ bool IndirectPlotter::validateSpectra( - MatrixWorkspace_const_sptr workspace, + const MatrixWorkspace_const_sptr &workspace, std::string const &workspaceIndices) const { auto const numberOfHistograms = workspace->getNumberHistograms(); auto const lastIndex = @@ -395,7 +396,7 @@ bool IndirectPlotter::validateSpectra( * '0-2,5,7-10') * @return True if the bin indices exist */ -bool IndirectPlotter::validateBins(MatrixWorkspace_const_sptr workspace, +bool IndirectPlotter::validateBins(const MatrixWorkspace_const_sptr &workspace, std::string const &binIndices) const { auto const numberOfBins = workspace->y(0).size(); auto const lastIndex = std::stoul(splitStringBy(binIndices, ",-").back()); diff --git a/qt/scientific_interfaces/Indirect/IndirectPlotter.h b/qt/scientific_interfaces/Indirect/IndirectPlotter.h index 6f7d65de1f90e95f9d32820481248aca8f6bc898..db9a1a2e01a9b644daeb4f11303726bff52a1051 100644 --- a/qt/scientific_interfaces/Indirect/IndirectPlotter.h +++ b/qt/scientific_interfaces/Indirect/IndirectPlotter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -54,12 +54,12 @@ public: private: bool - validate(Mantid::API::MatrixWorkspace_const_sptr workspace, + validate(const Mantid::API::MatrixWorkspace_const_sptr &workspace, boost::optional<std::string> const &workspaceIndices = boost::none, boost::optional<MantidAxis> const &axisType = boost::none) const; - bool validateSpectra(Mantid::API::MatrixWorkspace_const_sptr workspace, + bool validateSpectra(const Mantid::API::MatrixWorkspace_const_sptr &workspace, std::string const &workspaceIndices) const; - bool validateBins(Mantid::API::MatrixWorkspace_const_sptr workspace, + bool validateBins(const Mantid::API::MatrixWorkspace_const_sptr &workspace, std::string const &binIndices) const; #if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) diff --git a/qt/scientific_interfaces/Indirect/IndirectSassena.cpp b/qt/scientific_interfaces/Indirect/IndirectSassena.cpp index e0ad63bb574479385d44a0ac85b8d478a996a7f8..7ee5c71738600c07cde36499d0728a8ebdddb442 100644 --- a/qt/scientific_interfaces/Indirect/IndirectSassena.cpp +++ b/qt/scientific_interfaces/Indirect/IndirectSassena.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "IndirectSassena.h" diff --git a/qt/scientific_interfaces/Indirect/IndirectSassena.h b/qt/scientific_interfaces/Indirect/IndirectSassena.h index 46605b037b6d1d3d32f201ee3d42e99ad593d3e8..d6cf0b2342e77494150eb85c3ca6000d082c1886 100644 --- a/qt/scientific_interfaces/Indirect/IndirectSassena.h +++ b/qt/scientific_interfaces/Indirect/IndirectSassena.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Indirect/IndirectSettings.cpp b/qt/scientific_interfaces/Indirect/IndirectSettings.cpp index 97cc53b64de464c6f90159ae16f376d7e13d157a..cc3e604f7f91d3b1d9cab56c96908cb6809f5a09 100644 --- a/qt/scientific_interfaces/Indirect/IndirectSettings.cpp +++ b/qt/scientific_interfaces/Indirect/IndirectSettings.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "IndirectSettings.h" #include "IndirectInterface.h" @@ -54,7 +54,7 @@ void IndirectSettings::otherUserSubWindowCreated( } void IndirectSettings::connectIndirectInterface( - QPointer<UserSubWindow> window) { + const QPointer<UserSubWindow> &window) { if (auto indirectInterface = dynamic_cast<IndirectInterface *>(window.data())) connect(m_presenter.get(), SIGNAL(applySettings()), indirectInterface, SLOT(applySettings())); diff --git a/qt/scientific_interfaces/Indirect/IndirectSettings.h b/qt/scientific_interfaces/Indirect/IndirectSettings.h index 1e60d467a2e7ddc4be4e329ccb531242f979b170..581da825cd230e99f00dee20b97223b72ea94536 100644 --- a/qt/scientific_interfaces/Indirect/IndirectSettings.h +++ b/qt/scientific_interfaces/Indirect/IndirectSettings.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -51,7 +51,7 @@ private: void otherUserSubWindowCreated(QList<QPointer<UserSubWindow>> &windows) override; - void connectIndirectInterface(QPointer<UserSubWindow> window); + void connectIndirectInterface(const QPointer<UserSubWindow> &window); QWidget *getDockedOrFloatingWindow(); diff --git a/qt/scientific_interfaces/Indirect/IndirectSettingsHelper.cpp b/qt/scientific_interfaces/Indirect/IndirectSettingsHelper.cpp index 8bfdb831c51b4fe38473b50b2443e8fd2ca13c66..09084a98ae623e5166fa889c0030c83c309dc8ae 100644 --- a/qt/scientific_interfaces/Indirect/IndirectSettingsHelper.cpp +++ b/qt/scientific_interfaces/Indirect/IndirectSettingsHelper.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "IndirectSettingsHelper.h" diff --git a/qt/scientific_interfaces/Indirect/IndirectSettingsHelper.h b/qt/scientific_interfaces/Indirect/IndirectSettingsHelper.h index 175204b95225089e6105daa7d5b182a6c79e14c1..ed4f62b4e0d16ae15fce469d1418758fee57dc0c 100644 --- a/qt/scientific_interfaces/Indirect/IndirectSettingsHelper.h +++ b/qt/scientific_interfaces/Indirect/IndirectSettingsHelper.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Indirect/IndirectSettingsModel.cpp b/qt/scientific_interfaces/Indirect/IndirectSettingsModel.cpp index de290fcd80dce4ea000c9633bd928bd3c49c17ea..388434dc37043cea8f0d5fb02c67d7cfc85c447c 100644 --- a/qt/scientific_interfaces/Indirect/IndirectSettingsModel.cpp +++ b/qt/scientific_interfaces/Indirect/IndirectSettingsModel.cpp @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #include "IndirectSettingsModel.h" #include "MantidKernel/ConfigService.h" diff --git a/qt/scientific_interfaces/Indirect/IndirectSettingsModel.h b/qt/scientific_interfaces/Indirect/IndirectSettingsModel.h index 6b995cf041f5b5cd010a6b87fa67125cb6b7ee2a..39dfda01e26d2ebff2a205b3acab9255fa619ce2 100644 --- a/qt/scientific_interfaces/Indirect/IndirectSettingsModel.h +++ b/qt/scientific_interfaces/Indirect/IndirectSettingsModel.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Indirect/IndirectSettingsPresenter.cpp b/qt/scientific_interfaces/Indirect/IndirectSettingsPresenter.cpp index 8bed3a05eb4ae7608f63affa2ca30f2d5d373e44..0f040426a0460f721070532eb4f00d000e93e55d 100644 --- a/qt/scientific_interfaces/Indirect/IndirectSettingsPresenter.cpp +++ b/qt/scientific_interfaces/Indirect/IndirectSettingsPresenter.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "IndirectSettingsPresenter.h" #include "IndirectSettingsHelper.h" diff --git a/qt/scientific_interfaces/Indirect/IndirectSettingsPresenter.h b/qt/scientific_interfaces/Indirect/IndirectSettingsPresenter.h index cf2b302325a62d4e78847786ddf3cfa6ac9d2f3d..7edd1c346daff8e8143deb642826df5ec156d623 100644 --- a/qt/scientific_interfaces/Indirect/IndirectSettingsPresenter.h +++ b/qt/scientific_interfaces/Indirect/IndirectSettingsPresenter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Indirect/IndirectSettingsView.cpp b/qt/scientific_interfaces/Indirect/IndirectSettingsView.cpp index 716ac6145dc32bd5d7cdf0ffa10a499f17be6cd7..59a9dac120c4a086023f5c88fd7f39fc518cbfa3 100644 --- a/qt/scientific_interfaces/Indirect/IndirectSettingsView.cpp +++ b/qt/scientific_interfaces/Indirect/IndirectSettingsView.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "IndirectSettingsView.h" diff --git a/qt/scientific_interfaces/Indirect/IndirectSettingsView.h b/qt/scientific_interfaces/Indirect/IndirectSettingsView.h index 923c1276c3fe1da2b5e9ebac7997c93bd37770c8..9aeb963a836a205d10d2523087a6679d0fcfa225 100644 --- a/qt/scientific_interfaces/Indirect/IndirectSettingsView.h +++ b/qt/scientific_interfaces/Indirect/IndirectSettingsView.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Indirect/IndirectSimulation.cpp b/qt/scientific_interfaces/Indirect/IndirectSimulation.cpp index 014fc2731410209ccbe92417df6c31c072a2d946..405445003fcc3029d90a511f1f6bf1ac84ead14b 100644 --- a/qt/scientific_interfaces/Indirect/IndirectSimulation.cpp +++ b/qt/scientific_interfaces/Indirect/IndirectSimulation.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "IndirectSimulation.h" #include "DensityOfStates.h" diff --git a/qt/scientific_interfaces/Indirect/IndirectSimulation.h b/qt/scientific_interfaces/Indirect/IndirectSimulation.h index 0820b0e4f373e52dae3b9b20f7a209bb368b3286..6880c1113f75b7c1e51d97d1a9871aa3e131c5c7 100644 --- a/qt/scientific_interfaces/Indirect/IndirectSimulation.h +++ b/qt/scientific_interfaces/Indirect/IndirectSimulation.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "ui_IndirectSimulation.h" diff --git a/qt/scientific_interfaces/Indirect/IndirectSimulationTab.cpp b/qt/scientific_interfaces/Indirect/IndirectSimulationTab.cpp index 81b3fc63d8c6a5aaf6e1676172a44ed29dd283fb..96a5371a6acd7acc2d6d77755b7097d81941c3ae 100644 --- a/qt/scientific_interfaces/Indirect/IndirectSimulationTab.cpp +++ b/qt/scientific_interfaces/Indirect/IndirectSimulationTab.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "IndirectSimulationTab.h" diff --git a/qt/scientific_interfaces/Indirect/IndirectSimulationTab.h b/qt/scientific_interfaces/Indirect/IndirectSimulationTab.h index 1dabe5e5d1ef369d2307a3a11dc8426df43f858a..72d47dbc9ec39301621715a4e593c256511242ee 100644 --- a/qt/scientific_interfaces/Indirect/IndirectSimulationTab.h +++ b/qt/scientific_interfaces/Indirect/IndirectSimulationTab.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Indirect/IndirectSpectrumSelectionPresenter.cpp b/qt/scientific_interfaces/Indirect/IndirectSpectrumSelectionPresenter.cpp index e9083006d260eb8ccb7c84c1373e90825b5609de..566986940b7e3bec1c55509ac8219c6ce91f8ba8 100644 --- a/qt/scientific_interfaces/Indirect/IndirectSpectrumSelectionPresenter.cpp +++ b/qt/scientific_interfaces/Indirect/IndirectSpectrumSelectionPresenter.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "IndirectSpectrumSelectionPresenter.h" diff --git a/qt/scientific_interfaces/Indirect/IndirectSpectrumSelectionPresenter.h b/qt/scientific_interfaces/Indirect/IndirectSpectrumSelectionPresenter.h index f1af07aa3635b6b5d3eb3bc4a7d4702fe7e76a17..66f1121064fa6fa205a880d6854cc3a3783a5bf9 100644 --- a/qt/scientific_interfaces/Indirect/IndirectSpectrumSelectionPresenter.h +++ b/qt/scientific_interfaces/Indirect/IndirectSpectrumSelectionPresenter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Indirect/IndirectSpectrumSelectionPresenterLegacy.cpp b/qt/scientific_interfaces/Indirect/IndirectSpectrumSelectionPresenterLegacy.cpp index 876d42ba9cb48fab9367bb44cf13862ea06e9953..38dec56d70544166ab594b896677b6f015310585 100644 --- a/qt/scientific_interfaces/Indirect/IndirectSpectrumSelectionPresenterLegacy.cpp +++ b/qt/scientific_interfaces/Indirect/IndirectSpectrumSelectionPresenterLegacy.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "IndirectSpectrumSelectionPresenterLegacy.h" diff --git a/qt/scientific_interfaces/Indirect/IndirectSpectrumSelectionPresenterLegacy.h b/qt/scientific_interfaces/Indirect/IndirectSpectrumSelectionPresenterLegacy.h index 75d4b61fe6d9c8b5a24cec0753908b8af7c3f4fa..cebb27e3dc31a34e1fadceeb93820b9ff895749d 100644 --- a/qt/scientific_interfaces/Indirect/IndirectSpectrumSelectionPresenterLegacy.h +++ b/qt/scientific_interfaces/Indirect/IndirectSpectrumSelectionPresenterLegacy.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Indirect/IndirectSpectrumSelectionView.cpp b/qt/scientific_interfaces/Indirect/IndirectSpectrumSelectionView.cpp index 0bc300ebe4029189eb650eebebba48d7746e239c..a77d8b7ef179e76005578152c585fb2d6253c00c 100644 --- a/qt/scientific_interfaces/Indirect/IndirectSpectrumSelectionView.cpp +++ b/qt/scientific_interfaces/Indirect/IndirectSpectrumSelectionView.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "IndirectSpectrumSelectionView.h" diff --git a/qt/scientific_interfaces/Indirect/IndirectSpectrumSelectionView.h b/qt/scientific_interfaces/Indirect/IndirectSpectrumSelectionView.h index 9f0ef36a79c3b243c8b7e6aaff3302e9d542993d..145995395babb32fd6adc03771e3e60a4955a076 100644 --- a/qt/scientific_interfaces/Indirect/IndirectSpectrumSelectionView.h +++ b/qt/scientific_interfaces/Indirect/IndirectSpectrumSelectionView.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Indirect/IndirectSpectrumSelectionViewLegacy.cpp b/qt/scientific_interfaces/Indirect/IndirectSpectrumSelectionViewLegacy.cpp index 1055596472fceca0555dd9cfda3a340119387599..f756eebb1558b24fa4069cb2c0ca4928d17b934c 100644 --- a/qt/scientific_interfaces/Indirect/IndirectSpectrumSelectionViewLegacy.cpp +++ b/qt/scientific_interfaces/Indirect/IndirectSpectrumSelectionViewLegacy.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "IndirectSpectrumSelectionViewLegacy.h" diff --git a/qt/scientific_interfaces/Indirect/IndirectSpectrumSelectionViewLegacy.h b/qt/scientific_interfaces/Indirect/IndirectSpectrumSelectionViewLegacy.h index e8aa832e485e22e3017e65fd4bfc7a9c945c7fe9..32dcbf9301c06e9894738529bdfb60f9f4269b70 100644 --- a/qt/scientific_interfaces/Indirect/IndirectSpectrumSelectionViewLegacy.h +++ b/qt/scientific_interfaces/Indirect/IndirectSpectrumSelectionViewLegacy.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Indirect/IndirectSqw.cpp b/qt/scientific_interfaces/Indirect/IndirectSqw.cpp index 6ea099ef903485686045e466d2c03e62a174b065..61368c34ca774285237ae8c6686e9c67dcdeb17e 100644 --- a/qt/scientific_interfaces/Indirect/IndirectSqw.cpp +++ b/qt/scientific_interfaces/Indirect/IndirectSqw.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "IndirectSqw.h" #include "IndirectDataValidationHelper.h" @@ -300,8 +300,8 @@ void IndirectSqw::setSaveEnabled(bool enabled) { void IndirectSqw::updateRunButton(bool enabled, std::string const &enableOutputButtons, - QString const message, - QString const tooltip) { + QString const &message, + QString const &tooltip) { setRunEnabled(enabled); m_uiForm.pbRun->setText(message); m_uiForm.pbRun->setToolTip(tooltip); diff --git a/qt/scientific_interfaces/Indirect/IndirectSqw.h b/qt/scientific_interfaces/Indirect/IndirectSqw.h index e87f099e9fa47f8cd3c12c89c1cc173f237dd684..68299a9e82bae2194f207b995421f25fb7e9f2db 100644 --- a/qt/scientific_interfaces/Indirect/IndirectSqw.h +++ b/qt/scientific_interfaces/Indirect/IndirectSqw.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -38,8 +38,8 @@ private slots: void updateRunButton(bool enabled = true, std::string const &enableOutputButtons = "unchanged", - QString const message = "Run", - QString const tooltip = ""); + QString const &message = "Run", + QString const &tooltip = ""); private: void plotRqwContour(std::string const &sampleName); diff --git a/qt/scientific_interfaces/Indirect/IndirectSymmetrise.cpp b/qt/scientific_interfaces/Indirect/IndirectSymmetrise.cpp index ac8c8734b347c5662e73b23bd7434fe8244d8899..955c6774538cfaf3ea2a81305fd543c6870f799e 100644 --- a/qt/scientific_interfaces/Indirect/IndirectSymmetrise.cpp +++ b/qt/scientific_interfaces/Indirect/IndirectSymmetrise.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "IndirectSymmetrise.h" #include "IndirectDataValidationHelper.h" @@ -620,8 +620,8 @@ void IndirectSymmetrise::setSaveEnabled(bool enabled) { void IndirectSymmetrise::updateRunButton(bool enabled, std::string const &enableOutputButtons, - QString const message, - QString const tooltip) { + QString const &message, + QString const &tooltip) { setRunEnabled(enabled); m_uiForm.pbRun->setText(message); m_uiForm.pbRun->setToolTip(tooltip); diff --git a/qt/scientific_interfaces/Indirect/IndirectSymmetrise.h b/qt/scientific_interfaces/Indirect/IndirectSymmetrise.h index 993fbacd721f66ba09ff6cc623221c6831a53020..c1d739beed57eab2ae3236db306ec5b8dafb1c4a 100644 --- a/qt/scientific_interfaces/Indirect/IndirectSymmetrise.h +++ b/qt/scientific_interfaces/Indirect/IndirectSymmetrise.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -68,8 +68,8 @@ private slots: void setSaveEnabled(bool enabled); void updateRunButton(bool enabled = true, std::string const &enableOutputButtons = "unchanged", - QString const message = "Run", - QString const tooltip = ""); + QString const &message = "Run", + QString const &tooltip = ""); private: void setFileExtensionsByName(bool filter) override; diff --git a/qt/scientific_interfaces/Indirect/IndirectTab.cpp b/qt/scientific_interfaces/Indirect/IndirectTab.cpp index 106ac2d06b1ad51f2bde46e9bdfdea4efcc318a8..efc40de6b1862c8e77ce45a357af320cb34be4f5 100644 --- a/qt/scientific_interfaces/Indirect/IndirectTab.cpp +++ b/qt/scientific_interfaces/Indirect/IndirectTab.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "IndirectTab.h" @@ -51,7 +51,7 @@ std::string castToString(int value) { } template <typename Predicate> -void setPropertyIf(Algorithm_sptr algorithm, std::string const &propName, +void setPropertyIf(const Algorithm_sptr &algorithm, std::string const &propName, std::string const &value, Predicate const &condition) { if (condition) algorithm->setPropertyValue(propName, value); @@ -503,7 +503,7 @@ void IndirectTab::setRangeSelectorMax(QtProperty *minProperty, * @param ws Pointer to the workspace * @return Energy mode */ -std::string IndirectTab::getEMode(Mantid::API::MatrixWorkspace_sptr ws) { +std::string IndirectTab::getEMode(const Mantid::API::MatrixWorkspace_sptr &ws) { Mantid::Kernel::Unit_sptr xUnit = ws->getAxis(0)->unit(); std::string xUnitName = xUnit->caption(); @@ -521,7 +521,7 @@ std::string IndirectTab::getEMode(Mantid::API::MatrixWorkspace_sptr ws) { * @param ws Pointer to the workspace * @return eFixed value */ -double IndirectTab::getEFixed(Mantid::API::MatrixWorkspace_sptr ws) { +double IndirectTab::getEFixed(const Mantid::API::MatrixWorkspace_sptr &ws) { Mantid::Geometry::Instrument_const_sptr inst = ws->getInstrument(); if (!inst) throw std::runtime_error("No instrument on workspace"); @@ -567,7 +567,7 @@ bool IndirectTab::getResolutionRangeFromWs(const QString &workspace, *found) */ bool IndirectTab::getResolutionRangeFromWs( - Mantid::API::MatrixWorkspace_const_sptr workspace, + const Mantid::API::MatrixWorkspace_const_sptr &workspace, QPair<double, double> &res) { if (workspace) { auto const instrument = workspace->getInstrument(); @@ -601,7 +601,8 @@ IndirectTab::getXRangeFromWorkspace(std::string const &workspaceName, } QPair<double, double> IndirectTab::getXRangeFromWorkspace( - Mantid::API::MatrixWorkspace_const_sptr workspace, double precision) const { + const Mantid::API::MatrixWorkspace_const_sptr &workspace, + double precision) const { auto const xValues = workspace->x(0); return roundRangeToPrecision(xValues.front(), xValues.back(), precision); } @@ -611,7 +612,7 @@ QPair<double, double> IndirectTab::getXRangeFromWorkspace( * * @param algorithm :: The algorithm to be run */ -void IndirectTab::runAlgorithm(const Mantid::API::IAlgorithm_sptr algorithm) { +void IndirectTab::runAlgorithm(const Mantid::API::IAlgorithm_sptr &algorithm) { algorithm->setRethrows(true); // There should never really be unexecuted algorithms in the queue, but it is @@ -646,7 +647,7 @@ void IndirectTab::algorithmFinished(bool error) { * @param no_output Enable to ignore any output * @returns What was printed to stdout */ -QString IndirectTab::runPythonCode(QString code, bool no_output) { +QString IndirectTab::runPythonCode(const QString &code, bool no_output) { return m_pythonRunner.runPythonCode(code, no_output); } @@ -675,7 +676,7 @@ bool IndirectTab::checkADSForPlotSaveWorkspace(const std::string &workspaceName, } std::unordered_map<std::string, size_t> IndirectTab::extractAxisLabels( - Mantid::API::MatrixWorkspace_const_sptr workspace, + const Mantid::API::MatrixWorkspace_const_sptr &workspace, const size_t &axisIndex) const { Axis *axis = workspace->getAxis(axisIndex); if (!axis->isText()) diff --git a/qt/scientific_interfaces/Indirect/IndirectTab.h b/qt/scientific_interfaces/Indirect/IndirectTab.h index e48d8d7440c071f335bc278da34af5caaa3ddbd1..199dfe650e27af120a503eaf5e5ca305d155060e 100644 --- a/qt/scientific_interfaces/Indirect/IndirectTab.h +++ b/qt/scientific_interfaces/Indirect/IndirectTab.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -116,7 +116,7 @@ protected: /// Extracts the labels from the axis at the specified index in the /// specified workspace. std::unordered_map<std::string, size_t> - extractAxisLabels(Mantid::API::MatrixWorkspace_const_sptr workspace, + extractAxisLabels(const Mantid::API::MatrixWorkspace_const_sptr &workspace, const size_t &axisIndex) const; /// Function to set the range limits of the plot @@ -138,10 +138,10 @@ protected: double newValue); /// Function to get energy mode from a workspace - std::string getEMode(Mantid::API::MatrixWorkspace_sptr ws); + std::string getEMode(const Mantid::API::MatrixWorkspace_sptr &ws); /// Function to get eFixed from a workspace - double getEFixed(Mantid::API::MatrixWorkspace_sptr ws); + double getEFixed(const Mantid::API::MatrixWorkspace_sptr &ws); /// Function to read an instrument's resolution from the IPF using a string bool getResolutionRangeFromWs(const QString &filename, @@ -149,25 +149,26 @@ protected: /// Function to read an instrument's resolution from the IPF using a workspace /// pointer - bool getResolutionRangeFromWs(Mantid::API::MatrixWorkspace_const_sptr ws, - QPair<double, double> &res); + bool + getResolutionRangeFromWs(const Mantid::API::MatrixWorkspace_const_sptr &ws, + QPair<double, double> &res); /// Gets the x range from a workspace QPair<double, double> getXRangeFromWorkspace(std::string const &workspaceName, double precision = 0.000001) const; - QPair<double, double> - getXRangeFromWorkspace(Mantid::API::MatrixWorkspace_const_sptr workspace, - double precision = 0.000001) const; + QPair<double, double> getXRangeFromWorkspace( + const Mantid::API::MatrixWorkspace_const_sptr &workspace, + double precision = 0.000001) const; /// Converts a standard vector of standard strings to a QVector of QStrings. QVector<QString> convertStdStringVector(const std::vector<std::string> &stringVec) const; /// Function to run an algorithm on a seperate thread - void runAlgorithm(const Mantid::API::IAlgorithm_sptr algorithm); + void runAlgorithm(const Mantid::API::IAlgorithm_sptr &algorithm); - QString runPythonCode(QString vode, bool no_output = false); + QString runPythonCode(const QString &vode, bool no_output = false); /// Checks the ADS for a workspace named `workspaceName`, /// opens a warning box for plotting/saving if none found diff --git a/qt/scientific_interfaces/Indirect/IndirectTools.cpp b/qt/scientific_interfaces/Indirect/IndirectTools.cpp index 76214793123fdc647f1afd8ca731a26b3fc93942..fbddfe2051587b9cf65308945b58b3adc9b05882 100644 --- a/qt/scientific_interfaces/Indirect/IndirectTools.cpp +++ b/qt/scientific_interfaces/Indirect/IndirectTools.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "IndirectTools.h" #include "IndirectLoadILL.h" diff --git a/qt/scientific_interfaces/Indirect/IndirectTools.h b/qt/scientific_interfaces/Indirect/IndirectTools.h index e195f87d8f7113e6cd22a7883caa787762d8872a..7787471481fdc74d0b845ab18a108b81b1744d20 100644 --- a/qt/scientific_interfaces/Indirect/IndirectTools.h +++ b/qt/scientific_interfaces/Indirect/IndirectTools.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "ui_IndirectTools.h" diff --git a/qt/scientific_interfaces/Indirect/IndirectToolsTab.cpp b/qt/scientific_interfaces/Indirect/IndirectToolsTab.cpp index bacb0fd6bf19a2be9453b36507a296663139fcfc..9ef8bb4c49f533298acd8567782be140a88a9077 100644 --- a/qt/scientific_interfaces/Indirect/IndirectToolsTab.cpp +++ b/qt/scientific_interfaces/Indirect/IndirectToolsTab.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "IndirectToolsTab.h" #include "MantidQtWidgets/Common/UserSubWindow.h" diff --git a/qt/scientific_interfaces/Indirect/IndirectToolsTab.h b/qt/scientific_interfaces/Indirect/IndirectToolsTab.h index ecee421dcea6883252609009d97affcb70d9fdfb..ebf2f0aee69f3992a50d5ea707f5e37407eb06ec 100644 --- a/qt/scientific_interfaces/Indirect/IndirectToolsTab.h +++ b/qt/scientific_interfaces/Indirect/IndirectToolsTab.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Indirect/IndirectTransmission.cpp b/qt/scientific_interfaces/Indirect/IndirectTransmission.cpp index d13b61fda5ac5e323dc90695f5930d11069017a2..db76d8e2632486d38a72b7a024b03961a0e517b5 100644 --- a/qt/scientific_interfaces/Indirect/IndirectTransmission.cpp +++ b/qt/scientific_interfaces/Indirect/IndirectTransmission.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "IndirectTransmission.h" #include "MantidAPI/WorkspaceGroup.h" @@ -165,8 +165,8 @@ void IndirectTransmission::setSaveEnabled(bool enabled) { } void IndirectTransmission::updateRunButton( - bool enabled, std::string const &enableOutputButtons, QString const message, - QString const tooltip) { + bool enabled, std::string const &enableOutputButtons, + QString const &message, QString const &tooltip) { setRunEnabled(enabled); m_uiForm.pbRun->setText(message); m_uiForm.pbRun->setToolTip(tooltip); diff --git a/qt/scientific_interfaces/Indirect/IndirectTransmission.h b/qt/scientific_interfaces/Indirect/IndirectTransmission.h index 407e672e627e3b482551444049bd6ab3e4995a84..310e712854766699f9b3d5686d186b7e8792b970 100644 --- a/qt/scientific_interfaces/Indirect/IndirectTransmission.h +++ b/qt/scientific_interfaces/Indirect/IndirectTransmission.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -44,8 +44,8 @@ private slots: void setSaveEnabled(bool enabled); void updateRunButton(bool enabled = true, std::string const &enableOutputButtons = "unchanged", - QString const message = "Run", - QString const tooltip = ""); + QString const &message = "Run", + QString const &tooltip = ""); private: void setInstrument(QString const &instrumentName); diff --git a/qt/scientific_interfaces/Indirect/IndirectTransmissionCalc.cpp b/qt/scientific_interfaces/Indirect/IndirectTransmissionCalc.cpp index 3142c8dc1354c6b344c184229c1da58404bae25b..dec79c76b345756a304fdb1e4f589fa3d93f1b84 100644 --- a/qt/scientific_interfaces/Indirect/IndirectTransmissionCalc.cpp +++ b/qt/scientific_interfaces/Indirect/IndirectTransmissionCalc.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "IndirectTransmissionCalc.h" #include "MantidAPI/AlgorithmManager.h" diff --git a/qt/scientific_interfaces/Indirect/IndirectTransmissionCalc.h b/qt/scientific_interfaces/Indirect/IndirectTransmissionCalc.h index 40a22b3b91b6f7e28308925aa4e565f216d0d694..ae879b5841da47415da73f33a4b738ae8269405a 100644 --- a/qt/scientific_interfaces/Indirect/IndirectTransmissionCalc.h +++ b/qt/scientific_interfaces/Indirect/IndirectTransmissionCalc.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Indirect/Iqt.cpp b/qt/scientific_interfaces/Indirect/Iqt.cpp index d4fbfc2d9fa3690c5c7931f1397fbe1728ce2305..058e944fc594b59a20626464628533feecf7940e 100644 --- a/qt/scientific_interfaces/Indirect/Iqt.cpp +++ b/qt/scientific_interfaces/Indirect/Iqt.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "Iqt.h" @@ -28,10 +28,10 @@ MatrixWorkspace_sptr getADSMatrixWorkspace(std::string const &workspaceName) { workspaceName); } -std::string -checkInstrumentParametersMatch(Instrument_const_sptr sampleInstrument, - Instrument_const_sptr resolutionInstrument, - std::string const ¶meter) { +std::string checkInstrumentParametersMatch( + const Instrument_const_sptr &sampleInstrument, + const Instrument_const_sptr &resolutionInstrument, + std::string const ¶meter) { if (!sampleInstrument->hasParameter(parameter)) return "Could not find the " + parameter + " for the sample workspace."; if (!resolutionInstrument->hasParameter(parameter)) @@ -43,9 +43,10 @@ checkInstrumentParametersMatch(Instrument_const_sptr sampleInstrument, return ""; } -std::string checkParametersMatch(MatrixWorkspace_const_sptr sampleWorkspace, - MatrixWorkspace_const_sptr resolutionWorkspace, - std::string const ¶meter) { +std::string +checkParametersMatch(const MatrixWorkspace_const_sptr &sampleWorkspace, + const MatrixWorkspace_const_sptr &resolutionWorkspace, + std::string const ¶meter) { auto const sampleInstrument = sampleWorkspace->getInstrument(); auto const resolutionInstrument = resolutionWorkspace->getInstrument(); return checkInstrumentParametersMatch(sampleInstrument, resolutionInstrument, @@ -61,8 +62,8 @@ std::string checkParametersMatch(std::string const &sampleName, } std::string -checkInstrumentsMatch(MatrixWorkspace_const_sptr sampleWorkspace, - MatrixWorkspace_const_sptr resolutionWorkspace) { +checkInstrumentsMatch(const MatrixWorkspace_const_sptr &sampleWorkspace, + const MatrixWorkspace_const_sptr &resolutionWorkspace) { auto const sampleInstrument = sampleWorkspace->getInstrument(); auto const resolutionInstrument = resolutionWorkspace->getInstrument(); if (sampleInstrument->getName() != resolutionInstrument->getName()) @@ -70,9 +71,9 @@ checkInstrumentsMatch(MatrixWorkspace_const_sptr sampleWorkspace, return ""; } -std::string -validateNumberOfHistograms(MatrixWorkspace_const_sptr sampleWorkspace, - MatrixWorkspace_const_sptr resolutionWorkspace) { +std::string validateNumberOfHistograms( + const MatrixWorkspace_const_sptr &sampleWorkspace, + const MatrixWorkspace_const_sptr &resolutionWorkspace) { auto const sampleSize = sampleWorkspace->getNumberHistograms(); auto const resolutionSize = resolutionWorkspace->getNumberHistograms(); if (resolutionSize > 1 && sampleSize != resolutionSize) @@ -85,8 +86,8 @@ void addErrorMessage(UserInputValidator &uiv, std::string const &message) { uiv.addErrorMessage(QString::fromStdString(message) + "\n"); } -bool isTechniqueDirect(MatrixWorkspace_const_sptr sampleWorkspace, - MatrixWorkspace_const_sptr resWorkspace) { +bool isTechniqueDirect(const MatrixWorkspace_const_sptr &sampleWorkspace, + const MatrixWorkspace_const_sptr &resWorkspace) { try { auto const logValue1 = sampleWorkspace->getLog("deltaE-mode")->value(); auto const logValue2 = resWorkspace->getLog("deltaE-mode")->value(); diff --git a/qt/scientific_interfaces/Indirect/Iqt.h b/qt/scientific_interfaces/Indirect/Iqt.h index 0bbec55911b29a26b2e9bcf10526b3a911983392..8a271e30b0e4b08103a45c14543288590d2ccc8b 100644 --- a/qt/scientific_interfaces/Indirect/Iqt.h +++ b/qt/scientific_interfaces/Indirect/Iqt.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Indirect/IqtFit.cpp b/qt/scientific_interfaces/Indirect/IqtFit.cpp index 691596b851a643cfcc21fe0a9839c7cf83303c5d..51e59b6a145b83493a8b923fb01f2b1c7eada594 100644 --- a/qt/scientific_interfaces/Indirect/IqtFit.cpp +++ b/qt/scientific_interfaces/Indirect/IqtFit.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "IqtFit.h" #include "IndirectFunctionBrowser/IqtTemplateBrowser.h" diff --git a/qt/scientific_interfaces/Indirect/IqtFit.h b/qt/scientific_interfaces/Indirect/IqtFit.h index 07b78d2bf661f2a61455af2f84ec41347aef0152..b2c289c35896d7e368e48d318a742b45757379dc 100644 --- a/qt/scientific_interfaces/Indirect/IqtFit.h +++ b/qt/scientific_interfaces/Indirect/IqtFit.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Indirect/IqtFitModel.cpp b/qt/scientific_interfaces/Indirect/IqtFitModel.cpp index 9151a2a3351fd16da99ab4a0df2f139be407dd66..2750e94081f60c70d4982362d9829e33339eb480 100644 --- a/qt/scientific_interfaces/Indirect/IqtFitModel.cpp +++ b/qt/scientific_interfaces/Indirect/IqtFitModel.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "IqtFitModel.h" @@ -12,6 +12,7 @@ #include "MantidAPI/MultiDomainFunction.h" #include <boost/algorithm/string/predicate.hpp> +#include <utility> using namespace Mantid::API; @@ -19,7 +20,7 @@ namespace { IFunction_sptr getFirstInCategory(IFunction_sptr function, const std::string &category); -IFunction_sptr getFirstInCategory(CompositeFunction_sptr composite, +IFunction_sptr getFirstInCategory(const CompositeFunction_sptr &composite, const std::string &category) { for (auto i = 0u; i < composite->nFunctions(); ++i) { auto function = getFirstInCategory(composite->getFunction(i), category); @@ -41,7 +42,7 @@ IFunction_sptr getFirstInCategory(IFunction_sptr function, return nullptr; } -std::vector<std::string> getParameters(IFunction_sptr function, +std::vector<std::string> getParameters(const IFunction_sptr &function, const std::string &shortParameterName) { std::vector<std::string> parameters; @@ -52,7 +53,7 @@ std::vector<std::string> getParameters(IFunction_sptr function, return parameters; } -bool constrainIntensities(IFunction_sptr function) { +bool constrainIntensities(const IFunction_sptr &function) { const auto intensityParameters = getParameters(function, "Height"); const auto backgroundParameters = getParameters(function, "A0"); @@ -73,7 +74,7 @@ bool constrainIntensities(IFunction_sptr function) { return true; } -double computeTauApproximation(MatrixWorkspace_sptr workspace) { +double computeTauApproximation(const MatrixWorkspace_sptr &workspace) { const auto &x = workspace->x(0); const auto &y = workspace->y(0); @@ -83,28 +84,28 @@ double computeTauApproximation(MatrixWorkspace_sptr workspace) { } double computeHeightApproximation(IFunction_sptr function) { - const auto background = getFirstInCategory(function, "Background"); + const auto background = getFirstInCategory(std::move(function), "Background"); const double height = 1.0; if (background && background->hasParameter("A0")) return height - background->getParameter("A0"); return height; } -std::string getSuffix(MatrixWorkspace_sptr workspace) { +std::string getSuffix(const MatrixWorkspace_sptr &workspace) { const auto position = workspace->getName().rfind("_"); return workspace->getName().substr(position + 1); } -std::string getFitString(MatrixWorkspace_sptr workspace) { - auto suffix = getSuffix(workspace); +std::string getFitString(const MatrixWorkspace_sptr &workspace) { + auto suffix = getSuffix(std::move(workspace)); boost::algorithm::to_lower(suffix); if (suffix == "iqt") return "Fit"; return "_IqtFit"; } -boost::optional<std::string> findFullParameterName(IFunction_sptr function, - const std::string &name) { +boost::optional<std::string> +findFullParameterName(const IFunction_sptr &function, const std::string &name) { for (auto i = 0u; i < function->nParams(); ++i) { const auto fullName = function->parameterName(i); if (boost::algorithm::ends_with(fullName, name)) @@ -230,8 +231,8 @@ IqtFitModel::createDefaultParameters(TableDatasetIndex index) const { return parameters; } -MultiDomainFunction_sptr -IqtFitModel::createFunctionWithGlobalBeta(IFunction_sptr function) const { +MultiDomainFunction_sptr IqtFitModel::createFunctionWithGlobalBeta( + const IFunction_sptr &function) const { boost::shared_ptr<MultiDomainFunction> multiDomainFunction( new MultiDomainFunction); const auto functionString = function->asString(); diff --git a/qt/scientific_interfaces/Indirect/IqtFitModel.h b/qt/scientific_interfaces/Indirect/IqtFitModel.h index e231fd3a1f4c2f490d0b4bdcd95e403fc6fd7605..3c083447af3c56f1f7e6ad78206ec7923ff191d5 100644 --- a/qt/scientific_interfaces/Indirect/IqtFitModel.h +++ b/qt/scientific_interfaces/Indirect/IqtFitModel.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -31,8 +31,8 @@ private: WorkspaceIndex spectrum) const override; std::unordered_map<std::string, ParameterValue> createDefaultParameters(TableDatasetIndex index) const override; - Mantid::API::MultiDomainFunction_sptr - createFunctionWithGlobalBeta(Mantid::API::IFunction_sptr function) const; + Mantid::API::MultiDomainFunction_sptr createFunctionWithGlobalBeta( + const Mantid::API::IFunction_sptr &function) const; bool m_makeBetaGlobal; bool m_constrainIntensities; diff --git a/qt/scientific_interfaces/Indirect/JumpFit.cpp b/qt/scientific_interfaces/Indirect/JumpFit.cpp index 39d993569e3a9046ebdca2b9425c9ab12d784ad8..70166d63e0225c5fe0300ddf5b9666ae86ba4d24 100644 --- a/qt/scientific_interfaces/Indirect/JumpFit.cpp +++ b/qt/scientific_interfaces/Indirect/JumpFit.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "JumpFit.h" #include "IndirectFunctionBrowser/FQTemplateBrowser.h" diff --git a/qt/scientific_interfaces/Indirect/JumpFit.h b/qt/scientific_interfaces/Indirect/JumpFit.h index 44e8aef77778a7097b0c90374ae056f3f2c888ed..30c3857b9437c730f01d4f018353be8ea879c288 100644 --- a/qt/scientific_interfaces/Indirect/JumpFit.h +++ b/qt/scientific_interfaces/Indirect/JumpFit.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Indirect/JumpFitAddWorkspaceDialog.cpp b/qt/scientific_interfaces/Indirect/JumpFitAddWorkspaceDialog.cpp index 63e54cef2f7f7f43af4824e9e0431b9c6878e95e..2ecf914bfc47fdff1aaa143e65edc4b3e8dc921c 100644 --- a/qt/scientific_interfaces/Indirect/JumpFitAddWorkspaceDialog.cpp +++ b/qt/scientific_interfaces/Indirect/JumpFitAddWorkspaceDialog.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "JumpFitAddWorkspaceDialog.h" diff --git a/qt/scientific_interfaces/Indirect/JumpFitAddWorkspaceDialog.h b/qt/scientific_interfaces/Indirect/JumpFitAddWorkspaceDialog.h index 3ce577a5300b78b59e5972cb6fdbe84e81f85ac0..3a50cfefce3b6b5e5a851734c1193875e7479308 100644 --- a/qt/scientific_interfaces/Indirect/JumpFitAddWorkspaceDialog.h +++ b/qt/scientific_interfaces/Indirect/JumpFitAddWorkspaceDialog.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Indirect/JumpFitDataPresenter.cpp b/qt/scientific_interfaces/Indirect/JumpFitDataPresenter.cpp index feb6ec1d701b33ffc439d987f979a4ce480fa1eb..95e843bbee280b66bdc2c014d9bd5b9e234bac4d 100644 --- a/qt/scientific_interfaces/Indirect/JumpFitDataPresenter.cpp +++ b/qt/scientific_interfaces/Indirect/JumpFitDataPresenter.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "JumpFitDataPresenter.h" #include "JumpFitDataTablePresenter.h" diff --git a/qt/scientific_interfaces/Indirect/JumpFitDataPresenter.h b/qt/scientific_interfaces/Indirect/JumpFitDataPresenter.h index 688f8d11eb5cbc7027920ef1d761f5bcdaa5e713..f751eb67e76f7f44cf8dcd87527e90eece50d3b4 100644 --- a/qt/scientific_interfaces/Indirect/JumpFitDataPresenter.h +++ b/qt/scientific_interfaces/Indirect/JumpFitDataPresenter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Indirect/JumpFitDataTablePresenter.cpp b/qt/scientific_interfaces/Indirect/JumpFitDataTablePresenter.cpp index bf6c24528bc4782f21ed56c4cff8d4db2158bb85..fb543e6b88e070f2114ba3d591fc3797a86d9b1a 100644 --- a/qt/scientific_interfaces/Indirect/JumpFitDataTablePresenter.cpp +++ b/qt/scientific_interfaces/Indirect/JumpFitDataTablePresenter.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "JumpFitDataTablePresenter.h" diff --git a/qt/scientific_interfaces/Indirect/JumpFitDataTablePresenter.h b/qt/scientific_interfaces/Indirect/JumpFitDataTablePresenter.h index 32e1294110b04b664e6087213d45370eb7c5c352..36f3fa235e1ae5c2bfd4698d1d1f96b87c16ee2f 100644 --- a/qt/scientific_interfaces/Indirect/JumpFitDataTablePresenter.h +++ b/qt/scientific_interfaces/Indirect/JumpFitDataTablePresenter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Indirect/JumpFitModel.cpp b/qt/scientific_interfaces/Indirect/JumpFitModel.cpp index b42ced450d07fecadd869e06e5f338f77d27314c..a1050b133a3ad8d81958dd6055939320db65b1f7 100644 --- a/qt/scientific_interfaces/Indirect/JumpFitModel.cpp +++ b/qt/scientific_interfaces/Indirect/JumpFitModel.cpp @@ -1,11 +1,13 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "JumpFitModel.h" +#include <utility> + #include "MantidAPI/AlgorithmManager.h" #include "MantidAPI/TextAxis.h" #include "MantidKernel/Logger.h" @@ -60,7 +62,7 @@ findAxisLabels(MatrixWorkspace const *workspace, Predicate const &predicate) { return std::make_pair(std::vector<std::string>(), std::vector<std::size_t>()); } -std::string createSpectra(std::vector<std::size_t> spectrum) { +std::string createSpectra(const std::vector<std::size_t> &spectrum) { std::string spectra = ""; for (auto spec : spectrum) { spectra.append(std::to_string(spec) + ","); @@ -123,16 +125,18 @@ std::string extractSpectra(std::string const &inputName, int startIndex, return outputName; } -std::string extractSpectrum(MatrixWorkspace_sptr workspace, int index, +std::string extractSpectrum(const MatrixWorkspace_sptr &workspace, int index, std::string const &outputName) { return extractSpectra(workspace->getName(), index, index, outputName); } -std::string extractHWHMSpectrum(MatrixWorkspace_sptr workspace, int index) { +std::string extractHWHMSpectrum(const MatrixWorkspace_sptr &workspace, + int index) { auto const scaledName = "__scaled_" + std::to_string(index); auto const extractedName = "__extracted_" + std::to_string(index); auto const outputName = scaleWorkspace( - extractSpectrum(workspace, index, extractedName), scaledName, 0.5); + extractSpectrum(std::move(workspace), index, extractedName), scaledName, + 0.5); deleteTemporaryWorkspaces({extractedName}); return outputName; } @@ -159,7 +163,7 @@ MatrixWorkspace_sptr appendAll(std::vector<std::string> const &workspaces, } std::vector<std::string> -subdivideWidthWorkspace(MatrixWorkspace_sptr workspace, +subdivideWidthWorkspace(const MatrixWorkspace_sptr &workspace, const std::vector<std::size_t> &widthSpectra) { std::vector<std::string> subworkspaces; subworkspaces.reserve(1 + 2 * widthSpectra.size()); @@ -393,7 +397,7 @@ std::string JumpFitModel::constructOutputName() const { } bool JumpFitModel::allWorkspacesEqual( - Mantid::API::MatrixWorkspace_sptr workspace) const { + const Mantid::API::MatrixWorkspace_sptr &workspace) const { for (auto i = TableDatasetIndex{1}; i < numberOfWorkspaces(); ++i) { if (getWorkspace(i) != workspace) return false; diff --git a/qt/scientific_interfaces/Indirect/JumpFitModel.h b/qt/scientific_interfaces/Indirect/JumpFitModel.h index 8c76d461089d5e94a86549b3f9ee5937f8b9ffea..12125b237bf996b536471bf0055c4f6ccace6f9b 100644 --- a/qt/scientific_interfaces/Indirect/JumpFitModel.h +++ b/qt/scientific_interfaces/Indirect/JumpFitModel.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -53,7 +53,8 @@ public: private: std::string constructOutputName() const; - bool allWorkspacesEqual(Mantid::API::MatrixWorkspace_sptr workspace) const; + bool + allWorkspacesEqual(const Mantid::API::MatrixWorkspace_sptr &workspace) const; JumpFitParameters & addJumpFitParameters(Mantid::API::MatrixWorkspace *workspace, const std::string &hwhmName); diff --git a/qt/scientific_interfaces/Indirect/LazyAsyncRunner.h b/qt/scientific_interfaces/Indirect/LazyAsyncRunner.h index 9600e3554e9908206fc3c0dd2b639bf5ffc0c709..a91defb9e2db2a224ab09326b1eb6c6e6dabdef6 100644 --- a/qt/scientific_interfaces/Indirect/LazyAsyncRunner.h +++ b/qt/scientific_interfaces/Indirect/LazyAsyncRunner.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Indirect/MSDFit.cpp b/qt/scientific_interfaces/Indirect/MSDFit.cpp index 6d902dc22f9af8d0f5c3eef992c2636ef8f736fd..e04fee94dfb9b365949e6c55d2254ce3b70ca562 100644 --- a/qt/scientific_interfaces/Indirect/MSDFit.cpp +++ b/qt/scientific_interfaces/Indirect/MSDFit.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MSDFit.h" #include "IndirectFunctionBrowser/MSDTemplateBrowser.h" diff --git a/qt/scientific_interfaces/Indirect/MSDFit.h b/qt/scientific_interfaces/Indirect/MSDFit.h index f80c166e6859c4014186b1814d265c7758edf3b7..53dccca1f67b63aca2f84bff496739fd7ff4d490 100644 --- a/qt/scientific_interfaces/Indirect/MSDFit.h +++ b/qt/scientific_interfaces/Indirect/MSDFit.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Indirect/MSDFitModel.cpp b/qt/scientific_interfaces/Indirect/MSDFitModel.cpp index f39ba49b2a5273c3c621703c436b2858127eb756..88b2925160effbd96f2582f79739077f0541b6a0 100644 --- a/qt/scientific_interfaces/Indirect/MSDFitModel.cpp +++ b/qt/scientific_interfaces/Indirect/MSDFitModel.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MSDFitModel.h" diff --git a/qt/scientific_interfaces/Indirect/MSDFitModel.h b/qt/scientific_interfaces/Indirect/MSDFitModel.h index 3a31010eec8443614aada40de2c6f05e69a90a99..b94a3013d8986781c65139cc039a1e27c5a5463a 100644 --- a/qt/scientific_interfaces/Indirect/MSDFitModel.h +++ b/qt/scientific_interfaces/Indirect/MSDFitModel.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Indirect/Notifier.h b/qt/scientific_interfaces/Indirect/Notifier.h index 52b7dd0dabbceffd5a1e45ed57494310f3759449..347c2e56772711fa01a85efbafb03c08a7879532 100644 --- a/qt/scientific_interfaces/Indirect/Notifier.h +++ b/qt/scientific_interfaces/Indirect/Notifier.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Indirect/ParameterEstimation.h b/qt/scientific_interfaces/Indirect/ParameterEstimation.h index 1c3f7c63a643e61f111ef8f990b5b4e8c57b448b..fb4ebb5bb825ef06a881dde7bd66eee36206f57e 100644 --- a/qt/scientific_interfaces/Indirect/ParameterEstimation.h +++ b/qt/scientific_interfaces/Indirect/ParameterEstimation.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Indirect/PrecompiledHeader.h b/qt/scientific_interfaces/Indirect/PrecompiledHeader.h index 615c906d96f4ca5650f269d34d7bc61092dd5111..449a595e135794242211bf62b59cca3c2e7c9fa6 100644 --- a/qt/scientific_interfaces/Indirect/PrecompiledHeader.h +++ b/qt/scientific_interfaces/Indirect/PrecompiledHeader.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Indirect/Quasi.cpp b/qt/scientific_interfaces/Indirect/Quasi.cpp index 7cfab96b06758db73b837a6541b326eb37e7ec5b..86bc5192daed64560f447456718197465ac085a1 100644 --- a/qt/scientific_interfaces/Indirect/Quasi.cpp +++ b/qt/scientific_interfaces/Indirect/Quasi.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "Quasi.h" diff --git a/qt/scientific_interfaces/Indirect/Quasi.h b/qt/scientific_interfaces/Indirect/Quasi.h index 6d1ef79b429c64ac0f6f276d94ea529cfa9cbfad..c5ea93f36873f7a1a219063be1320f5f6cf77894 100644 --- a/qt/scientific_interfaces/Indirect/Quasi.h +++ b/qt/scientific_interfaces/Indirect/Quasi.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Indirect/ResNorm.cpp b/qt/scientific_interfaces/Indirect/ResNorm.cpp index 4f9324c27c7b7d704361d9447a156a12bbc34024..21b982a8ac9b7f652704030fb274b566328a293c 100644 --- a/qt/scientific_interfaces/Indirect/ResNorm.cpp +++ b/qt/scientific_interfaces/Indirect/ResNorm.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "ResNorm.h" @@ -215,12 +215,12 @@ void ResNorm::processLogs() { addAdditionalLogs(resultWorkspace); } -void ResNorm::addAdditionalLogs(WorkspaceGroup_sptr resultGroup) const { +void ResNorm::addAdditionalLogs(const WorkspaceGroup_sptr &resultGroup) const { for (auto const &workspace : *resultGroup) addAdditionalLogs(workspace); } -void ResNorm::addAdditionalLogs(Workspace_sptr resultWorkspace) const { +void ResNorm::addAdditionalLogs(const Workspace_sptr &resultWorkspace) const { auto logAdder = AlgorithmManager::Instance().create("AddSampleLog"); auto const name = resultWorkspace->getName(); @@ -265,14 +265,14 @@ double ResNorm::getDoubleManagerProperty(QString const &propName) const { return m_dblManager->value(m_properties[propName]); } -void ResNorm::copyLogs(MatrixWorkspace_sptr resultWorkspace, - WorkspaceGroup_sptr resultGroup) const { +void ResNorm::copyLogs(const MatrixWorkspace_sptr &resultWorkspace, + const WorkspaceGroup_sptr &resultGroup) const { for (auto const &workspace : *resultGroup) copyLogs(resultWorkspace, workspace); } -void ResNorm::copyLogs(MatrixWorkspace_sptr resultWorkspace, - Workspace_sptr workspace) const { +void ResNorm::copyLogs(const MatrixWorkspace_sptr &resultWorkspace, + const Workspace_sptr &workspace) const { auto logCopier = AlgorithmManager::Instance().create("CopyLogs"); logCopier->setProperty("InputWorkspace", resultWorkspace->getName()); logCopier->setProperty("OutputWorkspace", workspace->getName()); diff --git a/qt/scientific_interfaces/Indirect/ResNorm.h b/qt/scientific_interfaces/Indirect/ResNorm.h index 1036bcacbd1de2250073893b95be4ee8f4e6229d..c793c9c751e8737ddb8300484f491b687af604a2 100644 --- a/qt/scientific_interfaces/Indirect/ResNorm.h +++ b/qt/scientific_interfaces/Indirect/ResNorm.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -51,15 +51,17 @@ private: void setFileExtensionsByName(bool filter) override; void processLogs(); - void addAdditionalLogs(Mantid::API::WorkspaceGroup_sptr resultGroup) const; - void addAdditionalLogs(Mantid::API::Workspace_sptr resultWorkspace) const; + void + addAdditionalLogs(const Mantid::API::WorkspaceGroup_sptr &resultGroup) const; + void + addAdditionalLogs(const Mantid::API::Workspace_sptr &resultWorkspace) const; std::map<std::string, std::string> getAdditionalLogStrings() const; std::map<std::string, std::string> getAdditionalLogNumbers() const; double getDoubleManagerProperty(QString const &propName) const; - void copyLogs(Mantid::API::MatrixWorkspace_sptr resultWorkspace, - Mantid::API::WorkspaceGroup_sptr resultGroup) const; - void copyLogs(Mantid::API::MatrixWorkspace_sptr resultWorkspace, - Mantid::API::Workspace_sptr workspace) const; + void copyLogs(const Mantid::API::MatrixWorkspace_sptr &resultWorkspace, + const Mantid::API::WorkspaceGroup_sptr &resultGroup) const; + void copyLogs(const Mantid::API::MatrixWorkspace_sptr &resultWorkspace, + const Mantid::API::Workspace_sptr &workspace) const; void setRunEnabled(bool enabled); void setPlotResultEnabled(bool enabled); diff --git a/qt/scientific_interfaces/Indirect/Stretch.cpp b/qt/scientific_interfaces/Indirect/Stretch.cpp index e95e748f1786c02c34d172dbeebf085ea9959384..1e9a41e8f69fc5547360d3e603c287b0ffc57c4d 100644 --- a/qt/scientific_interfaces/Indirect/Stretch.cpp +++ b/qt/scientific_interfaces/Indirect/Stretch.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "Stretch.h" #include "MantidQtWidgets/Common/UserInputValidator.h" diff --git a/qt/scientific_interfaces/Indirect/Stretch.h b/qt/scientific_interfaces/Indirect/Stretch.h index 78f2574f109fe878b49f2822549ad6fe533f7a92..b15622cc49469ec85df8155003a1451c6a053c7f 100644 --- a/qt/scientific_interfaces/Indirect/Stretch.h +++ b/qt/scientific_interfaces/Indirect/Stretch.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Indirect/test/CMakeLists.txt b/qt/scientific_interfaces/Indirect/test/CMakeLists.txt index 97d9f10a0417eb2e7cf6e63f2ebd89ecc4002741..1d56db1547ed184e375e4d79ee6bd30eca69f268 100644 --- a/qt/scientific_interfaces/Indirect/test/CMakeLists.txt +++ b/qt/scientific_interfaces/Indirect/test/CMakeLists.txt @@ -47,8 +47,7 @@ mtd_add_qt_tests( ${CORE_MANTIDLIBS} CurveFitting DataObjects - ${GMOCK_LIBRARIES} - ${GTEST_LIBRARIES} + gmock ${POCO_LIBRARIES} ${Boost_LIBRARIES} QT4_LINK_LIBS diff --git a/qt/scientific_interfaces/Indirect/test/ConvFitDataPresenterTest.h b/qt/scientific_interfaces/Indirect/test/ConvFitDataPresenterTest.h index e7f1c23dd273f28cf2ca85e4f39b0eaea7bc59d4..686d479dc41484f53ab4daecdd03faa6f4f0f884 100644 --- a/qt/scientific_interfaces/Indirect/test/ConvFitDataPresenterTest.h +++ b/qt/scientific_interfaces/Indirect/test/ConvFitDataPresenterTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Indirect/test/ConvFitModelTest.h b/qt/scientific_interfaces/Indirect/test/ConvFitModelTest.h index f39a7a89bb512e7917981dffcd684bf60a012a27..e4d72027d01cf273f1d956be798b6db47766e492 100644 --- a/qt/scientific_interfaces/Indirect/test/ConvFitModelTest.h +++ b/qt/scientific_interfaces/Indirect/test/ConvFitModelTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Indirect/test/ConvFunctionModelTest.h b/qt/scientific_interfaces/Indirect/test/ConvFunctionModelTest.h index cf5cf9de00325840ede4752711fcc8ca3bea6376..01ec08b2d4694ce072936d831f1b1daa3116b10c 100644 --- a/qt/scientific_interfaces/Indirect/test/ConvFunctionModelTest.h +++ b/qt/scientific_interfaces/Indirect/test/ConvFunctionModelTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Indirect/test/IndirectDataTablePresenterTest.h b/qt/scientific_interfaces/Indirect/test/IndirectDataTablePresenterTest.h index 46a8ff5829f3f309830c161703f532b153eee2c8..b6861f9db257d8f1b1692e6b246c14097fb344bb 100644 --- a/qt/scientific_interfaces/Indirect/test/IndirectDataTablePresenterTest.h +++ b/qt/scientific_interfaces/Indirect/test/IndirectDataTablePresenterTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Indirect/test/IndirectDataValidationHelperTest.h b/qt/scientific_interfaces/Indirect/test/IndirectDataValidationHelperTest.h index 2a358e0eb360b90006e30a2c8dabe5fcdf1f8ca7..f8f511c6691e88c609f2bf44c67c594d0a81c3f0 100644 --- a/qt/scientific_interfaces/Indirect/test/IndirectDataValidationHelperTest.h +++ b/qt/scientific_interfaces/Indirect/test/IndirectDataValidationHelperTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -45,7 +45,8 @@ std::string emptyWorkspaceGroupError() { " is empty."; } -MatrixWorkspace_sptr convertWorkspace2DToMatrix(Workspace2D_sptr workspace) { +MatrixWorkspace_sptr +convertWorkspace2DToMatrix(const Workspace2D_sptr &workspace) { return boost::dynamic_pointer_cast<MatrixWorkspace>(workspace); } diff --git a/qt/scientific_interfaces/Indirect/test/IndirectFitAnalysisTabTest.h b/qt/scientific_interfaces/Indirect/test/IndirectFitAnalysisTabTest.h index 49cea51a26dd5714eb7ccb6fd41c3c96796a8a47..30a870bef162883ec18be4c0875b22a067d277e2 100644 --- a/qt/scientific_interfaces/Indirect/test/IndirectFitAnalysisTabTest.h +++ b/qt/scientific_interfaces/Indirect/test/IndirectFitAnalysisTabTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Indirect/test/IndirectFitDataPresenterTest.h b/qt/scientific_interfaces/Indirect/test/IndirectFitDataPresenterTest.h index 7f7e4822bb3052a5d3452bed72ae17ace1c1e0b2..1f38bca91d5c79ae5021debfa2b615ff88fd34b8 100644 --- a/qt/scientific_interfaces/Indirect/test/IndirectFitDataPresenterTest.h +++ b/qt/scientific_interfaces/Indirect/test/IndirectFitDataPresenterTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Indirect/test/IndirectFitDataTest.h b/qt/scientific_interfaces/Indirect/test/IndirectFitDataTest.h index 7baca03efab4aedccfbc49e5219d410c3b6db9d5..ef6dfb13de073bb95ed4b3e9e710bcd970f7612f 100644 --- a/qt/scientific_interfaces/Indirect/test/IndirectFitDataTest.h +++ b/qt/scientific_interfaces/Indirect/test/IndirectFitDataTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Indirect/test/IndirectFitOutputOptionsModelTest.h b/qt/scientific_interfaces/Indirect/test/IndirectFitOutputOptionsModelTest.h index 34a1c9a8eb1ab90af4d18868c5d5979432e208bb..430d0af7185257ffedaa2104069e14a6ec14622f 100644 --- a/qt/scientific_interfaces/Indirect/test/IndirectFitOutputOptionsModelTest.h +++ b/qt/scientific_interfaces/Indirect/test/IndirectFitOutputOptionsModelTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Indirect/test/IndirectFitOutputOptionsPresenterTest.h b/qt/scientific_interfaces/Indirect/test/IndirectFitOutputOptionsPresenterTest.h index 7ebfe45d8022fa9e65c11f0112b2b962a5663ce0..ccbc3fd78d0809f0bf14ac931bd682899cb86f1d 100644 --- a/qt/scientific_interfaces/Indirect/test/IndirectFitOutputOptionsPresenterTest.h +++ b/qt/scientific_interfaces/Indirect/test/IndirectFitOutputOptionsPresenterTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Indirect/test/IndirectFitOutputTest.h b/qt/scientific_interfaces/Indirect/test/IndirectFitOutputTest.h index 22a787b8041bce5fd5058855d5a3c9f2cc46edbc..4ec0658d631896a8645e6d2def18d33eb026d84e 100644 --- a/qt/scientific_interfaces/Indirect/test/IndirectFitOutputTest.h +++ b/qt/scientific_interfaces/Indirect/test/IndirectFitOutputTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -88,9 +88,9 @@ WorkspaceGroup_sptr getPopulatedGroup(std::size_t const &size) { } std::unique_ptr<IndirectFitOutputLegacy> -createFitOutput(WorkspaceGroup_sptr resultGroup, - ITableWorkspace_sptr parameterTable, - WorkspaceGroup_sptr resultWorkspace, +createFitOutput(const WorkspaceGroup_sptr &resultGroup, + const ITableWorkspace_sptr ¶meterTable, + const WorkspaceGroup_sptr &resultWorkspace, IndirectFitDataLegacy *fitData, std::size_t spectrum) { return std::make_unique<IndirectFitOutputLegacy>( resultGroup, parameterTable, resultWorkspace, fitData, spectrum); @@ -324,9 +324,9 @@ private: } /// Store workspaces in ADS and won't destruct the ADS when leaving scope - void storeWorkspacesInADS(WorkspaceGroup_sptr workspacesGroup, - WorkspaceGroup_sptr resultGroup, - ITableWorkspace_sptr table) { + void storeWorkspacesInADS(const WorkspaceGroup_sptr &workspacesGroup, + const WorkspaceGroup_sptr &resultGroup, + const ITableWorkspace_sptr &table) { std::string const nameStart = resultGroup->size() > 1 ? "Multi" : ""; m_ads = std::make_unique<SetUpADSWithWorkspace>( nameStart + "ConvFit_1L_Workspaces", workspacesGroup); diff --git a/qt/scientific_interfaces/Indirect/test/IndirectFitPlotModelTest.h b/qt/scientific_interfaces/Indirect/test/IndirectFitPlotModelTest.h index b3c7da0bf48266b4d932f45ecd108486920bfd3e..2114fe0717ec4de8b56054201c8a6a51f9546c6c 100644 --- a/qt/scientific_interfaces/Indirect/test/IndirectFitPlotModelTest.h +++ b/qt/scientific_interfaces/Indirect/test/IndirectFitPlotModelTest.h @@ -1,13 +1,15 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include <cxxtest/TestSuite.h> +#include <utility> + #include "IndirectFitPlotModelLegacy.h" #include "MantidAPI/FrameworkManager.h" #include "MantidAPI/FunctionFactory.h" @@ -121,7 +123,7 @@ IndirectFittingModelLegacy *createModelWithSingleInstrumentWorkspace( return model; } -IAlgorithm_sptr setupFitAlgorithm(MatrixWorkspace_sptr workspace, +IAlgorithm_sptr setupFitAlgorithm(const MatrixWorkspace_sptr &workspace, std::string const &functionString) { auto alg = boost::make_shared<ConvolutionFitSequential>(); alg->initialize(); @@ -140,18 +142,19 @@ IAlgorithm_sptr setupFitAlgorithm(MatrixWorkspace_sptr workspace, } IAlgorithm_sptr getSetupFitAlgorithm(IndirectFittingModelLegacy *model, - MatrixWorkspace_sptr workspace, + const MatrixWorkspace_sptr &workspace, std::string const &workspaceName) { setFittingFunction(model, getFittingFunctionString(workspaceName), true); - auto alg = - setupFitAlgorithm(workspace, getFittingFunctionString(workspaceName)); + auto alg = setupFitAlgorithm(std::move(workspace), + getFittingFunctionString(workspaceName)); return alg; } IAlgorithm_sptr getExecutedFitAlgorithm(IndirectFittingModelLegacy *model, MatrixWorkspace_sptr workspace, std::string const &workspaceName) { - auto const alg = getSetupFitAlgorithm(model, workspace, workspaceName); + auto const alg = + getSetupFitAlgorithm(model, std::move(workspace), workspaceName); alg->execute(); return alg; } diff --git a/qt/scientific_interfaces/Indirect/test/IndirectFitPlotPresenterTest.h b/qt/scientific_interfaces/Indirect/test/IndirectFitPlotPresenterTest.h index 0a92596c07ac49f86a96c96c4393fb18f800b050..2182a6e33ecf3c2ddfbf5f152b84e15c8c567535 100644 --- a/qt/scientific_interfaces/Indirect/test/IndirectFitPlotPresenterTest.h +++ b/qt/scientific_interfaces/Indirect/test/IndirectFitPlotPresenterTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Indirect/test/IndirectFittingModelTest.h b/qt/scientific_interfaces/Indirect/test/IndirectFittingModelTest.h index 3294922a7b6c180d411531a05ea30226c7a5489b..b5afd434e62d86001c1217058a993a180e81a1e9 100644 --- a/qt/scientific_interfaces/Indirect/test/IndirectFittingModelTest.h +++ b/qt/scientific_interfaces/Indirect/test/IndirectFittingModelTest.h @@ -1,13 +1,15 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include <cxxtest/TestSuite.h> +#include <utility> + #include "IndirectFittingModelLegacy.h" #include "MantidAPI/FrameworkManager.h" #include "MantidAPI/FunctionFactory.h" @@ -106,7 +108,7 @@ void setFittingFunction(std::unique_ptr<DummyModel> &model, model->setFitFunction(getFunction(functionString)); } -IAlgorithm_sptr setupFitAlgorithm(MatrixWorkspace_sptr workspace, +IAlgorithm_sptr setupFitAlgorithm(const MatrixWorkspace_sptr &workspace, std::string const &functionString) { auto alg = boost::make_shared<ConvolutionFitSequential>(); alg->initialize(); @@ -125,7 +127,7 @@ IAlgorithm_sptr setupFitAlgorithm(MatrixWorkspace_sptr workspace, } IAlgorithm_sptr getSetupFitAlgorithm(std::unique_ptr<DummyModel> &model, - MatrixWorkspace_sptr workspace, + const MatrixWorkspace_sptr &workspace, std::string const &workspaceName) { std::string const function = "name=LinearBackground,A0=0,A1=0,ties=(A0=0.000000,A1=0.0);" @@ -136,14 +138,15 @@ IAlgorithm_sptr getSetupFitAlgorithm(std::unique_ptr<DummyModel> &model, "false;name=Lorentzian,Amplitude=1,PeakCentre=0,FWHM=0." "0175)))"; setFittingFunction(model, function); - auto alg = setupFitAlgorithm(workspace, function); + auto alg = setupFitAlgorithm(std::move(workspace), function); return alg; } IAlgorithm_sptr getExecutedFitAlgorithm(std::unique_ptr<DummyModel> &model, MatrixWorkspace_sptr workspace, std::string const &workspaceName) { - auto const alg = getSetupFitAlgorithm(model, workspace, workspaceName); + auto const alg = + getSetupFitAlgorithm(model, std::move(workspace), workspaceName); alg->execute(); return alg; } diff --git a/qt/scientific_interfaces/Indirect/test/IndirectPlotOptionsModelTest.h b/qt/scientific_interfaces/Indirect/test/IndirectPlotOptionsModelTest.h index 1700a0a248259a6c2bd34ed9af69d1feb4cd3c54..50daa20751bd4fb4365d3a1d86dde3c9a56050a1 100644 --- a/qt/scientific_interfaces/Indirect/test/IndirectPlotOptionsModelTest.h +++ b/qt/scientific_interfaces/Indirect/test/IndirectPlotOptionsModelTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -32,7 +32,8 @@ std::string const GROUP_NAME = "GroupName"; std::string const WORKSPACE_NAME = "WorkspaceName"; std::string const WORKSPACE_INDICES = "0-2,4"; -MatrixWorkspace_sptr convertWorkspace2DToMatrix(Workspace2D_sptr workspace) { +MatrixWorkspace_sptr +convertWorkspace2DToMatrix(const Workspace2D_sptr &workspace) { return boost::dynamic_pointer_cast<MatrixWorkspace>(workspace); } diff --git a/qt/scientific_interfaces/Indirect/test/IndirectPlotOptionsPresenterTest.h b/qt/scientific_interfaces/Indirect/test/IndirectPlotOptionsPresenterTest.h index 0ed6fba6c847442702d24c341eaa83c4db495957..0492667ff063894d2813bd002ad045b2024bb639 100644 --- a/qt/scientific_interfaces/Indirect/test/IndirectPlotOptionsPresenterTest.h +++ b/qt/scientific_interfaces/Indirect/test/IndirectPlotOptionsPresenterTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Indirect/test/IndirectPlotterTest.h b/qt/scientific_interfaces/Indirect/test/IndirectPlotterTest.h index fd474a5cd88b6c6c45bccaeced5e81d1cfb240b1..63e26d4b06a4e5e2ce872fa6ca018a218cfc8800 100644 --- a/qt/scientific_interfaces/Indirect/test/IndirectPlotterTest.h +++ b/qt/scientific_interfaces/Indirect/test/IndirectPlotterTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -28,7 +28,8 @@ namespace { std::string const WORKSPACE_NAME = "WorkspaceName"; std::string const WORKSPACE_INDICES = "0-2,4"; -MatrixWorkspace_sptr convertWorkspace2DToMatrix(Workspace2D_sptr workspace) { +MatrixWorkspace_sptr +convertWorkspace2DToMatrix(const Workspace2D_sptr &workspace) { return boost::dynamic_pointer_cast<MatrixWorkspace>(workspace); } diff --git a/qt/scientific_interfaces/Indirect/test/IndirectSettingsModelTest.h b/qt/scientific_interfaces/Indirect/test/IndirectSettingsModelTest.h index 44664c71b94f3f620779120be64a73735012e9a7..6dc56ca67f99163315da0653844ab6ea7eb273ac 100644 --- a/qt/scientific_interfaces/Indirect/test/IndirectSettingsModelTest.h +++ b/qt/scientific_interfaces/Indirect/test/IndirectSettingsModelTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Indirect/test/IndirectSettingsPresenterTest.h b/qt/scientific_interfaces/Indirect/test/IndirectSettingsPresenterTest.h index e50564f0bfd08adfd686ed0020eefc3e1555b52b..74fe05f01c0560ef03f8de78ff165117c4acd5ec 100644 --- a/qt/scientific_interfaces/Indirect/test/IndirectSettingsPresenterTest.h +++ b/qt/scientific_interfaces/Indirect/test/IndirectSettingsPresenterTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Indirect/test/IndirectSpectrumSelectionPresenterTest.h b/qt/scientific_interfaces/Indirect/test/IndirectSpectrumSelectionPresenterTest.h index bd3059c89ef133e8236aba659bc2d7aa355f7a61..bec8a0ba4c3da163e8ec1c4e1c30f9973e30042e 100644 --- a/qt/scientific_interfaces/Indirect/test/IndirectSpectrumSelectionPresenterTest.h +++ b/qt/scientific_interfaces/Indirect/test/IndirectSpectrumSelectionPresenterTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Indirect/test/IqtFitModelTest.h b/qt/scientific_interfaces/Indirect/test/IqtFitModelTest.h index 1aac43fa7caaea640969973514aa8e9aeae68c33..7a067d86c8a96ae5043fa313a3eeec5040a0752c 100644 --- a/qt/scientific_interfaces/Indirect/test/IqtFitModelTest.h +++ b/qt/scientific_interfaces/Indirect/test/IqtFitModelTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Indirect/test/JumpFitDataPresenterTest.h b/qt/scientific_interfaces/Indirect/test/JumpFitDataPresenterTest.h index 6b881f2b249e9f25f283321bd06682f230e12dbc..b526598162405621dce58f886ea3de5d575cb2c6 100644 --- a/qt/scientific_interfaces/Indirect/test/JumpFitDataPresenterTest.h +++ b/qt/scientific_interfaces/Indirect/test/JumpFitDataPresenterTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Indirect/test/JumpFitModelTest.h b/qt/scientific_interfaces/Indirect/test/JumpFitModelTest.h index c80635a0b7ce8f7e469a5af8a65eabb625e391b4..46201ee33c1f39e1e6896aaa10f60442b186c543 100644 --- a/qt/scientific_interfaces/Indirect/test/JumpFitModelTest.h +++ b/qt/scientific_interfaces/Indirect/test/JumpFitModelTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/MultiDatasetFit/DllConfig.h b/qt/scientific_interfaces/MultiDatasetFit/DllConfig.h index f789ed23a63c636b13ff14d688cc52f8a6d59f01..9579e435d5061d6371f69a8d351b838fd7e3bfbc 100644 --- a/qt/scientific_interfaces/MultiDatasetFit/DllConfig.h +++ b/qt/scientific_interfaces/MultiDatasetFit/DllConfig.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/MultiDatasetFit/MDFAddWorkspaceDialog.cpp b/qt/scientific_interfaces/MultiDatasetFit/MDFAddWorkspaceDialog.cpp index 6e1f1dabde0dee71f4304be04198523c65db010a..ac53cbb681e3aa59f37bd24280e9af35da62ecba 100644 --- a/qt/scientific_interfaces/MultiDatasetFit/MDFAddWorkspaceDialog.cpp +++ b/qt/scientific_interfaces/MultiDatasetFit/MDFAddWorkspaceDialog.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MDFAddWorkspaceDialog.h" diff --git a/qt/scientific_interfaces/MultiDatasetFit/MDFAddWorkspaceDialog.h b/qt/scientific_interfaces/MultiDatasetFit/MDFAddWorkspaceDialog.h index 7ded61165f42ae6bf8fe709fc53c21728f256363..a343f790e063a714ac28307e3d6e8f8431d915ab 100644 --- a/qt/scientific_interfaces/MultiDatasetFit/MDFAddWorkspaceDialog.h +++ b/qt/scientific_interfaces/MultiDatasetFit/MDFAddWorkspaceDialog.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/MultiDatasetFit/MDFDataController.cpp b/qt/scientific_interfaces/MultiDatasetFit/MDFDataController.cpp index 8a5627e92f0b04f215ca75d795066ee81ea9f375..631e634f9b8b6163e27f93e68bfbd516dafb97ba 100644 --- a/qt/scientific_interfaces/MultiDatasetFit/MDFDataController.cpp +++ b/qt/scientific_interfaces/MultiDatasetFit/MDFDataController.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MDFDataController.h" #include "MDFAddWorkspaceDialog.h" diff --git a/qt/scientific_interfaces/MultiDatasetFit/MDFDataController.h b/qt/scientific_interfaces/MultiDatasetFit/MDFDataController.h index 62fa8b2bd2531ce556ca96bcd110f44926ed23ad..01446a5b5dd48570dc3787b9cf85a71aca84217d 100644 --- a/qt/scientific_interfaces/MultiDatasetFit/MDFDataController.h +++ b/qt/scientific_interfaces/MultiDatasetFit/MDFDataController.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/MultiDatasetFit/MDFDatasetPlotData.cpp b/qt/scientific_interfaces/MultiDatasetFit/MDFDatasetPlotData.cpp index e6d4e903a010e91da448947a22b093433ae41d1b..32cc442632f1fe3a4d64e09e88ca48587e54b081 100644 --- a/qt/scientific_interfaces/MultiDatasetFit/MDFDatasetPlotData.cpp +++ b/qt/scientific_interfaces/MultiDatasetFit/MDFDatasetPlotData.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MDFDatasetPlotData.h" #include "MantidQtWidgets/Plotting/Qwt/ErrorCurve.h" diff --git a/qt/scientific_interfaces/MultiDatasetFit/MDFDatasetPlotData.h b/qt/scientific_interfaces/MultiDatasetFit/MDFDatasetPlotData.h index 75dac60a8481f31afbbc7f77006abf5fe73d36bd..26d348c8fcb8cbc5c38ae465fe3fec0e13bd1291 100644 --- a/qt/scientific_interfaces/MultiDatasetFit/MDFDatasetPlotData.h +++ b/qt/scientific_interfaces/MultiDatasetFit/MDFDatasetPlotData.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/MultiDatasetFit/MDFFunctionPlotData.cpp b/qt/scientific_interfaces/MultiDatasetFit/MDFFunctionPlotData.cpp index 29ed9ddca126dcafc64dbe25934fc1edadcb8807..775b683bac3d9e8fd00139c3dd9cd87f881c9e39 100644 --- a/qt/scientific_interfaces/MultiDatasetFit/MDFFunctionPlotData.cpp +++ b/qt/scientific_interfaces/MultiDatasetFit/MDFFunctionPlotData.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MDFFunctionPlotData.h" #include "MantidQtWidgets/Plotting/Qwt/ErrorCurve.h" @@ -18,6 +18,8 @@ #include <qwt_plot.h> #include <qwt_plot_curve.h> +#include <utility> + namespace MantidQt { namespace CustomInterfaces { namespace MDF { @@ -38,7 +40,7 @@ auto FUNCTION_CURVE_COLOR = Qt::magenta; MDFFunctionPlotData::MDFFunctionPlotData( boost::shared_ptr<Mantid::API::IFunction> fun, double startX, double endX, size_t nX) - : m_function(fun), m_functionCurve(new QwtPlotCurve()) { + : m_function(std::move(fun)), m_functionCurve(new QwtPlotCurve()) { setDomain(startX, endX, nX); auto pen = m_functionCurve->pen(); pen.setColor(FUNCTION_CURVE_COLOR); diff --git a/qt/scientific_interfaces/MultiDatasetFit/MDFFunctionPlotData.h b/qt/scientific_interfaces/MultiDatasetFit/MDFFunctionPlotData.h index c259960701461c264613e7db01232e3cb5ca3d0b..220cf403e3c0bae44a1f67db19308a3f9bd110b3 100644 --- a/qt/scientific_interfaces/MultiDatasetFit/MDFFunctionPlotData.h +++ b/qt/scientific_interfaces/MultiDatasetFit/MDFFunctionPlotData.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/MultiDatasetFit/MDFPlotController.cpp b/qt/scientific_interfaces/MultiDatasetFit/MDFPlotController.cpp index 17bed0095c236956b091a2972732a18840e21f56..323dd11f8a97afb012eb20ed960a0f26e45f2082 100644 --- a/qt/scientific_interfaces/MultiDatasetFit/MDFPlotController.cpp +++ b/qt/scientific_interfaces/MultiDatasetFit/MDFPlotController.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MDFPlotController.h" diff --git a/qt/scientific_interfaces/MultiDatasetFit/MDFPlotController.h b/qt/scientific_interfaces/MultiDatasetFit/MDFPlotController.h index ae74f4ee9d1b873fcb082dc02d9e3a51c6ea9711..baaef8be41768cb3abe83b18a1c864d0d731826e 100644 --- a/qt/scientific_interfaces/MultiDatasetFit/MDFPlotController.h +++ b/qt/scientific_interfaces/MultiDatasetFit/MDFPlotController.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/MultiDatasetFit/MultiDatasetFit.cpp b/qt/scientific_interfaces/MultiDatasetFit/MultiDatasetFit.cpp index 80f8ef20b043a7b5c8b98acb852489285bc7c562..16ddb25e259a86ae7fdede67135202373faf53fb 100644 --- a/qt/scientific_interfaces/MultiDatasetFit/MultiDatasetFit.cpp +++ b/qt/scientific_interfaces/MultiDatasetFit/MultiDatasetFit.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MultiDatasetFit.h" #include "MDFDataController.h" @@ -704,7 +704,7 @@ QString MultiDatasetFit::getLocalParameterTie(const QString &parName, /// @param i :: Index of the dataset (spectrum). /// @param tie :: A tie string to set. void MultiDatasetFit::setLocalParameterTie(const QString &parName, int i, - QString tie) { + const QString &tie) { m_functionBrowser->setLocalParameterTie(parName, i, tie); } diff --git a/qt/scientific_interfaces/MultiDatasetFit/MultiDatasetFit.h b/qt/scientific_interfaces/MultiDatasetFit/MultiDatasetFit.h index 274c4f1685656ea85a4cdbf8430a87105befdadf..4fbffc943cb3aef475a674c5a29257c0148f54f2 100644 --- a/qt/scientific_interfaces/MultiDatasetFit/MultiDatasetFit.h +++ b/qt/scientific_interfaces/MultiDatasetFit/MultiDatasetFit.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -79,7 +79,7 @@ public: /// Get the tie for a local parameter. QString getLocalParameterTie(const QString &parName, int i) const; /// Set a tie for a local parameter. - void setLocalParameterTie(const QString &parName, int i, QString tie); + void setLocalParameterTie(const QString &parName, int i, const QString &tie); /// Log a warning static void logWarning(const std::string &msg); diff --git a/qt/scientific_interfaces/MultiDatasetFit/PrecompiledHeader.h b/qt/scientific_interfaces/MultiDatasetFit/PrecompiledHeader.h index 615c906d96f4ca5650f269d34d7bc61092dd5111..449a595e135794242211bf62b59cca3c2e7c9fa6 100644 --- a/qt/scientific_interfaces/MultiDatasetFit/PrecompiledHeader.h +++ b/qt/scientific_interfaces/MultiDatasetFit/PrecompiledHeader.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Muon/ALCBaselineModellingModel.cpp b/qt/scientific_interfaces/Muon/ALCBaselineModellingModel.cpp index e9f46aa33bcd80105f8baa5d34b47b15d5395f73..6bce171fc778969a6b2aeee621d6c2c4e2d74401 100644 --- a/qt/scientific_interfaces/Muon/ALCBaselineModellingModel.cpp +++ b/qt/scientific_interfaces/Muon/ALCBaselineModellingModel.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "ALCBaselineModellingModel.h" @@ -14,12 +14,13 @@ #include "Poco/ActiveResult.h" #include <QApplication> +#include <utility> using namespace Mantid::API; namespace { -MatrixWorkspace_sptr extractSpectrum(MatrixWorkspace_sptr inputWorkspace, +MatrixWorkspace_sptr extractSpectrum(const MatrixWorkspace_sptr &inputWorkspace, const int workspaceIndex) { auto extracter = AlgorithmManager::Instance().create("ExtractSingleSpectrum"); extracter->setChild(true); @@ -31,8 +32,9 @@ MatrixWorkspace_sptr extractSpectrum(MatrixWorkspace_sptr inputWorkspace, return output; } -MatrixWorkspace_sptr evaluateFunction(IFunction_const_sptr function, - MatrixWorkspace_sptr inputWorkspace) { +MatrixWorkspace_sptr +evaluateFunction(const IFunction_const_sptr &function, + const MatrixWorkspace_sptr &inputWorkspace) { auto fit = AlgorithmManager::Instance().create("Fit"); fit->setChild(true); fit->setProperty("Function", function->asString()); @@ -96,7 +98,7 @@ void ALCBaselineModellingModel::fit(IFunction_const_sptr function, } void ALCBaselineModellingModel::setData(MatrixWorkspace_sptr data) { - m_data = data; + m_data = std::move(data); emit dataChanged(); } @@ -108,7 +110,7 @@ void ALCBaselineModellingModel::setData(MatrixWorkspace_sptr data) { * @param sections :: Section we want to use for fitting */ void ALCBaselineModellingModel::disableUnwantedPoints( - MatrixWorkspace_sptr ws, + const MatrixWorkspace_sptr &ws, const std::vector<IALCBaselineModellingModel::Section> §ions) { // Whether point with particular index should be disabled const size_t numBins = ws->blocksize(); @@ -146,7 +148,8 @@ void ALCBaselineModellingModel::disableUnwantedPoints( * @param sourceWs :: Workspace with original errors */ void ALCBaselineModellingModel::enableDisabledPoints( - MatrixWorkspace_sptr destWs, MatrixWorkspace_const_sptr sourceWs) { + const MatrixWorkspace_sptr &destWs, + const MatrixWorkspace_const_sptr &sourceWs) { // Unwanted points were disabled by setting their errors to very high values. // We recover here the original errors stored in sourceWs destWs->mutableE(0) = sourceWs->e(0); @@ -156,7 +159,8 @@ void ALCBaselineModellingModel::enableDisabledPoints( * Set errors in Diff spectrum after a fit * @param data :: [input/output] Workspace containing spectrum to set errors to */ -void ALCBaselineModellingModel::setErrorsAfterFit(MatrixWorkspace_sptr data) { +void ALCBaselineModellingModel::setErrorsAfterFit( + const MatrixWorkspace_sptr &data) { data->mutableE(2) = data->e(0); } @@ -208,13 +212,13 @@ ITableWorkspace_sptr ALCBaselineModellingModel::exportModel() { } void ALCBaselineModellingModel::setCorrectedData(MatrixWorkspace_sptr data) { - m_data = data; + m_data = std::move(data); emit correctedDataChanged(); } void ALCBaselineModellingModel::setFittedFunction( IFunction_const_sptr function) { - m_fittedFunction = function; + m_fittedFunction = std::move(function); emit fittedFunctionChanged(); } diff --git a/qt/scientific_interfaces/Muon/ALCBaselineModellingModel.h b/qt/scientific_interfaces/Muon/ALCBaselineModellingModel.h index 0828e068b45786814a9d1745f985bea8f5fe3ebd..552cf859176858c2f330fe2e5d2f2ecef5124d32 100644 --- a/qt/scientific_interfaces/Muon/ALCBaselineModellingModel.h +++ b/qt/scientific_interfaces/Muon/ALCBaselineModellingModel.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -76,16 +76,16 @@ private: void setFittedFunction(Mantid::API::IFunction_const_sptr function); // Set errors in the ws after the fit - void setErrorsAfterFit(Mantid::API::MatrixWorkspace_sptr data); + void setErrorsAfterFit(const Mantid::API::MatrixWorkspace_sptr &data); /// Disables points which shouldn't be used for fitting - static void disableUnwantedPoints(Mantid::API::MatrixWorkspace_sptr ws, + static void disableUnwantedPoints(const Mantid::API::MatrixWorkspace_sptr &ws, const std::vector<Section> §ions); /// Enable previously disabled points static void - enableDisabledPoints(Mantid::API::MatrixWorkspace_sptr destWs, - Mantid::API::MatrixWorkspace_const_sptr sourceWs); + enableDisabledPoints(const Mantid::API::MatrixWorkspace_sptr &destWs, + const Mantid::API::MatrixWorkspace_const_sptr &sourceWs); }; } // namespace CustomInterfaces diff --git a/qt/scientific_interfaces/Muon/ALCBaselineModellingPresenter.cpp b/qt/scientific_interfaces/Muon/ALCBaselineModellingPresenter.cpp index ffe2ce36f42f2ecaf878dd534664c37481ed330e..6831b5b570d215bc58fa9782441c5b4a760d76c7 100644 --- a/qt/scientific_interfaces/Muon/ALCBaselineModellingPresenter.cpp +++ b/qt/scientific_interfaces/Muon/ALCBaselineModellingPresenter.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "ALCBaselineModellingPresenter.h" diff --git a/qt/scientific_interfaces/Muon/ALCBaselineModellingPresenter.h b/qt/scientific_interfaces/Muon/ALCBaselineModellingPresenter.h index eeaf5c777dde2babb42e50fa94fe1694ddd44e8d..554c7530ea50cd8bd27d6b837cc81cc3d46ae26b 100644 --- a/qt/scientific_interfaces/Muon/ALCBaselineModellingPresenter.h +++ b/qt/scientific_interfaces/Muon/ALCBaselineModellingPresenter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Muon/ALCBaselineModellingView.cpp b/qt/scientific_interfaces/Muon/ALCBaselineModellingView.cpp index f01bcf1be8fc3c81c4bb09d706213c1f14a61844..a8739de4fca4f3944b7104ca7eb9280a836c34e0 100644 --- a/qt/scientific_interfaces/Muon/ALCBaselineModellingView.cpp +++ b/qt/scientific_interfaces/Muon/ALCBaselineModellingView.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "ALCBaselineModellingView.h" diff --git a/qt/scientific_interfaces/Muon/ALCBaselineModellingView.h b/qt/scientific_interfaces/Muon/ALCBaselineModellingView.h index d0788531ef703cec3748dcbdf2405d385c46cee4..ffe61febbc7f4b9654b9add29e7d6c826786910e 100644 --- a/qt/scientific_interfaces/Muon/ALCBaselineModellingView.h +++ b/qt/scientific_interfaces/Muon/ALCBaselineModellingView.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Muon/ALCDataLoadingPresenter.cpp b/qt/scientific_interfaces/Muon/ALCDataLoadingPresenter.cpp index b13ef8369a1dffe7b4b5487ea7ce3282225d0685..b69d77f6408322d3b340d73fc5894d3ba6fb02bf 100644 --- a/qt/scientific_interfaces/Muon/ALCDataLoadingPresenter.cpp +++ b/qt/scientific_interfaces/Muon/ALCDataLoadingPresenter.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "ALCDataLoadingPresenter.h" @@ -331,7 +331,7 @@ MatrixWorkspace_sptr ALCDataLoadingPresenter::exportWorkspace() { return MatrixWorkspace_sptr(); } -void ALCDataLoadingPresenter::setData(MatrixWorkspace_sptr data) { +void ALCDataLoadingPresenter::setData(const MatrixWorkspace_sptr &data) { if (data) { // Set the data diff --git a/qt/scientific_interfaces/Muon/ALCDataLoadingPresenter.h b/qt/scientific_interfaces/Muon/ALCDataLoadingPresenter.h index 815e67961f3ef85331eea207c38aa0f4feb21e13..cd32412a5bfa946942c83f266ca9cd0c123e4a5f 100644 --- a/qt/scientific_interfaces/Muon/ALCDataLoadingPresenter.h +++ b/qt/scientific_interfaces/Muon/ALCDataLoadingPresenter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -35,7 +35,7 @@ public: Mantid::API::MatrixWorkspace_sptr exportWorkspace(); /// Sets some data - void setData(Mantid::API::MatrixWorkspace_sptr data); + void setData(const Mantid::API::MatrixWorkspace_sptr &data); // Returns a boolean stating whether data is currently being loading bool isLoading() const; diff --git a/qt/scientific_interfaces/Muon/ALCDataLoadingView.cpp b/qt/scientific_interfaces/Muon/ALCDataLoadingView.cpp index b3494d980ea403f0330f14e1ad7512457ca95fd2..b91fe95649d04df21f03defeb74aebf567fef778 100644 --- a/qt/scientific_interfaces/Muon/ALCDataLoadingView.cpp +++ b/qt/scientific_interfaces/Muon/ALCDataLoadingView.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "ALCDataLoadingView.h" diff --git a/qt/scientific_interfaces/Muon/ALCDataLoadingView.h b/qt/scientific_interfaces/Muon/ALCDataLoadingView.h index e3641def3dde4dc9360000c28847c42fa408666b..4d52232fffaa3e75c95c727331298f64381ae5bd 100644 --- a/qt/scientific_interfaces/Muon/ALCDataLoadingView.h +++ b/qt/scientific_interfaces/Muon/ALCDataLoadingView.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Muon/ALCInterface.cpp b/qt/scientific_interfaces/Muon/ALCInterface.cpp index 7e57ab892286833a1b9bdc813877e3fec9c40dae..76a16a952931bab8b303f389630ecbed31bb0942 100644 --- a/qt/scientific_interfaces/Muon/ALCInterface.cpp +++ b/qt/scientific_interfaces/Muon/ALCInterface.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "ALCInterface.h" diff --git a/qt/scientific_interfaces/Muon/ALCInterface.h b/qt/scientific_interfaces/Muon/ALCInterface.h index 8e196accbc7db03c38ab028ea6f7c5a020c2222a..eb453e0bbd05c96df7ff9b376eb1de60f976c017 100644 --- a/qt/scientific_interfaces/Muon/ALCInterface.h +++ b/qt/scientific_interfaces/Muon/ALCInterface.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Muon/ALCLatestFileFinder.cpp b/qt/scientific_interfaces/Muon/ALCLatestFileFinder.cpp index 7bd6d552eecc5cba6266ca357a313fa3478c0c8f..e61cb503d989c9fc6190387a9ed614c124cb4fb7 100644 --- a/qt/scientific_interfaces/Muon/ALCLatestFileFinder.cpp +++ b/qt/scientific_interfaces/Muon/ALCLatestFileFinder.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "ALCLatestFileFinder.h" #include <Poco/DirectoryIterator.h> diff --git a/qt/scientific_interfaces/Muon/ALCLatestFileFinder.h b/qt/scientific_interfaces/Muon/ALCLatestFileFinder.h index bdf09f047ca5d0b19b0e1b4b18ce7f0898c22fca..6536ff40aadaa9044531bb6dd057ba563827a515 100644 --- a/qt/scientific_interfaces/Muon/ALCLatestFileFinder.h +++ b/qt/scientific_interfaces/Muon/ALCLatestFileFinder.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Muon/ALCPeakFittingModel.cpp b/qt/scientific_interfaces/Muon/ALCPeakFittingModel.cpp index a28a90ed8c0fbb884a6178069ae6ad6b2d938ca5..9eae7ba7510fc4d3a2e3d71ad7807807009ccdd8 100644 --- a/qt/scientific_interfaces/Muon/ALCPeakFittingModel.cpp +++ b/qt/scientific_interfaces/Muon/ALCPeakFittingModel.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "ALCPeakFittingModel.h" @@ -16,12 +16,13 @@ #include <Poco/ActiveResult.h> #include <QApplication> +#include <utility> using namespace Mantid::API; namespace { -MatrixWorkspace_sptr extractSpectrum(MatrixWorkspace_sptr inputWorkspace, +MatrixWorkspace_sptr extractSpectrum(const MatrixWorkspace_sptr &inputWorkspace, const int workspaceIndex) { auto extracter = AlgorithmManager::Instance().create("ExtractSingleSpectrum"); extracter->setChild(true); @@ -33,8 +34,9 @@ MatrixWorkspace_sptr extractSpectrum(MatrixWorkspace_sptr inputWorkspace, return output; } -MatrixWorkspace_sptr evaluateFunction(IFunction_const_sptr function, - MatrixWorkspace_sptr inputWorkspace) { +MatrixWorkspace_sptr +evaluateFunction(const IFunction_const_sptr &function, + const MatrixWorkspace_sptr &inputWorkspace) { auto fit = AlgorithmManager::Instance().create("Fit"); fit->setChild(true); fit->setProperty("Function", function->asString()); @@ -52,7 +54,7 @@ namespace MantidQt { namespace CustomInterfaces { void ALCPeakFittingModel::setData(MatrixWorkspace_sptr newData) { - m_data = newData; + m_data = std::move(newData); emit dataChanged(); } @@ -79,7 +81,7 @@ ITableWorkspace_sptr ALCPeakFittingModel::exportFittedPeaks() { } void ALCPeakFittingModel::setFittedPeaks(IFunction_const_sptr fittedPeaks) { - m_fittedPeaks = fittedPeaks; + m_fittedPeaks = std::move(fittedPeaks); emit fittedPeaksChanged(); } diff --git a/qt/scientific_interfaces/Muon/ALCPeakFittingModel.h b/qt/scientific_interfaces/Muon/ALCPeakFittingModel.h index b09fabe8b3d3eacf9873e8cd86adee3fb05e26ff..c5b6742d1eb1bcf221fb32617a95b0ff33482105 100644 --- a/qt/scientific_interfaces/Muon/ALCPeakFittingModel.h +++ b/qt/scientific_interfaces/Muon/ALCPeakFittingModel.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Muon/ALCPeakFittingPresenter.cpp b/qt/scientific_interfaces/Muon/ALCPeakFittingPresenter.cpp index c105b750249f8980f9a7dab93c18f8915532bf7c..bbb41d935b496c5b0fea0361f6e90d63942d2622 100644 --- a/qt/scientific_interfaces/Muon/ALCPeakFittingPresenter.cpp +++ b/qt/scientific_interfaces/Muon/ALCPeakFittingPresenter.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "ALCPeakFittingPresenter.h" diff --git a/qt/scientific_interfaces/Muon/ALCPeakFittingPresenter.h b/qt/scientific_interfaces/Muon/ALCPeakFittingPresenter.h index 178ca4fc1ece513a138cc946208308816cfa2465..8d88757ebd91e68b181ee01c315554406b216ab3 100644 --- a/qt/scientific_interfaces/Muon/ALCPeakFittingPresenter.h +++ b/qt/scientific_interfaces/Muon/ALCPeakFittingPresenter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Muon/ALCPeakFittingView.cpp b/qt/scientific_interfaces/Muon/ALCPeakFittingView.cpp index 7699559899746d5693584135dd5d04da8227708a..fe2719f5816a381fe4d21fa1ba72c59ae62755a5 100644 --- a/qt/scientific_interfaces/Muon/ALCPeakFittingView.cpp +++ b/qt/scientific_interfaces/Muon/ALCPeakFittingView.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "ALCPeakFittingView.h" diff --git a/qt/scientific_interfaces/Muon/ALCPeakFittingView.h b/qt/scientific_interfaces/Muon/ALCPeakFittingView.h index fffd71e6d70234fcab098856f1230e90e4fbf931..6a4f963f1d139d758d8357b0683e3f6a1bd50ad9 100644 --- a/qt/scientific_interfaces/Muon/ALCPeakFittingView.h +++ b/qt/scientific_interfaces/Muon/ALCPeakFittingView.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Muon/DllConfig.h b/qt/scientific_interfaces/Muon/DllConfig.h index 04e22ab122dc64880e581941ed3977f818010a83..d5938061055036cde7330c911623f60b48305d87 100644 --- a/qt/scientific_interfaces/Muon/DllConfig.h +++ b/qt/scientific_interfaces/Muon/DllConfig.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Muon/IALCBaselineModellingModel.h b/qt/scientific_interfaces/Muon/IALCBaselineModellingModel.h index 5c513d6161cb8fd2ccbfdd8cd40ee4ab34bf7e41..aca15d6097b965be206b50c8c3f64316db8a57ee 100644 --- a/qt/scientific_interfaces/Muon/IALCBaselineModellingModel.h +++ b/qt/scientific_interfaces/Muon/IALCBaselineModellingModel.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Muon/IALCBaselineModellingView.h b/qt/scientific_interfaces/Muon/IALCBaselineModellingView.h index 24058757844ae3cd0f596e2cd115cb26346ff686..b543f714f5260aac5789d15a3ad0e1877ead8e80 100644 --- a/qt/scientific_interfaces/Muon/IALCBaselineModellingView.h +++ b/qt/scientific_interfaces/Muon/IALCBaselineModellingView.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Muon/IALCDataLoadingView.h b/qt/scientific_interfaces/Muon/IALCDataLoadingView.h index 2c9dd006361d367b0fdca4d88b80a5915d259fbc..d1f681918d9dc7a9ab2c781e57d39a5c24e26847 100644 --- a/qt/scientific_interfaces/Muon/IALCDataLoadingView.h +++ b/qt/scientific_interfaces/Muon/IALCDataLoadingView.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Muon/IALCPeakFittingModel.h b/qt/scientific_interfaces/Muon/IALCPeakFittingModel.h index cd6a1db64533305cd75239cc1148657553dc682c..846bc9414d3d18b8e75610febbc8080e579116b8 100644 --- a/qt/scientific_interfaces/Muon/IALCPeakFittingModel.h +++ b/qt/scientific_interfaces/Muon/IALCPeakFittingModel.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Muon/IALCPeakFittingView.h b/qt/scientific_interfaces/Muon/IALCPeakFittingView.h index 34886f67673ddad306d0b8ead0b074e42bb3762e..124a2a90511083149538c875433603a4aa010693 100644 --- a/qt/scientific_interfaces/Muon/IALCPeakFittingView.h +++ b/qt/scientific_interfaces/Muon/IALCPeakFittingView.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Muon/IO_MuonGrouping.cpp b/qt/scientific_interfaces/Muon/IO_MuonGrouping.cpp index 3cb3384d7d2044cc220352d97caac28f19cf3c5e..f19a78167d3c27bb98d6fd00b2e24e6307e1459d 100644 --- a/qt/scientific_interfaces/Muon/IO_MuonGrouping.cpp +++ b/qt/scientific_interfaces/Muon/IO_MuonGrouping.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/qt/scientific_interfaces/Muon/IO_MuonGrouping.h b/qt/scientific_interfaces/Muon/IO_MuonGrouping.h index 672b5ba2c80f8206ed0ed5a7d8f4e9297f722990..a94f01489fc576c9ae5b725f86018c27092256b5 100644 --- a/qt/scientific_interfaces/Muon/IO_MuonGrouping.h +++ b/qt/scientific_interfaces/Muon/IO_MuonGrouping.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Muon/MuonAnalysis.cpp b/qt/scientific_interfaces/Muon/MuonAnalysis.cpp index c37bb42950e7bfc8e42369101635413a95bec1cc..2de5fbaf935ed5c766331b0b2088b462878317b1 100644 --- a/qt/scientific_interfaces/Muon/MuonAnalysis.cpp +++ b/qt/scientific_interfaces/Muon/MuonAnalysis.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MuonAnalysis.h" #include "MantidAPI/AlgorithmManager.h" @@ -60,6 +60,7 @@ #include <QVariant> #include <fstream> +#include <utility> // Add this class to the list of specialised dialogs in this namespace namespace MantidQt { @@ -604,7 +605,7 @@ Workspace_sptr MuonAnalysis::createAnalysisWorkspace(ItemType itemType, options.timeLimits.second = finishTime(); options.rebinArgs = isRaw ? "" : rebinParams(loadedWS); options.plotType = plotType; - options.wsName = wsName; + options.wsName = std::move(wsName); const auto *table = itemType == ItemType::Group ? m_uiForm.groupTable : m_uiForm.pairTable; options.groupPairName = table->item(tableRow, 0)->text().toStdString(); @@ -1180,8 +1181,8 @@ void MuonAnalysis::handleInputFileChanges() { * @param loadResult :: Various loaded parameters as returned by load() * @return Used grouping for populating grouping table */ -boost::shared_ptr<GroupResult> -MuonAnalysis::getGrouping(boost::shared_ptr<LoadResult> loadResult) const { +boost::shared_ptr<GroupResult> MuonAnalysis::getGrouping( + const boost::shared_ptr<LoadResult> &loadResult) const { auto result = boost::make_shared<GroupResult>(); boost::shared_ptr<Mantid::API::Grouping> groupingToUse; @@ -2220,13 +2221,13 @@ double MuonAnalysis::timeZero() { * size * @return Params string to pass to rebin */ -std::string MuonAnalysis::rebinParams(Workspace_sptr wsForRebin) { +std::string MuonAnalysis::rebinParams(const Workspace_sptr &wsForRebin) { MuonAnalysisOptionTab::RebinType rebinType = m_optionTab->getRebinType(); if (rebinType == MuonAnalysisOptionTab::NoRebin) { return ""; } else if (rebinType == MuonAnalysisOptionTab::FixedRebin) { - MatrixWorkspace_sptr ws = firstPeriod(wsForRebin); + MatrixWorkspace_sptr ws = firstPeriod(std::move(wsForRebin)); double binSize = ws->x(0)[1] - ws->x(0)[0]; double stepSize = m_optionTab->getRebinStep(); @@ -2749,7 +2750,7 @@ void MuonAnalysis::changeTab(int newTabIndex) { m_currentTab = newTab; } -void MuonAnalysis::updateNormalization(QString name) { +void MuonAnalysis::updateNormalization(const QString &name) { m_uiForm.fitBrowser->setNormalization(name.toStdString()); } diff --git a/qt/scientific_interfaces/Muon/MuonAnalysis.h b/qt/scientific_interfaces/Muon/MuonAnalysis.h index 3851064a2f3f4819629c40319f89391bc05f530f..928e66f62e98c86aaf97017908e6ef3b2cbb7198 100644 --- a/qt/scientific_interfaces/Muon/MuonAnalysis.h +++ b/qt/scientific_interfaces/Muon/MuonAnalysis.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -241,7 +241,7 @@ private slots: /// Called when "overwrite" is changed void updateDataPresenterOverwrite(int state); // update the displayed normalization - void updateNormalization(QString name); + void updateNormalization(const QString &name); private: void moveUnNormWS(const std::string &name, std::vector<std::string> &wsNames, @@ -270,7 +270,7 @@ private: /// Get grouping for the loaded workspace boost::shared_ptr<Muon::GroupResult> - getGrouping(boost::shared_ptr<Muon::LoadResult> loadResult) const; + getGrouping(const boost::shared_ptr<Muon::LoadResult> &loadResult) const; /// Set whether the loading buttons and MWRunFiles widget are enabled. void allowLoading(bool enabled); @@ -413,7 +413,7 @@ private: /// Returns params string which can be passed to Rebin, according to what user /// specified - std::string rebinParams(Mantid::API::Workspace_sptr wsForRebin); + std::string rebinParams(const Mantid::API::Workspace_sptr &wsForRebin); /// Updates rebin params in the fit data presenter void updateRebinParams(); diff --git a/qt/scientific_interfaces/Muon/MuonAnalysisDataLoader.cpp b/qt/scientific_interfaces/Muon/MuonAnalysisDataLoader.cpp index 160df797f1c9a3127e7feaf1ad2760919d76daf2..07eee852f1d2fa6f728982b73ace406524445808 100644 --- a/qt/scientific_interfaces/Muon/MuonAnalysisDataLoader.cpp +++ b/qt/scientific_interfaces/Muon/MuonAnalysisDataLoader.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MuonAnalysisDataLoader.h" @@ -199,7 +199,7 @@ LoadResult MuonAnalysisDataLoader::loadFiles(const QStringList &files) const { * @returns :: name of instrument (empty if failed to get it) */ std::string MuonAnalysisDataLoader::getInstrumentName( - const Workspace_sptr workspace) const { + const Workspace_sptr &workspace) const { if (workspace) { const auto period = MuonAnalysisHelper::firstPeriod(workspace); if (period) { @@ -339,7 +339,7 @@ Workspace_sptr MuonAnalysisDataLoader::loadDeadTimesFromFile( * @returns :: Workspace containing analysed data */ Workspace_sptr MuonAnalysisDataLoader::createAnalysisWorkspace( - const Workspace_sptr inputWS, const AnalysisOptions &options) const { + const Workspace_sptr &inputWS, const AnalysisOptions &options) const { IAlgorithm_sptr alg = AlgorithmManager::Instance().createUnmanaged("MuonProcess"); @@ -381,7 +381,7 @@ Workspace_sptr MuonAnalysisDataLoader::createAnalysisWorkspace( * @param options :: [input] Options to get properties from */ void MuonAnalysisDataLoader::setProcessAlgorithmProperties( - IAlgorithm_sptr alg, const AnalysisOptions &options) const { + const IAlgorithm_sptr &alg, const AnalysisOptions &options) const { alg->setProperty("Mode", "Analyse"); alg->setProperty("TimeZero", options.timeZero); // user input alg->setProperty("LoadedTimeZero", options.loadedTimeZero); // from file diff --git a/qt/scientific_interfaces/Muon/MuonAnalysisDataLoader.h b/qt/scientific_interfaces/Muon/MuonAnalysisDataLoader.h index 9a3912c30492063816491249c2329e64149c87f5..1922723d230e2e9347b32a6575cb9841f4835c78 100644 --- a/qt/scientific_interfaces/Muon/MuonAnalysisDataLoader.h +++ b/qt/scientific_interfaces/Muon/MuonAnalysisDataLoader.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -72,7 +72,7 @@ public: const Mantid::API::Grouping &grouping) const; /// create analysis workspace Mantid::API::Workspace_sptr - createAnalysisWorkspace(const Mantid::API::Workspace_sptr inputWS, + createAnalysisWorkspace(const Mantid::API::Workspace_sptr &inputWS, const Muon::AnalysisOptions &options) const; /// Get dead time table Mantid::API::ITableWorkspace_sptr @@ -92,7 +92,7 @@ public: protected: /// Set properties of algorithm from options void - setProcessAlgorithmProperties(Mantid::API::IAlgorithm_sptr alg, + setProcessAlgorithmProperties(const Mantid::API::IAlgorithm_sptr &alg, const Muon::AnalysisOptions &options) const; /// Remove from cache any workspaces that have been deleted in the meantime void updateCache() const; @@ -100,7 +100,7 @@ protected: private: /// Get instrument name from workspace std::string - getInstrumentName(const Mantid::API::Workspace_sptr workspace) const; + getInstrumentName(const Mantid::API::Workspace_sptr &workspace) const; /// Check if we should cache result of a load of the given files bool shouldBeCached(const QStringList &filenames) const; diff --git a/qt/scientific_interfaces/Muon/MuonAnalysisFitDataPresenter.cpp b/qt/scientific_interfaces/Muon/MuonAnalysisFitDataPresenter.cpp index 5f967f67fe997fe99914f7ede0edea890471e6cb..4130fd8f14b0b211e6cbaa075fc0edc6791be193 100644 --- a/qt/scientific_interfaces/Muon/MuonAnalysisFitDataPresenter.cpp +++ b/qt/scientific_interfaces/Muon/MuonAnalysisFitDataPresenter.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MuonAnalysisFitDataPresenter.h" #include "MantidAPI/AnalysisDataService.h" @@ -483,7 +483,7 @@ MuonAnalysisFitDataPresenter::createWorkspace(const std::string &name, * @returns :: parameter string for rebinning */ std::string MuonAnalysisFitDataPresenter::getRebinParams( - const Mantid::API::Workspace_sptr ws) const { + const Mantid::API::Workspace_sptr &ws) const { // First check for workspace group. If it is, use first entry if (const auto &group = boost::dynamic_pointer_cast<WorkspaceGroup>(ws)) { if (group->size() > 0) { diff --git a/qt/scientific_interfaces/Muon/MuonAnalysisFitDataPresenter.h b/qt/scientific_interfaces/Muon/MuonAnalysisFitDataPresenter.h index 09fc84573b08621810d12cad0f06b49f3e53b94a..bf7701c46f8df1998ad1c9cb6b22a19784f9606b 100644 --- a/qt/scientific_interfaces/Muon/MuonAnalysisFitDataPresenter.h +++ b/qt/scientific_interfaces/Muon/MuonAnalysisFitDataPresenter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -134,7 +134,7 @@ private: /// Update model and view with names of workspaces to fit void updateWorkspaceNames(const std::vector<std::string> &names) const; /// Get rebin options for analysis - std::string getRebinParams(const Mantid::API::Workspace_sptr ws) const; + std::string getRebinParams(const Mantid::API::Workspace_sptr &ws) const; /// Add special logs to fitted workspaces void addSpecialLogs( const std::string &wsName, diff --git a/qt/scientific_interfaces/Muon/MuonAnalysisFitDataTab.cpp b/qt/scientific_interfaces/Muon/MuonAnalysisFitDataTab.cpp index ab43bc1df1ad5e5162dac5836fe4f29e6e675a8e..393ce528b961aaf3dc5a8eae29e73ca5a6edf3cf 100644 --- a/qt/scientific_interfaces/Muon/MuonAnalysisFitDataTab.cpp +++ b/qt/scientific_interfaces/Muon/MuonAnalysisFitDataTab.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/qt/scientific_interfaces/Muon/MuonAnalysisFitDataTab.h b/qt/scientific_interfaces/Muon/MuonAnalysisFitDataTab.h index 89c5c4d5cc385c115fd0cee56845e576be250d31..82516de4a0d3ae0e1fe23bc1e270be230b8691e6 100644 --- a/qt/scientific_interfaces/Muon/MuonAnalysisFitDataTab.h +++ b/qt/scientific_interfaces/Muon/MuonAnalysisFitDataTab.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Muon/MuonAnalysisFitFunctionPresenter.cpp b/qt/scientific_interfaces/Muon/MuonAnalysisFitFunctionPresenter.cpp index 2815140cbe32ef877adec9ab20ba23ab0c96da0c..16a9bba129567fedcb084f87b3da066457faa686 100644 --- a/qt/scientific_interfaces/Muon/MuonAnalysisFitFunctionPresenter.cpp +++ b/qt/scientific_interfaces/Muon/MuonAnalysisFitFunctionPresenter.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MuonAnalysisFitFunctionPresenter.h" #include "MantidAPI/IFunction.h" diff --git a/qt/scientific_interfaces/Muon/MuonAnalysisFitFunctionPresenter.h b/qt/scientific_interfaces/Muon/MuonAnalysisFitFunctionPresenter.h index 2ce447d4147c1049e610e9742cc33b34642a6c2a..a92201688639e8a1c90a0839d2c29190f3005170 100644 --- a/qt/scientific_interfaces/Muon/MuonAnalysisFitFunctionPresenter.h +++ b/qt/scientific_interfaces/Muon/MuonAnalysisFitFunctionPresenter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Muon/MuonAnalysisHelper.cpp b/qt/scientific_interfaces/Muon/MuonAnalysisHelper.cpp index 421addb7b1c205d7e2c0403d9975c0d647b39be4..bc4dea86177f3fed4fcf6f4d1630645abcf18c15 100644 --- a/qt/scientific_interfaces/Muon/MuonAnalysisHelper.cpp +++ b/qt/scientific_interfaces/Muon/MuonAnalysisHelper.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MuonAnalysisHelper.h" @@ -27,6 +27,7 @@ #include <boost/lexical_cast.hpp> #include <boost/scope_exit.hpp> #include <stdexcept> +#include <utility> namespace { /// Colors for workspace (Black, Red, Green, Blue, Orange, Purple, if there are @@ -96,7 +97,7 @@ void setDoubleValidator(QLineEdit *field, bool allowEmpty) { * only - it is returned. * @param ws :: Run workspace */ -MatrixWorkspace_sptr firstPeriod(Workspace_sptr ws) { +MatrixWorkspace_sptr firstPeriod(const Workspace_sptr &ws) { if (auto group = boost::dynamic_pointer_cast<WorkspaceGroup>(ws)) { return boost::dynamic_pointer_cast<MatrixWorkspace>(group->getItem(0)); } else { @@ -109,7 +110,7 @@ MatrixWorkspace_sptr firstPeriod(Workspace_sptr ws) { * @param ws :: Run wokspace * @return Number of periods */ -size_t numPeriods(Workspace_sptr ws) { +size_t numPeriods(const Workspace_sptr &ws) { if (auto group = boost::dynamic_pointer_cast<WorkspaceGroup>(ws)) { return group->size(); } else { @@ -122,7 +123,7 @@ size_t numPeriods(Workspace_sptr ws) { * @param runWs :: Run workspace to retrieve information from * @param out :: Stream to print to */ -void printRunInfo(MatrixWorkspace_sptr runWs, std::ostringstream &out) { +void printRunInfo(const MatrixWorkspace_sptr &runWs, std::ostringstream &out) { // Remember current out stream format std::ios_base::fmtflags outFlags(out.flags()); std::streamsize outPrecision(out.precision()); @@ -253,7 +254,7 @@ void WidgetAutoSaver::registerWidget(QWidget *widget, const QString &name, QVariant defaultValue) { m_registeredWidgets.push_back(widget); m_widgetNames[widget] = name; - m_widgetDefaultValues[widget] = defaultValue; + m_widgetDefaultValues[widget] = std::move(defaultValue); m_widgetGroups[widget] = m_settings.group(); // Current group set up using beginGroup and endGroup } @@ -710,7 +711,7 @@ void replaceLogValue(const std::string &wsName, const std::string &logName, * @param logName :: [input] Name of log * @returns All values found for the given log */ -std::vector<std::string> findLogValues(const Workspace_sptr ws, +std::vector<std::string> findLogValues(const Workspace_sptr &ws, const std::string &logName) { std::vector<std::string> values; MatrixWorkspace_sptr matrixWS; @@ -747,7 +748,7 @@ std::vector<std::string> findLogValues(const Workspace_sptr ws, * @returns :: Pair of (smallest, largest) values */ std::pair<std::string, std::string> findLogRange( - const Workspace_sptr ws, const std::string &logName, + const Workspace_sptr &ws, const std::string &logName, bool (*isLessThan)(const std::string &first, const std::string &second)) { auto values = findLogValues(ws, logName); if (!values.empty()) { @@ -793,7 +794,8 @@ std::pair<std::string, std::string> findLogRange( * @throws std::invalid_argument if the workspaces supplied are null or have * different number of periods */ -void appendTimeSeriesLogs(Workspace_sptr toAppend, Workspace_sptr resultant, +void appendTimeSeriesLogs(const Workspace_sptr &toAppend, + const Workspace_sptr &resultant, const std::string &logName) { // check input if (!toAppend || !resultant) { @@ -802,7 +804,7 @@ void appendTimeSeriesLogs(Workspace_sptr toAppend, Workspace_sptr resultant, } // Cast the inputs to MatrixWorkspace (could be a group) - auto getWorkspaces = [](const Workspace_sptr ws) { + auto getWorkspaces = [](const Workspace_sptr &ws) { std::vector<MatrixWorkspace_sptr> workspaces; MatrixWorkspace_sptr matrixWS = boost::dynamic_pointer_cast<MatrixWorkspace>(ws); @@ -824,7 +826,7 @@ void appendTimeSeriesLogs(Workspace_sptr toAppend, Workspace_sptr resultant, }; // Extract time series log from workspace - auto getTSLog = [&logName](const MatrixWorkspace_sptr ws) { + auto getTSLog = [&logName](const MatrixWorkspace_sptr &ws) { const Mantid::API::Run &run = ws->run(); TimeSeriesProperty<double> *prop = nullptr; if (run.hasProperty(logName)) { @@ -905,8 +907,8 @@ QString runNumberString(const std::string &workspaceName, * @throws std::invalid_argument if loadedWorkspace is null */ bool isReloadGroupingNecessary( - const boost::shared_ptr<Mantid::API::Workspace> currentWorkspace, - const boost::shared_ptr<Mantid::API::Workspace> loadedWorkspace) { + const boost::shared_ptr<Mantid::API::Workspace> ¤tWorkspace, + const boost::shared_ptr<Mantid::API::Workspace> &loadedWorkspace) { if (!loadedWorkspace) { throw std::invalid_argument("No loaded workspace to get grouping for!"); } diff --git a/qt/scientific_interfaces/Muon/MuonAnalysisHelper.h b/qt/scientific_interfaces/Muon/MuonAnalysisHelper.h index 1a7d635dab533771953ba0bbcd9dbe307f031f07..4044b3314635ac50cefe91cab379eff63d4856a1 100644 --- a/qt/scientific_interfaces/Muon/MuonAnalysisHelper.h +++ b/qt/scientific_interfaces/Muon/MuonAnalysisHelper.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -50,7 +50,7 @@ MANTIDQT_MUONINTERFACE_DLL void setDoubleValidator(QLineEdit *field, /// Returns a first period MatrixWorkspace in a run workspace MANTIDQT_MUONINTERFACE_DLL Mantid::API::MatrixWorkspace_sptr -firstPeriod(Mantid::API::Workspace_sptr ws); +firstPeriod(const Mantid::API::Workspace_sptr &ws); /// Validates the field and returns the value MANTIDQT_MUONINTERFACE_DLL double @@ -58,11 +58,13 @@ getValidatedDouble(QLineEdit *field, const QString &defaultValue, const QString &valueDescr, Mantid::Kernel::Logger &log); /// Returns a number of periods in a run workspace -MANTIDQT_MUONINTERFACE_DLL size_t numPeriods(Mantid::API::Workspace_sptr ws); +MANTIDQT_MUONINTERFACE_DLL size_t +numPeriods(const Mantid::API::Workspace_sptr &ws); /// Print various information about the run MANTIDQT_MUONINTERFACE_DLL void -printRunInfo(Mantid::API::MatrixWorkspace_sptr runWs, std::ostringstream &out); +printRunInfo(const Mantid::API::MatrixWorkspace_sptr &runWs, + std::ostringstream &out); /// Get a run label for the workspace MANTIDQT_MUONINTERFACE_DLL std::string @@ -97,11 +99,12 @@ MANTIDQT_MUONINTERFACE_DLL void replaceLogValue(const std::string &wsName, /// Finds all of the values for a log MANTIDQT_MUONINTERFACE_DLL std::vector<std::string> -findLogValues(const Mantid::API::Workspace_sptr ws, const std::string &logName); +findLogValues(const Mantid::API::Workspace_sptr &ws, + const std::string &logName); /// Finds the range of values for a log MANTIDQT_MUONINTERFACE_DLL std::pair<std::string, std::string> findLogRange( - const Mantid::API::Workspace_sptr ws, const std::string &logName, + const Mantid::API::Workspace_sptr &ws, const std::string &logName, bool (*isLessThan)(const std::string &first, const std::string &second)); /// Finds the range of values for a log for a vector of workspaces @@ -112,8 +115,8 @@ MANTIDQT_MUONINTERFACE_DLL std::pair<std::string, std::string> findLogRange( /// Concatenates time-series log of one workspace with the second MANTIDQT_MUONINTERFACE_DLL void -appendTimeSeriesLogs(boost::shared_ptr<Mantid::API::Workspace> toAppend, - boost::shared_ptr<Mantid::API::Workspace> resultant, +appendTimeSeriesLogs(const boost::shared_ptr<Mantid::API::Workspace> &toAppend, + const boost::shared_ptr<Mantid::API::Workspace> &resultant, const std::string &logName); /// Parse analysis workspace name @@ -130,8 +133,8 @@ runNumberString(const std::string &workspaceName, const std::string &firstRun); /// Decide if grouping needs to be reloaded MANTIDQT_MUONINTERFACE_DLL bool isReloadGroupingNecessary( - const boost::shared_ptr<Mantid::API::Workspace> currentWorkspace, - const boost::shared_ptr<Mantid::API::Workspace> loadedWorkspace); + const boost::shared_ptr<Mantid::API::Workspace> ¤tWorkspace, + const boost::shared_ptr<Mantid::API::Workspace> &loadedWorkspace); /// Parse run label into instrument and runs MANTIDQT_MUONINTERFACE_DLL void parseRunLabel(const std::string &label, diff --git a/qt/scientific_interfaces/Muon/MuonAnalysisOptionTab.cpp b/qt/scientific_interfaces/Muon/MuonAnalysisOptionTab.cpp index 4682fd52a126a34c33b5835d6281089218993c0f..1845efd9d48a3f54d39b85bb3509af5fce42b17a 100644 --- a/qt/scientific_interfaces/Muon/MuonAnalysisOptionTab.cpp +++ b/qt/scientific_interfaces/Muon/MuonAnalysisOptionTab.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------------------------------------------- // Includes diff --git a/qt/scientific_interfaces/Muon/MuonAnalysisOptionTab.h b/qt/scientific_interfaces/Muon/MuonAnalysisOptionTab.h index 5741016d25a9b63cf51713e65d8e4e30aa68cf5b..615981f4ba8e0cab6dc0b6547b18bd37cc30b6e9 100644 --- a/qt/scientific_interfaces/Muon/MuonAnalysisOptionTab.h +++ b/qt/scientific_interfaces/Muon/MuonAnalysisOptionTab.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/Muon/MuonAnalysisResultTableCreator.cpp b/qt/scientific_interfaces/Muon/MuonAnalysisResultTableCreator.cpp index 327a9661109ec944456579bb5e372ee293c0299a..73921efcb8fea5d35423860779f5246c4ab6fd03 100644 --- a/qt/scientific_interfaces/Muon/MuonAnalysisResultTableCreator.cpp +++ b/qt/scientific_interfaces/Muon/MuonAnalysisResultTableCreator.cpp @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #include "MantidAPI/AnalysisDataService.h" #include "MantidAPI/ExperimentInfo.h" #include "MantidAPI/ITableWorkspace.h" @@ -279,7 +278,7 @@ void MuonAnalysisResultTableCreator::checkSameNumberOfDatasets( const size_t firstNumRuns = workspacesByLabel.begin()->second.size(); if (std::any_of(workspacesByLabel.begin(), workspacesByLabel.end(), [&firstNumRuns]( - const std::pair<QString, std::vector<std::string>> fit) { + const std::pair<QString, std::vector<std::string>> &fit) { return fit.second.size() != firstNumRuns; })) { throw std::runtime_error( @@ -754,7 +753,7 @@ bool MuonAnalysisResultTableCreator::haveSameParameters( * @param table :: [input, output] Pointer to TableWorkspace to edit */ void MuonAnalysisResultTableCreator::removeFixedParameterErrors( - const ITableWorkspace_sptr table) const { + const ITableWorkspace_sptr &table) const { assert(table); const size_t nRows = table->rowCount(); const auto colNames = table->getColumnNames(); diff --git a/qt/scientific_interfaces/Muon/MuonAnalysisResultTableCreator.h b/qt/scientific_interfaces/Muon/MuonAnalysisResultTableCreator.h index 06a40e4aeb4110bbbfcb5f5e717bbb693508f8c0..54a07a44d503cc7fa7a7b082695a3d8413f65984 100644 --- a/qt/scientific_interfaces/Muon/MuonAnalysisResultTableCreator.h +++ b/qt/scientific_interfaces/Muon/MuonAnalysisResultTableCreator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -37,7 +37,7 @@ protected: const std::vector<Mantid::API::ITableWorkspace_sptr> &tables) const; /// Remove error columns for fixed parameters from a results table void removeFixedParameterErrors( - const Mantid::API::ITableWorkspace_sptr table) const; + const Mantid::API::ITableWorkspace_sptr &table) const; private: /// Get map of label to workspaces diff --git a/qt/scientific_interfaces/Muon/MuonAnalysisResultTableTab.cpp b/qt/scientific_interfaces/Muon/MuonAnalysisResultTableTab.cpp index 288c2d1dd703f2e9771d47f0436ff54561870d16..448285609140d4f8ffee450bf343be3858bea5cf 100644 --- a/qt/scientific_interfaces/Muon/MuonAnalysisResultTableTab.cpp +++ b/qt/scientific_interfaces/Muon/MuonAnalysisResultTableTab.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MuonAnalysisResultTableTab.h" #include "MantidAPI/ExperimentInfo.h" @@ -676,7 +676,7 @@ bool MuonAnalysisResultTableTab::logNameLessThan(const QString &logName1, */ void MuonAnalysisResultTableTab::populateFittings( const QStringList &names, - std::function<Workspace_sptr(const QString &)> wsFromName) { + const std::function<Workspace_sptr(const QString &)> &wsFromName) { // Add number of rows for the amount of fittings. m_uiForm.fittingResultsTable->setRowCount(names.size()); diff --git a/qt/scientific_interfaces/Muon/MuonAnalysisResultTableTab.h b/qt/scientific_interfaces/Muon/MuonAnalysisResultTableTab.h index bb67c35a35d82070611acc5e45bbcc10669297a1..180e873717d2cdb4d87d28a654488d4887ebb6a9 100644 --- a/qt/scientific_interfaces/Muon/MuonAnalysisResultTableTab.h +++ b/qt/scientific_interfaces/Muon/MuonAnalysisResultTableTab.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -98,7 +98,8 @@ private: void populateLogsAndValues(const QStringList &fittedWsList); void populateFittings( const QStringList &names, - std::function<Mantid::API::Workspace_sptr(const QString &)> wsFromName); + const std::function<Mantid::API::Workspace_sptr(const QString &)> + &wsFromName); /// Creates the results table void createTable(bool multipleFits); diff --git a/qt/scientific_interfaces/Muon/MuonSequentialFitDialog.cpp b/qt/scientific_interfaces/Muon/MuonSequentialFitDialog.cpp index ccba7d45cdf84c2529a0729a6ed7da675eda0071..12bbd3b993f3df84ee1ccd873defa97ad6d5e185 100644 --- a/qt/scientific_interfaces/Muon/MuonSequentialFitDialog.cpp +++ b/qt/scientific_interfaces/Muon/MuonSequentialFitDialog.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MuonSequentialFitDialog.h" @@ -140,7 +140,8 @@ std::string MuonSequentialFitDialog::isValidLabel(const std::string &label) { * @param ws :: Workspace to get title from * @return The title, or empty string if unable to get one */ -std::string MuonSequentialFitDialog::getRunTitle(Workspace_const_sptr ws) { +std::string +MuonSequentialFitDialog::getRunTitle(const Workspace_const_sptr &ws) { auto matrixWS = boost::dynamic_pointer_cast<const MatrixWorkspace>(ws); if (!matrixWS) @@ -194,9 +195,9 @@ void MuonSequentialFitDialog::initDiagnosisTable() { * @param fitQuality :: Number representing goodness of the fit * @param fittedFunction :: Function containing fitted parameters */ -void MuonSequentialFitDialog::addDiagnosisEntry(const std::string &runTitle, - double fitQuality, - IFunction_sptr fittedFunction) { +void MuonSequentialFitDialog::addDiagnosisEntry( + const std::string &runTitle, double fitQuality, + const IFunction_sptr &fittedFunction) { int newRow = m_ui.diagnosisTable->rowCount(); m_ui.diagnosisTable->insertRow(newRow); diff --git a/qt/scientific_interfaces/Muon/MuonSequentialFitDialog.h b/qt/scientific_interfaces/Muon/MuonSequentialFitDialog.h index 4135a0699ef3b691e78a8385d9d96a8399a12a6f..b63041d86e7e39fd1e5e6cc65b137fee01f10aa9 100644 --- a/qt/scientific_interfaces/Muon/MuonSequentialFitDialog.h +++ b/qt/scientific_interfaces/Muon/MuonSequentialFitDialog.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -56,7 +56,7 @@ private: /// Add a new entry to the diagnosis table void addDiagnosisEntry(const std::string &runTitle, double fitQuality, - Mantid::API::IFunction_sptr fittedFunction); + const Mantid::API::IFunction_sptr &fittedFunction); /// Helper function to create new item for Diagnosis table QTableWidgetItem *createTableWidgetItem(const QString &text); @@ -90,7 +90,7 @@ private: static std::string isValidLabel(const std::string &label); /// Returns displayable title for the given workspace - static std::string getRunTitle(Mantid::API::Workspace_const_sptr ws); + static std::string getRunTitle(const Mantid::API::Workspace_const_sptr &ws); // -- SLOTS ------------------------------------------------------ diff --git a/qt/scientific_interfaces/Muon/PrecompiledHeader.h b/qt/scientific_interfaces/Muon/PrecompiledHeader.h index 615c906d96f4ca5650f269d34d7bc61092dd5111..449a595e135794242211bf62b59cca3c2e7c9fa6 100644 --- a/qt/scientific_interfaces/Muon/PrecompiledHeader.h +++ b/qt/scientific_interfaces/Muon/PrecompiledHeader.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/test/ALCBaselineModellingModelTest.h b/qt/scientific_interfaces/test/ALCBaselineModellingModelTest.h index 1671153e8f4facc47a31235dd82dd8042878ba12..b3a31236a0922530c85a970e8c2cedeaaba7d7f2 100644 --- a/qt/scientific_interfaces/test/ALCBaselineModellingModelTest.h +++ b/qt/scientific_interfaces/test/ALCBaselineModellingModelTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/test/ALCBaselineModellingPresenterTest.h b/qt/scientific_interfaces/test/ALCBaselineModellingPresenterTest.h index 70f79e038e4e4f0b4c87e5cf407ca4f30360a9c8..64ca0212742ac87e799fdf9f1cb4ec74925be5e2 100644 --- a/qt/scientific_interfaces/test/ALCBaselineModellingPresenterTest.h +++ b/qt/scientific_interfaces/test/ALCBaselineModellingPresenterTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/test/ALCDataLoadingPresenterTest.h b/qt/scientific_interfaces/test/ALCDataLoadingPresenterTest.h index cad12f9f0acad51d6e2ef1b97efdfc01de00b454..77ff1dadbbb09e7f97789ea136f276475a45144c 100644 --- a/qt/scientific_interfaces/test/ALCDataLoadingPresenterTest.h +++ b/qt/scientific_interfaces/test/ALCDataLoadingPresenterTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/test/ALCLatestFileFinderTest.h b/qt/scientific_interfaces/test/ALCLatestFileFinderTest.h index 87d4da6a060c71c58f3604a6fc46fbbafc321aec..2f614687d6f4134b1516faa8c8ffe2f8b40994a1 100644 --- a/qt/scientific_interfaces/test/ALCLatestFileFinderTest.h +++ b/qt/scientific_interfaces/test/ALCLatestFileFinderTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/test/ALCPeakFittingModelTest.h b/qt/scientific_interfaces/test/ALCPeakFittingModelTest.h index f4217eb165687a898624da50705e8629c1affcb1..7900939b76562ad86d169d9b004d1b1e9a443334 100644 --- a/qt/scientific_interfaces/test/ALCPeakFittingModelTest.h +++ b/qt/scientific_interfaces/test/ALCPeakFittingModelTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/test/ALCPeakFittingPresenterTest.h b/qt/scientific_interfaces/test/ALCPeakFittingPresenterTest.h index 80ba1988c51dc0f99cc26bd350bb45d60719c523..6222a1736d454a037b31d87fce54fb127e6ec03b 100644 --- a/qt/scientific_interfaces/test/ALCPeakFittingPresenterTest.h +++ b/qt/scientific_interfaces/test/ALCPeakFittingPresenterTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/test/EnggDiffFittingModelTest.h b/qt/scientific_interfaces/test/EnggDiffFittingModelTest.h new file mode 100644 index 0000000000000000000000000000000000000000..7a7355b78ced0fbe7863d5bc2f7c3910b5339fa0 --- /dev/null +++ b/qt/scientific_interfaces/test/EnggDiffFittingModelTest.h @@ -0,0 +1,312 @@ +// Mantid Repository : https://github.com/mantidproject/mantid +// +// Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, +// NScD Oak Ridge National Laboratory, European Spallation Source +// & Institut Laue - Langevin +// SPDX - License - Identifier: GPL - 3.0 + +#pragma once + +#include "MantidAPI/FrameworkManager.h" +#include "MantidAPI/ITableWorkspace.h" +#include "MantidAPI/MatrixWorkspace.h" +#include "MantidAPI/Run.h" +#include "MantidAPI/TableRow.h" +#include "MantidAPI/WorkspaceFactory.h" + +#include "../EnggDiffraction/EnggDiffFittingModel.h" + +#include <cxxtest/TestSuite.h> +#include <utility> + +#include <vector> + +using namespace Mantid; +using namespace MantidQt::CustomInterfaces; + +namespace { + +// Helper class that exposes addFocusedWorkspace +// This means we can test the workspace maps without having to run Load +class EnggDiffFittingModelAddWSExposed : public EnggDiffFittingModel { +public: + void addWorkspace(const RunLabel &runLabel, + const Mantid::API::MatrixWorkspace_sptr &ws); + + void addFitParams(const RunLabel &runLabel, + const Mantid::API::ITableWorkspace_sptr &ws); + + void mergeTablesExposed(const API::ITableWorkspace_sptr &tableToCopy, + const API::ITableWorkspace_sptr &targetTable); +}; + +inline void EnggDiffFittingModelAddWSExposed::addWorkspace( + const RunLabel &runLabel, const API::MatrixWorkspace_sptr &ws) { + addFocusedWorkspace(runLabel, std::move(ws), + runLabel.runNumber + "_" + std::to_string(runLabel.bank)); +} + +inline void EnggDiffFittingModelAddWSExposed::addFitParams( + const RunLabel &runLabel, const Mantid::API::ITableWorkspace_sptr &ws) { + addFitResults(runLabel, std::move(ws)); +} + +inline void EnggDiffFittingModelAddWSExposed::mergeTablesExposed( + const API::ITableWorkspace_sptr &tableToCopy, + const API::ITableWorkspace_sptr &targetTable) { + mergeTables(std::move(tableToCopy), std::move(targetTable)); +} + +void addSampleWorkspaceToModel(const RunLabel &runLabel, + EnggDiffFittingModelAddWSExposed &model) { + API::MatrixWorkspace_sptr ws = + API::WorkspaceFactory::Instance().create("Workspace2D", 1, 10, 10); + model.addWorkspace(runLabel, ws); +} + +API::ITableWorkspace_sptr createFitParamsTable() { + const size_t numColumns = 16; + const size_t numRows = 4; + auto table = API::WorkspaceFactory::Instance().createTable("TableWorkspace"); + const std::array<std::string, numColumns> headings({{ + "dSpacing[Y]", + "A0[Y]", + "A0_Err[yEr]", + "A1[Y]", + "A1_Err[yEr]", + "X0[Y]", + "X0_Err[yEr]", + "A[Y]", + "A_Err[yEr]", + "B[Y]", + "B_Err[yEr]", + "S[Y]", + "S_Err[yEr]", + "I[Y]", + "I_Err[yEr]", + "Chi[Y]", + }}); + + for (const auto &columnHeading : headings) { + table->addColumn("double", columnHeading); + } + + const std::array<std::array<double, numColumns>, numRows> rows = { + {{{1.4826999999999999, 0.093628531894011102, 0.66109193835092461, + 1.2564478992707699e-06, 2.4291293347225761e-05, 27140.960929827994, + 4.4430783321852303, 0.045621368052062856, 0.0092005773305902459, + 0.020298218347394655, 0.0025002243189996306, 11.741120992807753, + 5.3771683079349311, 34.202007864467461, 1.8695496489293224, + 1.4096728498206776}}, + {{1.7197, 1.0731062065126851, 0.72931461734063008, + -2.9359794063082084e-05, 2.285663646689115e-05, 31770.101042814735, + 5.6899014393655358, 0.050855278541599255, 0.013915934527381201, + 0.029076388335360012, 0.002935493268317269, 27.132751332587915, + 4.5849081323418064, 89.646425792809978, 2.1570533782524279, + 0.79304374868658656}}, + {{2.2399, 1.3229681799066122, 0.45360789821414083, + -3.0219780224537017e-05, 1.0941426250415265e-05, 41266.973604075109, + 4.0391546488412224, 0.043604800066098286, 0.0071406722143233931, + 0.021740542092941812, 0.001008755490980281, 36.523446658868707, + 3.2982922870662814, 205.36292151601506, 2.3728608996241367, + 0.90144473999482344}}, + {{2.552, 0.46162942972449567, 0.24323265893625406, + -9.0850559562388256e-06, 5.1638893666718458e-06, 46982.314791027922, + 46.041577282817634, 0.14208244137460718, 0.61720906575104273, + 0.018444321135930489, 0.0078725143001187933, 45.171720946242374, + 18.656365897259217, 14.950355673087914, 1.02699955199189, + 0.68147322764610252}}}}; + + for (const auto &row : rows) { + API::TableRow tableRow = table->appendRow(); + for (const auto entry : row) { + tableRow << entry; + } + } + return table; +} + +template <size_t numColumns, size_t numRows> +API::ITableWorkspace_sptr createDummyTable( + const std::array<std::string, numColumns> &columnHeadings, + const std::array<std::array<double, numColumns>, numRows> tableContents) { + auto table = API::WorkspaceFactory::Instance().createTable(); + for (const auto &header : columnHeadings) { + table->addColumn("double", header); + } + for (const auto &row : tableContents) { + API::TableRow newRow = table->appendRow(); + for (const auto value : row) { + newRow << value; + } + } + return table; +} + +} // anonymous namespace + +class EnggDiffFittingModelTest : 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 EnggDiffFittingModelTest *createSuite() { + return new EnggDiffFittingModelTest(); + } + static void destroySuite(EnggDiffFittingModelTest *suite) { delete suite; } + + EnggDiffFittingModelTest() { API::FrameworkManager::Instance(); } + + void test_addAndGetWorkspace() { + auto model = EnggDiffFittingModelAddWSExposed(); + API::MatrixWorkspace_sptr ws = + API::WorkspaceFactory::Instance().create("Workspace2D", 1, 10, 10); + + const RunLabel runLabel("100", 1); + TS_ASSERT_THROWS_NOTHING(model.addWorkspace(runLabel, ws)); + const auto retrievedWS = model.getFocusedWorkspace(runLabel); + + TS_ASSERT(retrievedWS != nullptr); + TS_ASSERT_EQUALS(ws, retrievedWS); + } + + void test_getRunNumbersAndBankIDs() { + auto model = EnggDiffFittingModelAddWSExposed(); + + addSampleWorkspaceToModel(RunLabel("123", 1), model); + addSampleWorkspaceToModel(RunLabel("456", 2), model); + addSampleWorkspaceToModel(RunLabel("789", 1), model); + addSampleWorkspaceToModel(RunLabel("123", 2), model); + + const auto runLabels = model.getRunLabels(); + + TS_ASSERT_EQUALS(runLabels.size(), 4); + TS_ASSERT_EQUALS(runLabels[0], RunLabel("123", 1)); + TS_ASSERT_EQUALS(runLabels[1], RunLabel("123", 2)); + TS_ASSERT_EQUALS(runLabels[2], RunLabel("456", 2)); + TS_ASSERT_EQUALS(runLabels[3], RunLabel("789", 1)); + } + + void test_loadWorkspaces() { + auto model = EnggDiffFittingModel(); + TS_ASSERT_THROWS_NOTHING(model.loadWorkspaces(FOCUSED_WS_FILENAME)); + API::MatrixWorkspace_sptr ws; + TS_ASSERT_THROWS_NOTHING( + ws = model.getFocusedWorkspace(FOCUSED_WS_RUN_LABEL)); + TS_ASSERT_EQUALS(ws->getNumberHistograms(), 1); + TS_ASSERT_EQUALS(std::to_string(ws->getRunNumber()), + FOCUSED_WS_RUN_LABEL.runNumber); + } + + void test_setDifcTzero() { + auto model = EnggDiffFittingModel(); + TS_ASSERT_THROWS_NOTHING(model.loadWorkspaces(FOCUSED_WS_FILENAME)); + + TS_ASSERT_THROWS_NOTHING(model.setDifcTzero( + FOCUSED_WS_RUN_LABEL, std::vector<GSASCalibrationParms>())); + auto ws = model.getFocusedWorkspace(FOCUSED_WS_RUN_LABEL); + auto run = ws->run(); + TS_ASSERT(run.hasProperty("difa")); + TS_ASSERT(run.hasProperty("difc")); + TS_ASSERT(run.hasProperty("tzero")); + } + + void test_createFittedPeaksWS() { + auto model = EnggDiffFittingModelAddWSExposed(); + + const auto fitParams = createFitParamsTable(); + TS_ASSERT_THROWS_NOTHING( + model.addFitParams(FOCUSED_WS_RUN_LABEL, fitParams)); + TS_ASSERT_THROWS_NOTHING(model.loadWorkspaces(FOCUSED_WS_FILENAME)); + + TS_ASSERT_THROWS_NOTHING(model.setDifcTzero( + FOCUSED_WS_RUN_LABEL, std::vector<GSASCalibrationParms>())); + TS_ASSERT_THROWS_NOTHING(model.createFittedPeaksWS(FOCUSED_WS_RUN_LABEL)); + + API::MatrixWorkspace_sptr fittedPeaksWS; + TS_ASSERT_THROWS_NOTHING(fittedPeaksWS = + model.getFittedPeaksWS(FOCUSED_WS_RUN_LABEL)); + TS_ASSERT_EQUALS(fittedPeaksWS->getNumberHistograms(), 4); + } + + void test_getNumFocusedWorkspaces() { + auto model = EnggDiffFittingModelAddWSExposed(); + + addSampleWorkspaceToModel(RunLabel("123", 1), model); + addSampleWorkspaceToModel(RunLabel("456", 2), model); + addSampleWorkspaceToModel(RunLabel("789", 1), model); + + TS_ASSERT_EQUALS(model.getNumFocusedWorkspaces(), 3); + } + + void test_mergeTables() { + auto model = EnggDiffFittingModelAddWSExposed(); + + const size_t numberOfColumns = 3; + const size_t numberOfRows = 2; + + const std::array<std::string, numberOfColumns> columnHeadings = { + {"X", "Y", "Z"}}; + + const std::array<std::array<double, numberOfColumns>, numberOfRows> + targetTableValues = {{{{1, 2, 3}}, {{4, 5, 6}}}}; + + auto targetTable = createDummyTable(columnHeadings, targetTableValues); + + const std::array<std::array<double, numberOfColumns>, numberOfRows> + copyTableValues = {{{{7, 8, 9}}, {{10, 11, 12}}}}; + + auto copyTable = createDummyTable(columnHeadings, copyTableValues); + + TS_ASSERT_THROWS_NOTHING(model.mergeTablesExposed(copyTable, targetTable)); + + TS_ASSERT_EQUALS(targetTable->columnCount(), numberOfColumns); + TS_ASSERT_EQUALS(targetTable->rowCount(), numberOfRows * 2); + + for (size_t rowIndex = 0; rowIndex < numberOfRows * 2; ++rowIndex) { + std::cout << "ROW " << rowIndex << "\n"; + API::TableRow row = targetTable->getRow(rowIndex); + const double expectedX = static_cast<double>(rowIndex) * 3 + 1; + const double expectedY = static_cast<double>(rowIndex) * 3 + 2; + const double expectedZ = static_cast<double>(rowIndex) * 3 + 3; + + // x, y and z must be initialized to keep RHEL7 happy + auto x = expectedX + 1; + auto y = expectedY + 1; + auto z = expectedZ + 1; + + TS_ASSERT_THROWS_NOTHING(row >> x >> y >> z); + TS_ASSERT_EQUALS(x, expectedX); + TS_ASSERT_EQUALS(y, expectedY); + TS_ASSERT_EQUALS(z, expectedZ); + } + } + + void test_removeRun() { + auto model = EnggDiffFittingModelAddWSExposed(); + + const RunLabel label1("123", 1); + addSampleWorkspaceToModel(label1, model); + const RunLabel label2("456", 2); + addSampleWorkspaceToModel(label2, model); + const RunLabel label3("789", 1); + addSampleWorkspaceToModel(label3, model); + + model.removeRun(label1); + + const auto runLabels = model.getRunLabels(); + TS_ASSERT_EQUALS(runLabels.size(), 2); + + TS_ASSERT_EQUALS(runLabels[0], label2); + TS_ASSERT_EQUALS(runLabels[1], label3); + } + +private: + const static std::string FOCUSED_WS_FILENAME; + const static RunLabel FOCUSED_WS_RUN_LABEL; +}; + +const std::string EnggDiffFittingModelTest::FOCUSED_WS_FILENAME = + "ENGINX_277208_focused_bank_2.nxs"; + +const RunLabel EnggDiffFittingModelTest::FOCUSED_WS_RUN_LABEL = + RunLabel("277208", 2); diff --git a/qt/scientific_interfaces/test/EnggDiffFittingPresenterTest.h b/qt/scientific_interfaces/test/EnggDiffFittingPresenterTest.h new file mode 100644 index 0000000000000000000000000000000000000000..94f569ca36d0d8658c7e2b8a4a33d9d85180014a --- /dev/null +++ b/qt/scientific_interfaces/test/EnggDiffFittingPresenterTest.h @@ -0,0 +1,764 @@ +// Mantid Repository : https://github.com/mantidproject/mantid +// +// Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, +// NScD Oak Ridge National Laboratory, European Spallation Source +// & Institut Laue - Langevin +// SPDX - License - Identifier: GPL - 3.0 + +#pragma once + +#include "../EnggDiffraction/EnggDiffFittingPresenter.h" +#include "MantidAPI/FrameworkManager.h" + +#include "MantidTestHelpers/WorkspaceCreationHelper.h" + +#include "EnggDiffFittingModelMock.h" +#include "EnggDiffFittingViewMock.h" +#include "EnggDiffractionParamMock.h" +#include <cxxtest/TestSuite.h> +#include <utility> + +#include <vector> + +using namespace MantidQt::CustomInterfaces; +using testing::Return; +using testing::ReturnRef; +using testing::TypedEq; + +// Use this mocked presenter for tests that will start the focusing +// workers/threads. Otherwise you'll run into trouble with issues like +// "QEventLoop: Cannot be used without QApplication", as there is not +// Qt application here and the normal Qt thread used by the presenter +// uses signals/slots. +class EnggDiffFittingPresenterNoThread : public EnggDiffFittingPresenter { +public: + EnggDiffFittingPresenterNoThread(IEnggDiffFittingView *view) + : EnggDiffFittingPresenterNoThread( + view, + std::make_unique<testing::NiceMock<MockEnggDiffFittingModel>>()) {} + + EnggDiffFittingPresenterNoThread(IEnggDiffFittingView *view, + std::unique_ptr<IEnggDiffFittingModel> model) + : EnggDiffFittingPresenter(view, std::move(model), nullptr, nullptr) {} + + EnggDiffFittingPresenterNoThread( + IEnggDiffFittingView *view, std::unique_ptr<IEnggDiffFittingModel> model, + boost::shared_ptr<IEnggDiffractionParam> mainParam) + : EnggDiffFittingPresenter(view, std::move(model), nullptr, + std::move(mainParam)) {} + +private: + // not async at all + void startAsyncFittingWorker(const std::vector<RunLabel> &runLabels, + const std::string &ExpectedPeaks) override { + assert(runLabels.size() == 1); + doFitting(runLabels, ExpectedPeaks); + fittingFinished(); + } +}; + +class EnggDiffFittingPresenterTest : public CxxTest::TestSuite { + +public: + // This pair of boilerplate methods prevent tghe suite being created + // statically + // This means the constructor isn't called when running other tests + static EnggDiffFittingPresenterTest *createSuite() { + return new EnggDiffFittingPresenterTest(); + } + + static void destroySuite(EnggDiffFittingPresenterTest *suite) { + delete suite; + } + + EnggDiffFittingPresenterTest() { + Mantid::API::FrameworkManager::Instance(); // make sure framework is + // initialized + } + + void setUp() override { + m_view.reset(new testing::NiceMock<MockEnggDiffFittingView>()); + auto mockModel = + std::make_unique<testing::NiceMock<MockEnggDiffFittingModel>>(); + + m_presenter.reset(new MantidQt::CustomInterfaces::EnggDiffFittingPresenter( + m_view.get(), std::move(mockModel), nullptr, nullptr)); + + // default banks + m_ex_enginx_banks.emplace_back(true); + m_ex_enginx_banks.emplace_back(false); + + // default run number + m_ex_empty_run_num.emplace_back(""); + m_invalid_run_number.emplace_back(""); + m_ex_run_number.emplace_back(g_validRunNo); + g_vanNo.emplace_back("8899999988"); + g_ceriaNo.emplace_back("9999999999"); + + // provide personal directories in order to carry out the full disable tests + m_basicCalibSettings.m_inputDirCalib = "GUI_calib_folder/"; + m_basicCalibSettings.m_inputDirRaw = "GUI_calib_folder/"; + + m_basicCalibSettings.m_pixelCalibFilename = + "ENGINX_full_pixel_calibration.csv"; + + m_basicCalibSettings.m_templateGSAS_PRM = "GUI_calib_folder/" + "template_ENGINX_241391_236516_" + "North_and_South_banks.prm"; + + m_basicCalibSettings.m_forceRecalcOverwrite = false; + m_basicCalibSettings.m_rebinCalibrate = 1; + } + + void tearDown() override { + TS_ASSERT(testing::Mock::VerifyAndClearExpectations(m_view.get())); + } + + void test_load_with_missing_param() { + testing::NiceMock<MockEnggDiffFittingView> mockView; + auto mockModel = + std::make_unique<testing::NiceMock<MockEnggDiffFittingModel>>(); + auto *mockModel_ptr = mockModel.get(); + MantidQt::CustomInterfaces::EnggDiffFittingPresenter pres( + &mockView, std::move(mockModel), nullptr, nullptr); + + EXPECT_CALL(mockView, getFocusedFileNames()).Times(1).WillOnce(Return("")); + + EXPECT_CALL(mockView, userWarning(testing::_, testing::_)).Times(1); + EXPECT_CALL(mockView, userError(testing::_, testing::_)).Times(0); + + // Should never get as far as trying to load + EXPECT_CALL(*mockModel_ptr, loadWorkspaces(testing::_)).Times(0); + + pres.notify(IEnggDiffFittingPresenter::Load); + TSM_ASSERT( + "View mock not used as expected. Some EXPECT_CALL conditions were not " + "satisfied.", + testing::Mock::VerifyAndClearExpectations(&mockView)) + TSM_ASSERT( + "Model mock not used as expected. Some EXPECT_CALL conditions were not " + "satisfied.", + testing::Mock::VerifyAndClearExpectations(mockModel_ptr)) + } + + void test_fitting_with_missing_param() { + testing::NiceMock<MockEnggDiffFittingView> mockView; + auto mockModel = + std::make_unique<testing::NiceMock<MockEnggDiffFittingModel>>(); + MantidQt::CustomInterfaces::EnggDiffFittingPresenter pres( + &mockView, std::move(mockModel), nullptr, nullptr); + + EXPECT_CALL(mockView, getFittingListWidgetCurrentValue()) + .Times(1) + .WillOnce(Return(boost::none)); + + // should not get to the point where the status is updated + EXPECT_CALL(mockView, setPeakList(testing::_)).Times(0); + EXPECT_CALL(mockView, showStatus(testing::_)).Times(0); + + // No errors/1 warnings. There will be an error log from the algorithms + EXPECT_CALL(mockView, userError(testing::_, testing::_)).Times(0); + EXPECT_CALL(mockView, userWarning(testing::_, testing::_)).Times(1); + + pres.notify(IEnggDiffFittingPresenter::FitPeaks); + TSM_ASSERT( + "Mock not used as expected. Some EXPECT_CALL conditions were not " + "satisfied.", + testing::Mock::VerifyAndClearExpectations(&mockView)) + } + + // This would test the fitting tab with no focused workspace + // which should produce a warning + void test_fitting_without_focused_run() { + testing::NiceMock<MockEnggDiffFittingView> mockView; + EnggDiffFittingPresenterNoThread pres(&mockView); + + // inputs from user + EXPECT_CALL(mockView, getFittingListWidgetCurrentValue()) + .Times(1) + .WillOnce(Return(boost::none)); + + // should not get to the point where the status is updated + EXPECT_CALL(mockView, setPeakList(testing::_)).Times(0); + EXPECT_CALL(mockView, showStatus(testing::_)).Times(0); + + // No errors/1 warnings. There will be an error log from the algorithms + EXPECT_CALL(mockView, userError(testing::_, testing::_)).Times(0); + EXPECT_CALL(mockView, userWarning(testing::_, testing::_)).Times(1); + + pres.notify(IEnggDiffFittingPresenter::FitPeaks); + TSM_ASSERT( + "Mock not used as expected. Some EXPECT_CALL conditions were not " + "satisfied.", + testing::Mock::VerifyAndClearExpectations(&mockView)) + } + + // This would test the fitting tab with invalid expected peaks but should only + // produce a warning + void test_fitting_with_invalid_expected_peaks() { + testing::NiceMock<MockEnggDiffFittingView> mockView; + auto mockModel = + std::make_unique<testing::NiceMock<MockEnggDiffFittingModel>>(); + auto *mockModel_ptr = mockModel.get(); + + EnggDiffFittingPresenterNoThread pres(&mockView, std::move(mockModel)); + + EXPECT_CALL(mockView, getFittingListWidgetCurrentValue()) + .Times(1) + .WillOnce(Return(boost::optional<std::string>( + boost::optional<std::string>("123_1")))); + EXPECT_CALL(*mockModel_ptr, getWorkspaceFilename(testing::_)) + .Times(1) + .WillOnce(ReturnRef(EMPTY)); + + EXPECT_CALL(mockView, getExpectedPeaksInput()) + .Times(1) + .WillOnce(Return(",3.5,7.78,r43d")); + EXPECT_CALL(mockView, setPeakList(testing::_)).Times(1); + + // should not get to the point where the status is updated + EXPECT_CALL(mockView, showStatus(testing::_)).Times(0); + + // No errors/1 warnings. There will be an error log from the algorithms + EXPECT_CALL(mockView, userError(testing::_, testing::_)).Times(0); + EXPECT_CALL(mockView, userWarning(testing::_, testing::_)).Times(1); + + pres.notify(IEnggDiffFittingPresenter::FitPeaks); + TSM_ASSERT( + "View mock not used as expected. Some EXPECT_CALL conditions were not " + "satisfied.", + testing::Mock::VerifyAndClearExpectations(&mockView)) + TSM_ASSERT( + "Model mock not used as expected. Some EXPECT_CALL conditions were not " + "satisfied.", + testing::Mock::VerifyAndClearExpectations(mockModel_ptr)) + } + + // Fit All Peaks test begin here + void test_fit_all_runno_valid_single_run() { + testing::NiceMock<MockEnggDiffFittingView> mockView; + auto mockModel = + std::make_unique<testing::NiceMock<MockEnggDiffFittingModel>>(); + auto *mockModel_ptr = mockModel.get(); + + EnggDiffFittingPresenterNoThread pres(&mockView, std::move(mockModel)); + + EXPECT_CALL(mockView, getExpectedPeaksInput()) + .Times(1) + .WillOnce(Return("2.3445,3.3433,4.5664")); + + const RunLabel runLabel("123", 1); + EXPECT_CALL(*mockModel_ptr, getRunLabels()) + .Times(1) + .WillOnce(Return(std::vector<RunLabel>({runLabel}))); + + EXPECT_CALL(*mockModel_ptr, getWorkspaceFilename(runLabel)) + .Times(1) + .WillOnce(ReturnRef(EMPTY)); + + EXPECT_CALL(mockView, setPeakList(testing::_)).Times(1); + + EXPECT_CALL(mockView, enableFitAllButton(testing::_)).Times(0); + + // should not get to the point where the status is updated + EXPECT_CALL(mockView, showStatus(testing::_)).Times(0); + + // No errors/1 warnings. There will be an error log because dir vector + // is empty + EXPECT_CALL(mockView, userError(testing::_, testing::_)).Times(0); + EXPECT_CALL(mockView, userWarning(testing::_, testing::_)).Times(1); + + pres.notify(IEnggDiffFittingPresenter::FitAllPeaks); + } + + // This would test the fitting tab with invalid expected peaks but should only + // produce a warning + void test_fit_all_with_invalid_expected_peaks() { + testing::NiceMock<MockEnggDiffFittingView> mockView; + auto mockModel = + std::make_unique<testing::NiceMock<MockEnggDiffFittingModel>>(); + auto *mockModel_ptr = mockModel.get(); + + EnggDiffFittingPresenterNoThread pres(&mockView, std::move(mockModel)); + + // inputs from user + EXPECT_CALL(mockView, getExpectedPeaksInput()) + .Times(1) + .WillOnce(Return(",3.5,7.78,r43d")); + EXPECT_CALL(mockView, setPeakList(testing::_)).Times(1); + + const RunLabel runLabel("123", 1); + EXPECT_CALL(*mockModel_ptr, getRunLabels()) + .Times(1) + .WillOnce(Return(std::vector<RunLabel>({runLabel}))); + + EXPECT_CALL(*mockModel_ptr, getWorkspaceFilename(runLabel)) + .Times(1) + .WillOnce(ReturnRef(EMPTY)); + + // should not get to the point where the status is updated + EXPECT_CALL(mockView, showStatus(testing::_)).Times(0); + + // No errors/1 warnings. There will be an error log from the algorithms + EXPECT_CALL(mockView, userError(testing::_, testing::_)).Times(0); + EXPECT_CALL(mockView, userWarning(testing::_, testing::_)).Times(1); + + pres.notify(IEnggDiffFittingPresenter::FitAllPeaks); + TSM_ASSERT( + "Mock not used as expected. Some EXPECT_CALL conditions were not " + "satisfied.", + testing::Mock::VerifyAndClearExpectations(&mockView)) + } + + void test_browse_peaks_list() { + testing::NiceMock<MockEnggDiffFittingView> mockView; + const auto paramMock = + boost::make_shared<testing::NiceMock<MockEnggDiffractionParam>>(); + EnggDiffFittingPresenterNoThread pres( + &mockView, + std::make_unique<testing::NiceMock<MockEnggDiffFittingModel>>(), + paramMock); + + const auto &userDir(Poco::Path::home()); + EXPECT_CALL(*paramMock, outFilesUserDir("")) + .Times(1) + .WillOnce(Return(userDir)); + + EXPECT_CALL(mockView, getOpenFile(userDir)).Times(1); + + EXPECT_CALL(mockView, getSaveFile(testing::_)).Times(0); + + // No errors/0 warnings. + EXPECT_CALL(mockView, userError(testing::_, testing::_)).Times(0); + EXPECT_CALL(mockView, userWarning(testing::_, testing::_)).Times(0); + + pres.notify(IEnggDiffFittingPresenter::browsePeaks); + TSM_ASSERT( + "Mock not used as expected. Some EXPECT_CALL conditions were not " + "satisfied.", + testing::Mock::VerifyAndClearExpectations(&mockView)) + } + + void test_browse_peaks_list_with_warning() { + testing::NiceMock<MockEnggDiffFittingView> mockView; + const auto paramMock = + boost::make_shared<testing::NiceMock<MockEnggDiffractionParam>>(); + EnggDiffFittingPresenterNoThread pres( + &mockView, + std::make_unique<testing::NiceMock<MockEnggDiffFittingModel>>(), + paramMock); + + const auto &userDir(Poco::Path::home()); + EXPECT_CALL(*paramMock, outFilesUserDir("")) + .Times(1) + .WillOnce(Return(userDir)); + + std::string dummyDir = "I/am/a/dummy/directory"; + + EXPECT_CALL(mockView, getOpenFile(userDir)) + .Times(1) + .WillOnce(Return(dummyDir)); + + EXPECT_CALL(mockView, setPreviousDir(dummyDir)).Times(1); + + EXPECT_CALL(mockView, setPeakList(testing::_)).Times(1); + + // No errors/0 warnings. + EXPECT_CALL(mockView, userError(testing::_, testing::_)).Times(0); + EXPECT_CALL(mockView, userWarning(testing::_, testing::_)).Times(0); + + pres.notify(IEnggDiffFittingPresenter::browsePeaks); + TSM_ASSERT( + "Mock not used as expected. Some EXPECT_CALL conditions were not " + "satisfied.", + testing::Mock::VerifyAndClearExpectations(&mockView)) + } + + void test_save_peaks_list() { + testing::NiceMock<MockEnggDiffFittingView> mockView; + const auto paramMock = + boost::make_shared<testing::NiceMock<MockEnggDiffractionParam>>(); + EnggDiffFittingPresenterNoThread pres( + &mockView, + std::make_unique<testing::NiceMock<MockEnggDiffFittingModel>>(), + paramMock); + + const auto &userDir(Poco::Path::home()); + EXPECT_CALL(*paramMock, outFilesUserDir("")) + .Times(1) + .WillOnce(Return(userDir)); + + EXPECT_CALL(mockView, getSaveFile(userDir)).Times(1); + + // No errors/No warnings. + EXPECT_CALL(mockView, userError(testing::_, testing::_)).Times(0); + EXPECT_CALL(mockView, userWarning(testing::_, testing::_)).Times(0); + + pres.notify(IEnggDiffFittingPresenter::savePeaks); + TSM_ASSERT( + "Mock not used as expected. Some EXPECT_CALL conditions were not " + "satisfied.", + testing::Mock::VerifyAndClearExpectations(&mockView)) + } + + void test_save_peaks_list_with_warning() { + testing::NiceMock<MockEnggDiffFittingView> mockView; + const auto paramMock = + boost::make_shared<testing::NiceMock<MockEnggDiffractionParam>>(); + EnggDiffFittingPresenterNoThread pres( + &mockView, + std::make_unique<testing::NiceMock<MockEnggDiffFittingModel>>(), + paramMock); + + const auto &userDir(Poco::Path::home()); + EXPECT_CALL(*paramMock, outFilesUserDir("")) + .Times(1) + .WillOnce(Return(userDir)); + + std::string dummyDir = "/dummy/directory/"; + EXPECT_CALL(mockView, getSaveFile(userDir)) + .Times(1) + .WillOnce(Return(dummyDir)); + + EXPECT_CALL(mockView, getExpectedPeaksInput()).Times(0); + + // No errors/1 warnings. Dummy file entered is not found + EXPECT_CALL(mockView, userError(testing::_, testing::_)).Times(0); + EXPECT_CALL(mockView, userWarning(testing::_, testing::_)).Times(1); + + pres.notify(IEnggDiffFittingPresenter::savePeaks); + TSM_ASSERT( + "Mock not used as expected. Some EXPECT_CALL conditions were not " + "satisfied.", + testing::Mock::VerifyAndClearExpectations(&mockView)) + } + + void test_add_peaks_to_empty_list() { + + testing::NiceMock<MockEnggDiffFittingView> mockView; + EnggDiffFittingPresenterNoThread pres(&mockView); + + EXPECT_CALL(mockView, peakPickerEnabled()).Times(1).WillOnce(Return(true)); + + EXPECT_CALL(mockView, getPeakCentre()).Times(1); + + EXPECT_CALL(mockView, getExpectedPeaksInput()) + .Times(1) + .WillOnce(Return("")); + ; + + EXPECT_CALL(mockView, setPeakList(testing::_)).Times(1); + + // should not be updating the status + EXPECT_CALL(mockView, showStatus(testing::_)).Times(0); + + // No errors/0 warnings. + EXPECT_CALL(mockView, userError(testing::_, testing::_)).Times(0); + EXPECT_CALL(mockView, userWarning(testing::_, testing::_)).Times(0); + + pres.notify(IEnggDiffFittingPresenter::addPeaks); + TSM_ASSERT( + "Mock not used as expected. Some EXPECT_CALL conditions were not " + "satisfied.", + testing::Mock::VerifyAndClearExpectations(&mockView)) + } + + void test_add_peaks_with_disabled_peak_picker() { + + testing::NiceMock<MockEnggDiffFittingView> mockView; + EnggDiffFittingPresenterNoThread pres(&mockView); + + EXPECT_CALL(mockView, peakPickerEnabled()).Times(1).WillOnce(Return(false)); + + EXPECT_CALL(mockView, getPeakCentre()).Times(0); + + EXPECT_CALL(mockView, getExpectedPeaksInput()).Times(0); + + EXPECT_CALL(mockView, setPeakList(testing::_)).Times(0); + + // should not be updating the status + EXPECT_CALL(mockView, showStatus(testing::_)).Times(0); + + // No errors/0 warnings. + EXPECT_CALL(mockView, userError(testing::_, testing::_)).Times(0); + EXPECT_CALL(mockView, userWarning(testing::_, testing::_)).Times(0); + + pres.notify(IEnggDiffFittingPresenter::addPeaks); + TSM_ASSERT( + "Mock not used as expected. Some EXPECT_CALL conditions were not " + "satisfied.", + testing::Mock::VerifyAndClearExpectations(&mockView)) + } + + void test_add_valid_peaks_to_list_with_comma() { + + testing::NiceMock<MockEnggDiffFittingView> mockView; + EnggDiffFittingPresenterNoThread pres(&mockView); + + EXPECT_CALL(mockView, peakPickerEnabled()).Times(1).WillOnce(Return(true)); + + EXPECT_CALL(mockView, getPeakCentre()).Times(1).WillOnce(Return(2.0684)); + + EXPECT_CALL(mockView, getExpectedPeaksInput()) + .Times(1) + .WillOnce(Return("1.7906,2.0684,1.2676,")); + + EXPECT_CALL(mockView, setPeakList("1.7906,2.0684,1.2676,2.0684")).Times(1); + + // No errors/0 warnings. + EXPECT_CALL(mockView, userError(testing::_, testing::_)).Times(0); + EXPECT_CALL(mockView, userWarning(testing::_, testing::_)).Times(0); + + pres.notify(IEnggDiffFittingPresenter::addPeaks); + TSM_ASSERT( + "Mock not used as expected. Some EXPECT_CALL conditions were not " + "satisfied.", + testing::Mock::VerifyAndClearExpectations(&mockView)) + } + + void test_add_customised_valid_peaks_to_list_without_comma() { + + testing::NiceMock<MockEnggDiffFittingView> mockView; + EnggDiffFittingPresenterNoThread pres(&mockView); + + EXPECT_CALL(mockView, peakPickerEnabled()).Times(1).WillOnce(Return(true)); + + EXPECT_CALL(mockView, getPeakCentre()).Times(1).WillOnce(Return(3.0234)); + + EXPECT_CALL(mockView, getExpectedPeaksInput()) + .Times(1) + .WillOnce(Return("2.0684,1.2676")); + + EXPECT_CALL(mockView, setPeakList("2.0684,1.2676,3.0234")).Times(1); + + // should not be updating the status + EXPECT_CALL(mockView, showStatus(testing::_)).Times(0); + + // No errors/0 warnings. + EXPECT_CALL(mockView, userError(testing::_, testing::_)).Times(0); + EXPECT_CALL(mockView, userWarning(testing::_, testing::_)).Times(0); + + pres.notify(IEnggDiffFittingPresenter::addPeaks); + TSM_ASSERT( + "Mock not used as expected. Some EXPECT_CALL conditions were not " + "satisfied.", + testing::Mock::VerifyAndClearExpectations(&mockView)) + } + + void test_add_invalid_peaks_to_list() { + + testing::NiceMock<MockEnggDiffFittingView> mockView; + EnggDiffFittingPresenterNoThread pres(&mockView); + + EXPECT_CALL(mockView, peakPickerEnabled()).Times(1).WillOnce(Return(true)); + + EXPECT_CALL(mockView, getPeakCentre()).Times(1).WillOnce(Return(0.0133)); + + EXPECT_CALL(mockView, getExpectedPeaksInput()) + .Times(1) + .WillOnce(Return("")); + + // string should be "0.133," instead + EXPECT_CALL(mockView, setPeakList("0.0133")).Times(0); + EXPECT_CALL(mockView, setPeakList(",0.0133")).Times(0); + EXPECT_CALL(mockView, setPeakList("0.0133,")).Times(1); + + // No errors/0 warnings. File entered is not found + EXPECT_CALL(mockView, userError(testing::_, testing::_)).Times(0); + EXPECT_CALL(mockView, userWarning(testing::_, testing::_)).Times(0); + + pres.notify(IEnggDiffFittingPresenter::addPeaks); + TSM_ASSERT( + "Mock not used as expected. Some EXPECT_CALL conditions were not " + "satisfied.", + testing::Mock::VerifyAndClearExpectations(&mockView)) + } + + void test_shutDown() { + testing::NiceMock<MockEnggDiffFittingView> mockView; + MantidQt::CustomInterfaces::EnggDiffFittingPresenter pres( + &mockView, + std::make_unique<testing::NiceMock<MockEnggDiffFittingModel>>(), + nullptr, nullptr); + + EXPECT_CALL(mockView, setPeakList(testing::_)).Times(0); + EXPECT_CALL(mockView, getFocusedFileNames()).Times(0); + EXPECT_CALL(mockView, getFittingRunNumVec()).Times(0); + + EXPECT_CALL(mockView, getFittingMultiRunMode()).Times(0); + + EXPECT_CALL(mockView, showStatus(testing::_)).Times(0); + + EXPECT_CALL(mockView, saveSettings()).Times(1); + // No errors, no warnings + EXPECT_CALL(mockView, userError(testing::_, testing::_)).Times(0); + EXPECT_CALL(mockView, userWarning(testing::_, testing::_)).Times(0); + + pres.notify(IEnggDiffFittingPresenter::ShutDown); + TSM_ASSERT( + "Mock not used as expected. Some EXPECT_CALL conditions were not " + "satisfied.", + testing::Mock::VerifyAndClearExpectations(&mockView)) + } + + void test_removeRun() { + testing::NiceMock<MockEnggDiffFittingView> mockView; + auto mockModel = + std::make_unique<testing::NiceMock<MockEnggDiffFittingModel>>(); + auto *mockModel_ptr = mockModel.get(); + MantidQt::CustomInterfaces::EnggDiffFittingPresenter pres( + &mockView, std::move(mockModel), nullptr, nullptr); + + EXPECT_CALL(mockView, getFittingListWidgetCurrentValue()) + .Times(1) + .WillOnce(Return(boost::optional<std::string>("123_1"))); + EXPECT_CALL(*mockModel_ptr, removeRun(RunLabel("123", 1))); + EXPECT_CALL(*mockModel_ptr, getRunLabels()) + .Times(1) + .WillOnce(Return( + std::vector<RunLabel>({RunLabel("123", 2), RunLabel("456", 1)}))); + EXPECT_CALL(mockView, updateFittingListWidget( + std::vector<std::string>({"123_2", "456_1"}))); + + pres.notify(IEnggDiffFittingPresenter::removeRun); + + TSM_ASSERT( + "Mock not used as expected. Some EXPECT_CALL conditions were not " + "satisfied.", + testing::Mock::VerifyAndClearExpectations(&mockView)) + } + + void test_updatePlotFittedPeaksValidFittedPeaks() { + testing::NiceMock<MockEnggDiffFittingView> mockView; + auto mockModel = + std::make_unique<testing::NiceMock<MockEnggDiffFittingModel>>(); + auto *mockModel_ptr = mockModel.get(); + + EnggDiffFittingPresenterNoThread pres(&mockView, std::move(mockModel)); + + const RunLabel runLabel("123", 1); + EXPECT_CALL(mockView, getFittingListWidgetCurrentValue()) + .Times(2) + .WillRepeatedly(Return(boost::optional<std::string>("123_1"))); + EXPECT_CALL(*mockModel_ptr, hasFittedPeaksForRun(runLabel)) + .Times(1) + .WillOnce(Return(true)); + EXPECT_CALL(*mockModel_ptr, getAlignedWorkspace(runLabel)) + .Times(1) + .WillOnce(Return(WorkspaceCreationHelper::create2DWorkspace(10, 10))); + EXPECT_CALL(mockView, plotFittedPeaksEnabled()) + .Times(1) + .WillOnce(Return(true)); + EXPECT_CALL(*mockModel_ptr, getFittedPeaksWS(runLabel)) + .Times(1) + .WillOnce(Return(WorkspaceCreationHelper::create2DWorkspace(10, 10))); + EXPECT_CALL(mockView, + setDataVector(testing::_, testing::_, testing::_, testing::_)) + .Times(2); + + pres.notify(IEnggDiffFittingPresenter::updatePlotFittedPeaks); + TSM_ASSERT( + "Mock not used as expected. Some EXPECT_CALL conditions were not " + "satisfied.", + testing::Mock::VerifyAndClearExpectations(&mockView)) + } + + void test_updatePlotFittedPeaksNoFittedPeaks() { + testing::NiceMock<MockEnggDiffFittingView> mockView; + auto mockModel = + std::make_unique<testing::NiceMock<MockEnggDiffFittingModel>>(); + auto *mockModel_ptr = mockModel.get(); + + EnggDiffFittingPresenterNoThread pres(&mockView, std::move(mockModel)); + + const RunLabel runLabel("123", 1); + EXPECT_CALL(mockView, getFittingListWidgetCurrentValue()) + .Times(1) + .WillOnce(Return(boost::optional<std::string>("123_1"))); + EXPECT_CALL(*mockModel_ptr, hasFittedPeaksForRun(runLabel)) + .Times(1) + .WillOnce(Return(false)); + EXPECT_CALL(*mockModel_ptr, getFocusedWorkspace(runLabel)) + .Times(1) + .WillOnce(Return(WorkspaceCreationHelper::create2DWorkspace(10, 10))); + EXPECT_CALL(mockView, plotFittedPeaksEnabled()) + .Times(1) + .WillOnce(Return(true)); + EXPECT_CALL(*mockModel_ptr, getFittedPeaksWS(runLabel)).Times(0); + EXPECT_CALL(mockView, + setDataVector(testing::_, testing::_, testing::_, testing::_)) + .Times(1); + EXPECT_CALL(mockView, userWarning("Cannot plot fitted peaks", testing::_)) + .Times(1); + + pres.notify(IEnggDiffFittingPresenter::updatePlotFittedPeaks); + TSM_ASSERT( + "Mock not used as expected. Some EXPECT_CALL conditions were not " + "satisfied.", + testing::Mock::VerifyAndClearExpectations(&mockView)) + } + + void test_updatePlotSuccessfulFitPlotPeaksDisabled() { + testing::NiceMock<MockEnggDiffFittingView> mockView; + auto mockModel = + std::make_unique<testing::NiceMock<MockEnggDiffFittingModel>>(); + auto *mockModel_ptr = mockModel.get(); + + EnggDiffFittingPresenterNoThread pres(&mockView, std::move(mockModel)); + + const RunLabel runLabel("123", 1); + EXPECT_CALL(mockView, getFittingListWidgetCurrentValue()) + .Times(2) + .WillRepeatedly(Return(boost::optional<std::string>("123_1"))); + EXPECT_CALL(*mockModel_ptr, hasFittedPeaksForRun(runLabel)) + .Times(1) + .WillOnce(Return(true)); + EXPECT_CALL(*mockModel_ptr, getAlignedWorkspace(runLabel)) + .Times(1) + .WillOnce(Return(WorkspaceCreationHelper::create2DWorkspace(10, 10))); + EXPECT_CALL(mockView, plotFittedPeaksEnabled()) + .Times(1) + .WillOnce(Return(false)); + EXPECT_CALL(*mockModel_ptr, getFittedPeaksWS(runLabel)).Times(0); + EXPECT_CALL(mockView, + setDataVector(testing::_, testing::_, testing::_, testing::_)) + .Times(1); + + pres.notify(IEnggDiffFittingPresenter::updatePlotFittedPeaks); + TSM_ASSERT( + "Mock not used as expected. Some EXPECT_CALL conditions were not " + "satisfied.", + testing::Mock::VerifyAndClearExpectations(&mockView)) + } + +private: + std::unique_ptr<testing::NiceMock<MockEnggDiffFittingView>> m_view; + std::unique_ptr<MantidQt::CustomInterfaces::EnggDiffFittingPresenter> + m_presenter; + + std::vector<bool> m_ex_enginx_banks; + const static std::string g_validRunNo; + const static std::string g_focusedRun; + const static std::string g_focusedBankFile; + const static std::string g_focusedFittingRunNo; + const static std::string EMPTY; + EnggDiffCalibSettings m_basicCalibSettings; + + std::vector<std::string> m_ex_empty_run_num; + std::vector<std::string> m_invalid_run_number; + std::vector<std::string> m_ex_run_number; + std::vector<std::string> g_vanNo; + std::vector<std::string> g_ceriaNo; +}; + +const std::string EnggDiffFittingPresenterTest::g_focusedRun = + "focused_texture_bank_1"; + +const std::string EnggDiffFittingPresenterTest::g_validRunNo = "228061"; + +const std::string EnggDiffFittingPresenterTest::g_focusedBankFile = + "ENGINX_241395_focused_texture_bank_1"; + +const std::string EnggDiffFittingPresenterTest::g_focusedFittingRunNo = + "241391-241394"; + +const std::string EnggDiffFittingPresenterTest::EMPTY = ""; diff --git a/qt/scientific_interfaces/test/EnggDiffGSASFittingModelTest.h b/qt/scientific_interfaces/test/EnggDiffGSASFittingModelTest.h new file mode 100644 index 0000000000000000000000000000000000000000..245b8b7b1a4561ffff018192125fedab73ea7b28 --- /dev/null +++ b/qt/scientific_interfaces/test/EnggDiffGSASFittingModelTest.h @@ -0,0 +1,289 @@ +// Mantid Repository : https://github.com/mantidproject/mantid +// +// Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, +// NScD Oak Ridge National Laboratory, European Spallation Source +// & Institut Laue - Langevin +// SPDX - License - Identifier: GPL - 3.0 + +#pragma once + +#include "../EnggDiffraction/EnggDiffGSASFittingModel.h" + +#include "MantidAPI/AlgorithmManager.h" +#include "MantidAPI/AnalysisDataService.h" +#include "MantidAPI/FrameworkManager.h" +#include "MantidAPI/TableRow.h" +#include "MantidAPI/WorkspaceFactory.h" +#include "MantidTestHelpers/WorkspaceCreationHelper.h" + +#include <cxxtest/TestSuite.h> + +#include <utility> + +using namespace Mantid; +using namespace MantidQt::CustomInterfaces; + +namespace { // Helpers + +std::vector<GSASIIRefineFitPeaksParameters> +createGSASIIRefineFitPeaksParameters( + const API::MatrixWorkspace_sptr &inputWS, const RunLabel &runLabel, + const GSASRefinementMethod &refinementMethod) { + return {GSASIIRefineFitPeaksParameters( + inputWS, runLabel, refinementMethod, "", std::vector<std::string>({}), "", + "", boost::none, boost::none, boost::none, boost::none, false, false)}; +} + +template <size_t numColumns, size_t numRows> +API::ITableWorkspace_sptr createDummyTable( + const std::array<std::string, numColumns> &columnHeadings, + const std::array<std::array<double, numColumns>, numRows> tableContents) { + auto table = API::WorkspaceFactory::Instance().createTable(); + for (const auto &header : columnHeadings) { + table->addColumn("double", header); + } + for (const auto &row : tableContents) { + API::TableRow newRow = table->appendRow(); + for (const auto value : row) { + newRow << value; + } + } + return table; +} + +// Helper class with some protected methods exposed +class TestEnggDiffGSASFittingModel : public EnggDiffGSASFittingModel { +public: + void addGammaValue(const RunLabel &runLabel, const double gamma); + + void addLatticeParamTable(const RunLabel &runLabel, + const API::ITableWorkspace_sptr &table); + + void addRwpValue(const RunLabel &runLabel, const double rwp); + + void addSigmaValue(const RunLabel &runLabel, const double sigma); + + void doRefinements( + const std::vector<GSASIIRefineFitPeaksParameters> ¶ms) override; +}; + +inline void +TestEnggDiffGSASFittingModel::addGammaValue(const RunLabel &runLabel, + const double gamma) { + addGamma(runLabel, gamma); +} + +inline void TestEnggDiffGSASFittingModel::addLatticeParamTable( + const RunLabel &runLabel, const API::ITableWorkspace_sptr &table) { + addLatticeParams(runLabel, std::move(table)); +} + +inline void TestEnggDiffGSASFittingModel::addRwpValue(const RunLabel &runLabel, + const double rwp) { + addRwp(runLabel, rwp); +} + +inline void +TestEnggDiffGSASFittingModel::addSigmaValue(const RunLabel &runLabel, + const double sigma) { + addSigma(runLabel, sigma); +} + +void TestEnggDiffGSASFittingModel::doRefinements( + const std::vector<GSASIIRefineFitPeaksParameters> ¶ms) { + // Mock method - just create some dummy output and ignore all the parameters + UNUSED_ARG(params); + + const static std::array<std::string, 3> columnHeadings = {{"a", "b", "c"}}; + const static std::array<std::array<double, 3>, 1> targetTableValues = { + {{{1, 2, 3}}}}; + const auto latticeParams = + createDummyTable(columnHeadings, targetTableValues); + + API::AnalysisDataServiceImpl &ADS = API::AnalysisDataService::Instance(); + ADS.add("LATTICEPARAMS", latticeParams); + + API::MatrixWorkspace_sptr ws = + WorkspaceCreationHelper::create2DWorkspaceBinned(4, 4, 0.5); + ADS.add("FITTEDPEAKS", ws); + + processRefinementSuccessful( + nullptr, GSASIIRefineFitPeaksOutputProperties(1, 2, 3, ws, latticeParams, + params[0].runLabel)); +} + +} // Anonymous namespace + +class EnggDiffGSASFittingModelTest : 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 EnggDiffGSASFittingModelTest *createSuite() { + return new EnggDiffGSASFittingModelTest(); + } + static void destroySuite(EnggDiffGSASFittingModelTest *suite) { + delete suite; + } + + EnggDiffGSASFittingModelTest() { API::FrameworkManager::Instance(); } + + void test_validLoadRun() { + const static std::string inputFilename = "ENGINX_277208_focused_bank_2.nxs"; + TestEnggDiffGSASFittingModel model; + + API::MatrixWorkspace_sptr ws; + TS_ASSERT_THROWS_NOTHING(ws = model.loadFocusedRun(inputFilename)); + TS_ASSERT(ws); + } + + void test_invalidLoadRun() { + const static std::string inputFilename = "ENGINX_277209_focused_bank_2.nxs"; + TestEnggDiffGSASFittingModel model; + + API::MatrixWorkspace_sptr ws; + TS_ASSERT_THROWS_ANYTHING(ws = model.loadFocusedRun(inputFilename)); + TS_ASSERT(!ws); + } + + void test_getRwp() { + TestEnggDiffGSASFittingModel model; + + const RunLabel valid("123", 1); + const double rwp = 75.5; + model.addRwpValue(valid, rwp); + + auto retrievedRwp = boost::make_optional<double>(false, double()); + TS_ASSERT_THROWS_NOTHING(retrievedRwp = model.getRwp(valid)); + TS_ASSERT(retrievedRwp); + TS_ASSERT_EQUALS(rwp, *retrievedRwp); + + const RunLabel invalid("456", 2); + TS_ASSERT_THROWS_NOTHING(retrievedRwp = model.getRwp(invalid)); + TS_ASSERT_EQUALS(retrievedRwp, boost::none); + } + + void test_getGamma() { + TestEnggDiffGSASFittingModel model; + + const RunLabel valid("123", 1); + const double gamma = 75.5; + model.addGammaValue(valid, gamma); + + auto retrievedGamma = boost::make_optional<double>(false, double()); + TS_ASSERT_THROWS_NOTHING(retrievedGamma = model.getGamma(valid)); + TS_ASSERT(retrievedGamma); + TS_ASSERT_EQUALS(gamma, *retrievedGamma); + + const RunLabel invalid("456", 2); + TS_ASSERT_THROWS_NOTHING(retrievedGamma = model.getGamma(invalid)); + TS_ASSERT_EQUALS(retrievedGamma, boost::none); + } + + void test_getSigma() { + TestEnggDiffGSASFittingModel model; + + const RunLabel valid("123", 1); + const double sigma = 75.5; + model.addSigmaValue(valid, sigma); + + auto retrievedSigma = boost::make_optional<double>(false, double()); + TS_ASSERT_THROWS_NOTHING(retrievedSigma = model.getSigma(valid)); + TS_ASSERT(retrievedSigma); + TS_ASSERT_EQUALS(sigma, *retrievedSigma); + + const RunLabel invalid("456", 2); + TS_ASSERT_THROWS_NOTHING(retrievedSigma = model.getSigma(invalid)); + TS_ASSERT_EQUALS(retrievedSigma, boost::none); + } + + void test_getLatticeParams() { + const std::array<std::string, 3> columnHeadings = {{"a", "b", "c"}}; + const std::array<std::array<double, 3>, 1> targetTableValues = { + {{{1, 2, 3}}}}; + const auto table = createDummyTable(columnHeadings, targetTableValues); + + TestEnggDiffGSASFittingModel model; + + const RunLabel valid("123", 1); + TS_ASSERT_THROWS_NOTHING(model.addLatticeParamTable(valid, table)); + + // auto retrievedTable = model.getLatticeParams(123, 1); + boost::optional<API::ITableWorkspace_sptr> retrievedTable; + TS_ASSERT_THROWS_NOTHING(retrievedTable = model.getLatticeParams(valid)); + TS_ASSERT(retrievedTable); + + API::TableRow row = (*retrievedTable)->getRow(0); + const double expectedA = 1; + const double expectedB = 2; + const double expectedC = 3; + auto a = expectedA + 1; + auto b = expectedB + 1; + auto c = expectedC + 1; + + TS_ASSERT_THROWS_NOTHING(row >> a >> b >> c); + TS_ASSERT_EQUALS(a, expectedA); + TS_ASSERT_EQUALS(b, expectedB); + TS_ASSERT_EQUALS(c, expectedC); + + const RunLabel invalid("456", 2); + TS_ASSERT_THROWS_NOTHING(retrievedTable = model.getLatticeParams(invalid)); + TS_ASSERT_EQUALS(retrievedTable, boost::none); + } + + void test_pawleyRefinement() { + // Note: due to the reliance on GSAS-II, this cannot test that the algorithm + // is used properly. It tests that, given that the algorithm is used + // properly, results are added to the appropriate maps in the model + TestEnggDiffGSASFittingModel model; + const RunLabel runLabel("123", 1); + + API::MatrixWorkspace_sptr inputWS = + API::WorkspaceFactory::Instance().create("Workspace2D", 1, 10, 10); + + TS_ASSERT_THROWS_NOTHING( + model.doRefinements(createGSASIIRefineFitPeaksParameters( + inputWS, runLabel, GSASRefinementMethod::PAWLEY))); + + const auto rwp = model.getRwp(runLabel); + TS_ASSERT(rwp); + + const auto sigma = model.getSigma(runLabel); + TS_ASSERT(sigma); + + const auto gamma = model.getGamma(runLabel); + TS_ASSERT(gamma); + + const auto latticeParams = model.getLatticeParams(runLabel); + TS_ASSERT(latticeParams); + + API::AnalysisDataService::Instance().clear(); + } + + void test_RietveldRefinement() { + // Note: due to the reliance on GSAS-II, this cannot test that the algorithm + // is used properly. It tests that, given that the algorithm is used + // properly, results are added to the appropriate maps in the model + TestEnggDiffGSASFittingModel model; + const RunLabel runLabel("123", 1); + + API::MatrixWorkspace_sptr inputWS = + API::WorkspaceFactory::Instance().create("Workspace2D", 1, 10, 10); + + TS_ASSERT_THROWS_NOTHING( + model.doRefinements(createGSASIIRefineFitPeaksParameters( + inputWS, runLabel, GSASRefinementMethod::RIETVELD))); + + const auto rwp = model.getRwp(runLabel); + TS_ASSERT(rwp); + + const auto sigma = model.getSigma(runLabel); + TS_ASSERT(sigma); + + const auto gamma = model.getGamma(runLabel); + TS_ASSERT(gamma); + + const auto latticeParams = model.getLatticeParams(runLabel); + TS_ASSERT(latticeParams); + + API::AnalysisDataService::Instance().clear(); + } +}; diff --git a/qt/scientific_interfaces/test/EnggDiffMultiRunFittingWidgetPresenterTest.h b/qt/scientific_interfaces/test/EnggDiffMultiRunFittingWidgetPresenterTest.h new file mode 100644 index 0000000000000000000000000000000000000000..f46a1ee251847b71f520a41cce1f9f1641b142dd --- /dev/null +++ b/qt/scientific_interfaces/test/EnggDiffMultiRunFittingWidgetPresenterTest.h @@ -0,0 +1,393 @@ +// Mantid Repository : https://github.com/mantidproject/mantid +// +// Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, +// NScD Oak Ridge National Laboratory, European Spallation Source +// & Institut Laue - Langevin +// SPDX - License - Identifier: GPL - 3.0 + +#pragma once + +#include "../EnggDiffraction/EnggDiffMultiRunFittingWidgetPresenter.h" +#include "EnggDiffMultiRunFittingWidgetModelMock.h" +#include "EnggDiffMultiRunFittingWidgetViewMock.h" + +#include "MantidAPI/FrameworkManager.h" +#include "MantidAPI/WorkspaceFactory.h" +#include "MantidTestHelpers/WorkspaceCreationHelper.h" + +#include <cxxtest/TestSuite.h> + +using namespace Mantid; + +using namespace MantidQt::CustomInterfaces; +using testing::Return; + +namespace { +API::MatrixWorkspace_sptr createSampleWorkspace() { + return API::WorkspaceFactory::Instance().create("Workspace2D", 1, 1, 1); +} + +void addBankID(const API::MatrixWorkspace_sptr &ws, const size_t bankID) { + auto addLogAlg = + API::FrameworkManager::Instance().createAlgorithm("AddSampleLog"); + addLogAlg->initialize(); + addLogAlg->setProperty("Workspace", ws); + addLogAlg->setPropertyValue("LogName", "bankid"); + addLogAlg->setPropertyValue("LogText", std::to_string(bankID)); + addLogAlg->setPropertyValue("LogType", "Number"); + addLogAlg->execute(); +} +} // namespace + +class EnggDiffMultiRunFittingWidgetPresenterTest : public CxxTest::TestSuite { +public: + void test_addFittedPeaks() { + auto presenter = setUpPresenter(); + const auto ws = createSampleWorkspace(); + + const RunLabel runLabel("123", 1); + EXPECT_CALL(*m_mockModel, addFittedPeaks(runLabel, ws)).Times(1); + + EXPECT_CALL(*m_mockModel, getFocusedRun(runLabel)) + .Times(1) + .WillOnce(Return(ws)); + EXPECT_CALL(*m_mockView, reportPlotInvalidFocusedRun(testing::_)).Times(0); + EXPECT_CALL(*m_mockView, resetCanvas()).Times(1); + EXPECT_CALL(*m_mockView, plotFocusedRun(testing::_)).Times(1); + EXPECT_CALL(*m_mockModel, hasFittedPeaksForRun(runLabel)) + .Times(1) + .WillOnce(Return(true)); + EXPECT_CALL(*m_mockView, showFitResultsSelected()) + .Times(1) + .WillOnce(Return(false)); + EXPECT_CALL(*m_mockModel, getFittedPeaks(testing::_)).Times(0); + + presenter->addFittedPeaks(runLabel, ws); + assertMocksUsedCorrectly(); + } + + void test_addFocusedRun() { + auto presenter = setUpPresenter(); + const API::MatrixWorkspace_sptr ws = createSampleWorkspace(); + addBankID(ws, 2); + const RunLabel runLabel("0", 2); + + const std::vector<RunLabel> workspaceLabels({runLabel}); + EXPECT_CALL(*m_mockModel, getAllWorkspaceLabels()) + .Times(1) + .WillOnce(Return(workspaceLabels)); + + EXPECT_CALL(*m_mockView, updateRunList(workspaceLabels)); + presenter->addFocusedRun(ws); + assertMocksUsedCorrectly(); + } + + void test_loadRunUpdatesView() { + auto presenter = setUpPresenter(); + const API::MatrixWorkspace_sptr ws = createSampleWorkspace(); + addBankID(ws, 2); + + const RunLabel runLabel("0", 2); + const std::vector<RunLabel> workspaceLabels({runLabel}); + ON_CALL(*m_mockModel, getAllWorkspaceLabels()) + .WillByDefault(Return(workspaceLabels)); + EXPECT_CALL(*m_mockView, updateRunList(workspaceLabels)); + + presenter->addFocusedRun(ws); + assertMocksUsedCorrectly(); + } + + void test_getFittedPeaks() { + auto presenter = setUpPresenter(); + + const RunLabel runLabel("123", 1); + EXPECT_CALL(*m_mockModel, getFittedPeaks(runLabel)) + .Times(1) + .WillOnce(Return(boost::none)); + + presenter->getFittedPeaks(runLabel); + assertMocksUsedCorrectly(); + } + + void test_getFocusedRun() { + auto presenter = setUpPresenter(); + + const RunLabel runLabel("123", 1); + EXPECT_CALL(*m_mockModel, getFocusedRun(runLabel)) + .Times(1) + .WillOnce(Return(boost::none)); + + presenter->getFocusedRun(runLabel); + assertMocksUsedCorrectly(); + } + + void test_selectValidRunWithoutFittedPeaks() { + auto presenter = setUpPresenter(); + + const RunLabel runLabel("123", 1); + EXPECT_CALL(*m_mockView, getSelectedRunLabel()) + .Times(1) + .WillOnce(Return(runLabel)); + + EXPECT_CALL(*m_mockModel, getFocusedRun(runLabel)) + .Times(1) + .WillOnce(Return(createSampleWorkspace())); + + EXPECT_CALL(*m_mockView, reportPlotInvalidFocusedRun(testing::_)).Times(0); + EXPECT_CALL(*m_mockView, resetCanvas()).Times(1); + EXPECT_CALL(*m_mockView, plotFocusedRun(testing::_)).Times(1); + + ON_CALL(*m_mockModel, hasFittedPeaksForRun(runLabel)) + .WillByDefault(Return(false)); + EXPECT_CALL(*m_mockView, plotFittedPeaks(testing::_)).Times(0); + + presenter->notify( + IEnggDiffMultiRunFittingWidgetPresenter::Notification::SelectRun); + assertMocksUsedCorrectly(); + } + + void test_selectRunInvalid() { + auto presenter = setUpPresenter(); + + const RunLabel runLabel("123", 1); + EXPECT_CALL(*m_mockView, getSelectedRunLabel()) + .Times(1) + .WillOnce(Return(runLabel)); + EXPECT_CALL(*m_mockModel, getFocusedRun(runLabel)) + .Times(1) + .WillOnce(Return(boost::none)); + EXPECT_CALL(*m_mockView, reportPlotInvalidFocusedRun(runLabel)).Times(1); + EXPECT_CALL(*m_mockView, resetCanvas()).Times(0); + + presenter->notify( + IEnggDiffMultiRunFittingWidgetPresenter::Notification::SelectRun); + assertMocksUsedCorrectly(); + } + + void test_selectValidRunWithFittedPeaks() { + auto presenter = setUpPresenter(); + + const RunLabel runLabel("123", 1); + ON_CALL(*m_mockView, getSelectedRunLabel()).WillByDefault(Return(runLabel)); + + const auto sampleWorkspace = createSampleWorkspace(); + ON_CALL(*m_mockModel, getFocusedRun(runLabel)) + .WillByDefault(Return(sampleWorkspace)); + + ON_CALL(*m_mockModel, hasFittedPeaksForRun(runLabel)) + .WillByDefault(Return(true)); + ON_CALL(*m_mockView, showFitResultsSelected()).WillByDefault(Return(true)); + EXPECT_CALL(*m_mockModel, getFittedPeaks(runLabel)) + .Times(1) + .WillOnce(Return(sampleWorkspace)); + EXPECT_CALL(*m_mockView, reportPlotInvalidFittedPeaks(testing::_)).Times(0); + EXPECT_CALL(*m_mockView, plotFittedPeaks(testing::_)).Times(1); + + presenter->notify( + IEnggDiffMultiRunFittingWidgetPresenter::Notification::SelectRun); + assertMocksUsedCorrectly(); + } + + void test_selectRunDoesNothingWhenNoRunSelected() { + auto presenter = setUpPresenter(); + + EXPECT_CALL(*m_mockView, getSelectedRunLabel()) + .Times(1) + .WillOnce(Return(boost::none)); + presenter->notify( + IEnggDiffMultiRunFittingWidgetPresenter::Notification::SelectRun); + assertMocksUsedCorrectly(); + } + + void test_plotPeaksStateChangedUpdatesPlot() { + auto presenter = setUpPresenter(); + + const RunLabel runLabel("123", 1); + EXPECT_CALL(*m_mockView, getSelectedRunLabel()) + .Times(1) + .WillOnce(Return(runLabel)); + + const boost::optional<Mantid::API::MatrixWorkspace_sptr> sampleWorkspace( + WorkspaceCreationHelper::create2DWorkspaceBinned(1, 100)); + EXPECT_CALL(*m_mockModel, getFocusedRun(runLabel)) + .Times(1) + .WillOnce(Return(sampleWorkspace)); + + EXPECT_CALL(*m_mockView, resetCanvas()).Times(1); + EXPECT_CALL(*m_mockView, plotFocusedRun(testing::_)).Times(1); + + EXPECT_CALL(*m_mockModel, hasFittedPeaksForRun(runLabel)) + .Times(1) + .WillOnce(Return(false)); + + presenter->notify(IEnggDiffMultiRunFittingWidgetPresenter::Notification:: + PlotPeaksStateChanged); + assertMocksUsedCorrectly(); + } + + void test_plotPeaksStateChangedDoesNotCrashWhenNoRunSelected() { + auto presenter = setUpPresenter(); + + EXPECT_CALL(*m_mockView, getSelectedRunLabel()) + .Times(1) + .WillOnce(Return(boost::none)); + EXPECT_CALL(*m_mockModel, getFocusedRun(testing::_)).Times(0); + + presenter->notify(IEnggDiffMultiRunFittingWidgetPresenter::Notification:: + PlotPeaksStateChanged); + assertMocksUsedCorrectly(); + } + + void test_removeRun() { + auto presenter = setUpPresenter(); + + const RunLabel runLabel("123", 1); + EXPECT_CALL(*m_mockView, getSelectedRunLabel()) + .Times(1) + .WillOnce(Return(runLabel)); + EXPECT_CALL(*m_mockModel, removeRun(runLabel)); + + const std::vector<RunLabel> runLabels({runLabel}); + EXPECT_CALL(*m_mockModel, getAllWorkspaceLabels()) + .Times(1) + .WillOnce(Return(runLabels)); + EXPECT_CALL(*m_mockView, updateRunList(runLabels)); + EXPECT_CALL(*m_mockView, resetCanvas()); + + presenter->notify( + IEnggDiffMultiRunFittingWidgetPresenter::Notification::RemoveRun); + assertMocksUsedCorrectly(); + } + + void test_removeRunDoesNothingWhenNoRunSelected() { + auto presenter = setUpPresenter(); + EXPECT_CALL(*m_mockView, getSelectedRunLabel()) + .Times(1) + .WillOnce(Return(boost::none)); + EXPECT_CALL(*m_mockModel, removeRun(testing::_)).Times(0); + presenter->notify( + IEnggDiffMultiRunFittingWidgetPresenter::Notification::RemoveRun); + assertMocksUsedCorrectly(); + } + + void test_plotToSeparateWindowDoesNothingWhenNoRunSelected() { + auto presenter = setUpPresenter(); + + EXPECT_CALL(*m_mockView, getSelectedRunLabel()) + .Times(1) + .WillOnce(Return(boost::none)); + EXPECT_CALL(*m_mockView, reportNoRunSelectedForPlot()).Times(1); + + presenter->notify(IEnggDiffMultiRunFittingWidgetPresenter::Notification:: + PlotToSeparateWindow); + assertMocksUsedCorrectly(); + } + + void test_plotToSeparateWindowValidFocusedRunNoFittedPeaks() { + auto presenter = setUpPresenter(); + const RunLabel runLabel("123", 1); + + EXPECT_CALL(*m_mockView, getSelectedRunLabel()) + .Times(1) + .WillOnce(Return(runLabel)); + + const boost::optional<Mantid::API::MatrixWorkspace_sptr> sampleWorkspace( + WorkspaceCreationHelper::create2DWorkspaceBinned(1, 100)); + + EXPECT_CALL(*m_mockModel, getFocusedRun(runLabel)) + .Times(1) + .WillOnce(Return(sampleWorkspace)); + + EXPECT_CALL(*m_mockView, reportNoRunSelectedForPlot()).Times(0); + EXPECT_CALL(*m_mockView, reportPlotInvalidFocusedRun(testing::_)).Times(0); + + EXPECT_CALL(*m_mockView, showFitResultsSelected()) + .Times(1) + .WillOnce(Return(true)); + EXPECT_CALL(*m_mockModel, hasFittedPeaksForRun(runLabel)) + .Times(1) + .WillOnce(Return(false)); + + EXPECT_CALL(*m_mockView, plotToSeparateWindow( + "123_1_external_plot", + boost::make_optional(false, std::string()))) + .Times(1); + + presenter->notify(IEnggDiffMultiRunFittingWidgetPresenter::Notification:: + PlotToSeparateWindow); + assertMocksUsedCorrectly(); + } + + void test_plotToSeparateWindowWithFittedPeaks() { + auto presenter = setUpPresenter(); + const RunLabel runLabel("123", 1); + + EXPECT_CALL(*m_mockView, getSelectedRunLabel()) + .Times(1) + .WillOnce(Return(runLabel)); + + const boost::optional<Mantid::API::MatrixWorkspace_sptr> sampleWorkspace( + WorkspaceCreationHelper::create2DWorkspaceBinned(1, 100)); + + EXPECT_CALL(*m_mockModel, getFocusedRun(runLabel)) + .Times(1) + .WillOnce(Return(sampleWorkspace)); + + EXPECT_CALL(*m_mockView, showFitResultsSelected()) + .Times(1) + .WillOnce(Return(true)); + EXPECT_CALL(*m_mockModel, hasFittedPeaksForRun(runLabel)) + .Times(1) + .WillOnce(Return(true)); + + const boost::optional<Mantid::API::MatrixWorkspace_sptr> sampleFittedPeaks( + WorkspaceCreationHelper::create2DWorkspaceBinned(1, 100)); + EXPECT_CALL(*m_mockModel, getFittedPeaks(runLabel)) + .Times(1) + .WillOnce(Return(sampleFittedPeaks)); + EXPECT_CALL(*m_mockView, reportPlotInvalidFittedPeaks(testing::_)).Times(0); + + EXPECT_CALL(*m_mockView, + plotToSeparateWindow("123_1_external_plot", + boost::optional<std::string>( + "123_1_fitted_peaks_external_plot"))) + .Times(1); + + presenter->notify(IEnggDiffMultiRunFittingWidgetPresenter::Notification:: + PlotToSeparateWindow); + assertMocksUsedCorrectly(); + } + + void test_getAllRunLabelsDelegatesToView() { + auto presenter = setUpPresenter(); + EXPECT_CALL(*m_mockView, getAllRunLabels()); + presenter->getAllRunLabels(); + assertMocksUsedCorrectly(); + } + +private: + MockEnggDiffMultiRunFittingWidgetModel *m_mockModel; + MockEnggDiffMultiRunFittingWidgetView *m_mockView; + + std::unique_ptr<EnggDiffMultiRunFittingWidgetPresenter> setUpPresenter() { + auto mockModel_uptr = std::make_unique< + testing::NiceMock<MockEnggDiffMultiRunFittingWidgetModel>>(); + m_mockModel = mockModel_uptr.get(); + + m_mockView = new testing::NiceMock<MockEnggDiffMultiRunFittingWidgetView>(); + + return std::make_unique<EnggDiffMultiRunFittingWidgetPresenter>( + std::move(mockModel_uptr), m_mockView); + } + + void assertMocksUsedCorrectly() { + TSM_ASSERT("View mock not used as expected: some EXPECT_CALL conditions " + "not satisfied", + testing::Mock::VerifyAndClearExpectations(m_mockModel)); + TSM_ASSERT("Model mock not used as expected: some EXPECT_CALL conditions " + "not satisfied", + testing::Mock::VerifyAndClearExpectations(m_mockView)); + if (m_mockView) { + delete m_mockView; + } + } +}; diff --git a/qt/scientific_interfaces/test/EnggVanadiumCorrectionsModelTest.h b/qt/scientific_interfaces/test/EnggVanadiumCorrectionsModelTest.h new file mode 100644 index 0000000000000000000000000000000000000000..c3c5309a19015ca67f4ca1ddfef958651a85a6ec --- /dev/null +++ b/qt/scientific_interfaces/test/EnggVanadiumCorrectionsModelTest.h @@ -0,0 +1,206 @@ +// Mantid Repository : https://github.com/mantidproject/mantid +// +// Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, +// NScD Oak Ridge National Laboratory, European Spallation Source +// & Institut Laue - Langevin +// SPDX - License - Identifier: GPL - 3.0 + +#pragma once + +#include "../EnggDiffraction/EnggVanadiumCorrectionsModel.h" + +#include "MantidAPI/AlgorithmManager.h" +#include "MantidAPI/FrameworkManager.h" +#include "MantidAPI/TableRow.h" +#include "MantidAPI/WorkspaceFactory.h" +#include "MantidTestHelpers/WorkspaceCreationHelper.h" + +#include <Poco/File.h> +#include <Poco/Path.h> + +#include <cxxtest/TestSuite.h> + +using namespace MantidQt::CustomInterfaces; + +namespace { + +Mantid::API::MatrixWorkspace_sptr createSampleMatrixWorkspace() { + return WorkspaceCreationHelper::create2DWorkspaceBinned(1, 1, 2); +} + +Mantid::API::ITableWorkspace_sptr createSampleTableWorkspace() { + auto table = Mantid::API::WorkspaceFactory::Instance().createTable(); + table->addColumn("double", "x"); + Mantid::API::TableRow newRow = table->appendRow(); + newRow << 1.0; + return table; +} + +/// Helper class to allow us to fake EnggVanadiumCorrections +class TestEnggVanadiumCorrectionsModel : public EnggVanadiumCorrectionsModel { +public: + TestEnggVanadiumCorrectionsModel(const EnggDiffCalibSettings &calibSettings, + const std::string ¤tInstrument); + + mutable bool m_calculateCorrectionsCalled; + +private: + std::pair<Mantid::API::ITableWorkspace_sptr, + Mantid::API::MatrixWorkspace_sptr> + calculateCorrectionWorkspaces( + const std::string &vanadiumRunNumber) const override; +}; + +inline TestEnggVanadiumCorrectionsModel::TestEnggVanadiumCorrectionsModel( + const EnggDiffCalibSettings &calibSettings, + const std::string ¤tInstrument) + : EnggVanadiumCorrectionsModel(calibSettings, currentInstrument), + m_calculateCorrectionsCalled(false) {} + +inline std::pair<Mantid::API::ITableWorkspace_sptr, + Mantid::API::MatrixWorkspace_sptr> +TestEnggVanadiumCorrectionsModel::calculateCorrectionWorkspaces( + const std::string &) const { + m_calculateCorrectionsCalled = true; + + auto &ADS = Mantid::API::AnalysisDataService::Instance(); + + Mantid::API::MatrixWorkspace_sptr curvesWS = createSampleMatrixWorkspace(); + ADS.addOrReplace(CURVES_WORKSPACE_NAME, curvesWS); + + auto integratedWS = createSampleTableWorkspace(); + ADS.addOrReplace(INTEGRATED_WORKSPACE_NAME, integratedWS); + + return std::make_pair(integratedWS, curvesWS); +} + +} // anonymous namespace + +class EnggVanadiumCorrectionsModelTest : public CxxTest::TestSuite { + +public: + static EnggVanadiumCorrectionsModelTest *createSuite() { + return new EnggVanadiumCorrectionsModelTest(); + } + + static void destroySuite(EnggVanadiumCorrectionsModelTest *suite) { + delete suite; + } + + EnggVanadiumCorrectionsModelTest() { + Poco::Path tempDir(Poco::Path::temp()); + tempDir.append(INPUT_DIR_NAME); + m_inputDir = tempDir; + Mantid::API::FrameworkManager::Instance(); + } + + void setUp() override { m_inputDir.createDirectory(); } + + void tearDown() override { m_inputDir.remove(true); } + + void test_generateNewWorkspacesWhenNoCache() { + // We've created the calib directory but not populated it with any + // workspaces, so we should get our fake ones + EnggDiffCalibSettings calibSettings; + calibSettings.m_inputDirCalib = m_inputDir.path(); + calibSettings.m_forceRecalcOverwrite = false; + + if (m_inputDir.exists()) { + // Make sure that m_inputDir doesn't exist, as if a previous test exited + // abnormally tearDown() may not have been called + m_inputDir.remove(true); + } + + TestEnggVanadiumCorrectionsModel model(calibSettings, CURRENT_INSTRUMENT); + std::pair<Mantid::API::ITableWorkspace_sptr, + Mantid::API::MatrixWorkspace_sptr> + correctionWorkspaces; + TS_ASSERT_THROWS_NOTHING(correctionWorkspaces = + model.fetchCorrectionWorkspaces("123")); + TS_ASSERT(model.m_calculateCorrectionsCalled); + TS_ASSERT(correctionWorkspaces.first); + TS_ASSERT(correctionWorkspaces.second); + + Poco::Path curvesWSPath(m_inputDir.path()); + curvesWSPath.append("123_precalculated_vanadium_run_bank_curves.nxs"); + TS_ASSERT(Poco::File(curvesWSPath).exists()); + + Poco::Path integWSPath(m_inputDir.path()); + integWSPath.append("123_precalculated_vanadium_run_integration.nxs"); + TS_ASSERT(Poco::File(integWSPath).exists()); + } + + void test_cacheUsedWhenAvailable() { + const auto curvesWS = createSampleMatrixWorkspace(); + const auto integratedWS = createSampleTableWorkspace(); + writeOutSampleCorrectionWorkspaces(integratedWS, curvesWS); + + EnggDiffCalibSettings calibSettings; + calibSettings.m_inputDirCalib = m_inputDir.path(); + calibSettings.m_forceRecalcOverwrite = false; + TestEnggVanadiumCorrectionsModel model(calibSettings, CURRENT_INSTRUMENT); + + std::pair<Mantid::API::ITableWorkspace_sptr, + Mantid::API::MatrixWorkspace_sptr> + correctionWorkspaces; + TS_ASSERT_THROWS_NOTHING(correctionWorkspaces = + model.fetchCorrectionWorkspaces("123")); + TS_ASSERT(!model.m_calculateCorrectionsCalled); + + TS_ASSERT_EQUALS(curvesWS->y(0), correctionWorkspaces.second->y(0)); + + Mantid::API::TableRow sampleDataRow = integratedWS->getRow(0); + Mantid::API::TableRow readDataRow = correctionWorkspaces.first->getRow(0); + TS_ASSERT_EQUALS(sampleDataRow.Double(0), readDataRow.Double(0)); + } + + void test_recalculateIfRequired() { + const auto curvesWS = createSampleMatrixWorkspace(); + const auto integratedWS = createSampleTableWorkspace(); + writeOutSampleCorrectionWorkspaces(integratedWS, curvesWS); + + EnggDiffCalibSettings calibSettings; + calibSettings.m_inputDirCalib = m_inputDir.path(); + calibSettings.m_forceRecalcOverwrite = true; + TestEnggVanadiumCorrectionsModel model(calibSettings, CURRENT_INSTRUMENT); + + std::pair<Mantid::API::ITableWorkspace_sptr, + Mantid::API::MatrixWorkspace_sptr> + correctionWorkspaces; + TS_ASSERT_THROWS_NOTHING(correctionWorkspaces = + model.fetchCorrectionWorkspaces("123")); + TS_ASSERT(model.m_calculateCorrectionsCalled); + } + +private: + const static std::string CURRENT_INSTRUMENT; + const static std::string INPUT_DIR_NAME; + + Poco::File m_inputDir; + + void saveNexus(const std::string &filename, + const Mantid::API::Workspace_sptr &workspace) const { + auto save = Mantid::API::AlgorithmManager::Instance().create("SaveNexus"); + save->initialize(); + save->setProperty("InputWorkspace", workspace); + save->setProperty("Filename", filename); + save->execute(); + } + + void writeOutSampleCorrectionWorkspaces( + const Mantid::API::ITableWorkspace_sptr &integratedWS, + const Mantid::API::MatrixWorkspace_sptr &curvesWS) { + Poco::Path curvesWSPath(m_inputDir.path()); + curvesWSPath.append("123_precalculated_vanadium_run_bank_curves.nxs"); + saveNexus(curvesWSPath.toString(), curvesWS); + + Poco::Path integWSPath(m_inputDir.path()); + integWSPath.append("123_precalculated_vanadium_run_integration.nxs"); + saveNexus(integWSPath.toString(), integratedWS); + } +}; + +const std::string EnggVanadiumCorrectionsModelTest::CURRENT_INSTRUMENT = + "TESTINST"; + +const std::string EnggVanadiumCorrectionsModelTest::INPUT_DIR_NAME( + "EnggVanadiumCorrectionsModelTestData"); diff --git a/qt/scientific_interfaces/test/IO_MuonGroupingTest.h b/qt/scientific_interfaces/test/IO_MuonGroupingTest.h index 9b4808965f3f12dd7e5cb090d7dcebd69e776943..d9509084501a1ad78077749d24ea3243644ba132 100644 --- a/qt/scientific_interfaces/test/IO_MuonGroupingTest.h +++ b/qt/scientific_interfaces/test/IO_MuonGroupingTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/test/ISISReflectometry/Batch/BatchJobRunnerProcessingTest.h b/qt/scientific_interfaces/test/ISISReflectometry/Batch/BatchJobRunnerProcessingTest.h index 41ef9b371c671f8edd3fa8b88e5dca5abcf2de48..94ce31a4d1aae51b158079801d3cc48fe441787e 100644 --- a/qt/scientific_interfaces/test/ISISReflectometry/Batch/BatchJobRunnerProcessingTest.h +++ b/qt/scientific_interfaces/test/ISISReflectometry/Batch/BatchJobRunnerProcessingTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/test/ISISReflectometry/Batch/BatchJobRunnerProgressBarTest.h b/qt/scientific_interfaces/test/ISISReflectometry/Batch/BatchJobRunnerProgressBarTest.h index e84184b989ae463c55a78c7b4e843a076ddf8a2f..0d77c37a4ebf4cb7a5809551707d6ae1293a1907 100644 --- a/qt/scientific_interfaces/test/ISISReflectometry/Batch/BatchJobRunnerProgressBarTest.h +++ b/qt/scientific_interfaces/test/ISISReflectometry/Batch/BatchJobRunnerProgressBarTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/test/ISISReflectometry/Batch/BatchJobRunnerTest.h b/qt/scientific_interfaces/test/ISISReflectometry/Batch/BatchJobRunnerTest.h index 3e44687a01c4651a6bf81ea76472b05a4067bb3d..c9645c93458f03413b7ad5d0ceb8c0c2a2180701 100644 --- a/qt/scientific_interfaces/test/ISISReflectometry/Batch/BatchJobRunnerTest.h +++ b/qt/scientific_interfaces/test/ISISReflectometry/Batch/BatchJobRunnerTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/test/ISISReflectometry/Batch/BatchJobRunnerWorkspacesTest.h b/qt/scientific_interfaces/test/ISISReflectometry/Batch/BatchJobRunnerWorkspacesTest.h index 77608c3303846aa405f41230a94b3b3ae576434e..fdb149b913c949ee9561bf3d4db38e847cc62b28 100644 --- a/qt/scientific_interfaces/test/ISISReflectometry/Batch/BatchJobRunnerWorkspacesTest.h +++ b/qt/scientific_interfaces/test/ISISReflectometry/Batch/BatchJobRunnerWorkspacesTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/test/ISISReflectometry/Batch/BatchPresenterTest.h b/qt/scientific_interfaces/test/ISISReflectometry/Batch/BatchPresenterTest.h index a30148fd498aa4f43f8e3e92b3e45ad6d69ae25d..d8792ad9115794464ccbdea0aac245e94d2b0b89 100644 --- a/qt/scientific_interfaces/test/ISISReflectometry/Batch/BatchPresenterTest.h +++ b/qt/scientific_interfaces/test/ISISReflectometry/Batch/BatchPresenterTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/test/ISISReflectometry/Batch/GroupProcessingAlgorithmTest.h b/qt/scientific_interfaces/test/ISISReflectometry/Batch/GroupProcessingAlgorithmTest.h index 6bd5ad60863d6cd32a57cba9ec465c7683c203f1..95077a7bf446636fe9f5a8421fabd3862a6d6b81 100644 --- a/qt/scientific_interfaces/test/ISISReflectometry/Batch/GroupProcessingAlgorithmTest.h +++ b/qt/scientific_interfaces/test/ISISReflectometry/Batch/GroupProcessingAlgorithmTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "../../../ISISReflectometry/GUI/Batch/GroupProcessingAlgorithm.h" diff --git a/qt/scientific_interfaces/test/ISISReflectometry/Batch/MockBatchView.h b/qt/scientific_interfaces/test/ISISReflectometry/Batch/MockBatchView.h index 226918ba626f7775a1c24f85681dad3d1692eb9c..86a2677d3e8b026f87b398a01f43ea966e4c9d8b 100644 --- a/qt/scientific_interfaces/test/ISISReflectometry/Batch/MockBatchView.h +++ b/qt/scientific_interfaces/test/ISISReflectometry/Batch/MockBatchView.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "../../../ISISReflectometry/GUI/Batch/IBatchView.h" #include "MantidKernel/WarningSuppressions.h" diff --git a/qt/scientific_interfaces/test/ISISReflectometry/Batch/RowProcessingAlgorithmTest.h b/qt/scientific_interfaces/test/ISISReflectometry/Batch/RowProcessingAlgorithmTest.h index 5012b314ba15f4d4b9e40eb1178481dc90a98173..ebc42bd3d4060e4c748a2e10faff5a4521ed934c 100644 --- a/qt/scientific_interfaces/test/ISISReflectometry/Batch/RowProcessingAlgorithmTest.h +++ b/qt/scientific_interfaces/test/ISISReflectometry/Batch/RowProcessingAlgorithmTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "../../../ISISReflectometry/GUI/Batch/RowProcessingAlgorithm.h" diff --git a/qt/scientific_interfaces/test/ISISReflectometry/Common/CatalogRunNotifierTest.h b/qt/scientific_interfaces/test/ISISReflectometry/Common/CatalogRunNotifierTest.h index bc5eeffcac19cc9a865b656e14831ef202377695..440828ca67e4382b7a0f8b402d2b7c6c44059b31 100644 --- a/qt/scientific_interfaces/test/ISISReflectometry/Common/CatalogRunNotifierTest.h +++ b/qt/scientific_interfaces/test/ISISReflectometry/Common/CatalogRunNotifierTest.h @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #include "../../../ISISReflectometry/GUI/Runs/CatalogRunNotifier.h" #include "../ReflMockObjects.h" #include "../Runs/MockRunsView.h" diff --git a/qt/scientific_interfaces/test/ISISReflectometry/Common/ClipboardTest.h b/qt/scientific_interfaces/test/ISISReflectometry/Common/ClipboardTest.h index c83b8f7cb07b0f24fa1d1fca8e67ee0c07655ca1..118cb9c2fd4af07494b334ecfd5132b5431bd766 100644 --- a/qt/scientific_interfaces/test/ISISReflectometry/Common/ClipboardTest.h +++ b/qt/scientific_interfaces/test/ISISReflectometry/Common/ClipboardTest.h @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #include "../../../ISISReflectometry/Common/Clipboard.h" #include "../../../ISISReflectometry/TestHelpers/ModelCreationHelper.h" diff --git a/qt/scientific_interfaces/test/ISISReflectometry/Common/CoderCommonTester.h b/qt/scientific_interfaces/test/ISISReflectometry/Common/CoderCommonTester.h index 3df66fb34014e60fb24229aba17bba8c03f0a814..93ef2330d0f6e39a8bb935ccdced8fd3956bee2e 100644 --- a/qt/scientific_interfaces/test/ISISReflectometry/Common/CoderCommonTester.h +++ b/qt/scientific_interfaces/test/ISISReflectometry/Common/CoderCommonTester.h @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #pragma once #include "../../../ISISReflectometry/GUI/Batch/BatchPresenter.h" diff --git a/qt/scientific_interfaces/test/ISISReflectometry/Common/DecoderTest.h b/qt/scientific_interfaces/test/ISISReflectometry/Common/DecoderTest.h index c3af9a639131137fa7c3145913907bc0f581c550..00e15f9287a1be7d5cb133b421701b3bf2586dde 100644 --- a/qt/scientific_interfaces/test/ISISReflectometry/Common/DecoderTest.h +++ b/qt/scientific_interfaces/test/ISISReflectometry/Common/DecoderTest.h @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #pragma once #include "../../../ISISReflectometry/GUI/Common/Decoder.h" diff --git a/qt/scientific_interfaces/test/ISISReflectometry/Common/EncoderTest.h b/qt/scientific_interfaces/test/ISISReflectometry/Common/EncoderTest.h index 13d9c6bc68a60494f1293fd846b2005f2b64fbb5..b625314be1f5151f35e1e13e5de3e0ce9e942ee9 100644 --- a/qt/scientific_interfaces/test/ISISReflectometry/Common/EncoderTest.h +++ b/qt/scientific_interfaces/test/ISISReflectometry/Common/EncoderTest.h @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #pragma once #include "../../../ISISReflectometry/GUI/Common/Encoder.h" diff --git a/qt/scientific_interfaces/test/ISISReflectometry/Common/PlotterTestQt4.h b/qt/scientific_interfaces/test/ISISReflectometry/Common/PlotterTestQt4.h index 9f0a3e345c6a5064210b4822c01e28fa2376b224..d794ae60df0ae9476e5c4f59167c51163876748d 100644 --- a/qt/scientific_interfaces/test/ISISReflectometry/Common/PlotterTestQt4.h +++ b/qt/scientific_interfaces/test/ISISReflectometry/Common/PlotterTestQt4.h @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #include "../../../ISISReflectometry/GUI/Common/Plotter.h" #include "../ReflMockObjects.h" #include <cxxtest/TestSuite.h> diff --git a/qt/scientific_interfaces/test/ISISReflectometry/Common/PlotterTestQt5.h b/qt/scientific_interfaces/test/ISISReflectometry/Common/PlotterTestQt5.h index 2824e2a01d783596901807b47a68a22aa96709ae..99aad7a481dea51ce9b22a88b3baccbcdd5813d0 100644 --- a/qt/scientific_interfaces/test/ISISReflectometry/Common/PlotterTestQt5.h +++ b/qt/scientific_interfaces/test/ISISReflectometry/Common/PlotterTestQt5.h @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #include "../../../ISISReflectometry/GUI/Common/Plotter.h" #include "MantidAPI/AlgorithmManager.h" #include "MantidAPI/FrameworkManager.h" diff --git a/qt/scientific_interfaces/test/ISISReflectometry/Event/EventPresenterTest.h b/qt/scientific_interfaces/test/ISISReflectometry/Event/EventPresenterTest.h index 32825e3a01c4411867643a03f15626d14a645c22..f3dfb40c1da046aa6fc10f8aee48ed91225203cb 100644 --- a/qt/scientific_interfaces/test/ISISReflectometry/Event/EventPresenterTest.h +++ b/qt/scientific_interfaces/test/ISISReflectometry/Event/EventPresenterTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/test/ISISReflectometry/Event/MockEventView.h b/qt/scientific_interfaces/test/ISISReflectometry/Event/MockEventView.h index f1bbae81e94289aeb864c2182f269ff4f9fbf4c4..bf63dd7d91942bdede509b6ff435185a9e0efabd 100644 --- a/qt/scientific_interfaces/test/ISISReflectometry/Event/MockEventView.h +++ b/qt/scientific_interfaces/test/ISISReflectometry/Event/MockEventView.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "../../../ISISReflectometry/GUI/Event/IEventView.h" #include "MantidKernel/WarningSuppressions.h" diff --git a/qt/scientific_interfaces/test/ISISReflectometry/Experiment/ExperimentOptionDefaultsTest.h b/qt/scientific_interfaces/test/ISISReflectometry/Experiment/ExperimentOptionDefaultsTest.h index beed4766addd8fa8ca7ea20e0c6dce947d7c2182..48eaa9b9e649ffbaa61a5e3af9a15eb4c95ed522 100644 --- a/qt/scientific_interfaces/test/ISISReflectometry/Experiment/ExperimentOptionDefaultsTest.h +++ b/qt/scientific_interfaces/test/ISISReflectometry/Experiment/ExperimentOptionDefaultsTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/test/ISISReflectometry/Experiment/ExperimentPresenterTest.h b/qt/scientific_interfaces/test/ISISReflectometry/Experiment/ExperimentPresenterTest.h index b46a44aceff78f14be0e11b1be4ea0a97f56cfb0..15bc9f560a104312935950d273a25b9b5d80c6a2 100644 --- a/qt/scientific_interfaces/test/ISISReflectometry/Experiment/ExperimentPresenterTest.h +++ b/qt/scientific_interfaces/test/ISISReflectometry/Experiment/ExperimentPresenterTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -903,7 +903,8 @@ private: } void runTestForInvalidPerAngleOptions(OptionsTable const &optionsTable, - std::vector<int> rows, int column) { + const std::vector<int> &rows, + int column) { auto presenter = makePresenter(); EXPECT_CALL(m_view, getPerAngleOptions()).WillOnce(Return(optionsTable)); for (auto row : rows) diff --git a/qt/scientific_interfaces/test/ISISReflectometry/Experiment/MockExperimentOptionDefaults.h b/qt/scientific_interfaces/test/ISISReflectometry/Experiment/MockExperimentOptionDefaults.h index edfd16dd102bc143ec93e6a3e53a69dcb644cbb9..29dbe0edc67f4135edc4429e5c1f1e6e613d5864 100644 --- a/qt/scientific_interfaces/test/ISISReflectometry/Experiment/MockExperimentOptionDefaults.h +++ b/qt/scientific_interfaces/test/ISISReflectometry/Experiment/MockExperimentOptionDefaults.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "../../../ISISReflectometry/GUI/Experiment/ExperimentOptionDefaults.h" #include "MantidKernel/WarningSuppressions.h" diff --git a/qt/scientific_interfaces/test/ISISReflectometry/Experiment/MockExperimentView.h b/qt/scientific_interfaces/test/ISISReflectometry/Experiment/MockExperimentView.h index 006928aa290741f8966b595839437a0c53309303..c2405ca043b4831fe603e1688cb227c180693465 100644 --- a/qt/scientific_interfaces/test/ISISReflectometry/Experiment/MockExperimentView.h +++ b/qt/scientific_interfaces/test/ISISReflectometry/Experiment/MockExperimentView.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "../../../ISISReflectometry/GUI/Experiment/IExperimentView.h" #include "MantidKernel/WarningSuppressions.h" diff --git a/qt/scientific_interfaces/test/ISISReflectometry/Experiment/PerThetaDefaultsTableValidatorTest.h b/qt/scientific_interfaces/test/ISISReflectometry/Experiment/PerThetaDefaultsTableValidatorTest.h index d57701eb16bda7ce2e9c0e81357cc1d2e1d5c3e7..cfd1f346c4bea414397b07dd501c0f4f067957f3 100644 --- a/qt/scientific_interfaces/test/ISISReflectometry/Experiment/PerThetaDefaultsTableValidatorTest.h +++ b/qt/scientific_interfaces/test/ISISReflectometry/Experiment/PerThetaDefaultsTableValidatorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "../../../ISISReflectometry/GUI/Experiment/PerThetaDefaultsTableValidator.h" @@ -173,22 +173,23 @@ private: Table emptyTable() { return Table(); } Cells emptyRow() { return Cells(); } - std::vector<InvalidDefaultsError> expectedErrors(std::vector<int> rows, - std::vector<int> columns) { + std::vector<InvalidDefaultsError> + expectedErrors(const std::vector<int> &rows, + const std::vector<int> &columns) { std::vector<InvalidDefaultsError> errors; for (auto row : rows) errors.emplace_back(InvalidDefaultsError(row, columns)); return errors; } - std::vector<PerThetaDefaults> runTestValid(Table table) { + std::vector<PerThetaDefaults> runTestValid(const Table &table) { PerThetaDefaultsTableValidator validator; auto result = validator(table, TOLERANCE); TS_ASSERT(result.isValid()); return result.assertValid(); } - void runTestInvalidThetas(Table table, + void runTestInvalidThetas(const Table &table, ThetaValuesValidationError thetaValuesError, std::vector<InvalidDefaultsError> expectedErrors) { PerThetaDefaultsTableValidator validator; @@ -200,7 +201,7 @@ private: TS_ASSERT_EQUALS(validationError.errors(), expectedErrors); } - void runTestInvalidCells(Table table, + void runTestInvalidCells(const Table &table, std::vector<InvalidDefaultsError> expectedErrors) { PerThetaDefaultsTableValidator validator; auto result = validator(table, TOLERANCE); diff --git a/qt/scientific_interfaces/test/ISISReflectometry/Instrument/InstrumentOptionDefaultsTest.h b/qt/scientific_interfaces/test/ISISReflectometry/Instrument/InstrumentOptionDefaultsTest.h index dc959259b8cfd3e3a7466fb38978c4645f53b285..83739c6e1d89a08c0d0e95f0d122c46af9416771 100644 --- a/qt/scientific_interfaces/test/ISISReflectometry/Instrument/InstrumentOptionDefaultsTest.h +++ b/qt/scientific_interfaces/test/ISISReflectometry/Instrument/InstrumentOptionDefaultsTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/test/ISISReflectometry/Instrument/InstrumentPresenterTest.h b/qt/scientific_interfaces/test/ISISReflectometry/Instrument/InstrumentPresenterTest.h index fe800712e91f54c2dee8995ba6401d2781f34f39..72b29337ec88c1e2bac5b68c3d6b6e970a60ad5c 100644 --- a/qt/scientific_interfaces/test/ISISReflectometry/Instrument/InstrumentPresenterTest.h +++ b/qt/scientific_interfaces/test/ISISReflectometry/Instrument/InstrumentPresenterTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/test/ISISReflectometry/Instrument/MockInstrumentOptionDefaults.h b/qt/scientific_interfaces/test/ISISReflectometry/Instrument/MockInstrumentOptionDefaults.h index 4ce19d360fafc2d5e313da53dad7489b19bee1a6..295d65cc8396d9d1efa2dc5522d96d61b71a744d 100644 --- a/qt/scientific_interfaces/test/ISISReflectometry/Instrument/MockInstrumentOptionDefaults.h +++ b/qt/scientific_interfaces/test/ISISReflectometry/Instrument/MockInstrumentOptionDefaults.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "../../../ISISReflectometry/GUI/Instrument/InstrumentOptionDefaults.h" #include "MantidKernel/WarningSuppressions.h" diff --git a/qt/scientific_interfaces/test/ISISReflectometry/Instrument/MockInstrumentView.h b/qt/scientific_interfaces/test/ISISReflectometry/Instrument/MockInstrumentView.h index 09abd9f95712ac2296ae21f3598ef036be66b240..e29653995bd43cbb230c97fd337a37096dcc4c6d 100644 --- a/qt/scientific_interfaces/test/ISISReflectometry/Instrument/MockInstrumentView.h +++ b/qt/scientific_interfaces/test/ISISReflectometry/Instrument/MockInstrumentView.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "../../../ISISReflectometry/GUI/Instrument/IInstrumentView.h" #include "MantidKernel/WarningSuppressions.h" diff --git a/qt/scientific_interfaces/test/ISISReflectometry/MainWindow/MainWindowPresenterTest.h b/qt/scientific_interfaces/test/ISISReflectometry/MainWindow/MainWindowPresenterTest.h index 9d13efd7b05e491772c2566fd5eb45d90011a506..968449ba89e699562b3a1d4ab8d848ea4c033b8f 100644 --- a/qt/scientific_interfaces/test/ISISReflectometry/MainWindow/MainWindowPresenterTest.h +++ b/qt/scientific_interfaces/test/ISISReflectometry/MainWindow/MainWindowPresenterTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/test/ISISReflectometry/MainWindow/MockMainWindowPresenter.h b/qt/scientific_interfaces/test/ISISReflectometry/MainWindow/MockMainWindowPresenter.h index b7c4e4557dfddadc034bd38930fed64f9d6fbf95..1ffefb3e19394e0f42a3e0d87a38707b41185a69 100644 --- a/qt/scientific_interfaces/test/ISISReflectometry/MainWindow/MockMainWindowPresenter.h +++ b/qt/scientific_interfaces/test/ISISReflectometry/MainWindow/MockMainWindowPresenter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "../../../ISISReflectometry/GUI/MainWindow/IMainWindowPresenter.h" #include "MantidKernel/WarningSuppressions.h" diff --git a/qt/scientific_interfaces/test/ISISReflectometry/MainWindow/MockMainWindowView.h b/qt/scientific_interfaces/test/ISISReflectometry/MainWindow/MockMainWindowView.h index 82b33feaf735bedc57a04f828561a58350a6533d..33a96a6f8a7dd94576391ffa82b3d5bcc5ce08ac 100644 --- a/qt/scientific_interfaces/test/ISISReflectometry/MainWindow/MockMainWindowView.h +++ b/qt/scientific_interfaces/test/ISISReflectometry/MainWindow/MockMainWindowView.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "../../../ISISReflectometry/GUI/MainWindow/IMainWindowView.h" #include "MantidKernel/WarningSuppressions.h" diff --git a/qt/scientific_interfaces/test/ISISReflectometry/Reduction/GroupTest.h b/qt/scientific_interfaces/test/ISISReflectometry/Reduction/GroupTest.h index 4b48285b1b2f83ca0278bba1c462299ecd88fd49..2508e974dce36f24db1b7c54424d7fdec578767c 100644 --- a/qt/scientific_interfaces/test/ISISReflectometry/Reduction/GroupTest.h +++ b/qt/scientific_interfaces/test/ISISReflectometry/Reduction/GroupTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "../../../ISISReflectometry/Reduction/Group.h" diff --git a/qt/scientific_interfaces/test/ISISReflectometry/Reduction/ParseReflectometryStringsTest.h b/qt/scientific_interfaces/test/ISISReflectometry/Reduction/ParseReflectometryStringsTest.h index bdd3efbcb11c76db7b211b8d07a0165e8e846b46..56412dace94fc44133d81de5ba7fa50284cc47f2 100644 --- a/qt/scientific_interfaces/test/ISISReflectometry/Reduction/ParseReflectometryStringsTest.h +++ b/qt/scientific_interfaces/test/ISISReflectometry/Reduction/ParseReflectometryStringsTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "../../../ISISReflectometry/Reduction/ParseReflectometryStrings.h" diff --git a/qt/scientific_interfaces/test/ISISReflectometry/Reduction/ReductionJobsMergeTest.h b/qt/scientific_interfaces/test/ISISReflectometry/Reduction/ReductionJobsMergeTest.h index 1f2a375793fa30114ca2d510362394318b798289..828d513c14dc955fd719c7205c7194d24a001ae7 100644 --- a/qt/scientific_interfaces/test/ISISReflectometry/Reduction/ReductionJobsMergeTest.h +++ b/qt/scientific_interfaces/test/ISISReflectometry/Reduction/ReductionJobsMergeTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "../../../ISISReflectometry/TestHelpers/ModelCreationHelper.h" diff --git a/qt/scientific_interfaces/test/ISISReflectometry/Reduction/ValidatePerThetaDefaultsTest.h b/qt/scientific_interfaces/test/ISISReflectometry/Reduction/ValidatePerThetaDefaultsTest.h index a0de394f8069a5a3c487084b6c096fca301893b0..7e0d11cbf954996799a79170a515b9fb32d87095 100644 --- a/qt/scientific_interfaces/test/ISISReflectometry/Reduction/ValidatePerThetaDefaultsTest.h +++ b/qt/scientific_interfaces/test/ISISReflectometry/Reduction/ValidatePerThetaDefaultsTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "../../../ISISReflectometry/Reduction/ValidatePerThetaDefaults.h" diff --git a/qt/scientific_interfaces/test/ISISReflectometry/Reduction/ValidateRowTest.h b/qt/scientific_interfaces/test/ISISReflectometry/Reduction/ValidateRowTest.h index 02828b463f054476f2e9b390e9927268fe14ecb2..917977483f6a68cf3e4bc22d7a63cbfb34281e3f 100644 --- a/qt/scientific_interfaces/test/ISISReflectometry/Reduction/ValidateRowTest.h +++ b/qt/scientific_interfaces/test/ISISReflectometry/Reduction/ValidateRowTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "../../../ISISReflectometry/Common/Parse.h" diff --git a/qt/scientific_interfaces/test/ISISReflectometry/ReflMockObjects.h b/qt/scientific_interfaces/test/ISISReflectometry/ReflMockObjects.h index ffed88813531fd5f4c1ab2a2f7455f33aeca8a9a..b628b76d1ee31f87bbd947d1224b47b8ebfc0435 100644 --- a/qt/scientific_interfaces/test/ISISReflectometry/ReflMockObjects.h +++ b/qt/scientific_interfaces/test/ISISReflectometry/ReflMockObjects.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/test/ISISReflectometry/Runs/CatalogRunNotifierTest.h b/qt/scientific_interfaces/test/ISISReflectometry/Runs/CatalogRunNotifierTest.h index bc5eeffcac19cc9a865b656e14831ef202377695..440828ca67e4382b7a0f8b402d2b7c6c44059b31 100644 --- a/qt/scientific_interfaces/test/ISISReflectometry/Runs/CatalogRunNotifierTest.h +++ b/qt/scientific_interfaces/test/ISISReflectometry/Runs/CatalogRunNotifierTest.h @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #include "../../../ISISReflectometry/GUI/Runs/CatalogRunNotifier.h" #include "../ReflMockObjects.h" #include "../Runs/MockRunsView.h" diff --git a/qt/scientific_interfaces/test/ISISReflectometry/Runs/MockRunsView.h b/qt/scientific_interfaces/test/ISISReflectometry/Runs/MockRunsView.h index 6d13349913103541ea1f914fdf088a8374a04669..65b0cc90036fadafbb5aea3a2acab42cfee1ec70 100644 --- a/qt/scientific_interfaces/test/ISISReflectometry/Runs/MockRunsView.h +++ b/qt/scientific_interfaces/test/ISISReflectometry/Runs/MockRunsView.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "GUI/Runs/IRunsView.h" diff --git a/qt/scientific_interfaces/test/ISISReflectometry/Runs/RunsPresenterTest.h b/qt/scientific_interfaces/test/ISISReflectometry/Runs/RunsPresenterTest.h index cfb47cbe0fa04a748d67709faff8b3d88e7942e7..57e05ea745940becba851e0a94dbdadb145e258a 100644 --- a/qt/scientific_interfaces/test/ISISReflectometry/Runs/RunsPresenterTest.h +++ b/qt/scientific_interfaces/test/ISISReflectometry/Runs/RunsPresenterTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -24,6 +24,8 @@ #include <gmock/gmock.h> #include <gtest/gtest.h> +#include <utility> + using namespace MantidQt::CustomInterfaces::ISISReflectometry; using namespace MantidQt::CustomInterfaces::ISISReflectometry:: ModelCreationHelper; @@ -708,7 +710,7 @@ private: } AlgorithmRuntimeProps defaultLiveMonitorReductionOptions( - std::string instrument = std::string("OFFSPEC")) { + const std::string &instrument = std::string("OFFSPEC")) { return AlgorithmRuntimeProps{ {"GetLiveValueAlgorithm", "GetLiveInstrumentValue"}, {"InputWorkspace", "TOF_live"}, @@ -1005,7 +1007,7 @@ private: expectGetUpdateInterval(updateInterval); EXPECT_CALL(m_mainPresenter, rowProcessingProperties()) .Times(1) - .WillOnce(Return(options)); + .WillOnce(Return(std::move(options))); } void expectGetLiveDataOptions(std::string const &instrument, diff --git a/qt/scientific_interfaces/test/ISISReflectometry/Runs/SearchResultTest.h b/qt/scientific_interfaces/test/ISISReflectometry/Runs/SearchResultTest.h index cbb76d2cb5058b568603ed6a96cd25655f750fc2..cb9a74bf3c0756ecfe1f7506a83c29dd0cb7a1df 100644 --- a/qt/scientific_interfaces/test/ISISReflectometry/Runs/SearchResultTest.h +++ b/qt/scientific_interfaces/test/ISISReflectometry/Runs/SearchResultTest.h @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #include "../../../ISISReflectometry/GUI/Runs/SearchResult.h" #include <cxxtest/TestSuite.h> diff --git a/qt/scientific_interfaces/test/ISISReflectometry/RunsTable/MockRunsTablePresenter.h b/qt/scientific_interfaces/test/ISISReflectometry/RunsTable/MockRunsTablePresenter.h index c2b1a83c8562e3ac72c5a724fb60211f700bc071..fb3385925353def2fec882e03b80ebb33ebc8db2 100644 --- a/qt/scientific_interfaces/test/ISISReflectometry/RunsTable/MockRunsTablePresenter.h +++ b/qt/scientific_interfaces/test/ISISReflectometry/RunsTable/MockRunsTablePresenter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "../../../ISISReflectometry/GUI/Common/Plotter.h" diff --git a/qt/scientific_interfaces/test/ISISReflectometry/RunsTable/MockRunsTableView.h b/qt/scientific_interfaces/test/ISISReflectometry/RunsTable/MockRunsTableView.h index f2909270d704061b8e7c727f8199fb339fbf6c45..fb160172827226187d971a4c9f43448a57da94e1 100644 --- a/qt/scientific_interfaces/test/ISISReflectometry/RunsTable/MockRunsTableView.h +++ b/qt/scientific_interfaces/test/ISISReflectometry/RunsTable/MockRunsTableView.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "GUI/RunsTable/IRunsTableView.h" diff --git a/qt/scientific_interfaces/test/ISISReflectometry/RunsTable/RunsTablePresenterDisplayTest.h b/qt/scientific_interfaces/test/ISISReflectometry/RunsTable/RunsTablePresenterDisplayTest.h index aa7c51b68bfebecdf0e6ab3d3c9534a906bcbd83..ddd02872edd96253e746539725503c46d71242a8 100644 --- a/qt/scientific_interfaces/test/ISISReflectometry/RunsTable/RunsTablePresenterDisplayTest.h +++ b/qt/scientific_interfaces/test/ISISReflectometry/RunsTable/RunsTablePresenterDisplayTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/test/ISISReflectometry/RunsTable/RunsTablePresenterGroupDeletionTest.h b/qt/scientific_interfaces/test/ISISReflectometry/RunsTable/RunsTablePresenterGroupDeletionTest.h index 549987285ae17691a010be6383cbf713544d9681..1840e47b1abb46354b1f2027cd3912ab68ee8ed8 100644 --- a/qt/scientific_interfaces/test/ISISReflectometry/RunsTable/RunsTablePresenterGroupDeletionTest.h +++ b/qt/scientific_interfaces/test/ISISReflectometry/RunsTable/RunsTablePresenterGroupDeletionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/test/ISISReflectometry/RunsTable/RunsTablePresenterGroupInsertionTest.h b/qt/scientific_interfaces/test/ISISReflectometry/RunsTable/RunsTablePresenterGroupInsertionTest.h index f286c0ab710fc97359539af5909f343f5d450684..f7d2b3a0b32818adaaa346957614df2014f9314a 100644 --- a/qt/scientific_interfaces/test/ISISReflectometry/RunsTable/RunsTablePresenterGroupInsertionTest.h +++ b/qt/scientific_interfaces/test/ISISReflectometry/RunsTable/RunsTablePresenterGroupInsertionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/test/ISISReflectometry/RunsTable/RunsTablePresenterMergeJobsTest.h b/qt/scientific_interfaces/test/ISISReflectometry/RunsTable/RunsTablePresenterMergeJobsTest.h index 87714ed0cf4212ee88a903f9365589a9219bd066..49aa3527bb1a2383192a9cdb0bf72bfbec46e432 100644 --- a/qt/scientific_interfaces/test/ISISReflectometry/RunsTable/RunsTablePresenterMergeJobsTest.h +++ b/qt/scientific_interfaces/test/ISISReflectometry/RunsTable/RunsTablePresenterMergeJobsTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/test/ISISReflectometry/RunsTable/RunsTablePresenterProcessingTest.h b/qt/scientific_interfaces/test/ISISReflectometry/RunsTable/RunsTablePresenterProcessingTest.h index 83896d693d1baca0e6b159cb5a166cd7b8e28057..f3aeae077cf2cc9abf1fed5e704c97bbf96f15c1 100644 --- a/qt/scientific_interfaces/test/ISISReflectometry/RunsTable/RunsTablePresenterProcessingTest.h +++ b/qt/scientific_interfaces/test/ISISReflectometry/RunsTable/RunsTablePresenterProcessingTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/test/ISISReflectometry/RunsTable/RunsTablePresenterRowDeletionTest.h b/qt/scientific_interfaces/test/ISISReflectometry/RunsTable/RunsTablePresenterRowDeletionTest.h index 4a6f9fb8e41813cf8fd18a1b46bf86d9a47b66c3..5b0a836034988f7b3011904db8d50c6aa9ea5735 100644 --- a/qt/scientific_interfaces/test/ISISReflectometry/RunsTable/RunsTablePresenterRowDeletionTest.h +++ b/qt/scientific_interfaces/test/ISISReflectometry/RunsTable/RunsTablePresenterRowDeletionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/test/ISISReflectometry/RunsTable/RunsTablePresenterRowInsertionTest.h b/qt/scientific_interfaces/test/ISISReflectometry/RunsTable/RunsTablePresenterRowInsertionTest.h index d00efe33aefc7542a9c6a38e719343e3908f1073..cf2fbca3c1d3ef446351ddfc2c4fc074187c3fd7 100644 --- a/qt/scientific_interfaces/test/ISISReflectometry/RunsTable/RunsTablePresenterRowInsertionTest.h +++ b/qt/scientific_interfaces/test/ISISReflectometry/RunsTable/RunsTablePresenterRowInsertionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/test/ISISReflectometry/RunsTable/RunsTablePresenterTest.h b/qt/scientific_interfaces/test/ISISReflectometry/RunsTable/RunsTablePresenterTest.h index 724a2826d2b0efd6cbe72585c33679200e4131fc..0ec622077511fa69387280f7b3b26176583c2b05 100644 --- a/qt/scientific_interfaces/test/ISISReflectometry/RunsTable/RunsTablePresenterTest.h +++ b/qt/scientific_interfaces/test/ISISReflectometry/RunsTable/RunsTablePresenterTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/test/ISISReflectometry/Save/MockSaveView.h b/qt/scientific_interfaces/test/ISISReflectometry/Save/MockSaveView.h index 3c9bdf949c270c92a75b1408c44b4ce5a0efb924..c93d6194c76fad841ae5ba2782b4da230a349728 100644 --- a/qt/scientific_interfaces/test/ISISReflectometry/Save/MockSaveView.h +++ b/qt/scientific_interfaces/test/ISISReflectometry/Save/MockSaveView.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "../../../ISISReflectometry/GUI/Save/ISaveView.h" #include "MantidKernel/WarningSuppressions.h" diff --git a/qt/scientific_interfaces/test/ISISReflectometry/Save/SavePresenterTest.h b/qt/scientific_interfaces/test/ISISReflectometry/Save/SavePresenterTest.h index 57503167e384d1562f3651e82b41e1a56ded3572..182f9f6f32669b35c8916dc3e9011f6b84fd08da 100644 --- a/qt/scientific_interfaces/test/ISISReflectometry/Save/SavePresenterTest.h +++ b/qt/scientific_interfaces/test/ISISReflectometry/Save/SavePresenterTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -347,13 +347,13 @@ private: AnalysisDataService::Instance().clear(); } - Workspace2D_sptr createWorkspace(std::string name) { + Workspace2D_sptr createWorkspace(const std::string &name) { Workspace2D_sptr ws = WorkspaceCreationHelper::create2DWorkspace(10, 10); AnalysisDataService::Instance().addOrReplace(name, ws); return ws; } - void createTableWorkspace(std::string name) { + void createTableWorkspace(const std::string &name) { ITableWorkspace_sptr ws = WorkspaceFactory::Instance().createTable("TableWorkspace"); AnalysisDataService::Instance().addOrReplace(name, ws); @@ -367,8 +367,8 @@ private: return workspaceNames; } - void createWorkspaceGroup(std::string groupName, - std::vector<std::string> workspaceNames) { + void createWorkspaceGroup(const std::string &groupName, + const std::vector<std::string> &workspaceNames) { AnalysisDataService::Instance().add(groupName, boost::make_shared<WorkspaceGroup>()); createWorkspaces(workspaceNames); @@ -436,8 +436,8 @@ private: } void expectSaveWorkspaces( - std::vector<std::string> workspaceNames, - std::vector<std::string> logs = std::vector<std::string>{}) { + const std::vector<std::string> &workspaceNames, + const std::vector<std::string> &logs = std::vector<std::string>{}) { EXPECT_CALL(m_view, getSelectedParameters()) .Times(1) .WillOnce(Return(logs)); diff --git a/qt/scientific_interfaces/test/MuonAnalysisDataLoaderTest.h b/qt/scientific_interfaces/test/MuonAnalysisDataLoaderTest.h index a7b5447a8a3af715b01d0a1f5212515e01d34773..04cdbe410a675e2262aa5ec3054d8645d4ac1c40 100644 --- a/qt/scientific_interfaces/test/MuonAnalysisDataLoaderTest.h +++ b/qt/scientific_interfaces/test/MuonAnalysisDataLoaderTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -10,6 +10,8 @@ #include <Poco/Path.h> #include <cxxtest/TestSuite.h> +#include <utility> + #include "../Muon/MuonAnalysisDataLoader.h" #include "MantidAPI/Algorithm.h" #include "MantidAPI/AlgorithmManager.h" @@ -42,9 +44,10 @@ public: const QStringList &instruments, const std::string &deadTimesFile = "") : MuonAnalysisDataLoader(deadTimesType, instruments, deadTimesFile){}; - void setProcessAlgorithmProperties(IAlgorithm_sptr alg, + void setProcessAlgorithmProperties(const IAlgorithm_sptr &alg, const AnalysisOptions &options) const { - MuonAnalysisDataLoader::setProcessAlgorithmProperties(alg, options); + MuonAnalysisDataLoader::setProcessAlgorithmProperties(std::move(alg), + options); } }; diff --git a/qt/scientific_interfaces/test/MuonAnalysisFitDataPresenterTest.h b/qt/scientific_interfaces/test/MuonAnalysisFitDataPresenterTest.h index c28be22ebca4a93f7e0380a8ff412f8b528efe79..37d0934c840338bc7313c927fdfcc4ba5b1baaa8 100644 --- a/qt/scientific_interfaces/test/MuonAnalysisFitDataPresenterTest.h +++ b/qt/scientific_interfaces/test/MuonAnalysisFitDataPresenterTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/test/MuonAnalysisFitFunctionPresenterTest.h b/qt/scientific_interfaces/test/MuonAnalysisFitFunctionPresenterTest.h index fafa28a0f851b924e82b78ebdecbb95f9c777287..42e626e245993d24108fc7cc40594b3df71f7614 100644 --- a/qt/scientific_interfaces/test/MuonAnalysisFitFunctionPresenterTest.h +++ b/qt/scientific_interfaces/test/MuonAnalysisFitFunctionPresenterTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/test/MuonAnalysisHelperTest.h b/qt/scientific_interfaces/test/MuonAnalysisHelperTest.h index e5edacc46b635de712e7f3ddb3071eeaf188499b..89d17efbcd26d4f616dd2d22435e7b740153829d 100644 --- a/qt/scientific_interfaces/test/MuonAnalysisHelperTest.h +++ b/qt/scientific_interfaces/test/MuonAnalysisHelperTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/scientific_interfaces/test/MuonAnalysisResultTableCreatorTest.h b/qt/scientific_interfaces/test/MuonAnalysisResultTableCreatorTest.h index bfe08c317758bffc472373e8733c169d8fce39e4..b41151b0d6a69815a7ae953dbf0534af6dbc5a27 100644 --- a/qt/scientific_interfaces/test/MuonAnalysisResultTableCreatorTest.h +++ b/qt/scientific_interfaces/test/MuonAnalysisResultTableCreatorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -58,7 +58,7 @@ public: return MuonAnalysisResultTableCreator::haveSameParameters(tables); } void removeFixedParameterErrors( - const Mantid::API::ITableWorkspace_sptr table) const { + const Mantid::API::ITableWorkspace_sptr &table) const { MuonAnalysisResultTableCreator::removeFixedParameterErrors(table); } }; @@ -467,7 +467,7 @@ private: } /// Expected output table - ITableWorkspace_sptr getExpectedOutputSingle(const QStringList workspaces) { + ITableWorkspace_sptr getExpectedOutputSingle(const QStringList &workspaces) { auto table = WorkspaceFactory::Instance().createTable(); table->addColumn("str", "workspace_Name"); const std::vector<std::string> titles = { @@ -548,8 +548,8 @@ private: return table; } - bool compareTables(const ITableWorkspace_sptr lhs, - const ITableWorkspace_sptr rhs) { + bool compareTables(const ITableWorkspace_sptr &lhs, + const ITableWorkspace_sptr &rhs) { auto alg = AlgorithmManager::Instance().create("CompareWorkspaces"); alg->initialize(); alg->setChild(true); diff --git a/qt/scientific_interfaces/test/ScientificInterfacesTestInitialization.h b/qt/scientific_interfaces/test/ScientificInterfacesTestInitialization.h index e6cab28f604d250127b0e3afcde8435a3831da2a..e323a282befb4ed9deb27e3c186532d56d3eb322 100644 --- a/qt/scientific_interfaces/test/ScientificInterfacesTestInitialization.h +++ b/qt/scientific_interfaces/test/ScientificInterfacesTestInitialization.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/CMakeLists.txt b/qt/widgets/common/CMakeLists.txt index bf98cb1c1c80499eeb41d66c5bb5bdbfc584386b..c5e06592e173490485b1fd0be073019534abb157 100644 --- a/qt/widgets/common/CMakeLists.txt +++ b/qt/widgets/common/CMakeLists.txt @@ -1036,8 +1036,7 @@ mtd_add_qt_tests( LINK_LIBS ${TARGET_LIBRARIES} DataObjects - ${GMOCK_LIBRARIES} - ${GTEST_LIBRARIES} + gmock MTD_QT_LINK_LIBS MantidQtWidgetsCommon PARENT_DEPENDENCIES GUITests ) @@ -1078,7 +1077,6 @@ mtd_add_qt_tests( ../../../Framework/TestHelpers/inc ../../../Framework/DataObjects/inc ../../../Framework/Crystal/inc - ${GMOCK_INCLUDE_DIR} TEST_HELPER_SRCS ../../../Framework/TestHelpers/src/TearDownWorld.cpp ../../../Framework/TestHelpers/src/WorkspaceCreationHelper.cpp @@ -1090,8 +1088,7 @@ mtd_add_qt_tests( ${Boost_LIBRARIES} PythonInterfaceCore DataObjects - ${GMOCK_LIBRARIES} - ${GTEST_LIBRARIES} + gmock MTD_QT_LINK_LIBS MantidQtWidgetsCommon PARENT_DEPENDENCIES GUITests ) diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/AlgorithmDialog.h b/qt/widgets/common/inc/MantidQtWidgets/Common/AlgorithmDialog.h index 329b48270f302db912e8d34dd487abdf5c9012fc..c77003e337c82a08e9c8197262b8a393f576d1d7 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/AlgorithmDialog.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/AlgorithmDialog.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -141,7 +141,7 @@ protected: /// Set properties on this algorithm by pulling values from the tied widgets bool setPropertyValues(const QStringList &skipList = QStringList()); - bool setPropertyValue(const QString pName, bool validateOthers); + bool setPropertyValue(const QString &pName, bool validateOthers); void showValidators(); //@} @@ -255,7 +255,7 @@ protected: /// GenericDialogDemo.cpp public: /// Set the algorithm associated with this dialog - void setAlgorithm(Mantid::API::IAlgorithm_sptr /*alg*/); + void setAlgorithm(const Mantid::API::IAlgorithm_sptr & /*alg*/); /// Set a list of suggested values void setPresetValues(const QHash<QString, QString> &presetValues); /// Set whether this is intended for use from a script or not diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/AlgorithmDialogFactory.h b/qt/widgets/common/inc/MantidQtWidgets/Common/AlgorithmDialogFactory.h index d478efc8031bbc62158fbc59f6a954efdd87c807..9f0d9cc0557972a23bf9252a88e94f08ad52b19f 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/AlgorithmDialogFactory.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/AlgorithmDialogFactory.h @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #pragma once //------------------------ diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/AlgorithmHintStrategy.h b/qt/widgets/common/inc/MantidQtWidgets/Common/AlgorithmHintStrategy.h index 85ae08b4bc47c381ae9c9bd8b1d6189510085237..4b63aad0dafdc666c4c715a6591adeb92cba3266 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/AlgorithmHintStrategy.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/AlgorithmHintStrategy.h @@ -1,11 +1,13 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once +#include <utility> + #include "MantidAPI/AlgorithmManager.h" #include "MantidAPI/IAlgorithm.h" #include "MantidQtWidgets/Common/HintStrategy.h" @@ -18,7 +20,7 @@ class AlgorithmHintStrategy : public HintStrategy { public: AlgorithmHintStrategy(Mantid::API::IAlgorithm_sptr algorithm, std::vector<std::string> blacklist) - : m_algorithm(algorithm), m_blacklist(blacklist) {} + : m_algorithm(std::move(algorithm)), m_blacklist(std::move(blacklist)) {} AlgorithmHintStrategy(std::string const &algorithmName, std::vector<std::string> blacklist) diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/AlgorithmHistoryWindow.h b/qt/widgets/common/inc/MantidQtWidgets/Common/AlgorithmHistoryWindow.h index 67ea1b360a9007a90e05db67b2f24fe2619610bf..985fc73eff5fae7d69b02b2c574a3e363248fc13 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/AlgorithmHistoryWindow.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/AlgorithmHistoryWindow.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -24,6 +24,9 @@ #include <QStandardItemModel> #include <QTreeView> #include <QTreeWidget> +#include <utility> + +#include <utility> //------------------------------------------------------------------------------ // Forward declarations @@ -49,7 +52,8 @@ public: Mantid::API::AlgorithmHistory_const_sptr algHistory, AlgHistoryItem *parent = nullptr) : QTreeWidgetItem(parent, names, UserType), Mantid::API::HistoryItem( - algHistory) {} + std::move(std::move( + algHistory))) {} }; class AlgHistoryTreeWidget : public QTreeWidget { @@ -84,7 +88,7 @@ private: void itemChecked(QTreeWidgetItem *item, int index); void itemUnchecked(QTreeWidgetItem *item, int index); void populateNestedHistory(AlgHistoryItem *parentWidget, - Mantid::API::AlgorithmHistory_sptr history); + const Mantid::API::AlgorithmHistory_sptr &history); void uncheckAllChildren(QTreeWidgetItem *item, int index); QString concatVersionwithName(const std::string &name, const int version); @@ -97,7 +101,7 @@ class AlgExecSummaryGrpBox : public QGroupBox { Q_OBJECT public: explicit AlgExecSummaryGrpBox(QWidget *w); - AlgExecSummaryGrpBox(QString /*title*/, QWidget *w); + AlgExecSummaryGrpBox(const QString & /*title*/, QWidget *w); ~AlgExecSummaryGrpBox() override; void setData(const double execDuration, const Mantid::Types::Core::DateAndTime execDate); @@ -118,7 +122,7 @@ class AlgEnvHistoryGrpBox : public QGroupBox { Q_OBJECT public: explicit AlgEnvHistoryGrpBox(QWidget *w); - AlgEnvHistoryGrpBox(QString /*title*/, QWidget *w); + AlgEnvHistoryGrpBox(const QString & /*title*/, QWidget *w); ~AlgEnvHistoryGrpBox() override; QLineEdit *getosNameEdit() const { return m_osNameEdit; } @@ -145,14 +149,15 @@ signals: public: AlgorithmHistoryWindow( QWidget *parent, - const boost::shared_ptr<const Mantid::API::Workspace> /*wsptr*/); + const boost::shared_ptr<const Mantid::API::Workspace> & /*wsptr*/); AlgorithmHistoryWindow(QWidget *parent, const QString &workspaceName); ~AlgorithmHistoryWindow() override; void closeEvent(QCloseEvent *ce) override; public slots: - void updateAll(Mantid::API::AlgorithmHistory_const_sptr algHistmakeory); + void + updateAll(const Mantid::API::AlgorithmHistory_const_sptr &algHistmakeory); void doUnroll(const std::vector<int> &unrollIndicies); void doRoll(int index); @@ -166,10 +171,10 @@ private: AlgHistoryProperties *createAlgHistoryPropWindow(); QFileDialog *createScriptDialog(const QString &algName); - void - updateExecSummaryGrpBox(Mantid::API::AlgorithmHistory_const_sptr algHistory); + void updateExecSummaryGrpBox( + const Mantid::API::AlgorithmHistory_const_sptr &algHistory); void updateAlgHistoryProperties( - Mantid::API::AlgorithmHistory_const_sptr algHistory); + const Mantid::API::AlgorithmHistory_const_sptr &algHistory); std::string getScriptVersionMode(); diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/AlgorithmInputHistory.h b/qt/widgets/common/inc/MantidQtWidgets/Common/AlgorithmInputHistory.h index 5392636f81c26e87b1e4f5faa3c627fe007de1cb..6ba3742680b0e7146c8abd9e627f26c8aebcc29b 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/AlgorithmInputHistory.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/AlgorithmInputHistory.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -60,7 +60,7 @@ public: protected: /// Constructor - AbstractAlgorithmInputHistory(QString settingsGroup); + AbstractAlgorithmInputHistory(const QString &settingsGroup); private: /// Load any values that are available from persistent storage diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/AlgorithmProgress/AlgorithmProgressDialogPresenter.h b/qt/widgets/common/inc/MantidQtWidgets/Common/AlgorithmProgress/AlgorithmProgressDialogPresenter.h index de578ca0903a5f013ebda568a443eeb87a6fda8f..ee8b8a82cb8538ef5541485a75d1c33e0c316c12 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/AlgorithmProgress/AlgorithmProgressDialogPresenter.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/AlgorithmProgress/AlgorithmProgressDialogPresenter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/AlgorithmProgress/AlgorithmProgressDialogWidget.h b/qt/widgets/common/inc/MantidQtWidgets/Common/AlgorithmProgress/AlgorithmProgressDialogWidget.h index 8cd67431d110370756e6123d4b78e444137b7edd..e87ac0d3c30bb70adf684f709e6a09983acbe973 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/AlgorithmProgress/AlgorithmProgressDialogWidget.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/AlgorithmProgress/AlgorithmProgressDialogWidget.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/AlgorithmProgress/AlgorithmProgressModel.h b/qt/widgets/common/inc/MantidQtWidgets/Common/AlgorithmProgress/AlgorithmProgressModel.h index 3060475f239b20dae4b51a128fb2dd2d563e41fa..309a0380f42ec240b938574132c321ed5d38f720 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/AlgorithmProgress/AlgorithmProgressModel.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/AlgorithmProgress/AlgorithmProgressModel.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/AlgorithmProgress/AlgorithmProgressPresenter.h b/qt/widgets/common/inc/MantidQtWidgets/Common/AlgorithmProgress/AlgorithmProgressPresenter.h index d46ef28390632306784afd5e5b6fc3fed0edce2f..72a2695ddd168405dba93900b2233a05f53a107a 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/AlgorithmProgress/AlgorithmProgressPresenter.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/AlgorithmProgress/AlgorithmProgressPresenter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/AlgorithmProgress/AlgorithmProgressPresenterBase.h b/qt/widgets/common/inc/MantidQtWidgets/Common/AlgorithmProgress/AlgorithmProgressPresenterBase.h index e9c144f268ebd85640af5a9b2af7cc940d0dcb68..8d313b9987b715930161c24ee95fa214ecaef5a5 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/AlgorithmProgress/AlgorithmProgressPresenterBase.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/AlgorithmProgress/AlgorithmProgressPresenterBase.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/AlgorithmProgress/AlgorithmProgressWidget.h b/qt/widgets/common/inc/MantidQtWidgets/Common/AlgorithmProgress/AlgorithmProgressWidget.h index 15e799aa51e9164c8dd7d52f0bfa87e636463cff..63a5fea37b13b9d0e3c38449af081a953eb0093d 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/AlgorithmProgress/AlgorithmProgressWidget.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/AlgorithmProgress/AlgorithmProgressWidget.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once //---------------------------------- diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/AlgorithmProgress/IAlgorithmProgressDialogWidget.h b/qt/widgets/common/inc/MantidQtWidgets/Common/AlgorithmProgress/IAlgorithmProgressDialogWidget.h index 0fe86d94940a463bc4ad8c32c73d51b6b8bcd70a..be5fa29f47fe14cee72344e13deff5f3dfe1c0d4 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/AlgorithmProgress/IAlgorithmProgressDialogWidget.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/AlgorithmProgress/IAlgorithmProgressDialogWidget.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/AlgorithmProgress/IAlgorithmProgressWidget.h b/qt/widgets/common/inc/MantidQtWidgets/Common/AlgorithmProgress/IAlgorithmProgressWidget.h index 11ffb47139b4ef47093399a09b51bd159a0bae0b..b3b34c389113141a2030448b0ede5a6d42273504 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/AlgorithmProgress/IAlgorithmProgressWidget.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/AlgorithmProgress/IAlgorithmProgressWidget.h @@ -1,3 +1,9 @@ +// Mantid Repository : https://github.com/mantidproject/mantid +// +// Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS +// SPDX - License - Identifier: GPL - 3.0 + #pragma once class QString; diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/AlgorithmPropertiesWidget.h b/qt/widgets/common/inc/MantidQtWidgets/Common/AlgorithmPropertiesWidget.h index 21a36ed4810b714441df90a2d8dfc54113e83a7f..bb74c538df04ac72eccbfb649f50b1ed77fa0cbb 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/AlgorithmPropertiesWidget.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/AlgorithmPropertiesWidget.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -46,7 +46,7 @@ public: void initLayout(); Mantid::API::IAlgorithm_sptr getAlgorithm(); - void setAlgorithm(Mantid::API::IAlgorithm_sptr algo); + void setAlgorithm(const Mantid::API::IAlgorithm_sptr &algo); QString getAlgorithmName() const; void setAlgorithmName(QString name); diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/AlgorithmRunner.h b/qt/widgets/common/inc/MantidQtWidgets/Common/AlgorithmRunner.h index c0b113e4337e61f578eea7291c801f6b6345c13b..20bc666df031ba05861e5e160708d5da41200338 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/AlgorithmRunner.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/AlgorithmRunner.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/AlgorithmSelectorWidget.h b/qt/widgets/common/inc/MantidQtWidgets/Common/AlgorithmSelectorWidget.h index 3b975b8cd3ada02a04bd56210be6ba759d3cd2a1..26aed5baa8fbde226fdfa22a3ec79db9a8fb293e 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/AlgorithmSelectorWidget.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/AlgorithmSelectorWidget.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -44,7 +44,7 @@ struct SelectedAlgorithm { /// implicit conversion to QString operator QString() { return name; } /// constructor - SelectedAlgorithm(const QString nameIn, const int versionIn) + SelectedAlgorithm(const QString &nameIn, const int versionIn) : name(nameIn), version(versionIn){}; }; diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/AlternateCSPythonLexer.h b/qt/widgets/common/inc/MantidQtWidgets/Common/AlternateCSPythonLexer.h index 083081670acc1273d3f62a5da4e47e2aadef0603..b7044b59e0cd41c37fc410cabd486950875fce48 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/AlternateCSPythonLexer.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/AlternateCSPythonLexer.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/BaseDecoder.h b/qt/widgets/common/inc/MantidQtWidgets/Common/BaseDecoder.h index 6881b81102c4c5dd157bf640b6eedff47440e5df..928ea2101a75908b554bf6526d6a16930a05d18b 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/BaseDecoder.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/BaseDecoder.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/BaseEncoder.h b/qt/widgets/common/inc/MantidQtWidgets/Common/BaseEncoder.h index f579e662d6ad69000e67faa2d10d64ba67c46635..285dfae2a2eb6cc4f2dc3498d68d069aa21b7ddb 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/BaseEncoder.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/BaseEncoder.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/Batch/AssertOrThrow.h b/qt/widgets/common/inc/MantidQtWidgets/Common/Batch/AssertOrThrow.h index 024aa39633897d094b896619b487931331155619..970c75ea1cc396021c844be7918cb45b6f34d718 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/Batch/AssertOrThrow.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/Batch/AssertOrThrow.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /** See the developer documentation for Batch Widget at diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/Batch/BuildSubtreeItems.h b/qt/widgets/common/inc/MantidQtWidgets/Common/Batch/BuildSubtreeItems.h index fef33a391cabc6c71b7d7dec85cd83a3ed22b66d..da32c065f4b7ab9e07f01a14868e67d5a8578013 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/Batch/BuildSubtreeItems.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/Batch/BuildSubtreeItems.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /** See the developer documentation for Batch Widget at diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/Batch/Cell.h b/qt/widgets/common/inc/MantidQtWidgets/Common/Batch/Cell.h index db3265d6a8d6f2ae4a90dc9a5531575820914d1b..6f2ccd8c52a0c0b842dbc1c14134a3dbe042b378 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/Batch/Cell.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/Batch/Cell.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /** See the developer documentation for Batch Widget at diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/Batch/CellDelegate.h b/qt/widgets/common/inc/MantidQtWidgets/Common/Batch/CellDelegate.h index 1a15207a44933a6ab5c4977d1c979cf704bbf0d2..99ecaaad83bc6cbfcbd6583aab616bfb68405d9a 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/Batch/CellDelegate.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/Batch/CellDelegate.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /** See the developer documentation for Batch Widget at diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/Batch/CellStandardItem.h b/qt/widgets/common/inc/MantidQtWidgets/Common/Batch/CellStandardItem.h index 85ae9cb5cbf76276062cac8a5323343356be88e3..415e4d8ef1d856ce504068d08a08ab7dd562b28a 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/Batch/CellStandardItem.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/Batch/CellStandardItem.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /** See the developer documentation for Batch Widget at diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/Batch/ExtractSubtrees.h b/qt/widgets/common/inc/MantidQtWidgets/Common/Batch/ExtractSubtrees.h index b7f36a140aa4f1d586a2ed7a8241329f5d9d9439..9b1076fee1e8406595efd6e86bc827d0175c0b91 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/Batch/ExtractSubtrees.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/Batch/ExtractSubtrees.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /** See the developer documentation for Batch Widget at diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/Batch/FilteredTreeModel.h b/qt/widgets/common/inc/MantidQtWidgets/Common/Batch/FilteredTreeModel.h index 12a2a312f89e28676ddb1fe435f165e2acd90629..fc7bfba0f063b07db0279d84e01694bd075de5bc 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/Batch/FilteredTreeModel.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/Batch/FilteredTreeModel.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /** See the developer documentation for Batch Widget at diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/Batch/FindSubtreeRoots.h b/qt/widgets/common/inc/MantidQtWidgets/Common/Batch/FindSubtreeRoots.h index d933bb9994506e3ac1838e6100f172777786019d..bbfb5b5e7e7eae7d5d9c461d00c013fb5cb83ef8 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/Batch/FindSubtreeRoots.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/Batch/FindSubtreeRoots.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /** See the developer documentation for Batch Widget at diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/Batch/IJobTreeView.h b/qt/widgets/common/inc/MantidQtWidgets/Common/Batch/IJobTreeView.h index 73be371198e410fd28f028e9558abbf5ddf8c872..495a9d834563da52dcd03ef6fd0d0e341f43b56d 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/Batch/IJobTreeView.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/Batch/IJobTreeView.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidQtWidgets/Common/Batch/Cell.h" diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/Batch/JobTreeView.h b/qt/widgets/common/inc/MantidQtWidgets/Common/Batch/JobTreeView.h index 21573c68964d23a0640dd22beddfdb433274ce8d..b758fec1b9c74bc80d1254013b249fbbeab245cc 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/Batch/JobTreeView.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/Batch/JobTreeView.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /** See the developer documentation for Batch Widget at diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/Batch/JobTreeViewSignalAdapter.h b/qt/widgets/common/inc/MantidQtWidgets/Common/Batch/JobTreeViewSignalAdapter.h index 15d93266aeab78269e56709a8ea1d288f04ec69d..2274b0bbe430ff565b0e63f6d4c9494fe7c90ffd 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/Batch/JobTreeViewSignalAdapter.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/Batch/JobTreeViewSignalAdapter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /** See the developer documentation for Batch Widget at diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/Batch/MockJobTreeView.h b/qt/widgets/common/inc/MantidQtWidgets/Common/Batch/MockJobTreeView.h index d529e9e3f53e04dd201aee15438cf9549fa4cb81..ca96715bf65397396ad5400daf85156af2311720 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/Batch/MockJobTreeView.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/Batch/MockJobTreeView.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidKernel/WarningSuppressions.h" diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/Batch/QtBasicNavigation.h b/qt/widgets/common/inc/MantidQtWidgets/Common/Batch/QtBasicNavigation.h index 324d37a2945d6f250641729ae72d893335c6c53c..9ba7991792b6d2ab9c7d73ff0f20bf3f6543d068 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/Batch/QtBasicNavigation.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/Batch/QtBasicNavigation.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /** See the developer documentation for Batch Widget at diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/Batch/QtStandardItemTreeAdapter.h b/qt/widgets/common/inc/MantidQtWidgets/Common/Batch/QtStandardItemTreeAdapter.h index de5542aa0c21a8fc5ce57dbd1c2d1d7e4e94e509..9e42dcf19bef45014a66898550e31a2729e8dcc8 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/Batch/QtStandardItemTreeAdapter.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/Batch/QtStandardItemTreeAdapter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /** See the developer documentation for Batch Widget at diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/Batch/QtTreeCursorNavigation.h b/qt/widgets/common/inc/MantidQtWidgets/Common/Batch/QtTreeCursorNavigation.h index 5b7e0114308a17879402ca67d21faee54d59bd3a..ae5c62f2698ceb233ce9ca8ee9bab01e93ceb520 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/Batch/QtTreeCursorNavigation.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/Batch/QtTreeCursorNavigation.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /** See the developer documentation for Batch Widget at diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/Batch/Row.h b/qt/widgets/common/inc/MantidQtWidgets/Common/Batch/Row.h index 49d01fb9c93102a5a7a0e9898d3cc970e7670513..cd5deb99ba18ca944fc80869d8c37444d31c123c 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/Batch/Row.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/Batch/Row.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /** See the developer documentation for Batch Widget at diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/Batch/RowLocation.h b/qt/widgets/common/inc/MantidQtWidgets/Common/Batch/RowLocation.h index 2e1c02e58520d6c6313bc10e17a393f8daabb528..6b5d05f434b6c660eebedbf0e0f75ded24227dfe 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/Batch/RowLocation.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/Batch/RowLocation.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /** See the developer documentation for Batch Widget at diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/Batch/RowLocationAdapter.h b/qt/widgets/common/inc/MantidQtWidgets/Common/Batch/RowLocationAdapter.h index 430425983876dd3a3664f20d1c2495b22b5f44fc..16fc293b9cebbcf8749c8693fdbde2da7d266e81 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/Batch/RowLocationAdapter.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/Batch/RowLocationAdapter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /** See the developer documentation for Batch Widget at diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/Batch/RowPredicate.h b/qt/widgets/common/inc/MantidQtWidgets/Common/Batch/RowPredicate.h index 3724e4c1ae4f3c52dfee620b838edd5ed5696058..744876779fc6c2f2659fbff3b049478ba3e4f668 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/Batch/RowPredicate.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/Batch/RowPredicate.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /** See the developer documentation for Batch Widget at diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/Batch/StrictQModelIndices.h b/qt/widgets/common/inc/MantidQtWidgets/Common/Batch/StrictQModelIndices.h index e41c151f0f17b8d02d39d74b68925f6a044d514b..ad45c8c8bee76fddcacd53274e4b367ac466a4a7 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/Batch/StrictQModelIndices.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/Batch/StrictQModelIndices.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /** See the developer documentation for Batch Widget at diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/Batch/Subtree.h b/qt/widgets/common/inc/MantidQtWidgets/Common/Batch/Subtree.h index a389b49f1cb86534828d392158d1ea13a8c39359..bd7f162e75eb2955090e19db4a742b6e75328377 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/Batch/Subtree.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/Batch/Subtree.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /** See the developer documentation for Batch Widget at diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/BatchAlgorithmRunner.h b/qt/widgets/common/inc/MantidQtWidgets/Common/BatchAlgorithmRunner.h index 2f25ac6638895cee59dc226370759b262961af05..687a16aa311fbdddae5c3bb18a6297b4c9602f35 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/BatchAlgorithmRunner.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/BatchAlgorithmRunner.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -19,6 +19,7 @@ #include <QMetaType> #include <deque> #include <mutex> +#include <utility> namespace MantidQt { namespace API { @@ -70,7 +71,7 @@ public: class AlgorithmCompleteNotification : public Poco::Notification { public: AlgorithmCompleteNotification(IConfiguredAlgorithm_sptr algorithm) - : Poco::Notification(), m_algorithm(algorithm) {} + : Poco::Notification(), m_algorithm(std::move(algorithm)) {} IConfiguredAlgorithm_sptr algorithm() const { return m_algorithm; } @@ -81,7 +82,7 @@ private: class AlgorithmStartedNotification : public Poco::Notification { public: AlgorithmStartedNotification(IConfiguredAlgorithm_sptr algorithm) - : Poco::Notification(), m_algorithm(algorithm) {} + : Poco::Notification(), m_algorithm(std::move(algorithm)) {} IConfiguredAlgorithm_sptr algorithm() const { return m_algorithm; } @@ -93,7 +94,7 @@ class AlgorithmErrorNotification : public Poco::Notification { public: AlgorithmErrorNotification(IConfiguredAlgorithm_sptr algorithm, std::string const &errorMessage) - : Poco::Notification(), m_algorithm(algorithm), + : Poco::Notification(), m_algorithm(std::move(algorithm)), m_errorMessage(errorMessage) {} IConfiguredAlgorithm_sptr algorithm() const { return m_algorithm; } @@ -120,8 +121,9 @@ public: ~BatchAlgorithmRunner() override; /// Adds an algorithm to the execution queue - void addAlgorithm(Mantid::API::IAlgorithm_sptr algo, - AlgorithmRuntimeProps props = AlgorithmRuntimeProps()); + void + addAlgorithm(const Mantid::API::IAlgorithm_sptr &algo, + const AlgorithmRuntimeProps &props = AlgorithmRuntimeProps()); void setQueue(std::deque<IConfiguredAlgorithm_sptr> algorithm); /// Clears all algorithms from queue void clearQueue(); @@ -151,7 +153,7 @@ private: /// Implementation of algorithm runner bool executeBatchAsyncImpl(const Poco::Void & /*unused*/); /// Sets up and executes an algorithm - bool executeAlgo(IConfiguredAlgorithm_sptr algorithm); + bool executeAlgo(const IConfiguredAlgorithm_sptr &algorithm); /// Handlers for notifications void handleBatchComplete(const Poco::AutoPtr<BatchCompleteNotification> &pNf); diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/BoolPropertyWidget.h b/qt/widgets/common/inc/MantidQtWidgets/Common/BoolPropertyWidget.h index cf93277be57d3c3919392814f7cff5a2111110b3..b8c9f108ebd245befa3d020f97dce8b293b2702e 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/BoolPropertyWidget.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/BoolPropertyWidget.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/CatalogHelper.h b/qt/widgets/common/inc/MantidQtWidgets/Common/CatalogHelper.h index 02f9ca87a4e74cc1285ded272c9258f309a044b2..5b4d804329358417968f59d276546a863015ad3f 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/CatalogHelper.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/CatalogHelper.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/CatalogSearch.h b/qt/widgets/common/inc/MantidQtWidgets/Common/CatalogSearch.h index 98bc1f6ee4ccc045399f4adfeae05bf67346e463..af2ee7038ba350f4094e85dfad62624d6ff06d75 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/CatalogSearch.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/CatalogSearch.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -100,7 +100,7 @@ private: /// Obtain all file extensions from the provided column (dataFileResults -> /// File name). std::unordered_set<std::string> - getDataFileExtensions(Mantid::API::Column_sptr column); + getDataFileExtensions(const Mantid::API::Column_sptr &column); /// Add the list of file extensions to the "Filter type..." drop-down. void populateDataFileType(const std::unordered_set<std::string> &extensions); /// Disable the download button if user can access the files locally from the @@ -197,7 +197,7 @@ private: /// The current page the user is on in the results window. Used for paging. int m_currentPageNumber; // Ensure tooltip uses visible color on current OS - void correctedToolTip(std::string toolTip, QLabel *label); + void correctedToolTip(const std::string &toolTip, QLabel *label); }; } // namespace MantidWidgets } // namespace MantidQt \ No newline at end of file diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/CatalogSelector.h b/qt/widgets/common/inc/MantidQtWidgets/Common/CatalogSelector.h index 8f2d7ce7f7d325cda54c2c2e32e2242227cdf5e6..b11cbc0aedb43e8f2cae5589b4fede8455000fd6 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/CatalogSelector.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/CatalogSelector.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/CheckboxHeader.h b/qt/widgets/common/inc/MantidQtWidgets/Common/CheckboxHeader.h index 810dc3aec0e8d9a554e22aeced0e733f609738aa..c72b875b7207b9b4d58a1cb514d504c9c976979a 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/CheckboxHeader.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/CheckboxHeader.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/Configurable.h b/qt/widgets/common/inc/MantidQtWidgets/Common/Configurable.h index b4eedca4be934557819edd28f8d1f76a87adb1d3..e5ebf2a6262a810f01ccda2e2ea7b0458ab9b72d 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/Configurable.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/Configurable.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/ConvolutionFunctionModel.h b/qt/widgets/common/inc/MantidQtWidgets/Common/ConvolutionFunctionModel.h index b634a7b913e6a34713c1931f912fe562742bedbb..0ad93fa0aae23ac038f4563a8adde5bdd28431c9 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/ConvolutionFunctionModel.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/ConvolutionFunctionModel.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -51,21 +51,22 @@ private: // void findConvolutionPrefixes(const IFunction_sptr &fun); void iterateThroughFunction(IFunction *func, const QString &prefix); void setPrefix(IFunction *func, const QString &prefix); - CompositeFunction_sptr createInnerFunction(std::string peaksFunction, + CompositeFunction_sptr createInnerFunction(const std::string &peaksFunction, bool hasDeltaFunction, bool isQDependent, double q, bool hasTempCorrection, double tempValue); - CompositeFunction_sptr addTempCorrection(CompositeFunction_sptr peaksFunction, - double tempValue); + CompositeFunction_sptr + addTempCorrection(const CompositeFunction_sptr &peaksFunction, + double tempValue); IFunction_sptr createTemperatureCorrection(double correction); CompositeFunction_sptr createConvolutionFunction(IFunction_sptr resolutionFunction, - IFunction_sptr innerFunction); - IFunction_sptr createResolutionFunction(std::string workspaceName, + const IFunction_sptr &innerFunction); + IFunction_sptr createResolutionFunction(const std::string &workspaceName, int workspaceIndex); CompositeFunction_sptr addBackground(CompositeFunction_sptr domainFunction, - std::string background); + const std::string &background); boost::optional<QString> m_backgroundPrefix; boost::optional<QString> m_convolutionPrefix; boost::optional<QString> m_deltaFunctionPrefix; diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/AbstractTreeModel.h b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/AbstractTreeModel.h index 7ce7ad3c48a006f71e099860d7d47a9e92dd51b7..43caa17b3c1820a5e9384621d9c98fd08e6ac919 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/AbstractTreeModel.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/AbstractTreeModel.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/AppendGroupCommand.h b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/AppendGroupCommand.h index 5a389814507e9affcbce0a6f92d8ffb84db2a192..c5e6c8ee7f609b9b814ad3874d272f040e8c14c4 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/AppendGroupCommand.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/AppendGroupCommand.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/AppendRowCommand.h b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/AppendRowCommand.h index 0f0b5e999899ee86419e7a536016a8997f61bffe..05de9cbf796b6d6de21db3dd01fcb2e691c63772 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/AppendRowCommand.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/AppendRowCommand.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/ClearSelectedCommand.h b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/ClearSelectedCommand.h index 33b44aae880624166818335cd6bca02edfd5412a..ba5cec3e0573b6d1807db4900d5499b9b61fa539 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/ClearSelectedCommand.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/ClearSelectedCommand.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/CollapseGroupsCommand.h b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/CollapseGroupsCommand.h index 83626497bd4ceb664c2f5835246bf88f217bbe99..f97d9358781ccfff90765107050572664138cb8d 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/CollapseGroupsCommand.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/CollapseGroupsCommand.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/Column.h b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/Column.h index 70acd9037f683e432cc2e4a16a4941b0b8315a92..b78d7e41c0646be0ace5fad1a3e54ebcf9cfa901 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/Column.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/Column.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidQtWidgets/Common/DllOption.h" diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/Command.h b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/Command.h index feca29d2f4ace02a28a6a7b970f5026cea33542d..00858cacb6cac033ec76252ae94da6a1bf90cb5b 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/Command.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/Command.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/CommandBase.h b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/CommandBase.h index 8d2ef2b05b4c595c8e72cba4bc0d3af139b6d13e..6454f7b96efa85cacbc48d8c96801be4789abd38 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/CommandBase.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/CommandBase.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/ConstColumnIterator.h b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/ConstColumnIterator.h index a5b68242bbb93fa43925d2566a0bb2965d114e0b..dbd6a6bc06b391f8aab0fdeb0a73f800391be0b1 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/ConstColumnIterator.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/ConstColumnIterator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidQtWidgets/Common/DataProcessorUI/Column.h" diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/CopySelectedCommand.h b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/CopySelectedCommand.h index 78470ac1911dcd15179fa15c43dfb7182b1eb71a..e29e764e33cdf4f71c07e97cf11e32e010079323 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/CopySelectedCommand.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/CopySelectedCommand.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/CutSelectedCommand.h b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/CutSelectedCommand.h index 5c5112e21c3b2e0bf66be174c233e971020c85a7..9eb04de689b3c054cd9181d02352deda684d228f 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/CutSelectedCommand.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/CutSelectedCommand.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/DataProcessorMainPresenter.h b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/DataProcessorMainPresenter.h index c7a9430eda002b3babbdd696552588189a79aa7f..950c8ae086548f91828cf4705371f07c6a0d3209 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/DataProcessorMainPresenter.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/DataProcessorMainPresenter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/DataProcessorPresenter.h b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/DataProcessorPresenter.h index 921a24289fc53b5862a716e05feba0b72a7643dc..136d349312d933e4dba10aeaa4708045e42eaafe 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/DataProcessorPresenter.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/DataProcessorPresenter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/DataProcessorView.h b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/DataProcessorView.h index 180a7bcb66e8775e752770ce8bbc132ba5822a25..271bb676a4fbd21a9ddc0041160a068ea0f8c7c2 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/DataProcessorView.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/DataProcessorView.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/DeleteGroupCommand.h b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/DeleteGroupCommand.h index 03a877a86517b6377271efadf160778b8c46b0b6..637f0a740b722f5558acc34183891ab0861d0a60 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/DeleteGroupCommand.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/DeleteGroupCommand.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/DeleteRowCommand.h b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/DeleteRowCommand.h index a6597baba1fcc3f34787279e34e89ee5082d6ee2..4813fc089f2af648f14974ae03b5647cd85c0a42 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/DeleteRowCommand.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/DeleteRowCommand.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/ExpandCommand.h b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/ExpandCommand.h index e8a9f1ebf20b8f95979824c774cd854a05359e1c..91766d0d45909026f9c349c7bb52374d869dab6b 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/ExpandCommand.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/ExpandCommand.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/ExpandGroupsCommand.h b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/ExpandGroupsCommand.h index 25c96bcc0a2dc40c804878233de419d564735ea1..7197f1acdd7354769741bbbefd346e0d88f161ea 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/ExpandGroupsCommand.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/ExpandGroupsCommand.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/ExportTableCommand.h b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/ExportTableCommand.h index f48736e8f09d48a7f6ce905483246060e017c456..9b2405da882d02416ef2e7e411a888d13fb0d413 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/ExportTableCommand.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/ExportTableCommand.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/GenerateNotebook.h b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/GenerateNotebook.h index aa54d27cab6f4dc95bbc2544bb2b1d074b97a7ad..4eb2c2daa9106b0964d2a11abfd3d0271b6868bd 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/GenerateNotebook.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/GenerateNotebook.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -50,7 +50,7 @@ QString DLLExport plotsString(const GroupData &groupData, const ProcessingAlgorithm &processor); QString DLLExport -reduceRowString(const RowData_sptr data, const QString &instrument, +reduceRowString(const RowData_sptr &data, const QString &instrument, const WhiteList &whitelist, const std::map<QString, PreprocessingAlgorithm> &preprocessMap, const ProcessingAlgorithm &processor, @@ -77,9 +77,10 @@ QString DLLExport completeOutputProperties(const QString &algName, class DLLExport GenerateNotebook { public: - GenerateNotebook(QString name, QString instrument, WhiteList whitelist, + GenerateNotebook(const QString &name, const QString &instrument, + WhiteList whitelist, std::map<QString, PreprocessingAlgorithm> preprocessMap, - ProcessingAlgorithm processor, + const ProcessingAlgorithm &processor, boost::optional<PostprocessingStep> postprocessingStep, ColumnOptionsMap preprocessingInstructionsMap); virtual ~GenerateNotebook() = default; diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/GenericDataProcessorPresenter.h b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/GenericDataProcessorPresenter.h index 1e876c3a7ccd04bdf64e1b273f827bed57aea6fb..e1ef47643f74f09faa48d4b0a759514719538af6 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/GenericDataProcessorPresenter.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/GenericDataProcessorPresenter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidAPI/IAlgorithm_fwd.h" @@ -33,6 +33,7 @@ #include "MantidAPI/AnalysisDataService.h" #include <QObject> +#include <utility> namespace MantidQt { namespace MantidWidgets { @@ -57,7 +58,7 @@ struct PreprocessingAttributes { : m_options(options) {} PreprocessingAttributes(const ColumnOptionsMap &options, std::map<QString, PreprocessingAlgorithm> map) - : m_options(options), m_map(map) {} + : m_options(options), m_map(std::move(map)) {} ColumnOptionsMap m_options; std::map<QString, PreprocessingAlgorithm> m_map; @@ -91,23 +92,24 @@ public: GenericDataProcessorPresenter( WhiteList whitelist, std::map<QString, PreprocessingAlgorithm> preprocessMap, - ProcessingAlgorithm processor, PostprocessingAlgorithm postprocessor, - int group, + const ProcessingAlgorithm &processor, + const PostprocessingAlgorithm &postprocessor, int group, std::map<QString, QString> postprocessMap = std::map<QString, QString>(), - QString loader = "Load"); + const QString &loader = "Load"); // Constructor: no pre-processing, post-processing GenericDataProcessorPresenter(WhiteList whitelist, - ProcessingAlgorithm processor, - PostprocessingAlgorithm postprocessor, + const ProcessingAlgorithm &processor, + const PostprocessingAlgorithm &postprocessor, int group); // Constructor: pre-processing, no post-processing GenericDataProcessorPresenter( WhiteList whitelist, std::map<QString, PreprocessingAlgorithm> preprocessMap, - ProcessingAlgorithm processor, int group); + const ProcessingAlgorithm &processor, int group); // Constructor: no pre-processing, no post-processing GenericDataProcessorPresenter(WhiteList whitelist, - ProcessingAlgorithm processor, int group); + const ProcessingAlgorithm &processor, + int group); // Constructor: only whitelist GenericDataProcessorPresenter(WhiteList whitelist, int group); // Delegating constructor: pre-processing, no post-processing @@ -141,7 +143,7 @@ public: // Get the whitelist WhiteList getWhiteList() const { return m_whitelist; }; // Get the name of the reduced workspace for a given row - QString getReducedWorkspaceName(const RowData_sptr data) const; + QString getReducedWorkspaceName(const RowData_sptr &data) const; ParentItems selectedParents() const override; ChildItems selectedChildren() const override; @@ -195,23 +197,23 @@ protected: void postProcessGroup(const GroupData &data); // Preprocess the given column value if applicable void preprocessColumnValue(const QString &columnName, QString &columnValue, - RowData_sptr data); + const RowData_sptr &data); // Preprocess all option values where applicable - void preprocessOptionValues(RowData_sptr data); + void preprocessOptionValues(const RowData_sptr &data); // Update the model with values used from the options and/or the results from // the algorithm - void updateModelFromResults(Mantid::API::IAlgorithm_sptr alg, - RowData_sptr data); + void updateModelFromResults(const Mantid::API::IAlgorithm_sptr &alg, + const RowData_sptr &data); // Create and execute the algorithm with the given properties Mantid::API::IAlgorithm_sptr createAndRunAlgorithm(const OptionsMap &options); // Reduce a row - void reduceRow(RowData_sptr data); + void reduceRow(const RowData_sptr &data); // Finds a run in the AnalysisDataService QString findRunInADS(const QString &run, const QString &prefix, bool &runFound); // Set up data required for processing a row - bool initRowForProcessing(RowData_sptr rowData); + bool initRowForProcessing(const RowData_sptr &rowData); // Process rows virtual void process(TreeData itemsToProcess); // Plotting @@ -249,12 +251,12 @@ protected: bool promptUser() const { return m_promptUser; } void setGroupIsProcessed(const int groupIndex, const bool isProcessed); void setGroupError(const int groupIndex, const std::string &error); - void setRowIsProcessed(RowData_sptr rowData, const bool isProcessed); - void setRowError(RowData_sptr rowData, const std::string &error); - bool rowNeedsProcessing(RowData_sptr rowData) const; + void setRowIsProcessed(const RowData_sptr &rowData, const bool isProcessed); + void setRowError(const RowData_sptr &rowData, const std::string &error); + bool rowNeedsProcessing(const RowData_sptr &rowData) const; bool groupNeedsProcessing(const int groupIndex) const; void resetProcessedState(const int groupIndex); - void resetProcessedState(RowData_sptr rowData); + void resetProcessedState(const RowData_sptr &rowData); void resetProcessedState(const std::string &workspaceName); void resetProcessedState(); void updateWidgetEnabledState(const bool isProcessing) const; @@ -383,7 +385,7 @@ private: int parentColumn) override; int getNumberOfRows() override; void clearTable() override; - bool workspaceIsOutputOfRow(RowData_sptr rowData, + bool workspaceIsOutputOfRow(const RowData_sptr &rowData, const std::string &workspaceName) const; bool workspaceIsBeingReduced(const std::string &workspaceName) const; void handleWorkspaceRemoved(const std::string &workspaceName, diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/GenericDataProcessorPresenterFactory.h b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/GenericDataProcessorPresenterFactory.h index 17ab0fe5a57751dfae4084f1b1cf18484780057e..c2a5c0ea7dbb2b7112ce65f351271af4c75c3cdf 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/GenericDataProcessorPresenterFactory.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/GenericDataProcessorPresenterFactory.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/GenericDataProcessorPresenterGroupReducerWorker.h b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/GenericDataProcessorPresenterGroupReducerWorker.h index 3761614c1f1f3550d0a471d08fa022eaa23775f2..b9dd217945edaa6083539766014dbd9fcad9e910 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/GenericDataProcessorPresenterGroupReducerWorker.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/GenericDataProcessorPresenterGroupReducerWorker.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/GenericDataProcessorPresenterRowReducerWorker.h b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/GenericDataProcessorPresenterRowReducerWorker.h index 8e2332aed0196c141502e3e59bcbde30ce48ee26..82d41b9e37a58913aaea996b50961e52f493280a 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/GenericDataProcessorPresenterRowReducerWorker.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/GenericDataProcessorPresenterRowReducerWorker.h @@ -1,14 +1,15 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidQtWidgets/Common/DataProcessorUI/GenericDataProcessorPresenter.h" #include <QThread> +#include <utility> namespace MantidQt { namespace MantidWidgets { @@ -27,8 +28,8 @@ public: GenericDataProcessorPresenterRowReducerWorker( GenericDataProcessorPresenter *presenter, RowData_sptr rowData, const int rowIndex, const int groupIndex) - : m_presenter(presenter), m_rowData(rowData), m_rowIndex(rowIndex), - m_groupIndex(groupIndex) {} + : m_presenter(presenter), m_rowData(std::move(rowData)), + m_rowIndex(rowIndex), m_groupIndex(groupIndex) {} private slots: void startWorker() { diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/GenericDataProcessorPresenterThread.h b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/GenericDataProcessorPresenterThread.h index 8ebb644fad5eb46ba71357af74b2c98d7b4c36a3..a4185395fcf12dbf202cca461758cba3bfa797e6 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/GenericDataProcessorPresenterThread.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/GenericDataProcessorPresenterThread.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/GridDelegate.h b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/GridDelegate.h index 5cb61c9f50e970e5fcf92f27aa3ca45eeed739b2..d60570838839eeec56e10429b141c1116dafcfdb 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/GridDelegate.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/GridDelegate.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include <QPainter> #include <QStyledItemDelegate> diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/GroupRowsCommand.h b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/GroupRowsCommand.h index 80f742086cbdd4743155287b24ab0e6f03216da3..b8ed9c2065a50a06a2231e0d54073919b9ee785c 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/GroupRowsCommand.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/GroupRowsCommand.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/ImportTableCommand.h b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/ImportTableCommand.h index caf78456565d24c345175efea6b1d3a4d9a271e7..a422d56e9699732e30d375ff6c60ed809e2e24ad 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/ImportTableCommand.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/ImportTableCommand.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/MockObjects.h b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/MockObjects.h index 37df12b8fdb5f0deaff05d89c3e58aeca9a564d4..b771a482159fb793b8a0956dba06f738ed2b6b7b 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/MockObjects.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/MockObjects.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/NewTableCommand.h b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/NewTableCommand.h index 91ecc871dd56e1ed904270674b448b11716bb27c..b57dfb6d82d84714ba46f9f94783b19993fc0c07 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/NewTableCommand.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/NewTableCommand.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/OneLevelTreeManager.h b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/OneLevelTreeManager.h index ba0d4a122823c43e3b31620af3b5f0195734cf75..76f9fd9179ce3d61d1c37a497fd243d1bb20b44f 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/OneLevelTreeManager.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/OneLevelTreeManager.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -27,7 +27,7 @@ class EXPORT_OPT_MANTIDQT_COMMON OneLevelTreeManager : public TreeManager { public: /// Constructor OneLevelTreeManager(DataProcessorPresenter *presenter, - Mantid::API::ITableWorkspace_sptr table, + const Mantid::API::ITableWorkspace_sptr &table, const WhiteList &whitelist); /// Constructor (no table ws given) OneLevelTreeManager(DataProcessorPresenter *presenter, @@ -123,9 +123,9 @@ private: Mantid::API::ITableWorkspace_sptr createDefaultWorkspace(const WhiteList &whitelist); /// Validate a table workspace - void validateModel(Mantid::API::ITableWorkspace_sptr ws, + void validateModel(const Mantid::API::ITableWorkspace_sptr &ws, size_t whitelistColumns) const; - TreeData constructTreeData(std::set<int> rows); + TreeData constructTreeData(const std::set<int> &rows); }; } // namespace DataProcessor } // namespace MantidWidgets diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/OpenTableCommand.h b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/OpenTableCommand.h index 8d62d347379a9b19c2f6a7f0789ed07dd0e69184..aaa2ad3a3b01474d5254d5fd329f418d780db687 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/OpenTableCommand.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/OpenTableCommand.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/OptionsCommand.h b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/OptionsCommand.h index 03864e2a00136ab62e632b7727862d74f1b21e91..f548f59f57e33df62961a9d9c16d682a88f17386 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/OptionsCommand.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/OptionsCommand.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/OptionsMap.h b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/OptionsMap.h index 89a255e3cbced700825efc11a27c609134551c19..888a9d7ddae4d005a6f886bf81d9383b2ac049ca 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/OptionsMap.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/OptionsMap.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once /** This file defines utilities for handling option maps used by diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/OptionsQMap.h b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/OptionsQMap.h index 3dd048b8df65e8288f44779a154a31bdc576b704..222fbea6cefb5aafb42914d7a13622d81e70c2ce 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/OptionsQMap.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/OptionsQMap.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once /** This file defines utilities for handling option maps used by the data diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/PasteSelectedCommand.h b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/PasteSelectedCommand.h index 50592c6994251835db8fb35dcd06c45e874a0500..ee284c0d9828059c245015ee75beb1ce4ee568e3 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/PasteSelectedCommand.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/PasteSelectedCommand.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/PauseCommand.h b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/PauseCommand.h index 54df542c3627b16a482f4ff3e2568d07e0bcd62d..35999adf74c1131cf9afea00abe54af0f7f7f105 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/PauseCommand.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/PauseCommand.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/PlotGroupCommand.h b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/PlotGroupCommand.h index e31f9ab2746f5282d049de584085abbd8cf70a1c..4d29139e5fcf3c6c7c42088921cf961474af9788 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/PlotGroupCommand.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/PlotGroupCommand.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/PlotRowCommand.h b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/PlotRowCommand.h index 2210de302b1944c86cae54eb4204ba3dc4c04524..927b8f60c77965152bfea9c86b4ab117c1384aa1 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/PlotRowCommand.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/PlotRowCommand.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/PostprocessingAlgorithm.h b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/PostprocessingAlgorithm.h index a3e56491e8e76c973c7a9a85537f572b4b0cf5ed..47f5570f1016a333631c00c1bfc935d6d66545e8 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/PostprocessingAlgorithm.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/PostprocessingAlgorithm.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/PostprocessingStep.h b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/PostprocessingStep.h index c0d540afbdd18f37ef504a67ff4cf4862f8f6b1c..891cda313b7d5117fc96e0ea91e8d99b1523416b 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/PostprocessingStep.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/PostprocessingStep.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidAPI/AlgorithmManager.h" @@ -21,8 +21,9 @@ namespace MantidWidgets { namespace DataProcessor { struct EXPORT_OPT_MANTIDQT_COMMON PostprocessingStep { public: - PostprocessingStep(QString options); - PostprocessingStep(QString options, PostprocessingAlgorithm algorithm, + PostprocessingStep(const QString &options); + PostprocessingStep(const QString &options, + const PostprocessingAlgorithm &algorithm, std::map<QString, QString> map); void postProcessGroup(const QString &outputWSName, diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/PreprocessMap.h b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/PreprocessMap.h index 4ee90c9e7cbb72a60404a6349e52ecf17da95837..c5cadd952435775ae622f3ad659310f7b9124145 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/PreprocessMap.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/PreprocessMap.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/PreprocessingAlgorithm.h b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/PreprocessingAlgorithm.h index 2f82f64e542135548f3bab22411856f40c3332a3..9fd596235f892c608264f1004d35d37367e5101e 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/PreprocessingAlgorithm.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/PreprocessingAlgorithm.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -23,12 +23,13 @@ class EXPORT_OPT_MANTIDQT_COMMON PreprocessingAlgorithm : public ProcessingAlgorithmBase { public: // Constructor - PreprocessingAlgorithm(QString name, QString prefix = "", - QString separator = "", - std::set<QString> blacklist = std::set<QString>()); + PreprocessingAlgorithm( + const QString &name, const QString &prefix = "", + const QString &separator = "", + const std::set<QString> &blacklist = std::set<QString>()); // Delegating constructor - PreprocessingAlgorithm(QString name, QString prefix, QString separator, - const QString &blacklist); + PreprocessingAlgorithm(const QString &name, const QString &prefix, + const QString &separator, const QString &blacklist); // Default constructor PreprocessingAlgorithm(); // Destructor diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/ProcessCommand.h b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/ProcessCommand.h index 61ba97b03324a8b2065e477d33f55764cde08d5f..445b65a6ac351d60c344541898fc156193afe7c7 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/ProcessCommand.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/ProcessCommand.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/ProcessingAlgorithm.h b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/ProcessingAlgorithm.h index 0b4e3ab5f50ba357604fbc5205d2eaf7381fc721..77010523d6ac2c62cc4a4210f39be9a280d8cc0f 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/ProcessingAlgorithm.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/ProcessingAlgorithm.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -25,12 +25,12 @@ class EXPORT_OPT_MANTIDQT_COMMON ProcessingAlgorithm public: ProcessingAlgorithm(); // Constructor - ProcessingAlgorithm(QString name, std::vector<QString> prefix, + ProcessingAlgorithm(const QString &name, std::vector<QString> prefix, std::size_t postprocessedOutputPrefixIndex, - std::set<QString> blacklist = std::set<QString>(), + const std::set<QString> &blacklist = std::set<QString>(), const int version = -1); // Delegating constructor - ProcessingAlgorithm(QString name, QString const &prefix, + ProcessingAlgorithm(const QString &name, QString const &prefix, std::size_t postprocessedOutputPrefixIndex, QString const &blacklist = "", const int version = -1); // Destructor diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/ProcessingAlgorithmBase.h b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/ProcessingAlgorithmBase.h index fd8b12607b39e4326f5c6e90926fdee21a676304..9c33de50d431df7643b4e7ce34d2d89571b3563e 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/ProcessingAlgorithmBase.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/ProcessingAlgorithmBase.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/QDataProcessorWidget.h b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/QDataProcessorWidget.h index 61bb171b38ce13f9ecc1249bee8f07929d6a7572..ef0958ebf8129de6fe5a7fac0e24f713f885384c 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/QDataProcessorWidget.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/QDataProcessorWidget.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/QOneLevelTreeModel.h b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/QOneLevelTreeModel.h index 09c30594bf300a25f6b6910d04dcab5a7ab418bd..2b0e7624a1f65104469bb87732ced25f08509b32 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/QOneLevelTreeModel.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/QOneLevelTreeModel.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -31,7 +31,7 @@ the same number of columns as the number of items in the WhiteList. class EXPORT_OPT_MANTIDQT_COMMON QOneLevelTreeModel : public AbstractTreeModel { Q_OBJECT public: - QOneLevelTreeModel(Mantid::API::ITableWorkspace_sptr tableWorkspace, + QOneLevelTreeModel(const Mantid::API::ITableWorkspace_sptr &tableWorkspace, const WhiteList &whitelist); ~QOneLevelTreeModel() override; diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/QTwoLevelTreeModel.h b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/QTwoLevelTreeModel.h index a66f7ec0d03c7d4254bc8fa0ced5188365dc6eda..37c5d68c43fb3b836235fdaa194859a28207284d 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/QTwoLevelTreeModel.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/QTwoLevelTreeModel.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -36,7 +36,7 @@ number of items in the WhiteList. class EXPORT_OPT_MANTIDQT_COMMON QTwoLevelTreeModel : public AbstractTreeModel { Q_OBJECT public: - QTwoLevelTreeModel(Mantid::API::ITableWorkspace_sptr tableWorkspace, + QTwoLevelTreeModel(const Mantid::API::ITableWorkspace_sptr &tableWorkspace, const WhiteList &whitelist); ~QTwoLevelTreeModel() override; @@ -112,7 +112,7 @@ private: const std::map<QString, QString> &rowValues); void insertRowAndGroupWithValues(const std::map<QString, QString> &rowValues); bool rowIsEmpty(int row, int parent) const; - void setupModelData(Mantid::API::ITableWorkspace_sptr table); + void setupModelData(const Mantid::API::ITableWorkspace_sptr &table); bool insertGroups(int position, int count); bool removeGroups(int position, int count); bool removeRows(int position, int count, int parent); diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/QtCommandAdapter.h b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/QtCommandAdapter.h index 79cdc66b60986d38a81ec1ebc3a0537437144ee1..8ec485edfbea4b2e31b41862ce240f17f63e3dd1 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/QtCommandAdapter.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/QtCommandAdapter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/QtDataProcessorOptionsDialog.h b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/QtDataProcessorOptionsDialog.h index c609795560a46e8838ad08f4f16894fcbc1ac2e8..97ffd932835bc681f5695863984fde3892216f4e 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/QtDataProcessorOptionsDialog.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/QtDataProcessorOptionsDialog.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/SaveTableAsCommand.h b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/SaveTableAsCommand.h index edb6e8ff36ac62fd116666399080d077482d2248..ab8eeb3bfd0752cc6a5ef66cc4ffa663a227d09f 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/SaveTableAsCommand.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/SaveTableAsCommand.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/SaveTableCommand.h b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/SaveTableCommand.h index b64d500d4033bd46d6f13e24b020156ba7f3f7d4..689a820e83b0d11a59a91c0856660ff99a1ed876 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/SaveTableCommand.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/SaveTableCommand.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/SeparatorCommand.h b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/SeparatorCommand.h index 0affea6e9b1d3966b4149aaad5286e0aef18de42..29d03bfa4b4030b2b9ea523b0aeafd141c519aae 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/SeparatorCommand.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/SeparatorCommand.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/ToStdStringMap.h b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/ToStdStringMap.h index 2607192e1338dacd2ffcaad96cc47429dc6afefc..9b0d5d9392b5616b097c6305ebc6565ed1937d07 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/ToStdStringMap.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/ToStdStringMap.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidQtWidgets/Common/DllOption.h" diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/TreeData.h b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/TreeData.h index 23844f7e58df121511cd97d0ab37afa0d2645780..3f29447436f74a16aca281434d242a0e87b1c043 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/TreeData.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/TreeData.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once /** This file defines the RowData, GroupData and TreeData type aliases used by @@ -35,7 +35,7 @@ class DLLExport RowData { public: // Constructors explicit RowData(const int columnCount); - explicit RowData(QStringList data); + explicit RowData(const QStringList &data); explicit RowData(const std::vector<std::string> &data); explicit RowData(const RowData &src); @@ -112,7 +112,7 @@ public: bool reductionFailed() const; /// Get the reduced workspace name, optionally adding a prefix - QString reducedName(const QString prefix = QString()) const; + QString reducedName(const QString &prefix = QString()) const; /// Set the reduced workspace name void setReducedName(const QString &name) { m_reducedName = name; } bool hasOutputWorkspaceWithNameAndPrefix(const QString &workspaceName, diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/TreeManager.h b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/TreeManager.h index 0ff878b036ac96f40083201bbdd40eb54dc425b6..049087f600bdca1040ae0338a8f6f599f3df4b2a 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/TreeManager.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/TreeManager.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/TwoLevelTreeManager.h b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/TwoLevelTreeManager.h index a9e6bb0a410995af9dad2c90d57fcf6c8bdafafb..fde32267a06b16eff5b0d7f2247271b4c057c234 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/TwoLevelTreeManager.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/TwoLevelTreeManager.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -29,7 +29,7 @@ class EXPORT_OPT_MANTIDQT_COMMON TwoLevelTreeManager : public TreeManager { public: /// Constructor TwoLevelTreeManager(DataProcessorPresenter *presenter, - Mantid::API::ITableWorkspace_sptr table, + const Mantid::API::ITableWorkspace_sptr &table, const WhiteList &whitelist); /// Constructor (no table ws given) TwoLevelTreeManager(DataProcessorPresenter *presenter, @@ -122,9 +122,9 @@ private: Mantid::API::ITableWorkspace_sptr createDefaultWorkspace(const WhiteList &whitelist); /// Validate a table workspace - void validateModel(Mantid::API::ITableWorkspace_sptr ws, + void validateModel(const Mantid::API::ITableWorkspace_sptr &ws, size_t whitelistColumns) const; - TreeData constructTreeData(ChildItems rows); + TreeData constructTreeData(const ChildItems &rows); }; } // namespace DataProcessor } // namespace MantidWidgets diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/VectorString.h b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/VectorString.h index 74fcfe906f6ecfc921e690dd1482ed99115c8748..1177fad92558367cbe4b179e8de875420db64ff4 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/VectorString.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/VectorString.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/WhiteList.h b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/WhiteList.h index 911d524befbf0073749fae4000908fa85e46dd6f..58ec10206bf94a21b9a1f5e8e9d2496c50ef1f5c 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/WhiteList.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/WhiteList.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/WorkspaceCommand.h b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/WorkspaceCommand.h index 5b792b5c2af0b6bc39245842874192eeeb886bfd..9f04f8c97860b0a4507eaf93375d6f77b6647b6f 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/WorkspaceCommand.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/WorkspaceCommand.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/WorkspaceNameUtils.h b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/WorkspaceNameUtils.h index f87b7c2b58ec7d26871fb9828e9fd15c74c5a591..8d34e2234ba168291a813d1a84575eef31275390 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/WorkspaceNameUtils.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/DataProcessorUI/WorkspaceNameUtils.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -31,11 +31,11 @@ QString preprocessingListToString(const QStringList &values, const QString &separator); // Returns the name of the reduced workspace for a given row QString DLLExport getReducedWorkspaceName( - const RowData_sptr data, const WhiteList &whitelist, + const RowData_sptr &data, const WhiteList &whitelist, const std::map<QString, PreprocessingAlgorithm> &preprocessor); // Consolidate global options with row values OptionsMap DLLExport getCanonicalOptions( - const RowData_sptr data, const OptionsMap &globalOptions, + const RowData_sptr &data, const OptionsMap &globalOptions, const WhiteList &whitelist, const bool allowInsertions, const std::vector<QString> &outputProperties = std::vector<QString>(), const std::vector<QString> &prefixes = std::vector<QString>()); diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/DataSelector.h b/qt/widgets/common/inc/MantidQtWidgets/Common/DataSelector.h index 770efb3a91af87f99d481c5a4b23de41c01d87ae..934c478c6115ace7a5de30a3cad19ed70aee13b7 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/DataSelector.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/DataSelector.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/DiagResults.h b/qt/widgets/common/inc/MantidQtWidgets/Common/DiagResults.h index 1a6e976dc33142c3428ec1f011bc4d20751d9307..36c1891eec3a2c627b5210f66d72811fe762cca6 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/DiagResults.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/DiagResults.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -28,8 +28,8 @@ signals: void died(); private: - void updateRow(int row, QString text); - int addRow(QString firstColumn, QString secondColumn); + void updateRow(int row, const QString &text); + int addRow(const QString &firstColumn, const QString &secondColumn); void closeEvent(QCloseEvent *event) override; private: diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/DistributionOptions.h b/qt/widgets/common/inc/MantidQtWidgets/Common/DistributionOptions.h index 37a1ba165da147801726d9897cf798a97147732e..4761071bdaead15802957b6870515b9ad658370e 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/DistributionOptions.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/DistributionOptions.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/DllOption.h b/qt/widgets/common/inc/MantidQtWidgets/Common/DllOption.h index f774b819a9b14a97428e16b059864a86cc1c820b..3587282eb27781c470e30140c9092e112e577a49 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/DllOption.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/DllOption.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/DoubleSpinBox.h b/qt/widgets/common/inc/MantidQtWidgets/Common/DoubleSpinBox.h index d8c2969291da4209eb9d4d8984ed1c7fef65f5da..11af6dae0bd741c300600ba4a37b5391974415cb 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/DoubleSpinBox.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/DoubleSpinBox.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /*************************************************************************** File : DoubleSpinBox.h @@ -62,7 +62,7 @@ public: setDecimals(prec); }; - void addSpecialTextMapping(QString text, double value); + void addSpecialTextMapping(const QString &text, double value); QString textFromValue(double value) const; QValidator::State validate(QString &input, int &pos) const override; diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/DropEventHelper.h b/qt/widgets/common/inc/MantidQtWidgets/Common/DropEventHelper.h index 135dffba09f6e715d3663b505d99872ca035711c..5e3ca9364eb3d317c6c607ee134a136b701da918 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/DropEventHelper.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/DropEventHelper.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/EditLocalParameterDialog.h b/qt/widgets/common/inc/MantidQtWidgets/Common/EditLocalParameterDialog.h index fb7a69b4d16e3b2542062dcdce236e7b9d7c6b8d..14a36248c28f3549b6a5a4068e6eb5a54e5584ce 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/EditLocalParameterDialog.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/EditLocalParameterDialog.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -28,9 +28,10 @@ class EXPORT_OPT_MANTIDQT_COMMON EditLocalParameterDialog Q_OBJECT public: EditLocalParameterDialog(QWidget *parent, const QString &parName, - const QStringList &wsNames, QList<double> values, - QList<bool> fixes, QStringList ties, - QStringList constraints); + const QStringList &wsNames, + const QList<double> &values, + const QList<bool> &fixes, const QStringList &ties, + const QStringList &constraints); void doSetup(const QString &parName, const QStringList &wsNames); QString getParameterName() const { return m_parName; } QList<double> getValues() const; @@ -55,9 +56,9 @@ private slots: void fixParameter(int /*index*/, bool /*fix*/); void setAllFixed(bool /*fix*/); void setTie(int /*index*/, QString /*tie*/); - void setTieAll(QString /*tie*/); + void setTieAll(const QString & /*tie*/); void setConstraint(int /*index*/, QString /*tie*/); - void setConstraintAll(QString /*tie*/); + void setConstraintAll(const QString & /*tie*/); void copy(); void paste(); void setValueToLog(int /*i*/); diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/FileDialogHandler.h b/qt/widgets/common/inc/MantidQtWidgets/Common/FileDialogHandler.h index e0c44dbadb86bc5188bf0d2269530ad154a7c3ce..c9a80cb04781f64b5261bc247f7ed083879838c4 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/FileDialogHandler.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/FileDialogHandler.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -37,7 +37,7 @@ namespace FileDialogHandler { DLLExport QString getSaveFileName(QWidget *parent = nullptr, const Mantid::Kernel::Property *baseProp = nullptr, - QFileDialog::Options options = nullptr); + const QFileDialog::Options &options = nullptr); /** * For file dialogs. This will add the selected extension if an extension diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/FilePropertyWidget.h b/qt/widgets/common/inc/MantidQtWidgets/Common/FilePropertyWidget.h index c760cc6a30bd7075920bb4177b0c3bee08ec7153..902d18c79527b20b7f1b153b325e862ad7d5ef61 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/FilePropertyWidget.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/FilePropertyWidget.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/FilenameDialogEditor.h b/qt/widgets/common/inc/MantidQtWidgets/Common/FilenameDialogEditor.h index b91bc247c6dde3f0815b353157937c92a29dc3b0..9470c6ffef33a5f6a17e75aa60eda094d619e767 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/FilenameDialogEditor.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/FilenameDialogEditor.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/FindDialog.h b/qt/widgets/common/inc/MantidQtWidgets/Common/FindDialog.h index 5e65bb4f4eb743021e0bf71b92aaa0155528ef0e..7ac3cfdc20444e9e9a1283040eafad614f32f98e 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/FindDialog.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/FindDialog.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/FindFilesThreadPoolManager.h b/qt/widgets/common/inc/MantidQtWidgets/Common/FindFilesThreadPoolManager.h index 01b32870661c705b37afbdb30b575ec910ee07ed..3bcd890ee63d7c5ac77ec96e493ee88ae85dc441 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/FindFilesThreadPoolManager.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/FindFilesThreadPoolManager.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/FindFilesThreadPoolManagerMockObjects.h b/qt/widgets/common/inc/MantidQtWidgets/Common/FindFilesThreadPoolManagerMockObjects.h index ee73d7d2ce0c63ed976ed496f94e6dd62f3054e7..907a29da91e90f94e7e783070f40e5fba7f38077 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/FindFilesThreadPoolManagerMockObjects.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/FindFilesThreadPoolManagerMockObjects.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/FindFilesWorker.h b/qt/widgets/common/inc/MantidQtWidgets/Common/FindFilesWorker.h index 8dae8a10045c8cde9eabd196091967dba8db6363..b609acdcea3e33cac5a5bbccab6d74c3d33293de 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/FindFilesWorker.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/FindFilesWorker.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/FindReplaceDialog.h b/qt/widgets/common/inc/MantidQtWidgets/Common/FindReplaceDialog.h index e508b0abc55bc73d4d3543d97a7ef1c9b5c4ff96..d26fec1e88895ce20e746055cd95a2480efa1454 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/FindReplaceDialog.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/FindReplaceDialog.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/FitOptionsBrowser.h b/qt/widgets/common/inc/MantidQtWidgets/Common/FitOptionsBrowser.h index b7ec9e0adc40d1200a329e75558d68579efed284..d0d0f4c1c91f329c2a907dbb74692ca1c7f2116e 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/FitOptionsBrowser.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/FitOptionsBrowser.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -64,7 +64,7 @@ public: void setLogNames(const QStringList &logNames); void setParameterNamesForPlotting(const QStringList &parNames); QString getParameterToPlot() const; - bool addPropertyToBlacklist(QString); + bool addPropertyToBlacklist(const QString &); signals: void changedToSequentialFitting(); diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/FitPropertyBrowser.h b/qt/widgets/common/inc/MantidQtWidgets/Common/FitPropertyBrowser.h index 5582f6e7d92b4f38ac20c3d2970cf3447791e060..c7a0832df9f5bae34ce9f74c4ea80139d9bcef94 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/FitPropertyBrowser.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/FitPropertyBrowser.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -226,7 +226,7 @@ public: void setTip(const QString &txt); /// alter text of Plot Guess - void setTextPlotGuess(const QString text); + void setTextPlotGuess(const QString &text); /// Creates the "Ties" property value for the Fit algorithm QString getTieString() const; @@ -466,7 +466,7 @@ protected: /// void updateDecimals(); /// Sets the workspace to a function - void setWorkspace(boost::shared_ptr<Mantid::API::IFunction> f) const; + void setWorkspace(const boost::shared_ptr<Mantid::API::IFunction> &f) const; /// Display properties relevant to the selected workspace void setWorkspaceProperties(); /// Adds the workspace index property to the browser. @@ -486,7 +486,7 @@ protected: /// Catches unexpected not found exceptions Mantid::API::IFunction_sptr tryCreateFitFunction(const QString &str); /// Create CompositeFunction from pointer - void createCompositeFunction(const Mantid::API::IFunction_sptr func); + void createCompositeFunction(const Mantid::API::IFunction_sptr &func); /// Property managers: QtGroupPropertyManager *m_groupManager; @@ -593,7 +593,7 @@ private: /// Return the nearest allowed workspace index. int getAllowedIndex(int currentIndex) const; - void setCurrentFunction(Mantid::API::IFunction_const_sptr f) const; + void setCurrentFunction(const Mantid::API::IFunction_const_sptr &f) const; /// Sets the new workspace to the current one virtual void workspaceChange(const QString &wsName); diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/FunctionBrowser.h b/qt/widgets/common/inc/MantidQtWidgets/Common/FunctionBrowser.h index a7963d369e111fda326d21c0ece6f4fea9d4336d..eb2d18a920197321cb4e73331020dfac96e068f4 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/FunctionBrowser.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/FunctionBrowser.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -142,7 +142,7 @@ public slots: void setDatasetNames(const QStringList &names) override; void resetLocalParameters(); void setCurrentDataset(int i) override; - void removeDatasets(QList<int> indices); + void removeDatasets(const QList<int> &indices); void addDatasets(const QStringList &names); protected: diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/FunctionBrowser/FunctionBrowserUtils.h b/qt/widgets/common/inc/MantidQtWidgets/Common/FunctionBrowser/FunctionBrowserUtils.h index 9650be03205f6dcec552a97b76ca8d3b386f1f0f..c61b6f0050ead5d23df6a4bb29953f998dc0c8c9 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/FunctionBrowser/FunctionBrowserUtils.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/FunctionBrowser/FunctionBrowserUtils.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidAPI/IFunction_fwd.h" diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/FunctionModel.h b/qt/widgets/common/inc/MantidQtWidgets/Common/FunctionModel.h index e989b6812eb116d8962cb0daeb9fed6039bcbc6d..64fb98aec9ec037b5290d93dd51b6377b04de565 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/FunctionModel.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/FunctionModel.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -33,7 +33,7 @@ public: bool isParameterFixed(const QString &parName) const; QString getParameterTie(const QString &parName) const; void setParameterFixed(const QString &parName, bool fixed); - void setParameterTie(const QString &parName, QString tie); + void setParameterTie(const QString &parName, const QString &tie); QStringList getParameterNames() const override; IFunction_sptr getSingleFunction(int index) const override; IFunction_sptr getCurrentFunction() const override; diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/FunctionMultiDomainPresenter.h b/qt/widgets/common/inc/MantidQtWidgets/Common/FunctionMultiDomainPresenter.h index eb552e0f12b71e97447c66d29f942ea7740d2ce9..ca5a129267555c4cbaf29eba2a164e25e2d07f9e 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/FunctionMultiDomainPresenter.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/FunctionMultiDomainPresenter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -62,9 +62,9 @@ public: void setLocalParameterValue(const QString &parName, int i, double value, double error); void setLocalParameterFixed(const QString &parName, int i, bool fixed); - void setLocalParameterTie(const QString &parName, int i, QString tie); + void setLocalParameterTie(const QString &parName, int i, const QString &tie); void setLocalParameterConstraint(const QString &parName, int i, - QString constraint); + const QString &constraint); QStringList getGlobalParameters() const; void setGlobalParameters(const QStringList &globals); QStringList getLocalParameters() const; diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/FunctionTreeView.h b/qt/widgets/common/inc/MantidQtWidgets/Common/FunctionTreeView.h index d7db6f5801f89ac43dd4816c8d14917a01be351f..cf0a75346af8c7b2ac762c8b77a48750b06968a6 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/FunctionTreeView.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/FunctionTreeView.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -137,24 +137,26 @@ protected: /// Remove and delete property void removeProperty(QtProperty *prop); /// Set a function - void setFunction(QtProperty *prop, Mantid::API::IFunction_sptr fun); + void setFunction(QtProperty *prop, const Mantid::API::IFunction_sptr &fun); /// Add a function - bool addFunction(QtProperty *prop, Mantid::API::IFunction_sptr fun); + bool addFunction(QtProperty *prop, const Mantid::API::IFunction_sptr &fun); /// Add a function property - AProperty addFunctionProperty(QtProperty *parent, QString funName); + AProperty addFunctionProperty(QtProperty *parent, const QString &funName); /// Add a parameter property - AProperty addParameterProperty(QtProperty *parent, QString paramName, - QString paramDesc, double paramValue); + AProperty addParameterProperty(QtProperty *parent, const QString ¶mName, + const QString ¶mDesc, double paramValue); /// Add a attribute property - AProperty addAttributeProperty(QtProperty *parent, QString attName, + AProperty addAttributeProperty(QtProperty *parent, const QString &attName, const Mantid::API::IFunction::Attribute &att); /// Add attribute and parameter properties to a function property - void addAttributeAndParameterProperties(QtProperty *prop, - Mantid::API::IFunction_sptr fun); + void + addAttributeAndParameterProperties(QtProperty *prop, + const Mantid::API::IFunction_sptr &fun); /// Add property showing function's index in the composite function AProperty addIndexProperty(QtProperty *prop); /// Update function index properties - void updateFunctionIndices(QtProperty *prop = nullptr, QString index = ""); + void updateFunctionIndices(QtProperty *prop = nullptr, + const QString &index = ""); /// Get property of the overall function AProperty getFunctionProperty() const; /// Check if property is a function group @@ -194,7 +196,7 @@ protected: QtProperty *getTieProperty(QtProperty *prop) const; /// Add a tie property - void addTieProperty(QtProperty *prop, QString tie); + void addTieProperty(QtProperty *prop, const QString &tie); /// Check if a parameter property has a tie bool hasTie(QtProperty *prop) const; /// Check if a property is a tie @@ -204,7 +206,7 @@ protected: /// Add a constraint property QList<AProperty> addConstraintProperties(QtProperty *prop, - QString constraint); + const QString &constraint); /// Check if a property is a constraint bool isConstraint(QtProperty *prop) const; /// Check if a parameter property has a constraint diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/GenericDialog.h b/qt/widgets/common/inc/MantidQtWidgets/Common/GenericDialog.h index a79c700906b5453279f42771d1b7afef1c9593bd..5d1a44c6705ad12f29f6e8d2d34f1db1109dcf36 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/GenericDialog.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/GenericDialog.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/GraphOptions.h b/qt/widgets/common/inc/MantidQtWidgets/Common/GraphOptions.h index f99c0c36a1ebb6f972d7e6dafc290fc9ceee8ce6..d534e1eb9f624859bb3e384c7ef0ad7551dbcad3 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/GraphOptions.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/GraphOptions.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/HelpWindow.h b/qt/widgets/common/inc/MantidQtWidgets/Common/HelpWindow.h index b7743796c8db89b36168bc398d423db44643c1b4..8a7584a15ac26e968d372af40074933dd5664bd5 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/HelpWindow.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/HelpWindow.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/Hint.h b/qt/widgets/common/inc/MantidQtWidgets/Common/Hint.h index 13710b117da6a7368866fef22448fd8a3b3ffc41..b523d60433628ad299ca1b029379647eef999c72 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/Hint.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/Hint.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "DllOption.h" diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/HintStrategy.h b/qt/widgets/common/inc/MantidQtWidgets/Common/HintStrategy.h index 0e9a687fd408812b1a233697ec35dd4a819f2f6f..c11d260ecfd18766ec8df06875a22dd33d5b347a 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/HintStrategy.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/HintStrategy.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/HintingLineEdit.h b/qt/widgets/common/inc/MantidQtWidgets/Common/HintingLineEdit.h index 99d5108d0cfbc55fc2d4a15d2cc16e84aa2f1990..f5b6482639585ccc6f033b0c61c0be924017ab11 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/HintingLineEdit.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/HintingLineEdit.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/HintingLineEditFactory.h b/qt/widgets/common/inc/MantidQtWidgets/Common/HintingLineEditFactory.h index 7cf0e023cbb49f5909b207c3b4a6aa7ff8355c95..9bbd8ec1a9158091e66e907238b75576f58dd3fe 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/HintingLineEditFactory.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/HintingLineEditFactory.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/IFunctionBrowser.h b/qt/widgets/common/inc/MantidQtWidgets/Common/IFunctionBrowser.h index a92fb02338393d5daed0aa715ef97260370fc71d..e98e3e5c4d626bccd8976c5579eac2cfe5d9e97c 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/IFunctionBrowser.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/IFunctionBrowser.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/IFunctionModel.h b/qt/widgets/common/inc/MantidQtWidgets/Common/IFunctionModel.h index 398b9c030a585e3ffadbd69d1184c4a1e3e855a4..04f48980b1e56674e6f13805aff017f83fafb98b 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/IFunctionModel.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/IFunctionModel.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/IFunctionView.h b/qt/widgets/common/inc/MantidQtWidgets/Common/IFunctionView.h index d42392a8e0fbeeb4651132040c8ab1520f0c1c66..2ff7e13c360fc40508432243a383db2d7c833c47 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/IFunctionView.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/IFunctionView.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/IMuonFitDataModel.h b/qt/widgets/common/inc/MantidQtWidgets/Common/IMuonFitDataModel.h index e18b4b6a900975849498152a13dbb07235dbf867..1e4474b6a64091abc41d3bdb0f4436f8392ad6bf 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/IMuonFitDataModel.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/IMuonFitDataModel.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/IMuonFitDataSelector.h b/qt/widgets/common/inc/MantidQtWidgets/Common/IMuonFitDataSelector.h index f1e9529c37c674124de80ae1688abac149fb447f..d655dac85506284f11dae3387c54b9dc5cf9c9fe 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/IMuonFitDataSelector.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/IMuonFitDataSelector.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/IMuonFitFunctionModel.h b/qt/widgets/common/inc/MantidQtWidgets/Common/IMuonFitFunctionModel.h index 26e844744483abd896d4c47c08b67cf977f54185..853ba5c695ad68ab025b49ec11dc370927d8b5dd 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/IMuonFitFunctionModel.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/IMuonFitFunctionModel.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/IProjectSaveView.h b/qt/widgets/common/inc/MantidQtWidgets/Common/IProjectSaveView.h index f107ff82a86b787b039e25be60fad1f523eb0ab9..414d3e7acc0ad42d917c36532b6d0c8c0cdeac71 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/IProjectSaveView.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/IProjectSaveView.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/IProjectSerialisable.h b/qt/widgets/common/inc/MantidQtWidgets/Common/IProjectSerialisable.h index a7a3a4b025871c575e3af566796201f8d9d5f489..bdfb95d60df139d9594322a8eaf4398104990fe8 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/IProjectSerialisable.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/IProjectSerialisable.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/ISlitCalculator.h b/qt/widgets/common/inc/MantidQtWidgets/Common/ISlitCalculator.h index 0ae4a8f2f1eafc38e626ec2be10cae1c43beba94..9a4eff1a2eecae6bcf18432b93e38c487155167b 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/ISlitCalculator.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/ISlitCalculator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/IWorkspaceFitControl.h b/qt/widgets/common/inc/MantidQtWidgets/Common/IWorkspaceFitControl.h index 5b324e54b1579fe3d268107bda8c5fbfaaa65a3e..43ca8da9d89234ff44fdbbb7998c7cc483e12c4e 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/IWorkspaceFitControl.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/IWorkspaceFitControl.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/IndirectFitPropertyBrowserLegacy.h b/qt/widgets/common/inc/MantidQtWidgets/Common/IndirectFitPropertyBrowserLegacy.h index 2c25db839be6fb112075e8ca4182e9b75fcf7b01..fa184ab919f8a11fc162eb29542bd5b9d0ce702a 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/IndirectFitPropertyBrowserLegacy.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/IndirectFitPropertyBrowserLegacy.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -34,7 +34,7 @@ public: boost::optional<size_t> backgroundIndex() const; boost::optional<size_t> - functionIndex(Mantid::API::IFunction_sptr function) const; + functionIndex(const Mantid::API::IFunction_sptr &function) const; QString selectedFitType() const; @@ -55,7 +55,7 @@ public: void setParameterValue(const std::string &functionName, const std::string ¶meterName, double value); - void setParameterValue(Mantid::API::IFunction_sptr function, + void setParameterValue(const Mantid::API::IFunction_sptr &function, const std::string ¶meterName, double value); void setBackground(const std::string &backgroundName); @@ -134,7 +134,8 @@ public: void setWorkspaceIndex(int i) override; - void updatePlotGuess(Mantid::API::MatrixWorkspace_const_sptr sampleWorkspace); + void updatePlotGuess( + const Mantid::API::MatrixWorkspace_const_sptr &sampleWorkspace); public slots: void fit() override; diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/InputController.h b/qt/widgets/common/inc/MantidQtWidgets/Common/InputController.h index fed5fb03a813e70fa70f1cb82381386cf2267daa..9f0f5ca5c0b389cb76a6be510fa185b7db6e00be 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/InputController.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/InputController.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/InstrumentSelector.h b/qt/widgets/common/inc/MantidQtWidgets/Common/InstrumentSelector.h index c2a62ba25a7efa05c0f52bfd0207b120840ee8dd..ee9fb6b125d365e23f2c13bbf69c3389edd290b9 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/InstrumentSelector.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/InstrumentSelector.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/InterfaceManager.h b/qt/widgets/common/inc/MantidQtWidgets/Common/InterfaceManager.h index 076b0d579c789870a0a991e23f5838feb5a99adf..547503c904cbb6d2de79834ee11035232ba92322 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/InterfaceManager.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/InterfaceManager.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -58,8 +58,8 @@ class EXPORT_OPT_MANTIDQT_COMMON InterfaceManager { public: /// Create a new instance of the correct type of AlgorithmDialog AlgorithmDialog *createDialog( - boost::shared_ptr<Mantid::API::IAlgorithm> alg, QWidget *parent = nullptr, - bool forScript = false, + const boost::shared_ptr<Mantid::API::IAlgorithm> &alg, + QWidget *parent = nullptr, bool forScript = false, const QHash<QString, QString> &presetValues = (QHash<QString, QString>()), const QString &optional_msg = QString(), const QStringList &enabled = QStringList(), diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/ListPropertyWidget.h b/qt/widgets/common/inc/MantidQtWidgets/Common/ListPropertyWidget.h index d0ed25a6342fd22116989d0cda94fc09dcbf893a..32ffb4131f0898aeb7fda98e126a8e7e31ac4197 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/ListPropertyWidget.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/ListPropertyWidget.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/LocalParameterEditor.h b/qt/widgets/common/inc/MantidQtWidgets/Common/LocalParameterEditor.h index aafe3bd4fcaa37ed775963e7cb3f03b17d67e939..01701a1af44141fabc72c097cbaa6177c9ccb2b6 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/LocalParameterEditor.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/LocalParameterEditor.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -24,8 +24,8 @@ class LocalParameterEditor : public QWidget { Q_OBJECT public: LocalParameterEditor(QWidget *parent, int index, double value, bool fixed, - QString tie, QString constraint, bool othersFixed, - bool allOthersFixed, bool othersTied, + const QString &tie, const QString &constraint, + bool othersFixed, bool allOthersFixed, bool othersTied, bool logOptionsEnabled); signals: void setAllValues(double /*_t1*/); @@ -57,8 +57,8 @@ private slots: private: bool eventFilter(QObject *widget, QEvent *evn) override; void setEditorState(); - static QString setTieDialog(QString tie); - static QString setConstraintDialog(QString tie); + static QString setTieDialog(const QString &tie); + static QString setConstraintDialog(const QString &tie); QLineEdit *m_editor; QPushButton *m_button; QAction *m_setAllAction; diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/LocalParameterItemDelegate.h b/qt/widgets/common/inc/MantidQtWidgets/Common/LocalParameterItemDelegate.h index f6ea8af406b8d26827c391f2fc9c374d04183afb..33c4d9e5d0fdc5ba4c865bc945a322b5f34203ea 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/LocalParameterItemDelegate.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/LocalParameterItemDelegate.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/LogValueFinder.h b/qt/widgets/common/inc/MantidQtWidgets/Common/LogValueFinder.h index 6093610085368e5457b53b39ae1e65adf9209675..acc023e400fb33ce75e8017c5387992a4d3899cf 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/LogValueFinder.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/LogValueFinder.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/LogValueSelector.h b/qt/widgets/common/inc/MantidQtWidgets/Common/LogValueSelector.h index 4163a15cbe19ea87e7090b715fdbc530f048f951..8287de55ee0ea61985e419d76e3d7b72a5773c4e 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/LogValueSelector.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/LogValueSelector.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/MWRunFiles.h b/qt/widgets/common/inc/MantidQtWidgets/Common/MWRunFiles.h index bd1a3960f3d0db7566fb4c92808e667541820d73..4b7dfb800c2628d5a06bf947bfed34e2faa3b0a3 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/MWRunFiles.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/MWRunFiles.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/ManageUserDirectories.h b/qt/widgets/common/inc/MantidQtWidgets/Common/ManageUserDirectories.h index b7050f4a541a824995fc56a381ff46df50150d33..b25aab0807c9726a88d4245712a654e8e78db683 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/ManageUserDirectories.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/ManageUserDirectories.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/MantidAlgorithmMetatype.h b/qt/widgets/common/inc/MantidQtWidgets/Common/MantidAlgorithmMetatype.h index 5b9608cd235afab77c81be6d70478e308f71aec0..2b4a225069e15dd59ffbb59e224a1e8af7e191ff 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/MantidAlgorithmMetatype.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/MantidAlgorithmMetatype.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/MantidDesktopServices.h b/qt/widgets/common/inc/MantidQtWidgets/Common/MantidDesktopServices.h index 3d6d02ebb888959754b1ec78aed3ffbe2d76bac7..1ac26d9377a6cf3c3c23b12dbab83fbc8bf0ddae 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/MantidDesktopServices.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/MantidDesktopServices.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/MantidDialog.h b/qt/widgets/common/inc/MantidQtWidgets/Common/MantidDialog.h index a59af37b82413a76998dc8b4c0fab1ee6fe60e6b..68f45b649caab64c72616e68ef579d6c3259fb34 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/MantidDialog.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/MantidDialog.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -58,8 +58,8 @@ class EXPORT_OPT_MANTIDQT_COMMON MantidDialog : public QDialog { public: /// DefaultConstructor MantidDialog(QWidget *parent = nullptr, - Qt::WindowFlags flags = Qt::WindowCloseButtonHint | - Qt::WindowType::WindowTitleHint); + const Qt::WindowFlags &flags = Qt::WindowCloseButtonHint | + Qt::WindowType::WindowTitleHint); /// Destructor ~MantidDialog() override; diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/MantidDisplayBase.h b/qt/widgets/common/inc/MantidQtWidgets/Common/MantidDisplayBase.h index 858086fd7d177e10031e9f60e8262f885d939537..b9186edc4bc1d13bc4b9713b3eb28de885c3a23b 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/MantidDisplayBase.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/MantidDisplayBase.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/MantidHelpInterface.h b/qt/widgets/common/inc/MantidQtWidgets/Common/MantidHelpInterface.h index 1757f4b556419e651635143101210a2a73585375..7c4fd0e7d839bef2304b46ebfa03242082e195ca 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/MantidHelpInterface.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/MantidHelpInterface.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/MantidHelpWindow.h b/qt/widgets/common/inc/MantidQtWidgets/Common/MantidHelpWindow.h index 3cc0c5ae05d201d34fadc536af05bb23dd94a9b2..d4f39094c92e175265db7f1b468b24a43c24bd54 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/MantidHelpWindow.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/MantidHelpWindow.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -27,7 +27,8 @@ class EXPORT_OPT_MANTIDQT_COMMON MantidHelpWindow public: static bool helpWindowExists() { return g_helpWindow != nullptr; } - MantidHelpWindow(QWidget *parent = nullptr, Qt::WindowFlags flags = nullptr); + MantidHelpWindow(QWidget *parent = nullptr, + const Qt::WindowFlags &flags = nullptr); ~MantidHelpWindow() override; void showPage(const std::string &url = std::string()) override; @@ -68,7 +69,7 @@ private: public slots: /// Perform any clean up on main window shutdown void shutdown() override; - void warning(QString msg); + void warning(const QString &msg); }; } // namespace MantidWidgets diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/MantidTreeModel.h b/qt/widgets/common/inc/MantidQtWidgets/Common/MantidTreeModel.h index 380d750a693d59067304641f41a134e1aedd053f..c351c8080cc02d54f669021e999a5f65eee5aaf2 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/MantidTreeModel.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/MantidTreeModel.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once //---------------------------------- @@ -57,7 +57,7 @@ public: QWidget *getParent() override; MantidQt::API::AlgorithmDialog * - createAlgorithmDialog(Mantid::API::IAlgorithm_sptr alg); + createAlgorithmDialog(const Mantid::API::IAlgorithm_sptr &alg); // Plotting Methods MultiLayer * diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/MantidTreeWidget.h b/qt/widgets/common/inc/MantidQtWidgets/Common/MantidTreeWidget.h index e33fb87f350cf999ef5450e5c7dbfc8f57edf653..068027fcc7e6ececbd69a856964a5649feb684ab 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/MantidTreeWidget.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/MantidTreeWidget.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/MantidTreeWidgetItem.h b/qt/widgets/common/inc/MantidQtWidgets/Common/MantidTreeWidgetItem.h index 7d3c491aba94e6e0c4e16c400e3b8b794e9e09fd..3ff2ee37ebbb61c4e95d351f0e60eae72801a8f5 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/MantidTreeWidgetItem.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/MantidTreeWidgetItem.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -22,7 +22,8 @@ class MantidTreeWidget; class EXPORT_OPT_MANTIDQT_COMMON MantidTreeWidgetItem : public QTreeWidgetItem { public: explicit MantidTreeWidgetItem(MantidTreeWidget * /*parent*/); - MantidTreeWidgetItem(QStringList /*list*/, MantidTreeWidget * /*parent*/); + MantidTreeWidgetItem(const QStringList & /*list*/, + MantidTreeWidget * /*parent*/); void disableIfNode(bool); void setSortPos(int o) { m_sortPos = o; } int getSortPos() const { return m_sortPos; } diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/MantidWSIndexDialog.h b/qt/widgets/common/inc/MantidQtWidgets/Common/MantidWSIndexDialog.h index dbe12cbf2f1673900d4754a48b3094ef51fe4fcd..483e5edddd5c4537815d86b0015bc88b467805dc 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/MantidWSIndexDialog.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/MantidWSIndexDialog.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -72,7 +72,7 @@ public: /// Constructor - starting at start and ending at end. Interval(int start, int end); /// Constructor - attempts to parse given string to find start and end. - explicit Interval(QString /*intervalString*/); + explicit Interval(const QString & /*intervalString*/); /// Copy constructor Interval(const Interval & /*copy*/); @@ -114,9 +114,9 @@ public: /// Constructor - with empty list. IntervalList(void); /// Constructor - with a list created by parsing the input string - explicit IntervalList(QString /*intervals*/); + explicit IntervalList(const QString & /*intervals*/); /// Constructor - with a list containing a single Interval - explicit IntervalList(Interval /*interval*/); + explicit IntervalList(const Interval & /*interval*/); /// Copy Constructor IntervalList(const IntervalList & /*copy*/); @@ -220,7 +220,7 @@ class EXPORT_OPT_MANTIDQT_COMMON MantidWSIndexWidget : public QWidget { QLineEdit *lineEdit() { return _lineEdit; }; /// if Error is not empty, it will make the * label visible and set the /// tooltip as the error. - void setError(QString error); + void setError(const QString &error); private: QLineEdit *_lineEdit; @@ -268,7 +268,7 @@ public: /// Constructor - same parameters as one of the parent constructors, along /// with a /// list of the names of workspaces to be plotted. - MantidWSIndexWidget(QWidget *parent, Qt::WindowFlags flags, + MantidWSIndexWidget(QWidget *parent, const Qt::WindowFlags &flags, const QList<QString> &wsNames, const bool showWaterfallOption = false, const bool showTiledOption = false, @@ -391,7 +391,7 @@ class EXPORT_OPT_MANTIDQT_COMMON MantidWSIndexDialog : public QDialog { public: /// Constructor - has a list of the names of workspaces to be plotted. - MantidWSIndexDialog(QWidget *parent, Qt::WindowFlags flags, + MantidWSIndexDialog(QWidget *parent, const Qt::WindowFlags &flags, const QList<QString> &wsNames, const bool showWaterfallOption = false, const bool showPlotAll = true, diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/MantidWidget.h b/qt/widgets/common/inc/MantidQtWidgets/Common/MantidWidget.h index 7b34bc45285b0c4f89be432dfa461ed8251d2efd..fb18694966d01f009959bc7a8a98037531ebfb64 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/MantidWidget.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/MantidWidget.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/MdConstants.h b/qt/widgets/common/inc/MantidQtWidgets/Common/MdConstants.h index cae58f8f067860618cb597706a2efdbe73e554a2..4b8ecea824c2b06d1084f80ba73a3d5dac782509 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/MdConstants.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/MdConstants.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/MdSettings.h b/qt/widgets/common/inc/MantidQtWidgets/Common/MdSettings.h index 478f4e09203dba1cf40035d8233f36d51d845fe3..ab09a44d7e7c566343bb7202edda83bcfef57147 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/MdSettings.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/MdSettings.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -31,7 +31,7 @@ public: * Set the UserSetting color map for the vsi. *@param colorMap UserSetting colormap for the vsi */ - void setUserSettingColorMap(QString colorMap); + void setUserSettingColorMap(const QString &colorMap); /** * Get the UserSetting color map for the vsi. @@ -48,7 +48,7 @@ public: * Set the LastSession color map * @param colorMap The colormap for the VSI. */ - void setLastSessionColorMap(QString colorMap); + void setLastSessionColorMap(const QString &colorMap); /** * Get the background color for the user setting. @@ -66,7 +66,7 @@ public: * Set the background color for the user setting. * @param backgroundColor The background color. */ - void setUserSettingBackgroundColor(QColor backgroundColor); + void setUserSettingBackgroundColor(const QColor &backgroundColor); /** * Get the background color for the last session. @@ -78,14 +78,15 @@ public: * Set the background color for the user setting. * @param backgroundColor The background color. */ - void setLastSessionBackgroundColor(QColor backgroundColor); + void setLastSessionBackgroundColor(const QColor &backgroundColor); /** * Set the general MD color map * @param colorMapName The name of the general color map. * @param colorMapFile The file name of the general color map. */ - void setGeneralMdColorMap(QString colorMapName, QString colorMapFile); + void setGeneralMdColorMap(const QString &colorMapName, + const QString &colorMapFile); /** * Get the general MD color map file @@ -141,7 +142,7 @@ public: * Set the user setting for the initial view. * @param initialView The selected initial view. */ - void setUserSettingIntialView(QString initialView); + void setUserSettingIntialView(const QString &initialView); /** * Retrieves the state of the last session's log scale. diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/Message.h b/qt/widgets/common/inc/MantidQtWidgets/Common/Message.h index 633d92291b62d754928a8ab6464b3a24afd9a0c9..c218b7fec153fe44702e9217e708fb691238f0e2 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/Message.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/Message.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -36,15 +36,15 @@ public: Message(); /// Construct a message from a QString with a given priority (default=notice) Message(const QString &text, Priority priority = Priority::PRIO_NOTICE, - QString scriptPath = ""); + const QString &scriptPath = ""); /// Construct a message from a std::string with a given priority /// (default=notice) Message(const std::string &text, Priority priority = Priority::PRIO_NOTICE, - QString scriptPath = ""); + const QString &scriptPath = ""); /// Construct a message from a c-style string and a given priority /// (default=notice) Message(const char *text, Priority priority = Priority::PRIO_NOTICE, - QString scriptPath = ""); + const QString &scriptPath = ""); /// Copy constructor Message(const Message &msg); /// Copy assignment diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/MessageDisplay.h b/qt/widgets/common/inc/MantidQtWidgets/Common/MessageDisplay.h index f2202724127095b9fe8fe5be74703b40e3dc4dfe..cc33bf1e2191ebe7e3f338341559ca715577b7f7 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/MessageDisplay.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/MessageDisplay.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/MockAlgorithmRunner.h b/qt/widgets/common/inc/MantidQtWidgets/Common/MockAlgorithmRunner.h index 466354c1227609806ef9a92f4820f0e08e146c8b..1fca84331940ac7f95054aff9bc07904be6392a5 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/MockAlgorithmRunner.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/MockAlgorithmRunner.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/MockProgressableView.h b/qt/widgets/common/inc/MantidQtWidgets/Common/MockProgressableView.h index 77b7513802a609f62ea9317cca61fe599b522792..9744dc1594e862f107cac41578114d618f02d797 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/MockProgressableView.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/MockProgressableView.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/MockSlitCalculator.h b/qt/widgets/common/inc/MantidQtWidgets/Common/MockSlitCalculator.h index 9cd7cca8fef4d1cdfba5eb23dea74df04d472ca5..8bc2800a7dbe954839bd3cdb46c1496045932b47 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/MockSlitCalculator.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/MockSlitCalculator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/MultifitSetupDialog.h b/qt/widgets/common/inc/MantidQtWidgets/Common/MultifitSetupDialog.h index 94fbff4bbf2aab4101ca63c6bd175aa939c70a5c..ea3dd1a64e02eb1c615dae6f884652e9f5f96fcd 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/MultifitSetupDialog.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/MultifitSetupDialog.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/MuonFitDataSelector.h b/qt/widgets/common/inc/MantidQtWidgets/Common/MuonFitDataSelector.h index 9ae3c4e23900b5475b54248817309f7d3ca5c1c5..4baa49c3dbc1e196dbfc9eb8e0ba7d923958aa1f 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/MuonFitDataSelector.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/MuonFitDataSelector.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -48,8 +48,12 @@ public: /// Get names of chosen groups QStringList getChosenGroups() const override; /// Set chosen group/period - void setGroupsSelected(QStringList groups) { m_chosenGroups = groups; }; - void setPeriodsSelected(QStringList periods) { m_chosenPeriods = periods; }; + void setGroupsSelected(const QStringList &groups) { + m_chosenGroups = groups; + }; + void setPeriodsSelected(const QStringList &periods) { + m_chosenPeriods = periods; + }; /// Get selected periods QStringList getPeriodSelections() const override; /// Get type of fit diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/MuonFitPropertyBrowser.h b/qt/widgets/common/inc/MantidQtWidgets/Common/MuonFitPropertyBrowser.h index 0e4a707b80e3811bf433e1611a49bb49941c0070..3239b024b3f9eabf072d92a92184ec5764ce5c8b 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/MuonFitPropertyBrowser.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/MuonFitPropertyBrowser.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -128,8 +128,8 @@ public: void setChosenGroup(const QString &group); void setAllPeriods(); void setChosenPeriods(const QString &period); - void setSingleFitLabel(std::string name); - void setNormalization(const std::string name); + void setSingleFitLabel(const std::string &name); + void setNormalization(const std::string &name); void checkFitEnabled(); public slots: /// Perform the fit algorithm @@ -185,8 +185,8 @@ private: void finishAfterSimultaneousFit(const Mantid::API::IAlgorithm *fitAlg, const int nWorkspaces) const; void finishAfterTFSimultaneousFit(const Mantid::API::IAlgorithm *alg, - const std::string baseName) const; - void setFitWorkspaces(const std::string input); + const std::string &baseName) const; + void setFitWorkspaces(const std::string &input); std::string getUnnormName(const std::string wsName); void ConvertFitFunctionForMuonTFAsymmetry(bool enabled); void setTFAsymmMode(bool state); diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/MuonFunctionBrowser.h b/qt/widgets/common/inc/MantidQtWidgets/Common/MuonFunctionBrowser.h index 1f3a55b571cb29d281493303ec6b2aa70ffac240..56ca996251d5994d2afed58c440e119015fccde8 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/MuonFunctionBrowser.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/MuonFunctionBrowser.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/NonOrthogonal.h b/qt/widgets/common/inc/MantidQtWidgets/Common/NonOrthogonal.h index 6037d3637bd85b7ea441425fa970500ec8f55f96..773b926fd90c7f95fb981273c44ab6e25b522075 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/NonOrthogonal.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/NonOrthogonal.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -27,7 +27,8 @@ bool EXPORT_OPT_MANTIDQT_COMMON isHKLDimensions( const Mantid::API::IMDWorkspace &workspace, size_t dimX, size_t dimY); size_t EXPORT_OPT_MANTIDQT_COMMON getMissingHKLDimensionIndex( - Mantid::API::IMDWorkspace_const_sptr workspace, size_t dimX, size_t dimY); + const Mantid::API::IMDWorkspace_const_sptr &workspace, size_t dimX, + size_t dimY); void EXPORT_OPT_MANTIDQT_COMMON transformFromDoubleToCoordT(const Mantid::Kernel::DblMatrix &skewMatrix, diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/NotificationService.h b/qt/widgets/common/inc/MantidQtWidgets/Common/NotificationService.h index 561a08ca95be6a31e512341f182cf82dd5e9cc79..a7de23300f1a5cb497ad8de256105fa311f78c39 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/NotificationService.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/NotificationService.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/ObserverPattern.h b/qt/widgets/common/inc/MantidQtWidgets/Common/ObserverPattern.h index bfa5b26fca06ad727e58c376f1bf7faffc42f0e8..bc37c8d8aba73976ab8442290db68637535cfb9e 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/ObserverPattern.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/ObserverPattern.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include <functional> diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/OptionsPropertyWidget.h b/qt/widgets/common/inc/MantidQtWidgets/Common/OptionsPropertyWidget.h index 81301519b85820f11645f0d1562a9817a718e192..1cfac77db0288e7824e57a23794bb4bc8a66812b 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/OptionsPropertyWidget.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/OptionsPropertyWidget.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/ParseKeyValueString.h b/qt/widgets/common/inc/MantidQtWidgets/Common/ParseKeyValueString.h index a369df47983c2a78947c6a2086bb67a3b07707f7..f272ad63bf726012d4a6d553c0f29502f9e54137 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/ParseKeyValueString.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/ParseKeyValueString.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/ParseNumerics.h b/qt/widgets/common/inc/MantidQtWidgets/Common/ParseNumerics.h index 1853da2d35b1e6e1014e18320d402a90d9f8e540..aa54177921e5301739c3d89db7ec34ddb6ccdc51 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/ParseNumerics.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/ParseNumerics.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidQtWidgets/Common/DllOption.h" diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/PlotAxis.h b/qt/widgets/common/inc/MantidQtWidgets/Common/PlotAxis.h index 7613ed597ea174741346273e5578fae89bc8b4f2..1e709aaf3535c3750e4639d0d766faba4023b7ad 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/PlotAxis.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/PlotAxis.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/PluginLibraries.h b/qt/widgets/common/inc/MantidQtWidgets/Common/PluginLibraries.h index b895f0c8c173c0cd64b6d4f81926a0725f55bdd5..f84dd4db5c09fd97f3323d6964c62a1ff6af8e21 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/PluginLibraries.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/PluginLibraries.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -13,12 +13,13 @@ namespace MantidQt { namespace API { -EXPORT_OPT_MANTIDQT_COMMON std::string qtPluginPathFromCfg(std::string key); +EXPORT_OPT_MANTIDQT_COMMON std::string +qtPluginPathFromCfg(const std::string &key); /// Load plugins from a path given by the key in the config service -EXPORT_OPT_MANTIDQT_COMMON int loadPluginsFromCfgPath(std::string key); +EXPORT_OPT_MANTIDQT_COMMON int loadPluginsFromCfgPath(const std::string &key); /// Load plugins from a path -EXPORT_OPT_MANTIDQT_COMMON int loadPluginsFromPath(std::string path); +EXPORT_OPT_MANTIDQT_COMMON int loadPluginsFromPath(const std::string &path); } // namespace API } // namespace MantidQt diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/PrecompiledHeader.h b/qt/widgets/common/inc/MantidQtWidgets/Common/PrecompiledHeader.h index e163b14143c4ad0d705c9f49d17be9d1e204a89e..926762933c7da4accf860fdc2aaae69b315da21d 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/PrecompiledHeader.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/PrecompiledHeader.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/ProcessingAlgoWidget.h b/qt/widgets/common/inc/MantidQtWidgets/Common/ProcessingAlgoWidget.h index 12dd8d97eef2b0ce421a8a0b3dbf07c3545fc99e..913753c63a757c34952a88c430c1426e48c8fb59 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/ProcessingAlgoWidget.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/ProcessingAlgoWidget.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -34,7 +34,7 @@ public: /// @return the info string displayed at the top QString infoString() { return ui.lblInfo->text(); } /// Sets the info string displayed at the top - void infoString(QString text) { return ui.lblInfo->setText(text); } + void infoString(const QString &text) { return ui.lblInfo->setText(text); } /// @return true if the script editor is visible bool editorVisible() { return ui.editorContainer->isVisible(); } @@ -55,7 +55,7 @@ public: /// @return the text in the script editor QString getScriptText(); /// Set the script editor text - void setScriptText(QString text); + void setScriptText(const QString &text); void saveInput(); /// Sets the AlgorithmInputHistory object recording the algorithm properties diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/ProgressPresenter.h b/qt/widgets/common/inc/MantidQtWidgets/Common/ProgressPresenter.h index aa2a3fba136f62a4d0b4bbecda98e1096515ad4f..e0e37e03003aebb66a01257768d39c9e91044570 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/ProgressPresenter.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/ProgressPresenter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/ProgressableView.h b/qt/widgets/common/inc/MantidQtWidgets/Common/ProgressableView.h index 38fedbdeb7a8edece0e75349403d7d75f49b63b2..bb788f6f2a72c6750a83a69943fbac3577a83b7b 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/ProgressableView.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/ProgressableView.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/ProjectSaveModel.h b/qt/widgets/common/inc/MantidQtWidgets/Common/ProjectSaveModel.h index 5444574a027aba3b9075fc981c4a6cf39a1a69f0..25db0015b4a53286d66a4737851bf9c3f6f05039 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/ProjectSaveModel.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/ProjectSaveModel.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -45,9 +45,10 @@ struct WindowInfo { class EXPORT_OPT_MANTIDQT_COMMON ProjectSaveModel { public: /// Construct a new model instance with vector of window handles - ProjectSaveModel(std::vector<MantidQt::API::IProjectSerialisable *> windows, - std::vector<std::string> activePythonInterfaces = - std::vector<std::string>()); + ProjectSaveModel( + const std::vector<MantidQt::API::IProjectSerialisable *> &windows, + std::vector<std::string> activePythonInterfaces = + std::vector<std::string>()); /// Check if a workspace has any windows attached to it bool hasWindows(const std::string &ws) const; @@ -80,7 +81,7 @@ public: private: /// Create a workspace info object for this workspace WorkspaceInfo - makeWorkspaceInfoObject(Mantid::API::Workspace_const_sptr ws) const; + makeWorkspaceInfoObject(const Mantid::API::Workspace_const_sptr &ws) const; WindowInfo makeWindowInfoObject(MantidQt::API::IProjectSerialisable *window) const; diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/ProjectSavePresenter.h b/qt/widgets/common/inc/MantidQtWidgets/Common/ProjectSavePresenter.h index a1290a64ecdbc3f091cdd230990b537b30873b67..646b2ea505202b4cf8214aedaf386d0ed1ffb83b 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/ProjectSavePresenter.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/ProjectSavePresenter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/PropertyHandler.h b/qt/widgets/common/inc/MantidQtWidgets/Common/PropertyHandler.h index d786af57fa4af160920c5011c8fe95b0bf7b1759..1fa12b5f7bff5c48d3d4690c10a5c9926af7dcfe 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/PropertyHandler.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/PropertyHandler.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -42,7 +42,7 @@ class EXPORT_OPT_MANTIDQT_COMMON PropertyHandler Q_OBJECT public: // Constructor - PropertyHandler(Mantid::API::IFunction_sptr fun, + PropertyHandler(const Mantid::API::IFunction_sptr &fun, boost::shared_ptr<Mantid::API::CompositeFunction> parent, FitPropertyBrowser *browser, QtBrowserItem *item = nullptr); @@ -94,7 +94,7 @@ public: PropertyHandler *findHandler(QtProperty *prop); - PropertyHandler *findHandler(Mantid::API::IFunction_const_sptr fun); + PropertyHandler *findHandler(const Mantid::API::IFunction_const_sptr &fun); PropertyHandler *findHandler(const Mantid::API::IFunction *fun); /** @@ -184,7 +184,7 @@ public: void addTie(const QString &tieStr); void fix(const QString &parName); - void removeTie(QtProperty *prop, std::string globalName); + void removeTie(QtProperty *prop, const std::string &globalName); void removeTie(QtProperty *prop); void removeTie(const QString &propName); void addConstraint(QtProperty *parProp, bool lo, bool up, double loBound, diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/PropertyWidget.h b/qt/widgets/common/inc/MantidQtWidgets/Common/PropertyWidget.h index 5a6c07edca66b3fd5eb60abad60579f9e81fc521..d04b68c9d793aefefe355b46ef28921c0f3d2260 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/PropertyWidget.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/PropertyWidget.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/PropertyWidgetFactory.h b/qt/widgets/common/inc/MantidQtWidgets/Common/PropertyWidgetFactory.h index a37ab75e1e23c690ea1206895a5dfbb509655349..90219a6c59b623d50775e8a65e46d2604c61468e 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/PropertyWidgetFactory.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/PropertyWidgetFactory.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/Python/CodeExecution.h b/qt/widgets/common/inc/MantidQtWidgets/Common/Python/CodeExecution.h index 2b1776fc5a798539d6db0332d2610be4d76a19b7..f663f2a3a0eabf144d2845df0ff777415c373bb2 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/Python/CodeExecution.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/Python/CodeExecution.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/Python/Object.h b/qt/widgets/common/inc/MantidQtWidgets/Common/Python/Object.h index dd91c128f25e9607dd3bb502e085ab29c2e1c6e1..dd5d7bb3b806400ca0d48a4b32376b00f3215c90 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/Python/Object.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/Python/Object.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/Python/QHashToDict.h b/qt/widgets/common/inc/MantidQtWidgets/Common/Python/QHashToDict.h index 642f324e17d1d3c4efff7dcc7b9327393e5d41b5..5593b8f2ffe2aecabc970a494d48d0386700471c 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/Python/QHashToDict.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/Python/QHashToDict.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidQtWidgets/Common/DllOption.h" diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/Python/Sip.h b/qt/widgets/common/inc/MantidQtWidgets/Common/Python/Sip.h index 4ce163728c9d851eb1b175883fec29d9108053df..afe6e912e8bfb7fd5f0428bfe056acd2682f3f27 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/Python/Sip.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/Python/Sip.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/PythonRunner.h b/qt/widgets/common/inc/MantidQtWidgets/Common/PythonRunner.h index a388786b9e55ebf376a52b7fd9aa5fa5de2043f6..a003b8a9a30d0f85c3be824efee99c9a0622694e 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/PythonRunner.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/PythonRunner.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/QScienceSpinBox.h b/qt/widgets/common/inc/MantidQtWidgets/Common/QScienceSpinBox.h index 233a2fc7ec1612d9740b19f6f9c6358cdca81ea5..4142b5b77452cf4fe86815bf50befda0b29d471d 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/QScienceSpinBox.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/QScienceSpinBox.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/QStringUtils.h b/qt/widgets/common/inc/MantidQtWidgets/Common/QStringUtils.h index 4f8308b13b15b192de6ba17dae98279bf52fe244..64448eb6f1102bf0f285d6bf8638b1cfec81f645 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/QStringUtils.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/QStringUtils.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/QtJSONUtils.h b/qt/widgets/common/inc/MantidQtWidgets/Common/QtJSONUtils.h index 8900d00d7d7af95ee3eb7ba4222294e76995994b..44e7d90433398949c5fcd0eb2b8f8c8a065a603e 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/QtJSONUtils.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/QtJSONUtils.h @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #pragma once #include "DllOption.h" diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/QtPropertyBrowser/ButtonEditorFactory.h b/qt/widgets/common/inc/MantidQtWidgets/Common/QtPropertyBrowser/ButtonEditorFactory.h index 9f51ad04bd4d0709c02f76a92e9dbe0dbaa1aaee..368701d6814342f97b9266b9a8e833fc033c5744 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/QtPropertyBrowser/ButtonEditorFactory.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/QtPropertyBrowser/ButtonEditorFactory.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/QtPropertyBrowser/CompositeEditorFactory.h b/qt/widgets/common/inc/MantidQtWidgets/Common/QtPropertyBrowser/CompositeEditorFactory.h index af8ffddc090f68cc70c75626f86552b91dfb73d8..9ca596748b0fd9b05082f7ea33cbd26b3a48278b 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/QtPropertyBrowser/CompositeEditorFactory.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/QtPropertyBrowser/CompositeEditorFactory.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/QtPropertyBrowser/DoubleDialogEditor.h b/qt/widgets/common/inc/MantidQtWidgets/Common/QtPropertyBrowser/DoubleDialogEditor.h index 464fb05f901cc03077bc666f8b7c189e6408b892..34ec33db34a679a0179c1957f552b03c20c067e6 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/QtPropertyBrowser/DoubleDialogEditor.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/QtPropertyBrowser/DoubleDialogEditor.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/QtPropertyBrowser/DoubleEditorFactory.h b/qt/widgets/common/inc/MantidQtWidgets/Common/QtPropertyBrowser/DoubleEditorFactory.h index f05a2fd68a6f35a67b252cfad99cfb1a8820dae2..c9deff605d59d0f9fa1e1163d514fd9deda8bb27 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/QtPropertyBrowser/DoubleEditorFactory.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/QtPropertyBrowser/DoubleEditorFactory.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/QtPropertyBrowser/FilenameDialogEditor.cpp b/qt/widgets/common/inc/MantidQtWidgets/Common/QtPropertyBrowser/FilenameDialogEditor.cpp index 1cf0aa46dbb627a729a1c97f914b4394209ff43e..ed828e96a716d84f58b41f0195ca056dc0a86fef 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/QtPropertyBrowser/FilenameDialogEditor.cpp +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/QtPropertyBrowser/FilenameDialogEditor.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/FilenameDialogEditor.h" diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/QtPropertyBrowser/FilenameDialogEditor.h b/qt/widgets/common/inc/MantidQtWidgets/Common/QtPropertyBrowser/FilenameDialogEditor.h index e6795ba1e36411e272d75f28b8ec3a2666882785..2061def8267a50a382e749613d7f0875ebe29beb 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/QtPropertyBrowser/FilenameDialogEditor.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/QtPropertyBrowser/FilenameDialogEditor.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/QtPropertyBrowser/FormulaDialogEditor.h b/qt/widgets/common/inc/MantidQtWidgets/Common/QtPropertyBrowser/FormulaDialogEditor.h index 352dcda7ac16779a375e08de39705f0e7d8f863a..e360323f2d1f96fb315d21ff3304b6759c18767f 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/QtPropertyBrowser/FormulaDialogEditor.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/QtPropertyBrowser/FormulaDialogEditor.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/QtPropertyBrowser/ParameterPropertyManager.h b/qt/widgets/common/inc/MantidQtWidgets/Common/QtPropertyBrowser/ParameterPropertyManager.h index fd61738a07a349d9d0c914c36fa582fc5a692eaf..b93a3f1d527caebbe7577fb38840fa392d015caa 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/QtPropertyBrowser/ParameterPropertyManager.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/QtPropertyBrowser/ParameterPropertyManager.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/QtPropertyBrowser/StringDialogEditor.h b/qt/widgets/common/inc/MantidQtWidgets/Common/QtPropertyBrowser/StringDialogEditor.h index 2679ac1304d2c8a48fce9b4691c7d14296049386..58f6e2a6e2c88ce9d823ed9e2e253c82e72d55c1 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/QtPropertyBrowser/StringDialogEditor.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/QtPropertyBrowser/StringDialogEditor.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/QtPropertyBrowser/StringEditorFactory.h b/qt/widgets/common/inc/MantidQtWidgets/Common/QtPropertyBrowser/StringEditorFactory.h index 64a20f527577a6bd6c91dd013f74e60558512114..e437278b56b4be0391acbd60eb2ff1d9e831d1be 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/QtPropertyBrowser/StringEditorFactory.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/QtPropertyBrowser/StringEditorFactory.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/QtPropertyBrowser/WorkspaceEditorFactory.h b/qt/widgets/common/inc/MantidQtWidgets/Common/QtPropertyBrowser/WorkspaceEditorFactory.h index 1e25c1c9ba6c2731c07b3ea3e19400236168e35f..f95dfd4b8ef4dd8168db1f68a985245e8eccd511 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/QtPropertyBrowser/WorkspaceEditorFactory.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/QtPropertyBrowser/WorkspaceEditorFactory.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/QtPropertyBrowser/qtpropertybrowserutils_p.h b/qt/widgets/common/inc/MantidQtWidgets/Common/QtPropertyBrowser/qtpropertybrowserutils_p.h index 39f0522746e15312802508b4fcf4bec6a0567f7d..0d4a272bf932ae84cdf6bee28c2c827203778cfb 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/QtPropertyBrowser/qtpropertybrowserutils_p.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/QtPropertyBrowser/qtpropertybrowserutils_p.h @@ -192,7 +192,7 @@ private slots: private: void handleKeyEvent(QKeyEvent *e); - int translateModifiers(Qt::KeyboardModifiers state, + int translateModifiers(const Qt::KeyboardModifiers &state, const QString &text) const; int m_num; diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/QtSignalChannel.h b/qt/widgets/common/inc/MantidQtWidgets/Common/QtSignalChannel.h index c6a61fbbaa4c81f7f22b49333e508586edbbef1a..5792858ef3d4eb6b5b36c615bbb3873dba570f81 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/QtSignalChannel.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/QtSignalChannel.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/RenameParDialog.h b/qt/widgets/common/inc/MantidQtWidgets/Common/RenameParDialog.h index 4064a094a8c05661d67d1f8619dcd143b0791d6a..6dc605289ba481f2f93bef51a1a8fd9aba561651 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/RenameParDialog.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/RenameParDialog.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/RepoModel.h b/qt/widgets/common/inc/MantidQtWidgets/Common/RepoModel.h index 0b7f8188bfcfdc63560c0cb1229139f4a3359e2a..6f077ce2fe76d3c36810345146a420e444b52bb0 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/RepoModel.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/RepoModel.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidAPI/ScriptRepository.h" diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/RepoTreeView.h b/qt/widgets/common/inc/MantidQtWidgets/Common/RepoTreeView.h index 3f9668f0c65ee5107f2ca26218d4c67637e7bad9..24596e17fb158ada4a6383a59953a94d250360e9 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/RepoTreeView.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/RepoTreeView.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/SaveWorkspaces.h b/qt/widgets/common/inc/MantidQtWidgets/Common/SaveWorkspaces.h index 34a5546aaa2b0a584fcb48f1d5b67e3c0792ffa6..a0fcbbbfe2c9139ab2a9c82d41856571b7cfe7dc 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/SaveWorkspaces.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/SaveWorkspaces.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2010 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -77,7 +77,7 @@ private: QHash<QString, QString> workspaceMap); QHash<QString, QString> provideZeroFreeWorkspaces(const QListWidget *workspaces); - void removeZeroFreeWorkspaces(QHash<QString, QString> workspaces); + void removeZeroFreeWorkspaces(const QHash<QString, QString> &workspaces); bool isValid(); private slots: void saveSel(); diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/ScriptEditor.h b/qt/widgets/common/inc/MantidQtWidgets/Common/ScriptEditor.h index 5407509b1b4e692c8397f7e2c10649202ccbe1e7..317558316ec847cb0b405462fc64c55694421938 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/ScriptEditor.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/ScriptEditor.h @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #pragma once //---------------------------------- diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/ScriptRepositoryView.h b/qt/widgets/common/inc/MantidQtWidgets/Common/ScriptRepositoryView.h index 924051120ad8d3a3c628d52d41bb91c18ea60770..bbb6ecd5c853aa61aab6c6257a627ae5f81cbb92 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/ScriptRepositoryView.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/ScriptRepositoryView.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -37,7 +37,7 @@ class EXPORT_OPT_MANTIDQT_COMMON ScriptRepositoryView : public MantidDialog { const QModelIndex &index) override; QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const override; - QIcon getIcon(QString state) const; + QIcon getIcon(const QString &state) const; }; /// Delegate to show the checkbox for configuring the auto update class CheckBoxDelegate : public QStyledItemDelegate { @@ -78,7 +78,7 @@ protected slots: void updateModel(); void currentChanged(const QModelIndex ¤t); void helpClicked(); - void openFolderLink(QString /*link*/); + void openFolderLink(const QString & /*link*/); private: Ui::ScriptRepositoryView *ui; diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/SelectFunctionDialog.h b/qt/widgets/common/inc/MantidQtWidgets/Common/SelectFunctionDialog.h index 964e0090ab0311b494ae9bd8a190e79f1beab573..3ef78a5e58966698dc6b465b8c5fe2fa0bb60b40 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/SelectFunctionDialog.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/SelectFunctionDialog.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/SelectWorkspacesDialog.h b/qt/widgets/common/inc/MantidQtWidgets/Common/SelectWorkspacesDialog.h index 8fba396d142a2d399337adfeb64b4533fbd3bb9b..77f7ca52a6041d2b055409b2a8ca5741267793b1 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/SelectWorkspacesDialog.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/SelectWorkspacesDialog.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/SelectionNotificationService.h b/qt/widgets/common/inc/MantidQtWidgets/Common/SelectionNotificationService.h index 738b579dbd7d9980d4a752e7924fafb59dafb8fb..18926c94abfe06cd4ea0f32a50dad5c9e046773b 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/SelectionNotificationService.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/SelectionNotificationService.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2013 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/SequentialFitDialog.h b/qt/widgets/common/inc/MantidQtWidgets/Common/SequentialFitDialog.h index 60b75a2c9dcf38dc7ffb5470976c9478eefb1b38..9f6f9ec91a6b27c7609a414f8efab56173a03b7d 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/SequentialFitDialog.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/SequentialFitDialog.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -37,7 +37,7 @@ public: /// Add a list of workspace names to the data list /// Returns false if neither of the workspaces can be loaded - bool addWorkspaces(const QStringList wsNames); + bool addWorkspaces(const QStringList &wsNames); private: /// The form generated with Qt Designer @@ -84,7 +84,7 @@ private slots: private: /// Checks that the logs in workspace wsName are consistent /// with logs of other workspaces - bool validateLogs(const QString wsName); + bool validateLogs(const QString &wsName); /// Populate parameter combo box with possible parameter names void populateParameters(); diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/SignalBlocker.h b/qt/widgets/common/inc/MantidQtWidgets/Common/SignalBlocker.h index b589a0d339af61faf3218b910ee0d6a682459a89..eca367d166bccb943000d0f07e4a6cb0a6d58d52 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/SignalBlocker.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/SignalBlocker.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/SlicingAlgorithmDialog.h b/qt/widgets/common/inc/MantidQtWidgets/Common/SlicingAlgorithmDialog.h index a514674bdceaf94fde482cba9273c7956877b37a..8b65c65627856505c0529ae3a34568ccf51438c6 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/SlicingAlgorithmDialog.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/SlicingAlgorithmDialog.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -44,10 +44,10 @@ public: ~SlicingAlgorithmDialog() override; // Customisation for the VSI - void customiseLayoutForVsi(std::string initialWorkspace); + void customiseLayoutForVsi(const std::string &initialWorkspace); /// Reset the aligned dim values for the VSI - void resestAlignedDimProperty(size_t index, QString propertyValue); + void resestAlignedDimProperty(size_t index, const QString &propertyValue); protected: /// view @@ -96,7 +96,7 @@ private: /// Build dimension inputs. void makeDimensionInputs( const QString &propertyPrefix, QLayout *owningLayout, - QString (*format)(Mantid::Geometry::IMDDimension_const_sptr), + QString (*format)(const Mantid::Geometry::IMDDimension_const_sptr &), History history); /// Determine if history should be used. diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/SlitCalculator.h b/qt/widgets/common/inc/MantidQtWidgets/Common/SlitCalculator.h index 90b61d1356b9acb7badff44593a31fd9fcf6a229..c9cf9d3fedf6c912045e594313c1796a8db9f063 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/SlitCalculator.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/SlitCalculator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -37,10 +37,10 @@ private: Mantid::Geometry::Instrument_const_sptr instrument; std::string currentInstrumentName; void setupSlitCalculatorWithInstrumentValues( - Mantid::Geometry::Instrument_const_sptr /*instrument*/); + const Mantid::Geometry::Instrument_const_sptr & /*instrument*/); std::string getCurrentInstrumentName(); Mantid::Geometry::Instrument_const_sptr getInstrument(); - void setInstrument(std::string instrumentName); + void setInstrument(const std::string &instrumentName); private slots: void on_recalculate_triggered(); }; diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/SyncedCheckboxes.h b/qt/widgets/common/inc/MantidQtWidgets/Common/SyncedCheckboxes.h index 3afba732a28ad627fe8a64736aee1342d3494b78..c262096610630857125b9464499793806e99b05d 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/SyncedCheckboxes.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/SyncedCheckboxes.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/TSVSerialiser.h b/qt/widgets/common/inc/MantidQtWidgets/Common/TSVSerialiser.h index cc33813d820386ae51cb5ff8aed1b232763c7045..7fec9813d37849d5b893da6294bcdf812a2dc3f5 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/TSVSerialiser.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/TSVSerialiser.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -110,7 +110,7 @@ public: void storeDouble(const double val); void storeInt(const int val); - void storeString(const std::string val); + void storeString(const std::string &val); void storeBool(const bool val); double readDouble(); diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/Testing/QApplicationGlobalFixture.h b/qt/widgets/common/inc/MantidQtWidgets/Common/Testing/QApplicationGlobalFixture.h index 3dd2009411facc6acd95ef65e10d8216f0b7fd78..0f1761282a7e7da6fa182a1e4beeed7498f45ecc 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/Testing/QApplicationGlobalFixture.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/Testing/QApplicationGlobalFixture.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/TextPropertyWidget.h b/qt/widgets/common/inc/MantidQtWidgets/Common/TextPropertyWidget.h index 50ffacf974b1e32c85b82d25edaff433181a3de2..e2c06954b6ec51dff1ae60c8703a1b9d70c30709 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/TextPropertyWidget.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/TextPropertyWidget.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/TrackedAction.h b/qt/widgets/common/inc/MantidQtWidgets/Common/TrackedAction.h index 6e44482f6eea1fd9bf80fce68d4ad2f1960a7ac5..db5594bdb1201a4b579069bbc7baca5449b489e6 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/TrackedAction.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/TrackedAction.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/UserFunctionDialog.h b/qt/widgets/common/inc/MantidQtWidgets/Common/UserFunctionDialog.h index 426365224882f86d0c78c5ac9e9e005fa88a56fb..261060b036d2137068a11ad9074e8a05d7c874b7 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/UserFunctionDialog.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/UserFunctionDialog.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/UserInputValidator.h b/qt/widgets/common/inc/MantidQtWidgets/Common/UserInputValidator.h index d4bdddeb126b50122740ada84e0ca3ac3b71062a..8647a5dcc000ae1629870ffc82d9b398ba1d55b2 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/UserInputValidator.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/UserInputValidator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -80,12 +80,13 @@ public: /// Checks the number of histograms in a workspace bool checkWorkspaceNumberOfHistograms(QString const &workspaceName, std::size_t const &validSize); - bool checkWorkspaceNumberOfHistograms(Mantid::API::MatrixWorkspace_sptr, - std::size_t const &validSize); + bool + checkWorkspaceNumberOfHistograms(const Mantid::API::MatrixWorkspace_sptr &, + std::size_t const &validSize); /// Checks the number of bins in a workspace bool checkWorkspaceNumberOfBins(QString const &workspaceName, std::size_t const &validSize); - bool checkWorkspaceNumberOfBins(Mantid::API::MatrixWorkspace_sptr, + bool checkWorkspaceNumberOfBins(const Mantid::API::MatrixWorkspace_sptr &, std::size_t const &validSize); /// Checks that a workspace group contains valid matrix workspace's bool checkWorkspaceGroupIsValid(QString const &groupName, diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/UserSubWindow.h b/qt/widgets/common/inc/MantidQtWidgets/Common/UserSubWindow.h index 0abe307ff0eb0eebbffccda8e42587cab68f587b..9f950a74bf66b8f8abadcc3c24fe43ead9be66f8 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/UserSubWindow.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/UserSubWindow.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/UserSubWindowFactory.h b/qt/widgets/common/inc/MantidQtWidgets/Common/UserSubWindowFactory.h index ec7ba336de0c77b6cdfc62052234f13e8ca8c0a7..99c9a2c07daa8425944a2e52e167c022d38090d5 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/UserSubWindowFactory.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/UserSubWindowFactory.h @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #pragma once //------------------------ diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/VatesViewerInterface.h b/qt/widgets/common/inc/MantidQtWidgets/Common/VatesViewerInterface.h index 10ff3744c8274cb17c85364201fac079fe34b62b..2c070871c9606939488f1a886a84d862c5a60c00 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/VatesViewerInterface.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/VatesViewerInterface.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/WidgetDllOption.h b/qt/widgets/common/inc/MantidQtWidgets/Common/WidgetDllOption.h index 9fa90c30b14eaa5a1d20837f6b81ecd61025dfcf..765e8cb498df6f9d24c259dc44e7af36ddcf9652 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/WidgetDllOption.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/WidgetDllOption.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/WidgetScrollbarDecorator.h b/qt/widgets/common/inc/MantidQtWidgets/Common/WidgetScrollbarDecorator.h index 47a5ecd08eace83ee7b749155e168ea3f4c1c8f7..28c6a423b9d4ee0aa71547ac9b57d5bde4442a7a 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/WidgetScrollbarDecorator.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/WidgetScrollbarDecorator.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/WindowIcons.h b/qt/widgets/common/inc/MantidQtWidgets/Common/WindowIcons.h index 5b2e92d506b29c468f1d4c053cce76b314313a5f..fc536e7859fbbb92402969f305866bc72dd92e24 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/WindowIcons.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/WindowIcons.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/WorkspaceIcons.h b/qt/widgets/common/inc/MantidQtWidgets/Common/WorkspaceIcons.h index c5c0f64c2315f330914554dab9263f2dee0d0f21..ccb852b525e7f0c414c427c7b184085e4b7a40a9 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/WorkspaceIcons.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/WorkspaceIcons.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/WorkspaceObserver.h b/qt/widgets/common/inc/MantidQtWidgets/Common/WorkspaceObserver.h index d21ec9212e85dc5b544caa7c2cbc62b996b2b3c7..85c6d1f717b9106d9db848dfe63c7fcd1b157f73 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/WorkspaceObserver.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/WorkspaceObserver.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/WorkspacePresenter/ADSAdapter.h b/qt/widgets/common/inc/MantidQtWidgets/Common/WorkspacePresenter/ADSAdapter.h index e5c7a7552ad1fbae7013c151bc847aa6878603f2..889a37521311e8f8e4f4b5327fa4ce253299c799 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/WorkspacePresenter/ADSAdapter.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/WorkspacePresenter/ADSAdapter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/WorkspacePresenter/IWorkspaceDockView.h b/qt/widgets/common/inc/MantidQtWidgets/Common/WorkspacePresenter/IWorkspaceDockView.h index 6ec190e4815ea7809b6276c50cbbc96c34dbab53..ac9311732b16e3e0ddaec2de0a9e6dd3ada27085 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/WorkspacePresenter/IWorkspaceDockView.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/WorkspacePresenter/IWorkspaceDockView.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/WorkspacePresenter/ViewNotifiable.h b/qt/widgets/common/inc/MantidQtWidgets/Common/WorkspacePresenter/ViewNotifiable.h index af0e72ce88fa7dacf2cb68ef87347c04b7d302c6..5b9b94b3af3a1c27d3e23ec3ebe7ad8fcf98a7c5 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/WorkspacePresenter/ViewNotifiable.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/WorkspacePresenter/ViewNotifiable.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once /** diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/WorkspacePresenter/WorkspaceDockMockObjects.h b/qt/widgets/common/inc/MantidQtWidgets/Common/WorkspacePresenter/WorkspaceDockMockObjects.h index 01586892eb0f1d96f535d25361455a6c375917a3..1958697673df2862d7a7f09aa61b862f3aa4f8b0 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/WorkspacePresenter/WorkspaceDockMockObjects.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/WorkspacePresenter/WorkspaceDockMockObjects.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/WorkspacePresenter/WorkspacePresenter.h b/qt/widgets/common/inc/MantidQtWidgets/Common/WorkspacePresenter/WorkspacePresenter.h index 7f62b4a5feb8793e28c7591fecfd06f5fc8a7491..c76f526297fed0cf7aa6a116ef5a90e2600bfddb 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/WorkspacePresenter/WorkspacePresenter.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/WorkspacePresenter/WorkspacePresenter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/WorkspacePresenter/WorkspaceProvider.h b/qt/widgets/common/inc/MantidQtWidgets/Common/WorkspacePresenter/WorkspaceProvider.h index f4203c637d4146d6efec0066ac51c919d382c1ee..1017308f50bb1ef0ee8f6f2eb8ad0626baeb74d2 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/WorkspacePresenter/WorkspaceProvider.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/WorkspacePresenter/WorkspaceProvider.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/WorkspacePresenter/WorkspaceProviderNotifiable.h b/qt/widgets/common/inc/MantidQtWidgets/Common/WorkspacePresenter/WorkspaceProviderNotifiable.h index e53e80c6d06e30b27c9555b24595043d2afae395..3d418be4e00e23ab504342bafe7e5d8c97e4670c 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/WorkspacePresenter/WorkspaceProviderNotifiable.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/WorkspacePresenter/WorkspaceProviderNotifiable.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/WorkspacePresenter/WorkspaceTreeWidget.h b/qt/widgets/common/inc/MantidQtWidgets/Common/WorkspacePresenter/WorkspaceTreeWidget.h index 2ca6dd0d1ad55aa866b469b85d65792d3a8b28f3..3f744bcbb7ae52ec7cc3536ba26fe5aae5b16818 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/WorkspacePresenter/WorkspaceTreeWidget.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/WorkspacePresenter/WorkspaceTreeWidget.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2016 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -131,7 +131,8 @@ public: private: bool hasUBMatrix(const std::string &wsName); - void addSaveMenuOption(QString algorithmString, QString menuEntryName = ""); + void addSaveMenuOption(const QString &algorithmString, + QString menuEntryName = ""); void setTreeUpdating(const bool state); inline bool isTreeUpdating() const { return m_treeUpdating; } void updateTree(const TopLevelItems &items) override; @@ -140,7 +141,7 @@ private: MantidTreeWidgetItem * addTreeEntry(const std::pair<std::string, Mantid::API::Workspace_sptr> &item, QTreeWidgetItem *parent = nullptr); - bool shouldBeSelected(QString name) const; + bool shouldBeSelected(const QString &name) const; void createWorkspaceMenuActions(); void createSortMenuActions(); void setItemIcon(QTreeWidgetItem *item, const std::string &wsID); diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/WorkspacePresenter/WorkspaceTreeWidgetSimple.h b/qt/widgets/common/inc/MantidQtWidgets/Common/WorkspacePresenter/WorkspaceTreeWidgetSimple.h index 0b8320f2001165d3f2ceca35e66788256ea9e048..c4e0dbb59c680bb10b20b172d7d207e718a4d720 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/WorkspacePresenter/WorkspaceTreeWidgetSimple.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/WorkspacePresenter/WorkspaceTreeWidgetSimple.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/WorkspaceSelector.h b/qt/widgets/common/inc/MantidQtWidgets/Common/WorkspaceSelector.h index e53b14f9aaddf7916a7cf5b9a5c6488b2069b989..e01677133bdc416afb2b8e06d4dcf5f0fe89bbe5 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/WorkspaceSelector.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/WorkspaceSelector.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -94,9 +94,9 @@ private: handleReplaceEvent(Mantid::API::WorkspaceAfterReplaceNotification_ptr pNf); bool checkEligibility(const QString &name, - Mantid::API::Workspace_sptr object) const; + const Mantid::API::Workspace_sptr &object) const; bool hasValidSuffix(const QString &name) const; - bool hasValidNumberOfBins(Mantid::API::Workspace_sptr object) const; + bool hasValidNumberOfBins(const Mantid::API::Workspace_sptr &object) const; protected: // Method for handling drop events diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/pqHelpWindow.h b/qt/widgets/common/inc/MantidQtWidgets/Common/pqHelpWindow.h index 3ad5450c2912319e3cb31eb75fd62907d3bb1c83..e3ae6d05ee26dd87e1c48bfba94c8f3f8f26e152 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/pqHelpWindow.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/pqHelpWindow.h @@ -78,7 +78,7 @@ class EXPORT_OPT_MANTIDQT_COMMON pqHelpWindow : public QMainWindow { public: pqHelpWindow(QHelpEngine *engine, QWidget *parent = nullptr, - Qt::WindowFlags flags = nullptr); + const Qt::WindowFlags &flags = nullptr); public slots: /// Requests showing of a particular page. The url must begin with "qthelp:" diff --git a/qt/widgets/common/src/AlgorithmDialog.cpp b/qt/widgets/common/src/AlgorithmDialog.cpp index 350dc748299426c983c614cc9abee568e6a04f9c..9a29351738bd4969e4fe7a5ab0202ccf0c8cc8f3 100644 --- a/qt/widgets/common/src/AlgorithmDialog.cpp +++ b/qt/widgets/common/src/AlgorithmDialog.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/AlgorithmManager.h" #include "MantidAPI/IWorkspaceProperty.h" @@ -180,7 +180,7 @@ void AlgorithmDialog::saveInput() { * Set the algorithm pointer * @param alg :: A pointer to the algorithm */ -void AlgorithmDialog::setAlgorithm(Mantid::API::IAlgorithm_sptr alg) { +void AlgorithmDialog::setAlgorithm(const Mantid::API::IAlgorithm_sptr &alg) { m_algorithm = alg; m_algName = QString::fromStdString(alg->name()); m_algProperties.clear(); @@ -330,7 +330,7 @@ void AlgorithmDialog::showValidators() { * end. * @return true if the property is valid. */ -bool AlgorithmDialog::setPropertyValue(const QString pName, +bool AlgorithmDialog::setPropertyValue(const QString &pName, bool validateOthers) { // Mantid::Kernel::Property *p = getAlgorithmProperty(pName); QString value = getInputValue(pName); @@ -808,15 +808,12 @@ void AlgorithmDialog::executeAlgorithmAsync() { } //------------------------------------------------------------------------------------------------- -/* - */ + void AlgorithmDialog::removeAlgorithmFromManager() { using namespace Mantid::API; AlgorithmManager::Instance().removeById(m_algorithm->getAlgorithmID()); } -/** - */ void AlgorithmDialog::enableExitButton() { m_exitButton->setEnabled(true); } //------------------------------------------------------ diff --git a/qt/widgets/common/src/AlgorithmHistoryWindow.cpp b/qt/widgets/common/src/AlgorithmHistoryWindow.cpp index 73d1c31660661dae6799f7b278a8ea15fb9bac15..c6308d8aab9b4f304f2715b060729c322a8287bb 100644 --- a/qt/widgets/common/src/AlgorithmHistoryWindow.cpp +++ b/qt/widgets/common/src/AlgorithmHistoryWindow.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/AlgorithmManager.h" #include "MantidAPI/AnalysisDataService.h" @@ -60,7 +60,7 @@ AlgExecSummaryGrpBox::AlgExecSummaryGrpBox(QWidget *w) : QGroupBox(w), m_execDurationlabel(nullptr), m_execDurationEdit(nullptr), m_Datelabel(nullptr), m_execDateTimeEdit(nullptr), m_algexecDuration() {} -AlgExecSummaryGrpBox::AlgExecSummaryGrpBox(QString title, QWidget *w) +AlgExecSummaryGrpBox::AlgExecSummaryGrpBox(const QString &title, QWidget *w) : QGroupBox(title, w), m_execDurationlabel(nullptr), m_execDurationEdit(nullptr), m_Datelabel(nullptr), m_execDateTimeEdit(nullptr), m_algexecDuration() { @@ -135,7 +135,7 @@ AlgEnvHistoryGrpBox::AlgEnvHistoryGrpBox(QWidget *w) m_osVersionLabel(nullptr), m_osVersionEdit(nullptr), m_frmworkVersionLabel(nullptr), m_frmwkVersnEdit(nullptr) {} -AlgEnvHistoryGrpBox::AlgEnvHistoryGrpBox(QString title, QWidget *w) +AlgEnvHistoryGrpBox::AlgEnvHistoryGrpBox(const QString &title, QWidget *w) : QGroupBox(title, w), m_osNameLabel(nullptr), m_osNameEdit(nullptr), m_osVersionLabel(nullptr), m_osVersionEdit(nullptr), m_frmworkVersionLabel(nullptr), m_frmwkVersnEdit(nullptr) { @@ -202,7 +202,7 @@ AlgEnvHistoryGrpBox::~AlgEnvHistoryGrpBox() { } AlgorithmHistoryWindow::AlgorithmHistoryWindow( - QWidget *parent, const boost::shared_ptr<const Workspace> wsptr) + QWidget *parent, const boost::shared_ptr<const Workspace> &wsptr) : QDialog(parent), m_algHist(wsptr->getHistory()), m_histPropWindow(nullptr), m_execSumGrpBox(nullptr), m_envHistGrpBox(nullptr), m_wsName(wsptr->getName().c_str()), @@ -464,13 +464,13 @@ void AlgEnvHistoryGrpBox::fillEnvHistoryGroupBox( } void AlgorithmHistoryWindow::updateAll( - Mantid::API::AlgorithmHistory_const_sptr algHistory) { + const Mantid::API::AlgorithmHistory_const_sptr &algHistory) { updateAlgHistoryProperties(algHistory); updateExecSummaryGrpBox(algHistory); } void AlgorithmHistoryWindow::updateAlgHistoryProperties( - AlgorithmHistory_const_sptr algHistory) { + const AlgorithmHistory_const_sptr &algHistory) { PropertyHistories histProp = algHistory->getProperties(); if (m_histPropWindow) { m_histPropWindow->setAlgProperties(histProp); @@ -480,7 +480,7 @@ void AlgorithmHistoryWindow::updateAlgHistoryProperties( } void AlgorithmHistoryWindow::updateExecSummaryGrpBox( - AlgorithmHistory_const_sptr algHistory) { + const AlgorithmHistory_const_sptr &algHistory) { // getting the selected algorithm at pos from History vector double duration = algHistory->executionDuration(); Mantid::Types::Core::DateAndTime date = algHistory->executionDate(); @@ -766,7 +766,8 @@ void AlgHistoryTreeWidget::populateAlgHistoryTreeWidget( } void AlgHistoryTreeWidget::populateNestedHistory( - AlgHistoryItem *parentWidget, Mantid::API::AlgorithmHistory_sptr history) { + AlgHistoryItem *parentWidget, + const Mantid::API::AlgorithmHistory_sptr &history) { const Mantid::API::AlgorithmHistories &entries = history->getChildHistories(); if (history->childHistorySize() > 0) { parentWidget->setFlags(Qt::ItemIsUserCheckable | Qt::ItemIsSelectable | diff --git a/qt/widgets/common/src/AlgorithmInputHistory.cpp b/qt/widgets/common/src/AlgorithmInputHistory.cpp index d48df016184f6b054b1bc3f54daba98a2f312c6c..84228b2ae6e6fcdb06981e82bd2cfc13bbd3b2c8 100644 --- a/qt/widgets/common/src/AlgorithmInputHistory.cpp +++ b/qt/widgets/common/src/AlgorithmInputHistory.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------- // Includes @@ -12,6 +12,7 @@ #include <QSettings> #include <QStringList> +#include <utility> using namespace MantidQt::API; @@ -23,9 +24,9 @@ using namespace MantidQt::API; * Constructor */ AbstractAlgorithmInputHistory::AbstractAlgorithmInputHistory( - QString settingsGroup) - : m_lastInput(), m_previousDirectory(""), m_algorithmsGroup(settingsGroup), - m_dirKey("LastDirectory") { + const QString &settingsGroup) + : m_lastInput(), m_previousDirectory(""), + m_algorithmsGroup(std::move(settingsGroup)), m_dirKey("LastDirectory") { // Fill the stored map from the QSettings information load(); } diff --git a/qt/widgets/common/src/AlgorithmProgress/AlgorithmProgressDialogPresenter.cpp b/qt/widgets/common/src/AlgorithmProgress/AlgorithmProgressDialogPresenter.cpp index 7d83d957311ef06aafa8659519fed0302c2f5966..0a21f3aaf2d679f75f546ee2752a58ceaa4200fc 100644 --- a/qt/widgets/common/src/AlgorithmProgress/AlgorithmProgressDialogPresenter.cpp +++ b/qt/widgets/common/src/AlgorithmProgress/AlgorithmProgressDialogPresenter.cpp @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #include "MantidQtWidgets/Common/AlgorithmProgress/AlgorithmProgressDialogPresenter.h" #include "MantidAPI/Algorithm.h" #include "MantidAPI/AlgorithmManager.h" diff --git a/qt/widgets/common/src/AlgorithmProgress/AlgorithmProgressDialogWidget.cpp b/qt/widgets/common/src/AlgorithmProgress/AlgorithmProgressDialogWidget.cpp index 166d480af8fd8ee41532f0fd8b5b9e21daca63d8..721715b3af88a054b856dbf610fffdb030b3a22f 100644 --- a/qt/widgets/common/src/AlgorithmProgress/AlgorithmProgressDialogWidget.cpp +++ b/qt/widgets/common/src/AlgorithmProgress/AlgorithmProgressDialogWidget.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/AlgorithmProgress/AlgorithmProgressDialogWidget.h" #include "MantidQtWidgets/Common/AlgorithmProgress/AlgorithmProgressModel.h" diff --git a/qt/widgets/common/src/AlgorithmProgress/AlgorithmProgressModel.cpp b/qt/widgets/common/src/AlgorithmProgress/AlgorithmProgressModel.cpp index db8e86537ab72c302865cb39404f8b327364304e..4646c0a2778f225502688d7b33fd2ff02fafe49d 100644 --- a/qt/widgets/common/src/AlgorithmProgress/AlgorithmProgressModel.cpp +++ b/qt/widgets/common/src/AlgorithmProgress/AlgorithmProgressModel.cpp @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #include "MantidQtWidgets/Common/AlgorithmProgress/AlgorithmProgressModel.h" #include "MantidQtWidgets/Common/AlgorithmProgress/AlgorithmProgressDialogPresenter.h" #include "MantidQtWidgets/Common/AlgorithmProgress/AlgorithmProgressPresenter.h" diff --git a/qt/widgets/common/src/AlgorithmProgress/AlgorithmProgressPresenter.cpp b/qt/widgets/common/src/AlgorithmProgress/AlgorithmProgressPresenter.cpp index bd8fe59c6974cae78a99f72123e04bab22f868ab..6d1935dfff3da32ba3c114a9dae4a09743d5f7db 100644 --- a/qt/widgets/common/src/AlgorithmProgress/AlgorithmProgressPresenter.cpp +++ b/qt/widgets/common/src/AlgorithmProgress/AlgorithmProgressPresenter.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/AlgorithmProgress/AlgorithmProgressPresenter.h" #include "MantidQtWidgets/Common/AlgorithmProgress/AlgorithmProgressWidget.h" diff --git a/qt/widgets/common/src/AlgorithmProgress/AlgorithmProgressPresenterBase.cpp b/qt/widgets/common/src/AlgorithmProgress/AlgorithmProgressPresenterBase.cpp index cb3d73124e04b8351d9c17991698bb64fae1d51b..cf6eea9c6b26201014390cb59f554cb23cb08c3d 100644 --- a/qt/widgets/common/src/AlgorithmProgress/AlgorithmProgressPresenterBase.cpp +++ b/qt/widgets/common/src/AlgorithmProgress/AlgorithmProgressPresenterBase.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/AlgorithmProgress/AlgorithmProgressPresenterBase.h" #include <QProgressBar> diff --git a/qt/widgets/common/src/AlgorithmProgress/AlgorithmProgressWidget.cpp b/qt/widgets/common/src/AlgorithmProgress/AlgorithmProgressWidget.cpp index 839e4af9647b7b6546483909230ee9aa7d3a76b3..63f31dd0323482e3c6e119f793ebc2d61b5897eb 100644 --- a/qt/widgets/common/src/AlgorithmProgress/AlgorithmProgressWidget.cpp +++ b/qt/widgets/common/src/AlgorithmProgress/AlgorithmProgressWidget.cpp @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #include "MantidQtWidgets/Common/AlgorithmProgress/AlgorithmProgressWidget.h" #include "MantidQtWidgets/Common/AlgorithmProgress/AlgorithmProgressDialogWidget.h" #include "MantidQtWidgets/Common/AlgorithmProgress/AlgorithmProgressPresenter.h" diff --git a/qt/widgets/common/src/AlgorithmPropertiesWidget.cpp b/qt/widgets/common/src/AlgorithmPropertiesWidget.cpp index dbe76e83f228e491078c4c274f89a4df94dfdb4c..ffb6d372ccf23b521b5515fac66b0b6e7549b7c2 100644 --- a/qt/widgets/common/src/AlgorithmPropertiesWidget.cpp +++ b/qt/widgets/common/src/AlgorithmPropertiesWidget.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/AlgorithmPropertiesWidget.h" @@ -23,6 +23,8 @@ #include <QScrollArea> #include <algorithm> +#include <utility> + #include <vector> using namespace Mantid::Kernel; @@ -98,7 +100,7 @@ Mantid::API::IAlgorithm_sptr AlgorithmPropertiesWidget::getAlgorithm() { * * @param algo :: IAlgorithm bare ptr */ void AlgorithmPropertiesWidget::setAlgorithm( - Mantid::API::IAlgorithm_sptr algo) { + const Mantid::API::IAlgorithm_sptr &algo) { if (!algo) return; saveInput(); @@ -118,7 +120,7 @@ QString AlgorithmPropertiesWidget::getAlgorithmName() const { * @param name :: The algorithm name*/ void AlgorithmPropertiesWidget::setAlgorithmName(QString name) { FrameworkManager::Instance(); - m_algoName = name; + m_algoName = std::move(name); try { Algorithm_sptr alg = AlgorithmManager::Instance().createUnmanaged(m_algoName.toStdString()); diff --git a/qt/widgets/common/src/AlgorithmRunner.cpp b/qt/widgets/common/src/AlgorithmRunner.cpp index cff3eaf35b68ad38867a286643c8d55c62ebb008..b334018d803779fa0adb413d0080aaca5b906350 100644 --- a/qt/widgets/common/src/AlgorithmRunner.cpp +++ b/qt/widgets/common/src/AlgorithmRunner.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/AlgorithmRunner.h" diff --git a/qt/widgets/common/src/AlgorithmSelectorWidget.cpp b/qt/widgets/common/src/AlgorithmSelectorWidget.cpp index 54bc2c800b5fd19e8b637fb65783270632bd7bbf..d0a604f4025d0c491ccafe697b6e3c60248f1671 100644 --- a/qt/widgets/common/src/AlgorithmSelectorWidget.cpp +++ b/qt/widgets/common/src/AlgorithmSelectorWidget.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/AlgorithmSelectorWidget.h" #include "MantidAPI/AlgorithmManager.h" diff --git a/qt/widgets/common/src/AlternateCSPythonLexer.cpp b/qt/widgets/common/src/AlternateCSPythonLexer.cpp index 76624656afbd87850231f554a0cf82178f6bb5b1..9b1d0fb38ad61f2acecbee568093e9a65257541f 100644 --- a/qt/widgets/common/src/AlternateCSPythonLexer.cpp +++ b/qt/widgets/common/src/AlternateCSPythonLexer.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/AlternateCSPythonLexer.h" diff --git a/qt/widgets/common/src/Batch/BuildSubtreeItems.cpp b/qt/widgets/common/src/Batch/BuildSubtreeItems.cpp index 348ca2a32ab5861b4b6487a81a0dfc8e63621720..9218ff5845e6fa808dfc216598f6c07cd0b173f0 100644 --- a/qt/widgets/common/src/Batch/BuildSubtreeItems.cpp +++ b/qt/widgets/common/src/Batch/BuildSubtreeItems.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/Batch/BuildSubtreeItems.h" diff --git a/qt/widgets/common/src/Batch/Cell.cpp b/qt/widgets/common/src/Batch/Cell.cpp index d7c33d6abe2bcc1d4d63ba92b6a5ce747001d24f..c2a8403b1cbdadbfe6de31945c4f9eaac8a1a6e5 100644 --- a/qt/widgets/common/src/Batch/Cell.cpp +++ b/qt/widgets/common/src/Batch/Cell.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/Batch/Cell.h" #include <ostream> diff --git a/qt/widgets/common/src/Batch/CellDelegate.cpp b/qt/widgets/common/src/Batch/CellDelegate.cpp index 5d27fd754d1119080cde79dacba4ff95fc284378..f650e5d4b500779b9533149fa869c370e25da4fa 100644 --- a/qt/widgets/common/src/Batch/CellDelegate.cpp +++ b/qt/widgets/common/src/Batch/CellDelegate.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/Batch/CellDelegate.h" #include "MantidQtWidgets/Common/Batch/CellStandardItem.h" diff --git a/qt/widgets/common/src/Batch/CellStandardItem.cpp b/qt/widgets/common/src/Batch/CellStandardItem.cpp index f8c54944820c40b65375e3b3d5daa19d8204b2a4..ee7c01e13b1e1838c109e2e854d1d0df080e5b15 100644 --- a/qt/widgets/common/src/Batch/CellStandardItem.cpp +++ b/qt/widgets/common/src/Batch/CellStandardItem.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/Batch/CellStandardItem.h" namespace MantidQt { diff --git a/qt/widgets/common/src/Batch/ExtractSubtrees.cpp b/qt/widgets/common/src/Batch/ExtractSubtrees.cpp index 9cbf4628299742491875e242ba44383c3724e7fb..38f897eefe640f241318d22fca993930967f3eaf 100644 --- a/qt/widgets/common/src/Batch/ExtractSubtrees.cpp +++ b/qt/widgets/common/src/Batch/ExtractSubtrees.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/Batch/ExtractSubtrees.h" #include <boost/iterator/transform_iterator.hpp> diff --git a/qt/widgets/common/src/Batch/FilteredTreeModel.cpp b/qt/widgets/common/src/Batch/FilteredTreeModel.cpp index 99bf835eacd2943d11270e53cfd94f7bc1551daa..ab1e94439ade0e1799eec1bd2cbc6e6ef5e3b310 100644 --- a/qt/widgets/common/src/Batch/FilteredTreeModel.cpp +++ b/qt/widgets/common/src/Batch/FilteredTreeModel.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/Batch/FilteredTreeModel.h" #include "MantidQtWidgets/Common/Batch/StrictQModelIndices.h" diff --git a/qt/widgets/common/src/Batch/FindSubtreeRoots.cpp b/qt/widgets/common/src/Batch/FindSubtreeRoots.cpp index d986419fb1da6d305bdebc38cac82e4a40b119bb..5b45bcd2c21046f86c4c596d4807263bc9625a60 100644 --- a/qt/widgets/common/src/Batch/FindSubtreeRoots.cpp +++ b/qt/widgets/common/src/Batch/FindSubtreeRoots.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/Batch/FindSubtreeRoots.h" #include "MantidQtWidgets/Common/Batch/Subtree.h" diff --git a/qt/widgets/common/src/Batch/JobTreeView.cpp b/qt/widgets/common/src/Batch/JobTreeView.cpp index 3fadc6d4d6240366027750c8dfe6b69c97873539..a9258adaf904774c6f1e9dad3f0082addb5e709f 100644 --- a/qt/widgets/common/src/Batch/JobTreeView.cpp +++ b/qt/widgets/common/src/Batch/JobTreeView.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/Batch/JobTreeView.h" #include "MantidQtWidgets/Common/Batch/AssertOrThrow.h" diff --git a/qt/widgets/common/src/Batch/JobTreeViewSignalAdapter.cpp b/qt/widgets/common/src/Batch/JobTreeViewSignalAdapter.cpp index 57105175013acce8f4c018daa1672b2c9e47013d..ba19d6fcb1496075144d91a2a1e83dcb9988d835 100644 --- a/qt/widgets/common/src/Batch/JobTreeViewSignalAdapter.cpp +++ b/qt/widgets/common/src/Batch/JobTreeViewSignalAdapter.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/Batch/JobTreeViewSignalAdapter.h" diff --git a/qt/widgets/common/src/Batch/QtBasicNavigation.cpp b/qt/widgets/common/src/Batch/QtBasicNavigation.cpp index b72d9ef62cbe614ab6a56110f56b312ac1d0b2b3..a26daeab93b4ab09b7f4f97b7e293cf4347e7992 100644 --- a/qt/widgets/common/src/Batch/QtBasicNavigation.cpp +++ b/qt/widgets/common/src/Batch/QtBasicNavigation.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/Batch/QtBasicNavigation.h" diff --git a/qt/widgets/common/src/Batch/QtStandardItemTreeAdapter.cpp b/qt/widgets/common/src/Batch/QtStandardItemTreeAdapter.cpp index 970d3bd94bf28bdcbe15deaea158497423dbe739..23fa12aef52cf1ad4ed993a34f5f31749ceae171 100644 --- a/qt/widgets/common/src/Batch/QtStandardItemTreeAdapter.cpp +++ b/qt/widgets/common/src/Batch/QtStandardItemTreeAdapter.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/Batch/QtStandardItemTreeAdapter.h" #include "MantidQtWidgets/Common/Batch/AssertOrThrow.h" diff --git a/qt/widgets/common/src/Batch/QtTreeCursorNavigation.cpp b/qt/widgets/common/src/Batch/QtTreeCursorNavigation.cpp index 8e1a50a975a51c9dede4d2babf01de4e67361dfa..20ec0e05000d66b91571d8aef78f63ded9f58e99 100644 --- a/qt/widgets/common/src/Batch/QtTreeCursorNavigation.cpp +++ b/qt/widgets/common/src/Batch/QtTreeCursorNavigation.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/Batch/QtTreeCursorNavigation.h" #include "MantidQtWidgets/Common/Batch/QtBasicNavigation.h" diff --git a/qt/widgets/common/src/Batch/Row.cpp b/qt/widgets/common/src/Batch/Row.cpp index aeec8fac3293b2a3e5bd5c4da382609c9f27c686..1b82dfe5b8426074cd8abe6c97a342f030539eb2 100644 --- a/qt/widgets/common/src/Batch/Row.cpp +++ b/qt/widgets/common/src/Batch/Row.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/Batch/Row.h" #include "MantidQtWidgets/Common/Batch/AssertOrThrow.h" diff --git a/qt/widgets/common/src/Batch/RowLocation.cpp b/qt/widgets/common/src/Batch/RowLocation.cpp index 149fe2a9db9eccda54533157e02628aca094f2ef..17a93674670c82ec90a9b0cca14e4a4829563f95 100644 --- a/qt/widgets/common/src/Batch/RowLocation.cpp +++ b/qt/widgets/common/src/Batch/RowLocation.cpp @@ -1,12 +1,13 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/Batch/RowLocation.h" #include "MantidQtWidgets/Common/Batch/AssertOrThrow.h" #include <boost/algorithm/string/predicate.hpp> +#include <utility> #include "MantidQtWidgets/Common/Batch/equal.hpp" // equivalent to @@ -18,7 +19,7 @@ namespace MantidQt { namespace MantidWidgets { namespace Batch { -RowLocation::RowLocation(RowPath path) : m_path(path) {} +RowLocation::RowLocation(RowPath path) : m_path(std::move(path)) {} RowPath const &RowLocation::path() const { return m_path; } int RowLocation::rowRelativeToParent() const { return m_path.back(); } bool RowLocation::isRoot() const { return m_path.empty(); } diff --git a/qt/widgets/common/src/Batch/RowLocationAdapter.cpp b/qt/widgets/common/src/Batch/RowLocationAdapter.cpp index 7245591a9a925bc257bb64c470cdcbeeb282437b..1ba13ae99a3917a9d37e96bccf016ada9ad1e34d 100644 --- a/qt/widgets/common/src/Batch/RowLocationAdapter.cpp +++ b/qt/widgets/common/src/Batch/RowLocationAdapter.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/Batch/RowLocationAdapter.h" namespace MantidQt { diff --git a/qt/widgets/common/src/Batch/RowPredicate.cpp b/qt/widgets/common/src/Batch/RowPredicate.cpp index 0791707c4bc9a3e0fbbb9e21eb56f27c5406a5bf..ac0bd56062bb5ef27968581959b33a1b349c7c46 100644 --- a/qt/widgets/common/src/Batch/RowPredicate.cpp +++ b/qt/widgets/common/src/Batch/RowPredicate.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/Batch/RowPredicate.h" #include "MantidQtWidgets/Common/Batch/StrictQModelIndices.h" diff --git a/qt/widgets/common/src/BatchAlgorithmRunner.cpp b/qt/widgets/common/src/BatchAlgorithmRunner.cpp index 8d3a8ef69a8625f954acfdfa67f8e7a111c56566..a7aea0cff7ee7c9e266c26faf84a9558e59c9f54 100644 --- a/qt/widgets/common/src/BatchAlgorithmRunner.cpp +++ b/qt/widgets/common/src/BatchAlgorithmRunner.cpp @@ -1,9 +1,11 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + +#include <utility> + #include "MantidQtWidgets/Common/BatchAlgorithmRunner.h" #include "MantidAPI/AlgorithmManager.h" @@ -20,7 +22,7 @@ namespace API { ConfiguredAlgorithm::ConfiguredAlgorithm(Mantid::API::IAlgorithm_sptr algorithm, AlgorithmRuntimeProps properties) - : m_algorithm(algorithm), m_properties(std::move(properties)) {} + : m_algorithm(std::move(algorithm)), m_properties(std::move(properties)) {} ConfiguredAlgorithm::~ConfiguredAlgorithm() {} @@ -82,8 +84,8 @@ void BatchAlgorithmRunner::stopOnFailure(bool stopOnFailure) { * @param props Optional map of property name to property values to be set just *before execution (mainly intended for input and inout workspace names) */ -void BatchAlgorithmRunner::addAlgorithm(IAlgorithm_sptr algo, - AlgorithmRuntimeProps props) { +void BatchAlgorithmRunner::addAlgorithm(const IAlgorithm_sptr &algo, + const AlgorithmRuntimeProps &props) { m_algorithms.emplace_back(std::make_unique<ConfiguredAlgorithm>(algo, props)); g_log.debug() << "Added algorithm \"" @@ -216,7 +218,8 @@ bool BatchAlgorithmRunner::executeBatchAsyncImpl( * @param algorithm Algorithm and properties to assign to it * @return False if algorithm execution failed */ -bool BatchAlgorithmRunner::executeAlgo(IConfiguredAlgorithm_sptr algorithm) { +bool BatchAlgorithmRunner::executeAlgo( + const IConfiguredAlgorithm_sptr &algorithm) { try { m_currentAlgorithm = algorithm->algorithm(); diff --git a/qt/widgets/common/src/BoolPropertyWidget.cpp b/qt/widgets/common/src/BoolPropertyWidget.cpp index 17cb074aa27b9aa922c93882f266c6a2c793c52a..d2124c73d797b156eb6822593840f8b3ad3dd2e0 100644 --- a/qt/widgets/common/src/BoolPropertyWidget.cpp +++ b/qt/widgets/common/src/BoolPropertyWidget.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/BoolPropertyWidget.h" #include "MantidKernel/System.h" diff --git a/qt/widgets/common/src/CatalogHelper.cpp b/qt/widgets/common/src/CatalogHelper.cpp index cbbea22fbec6957b6f7c818f94078ad35865c91a..7ec68158b8d41a4669c634cb2d7eef63614e16be 100644 --- a/qt/widgets/common/src/CatalogHelper.cpp +++ b/qt/widgets/common/src/CatalogHelper.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/CatalogHelper.h" #include "MantidAPI/CatalogManager.h" diff --git a/qt/widgets/common/src/CatalogSearch.cpp b/qt/widgets/common/src/CatalogSearch.cpp index 39440478b80fc0af937ffee976c5163b5624dbe4..e7e59c70eb28a0cb232506c57172e03052d8e29a 100644 --- a/qt/widgets/common/src/CatalogSearch.cpp +++ b/qt/widgets/common/src/CatalogSearch.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/CatalogSearch.h" #include "MantidAPI/AlgorithmManager.h" @@ -576,7 +576,7 @@ bool CatalogSearch::validateDates() { return ret; } -void CatalogSearch::correctedToolTip(std::string text, QLabel *label) { +void CatalogSearch::correctedToolTip(const std::string &text, QLabel *label) { #ifdef Q_OS_WIN label->setToolTip(QString::fromStdString("<span style=\"color: black;\">" + text + "</span>")); @@ -1121,7 +1121,7 @@ void CatalogSearch::updateDataFileLabels(QTableWidgetItem *item) { * @return A set containing all file extensions. */ std::unordered_set<std::string> -CatalogSearch::getDataFileExtensions(Mantid::API::Column_sptr column) { +CatalogSearch::getDataFileExtensions(const Mantid::API::Column_sptr &column) { std::unordered_set<std::string> extensions; // For every filename in the column... diff --git a/qt/widgets/common/src/CatalogSelector.cpp b/qt/widgets/common/src/CatalogSelector.cpp index e5f37985db5229da11578226c5d39ed546c43fc4..4f58f7393b53100c0400772616a7b65bc0b7fbfe 100644 --- a/qt/widgets/common/src/CatalogSelector.cpp +++ b/qt/widgets/common/src/CatalogSelector.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/CatalogSelector.h" #include "MantidAPI/CatalogManager.h" diff --git a/qt/widgets/common/src/CheckboxHeader.cpp b/qt/widgets/common/src/CheckboxHeader.cpp index 09ae55c1986a5e179d07b34618756faadbebdf16..dfbba819cd293550f6c9aaeda285910da69b8bf4 100644 --- a/qt/widgets/common/src/CheckboxHeader.cpp +++ b/qt/widgets/common/src/CheckboxHeader.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/CheckboxHeader.h" diff --git a/qt/widgets/common/src/ConvolutionFunctionModel.cpp b/qt/widgets/common/src/ConvolutionFunctionModel.cpp index 5f7d48597d85dbdd623518ee29e8eb7bde07c3a7..b67f48c0105da4a1fc7b9bfe83e0db4befed4e3d 100644 --- a/qt/widgets/common/src/ConvolutionFunctionModel.cpp +++ b/qt/widgets/common/src/ConvolutionFunctionModel.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/ConvolutionFunctionModel.h" #include "MantidAPI/CompositeFunction.h" @@ -12,6 +12,7 @@ #include "MantidKernel/Logger.h" #include "MantidQtWidgets/Common/FunctionBrowser/FunctionBrowserUtils.h" #include <iostream> +#include <utility> namespace { Mantid::Kernel::Logger g_log("ConvolutionFunctionModel"); @@ -112,7 +113,7 @@ void ConvolutionFunctionModel::setModel( CompositeFunction_sptr ConvolutionFunctionModel::addBackground(CompositeFunction_sptr domainFunction, - std::string background) { + const std::string &background) { if (background.empty()) return domainFunction; @@ -126,7 +127,7 @@ ConvolutionFunctionModel::addBackground(CompositeFunction_sptr domainFunction, } CompositeFunction_sptr ConvolutionFunctionModel::createInnerFunction( - std::string peaksFunction, bool hasDeltaFunction, bool isQDependent, + const std::string &peaksFunction, bool hasDeltaFunction, bool isQDependent, double qValue, bool hasTempCorrection, double tempValue) { auto functionSpecified = !peaksFunction.empty(); CompositeFunction_sptr innerFunction = @@ -169,7 +170,7 @@ CompositeFunction_sptr ConvolutionFunctionModel::createInnerFunction( } CompositeFunction_sptr ConvolutionFunctionModel::addTempCorrection( - CompositeFunction_sptr peaksFunction, double tempValue) { + const CompositeFunction_sptr &peaksFunction, double tempValue) { CompositeFunction_sptr productFunction = boost::dynamic_pointer_cast<CompositeFunction>( FunctionFactory::Instance().createFunction("ProductFunction")); @@ -194,11 +195,11 @@ ConvolutionFunctionModel::createTemperatureCorrection(double correction) { } CompositeFunction_sptr ConvolutionFunctionModel::createConvolutionFunction( - IFunction_sptr resolutionFunction, IFunction_sptr innerFunction) { + IFunction_sptr resolutionFunction, const IFunction_sptr &innerFunction) { CompositeFunction_sptr convolution = boost::dynamic_pointer_cast<CompositeFunction>( FunctionFactory::Instance().createFunction("Convolution")); - convolution->addFunction(resolutionFunction); + convolution->addFunction(std::move(resolutionFunction)); if (innerFunction->nFunctions() > 0) convolution->addFunction(innerFunction); @@ -206,9 +207,8 @@ CompositeFunction_sptr ConvolutionFunctionModel::createConvolutionFunction( return convolution; } -IFunction_sptr -ConvolutionFunctionModel::createResolutionFunction(std::string workspaceName, - int workspaceIndex) { +IFunction_sptr ConvolutionFunctionModel::createResolutionFunction( + const std::string &workspaceName, int workspaceIndex) { std::string resolution = workspaceName.empty() ? "name=Resolution" diff --git a/qt/widgets/common/src/DataProcessorUI/AbstractTreeModel.cpp b/qt/widgets/common/src/DataProcessorUI/AbstractTreeModel.cpp index 4cebef0b28ce57c2ac4fa4af8fd010354b68d96a..f5ea73451f7e3f6790bc04ca84f41d7a7e74b875 100644 --- a/qt/widgets/common/src/DataProcessorUI/AbstractTreeModel.cpp +++ b/qt/widgets/common/src/DataProcessorUI/AbstractTreeModel.cpp @@ -1,12 +1,14 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + -#include "MantidQtWidgets/Common/DataProcessorUI/AbstractTreeModel.h" +#include <utility> + #include "MantidAPI/ITableWorkspace.h" #include "MantidAPI/TableRow.h" +#include "MantidQtWidgets/Common/DataProcessorUI/AbstractTreeModel.h" namespace MantidQt { namespace MantidWidgets { @@ -21,7 +23,7 @@ using namespace Mantid::API; */ AbstractTreeModel::AbstractTreeModel(ITableWorkspace_sptr tableWorkspace, const WhiteList &whitelist) - : m_tWS(tableWorkspace), m_whitelist(whitelist) {} + : m_tWS(std::move(tableWorkspace)), m_whitelist(whitelist) {} AbstractTreeModel::~AbstractTreeModel() {} diff --git a/qt/widgets/common/src/DataProcessorUI/Column.cpp b/qt/widgets/common/src/DataProcessorUI/Column.cpp index 1e0fe20920a84661523be7cf09767abd38f97a2c..024d0d1c2247fdafafed40360526d3f0d7ec3350 100644 --- a/qt/widgets/common/src/DataProcessorUI/Column.cpp +++ b/qt/widgets/common/src/DataProcessorUI/Column.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/DataProcessorUI/Column.h" namespace MantidQt { diff --git a/qt/widgets/common/src/DataProcessorUI/ConstColumnIterator.cpp b/qt/widgets/common/src/DataProcessorUI/ConstColumnIterator.cpp index 3089d250211bce3ec28863804e7a016a81072dad..cd21cdac9246ab7bdde10076a6e1dc7b4de5abf0 100644 --- a/qt/widgets/common/src/DataProcessorUI/ConstColumnIterator.cpp +++ b/qt/widgets/common/src/DataProcessorUI/ConstColumnIterator.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/DataProcessorUI/ConstColumnIterator.h" namespace MantidQt { diff --git a/qt/widgets/common/src/DataProcessorUI/GenerateNotebook.cpp b/qt/widgets/common/src/DataProcessorUI/GenerateNotebook.cpp index 493d7c1cbac0b9e94a6c8d4bb77412a5e3acd94b..17f11bedd75fec12b0a951b7776a7ee5b3ac5a1d 100644 --- a/qt/widgets/common/src/DataProcessorUI/GenerateNotebook.cpp +++ b/qt/widgets/common/src/DataProcessorUI/GenerateNotebook.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/DataProcessorUI/GenerateNotebook.h" #include "MantidAPI/AlgorithmManager.h" @@ -51,9 +51,9 @@ the corresponding hinting line edit in the view @returns ipython notebook string */ GenerateNotebook::GenerateNotebook( - QString name, QString instrument, WhiteList whitelist, + const QString &name, const QString &instrument, WhiteList whitelist, std::map<QString, PreprocessingAlgorithm> preprocessMap, - ProcessingAlgorithm processor, + const ProcessingAlgorithm &processor, boost::optional<PostprocessingStep> postprocessingStep, ColumnOptionsMap preprocessingOptionsMap) : m_wsName(std::move(name)), m_instrument(std::move(instrument)), @@ -391,7 +391,7 @@ void addProperties(QStringList &algProperties, const Map &optionsMap) { second item are the names of the output workspaces. */ QString -reduceRowString(const RowData_sptr data, const QString &instrument, +reduceRowString(const RowData_sptr &data, const QString &instrument, const WhiteList &whitelist, const std::map<QString, PreprocessingAlgorithm> &preprocessMap, const ProcessingAlgorithm &processor, diff --git a/qt/widgets/common/src/DataProcessorUI/GenericDataProcessorPresenter.cpp b/qt/widgets/common/src/DataProcessorUI/GenericDataProcessorPresenter.cpp index 792e2e2919490fb048657742bfebaa1ebdc6b429..dbb8011a087ee37dc331c2e606d63c9fd0853a25 100644 --- a/qt/widgets/common/src/DataProcessorUI/GenericDataProcessorPresenter.cpp +++ b/qt/widgets/common/src/DataProcessorUI/GenericDataProcessorPresenter.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/DataProcessorUI/GenericDataProcessorPresenter.h" #include "MantidAPI/AlgorithmManager.h" @@ -37,6 +37,7 @@ #include <fstream> #include <iterator> #include <sstream> +#include <utility> using namespace Mantid::API; using namespace Mantid::Geometry; @@ -80,7 +81,7 @@ template <typename T> void pop_front(std::vector<T> &queue) { /** Validate the algorithm inputs * @return : an error message, or empty string if ok */ -std::string validateAlgorithmInputs(IAlgorithm_sptr alg) { +std::string validateAlgorithmInputs(const IAlgorithm_sptr &alg) { std::string error; // Get input property errors as a map auto errorMap = alg->validateInputs(); @@ -115,8 +116,9 @@ namespace DataProcessor { GenericDataProcessorPresenter::GenericDataProcessorPresenter( WhiteList whitelist, std::map<QString, PreprocessingAlgorithm> preprocessMap, - ProcessingAlgorithm processor, PostprocessingAlgorithm postprocessor, - int group, std::map<QString, QString> postprocessMap, QString loader) + const ProcessingAlgorithm &processor, + const PostprocessingAlgorithm &postprocessor, int group, + std::map<QString, QString> postprocessMap, const QString &loader) : WorkspaceObserver(), m_view(nullptr), m_progressView(nullptr), m_mainPresenter(), m_loader(std::move(loader)), m_reductionPaused(true), m_postprocessing(postprocessor.name().isEmpty() @@ -178,8 +180,8 @@ GenericDataProcessorPresenter::GenericDataProcessorPresenter( * (reflectometry). */ GenericDataProcessorPresenter::GenericDataProcessorPresenter( - WhiteList whitelist, ProcessingAlgorithm processor, - PostprocessingAlgorithm postprocessor, int group) + WhiteList whitelist, const ProcessingAlgorithm &processor, + const PostprocessingAlgorithm &postprocessor, int group) : GenericDataProcessorPresenter( std::move(whitelist), std::map<QString, PreprocessingAlgorithm>(), std::move(processor), std::move(postprocessor), group) {} @@ -208,7 +210,7 @@ GenericDataProcessorPresenter::GenericDataProcessorPresenter( GenericDataProcessorPresenter::GenericDataProcessorPresenter( WhiteList whitelist, std::map<QString, PreprocessingAlgorithm> preprocessMap, - ProcessingAlgorithm processor, int group) + const ProcessingAlgorithm &processor, int group) : GenericDataProcessorPresenter( std::move(whitelist), std::move(preprocessMap), std::move(processor), PostprocessingAlgorithm(), group) {} @@ -222,7 +224,7 @@ GenericDataProcessorPresenter::GenericDataProcessorPresenter( * (reflectometry) */ GenericDataProcessorPresenter::GenericDataProcessorPresenter( - WhiteList whitelist, ProcessingAlgorithm processor, int group) + WhiteList whitelist, const ProcessingAlgorithm &processor, int group) : GenericDataProcessorPresenter( std::move(whitelist), std::map<QString, PreprocessingAlgorithm>(), std::move(processor), PostprocessingAlgorithm(), group) {} @@ -233,7 +235,7 @@ GenericDataProcessorPresenter::GenericDataProcessorPresenter( GenericDataProcessorPresenter::~GenericDataProcessorPresenter() {} namespace { -std::vector<std::string> toStdStringVector(std::set<QString> in) { +std::vector<std::string> toStdStringVector(const std::set<QString> &in) { auto out = std::vector<std::string>(); std::transform( in.cbegin(), in.cend(), std::back_inserter(out), @@ -320,7 +322,7 @@ Returns the name of the reduced workspace for a given row @returns : The name of the workspace */ QString GenericDataProcessorPresenter::getReducedWorkspaceName( - const RowData_sptr data) const { + const RowData_sptr &data) const { return MantidQt::MantidWidgets::DataProcessor::getReducedWorkspaceName( data, m_whitelist, m_preprocessing.m_map); } @@ -356,13 +358,13 @@ void GenericDataProcessorPresenter::setGroupError(const int groupIndex, m_manager->setError(error, groupIndex); } -void GenericDataProcessorPresenter::setRowIsProcessed(RowData_sptr rowData, - const bool isProcessed) { +void GenericDataProcessorPresenter::setRowIsProcessed( + const RowData_sptr &rowData, const bool isProcessed) { if (rowData) rowData->setProcessed(isProcessed); } -void GenericDataProcessorPresenter::setRowError(RowData_sptr rowData, +void GenericDataProcessorPresenter::setRowError(const RowData_sptr &rowData, const std::string &error) { if (rowData) rowData->setError(error); @@ -439,7 +441,7 @@ bool GenericDataProcessorPresenter::workspaceIsOutputOfGroup( } bool GenericDataProcessorPresenter::workspaceIsOutputOfRow( - RowData_sptr rowData, const std::string &workspaceName) const { + const RowData_sptr &rowData, const std::string &workspaceName) const { if (!rowData) return false; @@ -458,7 +460,8 @@ void GenericDataProcessorPresenter::resetProcessedState(const int groupIndex) { /** Reset the processed state for a row */ -void GenericDataProcessorPresenter::resetProcessedState(RowData_sptr rowData) { +void GenericDataProcessorPresenter::resetProcessedState( + const RowData_sptr &rowData) { rowData->reset(); } @@ -505,7 +508,8 @@ void GenericDataProcessorPresenter::resetProcessedState() { * @param rowData [inout] : the data to initialise * @return : true if ok, false if there was a problem */ -bool GenericDataProcessorPresenter::initRowForProcessing(RowData_sptr rowData) { +bool GenericDataProcessorPresenter::initRowForProcessing( + const RowData_sptr &rowData) { // Reset the row to its unprocessed state rowData->reset(); @@ -575,7 +579,7 @@ bool GenericDataProcessorPresenter::groupNeedsProcessing( /** Check whether a row should be processed */ bool GenericDataProcessorPresenter::rowNeedsProcessing( - RowData_sptr rowData) const { + const RowData_sptr &rowData) const { if (m_forceProcessing) return true; @@ -591,7 +595,7 @@ bool GenericDataProcessorPresenter::rowNeedsProcessing( /** Process a given set of items */ void GenericDataProcessorPresenter::process(TreeData itemsToProcess) { - m_itemsToProcess = itemsToProcess; + m_itemsToProcess = std::move(itemsToProcess); // Emit a signal that the process is starting m_view->emitProcessClicked(); @@ -707,7 +711,7 @@ void GenericDataProcessorPresenter::startAsyncRowReduceThread( RowData_sptr rowData, const int rowIndex, const int groupIndex) { auto *worker = new GenericDataProcessorPresenterRowReducerWorker( - this, rowData, rowIndex, groupIndex); + this, std::move(rowData), rowIndex, groupIndex); connect(worker, SIGNAL(finished(int)), this, SLOT(rowThreadFinished(int))); connect(worker, SIGNAL(reductionErrorSignal(QString)), this, @@ -960,7 +964,8 @@ QString GenericDataProcessorPresenter::getPostprocessedWorkspaceName( if (!hasPostprocessing()) throw std::runtime_error("Attempted to get postprocessing workspace but no " "postprocessing is specified."); - return m_postprocessing->getPostprocessedWorkspaceName(groupData, sliceIndex); + return m_postprocessing->getPostprocessedWorkspaceName(groupData, + std::move(sliceIndex)); } /** Loads a run found from disk or AnalysisDataService @@ -1089,7 +1094,7 @@ GenericDataProcessorPresenter::createProcessingAlgorithm() const { * @param data [in] :: the data in the row */ void GenericDataProcessorPresenter::preprocessColumnValue( - const QString &columnName, QString &columnValue, RowData_sptr data) { + const QString &columnName, QString &columnValue, const RowData_sptr &data) { // Check if preprocessing is required for this column if (!m_preprocessing.hasPreprocessing(columnName)) return; @@ -1099,7 +1104,8 @@ void GenericDataProcessorPresenter::preprocessColumnValue( OptionsMap options; if (m_preprocessing.hasOptions(columnName)) { auto globalOptions = m_preprocessing.m_options.at(columnName); - options = getCanonicalOptions(data, globalOptions, m_whitelist, false); + options = + getCanonicalOptions(std::move(data), globalOptions, m_whitelist, false); } // Run the preprocessing algorithm @@ -1112,7 +1118,8 @@ void GenericDataProcessorPresenter::preprocessColumnValue( /** Perform preprocessing on algorithm property values where applicable * @param data : the data in the row */ -void GenericDataProcessorPresenter::preprocessOptionValues(RowData_sptr data) { +void GenericDataProcessorPresenter::preprocessOptionValues( + const RowData_sptr &data) { auto options = data->options(); // Loop through all columns (excluding the Options and Hidden options // columns) @@ -1137,8 +1144,8 @@ void GenericDataProcessorPresenter::preprocessOptionValues(RowData_sptr data) { * @param alg : the executed algorithm * @param data : the row data */ -void GenericDataProcessorPresenter::updateModelFromResults(IAlgorithm_sptr alg, - RowData_sptr data) { +void GenericDataProcessorPresenter::updateModelFromResults( + const IAlgorithm_sptr &alg, const RowData_sptr &data) { auto newData = data; @@ -1221,7 +1228,7 @@ IAlgorithm_sptr GenericDataProcessorPresenter::createAndRunAlgorithm( * correspond to column contents * @throws std::runtime_error if reduction fails */ -void GenericDataProcessorPresenter::reduceRow(RowData_sptr data) { +void GenericDataProcessorPresenter::reduceRow(const RowData_sptr &data) { // Perform any preprocessing on the input properties and cache the results // in the row data diff --git a/qt/widgets/common/src/DataProcessorUI/OneLevelTreeManager.cpp b/qt/widgets/common/src/DataProcessorUI/OneLevelTreeManager.cpp index 6604c40b7998a673898aa00560667484b65a9d34..5218be72ac0894ec182e93204941df26d3cca433 100644 --- a/qt/widgets/common/src/DataProcessorUI/OneLevelTreeManager.cpp +++ b/qt/widgets/common/src/DataProcessorUI/OneLevelTreeManager.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/DataProcessorUI/OneLevelTreeManager.h" #include "MantidAPI/ITableWorkspace.h" @@ -30,6 +30,7 @@ #include <boost/algorithm/string/classification.hpp> #include <boost/algorithm/string/join.hpp> #include <boost/algorithm/string/split.hpp> +#include <utility> using namespace Mantid::API; using namespace Mantid::Kernel; @@ -46,10 +47,10 @@ namespace DataProcessor { * @param whitelist :: a whitelist */ OneLevelTreeManager::OneLevelTreeManager( - DataProcessorPresenter *presenter, Mantid::API::ITableWorkspace_sptr table, - const WhiteList &whitelist) + DataProcessorPresenter *presenter, + const Mantid::API::ITableWorkspace_sptr &table, const WhiteList &whitelist) : m_presenter(presenter), - m_model(new QOneLevelTreeModel(table, whitelist)) {} + m_model(new QOneLevelTreeModel(std::move(table), whitelist)) {} /** * Constructor (no table workspace given) @@ -323,7 +324,7 @@ std::set<int> OneLevelTreeManager::getRowsToProcess(bool shouldPrompt) const { * @return :: All data as a map where keys are units of post-processing (i.e. * group indices) and values are a map of row index in the group to row data */ -TreeData OneLevelTreeManager::constructTreeData(std::set<int> rows) { +TreeData OneLevelTreeManager::constructTreeData(const std::set<int> &rows) { // Return data in the format: map<int, set<RowData_sptr>>, where: // int -> row index @@ -525,7 +526,7 @@ OneLevelTreeManager::createDefaultWorkspace(const WhiteList &whitelist) { * @param ws :: the table workspace * @param whitelistColumns :: the number of columns as specified in a whitelist */ -void OneLevelTreeManager::validateModel(ITableWorkspace_sptr ws, +void OneLevelTreeManager::validateModel(const ITableWorkspace_sptr &ws, size_t whitelistColumns) const { if (!ws) diff --git a/qt/widgets/common/src/DataProcessorUI/OptionsMap.cpp b/qt/widgets/common/src/DataProcessorUI/OptionsMap.cpp index d197f3d54f1ab0683a64bb4be88d4f9fd6e746a2..f636ee9bd909f8f7ef911d66d9424533accd194f 100644 --- a/qt/widgets/common/src/DataProcessorUI/OptionsMap.cpp +++ b/qt/widgets/common/src/DataProcessorUI/OptionsMap.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/DataProcessorUI/OptionsMap.h" namespace MantidQt { diff --git a/qt/widgets/common/src/DataProcessorUI/PostprocessingAlgorithm.cpp b/qt/widgets/common/src/DataProcessorUI/PostprocessingAlgorithm.cpp index 30e20db4b7ceba67161b2c94dc3e7cec647f9bfb..edfa1d138319090c22bf8eda16d5a8a4ae84f376 100644 --- a/qt/widgets/common/src/DataProcessorUI/PostprocessingAlgorithm.cpp +++ b/qt/widgets/common/src/DataProcessorUI/PostprocessingAlgorithm.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/DataProcessorUI/PostprocessingAlgorithm.h" diff --git a/qt/widgets/common/src/DataProcessorUI/PostprocessingStep.cpp b/qt/widgets/common/src/DataProcessorUI/PostprocessingStep.cpp index acb059f7b1cdd95cc964194f8ab745d49c4204cd..eb731cdc8e42bbcbc5d2f6869f575fb4e764aaed 100644 --- a/qt/widgets/common/src/DataProcessorUI/PostprocessingStep.cpp +++ b/qt/widgets/common/src/DataProcessorUI/PostprocessingStep.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/DataProcessorUI/PostprocessingStep.h" #include "MantidQtWidgets/Common/DataProcessorUI/WorkspaceNameUtils.h" @@ -10,10 +10,10 @@ namespace MantidQt { namespace MantidWidgets { namespace DataProcessor { -PostprocessingStep::PostprocessingStep(QString options) +PostprocessingStep::PostprocessingStep(const QString &options) : m_options(std::move(options)) {} -PostprocessingStep::PostprocessingStep(QString options, - PostprocessingAlgorithm algorithm, +PostprocessingStep::PostprocessingStep(const QString &options, + const PostprocessingAlgorithm &algorithm, std::map<QString, QString> map) : m_options(std::move(options)), m_algorithm(std::move(algorithm)), m_map(std::move(map)) {} diff --git a/qt/widgets/common/src/DataProcessorUI/PreprocessMap.cpp b/qt/widgets/common/src/DataProcessorUI/PreprocessMap.cpp index eb0374b8e248c3f033917f205e879b1fdf8628f1..87fa23db8ea32320c32fc7aed0b63bc4b11e7407 100644 --- a/qt/widgets/common/src/DataProcessorUI/PreprocessMap.cpp +++ b/qt/widgets/common/src/DataProcessorUI/PreprocessMap.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/DataProcessorUI/PreprocessMap.h" diff --git a/qt/widgets/common/src/DataProcessorUI/PreprocessingAlgorithm.cpp b/qt/widgets/common/src/DataProcessorUI/PreprocessingAlgorithm.cpp index 1db3fb172c78be63d2d817a92fbfa679b5edd276..b17a8ca3bb352852b787994098ee7d27ef7dd4be 100644 --- a/qt/widgets/common/src/DataProcessorUI/PreprocessingAlgorithm.cpp +++ b/qt/widgets/common/src/DataProcessorUI/PreprocessingAlgorithm.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/DataProcessorUI/PreprocessingAlgorithm.h" @@ -18,9 +18,9 @@ namespace DataProcessor { * @param blacklist : The list of properties we don't want to show * algorithm in the processed workspace's name */ -PreprocessingAlgorithm::PreprocessingAlgorithm(QString name, QString prefix, - QString separator, - std::set<QString> blacklist) +PreprocessingAlgorithm::PreprocessingAlgorithm( + const QString &name, const QString &prefix, const QString &separator, + const std::set<QString> &blacklist) : ProcessingAlgorithmBase(std::move(name), std::move(blacklist)), m_prefix(std::move(prefix)), m_separator(std::move(separator)) { @@ -53,8 +53,9 @@ PreprocessingAlgorithm::PreprocessingAlgorithm(QString name, QString prefix, * @param blacklist : The list of properties we don't want to show, as a string * algorithm in the processed workspace's name */ -PreprocessingAlgorithm::PreprocessingAlgorithm(QString name, QString prefix, - QString separator, +PreprocessingAlgorithm::PreprocessingAlgorithm(const QString &name, + const QString &prefix, + const QString &separator, const QString &blacklist) : PreprocessingAlgorithm(std::move(name), std::move(prefix), std::move(separator), diff --git a/qt/widgets/common/src/DataProcessorUI/ProcessingAlgorithm.cpp b/qt/widgets/common/src/DataProcessorUI/ProcessingAlgorithm.cpp index 2586f951c11d841d5b7412c1a21f92ccbbd5a48f..186423fd86081ed795f0e7d1bc67fb1b36d267b1 100644 --- a/qt/widgets/common/src/DataProcessorUI/ProcessingAlgorithm.cpp +++ b/qt/widgets/common/src/DataProcessorUI/ProcessingAlgorithm.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/DataProcessorUI/ProcessingAlgorithm.h" @@ -21,9 +21,9 @@ namespace DataProcessor { * indicate the most recent version. */ ProcessingAlgorithm::ProcessingAlgorithm( - QString name, std::vector<QString> prefix, - std::size_t postprocessedOutputPrefixIndex, std::set<QString> blacklist, - const int version) + const QString &name, std::vector<QString> prefix, + std::size_t postprocessedOutputPrefixIndex, + const std::set<QString> &blacklist, const int version) : ProcessingAlgorithmBase(std::move(name), std::move(blacklist), version), m_postprocessedOutputPrefixIndex(postprocessedOutputPrefixIndex), m_prefix(std::move(prefix)) { @@ -63,7 +63,7 @@ ProcessingAlgorithm::ProcessingAlgorithm( * indicate the most recent version. */ ProcessingAlgorithm::ProcessingAlgorithm( - QString name, QString const &prefix, + const QString &name, QString const &prefix, std::size_t postprocessedOutputPrefixIndex, QString const &blacklist, const int version) : ProcessingAlgorithm(std::move(name), convertStringToVector(prefix), diff --git a/qt/widgets/common/src/DataProcessorUI/ProcessingAlgorithmBase.cpp b/qt/widgets/common/src/DataProcessorUI/ProcessingAlgorithmBase.cpp index 4bb934c4fb51af7a5aa9e82b46c79d39fe156d14..b0f4f14d1db2ab80b73cf162904303603f6210a9 100644 --- a/qt/widgets/common/src/DataProcessorUI/ProcessingAlgorithmBase.cpp +++ b/qt/widgets/common/src/DataProcessorUI/ProcessingAlgorithmBase.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/DataProcessorUI/ProcessingAlgorithmBase.h" #include <QStringList> diff --git a/qt/widgets/common/src/DataProcessorUI/QDataProcessorWidget.cpp b/qt/widgets/common/src/DataProcessorUI/QDataProcessorWidget.cpp index 11c4e3153305f1adc3125fda15e28f4f16e7cc93..be13604bf69354adae9e6617b26aa985084f74f5 100644 --- a/qt/widgets/common/src/DataProcessorUI/QDataProcessorWidget.cpp +++ b/qt/widgets/common/src/DataProcessorUI/QDataProcessorWidget.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/DataProcessorUI/QDataProcessorWidget.h" #include "MantidQtWidgets/Common/DataProcessorUI/DataProcessorMainPresenter.h" diff --git a/qt/widgets/common/src/DataProcessorUI/QOneLevelTreeModel.cpp b/qt/widgets/common/src/DataProcessorUI/QOneLevelTreeModel.cpp index 1a22d826d5ce47c5c2428ead6998876fabbadcb6..8e417ba67f655f61a02841d473c71c7ce67e1abe 100644 --- a/qt/widgets/common/src/DataProcessorUI/QOneLevelTreeModel.cpp +++ b/qt/widgets/common/src/DataProcessorUI/QOneLevelTreeModel.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/DataProcessorUI/QOneLevelTreeModel.h" #include "MantidAPI/ITableWorkspace.h" @@ -19,8 +19,8 @@ using namespace Mantid::API; @param tableWorkspace : The table workspace to wrap @param whitelist : A WhiteList containing the columns */ -QOneLevelTreeModel::QOneLevelTreeModel(ITableWorkspace_sptr tableWorkspace, - const WhiteList &whitelist) +QOneLevelTreeModel::QOneLevelTreeModel( + const ITableWorkspace_sptr &tableWorkspace, const WhiteList &whitelist) : AbstractTreeModel(tableWorkspace, whitelist) { if (tableWorkspace->columnCount() != m_whitelist.size()) diff --git a/qt/widgets/common/src/DataProcessorUI/QTwoLevelTreeModel.cpp b/qt/widgets/common/src/DataProcessorUI/QTwoLevelTreeModel.cpp index 97e83f2f4815862e3177625109f728c3596f3c38..7f6e3707c40cd70c660db545525326eb0f31d50d 100644 --- a/qt/widgets/common/src/DataProcessorUI/QTwoLevelTreeModel.cpp +++ b/qt/widgets/common/src/DataProcessorUI/QTwoLevelTreeModel.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/DataProcessorUI/QTwoLevelTreeModel.h" #include "MantidAPI/ITableWorkspace.h" @@ -25,7 +25,7 @@ public: : m_absoluteIndex(absoluteIndex), m_rowData(std::make_shared<RowData>(columnCount)) {} // Constructor taking a list of data values - RowInfo(const size_t absoluteIndex, QStringList rowDataValues) + RowInfo(const size_t absoluteIndex, const QStringList &rowDataValues) : m_absoluteIndex(absoluteIndex), m_rowData(std::make_shared<RowData>(std::move(rowDataValues))) {} @@ -174,8 +174,8 @@ private: @param whitelist : A WhiteList containing information about the columns, their indices and descriptions */ -QTwoLevelTreeModel::QTwoLevelTreeModel(ITableWorkspace_sptr tableWorkspace, - const WhiteList &whitelist) +QTwoLevelTreeModel::QTwoLevelTreeModel( + const ITableWorkspace_sptr &tableWorkspace, const WhiteList &whitelist) : AbstractTreeModel(tableWorkspace, whitelist) { if (tableWorkspace->columnCount() != m_whitelist.size() + 1) @@ -786,7 +786,7 @@ bool QTwoLevelTreeModel::setData(const QModelIndex &index, * whitelist * @param table : A table workspace containing the data */ -void QTwoLevelTreeModel::setupModelData(ITableWorkspace_sptr table) { +void QTwoLevelTreeModel::setupModelData(const ITableWorkspace_sptr &table) { int nrows = static_cast<int>(table->rowCount()); diff --git a/qt/widgets/common/src/DataProcessorUI/QtDataProcessorOptionsDialog.cpp b/qt/widgets/common/src/DataProcessorUI/QtDataProcessorOptionsDialog.cpp index f011490f27306238250819146aed8d1045b53f33..483107c0fdaef84f7b6851e85828181d3979a28d 100644 --- a/qt/widgets/common/src/DataProcessorUI/QtDataProcessorOptionsDialog.cpp +++ b/qt/widgets/common/src/DataProcessorUI/QtDataProcessorOptionsDialog.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/DataProcessorUI/QtDataProcessorOptionsDialog.h" #include "MantidQtWidgets/Common/DataProcessorUI/DataProcessorPresenter.h" diff --git a/qt/widgets/common/src/DataProcessorUI/ToStdStringMap.cpp b/qt/widgets/common/src/DataProcessorUI/ToStdStringMap.cpp index 2c812c98901b890067f02e1a07efdda46f0f36b2..b539b6414cca68f0fe17879a5247aa764c436261 100644 --- a/qt/widgets/common/src/DataProcessorUI/ToStdStringMap.cpp +++ b/qt/widgets/common/src/DataProcessorUI/ToStdStringMap.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtMantidWidgets/DataProcessorUI/ToStdStringMap.h" namespace MantidQt { diff --git a/qt/widgets/common/src/DataProcessorUI/TreeData.cpp b/qt/widgets/common/src/DataProcessorUI/TreeData.cpp index dd8d2e7e35d1e1971b4208383b273516d37133ba..16aa102ccadd71a0ba04c4a967aede03ab9c16bf 100644 --- a/qt/widgets/common/src/DataProcessorUI/TreeData.cpp +++ b/qt/widgets/common/src/DataProcessorUI/TreeData.cpp @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #include "MantidQtWidgets/Common/DataProcessorUI/TreeData.h" namespace MantidQt { @@ -19,7 +18,7 @@ RowData::RowData(const int columnCount) : m_isProcessed{false} { m_data.append(""); } -RowData::RowData(QStringList data) +RowData::RowData(const QStringList &data) : m_data(std::move(data)), m_isProcessed{false} {} RowData::RowData(const std::vector<std::string> &data) : m_isProcessed{false} { @@ -312,7 +311,7 @@ bool RowData::reductionFailed() const { * prefixes have been applied for specific output properties. * @param prefix [in] : if not empty, apply this prefix to the name */ -QString RowData::reducedName(const QString prefix) const { +QString RowData::reducedName(const QString &prefix) const { if (prefix.isEmpty()) return m_reducedName; else diff --git a/qt/widgets/common/src/DataProcessorUI/TwoLevelTreeManager.cpp b/qt/widgets/common/src/DataProcessorUI/TwoLevelTreeManager.cpp index d89f3edc5ba06dd1a21c1b98a65d59d8d9cbb1a6..c78a17311e0595e8d9319bf63827d6fef7dd0bfb 100644 --- a/qt/widgets/common/src/DataProcessorUI/TwoLevelTreeManager.cpp +++ b/qt/widgets/common/src/DataProcessorUI/TwoLevelTreeManager.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/DataProcessorUI/TwoLevelTreeManager.h" #include "MantidAPI/ITableWorkspace.h" @@ -39,6 +39,7 @@ #include <boost/algorithm/string/classification.hpp> #include <boost/algorithm/string/join.hpp> #include <boost/algorithm/string/split.hpp> +#include <utility> using namespace Mantid::API; using namespace Mantid::Kernel; @@ -55,10 +56,10 @@ namespace DataProcessor { * @param whitelist :: a whitelist */ TwoLevelTreeManager::TwoLevelTreeManager( - DataProcessorPresenter *presenter, Mantid::API::ITableWorkspace_sptr table, - const WhiteList &whitelist) + DataProcessorPresenter *presenter, + const Mantid::API::ITableWorkspace_sptr &table, const WhiteList &whitelist) : m_presenter(presenter), - m_model(new QTwoLevelTreeModel(table, whitelist)) {} + m_model(new QTwoLevelTreeModel(std::move(table), whitelist)) {} /** * Constructor (no table workspace given) @@ -446,7 +447,7 @@ int TwoLevelTreeManager::numRowsInGroup(int group) const { * @return :: All data as a map where keys are units of post-processing (i.e. * group indices) and values are a map of row index in the group to row data */ -TreeData TwoLevelTreeManager::constructTreeData(ChildItems rows) { +TreeData TwoLevelTreeManager::constructTreeData(const ChildItems &rows) { TreeData tree; const int columnNotUsed = 0; // dummy value required to create index // Return row data in the format: map<int, set<vector<string>>>, where: @@ -722,7 +723,7 @@ TwoLevelTreeManager::createDefaultWorkspace(const WhiteList &whitelist) { * @param ws :: the table workspace * @param whitelistColumns :: the number of columns as specified in a whitelist */ -void TwoLevelTreeManager::validateModel(ITableWorkspace_sptr ws, +void TwoLevelTreeManager::validateModel(const ITableWorkspace_sptr &ws, size_t whitelistColumns) const { if (!ws) diff --git a/qt/widgets/common/src/DataProcessorUI/VectorString.cpp b/qt/widgets/common/src/DataProcessorUI/VectorString.cpp index 8e2f3e542c92b0cabe4e0dc1eb8239195fa5612f..f2c0336e583593042c36b5bdbcfbfb4af2dba05c 100644 --- a/qt/widgets/common/src/DataProcessorUI/VectorString.cpp +++ b/qt/widgets/common/src/DataProcessorUI/VectorString.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/DataProcessorUI/VectorString.h" namespace MantidQt { diff --git a/qt/widgets/common/src/DataProcessorUI/WhiteList.cpp b/qt/widgets/common/src/DataProcessorUI/WhiteList.cpp index 462663985b9312e7486d3bac07789c3046201bbb..8a8c987a26711e193762b1d4dcea87b7b4f5825c 100644 --- a/qt/widgets/common/src/DataProcessorUI/WhiteList.cpp +++ b/qt/widgets/common/src/DataProcessorUI/WhiteList.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/DataProcessorUI/WhiteList.h" #include <QString> diff --git a/qt/widgets/common/src/DataProcessorUI/WorkspaceNameUtils.cpp b/qt/widgets/common/src/DataProcessorUI/WorkspaceNameUtils.cpp index 4a61897fe96a50d8ce40035264b2c203262e4f0f..1dff5796842f1b8f94300f0520c041193480f776 100644 --- a/qt/widgets/common/src/DataProcessorUI/WorkspaceNameUtils.cpp +++ b/qt/widgets/common/src/DataProcessorUI/WorkspaceNameUtils.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/DataProcessorUI/WorkspaceNameUtils.h" @@ -27,7 +27,7 @@ namespace { // unnamed namespace * @param allowInsertions : if true, allow new keys to be inserted; * otherwise, only allow updating of keys that already exist */ -void updateRowOptions(OptionsMap &options, const RowData_sptr data, +void updateRowOptions(OptionsMap &options, const RowData_sptr &data, const WhiteList &whitelist, const bool allowInsertions) { // Loop through all columns (excluding the Options and Hidden options // columns) @@ -55,7 +55,7 @@ void updateRowOptions(OptionsMap &options, const RowData_sptr data, * @param allowInsertions : if true, allow new keys to be inserted; * otherwise, only allow updating of keys that already exist */ -void updateUserOptions(OptionsMap &options, const RowData_sptr data, +void updateUserOptions(OptionsMap &options, const RowData_sptr &data, const WhiteList &whitelist, const bool allowInsertions) { auto userOptions = parseKeyValueQString(data->value(static_cast<int>(whitelist.size()) - 2)); @@ -72,7 +72,7 @@ void updateUserOptions(OptionsMap &options, const RowData_sptr data, * @param allowInsertions : if true, allow new keys to be inserted; * otherwise, only allow updating of keys that already exist */ -void updateHiddenOptions(OptionsMap &options, const RowData_sptr data, +void updateHiddenOptions(OptionsMap &options, const RowData_sptr &data, const bool allowInsertions) { const auto hiddenOptions = parseKeyValueQString(data->back()); for (auto &kvp : hiddenOptions) { @@ -86,7 +86,7 @@ void updateHiddenOptions(OptionsMap &options, const RowData_sptr data, * @param options : a map of property name to option value to update * @param data : the data for this row */ -void updateOutputOptions(OptionsMap &options, const RowData_sptr data, +void updateOutputOptions(OptionsMap &options, const RowData_sptr &data, const bool allowInsertions, const std::vector<QString> &outputPropertyNames, const std::vector<QString> &outputNamePrefixes) { @@ -141,7 +141,7 @@ algorithm for that column @returns : The name of the workspace */ QString getReducedWorkspaceName( - const RowData_sptr data, const WhiteList &whitelist, + const RowData_sptr &data, const WhiteList &whitelist, const std::map<QString, PreprocessingAlgorithm> &preprocessMap) { if (data->size() != static_cast<int>(whitelist.size())) throw std::invalid_argument("Can't find reduced workspace name"); @@ -206,7 +206,7 @@ QString getReducedWorkspaceName( * names * @return : a map of property names to value */ -OptionsMap getCanonicalOptions(const RowData_sptr data, +OptionsMap getCanonicalOptions(const RowData_sptr &data, const OptionsMap &globalOptions, const WhiteList &whitelist, const bool allowInsertions, diff --git a/qt/widgets/common/src/DataSelector.cpp b/qt/widgets/common/src/DataSelector.cpp index 32c96402c9ee8607d7113a0799766c8ffcf59258..0891936cf2e292320ce67a5c5a2ce9e38f1c07b7 100644 --- a/qt/widgets/common/src/DataSelector.cpp +++ b/qt/widgets/common/src/DataSelector.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/DataSelector.h" #include "MantidAPI/AlgorithmManager.h" diff --git a/qt/widgets/common/src/DiagResults.cpp b/qt/widgets/common/src/DiagResults.cpp index 457419584083735044b3711cf3211e7e49b64b00..90b925690a8573bddb92ba1e7fa46052dea8d1e6 100644 --- a/qt/widgets/common/src/DiagResults.cpp +++ b/qt/widgets/common/src/DiagResults.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------- // Includes @@ -112,7 +112,8 @@ void DiagResults::updateResults(const QString &testSummary) { // Private member functions //---------------------- /// insert a row at the bottom of the grid -int DiagResults::addRow(QString firstColumn, QString secondColumn) { +int DiagResults::addRow(const QString &firstColumn, + const QString &secondColumn) { // set row to one past the end of the number of rows that currently exist int row = m_Grid->rowCount(); m_Grid->addWidget(new QLabel(firstColumn), row, 0); @@ -124,7 +125,7 @@ int DiagResults::addRow(QString firstColumn, QString secondColumn) { * @param row :: the row where the data will be displayed * @param text :: the text that should be displayed in the first column */ -void DiagResults::updateRow(int row, QString text) { +void DiagResults::updateRow(int row, const QString &text) { // Get the text label from the grid QWidget *widget = m_Grid->itemAtPosition(row, 1)->widget(); QLabel *label = qobject_cast<QLabel *>(widget); diff --git a/qt/widgets/common/src/DoubleSpinBox.cpp b/qt/widgets/common/src/DoubleSpinBox.cpp index e1beb78dc185669a6b094e1ebee934d643124c11..583cdf5a216a67649a6d06956664737e22fb4eb8 100644 --- a/qt/widgets/common/src/DoubleSpinBox.cpp +++ b/qt/widgets/common/src/DoubleSpinBox.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /*************************************************************************** File : DoubleSpinBox.cpp @@ -115,7 +115,7 @@ void DoubleSpinBox::interpretText(bool notify) { * @param text QString with text to map * @param value Value to map it to */ -void DoubleSpinBox::addSpecialTextMapping(QString text, double value) { +void DoubleSpinBox::addSpecialTextMapping(const QString &text, double value) { m_specialTextMappings[text] = value; } diff --git a/qt/widgets/common/src/DropEventHelper.cpp b/qt/widgets/common/src/DropEventHelper.cpp index 911f9160ea54195b0c838bde9bdea780991be95c..d47dc2f2b425e7a31c44981c5ef067578a99f096 100644 --- a/qt/widgets/common/src/DropEventHelper.cpp +++ b/qt/widgets/common/src/DropEventHelper.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/DropEventHelper.h" diff --git a/qt/widgets/common/src/EditLocalParameterDialog.cpp b/qt/widgets/common/src/EditLocalParameterDialog.cpp index 3267b7de98ee70c4cf44f6b1dd47b464be979177..b39f1e02c302505b45000cbe1462276038b7ac61 100644 --- a/qt/widgets/common/src/EditLocalParameterDialog.cpp +++ b/qt/widgets/common/src/EditLocalParameterDialog.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/EditLocalParameterDialog.h" @@ -13,6 +13,7 @@ #include <QMenu> #include <QMessageBox> #include <limits> +#include <utility> namespace { QString makeNumber(double d) { return QString::number(d, 'g', 16); } @@ -35,8 +36,8 @@ namespace MantidWidgets { */ EditLocalParameterDialog::EditLocalParameterDialog( QWidget *parent, const QString &parName, const QStringList &wsNames, - QList<double> values, QList<bool> fixes, QStringList ties, - QStringList constraints) + const QList<double> &values, const QList<bool> &fixes, + const QStringList &ties, const QStringList &constraints) : MantidDialog(parent), m_parName(parName), m_values(values), m_fixes(fixes), m_ties(ties), m_constraints(constraints) { assert(values.size() == wsNames.size()); @@ -171,14 +172,14 @@ void EditLocalParameterDialog::fixParameter(int index, bool fix) { /// @param index :: Index of a paramter to tie. /// @param tie :: A tie string. void EditLocalParameterDialog::setTie(int index, QString tie) { - m_ties[index] = tie; + m_ties[index] = std::move(tie); m_fixes[index] = false; updateRoleColumn(index); } /// Set the same tie to all parameters. /// @param tie :: A tie string. -void EditLocalParameterDialog::setTieAll(QString tie) { +void EditLocalParameterDialog::setTieAll(const QString &tie) { for (int i = 0; i < m_ties.size(); ++i) { m_ties[i] = tie; m_fixes[i] = false; @@ -188,11 +189,11 @@ void EditLocalParameterDialog::setTieAll(QString tie) { } void EditLocalParameterDialog::setConstraint(int index, QString constraint) { - m_constraints[index] = constraint; + m_constraints[index] = std::move(constraint); updateRoleColumn(index); } -void EditLocalParameterDialog::setConstraintAll(QString constraint) { +void EditLocalParameterDialog::setConstraintAll(const QString &constraint) { for (int i = 0; i < m_constraints.size(); ++i) { m_constraints[i] = constraint; updateRoleColumn(i); diff --git a/qt/widgets/common/src/FileDialogHandler.cpp b/qt/widgets/common/src/FileDialogHandler.cpp index 16a9466dbc8ea02b68e845fcf8f571a2d2949f9d..aadd30c3ceacf918f95f53ae9307a133cebb45b4 100644 --- a/qt/widgets/common/src/FileDialogHandler.cpp +++ b/qt/widgets/common/src/FileDialogHandler.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/FileDialogHandler.h" #include "MantidAPI/FileProperty.h" @@ -41,7 +41,7 @@ namespace FileDialogHandler { */ QString getSaveFileName(QWidget *parent, const Mantid::Kernel::Property *baseProp, - QFileDialog::Options options) { + const QFileDialog::Options &options) { // set up filters and dialog title const auto filter = getFilter(baseProp); const auto caption = getCaption("Save file", baseProp); diff --git a/qt/widgets/common/src/FilePropertyWidget.cpp b/qt/widgets/common/src/FilePropertyWidget.cpp index ee28a25a7da5a2a051e1ddbaf9d557e237e77634..e23e5bdf9efe3232a2ecec13d2b5d1edc74c4ce7 100644 --- a/qt/widgets/common/src/FilePropertyWidget.cpp +++ b/qt/widgets/common/src/FilePropertyWidget.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/FilePropertyWidget.h" #include "MantidKernel/Property.h" diff --git a/qt/widgets/common/src/FindDialog.cpp b/qt/widgets/common/src/FindDialog.cpp index da12bcd59b1aa52dc38ad7d6c1bed4e4eec23654..65a73392ae475a1b5d1e80386a57ad41f1a4040d 100644 --- a/qt/widgets/common/src/FindDialog.cpp +++ b/qt/widgets/common/src/FindDialog.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //------------------------------------------- // Includes diff --git a/qt/widgets/common/src/FindFilesThreadPoolManager.cpp b/qt/widgets/common/src/FindFilesThreadPoolManager.cpp index 0d37299847cb8b57e2ffe04f666624f81312be85..2f03ba23f9798699ed33bcb988dc3816e27c6238 100644 --- a/qt/widgets/common/src/FindFilesThreadPoolManager.cpp +++ b/qt/widgets/common/src/FindFilesThreadPoolManager.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/FindFilesThreadPoolManager.h" #include "MantidAPI/AlgorithmManager.h" @@ -17,6 +17,7 @@ #include <QCoreApplication> #include <QSharedPointer> #include <boost/algorithm/string.hpp> +#include <utility> using namespace Mantid::Kernel; using namespace Mantid::API; @@ -63,7 +64,7 @@ FindFilesThreadPoolManager::FindFilesThreadPoolManager() { * worker objects */ void FindFilesThreadPoolManager::setAllocator(ThreadAllocator allocator) { - m_workerAllocator = allocator; + m_workerAllocator = std::move(allocator); } void FindFilesThreadPoolManager::createWorker( diff --git a/qt/widgets/common/src/FindFilesWorker.cpp b/qt/widgets/common/src/FindFilesWorker.cpp index 5179697c3990196c8c75d2a976b0bcfc4fe48af0..e30f61c724337e286aacf68458861fa2360dd033 100644 --- a/qt/widgets/common/src/FindFilesWorker.cpp +++ b/qt/widgets/common/src/FindFilesWorker.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/FindFilesWorker.h" #include "MantidAPI/AlgorithmManager.h" diff --git a/qt/widgets/common/src/FindReplaceDialog.cpp b/qt/widgets/common/src/FindReplaceDialog.cpp index 80e5865b215eefe5bb3bbfe62c64734dd6a9af3a..f6195337278f004f7d760cd5a7c97a4240bbd343 100644 --- a/qt/widgets/common/src/FindReplaceDialog.cpp +++ b/qt/widgets/common/src/FindReplaceDialog.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/FindReplaceDialog.h" #include "MantidQtWidgets/Common/ScriptEditor.h" diff --git a/qt/widgets/common/src/FitOptionsBrowser.cpp b/qt/widgets/common/src/FitOptionsBrowser.cpp index 753c8b1f62e80c1fca502978efbd4a32699e8709..83b2719810143120570e5972075f49c14717b4b0 100644 --- a/qt/widgets/common/src/FitOptionsBrowser.cpp +++ b/qt/widgets/common/src/FitOptionsBrowser.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/FitOptionsBrowser.h" @@ -838,7 +838,7 @@ void FitOptionsBrowser::displayProperty(const QString &propertyName, /** * Adds the property with the given name to a blacklist of properties to hide */ -bool FitOptionsBrowser::addPropertyToBlacklist(QString name) { +bool FitOptionsBrowser::addPropertyToBlacklist(const QString &name) { if (!m_propertyNameMap.contains(name)) { return false; } diff --git a/qt/widgets/common/src/FitPropertyBrowser.cpp b/qt/widgets/common/src/FitPropertyBrowser.cpp index da8592518324e8c63629ba350cb5c52909080649..1d75b9d193c2639287f0ee9cc793c2328a8bf748 100644 --- a/qt/widgets/common/src/FitPropertyBrowser.cpp +++ b/qt/widgets/common/src/FitPropertyBrowser.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/FitPropertyBrowser.h" #include "MantidQtWidgets/Common/HelpWindow.h" @@ -55,6 +55,7 @@ #include <QVBoxLayout> #include <algorithm> +#include <utility> namespace MantidQt { using API::MantidDesktopServices; @@ -66,7 +67,7 @@ Mantid::Kernel::Logger g_log("FitPropertyBrowser"); using namespace Mantid::API; -int getNumberOfSpectra(MatrixWorkspace_sptr workspace) { +int getNumberOfSpectra(const MatrixWorkspace_sptr &workspace) { return static_cast<int>(workspace->getNumberHistograms()); } @@ -774,7 +775,7 @@ void FitPropertyBrowser::closeFit() { m_fitSelector->close(); } * @param func :: [input] Pointer to function */ void FitPropertyBrowser::createCompositeFunction( - const Mantid::API::IFunction_sptr func) { + const Mantid::API::IFunction_sptr &func) { if (m_compositeFunction) { emit functionRemoved(); m_autoBackground = nullptr; @@ -1063,7 +1064,7 @@ void FitPropertyBrowser::deleteFunction() { removeFunction(h); } -//***********************************************************************************// +// // Get the default function name std::string FitPropertyBrowser::defaultFunctionType() const { @@ -1598,8 +1599,8 @@ void FitPropertyBrowser::setCurrentFunction(PropertyHandler *h) const { * @param f :: New current function */ void FitPropertyBrowser::setCurrentFunction( - Mantid::API::IFunction_const_sptr f) const { - setCurrentFunction(getHandler()->findHandler(f)); + const Mantid::API::IFunction_const_sptr &f) const { + setCurrentFunction(getHandler()->findHandler(std::move(f))); } /** @@ -2716,7 +2717,7 @@ void FitPropertyBrowser::reset() { } void FitPropertyBrowser::setWorkspace( - Mantid::API::IFunction_sptr function) const { + const Mantid::API::IFunction_sptr &function) const { std::string wsName = workspaceName(); if (!wsName.empty()) { try { @@ -2979,7 +2980,7 @@ bool FitPropertyBrowser::rawData() const { return m_boolManager->value(m_rawData); } -void FitPropertyBrowser::setTextPlotGuess(const QString text) { +void FitPropertyBrowser::setTextPlotGuess(const QString &text) { m_displayActionPlotGuess->setText(text); } diff --git a/qt/widgets/common/src/FunctionBrowser.cpp b/qt/widgets/common/src/FunctionBrowser.cpp index bae1b3f033793f056dbe98046eb71b12a4cc77b9..6824ab9ea5bb7ee3cae3b9bc55dadb3f77f3c5c7 100644 --- a/qt/widgets/common/src/FunctionBrowser.cpp +++ b/qt/widgets/common/src/FunctionBrowser.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/FunctionBrowser.h" #include "MantidQtWidgets/Common/FunctionMultiDomainPresenter.h" @@ -25,6 +25,7 @@ #include <algorithm> #include <boost/lexical_cast.hpp> +#include <utility> namespace { Mantid::Kernel::Logger g_log("Function Browser"); @@ -81,7 +82,7 @@ void FunctionBrowser::setFunction(const QString &funStr) { * @param fun :: A function */ void FunctionBrowser::setFunction(IFunction_sptr fun) { - m_presenter->setFunction(fun); + m_presenter->setFunction(std::move(fun)); } /** @@ -199,8 +200,8 @@ void FunctionBrowser::setCurrentDataset(int i) { /// Remove local parameter values for a number of datasets. /// @param indices :: A list of indices of datasets to remove. -void FunctionBrowser::removeDatasets(QList<int> indices) { - m_presenter->removeDatasets(indices); +void FunctionBrowser::removeDatasets(const QList<int> &indices) { + m_presenter->removeDatasets(std::move(indices)); } /// Add some datasets to those already set. diff --git a/qt/widgets/common/src/FunctionBrowser/FunctionBrowserUtils.cpp b/qt/widgets/common/src/FunctionBrowser/FunctionBrowserUtils.cpp index 301923a6218c19bae64945584018672217897475..e18d2df76753c86bbb67729623e4fdd788bfb1ca 100644 --- a/qt/widgets/common/src/FunctionBrowser/FunctionBrowserUtils.cpp +++ b/qt/widgets/common/src/FunctionBrowser/FunctionBrowserUtils.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/FunctionBrowser/FunctionBrowserUtils.h" #include "MantidAPI/CompositeFunction.h" diff --git a/qt/widgets/common/src/FunctionModel.cpp b/qt/widgets/common/src/FunctionModel.cpp index 4fb5ae720c8f96218bb34bc4441a0894bcb6eae4..6109e3be89a85e86e6faf8752d78f064a590f991 100644 --- a/qt/widgets/common/src/FunctionModel.cpp +++ b/qt/widgets/common/src/FunctionModel.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/FunctionModel.h" #include "MantidAPI/CompositeFunction.h" @@ -178,7 +178,8 @@ void FunctionModel::setParameterFixed(const QString &parName, bool fixed) { fixed); } -void FunctionModel::setParameterTie(const QString &parName, QString tie) { +void FunctionModel::setParameterTie(const QString &parName, + const QString &tie) { setLocalParameterTie(parName, static_cast<int>(m_currentDomainIndex), tie); } diff --git a/qt/widgets/common/src/FunctionMultiDomainPresenter.cpp b/qt/widgets/common/src/FunctionMultiDomainPresenter.cpp index 9e5f3011dd423e67254d34f43a4aa9864d0f9b8d..f6877ec980c03b52209a6d1b6690ae68d98c4cbc 100644 --- a/qt/widgets/common/src/FunctionMultiDomainPresenter.cpp +++ b/qt/widgets/common/src/FunctionMultiDomainPresenter.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/FunctionMultiDomainPresenter.h" #include "MantidAPI/IFunction.h" @@ -17,6 +17,7 @@ #include <QClipboard> #include <QMessageBox> #include <QWidget> +#include <utility> namespace MantidQt { namespace MantidWidgets { @@ -51,7 +52,7 @@ FunctionMultiDomainPresenter::FunctionMultiDomainPresenter(IFunctionView *view) } void FunctionMultiDomainPresenter::setFunction(IFunction_sptr fun) { - m_model->setFunction(fun); + m_model->setFunction(std::move(fun)); m_view->setFunction(m_model->getCurrentFunction()); emit functionStructureChanged(); } @@ -224,7 +225,8 @@ void FunctionMultiDomainPresenter::setLocalParameterFixed( } void FunctionMultiDomainPresenter::setLocalParameterTie(const QString &parName, - int i, QString tie) { + int i, + const QString &tie) { m_model->setLocalParameterTie(parName, i, tie); if (m_model->currentDomainIndex() == i) { m_view->setParameterTie(parName, tie); @@ -232,7 +234,7 @@ void FunctionMultiDomainPresenter::setLocalParameterTie(const QString &parName, } void FunctionMultiDomainPresenter::setLocalParameterConstraint( - const QString &parName, int i, QString constraint) { + const QString &parName, int i, const QString &constraint) { m_model->setLocalParameterConstraint(parName, i, constraint); if (m_model->currentDomainIndex() == i) { m_view->setParameterConstraint(parName, constraint); diff --git a/qt/widgets/common/src/FunctionTreeView.cpp b/qt/widgets/common/src/FunctionTreeView.cpp index 81e090003d4c3f408bec00b39ef820fbac0c9923..3969cf380a94a78f20d84c46e072ac754664b0af 100644 --- a/qt/widgets/common/src/FunctionTreeView.cpp +++ b/qt/widgets/common/src/FunctionTreeView.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/FunctionTreeView.h" #include "MantidQtWidgets/Common/FunctionBrowser/FunctionBrowserUtils.h" @@ -47,6 +47,7 @@ #include <algorithm> #include <boost/lexical_cast.hpp> +#include <utility> namespace { const char *globalOptionName = "Global"; @@ -362,7 +363,8 @@ void FunctionTreeView::removeProperty(QtProperty *prop) { * @return :: A set AProperty struct */ FunctionTreeView::AProperty -FunctionTreeView::addFunctionProperty(QtProperty *parent, QString funName) { +FunctionTreeView::addFunctionProperty(QtProperty *parent, + const QString &funName) { // check that parent is a function property if (parent && dynamic_cast<QtAbstractPropertyManager *>(m_functionManager) != parent->propertyManager()) { @@ -379,9 +381,9 @@ FunctionTreeView::addFunctionProperty(QtProperty *parent, QString funName) { * @param paramDesc :: Parameter description * @param paramValue :: Parameter value */ -FunctionTreeView::AProperty -FunctionTreeView::addParameterProperty(QtProperty *parent, QString paramName, - QString paramDesc, double paramValue) { +FunctionTreeView::AProperty FunctionTreeView::addParameterProperty( + QtProperty *parent, const QString ¶mName, const QString ¶mDesc, + double paramValue) { // check that parent is a function property if (!parent || dynamic_cast<QtAbstractPropertyManager *>(m_functionManager) != parent->propertyManager()) { @@ -406,11 +408,11 @@ FunctionTreeView::addParameterProperty(QtProperty *parent, QString paramName, * @param fun :: A function */ void FunctionTreeView::setFunction(QtProperty *prop, - Mantid::API::IFunction_sptr fun) { + const Mantid::API::IFunction_sptr &fun) { auto children = prop->subProperties(); foreach (QtProperty *child, children) { removeProperty(child); } // m_localParameterValues.clear(); - addAttributeAndParameterProperties(prop, fun); + addAttributeAndParameterProperties(prop, std::move(fun)); } /** @@ -419,7 +421,7 @@ void FunctionTreeView::setFunction(QtProperty *prop, * @param fun :: A function to add */ bool FunctionTreeView::addFunction(QtProperty *prop, - Mantid::API::IFunction_sptr fun) { + const Mantid::API::IFunction_sptr &fun) { if (!fun) return false; if (!prop) { @@ -459,8 +461,8 @@ class CreateAttributePropertyForFunctionTreeView public: CreateAttributePropertyForFunctionTreeView(FunctionTreeView *browser, QtProperty *parent, - QString attName) - : m_browser(browser), m_parent(parent), m_attName(attName) { + const QString &attName) + : m_browser(browser), m_parent(parent), m_attName(std::move(attName)) { // check that parent is a function property if (!m_parent || dynamic_cast<QtAbstractPropertyManager *>( @@ -614,9 +616,10 @@ private: * @param att :: Attribute value */ FunctionTreeView::AProperty FunctionTreeView::addAttributeProperty( - QtProperty *parent, QString attName, + QtProperty *parent, const QString &attName, const Mantid::API::IFunction::Attribute &att) { - CreateAttributePropertyForFunctionTreeView cap(this, parent, attName); + CreateAttributePropertyForFunctionTreeView cap(this, parent, + std::move(attName)); return att.apply(cap); } @@ -628,7 +631,7 @@ FunctionTreeView::AProperty FunctionTreeView::addAttributeProperty( * @param fun :: Shared pointer to a created function */ void FunctionTreeView::addAttributeAndParameterProperties( - QtProperty *prop, Mantid::API::IFunction_sptr fun) { + QtProperty *prop, const Mantid::API::IFunction_sptr &fun) { // add the function index property addIndexProperty(prop); @@ -703,7 +706,8 @@ FunctionTreeView::addIndexProperty(QtProperty *prop) { * @param prop :: A function property * @param index :: The parent function's index */ -void FunctionTreeView::updateFunctionIndices(QtProperty *prop, QString index) { +void FunctionTreeView::updateFunctionIndices(QtProperty *prop, + const QString &index) { if (prop == nullptr) { auto top = m_browser->properties(); if (top.isEmpty()) @@ -896,14 +900,10 @@ QtProperty *FunctionTreeView::getFunctionProperty(const QString &index) const { * @param prop :: Parent parameter property * @param tie :: A tie string */ -void FunctionTreeView::addTieProperty(QtProperty *prop, QString tie) { +void FunctionTreeView::addTieProperty(QtProperty *prop, const QString &tie) { if (!prop) { throw std::runtime_error("FunctionTreeView: null property pointer"); } - AProperty ap; - ap.item = nullptr; - ap.prop = nullptr; - ap.parent = nullptr; if (!isParameter(prop)) return; @@ -914,7 +914,7 @@ void FunctionTreeView::addTieProperty(QtProperty *prop, QString tie) { m_tieManager->blockSignals(true); QtProperty *tieProp = m_tieManager->addProperty("Tie"); m_tieManager->setValue(tieProp, tie); - ap = addProperty(prop, tieProp); + addProperty(prop, tieProp); m_tieManager->blockSignals(false); const auto parName = getParameterName(prop); @@ -977,7 +977,7 @@ QString FunctionTreeView::getTie(QtProperty *prop) const { */ QList<FunctionTreeView::AProperty> FunctionTreeView::addConstraintProperties(QtProperty *prop, - QString constraint) { + const QString &constraint) { if (!isParameter(prop)) return QList<FunctionTreeView::AProperty>(); auto const parts = splitConstraintString(constraint); diff --git a/qt/widgets/common/src/GenericDialog.cpp b/qt/widgets/common/src/GenericDialog.cpp index 1c20d5b806ff6a8a19babd41fc1675209f740711..acc1dc2b8b68a09731796347948425565ffdeb6a 100644 --- a/qt/widgets/common/src/GenericDialog.cpp +++ b/qt/widgets/common/src/GenericDialog.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------- // Includes diff --git a/qt/widgets/common/src/HelpWindow.cpp b/qt/widgets/common/src/HelpWindow.cpp index 0144e92287f599f65074d8db34ea12cce099f29d..435aa28ff312c821742d4a3eedaea5c0256338a7 100644 --- a/qt/widgets/common/src/HelpWindow.cpp +++ b/qt/widgets/common/src/HelpWindow.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/HelpWindow.h" #include "MantidKernel/ConfigService.h" diff --git a/qt/widgets/common/src/Hint.cpp b/qt/widgets/common/src/Hint.cpp index a4f5035e67676aba1ed231f144fad7ea3ef8531c..77f76416bbf148ed6eff120a669a482cb792f676 100644 --- a/qt/widgets/common/src/Hint.cpp +++ b/qt/widgets/common/src/Hint.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/Hint.h" namespace MantidQt { diff --git a/qt/widgets/common/src/HintingLineEdit.cpp b/qt/widgets/common/src/HintingLineEdit.cpp index cdf369f12c2bbb35d5e33bcd81c3ba6536063acb..0454039340b0f0c6c1c8f8eee4f30f15cc93d0ae 100644 --- a/qt/widgets/common/src/HintingLineEdit.cpp +++ b/qt/widgets/common/src/HintingLineEdit.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/HintingLineEdit.h" @@ -11,11 +11,12 @@ #include <QStyle> #include <QToolTip> #include <boost/algorithm/string.hpp> +#include <utility> namespace MantidQt { namespace MantidWidgets { HintingLineEdit::HintingLineEdit(QWidget *parent, std::vector<Hint> hints) - : QLineEdit(parent), m_hints(hints), m_dontComplete(false) { + : QLineEdit(parent), m_hints(std::move(hints)), m_dontComplete(false) { m_hintLabel = new QLabel(this, Qt::ToolTip); m_hintLabel->setMargin(1 + style()->pixelMetric(QStyle::PM_ToolTipLabelFrameWidth, diff --git a/qt/widgets/common/src/IFunctionModel.cpp b/qt/widgets/common/src/IFunctionModel.cpp index c0a1fb2f9cd5279163142b765810e9098e374cc5..0b630efb81e64327b1508416fc687dc2dad3d28c 100644 --- a/qt/widgets/common/src/IFunctionModel.cpp +++ b/qt/widgets/common/src/IFunctionModel.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/IFunctionModel.h" #include "MantidAPI/FunctionFactory.h" diff --git a/qt/widgets/common/src/IndirectFitPropertyBrowserLegacy.cpp b/qt/widgets/common/src/IndirectFitPropertyBrowserLegacy.cpp index 78b8f9eb0cdfcbeae1a0f1e367c1f9994906c7b5..4d6335bc43bf5677def7b96873967deae3ba075f 100644 --- a/qt/widgets/common/src/IndirectFitPropertyBrowserLegacy.cpp +++ b/qt/widgets/common/src/IndirectFitPropertyBrowserLegacy.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/IndirectFitPropertyBrowserLegacy.h" #include "MantidAPI/MatrixWorkspace.h" @@ -211,8 +211,8 @@ IndirectFitPropertyBrowserLegacy::backgroundIndex() const { * @param function The function, whose function index to retrieve. * @return The function index of the specified function in the browser. */ -boost::optional<size_t> -IndirectFitPropertyBrowserLegacy::functionIndex(IFunction_sptr function) const { +boost::optional<size_t> IndirectFitPropertyBrowserLegacy::functionIndex( + const IFunction_sptr &function) const { for (size_t i = 0u; i < compositeFunction()->nFunctions(); ++i) { if (compositeFunction()->getFunction(i) == function) return i; @@ -344,7 +344,8 @@ void IndirectFitPropertyBrowserLegacy::setParameterValue( * @param value The value to set. */ void IndirectFitPropertyBrowserLegacy::setParameterValue( - IFunction_sptr function, const std::string ¶meterName, double value) { + const IFunction_sptr &function, const std::string ¶meterName, + double value) { if (function->hasParameter(parameterName)) { function->setParameter(parameterName, value); emit parameterChanged(function.get()); @@ -818,7 +819,7 @@ void IndirectFitPropertyBrowserLegacy::clearAllCustomFunctions() { * @param sampleWorkspace :: The workspace loaded as sample */ void IndirectFitPropertyBrowserLegacy::updatePlotGuess( - MatrixWorkspace_const_sptr sampleWorkspace) { + const MatrixWorkspace_const_sptr &sampleWorkspace) { if (sampleWorkspace && compositeFunction()->nFunctions() > 0) setPeakToolOn(true); else diff --git a/qt/widgets/common/src/InputController.cpp b/qt/widgets/common/src/InputController.cpp index 8718dded389c7658a0d08373e407061326bd6420..3141d14afed5eb0814106e98e61989ef80ffae69 100644 --- a/qt/widgets/common/src/InputController.cpp +++ b/qt/widgets/common/src/InputController.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/InputController.h" diff --git a/qt/widgets/common/src/InstrumentSelector.cpp b/qt/widgets/common/src/InstrumentSelector.cpp index 7d66611e9b29bfee6f2369bb9de45dccbcfbca07..f647479948c486d991c21defc4751d3aa937aa24 100644 --- a/qt/widgets/common/src/InstrumentSelector.cpp +++ b/qt/widgets/common/src/InstrumentSelector.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/InstrumentSelector.h" #include "MantidKernel/ConfigService.h" diff --git a/qt/widgets/common/src/InterfaceManager.cpp b/qt/widgets/common/src/InterfaceManager.cpp index c7da61d1083ed74bc8e5d895c58d3dbb4625fcce..e0c13a43397318707e0f068306c4f9e01c241ba9 100644 --- a/qt/widgets/common/src/InterfaceManager.cpp +++ b/qt/widgets/common/src/InterfaceManager.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------- // Includes @@ -74,7 +74,7 @@ Mantid::Kernel::AbstractInstantiator<MantidHelpInterface> * @returns An AlgorithmDialog object */ AlgorithmDialog *InterfaceManager::createDialog( - boost::shared_ptr<Mantid::API::IAlgorithm> alg, QWidget *parent, + const boost::shared_ptr<Mantid::API::IAlgorithm> &alg, QWidget *parent, bool forScript, const QHash<QString, QString> &presetValues, const QString &optionalMsg, const QStringList &enabled, const QStringList &disabled) { diff --git a/qt/widgets/common/src/ListPropertyWidget.cpp b/qt/widgets/common/src/ListPropertyWidget.cpp index 51d2dff1a6692bd674941bdb7f368d7a4b269bbd..4bd23e51f896839b9a8235bbca9ea66129d13049 100644 --- a/qt/widgets/common/src/ListPropertyWidget.cpp +++ b/qt/widgets/common/src/ListPropertyWidget.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/ListPropertyWidget.h" #include "MantidAPI/IWorkspaceProperty.h" diff --git a/qt/widgets/common/src/LocalParameterEditor.cpp b/qt/widgets/common/src/LocalParameterEditor.cpp index d726d3623c712c1bc826a19bc9f7fda6255c670d..c502f1c4a3b9ceb6823fafd421a37a931f0579df 100644 --- a/qt/widgets/common/src/LocalParameterEditor.cpp +++ b/qt/widgets/common/src/LocalParameterEditor.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/LocalParameterEditor.h" #include "MantidQtWidgets/Common/EditLocalParameterDialog.h" @@ -16,6 +16,7 @@ #include <QLineEdit> #include <QMenu> #include <QPushButton> +#include <utility> namespace MantidQt { namespace MantidWidgets { @@ -31,16 +32,14 @@ namespace MantidWidgets { /// @param allOthersFixed :: True if all other local parameters are fixed. /// @param othersTied :: True if there are other tied parameters. /// @param logOptionsEnabled :: True if the log checkbox is ticked. -LocalParameterEditor::LocalParameterEditor(QWidget *parent, int index, - double value, bool fixed, - QString tie, QString constraint, - bool othersFixed, - bool allOthersFixed, bool othersTied, - bool logOptionsEnabled) +LocalParameterEditor::LocalParameterEditor( + QWidget *parent, int index, double value, bool fixed, const QString &tie, + const QString &constraint, bool othersFixed, bool allOthersFixed, + bool othersTied, bool logOptionsEnabled) : QWidget(parent), m_index(index), m_value(QString::number(value, 'g', 16)), - m_fixed(fixed), m_tie(tie), m_constraint(constraint), - m_othersFixed(othersFixed), m_allOthersFixed(allOthersFixed), - m_othersTied(othersTied) { + m_fixed(fixed), m_tie(std::move(tie)), + m_constraint(std::move(constraint)), m_othersFixed(othersFixed), + m_allOthersFixed(allOthersFixed), m_othersTied(othersTied) { auto layout = new QHBoxLayout(this); layout->setMargin(0); layout->setSpacing(0); @@ -312,7 +311,7 @@ void LocalParameterEditor::setEditorState() { } /// Open an input dialog to enter a tie expression. -QString LocalParameterEditor::setTieDialog(QString tie) { +QString LocalParameterEditor::setTieDialog(const QString &tie) { QInputDialog input; input.setWindowTitle("Set a tie."); input.setTextValue(tie); @@ -322,7 +321,7 @@ QString LocalParameterEditor::setTieDialog(QString tie) { return ""; } -QString LocalParameterEditor::setConstraintDialog(QString constraint) { +QString LocalParameterEditor::setConstraintDialog(const QString &constraint) { QInputDialog input; input.setWindowTitle("Set a constraint."); input.setTextValue(constraint); diff --git a/qt/widgets/common/src/LocalParameterItemDelegate.cpp b/qt/widgets/common/src/LocalParameterItemDelegate.cpp index 4cf46e28782865d65cb308087e1b4dabc562caee..131fb4bef8ffca618b307fd929316ee38483b5e7 100644 --- a/qt/widgets/common/src/LocalParameterItemDelegate.cpp +++ b/qt/widgets/common/src/LocalParameterItemDelegate.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/LocalParameterItemDelegate.h" #include "MantidQtWidgets/Common/EditLocalParameterDialog.h" diff --git a/qt/widgets/common/src/LogValueFinder.cpp b/qt/widgets/common/src/LogValueFinder.cpp index a39198fdac5fb818869cb76f187482d11acaefc9..6988b04b2d4a4d9df87a2bfd9220227852890c98 100644 --- a/qt/widgets/common/src/LogValueFinder.cpp +++ b/qt/widgets/common/src/LogValueFinder.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/LogValueFinder.h" #include "MantidAPI/AnalysisDataService.h" diff --git a/qt/widgets/common/src/LogValueSelector.cpp b/qt/widgets/common/src/LogValueSelector.cpp index 01e695c0b2466e60dae7bb08fb68511faf8d2815..7d13a647efd4183cc9d1a203a190dcdb85c04984 100644 --- a/qt/widgets/common/src/LogValueSelector.cpp +++ b/qt/widgets/common/src/LogValueSelector.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/LogValueSelector.h" diff --git a/qt/widgets/common/src/MWRunFiles.cpp b/qt/widgets/common/src/MWRunFiles.cpp index 52c1508eef730dffa951bb0fdd0e5672079736ea..0ff8da2c9bbcd6cdccfbbab6f0d651dcb010ca0d 100644 --- a/qt/widgets/common/src/MWRunFiles.cpp +++ b/qt/widgets/common/src/MWRunFiles.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/MWRunFiles.h" #include "MantidQtWidgets/Common/DropEventHelper.h" diff --git a/qt/widgets/common/src/ManageUserDirectories.cpp b/qt/widgets/common/src/ManageUserDirectories.cpp index 8cb61539647b0c48c0611da2f2cb9f7d88c239ea..0cdbc60527d6779b089ef6d91fb81c79a3208782 100644 --- a/qt/widgets/common/src/ManageUserDirectories.cpp +++ b/qt/widgets/common/src/ManageUserDirectories.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/ManageUserDirectories.h" #include "MantidKernel/ConfigService.h" diff --git a/qt/widgets/common/src/MantidDesktopServices.cpp b/qt/widgets/common/src/MantidDesktopServices.cpp index bf2189f918c8e34661425f0a04a37d846befb3d4..5d27e7957f1b4c4e356b0fc88bfe5b785a55b8cd 100644 --- a/qt/widgets/common/src/MantidDesktopServices.cpp +++ b/qt/widgets/common/src/MantidDesktopServices.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/MantidDesktopServices.h" diff --git a/qt/widgets/common/src/MantidDialog.cpp b/qt/widgets/common/src/MantidDialog.cpp index 00cfa892e4431acf0fe83e09dca5b00ce67570cd..dd67a2f8c7d3a8f00d69435db2146bcb2926eec2 100644 --- a/qt/widgets/common/src/MantidDialog.cpp +++ b/qt/widgets/common/src/MantidDialog.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------- // Includes @@ -19,7 +19,7 @@ using namespace MantidQt::API; /** * Default Constructor */ -MantidDialog::MantidDialog(QWidget *parent, Qt::WindowFlags flags) +MantidDialog::MantidDialog(QWidget *parent, const Qt::WindowFlags &flags) : QDialog(parent, flags), m_pyRunner() { // re-emit the run Python code from m_pyRunner, to work this signal must reach // the slot in QtiPlot diff --git a/qt/widgets/common/src/MantidHelpInterface.cpp b/qt/widgets/common/src/MantidHelpInterface.cpp index df5dd41e9d94ce33cbc37ec5c984720458a6f4b5..6a24b467560ae2fdf6ac4fc0ffaf6d0a2494c149 100644 --- a/qt/widgets/common/src/MantidHelpInterface.cpp +++ b/qt/widgets/common/src/MantidHelpInterface.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/MantidHelpInterface.h" #include <QString> diff --git a/qt/widgets/common/src/MantidHelpWindow.cpp b/qt/widgets/common/src/MantidHelpWindow.cpp index 2c451a8a13cb4c446f06d48162f862395a234dcd..cb0af5b2e49db68bb93bbee2d07ed9ecb921ab5d 100644 --- a/qt/widgets/common/src/MantidHelpWindow.cpp +++ b/qt/widgets/common/src/MantidHelpWindow.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/MantidHelpWindow.h" #include "MantidAPI/AlgorithmManager.h" @@ -65,7 +65,8 @@ const QString COLLECTION_FILE("MantidProject.qhc"); /** * Default constructor shows the @link DEFAULT_URL @endlink. */ -MantidHelpWindow::MantidHelpWindow(QWidget *parent, Qt::WindowFlags flags) +MantidHelpWindow::MantidHelpWindow(QWidget *parent, + const Qt::WindowFlags &flags) : MantidHelpInterface(), m_collectionFile(""), m_cacheFile(""), m_firstRun(true) { // find the collection and delete the cache file if this is the first run @@ -487,7 +488,7 @@ void MantidHelpWindow::determineFileLocs() { } } -void MantidHelpWindow::warning(QString msg) { +void MantidHelpWindow::warning(const QString &msg) { g_log.warning(msg.toStdString()); } diff --git a/qt/widgets/common/src/MantidTreeModel.cpp b/qt/widgets/common/src/MantidTreeModel.cpp index dccf683c2ca6af63769dc1d9b4d3939151b18f28..f7dbee085936a1d1f9f38b9a87c6ebd223761704 100644 --- a/qt/widgets/common/src/MantidTreeModel.cpp +++ b/qt/widgets/common/src/MantidTreeModel.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/MantidTreeModel.h" #include "MantidAPI/AnalysisDataService.h" @@ -121,8 +121,8 @@ void MantidTreeModel::showAlgorithmDialog(const QString &algName, * This creates an algorithm dialog (the default property entry thingie). * Helper function not required by interface */ -MantidQt::API::AlgorithmDialog * -MantidTreeModel::createAlgorithmDialog(Mantid::API::IAlgorithm_sptr alg) { +MantidQt::API::AlgorithmDialog *MantidTreeModel::createAlgorithmDialog( + const Mantid::API::IAlgorithm_sptr &alg) { QHash<QString, QString> presets; QStringList enabled; diff --git a/qt/widgets/common/src/MantidTreeWidget.cpp b/qt/widgets/common/src/MantidTreeWidget.cpp index 792080435137d11e4f79b1584e54ed063a133017..fa6c4d5a6f0e4e7906f73bc76f818ca1e7d1a1d5 100644 --- a/qt/widgets/common/src/MantidTreeWidget.cpp +++ b/qt/widgets/common/src/MantidTreeWidget.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/MantidTreeWidget.h" #include "MantidQtWidgets/Common/WorkspacePresenter/WorkspaceTreeWidget.h" @@ -37,7 +37,7 @@ MantidTreeWidget::MantidTreeWidget(MantidDisplayBase *mui, QWidget *parent) setSortOrder(Qt::AscendingOrder); setAcceptDrops(true); - m_doubleClickAction = [&](QString wsName) { + m_doubleClickAction = [&](const QString &wsName) { m_mantidUI->importWorkspace(wsName, false); }; } diff --git a/qt/widgets/common/src/MantidTreeWidgetItem.cpp b/qt/widgets/common/src/MantidTreeWidgetItem.cpp index ffd438be9c337060a4b610645629a5e4c466587f..0381fcafdcde5130cbfe4dbc9dca25b3794b913c 100644 --- a/qt/widgets/common/src/MantidTreeWidgetItem.cpp +++ b/qt/widgets/common/src/MantidTreeWidgetItem.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/MantidTreeWidgetItem.h" #include "MantidQtWidgets/Common/MantidTreeWidget.h" @@ -25,7 +25,7 @@ MantidTreeWidgetItem::MantidTreeWidgetItem(MantidTreeWidget *parent) /**Constructor. * Must be passed its parent MantidTreeWidget, to facilitate correct sorting. */ -MantidTreeWidgetItem::MantidTreeWidgetItem(QStringList list, +MantidTreeWidgetItem::MantidTreeWidgetItem(const QStringList &list, MantidTreeWidget *parent) : QTreeWidgetItem(list), m_parent(parent), m_sortPos(0) {} diff --git a/qt/widgets/common/src/MantidWSIndexDialog.cpp b/qt/widgets/common/src/MantidWSIndexDialog.cpp index ae3318f503fe6c94e1460853ec9205331a876615..b017b39fa43f09ad9296dd5d008d3d09951c0a25 100644 --- a/qt/widgets/common/src/MantidWSIndexDialog.cpp +++ b/qt/widgets/common/src/MantidWSIndexDialog.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/MantidWSIndexDialog.h" #include "MantidAPI/AnalysisDataService.h" @@ -20,6 +20,7 @@ #include <boost/lexical_cast.hpp> #include <cstdlib> #include <exception> +#include <utility> namespace MantidQt { namespace MantidWidgets { @@ -48,7 +49,8 @@ const QString MantidWSIndexWidget::CONTOUR_PLOT = "Contour Plot"; * @param showTiledOption :: true if tiled plot enabled * @param isAdvanced :: true if advanced plotting has been selected */ -MantidWSIndexWidget::MantidWSIndexWidget(QWidget *parent, Qt::WindowFlags flags, +MantidWSIndexWidget::MantidWSIndexWidget(QWidget *parent, + const Qt::WindowFlags &flags, const QList<QString> &wsNames, const bool showWaterfallOption, const bool showTiledOption, @@ -830,12 +832,10 @@ bool MantidWSIndexWidget::usingSpectraNumbers() const { * @param showTiledOption :: If true the "Tiled" option is created * @param isAdvanced :: true if adanced plotting dialog is created */ -MantidWSIndexDialog::MantidWSIndexDialog(QWidget *parent, Qt::WindowFlags flags, - const QList<QString> &wsNames, - const bool showWaterfallOption, - const bool showPlotAll, - const bool showTiledOption, - const bool isAdvanced) +MantidWSIndexDialog::MantidWSIndexDialog( + QWidget *parent, const Qt::WindowFlags &flags, + const QList<QString> &wsNames, const bool showWaterfallOption, + const bool showPlotAll, const bool showTiledOption, const bool isAdvanced) : QDialog(parent, flags), m_widget(this, flags, wsNames, showWaterfallOption, showTiledOption, isAdvanced), @@ -973,7 +973,7 @@ Interval::Interval(int single) { init(single, single); } Interval::Interval(int start, int end) { init(start, end); } -Interval::Interval(QString intervalString) { +Interval::Interval(const QString &intervalString) { // Check to see if string is of the correct format, and then parse. // An interval can either be "n" or "n-m" where n and m are integers const QString patternSingle("^\\d+$"); // E.g. "2" or "712" @@ -1086,9 +1086,13 @@ void Interval::init(int start, int end) { //---------------------------------- IntervalList::IntervalList(void) {} -IntervalList::IntervalList(QString intervals) { addIntervals(intervals); } +IntervalList::IntervalList(const QString &intervals) { + addIntervals(std::move(intervals)); +} -IntervalList::IntervalList(Interval interval) { m_list.append(interval); } +IntervalList::IntervalList(const Interval &interval) { + m_list.append(interval); +} IntervalList::IntervalList(const IntervalList ©) { m_list = copy.m_list; } @@ -1350,7 +1354,8 @@ MantidWSIndexWidget::QLineEditWithErrorMark::QLineEditWithErrorMark( setLayout(layout); } -void MantidWSIndexWidget::QLineEditWithErrorMark::setError(QString error) { +void MantidWSIndexWidget::QLineEditWithErrorMark::setError( + const QString &error) { if (error.isEmpty()) { m_validLbl->setVisible(false); } else { diff --git a/qt/widgets/common/src/MantidWidget.cpp b/qt/widgets/common/src/MantidWidget.cpp index f733671c7f58330f54fee347fab6f24de91ce588..9a5d0be4c4fcbd9b8e6f97be283a68d320382519 100644 --- a/qt/widgets/common/src/MantidWidget.cpp +++ b/qt/widgets/common/src/MantidWidget.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/MantidWidget.h" #include "MantidKernel/Exception.h" diff --git a/qt/widgets/common/src/MdConstants.cpp b/qt/widgets/common/src/MdConstants.cpp index 83a9fca7d83752794482f89ba7ca95535e435696..ce71c2a4a07b0d9d999ec79369ddaf72092a4a11 100644 --- a/qt/widgets/common/src/MdConstants.cpp +++ b/qt/widgets/common/src/MdConstants.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/MdConstants.h" #include <QColor> diff --git a/qt/widgets/common/src/MdSettings.cpp b/qt/widgets/common/src/MdSettings.cpp index 7b67acbe5343a252bb7ff2be463241f170730d34..291db7c62ccb1616619c628f45d37251c16c3a19 100644 --- a/qt/widgets/common/src/MdSettings.cpp +++ b/qt/widgets/common/src/MdSettings.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/MdSettings.h" #include "MantidQtWidgets/Common/MdConstants.h" @@ -47,7 +47,7 @@ QString MdSettings::getUserSettingColorMap() { return userSettingColorMap; } -void MdSettings::setUserSettingColorMap(QString colorMap) { +void MdSettings::setUserSettingColorMap(const QString &colorMap) { QSettings settings; settings.beginGroup(m_vsiGroup); @@ -66,7 +66,7 @@ QString MdSettings::getLastSessionColorMap() { return colormap; } -void MdSettings::setLastSessionColorMap(QString colorMap) { +void MdSettings::setLastSessionColorMap(const QString &colorMap) { QSettings settings; settings.beginGroup(m_vsiGroup); @@ -87,7 +87,7 @@ QColor MdSettings::getUserSettingBackgroundColor() { return backgroundColor; } -void MdSettings::setUserSettingBackgroundColor(QColor backgroundColor) { +void MdSettings::setUserSettingBackgroundColor(const QColor &backgroundColor) { QSettings settings; settings.beginGroup(m_vsiGroup); @@ -112,7 +112,7 @@ QColor MdSettings::getDefaultBackgroundColor() { return m_mdConstants.getDefaultBackgroundColor(); } -void MdSettings::setLastSessionBackgroundColor(QColor backgroundColor) { +void MdSettings::setLastSessionBackgroundColor(const QColor &backgroundColor) { QSettings settings; settings.beginGroup(m_vsiGroup); @@ -120,8 +120,8 @@ void MdSettings::setLastSessionBackgroundColor(QColor backgroundColor) { settings.endGroup(); } -void MdSettings::setGeneralMdColorMap(QString colorMapName, - QString colorMapFile) { +void MdSettings::setGeneralMdColorMap(const QString &colorMapName, + const QString &colorMapFile) { QSettings settings; settings.beginGroup(m_generalMdGroup); @@ -221,7 +221,7 @@ bool MdSettings::getLastSessionLogScale() { return logScale; } -void MdSettings::setUserSettingIntialView(QString initialView) { +void MdSettings::setUserSettingIntialView(const QString &initialView) { QSettings settings; settings.beginGroup(m_vsiGroup); diff --git a/qt/widgets/common/src/Message.cpp b/qt/widgets/common/src/Message.cpp index ea9bb6548ed72f1760ad018afde12e5574d8da87..fe80bde54c025d63f19cd10cf90cfd2c36968076 100644 --- a/qt/widgets/common/src/Message.cpp +++ b/qt/widgets/common/src/Message.cpp @@ -1,12 +1,14 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //------------------------------------------- // Includes //------------------------------------------- +#include <utility> + #include "MantidQtWidgets/Common/Message.h" namespace MantidQt { @@ -28,8 +30,10 @@ Message::Message() * @param scriptPath The path of the script the message originated from. Empty * string if no script applicable */ -Message::Message(const QString &text, Priority priority, QString scriptPath) - : QObject(), m_text(text), m_priority(priority), m_scriptPath(scriptPath) {} +Message::Message(const QString &text, Priority priority, + const QString &scriptPath) + : QObject(), m_text(text), m_priority(priority), + m_scriptPath(std::move(scriptPath)) {} /** * @param text A std::string containing the message text @@ -37,9 +41,10 @@ Message::Message(const QString &text, Priority priority, QString scriptPath) * @param scriptPath The path of the script the message originated from. Empty * string if no script applicable */ -Message::Message(const std::string &text, Priority priority, QString scriptPath) +Message::Message(const std::string &text, Priority priority, + const QString &scriptPath) : QObject(), m_text(QString::fromStdString(text)), m_priority(priority), - m_scriptPath(scriptPath) {} + m_scriptPath(std::move(scriptPath)) {} /** * @param text A c-style string containing the message text @@ -47,8 +52,9 @@ Message::Message(const std::string &text, Priority priority, QString scriptPath) * @param scriptPath The path of the script the message originated from. Empty * string if no script applicable */ -Message::Message(const char *text, Priority priority, QString scriptPath) - : QObject(), m_text(text), m_priority(priority), m_scriptPath(scriptPath) {} +Message::Message(const char *text, Priority priority, const QString &scriptPath) + : QObject(), m_text(text), m_priority(priority), + m_scriptPath(std::move(scriptPath)) {} /** * Construct a message from another object diff --git a/qt/widgets/common/src/MessageDisplay.cpp b/qt/widgets/common/src/MessageDisplay.cpp index 993684a75e9f028ece1e84d2c94e73b0cbb681d4..8ab99a703dc540308a72b94eb745cbd123b84db2 100644 --- a/qt/widgets/common/src/MessageDisplay.cpp +++ b/qt/widgets/common/src/MessageDisplay.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //------------------------------------------- // Includes @@ -102,8 +102,6 @@ MessageDisplay::MessageDisplay(const QFont &font, QWidget *parent) setupTextArea(font); } -/** - */ MessageDisplay::~MessageDisplay() { // The Channel class is ref counted and will // delete itself when required diff --git a/qt/widgets/common/src/MultifitSetupDialog.cpp b/qt/widgets/common/src/MultifitSetupDialog.cpp index 77791d2890d4ad3ba9028fa7d9f084e35e6e5da1..b8503e043c779358cdf224feb623760925896ef4 100644 --- a/qt/widgets/common/src/MultifitSetupDialog.cpp +++ b/qt/widgets/common/src/MultifitSetupDialog.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //--------------------------------------- // Includes diff --git a/qt/widgets/common/src/MuonFitDataSelector.cpp b/qt/widgets/common/src/MuonFitDataSelector.cpp index 9e74cb7233622420d42d2863620d00c70e041de4..e74afb54bcf05174db23ee85c2111707a0b95c5e 100644 --- a/qt/widgets/common/src/MuonFitDataSelector.cpp +++ b/qt/widgets/common/src/MuonFitDataSelector.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/MuonFitDataSelector.h" #include "MantidKernel/Logger.h" diff --git a/qt/widgets/common/src/MuonFitPropertyBrowser.cpp b/qt/widgets/common/src/MuonFitPropertyBrowser.cpp index a6d57621d2081a75ca24ec909e7c8b4f61172809..f4bb2caa3260259299a9b79b19962d30a28a2669 100644 --- a/qt/widgets/common/src/MuonFitPropertyBrowser.cpp +++ b/qt/widgets/common/src/MuonFitPropertyBrowser.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/MuonFitPropertyBrowser.h" #include "MantidAPI/FunctionFactory.h" @@ -64,6 +64,7 @@ #include <QMessageBox> #include <QSignalMapper> #include <QTableWidgetItem> +#include <utility> namespace { Mantid::Kernel::Logger g_log("MuonFitPropertyBrowser"); @@ -514,7 +515,7 @@ void MuonFitPropertyBrowser::setNormalization() { * @param name :: the ws name to get normalization for * @returns the normalization */ -void MuonFitPropertyBrowser::setNormalization(const std::string name) { +void MuonFitPropertyBrowser::setNormalization(const std::string &name) { m_normalizationValue.clear(); QString label; auto norms = readMultipleNormalization(); @@ -891,7 +892,7 @@ bool MuonFitPropertyBrowser::isWorkspaceValid(Workspace_sptr ws) const { return dynamic_cast<MatrixWorkspace *>(ws.get()) != nullptr; } -void MuonFitPropertyBrowser::setFitWorkspaces(const std::string input) { +void MuonFitPropertyBrowser::setFitWorkspaces(const std::string &input) { // Copy experiment info to output workspace if (AnalysisDataService::Instance().doesExist(outputName() + "_Workspace")) { // Input workspace should be a MatrixWorkspace according to isWorkspaceValid @@ -1027,7 +1028,7 @@ void MuonFitPropertyBrowser::finishAfterSimultaneousFit( * @param baseName :: [input] The common name of the workspaces of interest */ void MuonFitPropertyBrowser::finishAfterTFSimultaneousFit( - const Mantid::API::IAlgorithm *alg, const std::string baseName) const { + const Mantid::API::IAlgorithm *alg, const std::string &baseName) const { AnalysisDataServiceImpl &ads = AnalysisDataService::Instance(); try { std::vector<std::string> wsList = @@ -1827,7 +1828,7 @@ void MuonFitPropertyBrowser::combineBtnPressed() { * selects the relevant group/pair * @param name :: string of the ws */ -void MuonFitPropertyBrowser::setSingleFitLabel(std::string name) { +void MuonFitPropertyBrowser::setSingleFitLabel(const std::string &name) { clearChosenGroups(); clearChosenPeriods(); std::vector<std::string> splitName; @@ -1898,7 +1899,7 @@ void MuonFitPropertyBrowser::setAllGroupsOrPairs(const bool isItGroup) { } void MuonFitPropertyBrowser::setGroupNames( std::vector<std::string> groupNames) { - m_groupsList = groupNames; + m_groupsList = std::move(groupNames); } void MuonFitPropertyBrowser::setTFAsymm(bool state) { m_boolManager->setValue(m_TFAsymmMode, state); diff --git a/qt/widgets/common/src/MuonFunctionBrowser.cpp b/qt/widgets/common/src/MuonFunctionBrowser.cpp index 336ec62b0b3ed99956fccf1a79ac032bd83c1fd7..1e6463e004711555d1040278ec74afbf725a98a3 100644 --- a/qt/widgets/common/src/MuonFunctionBrowser.cpp +++ b/qt/widgets/common/src/MuonFunctionBrowser.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/MuonFunctionBrowser.h" #include "MantidQtWidgets/Common/SelectFunctionDialog.h" diff --git a/qt/widgets/common/src/NonOrthogonal.cpp b/qt/widgets/common/src/NonOrthogonal.cpp index 8b49d72d88695812edf3eab0010e46820d0794dc..7a5d216a9a8f15add575e5324ad15fa87fb06d9b 100644 --- a/qt/widgets/common/src/NonOrthogonal.cpp +++ b/qt/widgets/common/src/NonOrthogonal.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/NonOrthogonal.h" #include "MantidAPI/CoordTransform.h" @@ -350,9 +350,9 @@ double getAngleInRadian(std::array<Mantid::coord_t, N> orthogonalVector, namespace MantidQt { namespace API { -size_t -getMissingHKLDimensionIndex(Mantid::API::IMDWorkspace_const_sptr workspace, - size_t dimX, size_t dimY) { +size_t getMissingHKLDimensionIndex( + const Mantid::API::IMDWorkspace_const_sptr &workspace, size_t dimX, + size_t dimY) { for (size_t i = 0; i < workspace->getNumDims(); ++i) { auto dimension = workspace->getDimension(i); const auto &frame = dimension->getMDFrame(); diff --git a/qt/widgets/common/src/NotificationService.cpp b/qt/widgets/common/src/NotificationService.cpp index 480380d6da9cadd91923a945a06ea47983b25c3c..949db281a1f98936aa16dc144510fcfb8139706f 100644 --- a/qt/widgets/common/src/NotificationService.cpp +++ b/qt/widgets/common/src/NotificationService.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/NotificationService.h" #include "MantidKernel/ConfigService.h" diff --git a/qt/widgets/common/src/OptionsPropertyWidget.cpp b/qt/widgets/common/src/OptionsPropertyWidget.cpp index 4a80e5f66e86bffa299e125f7d34e82d19a7cb8f..0295f3746f19025803851d4b11c17604386cfc45 100644 --- a/qt/widgets/common/src/OptionsPropertyWidget.cpp +++ b/qt/widgets/common/src/OptionsPropertyWidget.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/OptionsPropertyWidget.h" #include "MantidAPI/IWorkspaceProperty.h" diff --git a/qt/widgets/common/src/ParseKeyValueString.cpp b/qt/widgets/common/src/ParseKeyValueString.cpp index c96d8c94ed722d8ed52d82ba49c503a1bbfe6c56..2f817e192e6e51ebfaa94709450948562dd1302f 100644 --- a/qt/widgets/common/src/ParseKeyValueString.cpp +++ b/qt/widgets/common/src/ParseKeyValueString.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/ParseKeyValueString.h" #include <QStringList> diff --git a/qt/widgets/common/src/ParseNumerics.cpp b/qt/widgets/common/src/ParseNumerics.cpp index efab59d3e33329712fa74e3d5af4b6ac67b1077c..5e24cc49e776c264162d019ff17d6e601b56d12f 100644 --- a/qt/widgets/common/src/ParseNumerics.cpp +++ b/qt/widgets/common/src/ParseNumerics.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/ParseNumerics.h" #include <stdexcept> diff --git a/qt/widgets/common/src/PlotAxis.cpp b/qt/widgets/common/src/PlotAxis.cpp index e28f96207848f4bc8ce434686b9f422adc90c5df..16ed2f1d3e6e8e256a7791a11985a50ecae0b40e 100644 --- a/qt/widgets/common/src/PlotAxis.cpp +++ b/qt/widgets/common/src/PlotAxis.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/PlotAxis.h" #include "MantidQtWidgets/Common/QStringUtils.h" @@ -22,7 +22,7 @@ namespace { QString replacePerWithNegativeIndice(const std::string &label, const bool &plotAsDistribution, - const Mantid::Kernel::UnitLabel xLabel = "") { + const Mantid::Kernel::UnitLabel &xLabel = "") { std::vector<std::string> splitVec; QString negativeOnePower = toQStringInternal(L"\u207b\u00b9"); QString newLabel; diff --git a/qt/widgets/common/src/PluginLibraries.cpp b/qt/widgets/common/src/PluginLibraries.cpp index 123b4132983d783cbc2f48fae2d6d2d65c2def13..ef046a6cb87e9ac792fdbb3a5829e7a2dc37dd19 100644 --- a/qt/widgets/common/src/PluginLibraries.cpp +++ b/qt/widgets/common/src/PluginLibraries.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/PluginLibraries.h" #include "MantidKernel/ConfigService.h" @@ -25,7 +25,7 @@ namespace API { * @param key The name of a key in the Mantid config * @return The value of the key */ -std::string qtPluginPathFromCfg(std::string key) { +std::string qtPluginPathFromCfg(const std::string &key) { static std::string qtMajorVersion; static std::string qtTag("%V"); if (qtMajorVersion.empty()) { @@ -42,7 +42,7 @@ std::string qtPluginPathFromCfg(std::string key) { * %V to specify the Qt version * @return The number of libraries successfully loaded */ -int loadPluginsFromCfgPath(std::string key) { +int loadPluginsFromCfgPath(const std::string &key) { return loadPluginsFromPath(qtPluginPathFromCfg(std::move(key))); } @@ -50,7 +50,7 @@ int loadPluginsFromCfgPath(std::string key) { * Load all plugins from the path specified. * @return The number of libraries successfully loaded */ -int loadPluginsFromPath(std::string path) { +int loadPluginsFromPath(const std::string &path) { // We must *NOT* load plugins compiled against a different version of Qt // so we set exclude flags by Qt version. #if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0)) diff --git a/qt/widgets/common/src/ProcessingAlgoWidget.cpp b/qt/widgets/common/src/ProcessingAlgoWidget.cpp index 31706f14f5f8f04d4780b5a1886050dc743dbd86..d0fb062f7d4e7abacbd60618ee2cefe099f0ebb0 100644 --- a/qt/widgets/common/src/ProcessingAlgoWidget.cpp +++ b/qt/widgets/common/src/ProcessingAlgoWidget.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/ProcessingAlgoWidget.h" #include "MantidAPI/Algorithm.h" @@ -164,7 +164,7 @@ void ProcessingAlgoWidget::setSelectedAlgorithm(QString algo) { /// @return the text in the script editor QString ProcessingAlgoWidget::getScriptText() { return ui.editor->text(); } /// Set the script editor text -void ProcessingAlgoWidget::setScriptText(QString text) { +void ProcessingAlgoWidget::setScriptText(const QString &text) { ui.editor->setText(text); } diff --git a/qt/widgets/common/src/ProgressableView.cpp b/qt/widgets/common/src/ProgressableView.cpp index 402401381256b31b6fc93b95e318c6d33f8347b3..52e775e45c2dae2c5a1f017e12a48995c10a49d0 100644 --- a/qt/widgets/common/src/ProgressableView.cpp +++ b/qt/widgets/common/src/ProgressableView.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/ProgressableView.h" diff --git a/qt/widgets/common/src/ProjectSaveModel.cpp b/qt/widgets/common/src/ProjectSaveModel.cpp index a6bdeeb6dcd79c4816b7fe1c3375ef4d4e64b5f8..83b529b11d9c6b10949c649000dbac2c03b78d0f 100644 --- a/qt/widgets/common/src/ProjectSaveModel.cpp +++ b/qt/widgets/common/src/ProjectSaveModel.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/ProjectSaveModel.h" #include "MantidAPI/AnalysisDataService.h" @@ -24,7 +24,7 @@ using namespace MantidQt::MantidWidgets; * @param activePythonInterfaces The list of active Python interfaces */ ProjectSaveModel::ProjectSaveModel( - std::vector<IProjectSerialisable *> windows, + const std::vector<IProjectSerialisable *> &windows, std::vector<std::string> activePythonInterfaces) : m_activePythonInterfaces(std::move(activePythonInterfaces)) { auto workspaces = getWorkspaces(); @@ -204,8 +204,8 @@ std::vector<Workspace_sptr> ProjectSaveModel::getWorkspaces() const { return ads.getObjects(); } -WorkspaceInfo -ProjectSaveModel::makeWorkspaceInfoObject(Workspace_const_sptr ws) const { +WorkspaceInfo ProjectSaveModel::makeWorkspaceInfoObject( + const Workspace_const_sptr &ws) const { WorkspaceIcons icons; WorkspaceInfo info; info.name = ws->getName(); diff --git a/qt/widgets/common/src/ProjectSavePresenter.cpp b/qt/widgets/common/src/ProjectSavePresenter.cpp index 3cae4accfc41eac5fc6955ec4e52e06a35ed0404..ef7ed84fc565463acbbf46a32bf7bb1dd43ef7c7 100644 --- a/qt/widgets/common/src/ProjectSavePresenter.cpp +++ b/qt/widgets/common/src/ProjectSavePresenter.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/ProjectSavePresenter.h" #include "MantidAPI/AnalysisDataService.h" diff --git a/qt/widgets/common/src/PropertyHandler.cpp b/qt/widgets/common/src/PropertyHandler.cpp index eb3bab5f1b25588401b49733ffd570ea51a9ea79..ce324b420ede4370fb64718a760ca425fd601f16 100644 --- a/qt/widgets/common/src/PropertyHandler.cpp +++ b/qt/widgets/common/src/PropertyHandler.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/PropertyHandler.h" #include "MantidQtWidgets/Common/FitPropertyBrowser.h" @@ -26,6 +26,7 @@ #include "MantidQtWidgets/Common/QtPropertyBrowser/qttreepropertybrowser.h" #include <QMessageBox> +#include <utility> using std::size_t; @@ -33,16 +34,16 @@ namespace MantidQt { namespace MantidWidgets { // Constructor -PropertyHandler::PropertyHandler(Mantid::API::IFunction_sptr fun, +PropertyHandler::PropertyHandler(const Mantid::API::IFunction_sptr &fun, Mantid::API::CompositeFunction_sptr parent, FitPropertyBrowser *browser, QtBrowserItem *item) : FunctionHandler(fun), m_browser(browser), m_cf(boost::dynamic_pointer_cast<Mantid::API::CompositeFunction>(fun)), m_pf(boost::dynamic_pointer_cast<Mantid::API::IPeakFunction>(fun)), - m_parent(parent), m_type(nullptr), m_item(item), m_isMultispectral(false), - m_workspace(nullptr), m_workspaceIndex(nullptr), m_base(0), m_ci(0), - m_hasPlot(false) {} + m_parent(std::move(parent)), m_type(nullptr), m_item(item), + m_isMultispectral(false), m_workspace(nullptr), m_workspaceIndex(nullptr), + m_base(0), m_ci(0), m_hasPlot(false) {} /// Destructor PropertyHandler::~PropertyHandler() {} @@ -606,7 +607,7 @@ PropertyHandler *PropertyHandler::findHandler(QtProperty *prop) { } PropertyHandler * -PropertyHandler::findHandler(Mantid::API::IFunction_const_sptr fun) { +PropertyHandler::findHandler(const Mantid::API::IFunction_const_sptr &fun) { if (fun == function()) return this; if (m_cf) { @@ -1156,7 +1157,8 @@ void PropertyHandler::fix(const QString &parName) { * @param globalName :: Name of the parameter in compoite function * (e.g. f1.omega) */ -void PropertyHandler::removeTie(QtProperty *prop, std::string globalName) { +void PropertyHandler::removeTie(QtProperty *prop, + const std::string &globalName) { QString parName = m_ties.key(prop, ""); if (parName.isEmpty()) return; diff --git a/qt/widgets/common/src/PropertyWidget.cpp b/qt/widgets/common/src/PropertyWidget.cpp index 7dedd5ed3d4e7ae7d69d43f81bdab3ef3899bead..f2ce556573d1e6c46510cf8d7e15110c751a9604 100644 --- a/qt/widgets/common/src/PropertyWidget.cpp +++ b/qt/widgets/common/src/PropertyWidget.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/PropertyWidget.h" #include "MantidAPI/AnalysisDataService.h" diff --git a/qt/widgets/common/src/PropertyWidgetFactory.cpp b/qt/widgets/common/src/PropertyWidgetFactory.cpp index 2bf28a9978d0bbc981372c5f2b8e9504bdc08d16..542863dc46e7a9cb400f61c69bd13b22a1bc37d5 100644 --- a/qt/widgets/common/src/PropertyWidgetFactory.cpp +++ b/qt/widgets/common/src/PropertyWidgetFactory.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/PropertyWidgetFactory.h" #include "MantidAPI/FileProperty.h" diff --git a/qt/widgets/common/src/Python/CodeExecution.cpp b/qt/widgets/common/src/Python/CodeExecution.cpp index 69e8af75bcc4ffd2d5ab51a72fe2688030e22aef..c8cf44f5aad41d0d1b331cb7c2a44f4c5987c2b3 100644 --- a/qt/widgets/common/src/Python/CodeExecution.cpp +++ b/qt/widgets/common/src/Python/CodeExecution.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/Python/CodeExecution.h" #include "MantidPythonInterface/core/GlobalInterpreterLock.h" diff --git a/qt/widgets/common/src/Python/QHashToDict.cpp b/qt/widgets/common/src/Python/QHashToDict.cpp index 775a47fedceb25813a7bfa6d36bf9bce19bd8181..7c64e6dead2543d1f418e478b4b7dc339a77f699 100644 --- a/qt/widgets/common/src/Python/QHashToDict.cpp +++ b/qt/widgets/common/src/Python/QHashToDict.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/Python/QHashToDict.h" #include "MantidQtWidgets/Common/Python/Sip.h" diff --git a/qt/widgets/common/src/Python/Sip.cpp b/qt/widgets/common/src/Python/Sip.cpp index 3102358e82e2e0424c52a57b66e6834b7bf8c78a..79d8969dc3aa734acb3b37976fd2927d393c7e42 100644 --- a/qt/widgets/common/src/Python/Sip.cpp +++ b/qt/widgets/common/src/Python/Sip.cpp @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #include "MantidQtWidgets/Common/Python/Sip.h" #include <QtGlobal> #include <sip.h> diff --git a/qt/widgets/common/src/PythonRunner.cpp b/qt/widgets/common/src/PythonRunner.cpp index 1861ad63dc5fdd3a3cf0367d35266e52781c3f24..c936610ae9a024a10f082207bccf1875b6c3e58c 100644 --- a/qt/widgets/common/src/PythonRunner.cpp +++ b/qt/widgets/common/src/PythonRunner.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/PythonRunner.h" #include "MantidKernel/Logger.h" diff --git a/qt/widgets/common/src/QScienceSpinBox.cpp b/qt/widgets/common/src/QScienceSpinBox.cpp index e6ca1bdac9f25240e6f34c50885db781efadd034..87374d67715f7e09ff0b8a6c0c9e6a5e4e33cc73 100644 --- a/qt/widgets/common/src/QScienceSpinBox.cpp +++ b/qt/widgets/common/src/QScienceSpinBox.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/QScienceSpinBox.h" #include <limits> diff --git a/qt/widgets/common/src/QtJSONUtils.cpp b/qt/widgets/common/src/QtJSONUtils.cpp index 1b88c0a9c231433fe91d5393001afc27210bf3a7..ad1d4d972f14f2d471ca163202dee7d20887302c 100644 --- a/qt/widgets/common/src/QtJSONUtils.cpp +++ b/qt/widgets/common/src/QtJSONUtils.cpp @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #include "MantidQtWidgets/Common/QtJSONUtils.h" #include <QFile> @@ -59,7 +58,7 @@ public: return toString.call(obj).toString(); } - QMap<QString, QVariant> decodeInner(QScriptValue object) { + QMap<QString, QVariant> decodeInner(const QScriptValue &object) { QMap<QString, QVariant> map; QScriptValueIterator it(object); while (it.hasNext()) { @@ -80,7 +79,7 @@ public: return map; } - QList<QVariant> decodeInnerToList(QScriptValue arrayValue) { + QList<QVariant> decodeInnerToList(const QScriptValue &arrayValue) { QList<QVariant> list; QScriptValueIterator it(arrayValue); while (it.hasNext()) { diff --git a/qt/widgets/common/src/QtPropertyBrowser/DoubleDialogEditor.cpp b/qt/widgets/common/src/QtPropertyBrowser/DoubleDialogEditor.cpp index ef78cc5549928bd2d411fa785b2fd14ff5950d85..19b3981f2f612c61af2afda113a0ebcd82e0c057 100644 --- a/qt/widgets/common/src/QtPropertyBrowser/DoubleDialogEditor.cpp +++ b/qt/widgets/common/src/QtPropertyBrowser/DoubleDialogEditor.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/QtPropertyBrowser/DoubleDialogEditor.h" diff --git a/qt/widgets/common/src/QtPropertyBrowser/DoubleEditorFactory.cpp b/qt/widgets/common/src/QtPropertyBrowser/DoubleEditorFactory.cpp index 3079a0797c343a9b9d0c441c6f6cd1ece9e72545..6ec3028105bc7c03c53982a0378d4860de66e8b4 100644 --- a/qt/widgets/common/src/QtPropertyBrowser/DoubleEditorFactory.cpp +++ b/qt/widgets/common/src/QtPropertyBrowser/DoubleEditorFactory.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/QtPropertyBrowser/DoubleEditorFactory.h" #include "MantidQtWidgets/Common/QtPropertyBrowser/ParameterPropertyManager.h" diff --git a/qt/widgets/common/src/QtPropertyBrowser/FilenameDialogEditor.cpp b/qt/widgets/common/src/QtPropertyBrowser/FilenameDialogEditor.cpp index 80b396032dd66fed41f1ffaebdd2348d8da305b9..3d69aff9ae905ade715ea76fc8c4e87510265740 100644 --- a/qt/widgets/common/src/QtPropertyBrowser/FilenameDialogEditor.cpp +++ b/qt/widgets/common/src/QtPropertyBrowser/FilenameDialogEditor.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/QtPropertyBrowser/FilenameDialogEditor.h" diff --git a/qt/widgets/common/src/QtPropertyBrowser/FormulaDialogEditor.cpp b/qt/widgets/common/src/QtPropertyBrowser/FormulaDialogEditor.cpp index 27993ede2fc2d87d26388fc61ceaccd0d966f9d6..540fa889d7ec8b0fdf02f00b40f3d30a564be09d 100644 --- a/qt/widgets/common/src/QtPropertyBrowser/FormulaDialogEditor.cpp +++ b/qt/widgets/common/src/QtPropertyBrowser/FormulaDialogEditor.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/QtPropertyBrowser/FormulaDialogEditor.h" #include "MantidQtWidgets/Common/UserFunctionDialog.h" diff --git a/qt/widgets/common/src/QtPropertyBrowser/ParameterPropertyManager.cpp b/qt/widgets/common/src/QtPropertyBrowser/ParameterPropertyManager.cpp index b1bde15684abf33f0eadbf411af79a11e26916d7..606baf197154fb6d1105cd75e731df6bed01365f 100644 --- a/qt/widgets/common/src/QtPropertyBrowser/ParameterPropertyManager.cpp +++ b/qt/widgets/common/src/QtPropertyBrowser/ParameterPropertyManager.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/QtPropertyBrowser/ParameterPropertyManager.h" #include "MantidQtWidgets/Common/QtPropertyBrowser/qtpropertymanager.h" diff --git a/qt/widgets/common/src/QtPropertyBrowser/StringDialogEditor.cpp b/qt/widgets/common/src/QtPropertyBrowser/StringDialogEditor.cpp index de9f90b272838c33ec069985154681a7ba72edd5..2ec74f585e5c4c11f7fb4212bff7828b8d3efbbe 100644 --- a/qt/widgets/common/src/QtPropertyBrowser/StringDialogEditor.cpp +++ b/qt/widgets/common/src/QtPropertyBrowser/StringDialogEditor.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/QtPropertyBrowser/StringDialogEditor.h" diff --git a/qt/widgets/common/src/QtPropertyBrowser/StringEditorFactory.cpp b/qt/widgets/common/src/QtPropertyBrowser/StringEditorFactory.cpp index 9659becd1b89ae19b5022fb61f646dc1ea50d8cc..1e10010deb4150876af147708dc6ee533504e310 100644 --- a/qt/widgets/common/src/QtPropertyBrowser/StringEditorFactory.cpp +++ b/qt/widgets/common/src/QtPropertyBrowser/StringEditorFactory.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/QtPropertyBrowser/StringEditorFactory.h" diff --git a/qt/widgets/common/src/QtPropertyBrowser/WorkspaceEditorFactory.cpp b/qt/widgets/common/src/QtPropertyBrowser/WorkspaceEditorFactory.cpp index a4f6cc593fffb2dff8390788e9ec53ad01f4e3ae..419c1df1825a6eba27a9e69ca94d3504c67702e1 100644 --- a/qt/widgets/common/src/QtPropertyBrowser/WorkspaceEditorFactory.cpp +++ b/qt/widgets/common/src/QtPropertyBrowser/WorkspaceEditorFactory.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/QtPropertyBrowser/WorkspaceEditorFactory.h" diff --git a/qt/widgets/common/src/QtPropertyBrowser/qtgroupboxpropertybrowser.cpp b/qt/widgets/common/src/QtPropertyBrowser/qtgroupboxpropertybrowser.cpp index bf89eb4fde6cc877dc10e35056ac6412ecf239a6..5d38e2237fa91442f937470c362504f6aae4bcb6 100644 --- a/qt/widgets/common/src/QtPropertyBrowser/qtgroupboxpropertybrowser.cpp +++ b/qt/widgets/common/src/QtPropertyBrowser/qtgroupboxpropertybrowser.cpp @@ -308,15 +308,12 @@ void QtGroupBoxPropertyBrowserPrivate::propertyRemoved(QtBrowserItem *index) { } else { WidgetItem *par = parentItem->parent; QGridLayout *l = nullptr; - int oldRow = -1; if (!par) { l = m_mainLayout; - oldRow = m_children.indexOf(parentItem); + m_children.indexOf(parentItem); } else { l = par->layout; - oldRow = par->children.indexOf(parentItem); - if (hasHeader(par)) - oldRow += 2; + par->children.indexOf(parentItem); } if (parentItem->widget) { diff --git a/qt/widgets/common/src/QtPropertyBrowser/qtpropertybrowserutils.cpp b/qt/widgets/common/src/QtPropertyBrowser/qtpropertybrowserutils.cpp index b314504ea06de5f1080e340211f4b642715357b8..d36cf51256d44db9b6659fb9dd1a711fd7d52e90 100644 --- a/qt/widgets/common/src/QtPropertyBrowser/qtpropertybrowserutils.cpp +++ b/qt/widgets/common/src/QtPropertyBrowser/qtpropertybrowserutils.cpp @@ -461,7 +461,7 @@ void QtKeySequenceEdit::setKeySequence(const QKeySequence &sequence) { QKeySequence QtKeySequenceEdit::keySequence() const { return m_keySequence; } -int QtKeySequenceEdit::translateModifiers(Qt::KeyboardModifiers state, +int QtKeySequenceEdit::translateModifiers(const Qt::KeyboardModifiers &state, const QString &text) const { int result = 0; if ((state & Qt::ShiftModifier) && diff --git a/qt/widgets/common/src/QtSignalChannel.cpp b/qt/widgets/common/src/QtSignalChannel.cpp index 5bbc5b9e50e6abce50568d280c82d8ff3380a6e8..e12681bb759e4cad727b71c01850b077ef98680c 100644 --- a/qt/widgets/common/src/QtSignalChannel.cpp +++ b/qt/widgets/common/src/QtSignalChannel.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/QtSignalChannel.h" #include "MantidKernel/Logger.h" @@ -23,8 +23,6 @@ namespace MantidWidgets { QtSignalChannel::QtSignalChannel(const QString &source) : QObject(), Poco::Channel(), m_source(source) {} -/** - */ QtSignalChannel::~QtSignalChannel() {} /** diff --git a/qt/widgets/common/src/RenameParDialog.cpp b/qt/widgets/common/src/RenameParDialog.cpp index a6dea7e6069977284a4b05983125da92868cba85..3c59a0233916f8c47f05401374952196ad4ba83a 100644 --- a/qt/widgets/common/src/RenameParDialog.cpp +++ b/qt/widgets/common/src/RenameParDialog.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/RenameParDialog.h" diff --git a/qt/widgets/common/src/RepoModel.cpp b/qt/widgets/common/src/RepoModel.cpp index 63c3b71094855806bf3ed1180f1e2776f8a13ee5..706a60559f46a75d089e91841abcc8208398fcaa 100644 --- a/qt/widgets/common/src/RepoModel.cpp +++ b/qt/widgets/common/src/RepoModel.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/RepoModel.h" diff --git a/qt/widgets/common/src/SaveWorkspaces.cpp b/qt/widgets/common/src/SaveWorkspaces.cpp index ec97c0f13126616a95f0c63e049761a06bf0920a..379f2712a6da7f1feb1293c9653feb39e5a3311a 100644 --- a/qt/widgets/common/src/SaveWorkspaces.cpp +++ b/qt/widgets/common/src/SaveWorkspaces.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------- // Includes @@ -482,7 +482,7 @@ SaveWorkspaces::provideZeroFreeWorkspaces(const QListWidget *workspaces) { * workspaces. */ void SaveWorkspaces::removeZeroFreeWorkspaces( - QHash<QString, QString> workspaces) { + const QHash<QString, QString> &workspaces) { auto zeroFreeWorkspaceNames = workspaces.values(); for (auto &zeroFreeWorkspaceName : zeroFreeWorkspaceNames) { emit deleteZeroErrorFreeWorkspace(zeroFreeWorkspaceName); diff --git a/qt/widgets/common/src/ScriptEditor.cpp b/qt/widgets/common/src/ScriptEditor.cpp index 9482a95b35eb62b143fe1b1cbb075f36e5ed05e7..7a49b921fcfd91f34cf504109273f652aa7897ad 100644 --- a/qt/widgets/common/src/ScriptEditor.cpp +++ b/qt/widgets/common/src/ScriptEditor.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //--------------------------------------------- // Includes diff --git a/qt/widgets/common/src/ScriptRepositoryView.cpp b/qt/widgets/common/src/ScriptRepositoryView.cpp index 9a91785bb8f5de5fdaafeee5f5eab6db10193a0e..71d96520c2a4e71164c5bcf9e95006cf760195ce 100644 --- a/qt/widgets/common/src/ScriptRepositoryView.cpp +++ b/qt/widgets/common/src/ScriptRepositoryView.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/ScriptRepositoryView.h" #include "MantidAPI/ScriptRepository.h" @@ -360,7 +360,7 @@ void ScriptRepositoryView::RepoDelegate::paint( QApplication::style()->drawControl(QStyle::CE_PushButton, &button, painter); } -QIcon ScriptRepositoryView::RepoDelegate::getIcon(QString state) const { +QIcon ScriptRepositoryView::RepoDelegate::getIcon(const QString &state) const { QIcon icon; #if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) if (state == RepoModel::remoteOnlySt()) @@ -646,7 +646,7 @@ bool ScriptRepositoryView::RemoveEntryDelegate::editorEvent( * * @param link :: the folder link to open. */ -void ScriptRepositoryView::openFolderLink(QString link) { +void ScriptRepositoryView::openFolderLink(const QString &link) { const std::string error_msg = "Unable to open \"" + link.toStdString() + "\". Reason: "; diff --git a/qt/widgets/common/src/SelectFunctionDialog.cpp b/qt/widgets/common/src/SelectFunctionDialog.cpp index c3da14b461815608a27dc82e21e5190ed77e0562..5d653095c754789953de8e45bc1b231f9e261f6e 100644 --- a/qt/widgets/common/src/SelectFunctionDialog.cpp +++ b/qt/widgets/common/src/SelectFunctionDialog.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //------------------------------------------- // Includes diff --git a/qt/widgets/common/src/SelectWorkspacesDialog.cpp b/qt/widgets/common/src/SelectWorkspacesDialog.cpp index 5a433428047ed78d747d33953472a181d2c8be2c..1a3617b57b3fc4f41c80cb05bbf9d9b80b363f8b 100644 --- a/qt/widgets/common/src/SelectWorkspacesDialog.cpp +++ b/qt/widgets/common/src/SelectWorkspacesDialog.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //--------------------------------------- // Includes @@ -32,7 +32,7 @@ private: public: explicit WorkspaceIsNotOfType(const std::string &type) : m_type(type), m_isMatrixWorkspace(type == "MatrixWorkspace") {} - bool operator()(Mantid::API::Workspace_sptr ws) const { + bool operator()(const Mantid::API::Workspace_sptr &ws) const { if (m_type.empty()) return false; if (m_isMatrixWorkspace) { diff --git a/qt/widgets/common/src/SelectionNotificationService.cpp b/qt/widgets/common/src/SelectionNotificationService.cpp index 85ee88def5d934f1319622fbcd491e6da98e0437..2c9b976dd795d3b8658a448aa04f35f550655f46 100644 --- a/qt/widgets/common/src/SelectionNotificationService.cpp +++ b/qt/widgets/common/src/SelectionNotificationService.cpp @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #include "MantidQtWidgets/Common/SelectionNotificationService.h" using namespace MantidQt::API; diff --git a/qt/widgets/common/src/SequentialFitDialog.cpp b/qt/widgets/common/src/SequentialFitDialog.cpp index 61ee6e8d42637b04e18d6a139e5b4528b3ccd6af..e4db13d7fb551087fcb33b82b09333ada03113bf 100644 --- a/qt/widgets/common/src/SequentialFitDialog.cpp +++ b/qt/widgets/common/src/SequentialFitDialog.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/SequentialFitDialog.h" #include "MantidAPI/AlgorithmManager.h" @@ -88,7 +88,7 @@ void SequentialFitDialog::addWorkspace() { } } -bool SequentialFitDialog::addWorkspaces(const QStringList wsNames) { +bool SequentialFitDialog::addWorkspaces(const QStringList &wsNames) { if (wsNames.isEmpty()) return false; int row = ui.tWorkspaces->rowCount(); @@ -191,7 +191,7 @@ void SequentialFitDialog::removeItem() { } } -bool SequentialFitDialog::validateLogs(const QString wsName) { +bool SequentialFitDialog::validateLogs(const QString &wsName) { Mantid::API::MatrixWorkspace_sptr ws = boost::dynamic_pointer_cast<Mantid::API::MatrixWorkspace>( Mantid::API::AnalysisDataService::Instance().retrieve( diff --git a/qt/widgets/common/src/SignalBlocker.cpp b/qt/widgets/common/src/SignalBlocker.cpp index 8ca2368523a355a00ee0bd474d88e65999c90937..86b9af55c3836864941d9873bab80a1f1cdfd1cc 100644 --- a/qt/widgets/common/src/SignalBlocker.cpp +++ b/qt/widgets/common/src/SignalBlocker.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/SignalBlocker.h" #if QT_VERSION < QT_VERSION_CHECK(5, 3, 0) diff --git a/qt/widgets/common/src/SlicingAlgorithmDialog.cpp b/qt/widgets/common/src/SlicingAlgorithmDialog.cpp index fb6624776c639211340b8a91169e7d57c43e6b5e..d55299da9b42dadc74ce89d70f8d09bd1ad905ef 100644 --- a/qt/widgets/common/src/SlicingAlgorithmDialog.cpp +++ b/qt/widgets/common/src/SlicingAlgorithmDialog.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/SlicingAlgorithmDialog.h" #include "MantidAPI/AlgorithmManager.h" @@ -102,8 +102,8 @@ SlicingAlgorithmDialog::~SlicingAlgorithmDialog() { saveSettings(); } dimension. @param dim : dimension to format to string. */ -QString -formattedAlignedDimensionInput(Mantid::Geometry::IMDDimension_const_sptr dim) { +QString formattedAlignedDimensionInput( + const Mantid::Geometry::IMDDimension_const_sptr &dim) { QString min, max, nbins, result; QString name(dim->getName().c_str()); min.setNum(dim->getMinimum()); @@ -133,7 +133,7 @@ formattedAlignedDimensionInput(Mantid::Geometry::IMDDimension_const_sptr dim) { @return : empty string. */ QString formatNonAlignedDimensionInput( - Mantid::Geometry::IMDDimension_const_sptr /*unused*/) { + const Mantid::Geometry::IMDDimension_const_sptr & /*unused*/) { // Deliberately return an empty string here, because it's not obvious how the // basis vectors could be automatically formed. return QString(""); @@ -288,7 +288,7 @@ generated. */ void SlicingAlgorithmDialog::makeDimensionInputs( const QString &propertyPrefix, QLayout *owningLayout, - QString (*format)(IMDDimension_const_sptr), History history) { + QString (*format)(const IMDDimension_const_sptr &), History history) { // Remove excess dimensions from the tied properties and the stored property // values size_t indexRemoved = 0; @@ -441,7 +441,7 @@ bool SlicingAlgorithmDialog::doAutoFillDimensions() const { *Customise the layout for usage in the Vsi */ void SlicingAlgorithmDialog::customiseLayoutForVsi( - std::string initialWorkspace) { + const std::string &initialWorkspace) { // File back-end ui.file_backend_layout->setVisible(false); @@ -466,8 +466,8 @@ void SlicingAlgorithmDialog::customiseLayoutForVsi( * @param index The property index. * @param propertyValue The new value of the axis dimension. */ -void SlicingAlgorithmDialog::resestAlignedDimProperty(size_t index, - QString propertyValue) { +void SlicingAlgorithmDialog::resestAlignedDimProperty( + size_t index, const QString &propertyValue) { QString alignedDim = "AlignedDim"; const QString propertyName = alignedDim.append(QString().number(index)); diff --git a/qt/widgets/common/src/SlitCalculator.cpp b/qt/widgets/common/src/SlitCalculator.cpp index c863c64cf3022f8b66f681458163799eb385ef81..33b7e1d7703b36a46c560e02639542f71ae6d81b 100644 --- a/qt/widgets/common/src/SlitCalculator.cpp +++ b/qt/widgets/common/src/SlitCalculator.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/SlitCalculator.h" #include "MantidAPI/AlgorithmManager.h" @@ -32,7 +32,7 @@ void SlitCalculator::processInstrumentHasBeenChanged() { on_recalculate_triggered(); } SlitCalculator::~SlitCalculator() {} -void SlitCalculator::setInstrument(std::string instrumentName) { +void SlitCalculator::setInstrument(const std::string &instrumentName) { // we want to get the most up-to-date definition, so we use the current // date/time auto date = @@ -64,7 +64,7 @@ void SlitCalculator::setInstrument(std::string instrumentName) { void SlitCalculator::show() { QDialog::show(); } void SlitCalculator::setupSlitCalculatorWithInstrumentValues( - Mantid::Geometry::Instrument_const_sptr instrument) { + const Mantid::Geometry::Instrument_const_sptr &instrument) { // fetch the components that we need for values from IDF auto slit1Component = instrument->getComponentByName("slit1"); auto slit2Component = instrument->getComponentByName("slit2"); diff --git a/qt/widgets/common/src/SyncedCheckboxes.cpp b/qt/widgets/common/src/SyncedCheckboxes.cpp index c0756e9cc740f9c334ca367c5ec4b8764dbc63b4..be7557d56977ce0b03bd3c629923826ddea4595a 100644 --- a/qt/widgets/common/src/SyncedCheckboxes.cpp +++ b/qt/widgets/common/src/SyncedCheckboxes.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/SyncedCheckboxes.h" #include "MantidKernel/System.h" diff --git a/qt/widgets/common/src/TSVSerialiser.cpp b/qt/widgets/common/src/TSVSerialiser.cpp index a9a612766401b592e8c37b74dc141f63142ea748..240460e63a4db527a0cd900238b1f9daa196b0d1 100644 --- a/qt/widgets/common/src/TSVSerialiser.cpp +++ b/qt/widgets/common/src/TSVSerialiser.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/TSVSerialiser.h" @@ -325,7 +325,7 @@ QString TSVSerialiser::asQString(const size_t i) const { void TSVSerialiser::storeDouble(const double val) { m_output << "\t" << val; } void TSVSerialiser::storeInt(const int val) { m_output << "\t" << val; } -void TSVSerialiser::storeString(const std::string val) { +void TSVSerialiser::storeString(const std::string &val) { m_output << "\t" << val; } diff --git a/qt/widgets/common/src/TextPropertyWidget.cpp b/qt/widgets/common/src/TextPropertyWidget.cpp index 84db552bffc4e303e7cce42378b57b2d60152161..f513b381ff0baefbfef1dc09ea6877ad13427686 100644 --- a/qt/widgets/common/src/TextPropertyWidget.cpp +++ b/qt/widgets/common/src/TextPropertyWidget.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/TextPropertyWidget.h" #include "MantidKernel/MaskedProperty.h" diff --git a/qt/widgets/common/src/TrackedAction.cpp b/qt/widgets/common/src/TrackedAction.cpp index d1d4aa568f1a6b6c4bb680d8cbc68f4de97f7947..e0e8f75e38ab4f5e063ee00b42b85a94d12f1b3d 100644 --- a/qt/widgets/common/src/TrackedAction.cpp +++ b/qt/widgets/common/src/TrackedAction.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/TrackedAction.h" #include "MantidKernel/UsageService.h" diff --git a/qt/widgets/common/src/UserFunctionDialog.cpp b/qt/widgets/common/src/UserFunctionDialog.cpp index 425db801c9ca8e4352c9e316e85ee6ec3b59b100..09089fa80603cfb05973e4005dee0b6ce3c36538 100644 --- a/qt/widgets/common/src/UserFunctionDialog.cpp +++ b/qt/widgets/common/src/UserFunctionDialog.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/UserFunctionDialog.h" #include "MantidAPI/Expression.h" diff --git a/qt/widgets/common/src/UserInputValidator.cpp b/qt/widgets/common/src/UserInputValidator.cpp index 4700402de12eb9f7705cfc47e1ad702bc4f2f1e0..c3b520b567eaebbfa8cbf6cab5bf08ea9ed019bf 100644 --- a/qt/widgets/common/src/UserInputValidator.cpp +++ b/qt/widgets/common/src/UserInputValidator.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/UserInputValidator.h" #include "MantidAPI/AnalysisDataService.h" @@ -33,7 +33,7 @@ bool doesExistInADS(std::string const &workspaceName) { } boost::optional<std::string> -containsInvalidWorkspace(WorkspaceGroup_const_sptr group) { +containsInvalidWorkspace(const WorkspaceGroup_const_sptr &group) { if (group->isEmpty()) return "The group workspace " + group->getName() + " is empty."; @@ -337,7 +337,7 @@ bool UserInputValidator::checkWorkspaceNumberOfHistograms( * @return True if the workspace has the correct size */ bool UserInputValidator::checkWorkspaceNumberOfHistograms( - MatrixWorkspace_sptr workspace, std::size_t const &validSize) { + const MatrixWorkspace_sptr &workspace, std::size_t const &validSize) { if (workspace->getNumberHistograms() != validSize) { addErrorMessage( QString::fromStdString(workspace->getName()) + " should contain " + @@ -370,7 +370,7 @@ bool UserInputValidator::checkWorkspaceNumberOfBins( * @return True if the workspace has the correct size */ bool UserInputValidator::checkWorkspaceNumberOfBins( - MatrixWorkspace_sptr workspace, std::size_t const &validSize) { + const MatrixWorkspace_sptr &workspace, std::size_t const &validSize) { if (workspace->x(0).size() != validSize) { addErrorMessage( QString::fromStdString(workspace->getName()) + " should contain " + diff --git a/qt/widgets/common/src/UserSubWindow.cpp b/qt/widgets/common/src/UserSubWindow.cpp index 655c7fad86ee843de17838bb5997ca28653bb71c..2a2232b81f020df92b3064eb757e0d56e65bdb3b 100644 --- a/qt/widgets/common/src/UserSubWindow.cpp +++ b/qt/widgets/common/src/UserSubWindow.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------- // Includes diff --git a/qt/widgets/common/src/UserSubWindowFactory.cpp b/qt/widgets/common/src/UserSubWindowFactory.cpp index 4c57dfcf50ef51e23be150568241a80abd7aa435..f975c14f119e34e3d71f3b8b7cfbe89b804970cc 100644 --- a/qt/widgets/common/src/UserSubWindowFactory.cpp +++ b/qt/widgets/common/src/UserSubWindowFactory.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //----------------------------------------------- // Includes diff --git a/qt/widgets/common/src/VatesViewerInterface.cpp b/qt/widgets/common/src/VatesViewerInterface.cpp index c803de4c83b3483e776c0761626a384a91af142b..41e376fbcee0d72e84958a4b74fe6ca54ddb00a3 100644 --- a/qt/widgets/common/src/VatesViewerInterface.cpp +++ b/qt/widgets/common/src/VatesViewerInterface.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/VatesViewerInterface.h" #include "MantidQtWidgets/Common/InterfaceManager.h" diff --git a/qt/widgets/common/src/WidgetScrollbarDecorator.cpp b/qt/widgets/common/src/WidgetScrollbarDecorator.cpp index 380449265d90e9780f6df5f770d70c187dbc8fa6..e7aff9ad40933111aa1a4485cbcfb4c30995f617 100644 --- a/qt/widgets/common/src/WidgetScrollbarDecorator.cpp +++ b/qt/widgets/common/src/WidgetScrollbarDecorator.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //---------------------------------- // Includes diff --git a/qt/widgets/common/src/WindowIcons.cpp b/qt/widgets/common/src/WindowIcons.cpp index 243a05deb421e410a3c60931eedb6f243cdcbab4..a18c140475eb868b724e53f1ea1aef8493defdc0 100644 --- a/qt/widgets/common/src/WindowIcons.cpp +++ b/qt/widgets/common/src/WindowIcons.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //----------------------------------------------------------------------------- // Includes diff --git a/qt/widgets/common/src/WorkspaceIcons.cpp b/qt/widgets/common/src/WorkspaceIcons.cpp index b5e761a34068e779597982ff625602710c4325d1..0f7966477a581e7b0db88fee0a983b90304764ba 100644 --- a/qt/widgets/common/src/WorkspaceIcons.cpp +++ b/qt/widgets/common/src/WorkspaceIcons.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //----------------------------------------------------------------------------- // Includes @@ -48,8 +48,7 @@ std::string WorkspaceIcons::getIconID(const std::string &workspaceID) const { //----------------------------------------------------------------------------- // Private member functions //----------------------------------------------------------------------------- -/** - */ + void WorkspaceIcons::initInternalLookup() { m_idToPixmapName.clear(); // MatrixWorkspace types diff --git a/qt/widgets/common/src/WorkspaceObserver.cpp b/qt/widgets/common/src/WorkspaceObserver.cpp index 10ff07a854136ae6731b34247509c503499ff81b..7d58b5b0b940b9a0a6d22b326b95318d4bf1bdc0 100644 --- a/qt/widgets/common/src/WorkspaceObserver.cpp +++ b/qt/widgets/common/src/WorkspaceObserver.cpp @@ -1,14 +1,16 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //----------------------------------- // Includes //----------------------------------- -#include "MantidQtWidgets/Common/WorkspaceObserver.h" +#include <utility> + #include "MantidAPI/AnalysisDataService.h" +#include "MantidQtWidgets/Common/WorkspaceObserver.h" namespace MantidQt { namespace API { @@ -18,7 +20,7 @@ namespace API { //--------------------------------------------------------------------------- void ObserverCallback::handlePreDelete(const std::string &name, Mantid::API::Workspace_sptr workspace) { - m_observer->preDeleteHandle(name, workspace); + m_observer->preDeleteHandle(name, std::move(workspace)); } void ObserverCallback::handlePostDelete(const std::string &name) { @@ -27,12 +29,12 @@ void ObserverCallback::handlePostDelete(const std::string &name) { void ObserverCallback::handleAdd(const std::string &name, Mantid::API::Workspace_sptr workspace) { - m_observer->addHandle(name, workspace); + m_observer->addHandle(name, std::move(workspace)); } void ObserverCallback::handleAfterReplace( const std::string &name, Mantid::API::Workspace_sptr workspace) { - m_observer->afterReplaceHandle(name, workspace); + m_observer->afterReplaceHandle(name, std::move(workspace)); } void ObserverCallback::handleRename(const std::string &oldName, diff --git a/qt/widgets/common/src/WorkspacePresenter/ADSAdapter.cpp b/qt/widgets/common/src/WorkspacePresenter/ADSAdapter.cpp index c81d3b426681ce592b010d4e32ba66eb36ae95c9..a30e306b509fabc289c9d042959991d57e92e7d4 100644 --- a/qt/widgets/common/src/WorkspacePresenter/ADSAdapter.cpp +++ b/qt/widgets/common/src/WorkspacePresenter/ADSAdapter.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/WorkspacePresenter/ADSAdapter.h" #include "MantidAPI/AnalysisDataService.h" diff --git a/qt/widgets/common/src/WorkspacePresenter/WorkspacePresenter.cpp b/qt/widgets/common/src/WorkspacePresenter/WorkspacePresenter.cpp index 739ec099b4d849bd5df06130272fa960b5bb5c5a..0f7725d866c06d4867365a8b7821d3fcbc3e18f4 100644 --- a/qt/widgets/common/src/WorkspacePresenter/WorkspacePresenter.cpp +++ b/qt/widgets/common/src/WorkspacePresenter/WorkspacePresenter.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/WorkspacePresenter/WorkspacePresenter.h" diff --git a/qt/widgets/common/src/WorkspacePresenter/WorkspaceTreeWidget.cpp b/qt/widgets/common/src/WorkspacePresenter/WorkspaceTreeWidget.cpp index 3cee6510545e4e4361e1e288744749604f54d7eb..cf9a9136fadeb80d9ccc2c034c32ceaaa148f6e5 100644 --- a/qt/widgets/common/src/WorkspacePresenter/WorkspaceTreeWidget.cpp +++ b/qt/widgets/common/src/WorkspacePresenter/WorkspaceTreeWidget.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/WorkspacePresenter/WorkspaceTreeWidget.h" #include "MantidGeometry/Instrument.h" @@ -883,7 +883,7 @@ MantidTreeWidgetItem *WorkspaceTreeWidget::addTreeEntry( * Check if a workspace should be selected after dock update. * @param name :: Name of a workspace to check. */ -bool WorkspaceTreeWidget::shouldBeSelected(QString name) const { +bool WorkspaceTreeWidget::shouldBeSelected(const QString &name) const { QMutexLocker lock(&m_mutex); QStringList renamed = m_renameMap.keys(name); if (!renamed.isEmpty()) { @@ -1114,7 +1114,7 @@ bool WorkspaceTreeWidget::hasUBMatrix(const std::string &wsName) { * ALGO_NAME * @param menuEntryName Text to be shown in menu */ -void WorkspaceTreeWidget::addSaveMenuOption(QString algorithmString, +void WorkspaceTreeWidget::addSaveMenuOption(const QString &algorithmString, QString menuEntryName) { // Default to algo string if no entry name given if (menuEntryName.isEmpty()) diff --git a/qt/widgets/common/src/WorkspacePresenter/WorkspaceTreeWidgetSimple.cpp b/qt/widgets/common/src/WorkspacePresenter/WorkspaceTreeWidgetSimple.cpp index f544801945906b27f1e69a759a4b1d6b9df7866a..b21c583f702abc7c7563a00bbcf50e5df5fdb8e0 100644 --- a/qt/widgets/common/src/WorkspacePresenter/WorkspaceTreeWidgetSimple.cpp +++ b/qt/widgets/common/src/WorkspacePresenter/WorkspaceTreeWidgetSimple.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Common/WorkspacePresenter/WorkspaceTreeWidgetSimple.h" #include "MantidQtWidgets/Common/MantidTreeModel.h" @@ -45,7 +45,7 @@ WorkspaceTreeWidgetSimple::WorkspaceTreeWidgetSimple(bool viewOnly, m_showDetectors(new QAction("Show Detectors", this)) { // Replace the double click action on the MantidTreeWidget - m_tree->m_doubleClickAction = [&](QString wsName) { + m_tree->m_doubleClickAction = [&](const QString &wsName) { emit workspaceDoubleClicked(wsName); }; diff --git a/qt/widgets/common/src/WorkspaceSelector.cpp b/qt/widgets/common/src/WorkspaceSelector.cpp index 7425a8876d9795d917c296e0aa22f3532666acac..d21f5d69936512fbb9f082064996be63e528e759 100644 --- a/qt/widgets/common/src/WorkspaceSelector.cpp +++ b/qt/widgets/common/src/WorkspaceSelector.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + //------------------------------------------------------ // Includes @@ -246,7 +246,7 @@ void WorkspaceSelector::handleReplaceEvent( } bool WorkspaceSelector::checkEligibility( - const QString &name, Mantid::API::Workspace_sptr object) const { + const QString &name, const Mantid::API::Workspace_sptr &object) const { if (m_algorithm && !m_algPropName.isEmpty()) { try { m_algorithm->setPropertyValue(m_algPropName.toStdString(), @@ -287,7 +287,7 @@ bool WorkspaceSelector::hasValidSuffix(const QString &name) const { } bool WorkspaceSelector::hasValidNumberOfBins( - Mantid::API::Workspace_sptr object) const { + const Mantid::API::Workspace_sptr &object) const { if (m_binLimits.first != 0 || m_binLimits.second != -1) { if (auto const workspace = boost::dynamic_pointer_cast<Mantid::API::MatrixWorkspace>(object)) { diff --git a/qt/widgets/common/src/pixmaps.cpp b/qt/widgets/common/src/pixmaps.cpp index 075d66659b5570e4f87bbc647e9b1b5c0a8b4c00..28dcd2198d1d005ebaacaa98f14fd64ec588b024 100644 --- a/qt/widgets/common/src/pixmaps.cpp +++ b/qt/widgets/common/src/pixmaps.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + // clang-format off /* diff --git a/qt/widgets/common/src/pqHelpWindow.cxx b/qt/widgets/common/src/pqHelpWindow.cxx index 3af9bb00463b4534a6b422a9844a05ddc3f457d3..6973caf08ef0e4eb619c027b5662f80b9ddb6254 100644 --- a/qt/widgets/common/src/pqHelpWindow.cxx +++ b/qt/widgets/common/src/pqHelpWindow.cxx @@ -224,7 +224,7 @@ private: //----------------------------------------------------------------------------- pqHelpWindow::pqHelpWindow(QHelpEngine *engine, QWidget *parentObject, - Qt::WindowFlags parentFlags) + const Qt::WindowFlags& parentFlags) : Superclass(parentObject, parentFlags), m_helpEngine(engine) { Q_ASSERT(engine != nullptr); // Take ownership of the engine diff --git a/qt/widgets/common/test/AlgorithmHintStrategyTest.h b/qt/widgets/common/test/AlgorithmHintStrategyTest.h index c65c2b1e52a209d6310fb6cc93d14fedb6e0eb94..eb7c947e527702035f9b375544e8ec4763c81d07 100644 --- a/qt/widgets/common/test/AlgorithmHintStrategyTest.h +++ b/qt/widgets/common/test/AlgorithmHintStrategyTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/test/AlgorithmProgress/AlgorithmProgressDialogPresenterTest.h b/qt/widgets/common/test/AlgorithmProgress/AlgorithmProgressDialogPresenterTest.h index 1ab8a1cc360595f93ed7630519920d697f6a69f7..1309ed5651ec39d4d7333bd5af994cdbb600865f 100644 --- a/qt/widgets/common/test/AlgorithmProgress/AlgorithmProgressDialogPresenterTest.h +++ b/qt/widgets/common/test/AlgorithmProgress/AlgorithmProgressDialogPresenterTest.h @@ -1,3 +1,9 @@ +// Mantid Repository : https://github.com/mantidproject/mantid +// +// Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS +// SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidAPI/AlgorithmFactory.h" diff --git a/qt/widgets/common/test/AlgorithmProgress/AlgorithmProgressPresenterTest.h b/qt/widgets/common/test/AlgorithmProgress/AlgorithmProgressPresenterTest.h index b629b7de198aa69474b9c16d0580a97d90ac4e99..ff6e398319779bc5a1e452ac27a9a12ddd7249fa 100644 --- a/qt/widgets/common/test/AlgorithmProgress/AlgorithmProgressPresenterTest.h +++ b/qt/widgets/common/test/AlgorithmProgress/AlgorithmProgressPresenterTest.h @@ -1,3 +1,9 @@ +// Mantid Repository : https://github.com/mantidproject/mantid +// +// Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS +// SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidAPI/AlgorithmFactory.h" diff --git a/qt/widgets/common/test/AlgorithmProgress/ManualProgressReporter.h b/qt/widgets/common/test/AlgorithmProgress/ManualProgressReporter.h index eb6676fd5b57cd0ab43c451353c6a399a1599eec..5d53235151b37c45df2671d9ccb871dd7a20a716 100644 --- a/qt/widgets/common/test/AlgorithmProgress/ManualProgressReporter.h +++ b/qt/widgets/common/test/AlgorithmProgress/ManualProgressReporter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2015 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/test/AlgorithmProgress/MockAlgorithmProgressDialogWidget.h b/qt/widgets/common/test/AlgorithmProgress/MockAlgorithmProgressDialogWidget.h index 70b463889f173d16a684e0d45a7f7ba9c995ec88..28c7f4765ff4f7c13db60928212b6e3a39a01b85 100644 --- a/qt/widgets/common/test/AlgorithmProgress/MockAlgorithmProgressDialogWidget.h +++ b/qt/widgets/common/test/AlgorithmProgress/MockAlgorithmProgressDialogWidget.h @@ -1,3 +1,9 @@ +// Mantid Repository : https://github.com/mantidproject/mantid +// +// Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS +// SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidKernel/WarningSuppressions.h" diff --git a/qt/widgets/common/test/AlgorithmProgress/MockAlgorithmProgressWidget.h b/qt/widgets/common/test/AlgorithmProgress/MockAlgorithmProgressWidget.h index 2f74178f29c9a700ec2f05c534c27570787ea29c..2bdeabb31cb7ea4d312228d921418fe75d85ee04 100644 --- a/qt/widgets/common/test/AlgorithmProgress/MockAlgorithmProgressWidget.h +++ b/qt/widgets/common/test/AlgorithmProgress/MockAlgorithmProgressWidget.h @@ -1,3 +1,9 @@ +// Mantid Repository : https://github.com/mantidproject/mantid +// +// Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI, +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS +// SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "MantidKernel/WarningSuppressions.h" diff --git a/qt/widgets/common/test/Batch/BuildSubtreeItemsTest.h b/qt/widgets/common/test/Batch/BuildSubtreeItemsTest.h index f2edf8c953ca5511ca109a35bc9380fe045fe69a..d0e1ac16def510e0a4ed1f47248fb7d3ed679b8b 100644 --- a/qt/widgets/common/test/Batch/BuildSubtreeItemsTest.h +++ b/qt/widgets/common/test/Batch/BuildSubtreeItemsTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/test/Batch/ExtractSubtreesTest.h b/qt/widgets/common/test/Batch/ExtractSubtreesTest.h index 34212087afdd30269a4f9dffa48e23dab0b25bcc..78548b03ff60f4b616c595a18a20e5be917cb38a 100644 --- a/qt/widgets/common/test/Batch/ExtractSubtreesTest.h +++ b/qt/widgets/common/test/Batch/ExtractSubtreesTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/test/Batch/FindSubtreeRootsTest.h b/qt/widgets/common/test/Batch/FindSubtreeRootsTest.h index 33359338db32fbd0cf44f63e4d40af9fa0073494..52ca4ed2b7f3cf7da32f9c2462865d14bb8bcf41 100644 --- a/qt/widgets/common/test/Batch/FindSubtreeRootsTest.h +++ b/qt/widgets/common/test/Batch/FindSubtreeRootsTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/test/Batch/QtAdaptedModelTest.h b/qt/widgets/common/test/Batch/QtAdaptedModelTest.h index 867cee63bfdd9063a5d0d7b9574e58fc2e34d5fd..6cc88ce85b2496a43e9d3dfc1d02050e1d5a88a3 100644 --- a/qt/widgets/common/test/Batch/QtAdaptedModelTest.h +++ b/qt/widgets/common/test/Batch/QtAdaptedModelTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/test/Batch/RowLocationTest.h b/qt/widgets/common/test/Batch/RowLocationTest.h index 5832aab5c4e446f11eeb82162d1f03fc57d5ddf3..f43865ca48cd7142322e5b2d39331dd6797fe6d0 100644 --- a/qt/widgets/common/test/Batch/RowLocationTest.h +++ b/qt/widgets/common/test/Batch/RowLocationTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/test/BatchAlgorithmRunnerTest.h b/qt/widgets/common/test/BatchAlgorithmRunnerTest.h index d588844896b0c4c758cf59944bfcd9a40c751781..9552a0fce6aa066b92f76a697ea434f8783e7ec4 100644 --- a/qt/widgets/common/test/BatchAlgorithmRunnerTest.h +++ b/qt/widgets/common/test/BatchAlgorithmRunnerTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/test/ConvolutionFunctionModelTest.h b/qt/widgets/common/test/ConvolutionFunctionModelTest.h index 3174d1359e77198ed650e47fd6d658c496f91056..4df5793cbdebd2e536981bec031f17173b0083f6 100644 --- a/qt/widgets/common/test/ConvolutionFunctionModelTest.h +++ b/qt/widgets/common/test/ConvolutionFunctionModelTest.h @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #pragma once #include "MantidAPI/FrameworkManager.h" diff --git a/qt/widgets/common/test/DataProcessorUI/CommandsTest.h b/qt/widgets/common/test/DataProcessorUI/CommandsTest.h index e1c2633d0f5a4abb7d98461be0b144ba16bfff8b..4213ddd992b1ddf89fd4e78cf661e6ecb0e7e7ca 100644 --- a/qt/widgets/common/test/DataProcessorUI/CommandsTest.h +++ b/qt/widgets/common/test/DataProcessorUI/CommandsTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/test/DataProcessorUI/GenerateNotebookTest.h b/qt/widgets/common/test/DataProcessorUI/GenerateNotebookTest.h index db7f6452290b18a94c4ec23b33cc851e02b7e00c..e156924254165b3ec466e33a25410e9de4ee46c2 100644 --- a/qt/widgets/common/test/DataProcessorUI/GenerateNotebookTest.h +++ b/qt/widgets/common/test/DataProcessorUI/GenerateNotebookTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/test/DataProcessorUI/GenericDataProcessorPresenterTest.h b/qt/widgets/common/test/DataProcessorUI/GenericDataProcessorPresenterTest.h index 074d53972994340a907fa24a6780d0601cc5ca72..8bbea10b4e9a8b4be21c546d33ab796406c83781 100644 --- a/qt/widgets/common/test/DataProcessorUI/GenericDataProcessorPresenterTest.h +++ b/qt/widgets/common/test/DataProcessorUI/GenericDataProcessorPresenterTest.h @@ -1,14 +1,16 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include <cxxtest/TestSuite.h> #include <gmock/gmock.h> #include <gtest/gtest.h> +#include <utility> + #include "MantidAPI/FrameworkManager.h" #include "MantidAPI/TableRow.h" #include "MantidAPI/WorkspaceGroup.h" @@ -432,7 +434,7 @@ private: // Expect the view's widgets to be set in a particular state according to // whether processing or not void expectUpdateViewState(MockDataProcessorView &mockDataProcessorView, - Cardinality numTimes, bool isProcessing) { + const Cardinality &numTimes, bool isProcessing) { // Update menu items according to whether processing or not EXPECT_CALL(mockDataProcessorView, updateMenuEnabledState(isProcessing)) .Times(numTimes); @@ -451,18 +453,20 @@ private: // Expect the view's widgets to be set in the paused state void expectUpdateViewToPausedState(MockDataProcessorView &mockDataProcessorView, - Cardinality numTimes) { - expectUpdateViewState(mockDataProcessorView, numTimes, false); + const Cardinality &numTimes) { + expectUpdateViewState(mockDataProcessorView, std::move(numTimes), false); } // Expect the view's widgets to be set in the processing state void expectUpdateViewToProcessingState( - MockDataProcessorView &mockDataProcessorView, Cardinality numTimes) { - expectUpdateViewState(mockDataProcessorView, numTimes, true); + MockDataProcessorView &mockDataProcessorView, + const Cardinality &numTimes) { + expectUpdateViewState(mockDataProcessorView, std::move(numTimes), true); } void expectGetSelection(MockDataProcessorView &mockDataProcessorView, - Cardinality numTimes, RowList rowlist = RowList(), + const Cardinality &numTimes, + RowList rowlist = RowList(), GroupList grouplist = GroupList()) { if (numTimes.IsSatisfiedByCallCount(0)) { @@ -472,16 +476,16 @@ private: } else { EXPECT_CALL(mockDataProcessorView, getSelectedChildren()) .Times(numTimes) - .WillRepeatedly(Return(rowlist)); + .WillRepeatedly(Return(std::move(rowlist))); EXPECT_CALL(mockDataProcessorView, getSelectedParents()) .Times(numTimes) - .WillRepeatedly(Return(grouplist)); + .WillRepeatedly(Return(std::move(grouplist))); } } void expectGetOptions(MockMainPresenter &mockMainPresenter, - Cardinality numTimes, - std::string postprocessingOptions = "") { + const Cardinality &numTimes, + const std::string &postprocessingOptions = "") { if (numTimes.IsSatisfiedByCallCount(0)) { // If 0 calls, don't check return value EXPECT_CALL(mockMainPresenter, getPreprocessingOptions()).Times(numTimes); @@ -503,7 +507,7 @@ private: } void expectNotebookIsDisabled(MockDataProcessorView &mockDataProcessorView, - Cardinality numTimes) { + const Cardinality &numTimes) { // Call to check whether the notebook is enabled if (numTimes.IsSatisfiedByCallCount(0)) { // If 0 calls, don't check return value @@ -519,7 +523,7 @@ private: } void expectNotebookIsEnabled(MockDataProcessorView &mockDataProcessorView, - Cardinality numTimes) { + const Cardinality &numTimes) { // Call to check whether the notebook is enabled if (numTimes.IsSatisfiedByCallCount(0)) { // If 0 calls, don't check return value @@ -535,7 +539,8 @@ private: } void expectGetWorkspace(MockDataProcessorView &mockDataProcessorView, - Cardinality numTimes, const char *workspaceName) { + const Cardinality &numTimes, + const char *workspaceName) { if (numTimes.IsSatisfiedByCallCount(0)) { // If 0 calls, don't check return value EXPECT_CALL(mockDataProcessorView, getWorkspaceToOpen()).Times(numTimes); @@ -547,7 +552,7 @@ private: } void expectAskUserWorkspaceName(MockDataProcessorView &mockDataProcessorView, - Cardinality numTimes, + const Cardinality &numTimes, const char *workspaceName = "") { if (numTimes.IsSatisfiedByCallCount(0)) { // If 0 calls, don't check return value @@ -563,7 +568,8 @@ private: } void expectAskUserYesNo(MockDataProcessorView &mockDataProcessorView, - Cardinality numTimes, const bool answer = false) { + const Cardinality &numTimes, + const bool answer = false) { if (numTimes.IsSatisfiedByCallCount(0)) { // If 0 calls, don't check return value @@ -581,7 +587,7 @@ private: } void expectInstrumentIsINTER(MockDataProcessorView &mockDataProcessorView, - Cardinality numTimes) { + const Cardinality &numTimes) { if (numTimes.IsSatisfiedByCallCount(0)) { // If 0 calls, don't check return value EXPECT_CALL(mockDataProcessorView, getProcessInstrument()) @@ -607,12 +613,13 @@ private: "IvsQ_TOF_12345", "IvsQ_binned_TOF_12346", "IvsQ_TOF_12346", "IvsQ_TOF_12345_TOF_12346"}; - void checkWorkspacesExistInADS(std::vector<std::string> workspaceNames) { + void + checkWorkspacesExistInADS(const std::vector<std::string> &workspaceNames) { for (auto &ws : workspaceNames) TS_ASSERT(AnalysisDataService::Instance().doesExist(ws)); } - void removeWorkspacesFromADS(std::vector<std::string> workspaceNames) { + void removeWorkspacesFromADS(const std::vector<std::string> &workspaceNames) { for (auto &ws : workspaceNames) AnalysisDataService::Instance().remove(ws); } diff --git a/qt/widgets/common/test/DataProcessorUI/OneLevelTreeManagerTest.h b/qt/widgets/common/test/DataProcessorUI/OneLevelTreeManagerTest.h index 289a242cbfdfaffae2eaffda022c581e0aa0d760..19f142911c654cc098cc30815e60e032aa961ad0 100644 --- a/qt/widgets/common/test/DataProcessorUI/OneLevelTreeManagerTest.h +++ b/qt/widgets/common/test/DataProcessorUI/OneLevelTreeManagerTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/test/DataProcessorUI/PostprocessingAlgorithmTest.h b/qt/widgets/common/test/DataProcessorUI/PostprocessingAlgorithmTest.h index b028b36061f29f60ab13f823109635bcf9ac803d..546158bce2eefdacf2c2e72af973443a0361e053 100644 --- a/qt/widgets/common/test/DataProcessorUI/PostprocessingAlgorithmTest.h +++ b/qt/widgets/common/test/DataProcessorUI/PostprocessingAlgorithmTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/test/DataProcessorUI/PreprocessMapTest.h b/qt/widgets/common/test/DataProcessorUI/PreprocessMapTest.h index 84f431d1c98f91e5eb2f641e96a1d328e14482ff..27e462662c81cdd4103897c974495cff93223f55 100644 --- a/qt/widgets/common/test/DataProcessorUI/PreprocessMapTest.h +++ b/qt/widgets/common/test/DataProcessorUI/PreprocessMapTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/test/DataProcessorUI/PreprocessingAlgorithmTest.h b/qt/widgets/common/test/DataProcessorUI/PreprocessingAlgorithmTest.h index 26cd86f34d550d4daec707accd71e48e183f6641..0ef906870c835a1c829d8ecda92d1365870b06d4 100644 --- a/qt/widgets/common/test/DataProcessorUI/PreprocessingAlgorithmTest.h +++ b/qt/widgets/common/test/DataProcessorUI/PreprocessingAlgorithmTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/test/DataProcessorUI/ProcessingAlgorithmBaseTest.h b/qt/widgets/common/test/DataProcessorUI/ProcessingAlgorithmBaseTest.h index 515b1ce1b78b9f4793844baf2686e346c40fbb09..03e6190181c6731a6f02c77a1cbd7e6be44724af 100644 --- a/qt/widgets/common/test/DataProcessorUI/ProcessingAlgorithmBaseTest.h +++ b/qt/widgets/common/test/DataProcessorUI/ProcessingAlgorithmBaseTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/test/DataProcessorUI/ProcessingAlgorithmTest.h b/qt/widgets/common/test/DataProcessorUI/ProcessingAlgorithmTest.h index 9ecff7d78a3735ad1ad19b47f51a97b608f30508..b1466e914a51e82fd597d32afbefa18560ce5b9a 100644 --- a/qt/widgets/common/test/DataProcessorUI/ProcessingAlgorithmTest.h +++ b/qt/widgets/common/test/DataProcessorUI/ProcessingAlgorithmTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/test/DataProcessorUI/QOneLevelTreeModelTest.h b/qt/widgets/common/test/DataProcessorUI/QOneLevelTreeModelTest.h index 542309ee4f83a6e10a5a7df5fb5916c9f0aeaead..c3c3fa5be5048d6252f30aee5ba14fcddb01f047 100644 --- a/qt/widgets/common/test/DataProcessorUI/QOneLevelTreeModelTest.h +++ b/qt/widgets/common/test/DataProcessorUI/QOneLevelTreeModelTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/test/DataProcessorUI/QTwoLevelTreeModelTest.h b/qt/widgets/common/test/DataProcessorUI/QTwoLevelTreeModelTest.h index e3e9ef0e7a0877e21a9cfc9b572dee38d4509790..92bdf10706fff5860385a6877e6c58913594423b 100644 --- a/qt/widgets/common/test/DataProcessorUI/QTwoLevelTreeModelTest.h +++ b/qt/widgets/common/test/DataProcessorUI/QTwoLevelTreeModelTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/test/DataProcessorUI/TwoLevelTreeManagerTest.h b/qt/widgets/common/test/DataProcessorUI/TwoLevelTreeManagerTest.h index e2c445031710975dc838f55e0e32e05104bdfe1a..87406efecc998dabe23fac660a6e26a0721fb70e 100644 --- a/qt/widgets/common/test/DataProcessorUI/TwoLevelTreeManagerTest.h +++ b/qt/widgets/common/test/DataProcessorUI/TwoLevelTreeManagerTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/test/DataProcessorUI/WhiteListTest.h b/qt/widgets/common/test/DataProcessorUI/WhiteListTest.h index 3a9db6568ca5af3bfda797976eaba503ea6d7b60..b0a8254e3267fb8249989dd294395a9c49937a25 100644 --- a/qt/widgets/common/test/DataProcessorUI/WhiteListTest.h +++ b/qt/widgets/common/test/DataProcessorUI/WhiteListTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/test/FileDialogHandlerTest.h b/qt/widgets/common/test/FileDialogHandlerTest.h index 7e517b28ffc2866d9257b0cbce5df5b0b1f79078..593897d98e67ffa8e6e29a22c0f8dd1a418b494d 100644 --- a/qt/widgets/common/test/FileDialogHandlerTest.h +++ b/qt/widgets/common/test/FileDialogHandlerTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/test/FindFilesThreadPoolManagerTest.h b/qt/widgets/common/test/FindFilesThreadPoolManagerTest.h index 9e937f8195329ed45cbe8d242d3197793bfcfd09..fac06bebf0df5dcafa66a7d8d6516023fad03ee2 100644 --- a/qt/widgets/common/test/FindFilesThreadPoolManagerTest.h +++ b/qt/widgets/common/test/FindFilesThreadPoolManagerTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/test/FindFilesWorkerTest.h b/qt/widgets/common/test/FindFilesWorkerTest.h index 63a0cbe69e91ff36930ddbad5a09043c269cf9b0..4a8dec6eb5161ea42f3d1cd475a1cb28e841d789 100644 --- a/qt/widgets/common/test/FindFilesWorkerTest.h +++ b/qt/widgets/common/test/FindFilesWorkerTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/test/FunctionBrowserUtilsTest.h b/qt/widgets/common/test/FunctionBrowserUtilsTest.h index b63311bb16e8fe50ff42bc60a9ba4612ec49a6f8..366a9db9155751ed1b59bf1eb447e922e8a4d2bf 100644 --- a/qt/widgets/common/test/FunctionBrowserUtilsTest.h +++ b/qt/widgets/common/test/FunctionBrowserUtilsTest.h @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #pragma once #include "MantidAPI/FrameworkManager.h" diff --git a/qt/widgets/common/test/FunctionModelTest.h b/qt/widgets/common/test/FunctionModelTest.h index bd7477a1f102e8f853b5d6c8001b681551e0afa7..74457a92fbd2596a6ba5054dfa7ff4af9d327d82 100644 --- a/qt/widgets/common/test/FunctionModelTest.h +++ b/qt/widgets/common/test/FunctionModelTest.h @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #pragma once #include "MantidAPI/FrameworkManager.h" diff --git a/qt/widgets/common/test/FunctionMultiDomainPresenterTest.h b/qt/widgets/common/test/FunctionMultiDomainPresenterTest.h index b1157c5b1b7236c78440721545c0a587bb8b5e9e..1eaf4b62b538d3c9e332cc287d1242bfe1a95563 100644 --- a/qt/widgets/common/test/FunctionMultiDomainPresenterTest.h +++ b/qt/widgets/common/test/FunctionMultiDomainPresenterTest.h @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #pragma once #include "MantidAPI/CompositeFunction.h" diff --git a/qt/widgets/common/test/InterfaceManagerTest.h b/qt/widgets/common/test/InterfaceManagerTest.h index 8ecb7ee79f1ff90ade1a7fe664f40c4e75c728cd..068f7560e0783aacb0d9e44e13b190b8e12ba08a 100644 --- a/qt/widgets/common/test/InterfaceManagerTest.h +++ b/qt/widgets/common/test/InterfaceManagerTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + /* * InterfaceManagerTest.h diff --git a/qt/widgets/common/test/LogValueFinderTest.h b/qt/widgets/common/test/LogValueFinderTest.h index d9adbc49d0d3f6bb50d10c93b297ff2ef32c4fe0..7d8410fac109b21eda746788ea5cad59da68cfda 100644 --- a/qt/widgets/common/test/LogValueFinderTest.h +++ b/qt/widgets/common/test/LogValueFinderTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/test/MWRunFilesTest.py b/qt/widgets/common/test/MWRunFilesTest.py index 88ce17dd1265a6bd64aade92ac41358767d2df56..f01d47e254d37de0235e48670650efd87b2f12d9 100644 --- a/qt/widgets/common/test/MWRunFilesTest.py +++ b/qt/widgets/common/test/MWRunFilesTest.py @@ -1,8 +1,8 @@ # Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -# NScD Oak Ridge National Laboratory, European Spallation Source -# & Institut Laue - Langevin +# NScD Oak Ridge National Laboratory, European Spallation Source, +# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, division, print_function) import sys diff --git a/qt/widgets/common/test/MockScriptRepository.h b/qt/widgets/common/test/MockScriptRepository.h index 5a9821334cc9f44ff2053edbfd9f9105ad9cac5e..4218020fd7d87e512ddb646668ee88765a309f78 100644 --- a/qt/widgets/common/test/MockScriptRepository.h +++ b/qt/widgets/common/test/MockScriptRepository.h @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #pragma once #include "MantidAPI/ScriptRepository.h" diff --git a/qt/widgets/common/test/NonOrthogonalTest.h b/qt/widgets/common/test/NonOrthogonalTest.h index ba816d40ef125ee5d73b58a2c1fd204fccdb0ffe..a81add5506f080f448fd1050672dbd068758b2b8 100644 --- a/qt/widgets/common/test/NonOrthogonalTest.h +++ b/qt/widgets/common/test/NonOrthogonalTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/test/ParseKeyValueStringTest.h b/qt/widgets/common/test/ParseKeyValueStringTest.h index 153d453583547b524b69122262d9b2f600e8ef12..4ad1efb49c9f4fd3f142403a42fa1aa0f9112a05 100644 --- a/qt/widgets/common/test/ParseKeyValueStringTest.h +++ b/qt/widgets/common/test/ParseKeyValueStringTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/test/PlotAxisTest.h b/qt/widgets/common/test/PlotAxisTest.h index 38412bc1ff0061c846d9156a62af41c09ec45c78..7470f5ab07b9675016bc8235f198070a65484dc8 100644 --- a/qt/widgets/common/test/PlotAxisTest.h +++ b/qt/widgets/common/test/PlotAxisTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/test/ProgressableViewTest.h b/qt/widgets/common/test/ProgressableViewTest.h index dd3d0d3a577c66e724882db1ca10c19290f00e1a..9ff75808467f12e580e0221da12b726d4680bd8d 100644 --- a/qt/widgets/common/test/ProgressableViewTest.h +++ b/qt/widgets/common/test/ProgressableViewTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/test/ProjectSaveMockObjects.h b/qt/widgets/common/test/ProjectSaveMockObjects.h index 44d2a4027c41acd6029b35b0979a193a64d08a07..d8932d1fd95ce44d543ab27140a47e0f0a964e78 100644 --- a/qt/widgets/common/test/ProjectSaveMockObjects.h +++ b/qt/widgets/common/test/ProjectSaveMockObjects.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/test/ProjectSaveModelTest.h b/qt/widgets/common/test/ProjectSaveModelTest.h index 4f00fab4532c9ac3ca3ef915dfaeb785f3d4abc6..9489c88aced403f84adc23f78969dbfa8271ffdf 100644 --- a/qt/widgets/common/test/ProjectSaveModelTest.h +++ b/qt/widgets/common/test/ProjectSaveModelTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -17,6 +17,8 @@ #include <cxxtest/TestSuite.h> #include <gmock/gmock.h> +#include <utility> + using namespace MantidQt::API; using namespace MantidQt::MantidWidgets; using namespace testing; @@ -28,17 +30,18 @@ GNU_DIAG_OFF_SUGGEST_OVERRIDE class MockProjectSaveModel : public ProjectSaveModel { public: MockProjectSaveModel( - std::vector<MantidQt::API::IProjectSerialisable *> windows, + const std::vector<MantidQt::API::IProjectSerialisable *> &windows, std::vector<std::string> activePythonInterfaces = std::vector<std::string>()) - : ProjectSaveModel(windows, activePythonInterfaces) {} + : ProjectSaveModel(std::move(windows), + std::move(activePythonInterfaces)) {} MOCK_METHOD1(getProjectSize, size_t(const std::vector<std::string> &wsNames)); }; GNU_DIAG_ON_SUGGEST_OVERRIDE namespace { -size_t calculateSize(std::vector<Workspace_sptr> workspaces) { +size_t calculateSize(const std::vector<Workspace_sptr> &workspaces) { size_t result = 0; for (const auto &ws : workspaces) { result += ws->getMemorySize(); diff --git a/qt/widgets/common/test/ProjectSavePresenterTest.h b/qt/widgets/common/test/ProjectSavePresenterTest.h index 04630f15d03f6b603f4d2ffb40b31372be4cdfe1..7d6d326448ac6220cbd7346e0a0b30d64907a9cc 100644 --- a/qt/widgets/common/test/ProjectSavePresenterTest.h +++ b/qt/widgets/common/test/ProjectSavePresenterTest.h @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #pragma once #include <cxxtest/TestSuite.h> diff --git a/qt/widgets/common/test/Python/SipTest.h b/qt/widgets/common/test/Python/SipTest.h index df4238bc0e176fe3b99c70e77897d28c798a08ed..00158b193db66768af8d760721dcbc00df6b3949 100644 --- a/qt/widgets/common/test/Python/SipTest.h +++ b/qt/widgets/common/test/Python/SipTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/test/QtJSONUtilsTest.h b/qt/widgets/common/test/QtJSONUtilsTest.h index a29bd5b9b0f9f07f73aaf75757f3b8d12e75bb4a..984de6947682bceb201d8da886516571b7a92b29 100644 --- a/qt/widgets/common/test/QtJSONUtilsTest.h +++ b/qt/widgets/common/test/QtJSONUtilsTest.h @@ -1,10 +1,9 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + - #pragma once #include "MantidQtWidgets/Common/QtJSONUtils.h" diff --git a/qt/widgets/common/test/RepoModelTest.h b/qt/widgets/common/test/RepoModelTest.h index bdbfc2ce9c85999dd41cec94bd3ec008d5405fff..30908fefd579e2f7b475f1a758e26853ffc23d68 100644 --- a/qt/widgets/common/test/RepoModelTest.h +++ b/qt/widgets/common/test/RepoModelTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/test/SelectionNotificationServiceTest.h b/qt/widgets/common/test/SelectionNotificationServiceTest.h index 66b3c63b63ba1b5af72f57e0108ee56b763ab588..8fa5c881b7966c70f964ed379536ff3628d2a646 100644 --- a/qt/widgets/common/test/SelectionNotificationServiceTest.h +++ b/qt/widgets/common/test/SelectionNotificationServiceTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/test/SignalBlockerTest.h b/qt/widgets/common/test/SignalBlockerTest.h index 5bc7a95c52e29f8e9f50ae6a77e2e7fbbbe42354..d9a68bb7fd4fa234d0804c813f3529a9c3b8fcb3 100644 --- a/qt/widgets/common/test/SignalBlockerTest.h +++ b/qt/widgets/common/test/SignalBlockerTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/test/TrackedActionTest.h b/qt/widgets/common/test/TrackedActionTest.h index 62e7d23466db9302b7f9d4cabaddac3ccf4f2b89..65f860c7437d04fce644418d8e1c37d7e09f7d51 100644 --- a/qt/widgets/common/test/TrackedActionTest.h +++ b/qt/widgets/common/test/TrackedActionTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/test/UserInputValidatorTest.h b/qt/widgets/common/test/UserInputValidatorTest.h index 78cdbbf8f1e61aab61ca0f71f4c1ee9ec255934d..b4c55787474d3618ec14b3bb7adb1a363f775698 100644 --- a/qt/widgets/common/test/UserInputValidatorTest.h +++ b/qt/widgets/common/test/UserInputValidatorTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/test/WidgetsCommonTestInitialization.h b/qt/widgets/common/test/WidgetsCommonTestInitialization.h index 3c30ac94a192a2bbdea92b91c69cf8203392af10..d78f311b73fc01cc5d7ecbe7f45da1f1f740b686 100644 --- a/qt/widgets/common/test/WidgetsCommonTestInitialization.h +++ b/qt/widgets/common/test/WidgetsCommonTestInitialization.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/common/test/WorkspacePresenter/ADSAdapterTest.h b/qt/widgets/common/test/WorkspacePresenter/ADSAdapterTest.h index 57e0f279a3dfdc8115fb5662f15704f28299a4c2..3a2e846131ad0488bb3a44b6646638de7cdb1f6c 100644 --- a/qt/widgets/common/test/WorkspacePresenter/ADSAdapterTest.h +++ b/qt/widgets/common/test/WorkspacePresenter/ADSAdapterTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidAPI/AnalysisDataService.h" #include "MantidAPI/WorkspaceGroup.h" diff --git a/qt/widgets/common/test/WorkspacePresenter/WorkspacePresenterTest.h b/qt/widgets/common/test/WorkspacePresenter/WorkspacePresenterTest.h index 16f24a44a49b00cf32321bc5fccf16815d56275f..916adb5874e612fc6e7e7075a2314394df85d5af 100644 --- a/qt/widgets/common/test/WorkspacePresenter/WorkspacePresenterTest.h +++ b/qt/widgets/common/test/WorkspacePresenter/WorkspacePresenterTest.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include <cxxtest/TestSuite.h> #include <gmock/gmock.h> @@ -657,7 +657,7 @@ private: boost::shared_ptr<NiceMock<MockWorkspaceDockView>> mockView; WorkspacePresenterVN_sptr presenter; - void createGroup(std::string groupName) { + void createGroup(const std::string &groupName) { auto group = WorkspaceCreationHelper::createWorkspaceGroup(0, 10, 10, groupName); auto wksp1 = WorkspaceCreationHelper::create2DWorkspace(10, 10); @@ -669,7 +669,7 @@ private: AnalysisDataService::Instance().addToGroup(groupName, "wksp2"); } - void removeGroup(std::string groupName) { + void removeGroup(const std::string &groupName) { AnalysisDataService::Instance().deepRemoveGroup(groupName); } }; diff --git a/qt/widgets/factory/inc/MantidQtWidgets/Factory/DllOption.h b/qt/widgets/factory/inc/MantidQtWidgets/Factory/DllOption.h index 510d413c0cc596c6e4c71bc9d01db34e76202d59..478662f390ae2ca1130d98e6640a1c5e949035f3 100644 --- a/qt/widgets/factory/inc/MantidQtWidgets/Factory/DllOption.h +++ b/qt/widgets/factory/inc/MantidQtWidgets/Factory/DllOption.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/factory/inc/MantidQtWidgets/Factory/WidgetFactory.h b/qt/widgets/factory/inc/MantidQtWidgets/Factory/WidgetFactory.h index c079f3369e207d50d6a9ddc3eab61570c3ff0bfa..269acd12a3e5d221210bad0656512d36e811d5bf 100644 --- a/qt/widgets/factory/inc/MantidQtWidgets/Factory/WidgetFactory.h +++ b/qt/widgets/factory/inc/MantidQtWidgets/Factory/WidgetFactory.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/factory/src/WidgetFactory.cpp b/qt/widgets/factory/src/WidgetFactory.cpp index 30984af14fda184476a48411d231d33b21be21e5..213fe07075782d3a86eaffbfe13b2fbe5bb138e5 100644 --- a/qt/widgets/factory/src/WidgetFactory.cpp +++ b/qt/widgets/factory/src/WidgetFactory.cpp @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #include "MantidQtWidgets/Factory/WidgetFactory.h" #include "MantidKernel/System.h" diff --git a/qt/widgets/instrumentview/CMakeLists.txt b/qt/widgets/instrumentview/CMakeLists.txt index 806dea6b7d86ab3524c920868d31511cf23b493b..aeff73ba953eb6eea8514304d0717a61b0f53813 100644 --- a/qt/widgets/instrumentview/CMakeLists.txt +++ b/qt/widgets/instrumentview/CMakeLists.txt @@ -258,8 +258,7 @@ mtd_add_qt_tests( ${POCO_LIBRARIES} ${Boost_LIBRARIES} ${PYTHON_LIBRARIES} - ${GMOCK_LIBRARIES} - ${GTEST_LIBRARIES} + gmock QT5_LINK_LIBS Qt5::OpenGL MTD_QT_LINK_LIBS MantidQtWidgetsCommon diff --git a/qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/BankRenderingHelpers.h b/qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/BankRenderingHelpers.h index d5cf760e310142fa84cca9c492f11ece7971b754..cb1c13c28ce120169d51483ee1213d7ff69e1207 100644 --- a/qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/BankRenderingHelpers.h +++ b/qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/BankRenderingHelpers.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "DllOption.h" diff --git a/qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/BankTextureBuilder.h b/qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/BankTextureBuilder.h index 07ec22b7b7c268598978d79bb8d703db72c93b98..c9e7bfe57f3043f4e87df4382ce0b5376c183277 100644 --- a/qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/BankTextureBuilder.h +++ b/qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/BankTextureBuilder.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/BaseCustomInstrumentModel.h b/qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/BaseCustomInstrumentModel.h index 0a7bacf1fc0415883183657b69ad4f2f0766a195..159f6ac35d62745e4e7cd10ab205c3be47b57c8e 100644 --- a/qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/BaseCustomInstrumentModel.h +++ b/qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/BaseCustomInstrumentModel.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/BaseCustomInstrumentPresenter.h b/qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/BaseCustomInstrumentPresenter.h index 102bca51e2d24021419cc45df4f18e1e540b3b7b..e90c39e2002ae30869093e2915c68040f096c59a 100644 --- a/qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/BaseCustomInstrumentPresenter.h +++ b/qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/BaseCustomInstrumentPresenter.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once #include "DllOption.h" diff --git a/qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/BaseCustomInstrumentView.h b/qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/BaseCustomInstrumentView.h index ad87b4db9e8ce9b9d95c8cd97de1fec8854cb58f..a81b5b15c676cb13a8de77d8af3b4a3972ced7ec 100644 --- a/qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/BaseCustomInstrumentView.h +++ b/qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/BaseCustomInstrumentView.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/BinDialog.h b/qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/BinDialog.h index 7dbbe6510fafe337f2a053e3b98bdd408b70669e..80f1eb2a07e0a10167f30bd08a4732d187e5d56d 100644 --- a/qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/BinDialog.h +++ b/qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/BinDialog.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/CollapsiblePanel.h b/qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/CollapsiblePanel.h index 42b5d71ab00b215637bdff1f9131e4f29d7fb78a..f6c85b933307e4b589c736fae0bf6fd21093ca17 100644 --- a/qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/CollapsiblePanel.h +++ b/qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/CollapsiblePanel.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/ColorBar.h b/qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/ColorBar.h index 937fe790ca2c979ede5b4b41528abf4520148460..c983a0f0a97849f9a7f6706a291832a1ca08b660 100644 --- a/qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/ColorBar.h +++ b/qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/ColorBar.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/ColorMap.h b/qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/ColorMap.h index 45fdec7d4ed01aacb6305c444654ea6feaaa0105..5106a4e174c3640523aa1838f4ce6483ace9b4bd 100644 --- a/qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/ColorMap.h +++ b/qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/ColorMap.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/DetXMLFile.h b/qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/DetXMLFile.h index eeb39a3b6bfeb9f011194dad4262b3f307202ad6..f33eb3fb5f3ccfcebcb06a02ba27120849b124c3 100644 --- a/qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/DetXMLFile.h +++ b/qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/DetXMLFile.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/DllOption.h b/qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/DllOption.h index 3a83f5a2a0f1e61fa7bea8fa7b2a73acc62441a5..2700003a8156cebaa911ab239e902eeb8f75e926 100644 --- a/qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/DllOption.h +++ b/qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/DllOption.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/GLColor.h b/qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/GLColor.h index 4a26ddea452d3fcc926256ee5baed902df3be6d8..4721d5edeeb65746837484ba3fe9f3d848bdc260 100644 --- a/qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/GLColor.h +++ b/qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/GLColor.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2009 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/GLObject.h b/qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/GLObject.h index 7ea9ded44c6957714e199d46b00305732eff7a63..a9a7efc1bb17920bee1bca9c285b22f410f80a11 100644 --- a/qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/GLObject.h +++ b/qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/GLObject.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/GridTextureFace.h b/qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/GridTextureFace.h index 825d58703b404b2daf63cc0657a784c4b03f74ed..25ccd02a0fc60ccbf52fc0ebc1cdd5ec61cb4870 100644 --- a/qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/GridTextureFace.h +++ b/qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/GridTextureFace.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once namespace MantidQt { diff --git a/qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/InstrumentActor.h b/qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/InstrumentActor.h index 7f23fc3d6a3abf74b07bd8452c7ca88aeccd5005..12f95b9866f86c07bfd5ce3ed37bc44c86fe353e 100644 --- a/qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/InstrumentActor.h +++ b/qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/InstrumentActor.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -216,9 +216,10 @@ signals: void colorMapChanged() const; private: - void setUpWorkspace( - boost::shared_ptr<const Mantid::API::MatrixWorkspace> sharedWorkspace, - double scaleMin, double scaleMax); + void + setUpWorkspace(const boost::shared_ptr<const Mantid::API::MatrixWorkspace> + &sharedWorkspace, + double scaleMin, double scaleMax); void setupPhysicalInstrumentIfExists(); void resetColors(); void loadSettings(); diff --git a/qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/InstrumentRenderer.h b/qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/InstrumentRenderer.h index b087d0bb79619c4f9ea8b612f25a81a982b5845b..129c763c3d9c9e569e5eb6597d4814a5b0d5aaed 100644 --- a/qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/InstrumentRenderer.h +++ b/qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/InstrumentRenderer.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/InstrumentTreeModel.h b/qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/InstrumentTreeModel.h index e994cd5cede11f8c2055112d31dae58a8b4923d3..7bca36ed9048297c9ebca99e5367aa9c6e29446a 100644 --- a/qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/InstrumentTreeModel.h +++ b/qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/InstrumentTreeModel.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once diff --git a/qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/InstrumentTreeWidget.h b/qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/InstrumentTreeWidget.h index b4ee71e9cb1e66451d25e21c4fc7180220cd330f..20a66988fdde9c2119298d806bcbe97ad046f78c 100644 --- a/qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/InstrumentTreeWidget.h +++ b/qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/InstrumentTreeWidget.h @@ -1,8 +1,8 @@ // Mantid Repository : https://github.com/mantidproject/mantid // // Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin +// NScD Oak Ridge National Laboratory, European Spallation Source, +// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS // SPDX - License - Identifier: GPL - 3.0 + #pragma once @@ -39,7 +39,7 @@ public: QStringList findExpandedComponents(const QModelIndex &parent = QModelIndex()) const; public slots: - void sendComponentSelectedSignal(const QModelIndex /*index*/); + void sendComponentSelectedSignal(const QModelIndex &